Skip to content
Playground(another site)

v0.313.0

Released on 8 October 2026 as v0.313.0, with the increments from v0.309.5 to v0.313.0. See Upgrading for what to change when you move to it.

VersionHighlights
v0.313.0A case can claim that a call faults: expect <call> faults holds when awaiting the call throws, as a stub … fails does (#1706). The testing docs showed a fails fault surfacing as an Err, but it throws out of the handler and out of the case, and no expect could observe it. The docs now agree with the runtime, and the new claim is checked: its subject must be an effectful call (bynk.expect.faults_not_effect), and it is not allowed at system (bynk.test.faults_needs_in_process)
v0.312.4A unit that uses a commons now imports every type of that commons its emitted TypeScript names, not only the ones its source spells (#1778). A literal admitted as a refined type is cast to it (("a" as Repo)), and a list kernel annotates its callback with the element type ((__x: Repo) => …), so a record literal or a mapped field whose type was declared in a used commons failed tsc with TS2304, in a context and in a second commons alike. bynkc check passed while bynkc test, bynk dev and bynk deploy failed. A name taken from a checked type is imported only when the emitted module spells it, so no unit gains an unused import or a context a new export. A refined type reached through a commons the unit does not itself uses is still unbranded (#1807)
v0.312.3fmt keeps a -- comment inside a sum type (#1794): above a variant, at the end of its line, on the enum { or = line, before an enum’s closing }, and between a pipe-form sum’s last variant and its embeds clause. Such a file was refused with bynk.fmt.comment_loss; a commented enum now prints multi-line. A comment inside a variant’s payload list, or between two embeds entries, is still refused
v0.312.2bynk fmt output is unchanged (internal; suggested by the review of #1799). The formatter ends a line, with a trailing comment or a bare newline, through one helper rather than a two-statement idiom repeated at 27 sites, where writing one half without the other was an easy mistake
v0.312.1Agents are declared in Cloudflare’s exports map instead of a v1 migration, so an agent added after the first deploy is registered (#1796). Breaking: a Worker whose agents Bynk 0.309.10 or earlier created key-value-backed must be deleted and redeployed
v0.312.0A match arm’s if guard borrows held values, and a ~> send inside a guard threads the execution context (#1769). The linearity pass never looked inside a guard, so a guard could transfer a held connection unseen; a consuming use in a guard is now bynk.held.consume_on_borrow. And a send in a guard’s if block emitted deps.__exec.waitUntil(…) for a context that never threaded __exec, so its output failed to type-check
v0.311.1fmt keeps -- comments inside an actor { … } body and an exports … { … } list (#1797): on the { line, above an auth/identity entry or an exported name, at the end of its line, and before the }. A commented actor or list prints in its multi-line form. These used to be refused with bynk.fmt.comment_loss wherever they sat. A comment inside an if/else block is still refused (#523)
v0.311.0A from Events service has exactly one on event handler, which returns Effect[()] (#1781). A second on event is now bynk.event.duplicate_handler; it used to compile to an object with a duplicate event key, which tsc --strict rejected and which ran only the last handler in the bundle. A return other than Effect[()] is now bynk.event.return_not_effect_unit; the value was discarded, since emission is fire-and-forget. To react to one event two ways, declare two subscriber services
v0.310.0A service’s cors, security and limits policies must open its body in that order, before any handler (#1784). The compiler accepted them anywhere, even after a handler, while the editor’s tree-sitter grammar and the specification required this order, and fmt silently rewrote a file into it. A policy out of order or after a handler is now the parse error bynk.parse.policy_order; move it up
v0.309.13fmt keeps a -- comment on the same line as an opening { (#1788), moving it onto its own line under the brace. It used to refuse such a file with bynk.fmt.comment_loss; now the comment is kept on a unit, service, agent, capability, provider or adapter body, a policy, a fn block and a record type. Comments inside a record type (or event) body, and above or at the end of an agent’s key line, are kept too; those were refused wherever they sat
v0.309.12On Windows, stopping bynk dev now stops each context’s whole wrangler process tree, workerd included, by running it in a job object, so the next bynk dev no longer fails with Address already in use (#1762)
v0.309.11Agents deploy as SQLite-backed Durable Objects (emitter/tooling; closes #1779). The generated wrangler.toml declared every agent class, and the events fan-out class, with a new_classes migration, which creates key-value-backed Durable Objects. The Workers Free plan allows only SQLite-backed ones, so bynk deploy of any project with an agent failed there (code: 10097). The migration now uses new_sqlite_classes, which Cloudflare also recommends for new classes on every plan. Agent code and generated runtime are unchanged: a SQLite-backed Durable Object keeps the key-value storage API, and the emitted agent uses only storage.get/storage.put on one key. A Worker already deployed with a key-value v1 keeps it: Wrangler sends only migrations after the deployed tag, so redeploying sends none.
v0.309.10Rich diagnostics can be coloured without a terminal (#1777): FORCE_COLOR or CLICOLOR_FORCE, set to anything but empty or 0, turns colour on for less -R or a CI log that renders ANSI. NO_COLOR still wins over both, as it does for clap’s own help and errors
v0.309.9fmt keeps comments inside a cors, security or limits policy (#1786): above a field, at the end of a field’s line, before the closing } and after it. It used to refuse such a file with bynk.fmt.comment_loss, and before that deleted the comments silently. A --- block inside a policy is kept as an orphan, and bynk check now warns bynk.parse.orphan_doc_block on it instead of dropping it with no warning
v0.309.8fmt keeps an orphaned --- doc block where it is, followed by its blank line, and formats the rest of the file, where since #1664 it refused the whole file (and format-on-save did nothing). A block before a declaration, between two, before the unit header, at the end of a file or of a commons, context, adapter, suite, service, agent or capability body, or before a service policy or an adapter’s binding/uses/consumes/exports is kept, and bynk check still warns bynk.parse.orphan_doc_block on the output: formatting never attaches it. The last two shapes used to be dropped with no warning at all. Also fixed: fmt silently deleted a -- comment before the closing } of a service, agent or capability (now kept) or inside a cors/security/limits policy (now refused with bynk.fmt.comment_loss), and refused a file with a -- comment directly under a doc block’s closing --- (now kept) (#1756)
v0.309.7The specification’s grammar now embeds every production (#1780): the from http policy sections (cors, security, limits), the WebSocket on open/on close heads, scheme config arguments, annotation arguments, Wire(...), the literal, or-, parenthesised and refined patterns, property/for all, the case-level by <Actor>(…), and string interpolation. A new grammar production now fails CI until the spec covers it, as the reference already did
v0.309.6Documentation truth pass (#1669). The specification now covers events (§4.1.12, §4.4.7b, §5.7b: declaration, owner-only emission, subscriptions and their filters, the envelope, schema versions, and the Idempotency dedup idiom) and message bundles (§4.1.13–§4.1.14, §5.11, with the Locale capability). Pages that still called events or storage kinds deferred now say they shipped; sagas and event replay remain planned. The 1.0 definition and design notes name the shipped agent-call form, Counter(id).bump(), in place of the never-built Ref[A]; the type-system design spec settles effect inference (declared on named declarations, inferred only on lambdas, #1529) and drops tuples (#1530)
v0.309.5Rich diagnostics are coloured only when stderr is a terminal and NO_COLOR is unset or empty, so a piped or redirected report has no ANSI escapes. A source line longer than 400 bytes is cut to a window around its labels, marked …, with the header still naming the column in the file: a diagnostic on a megabyte line used to take seconds and write megabytes, five escapes a character (#1666)