You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bynk has no way to share code across a package boundary — every project is an
island: a bynk.toml, a src/ tree, and whatever it authors itself. This track
gives Bynk a package unit and the machinery to publish and consume it: a
four-tier identity (organisation/workspace/package/unit) with flat, dotted,
cross-package names; workspaces; a dependency + resolution surface with a bynk.lock; and a distribution backbone — a dedicated Bynk registry for the
Bynk layer, npm retained for the adapter layer, git/URL as the bootstrap + private
hatch.
When the track retires, a Bynk package can be published under an owned namespace
and mixed into a consumer's build source-level, no separate ABI — taking Bynk
from "one team, one repo" to an ecosystem, at the moment the language is
feature-complete and approaching the ~1.0 runtime-ABI freeze.
Realises:design/bynk-design-notes.md §3 (bounded context as "a rough
analogue of a module/package"), §19 (project structure; first-party caps
"depending on packaging"), §21 (commons vendored / source-level mixin); and the
deferrals ADR 0086 (first-party publish, gated on the ABI freeze) and ADR 0012
(ambient bynk surface "splittable later") parked.
Track doc (already a committed Draft):design/tracks/packaging.md
Why a track (the ADR 0076 trigger)
Multi-increment — the flat-name cutover, the manifest/workspace surface,
the resolver, npm-dependency propagation, the registry, adapter trust,
behavioural units, and the first-party lift are eight ordered slices (§9); a
single delete-on-merge proposal cannot carry the connective identity/resolver/
backbone design across them.
Surface not yet settled (at draft time) — the package payload, the
four-tier identity model, the version-selection algorithm, and the distribution
backbone were all genuinely open; they are settled in the doc (§8) and land as
front-loaded ADRs.
Security/safety boundary — the track distributes code the consumer compiles and ships; the adapters' transitive npm dependencies are a
supply-chain surface, and this track finally closes the still-Open ADR 0020
(adapter dependency trust).
Open design questions
Settled in the doc (§8); listed here as the settling agenda, with disposition:
Distribution backbone (Q1) — DECIDED: dedicated Bynk registry for the Bynk
layer, npm retained for adapters, git/URL bootstrap + private hatch (§6).
Shareable-unit set (Q2) — DECIDED: commons + adapters + behavioural library
units; the context-as-deployment-unit wrapper excluded.
Identity & namespacing (Q3) — DECIDED:organisation.package.unit; flat unit
names unique within a package; reserved org bynk; flat source layout.
Version selection (Q6) — DECIDED: single-version resolution; version_conflict
the honest failure.
Platform dimension & reserved-org home (Q10/Q11) — DECIDED:bynk.cloudflare
is one cohesive multi-unit package under reserved org bynk.
Behavioural-unit declaration site (Q9) — scoped out of settle: distribution is
in; the language-surface change is slice 6's own ADR, gated on the
agent-capability-encapsulation track.
Mixin semantics (Q4), lockfile schema (Q7) — deferred to slice 2 by design
(spec-write / serialised format, not hard-to-reverse calls).
The shareable-unit set (what a package may contain).
The identity model — flat names + organisation/workspace/package/unit.
Workspaces (members, the root lock, inheritance).
The distribution backbone (dedicated registry; npm for adapters; git/URL
bootstrap/escape).
Single-version resolution + the lockfile.
Adapter package trust (supersedes ADR 0020).
(Numbers taken at merge, per ADR 0076 — not pre-allocated.)
Threat model
The track distributes code the consumer compiles and ships, so it is a
supply-chain surface:
The executable risk is the adapters' transitive npm deps, which run install
scripts and ship JS into the Worker. Bynk source itself has no install
scripts and no build step — resolving a Bynk package executes no
dependency-authored code. Mitigation: close ADR 0020 (slice 5) — a consumer
reviews/approves/diffs the npm deps a dependency's adapters would add, pinned in bynk.lock, before they enter the build.
Integrity & pinning:bynk.lock pins exact versions + content hashes; the
dedicated registry adds authenticated, immutable, content-addressed publishes;
hermetic builds verify the lock before compiling.
Namespace safety:organisation.package.unit makes cross-package collisions
structural; reserved org bynk means no third party can impersonate the stdlib,
ambient, or platform surface.
No widening of the type-boundary trust model: opaque/transparent export and
sealed construction hold across a package boundary exactly as across a context
boundary; a dependency cannot construct a consumer's sealed types nor expose its
own beyond its declared exports.
Platform lock is part of a package's contract: a Cloudflare-locked
behavioural unit's lock is surfaced at resolve time, not discovered at deploy.
No resolve-time code execution in the Bynk layer — the only executable risk
is the npm sub-layer, fenced by the ADR 0020 closure.
The theme
Bynk has no way to share code across a package boundary — every project is an
island: a
bynk.toml, asrc/tree, and whatever it authors itself. This trackgives Bynk a package unit and the machinery to publish and consume it: a
four-tier identity (
organisation/workspace/package/unit) with flat, dotted,cross-package names; workspaces; a dependency + resolution surface with a
bynk.lock; and a distribution backbone — a dedicated Bynk registry for theBynk layer, npm retained for the adapter layer, git/URL as the bootstrap + private
hatch.
When the track retires, a Bynk package can be published under an owned namespace
and mixed into a consumer's build source-level, no separate ABI — taking Bynk
from "one team, one repo" to an ecosystem, at the moment the language is
feature-complete and approaching the ~1.0 runtime-ABI freeze.
design/bynk-design-notes.md§3 (bounded context as "a roughanalogue of a module/package"), §19 (project structure; first-party caps
"depending on packaging"), §21 (commons vendored / source-level mixin); and the
deferrals ADR 0086 (first-party publish, gated on the ABI freeze) and ADR 0012
(ambient
bynksurface "splittable later") parked.design/tracks/packaging.mdWhy a track (the ADR 0076 trigger)
the resolver, npm-dependency propagation, the registry, adapter trust,
behavioural units, and the first-party lift are eight ordered slices (§9); a
single delete-on-merge proposal cannot carry the connective identity/resolver/
backbone design across them.
four-tier identity model, the version-selection algorithm, and the distribution
backbone were all genuinely open; they are settled in the doc (§8) and land as
front-loaded ADRs.
compiles and ships; the adapters' transitive npm dependencies are a
supply-chain surface, and this track finally closes the still-Open ADR 0020
(adapter dependency trust).
Open design questions
Settled in the doc (§8); listed here as the settling agenda, with disposition:
layer, npm retained for adapters, git/URL bootstrap + private hatch (§6).
units; the context-as-deployment-unit wrapper excluded.
organisation.package.unit; flat unitnames unique within a package; reserved org
bynk; flat source layout.version_conflictthe honest failure.
ambient/stdlib publish post-ABI-freeze (~1.0).
bynk.cloudflareis one cohesive multi-unit package under reserved org
bynk.in; the language-surface change is slice 6's own ADR, gated on the
agent-capability-encapsulation track.
(spec-write / serialised format, not hard-to-reverse calls).
Candidate slice decomposition
a lock skeleton; no resolution yet).
single-version resolution; Q4 spec'd here).
requires;integrity in the lock, Q7).
own track).
agent-capability-encapsulation track).
bynk.*workspace (deferred ~1.0; ambient + stdlib +bynk.cloudflarelift; gated on the ABI freeze).Slice status
bynk.*workspace (deferred ~1.0)Front-loaded ADR candidates
organisation/workspace/package/unit.bootstrap/escape).
(Numbers taken at merge, per ADR 0076 — not pre-allocated.)
Threat model
The track distributes code the consumer compiles and ships, so it is a
supply-chain surface:
scripts and ship JS into the Worker. Bynk source itself has no install
scripts and no build step — resolving a Bynk package executes no
dependency-authored code. Mitigation: close ADR 0020 (slice 5) — a consumer
reviews/approves/diffs the npm deps a dependency's adapters would add, pinned in
bynk.lock, before they enter the build.bynk.lockpins exact versions + content hashes; thededicated registry adds authenticated, immutable, content-addressed publishes;
hermetic builds verify the lock before compiling.
organisation.package.unitmakes cross-package collisionsstructural; reserved org
bynkmeans no third party can impersonate the stdlib,ambient, or platform surface.
sealed construction hold across a package boundary exactly as across a context
boundary; a dependency cannot construct a consumer's sealed types nor expose its
own beyond its declared
exports.behavioural unit's lock is surfaced at resolve time, not discovered at deploy.
is the npm sub-layer, fenced by the ADR 0020 closure.