Tasks are fire-and-forget only: function TASK:NAME(props : dval) and
task_execute(target, timeout_seconds, props). The durable queue, the
TASK_WORKERS pool with its leases, cancellation, admission health and recovery,
task, task_status, task_await, task_cancel, the background form of shell_exec,
job_status, job_result, job_await, job_cancel, http_request_async, the job
directory and its --job-worker helper, their pages, fixtures, guide sections,
settings documentation and parity rows are gone. A bare TASK handler is a
compile error.
shell_exec(command, {on_done: "/unit.capy:NAME"}) keeps the one job use that
mattered: the command runs in the detached task runner, and TASK:NAME of the
unit receives command, exit_code, stdout, stderr, timed_out and
output_truncated when it finishes. Unit path resolution is shared by tasks and
services. The tasks guide is "Tasks and commands" with a stable slug change.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
An array type is constructible into dval like scalars and strings, so
port_spawn(["cat"]) resolves and lowers through the dval constructor; a
non-literal array still fails there with the existing message. The service
fixtures and the port_spawn page use the literal form again, and the services
guide names the oversized-message refusal beside the other two reasons a send
returns false.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
function CLI:NAME() compiles like the other named handlers and exports
__bearer_cli_NAME; bearer-cli /unit.capy:NAME runs it, with --get pairs in
request.query. The static gate, the doc checker, the handler form list, the
CLI handler page, the language reference, and the skill file know the form, and
a fixture with a default and a named entry point is in phase 1.
The services handler page and guide now describe the mailbox bound as the
kernel datagram queue, say that an unknown signal is dropped and logged, and
that a send to a listening service is one datagram.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A top-level var is one mutable Wasm global, initialized in declaration order by
an exported __wasm_call_ctors that the worker already runs once per workspace
after relocation and before INIT. Functions and closures read and assign unit
variables directly; managed values retain and release like locals; a local or
parameter shadows them; an initializer sees only the variables above it and has
no request. Names cannot be request, props, none, or collide with a function,
struct, or alias. The capability scan is seeded with unit variable types, the
LSP reports them as variable symbols, and the services design note now keeps
service state in unit variables with the synthetic request bound for builtins.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SERVICE:NAME handlers compile like TASK:NAME props handlers and export
__bearer_service_NAME. The Wasm core gains bearer_wasm_invoke_service_event,
which runs one handler with decoded event props against the shared request
value without writing a response back. The worker keeps one workspace per
service process (wasm_worker_service_open/event) and the backend exposes
wasm_backend_service_open, wasm_backend_service_event, and
wasm_backend_service_close for the service loop. Core ABI 39; artifact golden
refreshed for the embedded ABI version.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The capability scan typed `level + 1` from its integer literal, so a u64
map entry lost its boxing import; a literal operand now takes the other
operand type when that side is not a literal itself. A lambda that calls
an import alias or a module member lowers to unit_call or call, which
capture request, so the lambda now carries that capture. Golden refreshed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Handlers take (props : dval, request : dval) for COMPONENT and TASK and
(request : dval) otherwise; every parameter is optional and keeps its name,
and request is bound in every handler body. name : capture type fills an
omitted argument from the caller variable of that name. Exported (dval) dval
functions carry an implicit request capture. Request builtins capture
request; redirect writes request.out. The runtime builds one request value
per request, passes request and props handles to handlers, applies
request.out once after the top-level handler, and drops the pending-props
slot, handler frames, per-handler refresh, and current_request(). Core ABI
38, unit ABI 39. Legacy request type checks and the removed-API migration
table are gone from the compiler. Documentation, generated routes, tests,
and the project home follow; the home page loses the demo and starter.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>