@inventarch/db 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,7 +36,7 @@ try {
36
36
  }
37
37
  ```
38
38
 
39
- `open` admits the workspace once. `resolveScope` issues an opaque token, and every read that passes it as `within` stays inside that scope. Band 100 marks a record the workspace authors. `cache: false` makes the open fully read-only. Without it, the handle keeps a disposable graph cache at `.ia/.iadb/graph.json`; a handle opened with `checks: 'structural'` or `evidence: true` never reads or writes that cache. The `.ia/.gitignore` that `ia init` writes does not list `.iadb/`, so add it to your ignore file.
39
+ `open` admits the workspace once. `resolveScope` issues an opaque token, and every read that passes it as `within` stays inside that scope. A handle holds the 4,096 ordinary scopes most recently issued or read, so a token left unread past that refuses with `IA-DB-STALE`, as one does once its sources change: issue a new scope. A scope issued with `pinned: true` sits outside that bound and stays until the sources change or the handle closes. Only a host holding the handle can pin, and nothing limits how many it does, so pin only what you can count. Band 100 marks a record the workspace authors. `cache: false` makes the open fully read-only. Without it, the handle keeps a disposable graph cache at `.ia/.iadb/graph.json`; a handle opened with `checks: 'structural'` or `evidence: true` never reads or writes that cache. The `.ia/.gitignore` that `ia init` writes does not list `.iadb/`, so add it to your ignore file.
40
40
 
41
41
  ## 🧭 What it does
42
42
 
package/SPEC.md CHANGED
@@ -30,17 +30,17 @@ The public `@inventarch/db/descriptors` entrypoint owns the pure, bounded, versi
30
30
 
31
31
  ## Distribution implementation packet
32
32
 
33
- The public `@inventarch/db/distribution` entrypoint owns strict version-1 transport decoders and canonical bytes for release descriptors/manifests, portable locks, generation membership and activation pointers. JSON rejects duplicate decoded keys and unknown fields; object input must be bounded plain data without accessors or aliases. Native parsing stays in language. Package IDs are provider-qualified lowercase `provider/name`; versions and ranges use pinned SemVer. No absolute path or credential enters a portable lock. Metadata limits are 4 MiB, 128 selected bundles and 10,000 files, beside separate archive/file ceilings. Decoding copies and freezes output. A release descriptor's `distribution` is its one optional key (2026-10-09): a workspace that releases nothing, as one a default `ia init` creates, omits it, and the decoded `ReleaseDescriptor` then has no `distribution` property; present, it must still be a native distribution identity, never null. A bundle manifest always carries one, and its decoded keys keep their order, so canonical bytes are unchanged.
33
+ The public `@inventarch/db/distribution` entrypoint owns strict version-1 transport decoders and canonical bytes for release descriptors/manifests, portable locks, generation membership and activation pointers. JSON rejects duplicate decoded keys and unknown fields; object input must be bounded plain data without accessors or aliases. Native parsing stays in language. Package IDs are provider-qualified lowercase `provider/name`; versions and ranges use pinned SemVer. `commonRange(a, b)` returns a range accepting exactly what both ranges accept, or null when it cannot write one: the narrower of two nested ranges as spelled when it admits no prerelease, otherwise the sorted conjunction of their comparators, and null for a prerelease in a conjunction or a result past the 256-character range limit. No absolute path or credential enters a portable lock. Metadata limits are 4 MiB, 128 selected bundles and 10,000 files, beside separate archive/file ceilings. Decoding copies and freezes output. A release descriptor's `distribution` is its one optional key (2026-10-09): a workspace that releases nothing, as one a default `ia init` creates, omits it, and the decoded `ReleaseDescriptor` then has no `distribution` property; present, it must still be a native distribution identity, never null. A bundle manifest always carries one, and its decoded keys keep their order, so canonical bytes are unchanged.
34
34
 
35
35
  The same entrypoint shapes the installed-implementation catalog a host payload carries: `checkInstalledImplementations(value)` admits exactly `format` `ia.installed-implementations.v1`, an `evaluators` section with an `ia-evaluator-catalog/1.x` format and at most 1,024 entries, and at most 1,024 `operations` sorted by id and unique, each `available` (id, version, operation identity, handler, input and output validator ids, a portable `runtime/node_modules/...` handler module inside one of its sorted `packages`, and the module's SHA-256), `unavailable` or `revoked` with a single-line reason, and returns the value or the first reason it is not one; it reads, loads and executes nothing. `@inventarch/distribution` verifies a catalog against its payload with it and `@inventarch/workspace-runtime` binds records against its rows (`InstalledOperation`).
36
36
 
37
- Generation membership enumerates selected bundle IDs/archive digests and source inventories derived from verified manifests, with deterministic identical-system deduplication and contributing-package provenance. Readers verify complete file inventory, exact canonical generation bytes and the active lock, and load only selected source bytes. An installed file's path is refused when a link is on the way or at its name (`Installed path traverses a link/junction`); the file is then opened read-only before it is judged, without waiting on a FIFO, and read through that descriptor. A final link put in its place meanwhile is refused: by the open's no-follow flag where the platform has one, otherwise (Windows) by the identity recheck after the read. A missing file is absent; anything but a single-link regular file within its bound is corrupt-state `Expected bounded unaliased regular file`; an unreadable one throws its filesystem error. At most its size and one byte more is read: a file that grows past its size is `Installed file grew beyond limit`, and one that changes size or links, or that its name no longer names, by the end of the read is refused as unaliased. An unpinned regular file named `.DS_Store` or `._*`, which a Mac writes into directories it opens, is skipped; a pinned one is verified like any other, and a link or special file of such a name is refused (`platformDebris`). Candidate installation is an explicit host-selected input option; it does not bypass admission or grant writes. The generated installation workspace uses native composition and direct-distribution use edges. Installed sources retain adopted band 90/methodology; generated installation state uses band 100/workspace. Active generation and monotonic counter participate in revision and scope freshness. Existing authored/adopted callers keep their behavior when no installation exists.
37
+ Generation membership enumerates selected bundle IDs/archive digests and source inventories derived from verified manifests, with deterministic identical-system deduplication and contributing-package provenance. Readers verify complete file inventory, exact canonical generation bytes and the active lock, and load only selected source bytes. `readInstalledGeneration` and `readExpandedBundle` canonicalize the root first, as `open` does, so a root reached through a link reads the same installation. Inside that root, an installed file's path is refused when a link is on the way or at its name (`Installed path traverses a link/junction`); the file is then opened read-only before it is judged, without waiting on a FIFO, and read through that descriptor. A final link put in its place meanwhile is refused: by the open's no-follow flag where the platform has one, otherwise (Windows) by the identity recheck after the read. A missing file is absent; anything but a single-link regular file within its bound is corrupt-state `Expected bounded unaliased regular file`; an unreadable one throws its filesystem error. At most its size and one byte more is read: a file that grows past its size is `Installed file grew beyond limit`, and one that changes size or links, or that its name no longer names, by the end of the read is refused as unaliased. An unpinned regular file named `.DS_Store` or `._*`, which a Mac writes into directories it opens, is skipped; a pinned one is verified like any other, and a link or special file of such a name is refused (`platformDebris`). Candidate installation is an explicit host-selected input option; it does not bypass admission or grant writes. The generated installation workspace uses native composition and direct-distribution use edges. Installed sources retain adopted band 90/methodology; generated installation state uses band 100/workspace. Active generation and monotonic counter participate in revision and scope freshness. Existing authored/adopted callers keep their behavior when no installation exists.
38
38
 
39
39
  Root release-control sources at `.ia/src/releases/<distribution-name>.ia` contain exactly their selected public distribution declaration, meaning and unconditional system roots matching the manifest. The shared `verifyReleaseControl` check enforces this source profile in archive verification, expanded-bundle reads and `generationSources`, including retained source installations whose content and metadata have been consistently repinned. Ordinary system-source admission remains a separate check.
40
40
 
41
41
  The application owns archive acquisition, bounded solving and mutation. The database owns no network or installation writes. Restore-required, lock-drift, corrupt-state, recovery-required and engine-incompatible are named `InstallationError` reasons, each with code IA-DB-SOURCE-UNAVAILABLE; a fresh read never silently ignores a selected installation.
42
42
 
43
- Local binding adapter (2026-09-18): when `InputOptions.adopted` is absent, `readInputs` loads optional `.ia/workspace.json`: `{ "version": 1, "adopted": [{ "id": "foundation", "path": "vendor/foundation", "revision": "<sha256>" }] }`. This closed host-data format supports at most 16 bindings and 64 KiB of UTF-8 JSON. A link on the way to the manifest or at its name is IA-DB-PATH-UNSAFE (`safePath`); the manifest is then opened read-only before it is judged, without waiting on a FIFO, and read through that descriptor. A final link put in its place meanwhile is refused: by the open's no-follow flag where the platform has one, otherwise (Windows) by the identity recheck after the read. A missing one declares no bindings; anything but a regular file (of any link count) of at most 65,536 bytes, or one that changes size or that its name no longer names by the end of the read, is `Expected a regular manifest of at most 64 KiB`; an unreadable one, or bytes that are not UTF-8 JSON, `Expected UTF-8 JSON`. Each path is a canonical portable directory inside the current workspace and outside its `.ia` tree; absolute paths, parent traversal, duplicate IDs/directories and aliases refuse. Only the selected directory's physical `.ia/src` sources are captured, with package artifacts excluded and no recursive binding expansion. Its floor is excluded: the workspace still selects exactly one explicit/local/embedded floor. The revision uses the existing `AdoptedSource` digest of the ordered exact `{path,text}` list. Missing roots, malformed configuration or changed pinned bytes fail the capture; they never silently drop a dependency. Bindings are validated and read in manifest order, each read before the next is validated, so the first faulty binding answers with its own fault, a read-time one (a link, a missing tree, a changed pin) included, as the frozen Door routes and `ia scope` report it. Explicit `adopted` captures, including `[]`, replace automatic bindings. Disk/editor refresh rereads the manifest and dependency bytes; failed refresh retains internal evidence while the host marks it unavailable. Read-only adopted placement, membership, admission and stale-action semantics remain unchanged; this manifest grants no writable system or model disclosure. An adopted mount's sources carry the path `.ia/adopted/<id>/<revision>/<path>`, a label under which no file exists. `adoptedBindings(root)` (2026-10-07) returns the manifest's bindings, frozen, each `{id, path, revision, tree}` with `tree` that label, validated as discovery validates them (the same IA-DB-ROOT-INVALID, IA-DB-SOURCE-UNAVAILABLE and IA-DB-PATH-UNSAFE refusals) without reading or verifying the bound sources, and [] without a manifest, so a host can read a mount's other files, such as the documents `ia read` returns, from its bound directory; those files are outside the revision pin.
43
+ Local binding adapter (2026-09-18): a bound tree that matches its pin once CRLF becomes LF is refused with the conversion named. When `InputOptions.adopted` is absent, `readInputs` loads optional `.ia/workspace.json`: `{ "version": 1, "adopted": [{ "id": "foundation", "path": "vendor/foundation", "revision": "<sha256>" }] }`. This closed host-data format supports at most 16 bindings and 64 KiB of UTF-8 JSON. A link on the way to the manifest or at its name is IA-DB-PATH-UNSAFE (`safePath`); the manifest is then opened read-only before it is judged, without waiting on a FIFO, and read through that descriptor. A final link put in its place meanwhile is refused: by the open's no-follow flag where the platform has one, otherwise (Windows) by the identity recheck after the read. A missing one declares no bindings; anything but a regular file (of any link count) of at most 65,536 bytes, or one that changes size or that its name no longer names by the end of the read, is `Expected a regular manifest of at most 64 KiB`; an unreadable one, or bytes that are not UTF-8 JSON, `Expected UTF-8 JSON`. Each path is a canonical portable directory inside the current workspace and outside its `.ia` tree; absolute paths, parent traversal, duplicate IDs/directories and aliases refuse. Only the selected directory's physical `.ia/src` sources are captured, with package artifacts excluded and no recursive binding expansion. Its floor is excluded: the workspace still selects exactly one explicit/local/embedded floor. The revision uses the existing `AdoptedSource` digest of the ordered exact `{path,text}` list. Missing roots, malformed configuration or changed pinned bytes fail the capture; they never silently drop a dependency. Bindings are validated and read in manifest order, each read before the next is validated, so the first faulty binding answers with its own fault, a read-time one (a link, a missing tree, a changed pin) included, as the frozen Door routes and `ia scope` report it. Explicit `adopted` captures, including `[]`, replace automatic bindings. Disk/editor refresh rereads the manifest and dependency bytes; failed refresh retains internal evidence while the host marks it unavailable. Read-only adopted placement, membership, admission and stale-action semantics remain unchanged; this manifest grants no writable system or model disclosure. An adopted mount's sources carry the path `.ia/adopted/<id>/<revision>/<path>`, a label under which no file exists. `adoptedBindings(root)` (2026-10-07) returns the manifest's bindings, frozen, each `{id, path, revision, tree}` with `tree` that label, validated as discovery validates them (the same IA-DB-ROOT-INVALID, IA-DB-SOURCE-UNAVAILABLE and IA-DB-PATH-UNSAFE refusals) without reading or verifying the bound sources, and [] without a manifest, so a host can read a mount's other files, such as the documents `ia read` returns, from its bound directory; those files are outside the revision pin.
44
44
 
45
45
  Editor extension contract (2026-09-18): `/editor` owns cache-free captured-input readers, versioned unsaved overlays (including local floor buffers), deleted-source reconciliation and privileged source/registry/occurrence inspection. Reads share the existing scope, admission and view implementation; every refresh retires the previous reader. An editor reader retains no previous snapshot (D08). Source metadata identifies embedded/explicit floor as virtual read-only, and local sources by placement/provenance. Existing `Handle.preview` retains its non-floor draft contract. No filesystem writes occur in editor capture or preview. Candidate/baseline comparison preserves unrelated pre-existing failures while refusing new errors or loss of admitted records. `EditorOptions` (2026-10-11) extends `InputOptions` with `checks` (`strict`, the default, or `structural`, D13): `EditorDatabase(root, options)` and `EditorSnapshot(input, changes, options)` accept it, and a structural editor database's snapshot, its `preview` drafts, its candidates and every update or refresh admit structurally, while a caller that passes no `checks` keeps strict admission. An editor lists evidence only when `evidence` asks for it (D14).
46
46
 
@@ -54,7 +54,7 @@ D02. Default authored sources use band100, empty reach and workspace provenance.
54
54
 
55
55
  D02a. Capture membership. `Snapshot.membership` holds one frozen row `{identity, root, band, digest}` per record in `records`, in the same identity order: `band` is the record's placement band and `digest` its graph G13 per-record digest. The capture declares roots once, from the `@workspace` records the root view (location '', no phase) admits: each `composition.sources` entry spelled `<root> @<placement>` declares that root at that placement, read relative to the tree holding the declaring record (the directory above its `.ia/src`, which the exported `sourceTree(path)` names: '' for the workspace's own tree, a package's or an installed store's directory, and an adopted mount's `.ia/adopted/<id>/<revision>` label), so an adopted or installed `@workspace` speaks only for its own mount. An entry that does not parse, names an unknown placement, or is absolute or escapes that tree declares nothing (`inertDeclarations` names it, D02b), and so does a `@workspace` the root view does not admit (one whose reach excludes the root). A record's `root` is the longest declared root at the record's own placement that contains its source path; the record is then a member of every `@workspace` declaring that root. That is composition, not an edge row or a field index. Any other record keeps its system seat: the `systemMember` system folder of its path, whether local, package, adopted (`.ia/adopted/<id>/<revision>/…`) or installed (`.ia/distributions/store/<archive>/…`). A record under `.ia/src/floor/` is rooted at `.ia/src/floor`, and any other record outside every system folder (the generated installation workspace) at its source directory, so floor records read `.ia/src/floor` at band 10 unless a workspace declares a root containing them at `@floor`. Each view's rows come from its admitted winners: shadowed, tied, blocked, refused and inactive (out-of-reach or out-of-phase) occurrences, and records admission removed, are not admitted records and have no row. A row depends only on its occurrence and the capture's declared roots, so every view admitting an occurrence gives it the same row: a scope narrowed by identities, root or phase prunes rows and never re-roots one, although a narrower root or phase can admit another occurrence of an identity, whose row is its own. The input model cannot express two cases: an adopted closure named by locator (`<distribution-id>@<digest>`) is not a path, so such a `sources` entry declares no root and adopted and installed records keep their system seats; and nothing seats a record by anything but its path and placement. Membership and per-record digests are not revision inputs, so workspace revisions are unchanged. The runtime Door's MACHINE_PROTOCOL version 1 `records` operation omits `membership`.
56
56
 
57
- D02b. Location seat. `resolveSeat(path, options)` on every reader returns a frozen `SeatResolution` `{path, seat?, by?, claimants, unknown?}`. `path` is canonicalized as a scope root with `\` read as `/`; an absolute path, or one escaping the workspace, comes back as supplied with `unknown: 'outside'` and no claimants. Otherwise the seat is the first that applies, and `by` names which: `system`, the admitted `@system` of the system folder that holds the path or is the path, as `systemMember` reads local, package, adopted and installed folders, and the floor's `@system` for `.ia/src/floor`; `root`, the `@workspace` declaring the longest D02a root that contains the path, at any placement, ties by workspace identity; `repository`, for a path with no `.ia` segment, the repository's own `@workspace`. The capture decides that workspace once, from the root view, as the one admitted `@workspace` in the repository's `.ia/src` tree that declares a root, else the only `@workspace` there; none or several decide none. With no seat, `unknown` is `undeclared`. `claimants` are graph G06c's claimants of the path, whatever the seat: each record whose `authority.covers`, `subject.covers`, `work.covers`, `hook.paths` or `check.covers` selection selects it (a `@check`'s textual `check.scope` claims nothing), with every matching field and selection, band descending then identity ascending; the graph indexes the selections once per load, so claimants are read from that index, never from the records, and the seat from the graph's name and discriminator indexes and the capture's declared roots. `options` bind as `get` binds them (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH), and a scope prunes as search and resolution do (D09): a seat or claimant outside it is absent, so the path takes the next seat that applies. `inertDeclarations(options)` on every reader names, as frozen `{identity, field, value, path, line, reason}` values ordered by path, line and identity and pruned to the scope, each declaration the capture reads that declares nothing: a `composition.sources` entry of an admitted `@workspace` that names no root (D02a), and a claimant selection the dialect reads as none (graph `isSelection`), which selects no path, so a host can say so where it is authored; neither is a report finding, so admission, snapshots and the Door are unchanged. The resolution reads the view's graph and the capture's declared roots only; it adds no snapshot field, no cache payload beyond the graph's G06c index and no revision input, and the frozen Door routes and `ia scope` do not call it. `tests/seat.test.ts` pins the exit evidence (`.ia/src/systems/work-system/records/work.ia` seats at work-system with the fixture `@mandate` that covers it), each seat rule and the root tie-break, how the repository's own `@workspace` is chosen, outside paths, claimant order across bands and fields, scope binding and a scope pruning each seat rule, and the editor reader's unsaved overlays.
57
+ D02b. Location seat. `resolveSeat(path, options)` on every reader returns a frozen `SeatResolution` `{path, seat?, by?, declarers?, claimants, unknown?}`. `path` is canonicalized as a scope root with `\` read as `/`; an absolute path, or one escaping the workspace, comes back as supplied with `unknown: 'outside'` and no claimants. Otherwise the seat is the first that applies, and `by` names which: `system`, the admitted `@system` of the system folder that holds the path or is the path, as `systemMember` reads local, package, adopted and installed folders, and the floor's `@system` for `.ia/src/floor`; `root`, the `@workspace` declaring the longest D02a root that contains the path, at any placement; `shared`, when several `@workspace` records in the read's scope declare that same longest root (amended 2026-11-04, inventarch/ia#194; it was an identity tie-break): the path is seated at none of them, since D02a makes a record under the root a member of every declarer, and `declarers` lists each declaring identity once, in identity order, with no `seat`; `repository`, for a path with no `.ia` segment, the repository's own `@workspace`. The capture decides that workspace once, from the root view. The sole admitted `@workspace` at the init entry point `.ia/src/workspace.ia` is the repository's own, whether or not it declares sources; several workspaces at that entry point decide none. When no workspace is admitted at that exact path, preserve the existing fallback: the one admitted `@workspace` in the repository's `.ia/src` tree that declares a root, else the only `@workspace` there; none or several decide none. An adopted or package-local `workspace.ia` is not this entry point. This preference identifies the repository without granting any source membership or mandate authority: other workspaces still declare their own roots, and scope pruning never substitutes a different repository workspace. With neither a seat nor declarers, `unknown` is `undeclared`. `claimants` are graph G06c's claimants of the path, whatever the seat: each record whose `authority.covers`, `subject.covers`, `work.covers`, `hook.paths` or `check.covers` selection selects it (a `@check`'s textual `check.scope` claims nothing), with every matching field and selection, band descending then identity ascending; the graph indexes the selections once per load, so claimants are read from that index, never from the records, and the seat from the graph's name and discriminator indexes and the capture's declared roots. `options` bind as `get` binds them (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH), and a scope prunes as search and resolution do (D09): a seat or claimant outside it is absent, so the path takes the next seat that applies, and a shared root whose declarers the scope prunes to one seats at that one by `root`. `repositoryWorkspace(options)` on every reader gives the repository's own `@workspace` the capture decided (amended 2026-11-04, inventarch/ia#226), whatever the seat of `''`, so a root it shares with other workspaces keeps it; bound as `get` binds, and absent when the scope does not admit it, a scope never substituting another. `inertDeclarations(options)` on every reader names, as frozen `{identity, field, value, path, line, reason}` values ordered by path, line and identity and pruned to the scope, each declaration the capture reads that declares nothing: a `composition.sources` entry of an admitted `@workspace` that names no root (D02a), and a claimant selection the dialect reads as none (graph `isSelection`), which selects no path, so a host can say so where it is authored; neither is a report finding, so admission, snapshots and the Door are unchanged. The resolution reads the view's graph and the capture's declared roots only; it adds no snapshot field, no cache payload beyond the graph's G06c index and no revision input, and the frozen Door routes and `ia scope` do not call it. `tests/seat.test.ts` pins the exit evidence (`.ia/src/systems/work-system/records/work.ia` seats at work-system with the fixture `@mandate` that covers it), each seat rule, a root two and three workspaces share (a scope pruning its declarers to two keeping it shared, to one seating it by `root`), how the repository's own `@workspace` is chosen and read at a shared root, outside paths, claimant order across bands and fields, scope binding and a scope pruning each seat rule, and the editor reader's unsaved overlays.
58
58
 
59
59
  D02c. Declared roots (runtime R15). `roots(options)` on every reader returns the roots the capture declares (D02a) as frozen `DeclaredRoot` copies `{root, placement, workspace}`, in the capture's order: longest root first, then by declaring `@workspace` identity. An entry that declares nothing (`inertDeclarations`) is no root. `options` bind as `get` binds them (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH), and a root whose declaring `@workspace` the read does not admit is pruned, as the seat rule prunes it (D02b, D09); membership rows keep the roots they were captured under whatever the scope, so pruning a root never re-roots a row. It is how a runtime reader computes a workspace's capture members and closure without the private view: it adds no snapshot field, cache payload or revision input, never reads the D08a capture pair, and the frozen Door routes do not call it. `DeclaredRoot` is exported as a type. `tests/membership.test.ts` pins the order, the inert entry left out, frozen copies, and a scope that does not admit the declaring workspace pruning its roots while its rows keep theirs; `tests/scope.test.ts` and `tests/retention.test.ts` pin the token checks and that no capture file is read.
60
60
 
@@ -70,7 +70,7 @@ D06. The derived .ia/.iadb/graph.json stores a format tag, revision and determin
70
70
 
71
71
  D07. resolveScope issues an opaque unguessable token bound privately to its issuing handle, canonical root, optional phase (wildcard when omitted), view revision and source generation. The initial occurrence boundary includes every reachable candidate occurrence before phase selection; an optional identity allowlist only intersects it. A child root is the same or a segment-boundary descendant. Its occurrence boundary intersects the parent's and its admitted identities include only winners whose actual occurrence is in that boundary. A new winner with the same identity cannot widen it. A child may change phase but never add occurrences. Omitted child bindings inherit; explicit phase:null requests a wildcard. Refuse narrowing with SCOPE-MISMATCH if the effective registry differs from the parent: a read token cannot authorize new vocabulary/schema interpretation. A privileged host may issue an independent root token for that view. Explicit requested revision must agree with the inherited token when narrowing.
72
72
 
73
- D08. Every read carrying a token validates issuer, open state, generation and explicit root/phase/revision assertions. Omitted bindings inherit. Unknown/forged/other-handle tokens are SCOPE-UNAVAILABLE; incompatible bindings or a wider child root SCOPE-MISMATCH; changed generation STALE (a token never revives after refresh to different inputs and back); closed handle CLOSED. Stale tokens never read current bytes under an old stamp. Scope grants reading only. Tokens are not transferable between processes without the later owning transport retaining their issuing handle.
73
+ D08. Every read carrying a token validates issuer, open state, generation and explicit root/phase/revision assertions. Omitted bindings inherit. Unknown/forged/other-handle tokens are SCOPE-UNAVAILABLE; incompatible bindings or a wider child root SCOPE-MISMATCH; changed generation STALE (a token never revives after refresh to different inputs and back), as is a token whose scope was evicted (D08c); closed handle CLOSED. Stale tokens never read current bytes under an old stamp. Scope grants reading only. Tokens are not transferable between processes without the later owning transport retaining their issuing handle.
74
74
 
75
75
  D08 retention, apart from scope validation: a handle retains two admitted root snapshots, seeded from the capture pair of D08a (location '', no phase), each as its revision, its authored revision (D05a) and its D02a membership rows: the current one, and `previous`, the most recent admitted root snapshot whose authored revision differs from the current one. Only an authored revision change rotates (2026-10-09: a change to runtime-band sources alone, such as evidence an `ia validate` writes, moves the revision but must not spend the comparison staleness and readiness depend on). A refresh, or a new handle, that finds the authored revision last retained as current keeps the existing previous, so a plain open or refresh at an unchanged authored revision never wipes that comparison; an authored revision change, even one that alters no record text, rotates that current into previous; a failed refresh rotates nothing. `previousRevision` and `previousAuthoredRevision` name the previous snapshot's revision and authored revision, undefined while none is retained. `staleness(identity, options)` and `readiness(identity, digest, options)` bind `options` exactly as `get` does (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH, and OUT-OF-SCOPE for an identity outside the scope's allowed identities) and take the current digest from the view `get` reads, so their current side is the record `get` returns. Only root snapshots are retained, so the previous side is the identity's digest in the previous root snapshot, and it applies only while the selected view's digest is the identity's current root digest, as it always is for a root read. `staleness` answers `unchanged` when the two sides are equal, `changed` when not, `new` when only the current side has a digest (so every current identity reads `new` while no previous snapshot is retained), `removed` when only the previous side does, undefined when neither does. `readiness` answers `current` when `digest` equals the current side, else `previous` when it equals the previous side, else `unknown`: digest equality, never an order. When a narrower root or phase selects a digest other than the current root one, including a record only one of the two views holds (for example a phase-shadowed or tied occurrence, or one only a narrower root reaches), the retained root snapshots describe a different occurrence: `staleness` is undefined and `readiness` answers `current` for the selected record's own digest, else `unknown`. A scope admits only identities its view holds, so a read through a scope token never reports `removed`. The previous snapshot persists between processes as the capture pair of D08a, the one retained pair, which only `ia capture` writes: every disk handle, whatever its cache setting, seeds its pair from it, and no handle writes it. A handle reads the pair the first time it is asked for `previousRevision`, `previousAuthoredRevision`, `capturedRevision`, `capturedAuthoredRevision`, `staleness` or `readiness`, never on open or refresh, so a read that never asks (every frozen Door route) opens no capture file. The seed is the capture at `current.json` and, when it is a capture at another authored revision, the one at `previous.json`; with no readable `current.json`, a capture at `previous.json` alone. The handle rotates that seed against its own root snapshot: at the captured authored revision `previous` is the capture at `previous.json`, at another authored revision it is the capture at `current.json`. A capture is trusted by its authored revision and the membership rows of its records not at runtime placement (band other than 0), each by its identity, band and digest: a `current.json` that names the fresh authored revision with other such rows is not this workspace's capture at that revision, so the pair seeds nothing, while one that differs from the fresh snapshot only in its runtime-band rows, and so in its revision, or in the roots of its rows, which a runtime-band `@workspace` can declare (D02a) and no retained read takes, is this workspace's. Admission still reads every placement, so a runtime-band record that changes which records not at runtime placement are admitted (one repeating an authored requirement id refuses both) leaves a capture at that authored revision untrusted until the next capture; a capture at another authored revision cannot be rebuilt from the fresh inputs, so it is trusted as written. A link or junction on the way, an entry that is not a regular file, and a file that is no capture (not JSON, another format, a malformed revision, authored revision or membership row) are ignored, never followed, and leave every read usable. `capturedRevision` and `capturedAuthoredRevision` name the revision and the authored revision of the capture at `current.json`, undefined when there is none or it is not trusted; a capture at another authored revision than `authoredRevision` is stale, and one that differs only in runtime-band sources is not. A refresh rotates the pair its handle holds in memory without reading the capture pair: at a changed authored revision the root snapshot it held becomes `previous`, and at an unchanged one it keeps the previous side it held, still unread until asked, so however often a handle refreshes it holds one pair. `capturedRevision` and `capturedAuthoredRevision` are read again the next time they are asked after a refresh, as `ia capture` may have run, so a handle that lived through an edit reports the edit as changed whether or not it was captured. The cache-free editor reader retains nothing: `previousRevision`, `previousAuthoredRevision`, `capturedRevision` and `capturedAuthoredRevision` are undefined, every current identity reads `new`, and `readiness` never answers `previous`. Retention is not a revision input and adds no snapshot field (the `authoredRevision` a snapshot carries is its view's, D05a), so workspace revisions, snapshots and the Door's MACHINE_PROTOCOL version 1 output are unchanged by it.
76
76
 
@@ -78,6 +78,8 @@ D08a. The capture pair (the CLI's `capture`). `writeCapture(root, text)` writes
78
78
 
79
79
  D08b. The capture plan (`ia capture --preview`). `planCapture(root, text)` makes every check and read `writeCapture(root, text)` makes before its first write, with the same TypeError for a `text` that is no `ia-snapshot-1` document and the same PATH-UNSAFE refusals, and returns the frozen `CapturePlan`: the result that write would return, so its counts, `prior`, `ignored`, `previous` and `rotated` are the write's, plus `identities` `{changed, added, removed}`, the identities those three counts count, each list sorted by code unit (with no readable prior capture, `added` lists every row). It creates no directory and stages, renames, removes or writes no file, so the capture pair keeps its bytes and modification times. `writeCapture` makes its checks and reads through the same planner, then writes; its result and its writes are unchanged. `CapturePlan` is exported as a type. `tests/retention.test.ts` pins the plan of a workspace never captured (no `.ia/work` is created), one edit named as the one changed identity with the pair left as it was, an added and a removed identity, the plan agreeing with the write's result at each step, a check that refuses the plan, and each list sorted by code unit whatever order either document holds its rows in.
80
80
 
81
+ D08c. Held scopes and views (2026-10-30). What a reader holds, pinned scopes aside, is bounded however many scopes it issues and however many locations it is asked for, so a long-lived door stays flat. A reader holds the 4,096 ordinary scopes (`HELD_SCOPES`) most recently issued or read, and issuing one past that evicts the least recently used. The number is chosen so ordinary use never meets it: an operation issues at most one scope, so a heavy session of about 1,400 calls stays under it three times over and not even a token used once and left idle is evicted; and at the default 4,000 text tokens a context, 4,096 of them is some 16 million tokens delivered, more than any client keeps a token in view through. Reading a token keeps it, however old. The cap costs little: a scope that keeps its whole view holds about 330 bytes, about 1.3 MB for the full table. An evicted token refuses as a stale one does: every read through it, `resolveScope`, `isCompleteScope`, `staleness` and `readiness` among them, is IA-DB-STALE, whenever it comes, and is never served from another scope or the whole view; the token does not revive. This shortens what a token promised: it used to last as long as its handle, and can now expire within it. A client recovers by issuing a new scope, with the same narrowing. A refresh to changed inputs releases every scope (D05), so a stale token and an evicted one take one path, whose message names both, its opening words those the stale refusal always had, and says to issue a new scope. A refresh to identical inputs releases none, and each token then reads the new state's view, not the one it was issued against. A token stays a UUID, its first 74 random bits as `randomUUID` gives them and its last twelve digits their HMAC-SHA-256 tag, under a key each reader draws when it is built and never shows, so a reader knows every token it ever issued without keeping any of them: `isIssuedScope(token)` is true of a token it evicted or a refresh retired and false of a forged token, an altered one or another reader's, which reads go on refusing as SCOPE-UNAVAILABLE, and it is CLOSED on a closed reader. The tag only tells those two refusals apart. It grants nothing: a read needs a scope still held, found by the whole token. `ScopeRequest.pinned` holds a scope outside that bound, in a table of its own, for a host that keeps a scope for the life of its handle whether or not a read names it, as the runtime Door keeps its initial scope. A pinned scope is neither counted nor evicted, so it takes no ordinary place: 4,096 ordinary scopes always fit beside any number of pins, and no scope comes back already evicted. Pins themselves are not bounded. Each stays until a refresh to changed inputs or close, and nothing limits how many a caller makes, so only a host that holds the reader may create them, and it pins what it can count. No client can: the Door's `scope` operation admits no such parameter. A child is not pinned by its parent. A scope holds no view and no serialized registry. It finds its view again by its binding, whose revision `view` asserts, so a view no scope pins can leave; and D07's registry comparison reads a SHA-256 digest of the stable serialization, computed once per view, equal exactly when the serializations are. Only a scope that narrows its view holds sets of its own, its occurrence boundary and allowed identities; one that keeps the whole view reads the view's, computed once and released with the view, so its meaning is unchanged and it holds neither. A narrowed scope holds about 58 bytes per identity it keeps, which is what remains proportional to the corpus: at worst, every held scope naming nearly every identity, about 42 MB on the conformance corpus's 186 records. Views and compilation are kept per declared reach, not per location. The reaches above a location nest, so the deepest selects every source any of them does, and a view built at a location differs from one built at that reach only in the location it names. So every location below one reach reads that reach's view, whatever `root` a client names: naming another root builds and holds nothing. A read still names its own root, in `Snapshot.root` and a scope's binding; only `graph.location` on what `EditorSnapshot.inspect` returns is the reach's, which nothing reads. A state holds the 16 views (`HELD_VIEWS`) most recently read, by declared reach and phase, the root view among them and never evicted: three reaches, each read whole and at all four phases, where a workspace that declares none needs five. A view evicted is built again when next read, in about 40 ms on that corpus, from the same captured inputs, so it reads the same revision and records and refuses nothing: its cost is that build and never a token. None of this changes what a read returns, a revision, the cache, the capture pair or a token's wire shape. `tests/scope.test.ts` pins eviction at exactly the cap, the least recently used leaving and a token read just before kept, every read of an evicted token refused and its survivors' boundaries intact, an evicted token told from altered, spliced, foreign and forged ones long after it left, the token's UUID shape, a pinned scope kept unread, retired by changed inputs and not revived when they come back, and a child not pinned, twice the cap in pins leaving a fresh scope readable and all 4,096 ordinary scopes held, what a refresh replaced collected while the tokens issued before it read the same records, and every scope collected on close (`tests/release-child.ts`, a bounded child process under `--expose-gc`), whole and narrowed scopes reading and bounding children the same after their views left, the view bound through `EditorSnapshot.inspect`, and one view for every location below a reach, each read naming its own root; `tests/view.test.ts` pins that view byte for byte, but for the location it names, at locations below a reach, whole and at a phase, and one compile per declared reach however many locations are read.
82
+
81
83
  D09. get, records, referencedBy, directedView, resolveSeat, words, roots, resolve, search and traverse honor the supplied token and view. get, referencedBy and directedView, like D08 staleness and readiness, yield OUT-OF-SCOPE outside their allowed identities; referencedBy returns graph G06a typed field references naming the identity, pruned to holders in scope; directedView returns the identity's graph G06b directed view (its declared edge rows, the derived inverses of its counterparts' declarations and its typed field references both ways, each row with `declaredOn`, its spelling or field path and `derived`), pruned the same way to rows whose counterpart is in scope (the declaring record is the identity or that counterpart, so a pruned scope never shows a row declared outside it). The view is a snapshot derivation: graph computes it on read from the view's admitted graph, so it is per revision and deterministic but is not stored in the cache payload or the D08a capture and is not a revision input. It is the same pure function of one revision wherever it is read, so a capture document need not carry it. Dangling, ambiguous and consent-refused assertions stay admission findings (graph diagnostics in the report) with no row in it; lists/search/resolution, D02b seat resolution included, prune and traversal cannot cross an excluded intermediary. Scope and typed traversal filters apply before emitting gated edges. A scoped snapshot exposes only allowed immutable nodes, their D02a membership rows, its root/phase/view revision and admitted system order; it does not expose the private full graph/registry/indexes or unscoped diagnostics. All query products delegate to graph; db creates no second adjacency or text index. Unscoped reads are privileged host inspection, and runtime must always supply a token.
82
84
 
83
85
  D09a. Registered words. `words(options)` on every reader returns the frozen, sorted keywords the read view's registry registers for its admitted systems, the floor's `system` and `schema` included; a keyword two systems register at the winning band is blocked and absent, and so is every word of a system admission blocked. It is the closed set a runtime scope key's `word` is checked against (runtime R14). `options` bind as `get` binds them; a scope narrows records, never the registry (a child scope that would change it refuses, D07), so every scope of a view reads the same words. Only the keywords are exposed: the registry, its registrations and its consent ledgers stay private. It adds no snapshot field, cache payload or revision input, it never reads the D08a capture pair, and the frozen Door routes do not call it.
@@ -30,6 +30,14 @@ export declare function identity(value: unknown): string;
30
30
  export declare function version(value: unknown): string;
31
31
  export declare function range(value: unknown): string;
32
32
  export declare const satisfies: (v: string, r: string) => boolean;
33
+ /**
34
+ * A range accepting exactly what both `a` and `b` accept, or null when none can be written. When one lies inside the other
35
+ * and admits no prerelease, the narrower is returned as written, so nested ranges keep their spelling. Otherwise it is
36
+ * their conjunction: sorted comparators, so either order writes the same bytes. A prerelease refuses a conjunction,
37
+ * because a prerelease comparator admits its tuple's prereleases past the other side's comparators, which accept none
38
+ * of them; so does a result past `range`'s length. Null therefore means "not provably satisfiable together", and is never an accepted set that is too wide.
39
+ */
40
+ export declare function commonRange(a: string, b: string): string | null;
33
41
  /**
34
42
  * The distribution engine this reader is. 0.1.2 reads a lock's `entries`, whose one kind is the npm package of kits
35
43
  * (`package`); every lock and archive an earlier 0.1 engine reads, it reads unchanged.
@@ -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AACtH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI3D,CAAC;AAGH,eAAO,MAAM,8BAA8B,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,KAAG,OACE,CAAC;AACrF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,SAAS,OAAO,KAAG,MAKtD,CAAC;AACf,yHAAyH;AACzH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK/D;AACD,kFAAkF;AAClF,eAAO,MAAM,mCAAmC,UAAU,CAAC;AAC3D,oHAAoH;AACpH,eAAO,MAAM,2BAA2B,GAAI,QAAQ,MAAM,KAAG,OACa,CAAC;AAC3E,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MACG,CAAC;AAC3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAcnD;AACD,6FAA6F;AAC7F,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAI7D;AACD,uFAAuF;AACvF,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAkC5C;AACD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAShE"}
@@ -117,6 +117,50 @@ export function range(value) {
117
117
  return v;
118
118
  }
119
119
  export const satisfies = (v, r) => semver.satisfies(version(v), range(r));
120
+ /** Whether a comparator lets a prerelease in. `^1.0.0`'s own upper bound, `<2.0.0-0`, names one and admits none. */
121
+ const admitsPrerelease = (comparator) => comparator.semver instanceof semver.SemVer &&
122
+ comparator.semver.prerelease.length > 0 &&
123
+ !(comparator.operator === '<' && comparator.semver.prerelease.join('.') === '0');
124
+ /**
125
+ * A range accepting exactly what both `a` and `b` accept, or null when none can be written. When one lies inside the other
126
+ * and admits no prerelease, the narrower is returned as written, so nested ranges keep their spelling. Otherwise it is
127
+ * their conjunction: sorted comparators, so either order writes the same bytes. A prerelease refuses a conjunction,
128
+ * because a prerelease comparator admits its tuple's prereleases past the other side's comparators, which accept none
129
+ * of them; so does a result past `range`'s length. Null therefore means "not provably satisfiable together", and is never an accepted set that is too wide.
130
+ */
131
+ export function commonRange(a, b) {
132
+ const first = range(a), second = range(b);
133
+ if (first === second)
134
+ return first;
135
+ const sets = (r) => new semver.Range(r).set, left = sets(first), right = sets(second), prerelease = (clauses) => clauses.some((set) => set.some(admitsPrerelease));
136
+ // `semver.subset` is not trusted with a range that lets a prerelease in: it can call `2.1.3-alpha <3.5.3` a subset
137
+ // of a range that rejects `2.1.3-alpha`. So the narrower range is returned only when it admits no prerelease.
138
+ const inFirst = semver.subset(second, first) && !prerelease(right), inSecond = semver.subset(first, second) && !prerelease(left);
139
+ if (inFirst && inSecond)
140
+ return first.length !== second.length
141
+ ? first.length < second.length
142
+ ? first
143
+ : second
144
+ : first < second
145
+ ? first
146
+ : second;
147
+ if (inFirst)
148
+ return second;
149
+ if (inSecond)
150
+ return first;
151
+ if (prerelease(left) || prerelease(right))
152
+ return null;
153
+ const clause = (set) => set.map((comparator) => comparator.value).join(' ');
154
+ const clauses = new Set();
155
+ for (const l of left)
156
+ for (const r of right)
157
+ if (semver.intersects(clause(l), clause(r)))
158
+ clauses.add([...new Set([...l, ...r].map((comparator) => comparator.value).filter((value) => value !== ''))]
159
+ .sort()
160
+ .join(' '));
161
+ const common = [...clauses].sort().join(' || ');
162
+ return clauses.size === 0 || common.length > 256 ? null : common;
163
+ }
120
164
  /**
121
165
  * The distribution engine this reader is. 0.1.2 reads a lock's `entries`, whose one kind is the npm package of kits
122
166
  * (`package`); every lock and archive an earlier 0.1 engine reads, it reads unchanged.
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/distribution/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACz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;AACD,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,OAAO,CACL,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAa,EAAE,EAAE,CAC5C,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QACtD,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5E,CAAC,CAAC,IAAI,CACT,GAAG,IAAI,CACT,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- export { DISTRIBUTION_LIMITS, InstallationError, canonicalDistributionJson, decodeDistributionJson, metadataDigest, packageId, range, sha256, text, portablePath, satisfies, supportsDistributionLockEngine, ENGINE_RELEASES, lockEngineMarker, PACKAGE_ENTRY_ENGINE_VERSION, RELEASE_ENGINE_VERSION, requiredRelease, ROOT_RELEASE_CONTROL_ENGINE_VERSION, supportsRootReleaseControls, compareVersions, version, } from './codec.js';
1
+ export { DISTRIBUTION_LIMITS, InstallationError, canonicalDistributionJson, commonRange, decodeDistributionJson, metadataDigest, packageId, range, sha256, text, portablePath, satisfies, supportsDistributionLockEngine, ENGINE_RELEASES, lockEngineMarker, PACKAGE_ENTRY_ENGINE_VERSION, RELEASE_ENGINE_VERSION, requiredRelease, ROOT_RELEASE_CONTROL_ENGINE_VERSION, supportsRootReleaseControls, compareVersions, version, } from './codec.js';
2
2
  export type { DistributionReason } from './codec.js';
3
3
  export { deriveGenerationInputs, installationWorkspace } from './membership.js';
4
4
  export type { BundleMetadata } from './membership.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/distribution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,KAAK,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,mCAAmC,EACnC,2BAA2B,EAC3B,eAAe,EACf,OAAO,GACR,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACvG,YAAY,EACV,kBAAkB,EAClB,6BAA6B,EAC7B,6BAA6B,EAC7B,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/distribution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,KAAK,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,mCAAmC,EACnC,2BAA2B,EAC3B,eAAe,EACf,OAAO,GACR,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACvG,YAAY,EACV,kBAAkB,EAClB,6BAA6B,EAC7B,6BAA6B,EAC7B,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { DISTRIBUTION_LIMITS, InstallationError, canonicalDistributionJson, decodeDistributionJson, metadataDigest, packageId, range, sha256, text, portablePath, satisfies, supportsDistributionLockEngine, ENGINE_RELEASES, lockEngineMarker, PACKAGE_ENTRY_ENGINE_VERSION, RELEASE_ENGINE_VERSION, requiredRelease, ROOT_RELEASE_CONTROL_ENGINE_VERSION, supportsRootReleaseControls, compareVersions, version, } from './codec.js';
1
+ export { DISTRIBUTION_LIMITS, InstallationError, canonicalDistributionJson, commonRange, decodeDistributionJson, metadataDigest, packageId, range, sha256, text, portablePath, satisfies, supportsDistributionLockEngine, ENGINE_RELEASES, lockEngineMarker, PACKAGE_ENTRY_ENGINE_VERSION, RELEASE_ENGINE_VERSION, requiredRelease, ROOT_RELEASE_CONTROL_ENGINE_VERSION, supportsRootReleaseControls, compareVersions, version, } from './codec.js';
2
2
  export { deriveGenerationInputs, installationWorkspace } from './membership.js';
3
3
  export { INSTALL_PATHS, DISTRIBUTION_ENGINE_VERSION, generationSources, platformDebris, readExpandedBundle, readInstalledGeneration, } from './reader.js';
4
4
  export { verifyReleaseControl } from './release-control.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/distribution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,KAAK,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,mCAAmC,EACnC,2BAA2B,EAC3B,eAAe,EACf,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAiBxB,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/distribution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,KAAK,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,mCAAmC,EACnC,2BAA2B,EAC3B,eAAe,EACf,OAAO,GACR,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAiBxB,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC"}
@@ -14,7 +14,7 @@ export interface ExpandedBundle extends BundleMetadata {
14
14
  }
15
15
  export declare function generationSources(pointer: ActivationPointer, lock: DistributionLock, inputs: GenerationInputs, bundles: ReadonlyMap<string, ExpandedBundle>): readonly RevisionSource[];
16
16
  /** Complete immutable payload verification; no execution, writes or network. */
17
- export declare function readExpandedBundle(root: string, pkg: LockedPackage, maximumBytes?: number): ExpandedBundle;
17
+ export declare function readExpandedBundle(workspace: string, pkg: LockedPackage, maximumBytes?: number): ExpandedBundle;
18
18
  export interface InstalledGeneration {
19
19
  readonly pointer: ActivationPointer;
20
20
  readonly lock: DistributionLock;
@@ -22,7 +22,7 @@ export interface InstalledGeneration {
22
22
  readonly sources: readonly RevisionSource[];
23
23
  readonly fingerprint: string;
24
24
  }
25
- export declare function readInstalledGeneration(root: string, candidate?: ActivationPointer): InstalledGeneration | undefined;
25
+ export declare function readInstalledGeneration(workspace: string, candidate?: ActivationPointer): InstalledGeneration | undefined;
26
26
  /**
27
27
  * Files a platform writes into any directory it opens, which never belong to a payload: Finder's `.DS_Store`, and the
28
28
  * AppleDouble `._<name>` files macOS writes beside files on volumes without extended attributes (exFAT, SMB). A strict
@@ -1 +1 @@
1
- {"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/distribution/reader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAsBxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,2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AAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,eAAO,MAAM,aAAa;;;;;;EAMxB,CAAC;AAyGH,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AACD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,GAC3C,SAAS,cAAc,EAAE,CAmE3B;AACD,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,aAAa,EAClB,YAAY,GAAE,MAAqC,GAClD,cAAc,CA0ChB;AACD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AACD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,iBAAiB,GAC5B,mBAAmB,GAAG,SAAS,CA8DjC;AACD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,OAAwD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { existsSync, lstatSync, readdirSync } from 'node:fs';
1
+ import { existsSync, lstatSync, readdirSync, realpathSync } from 'node:fs';
2
2
  import { join, parse, resolve } from 'node:path';
3
3
  import { lstatNamed, readOpened } from '../named.js';
4
4
  import { canonicalDistributionJson, DISTRIBUTION_ENGINE_VERSION, DISTRIBUTION_LIMITS, InstallationError, metadataDigest, portablePath, requiredRelease, satisfies, supportsDistributionLockEngine, sha256, } from './codec.js';
@@ -27,6 +27,17 @@ function requireEngine(declared, subject, lock = false) {
27
27
  if (!compatible)
28
28
  throw new InstallationError('engine-incompatible', `${subject} requires distribution engine ${declared}; this reader is ${DISTRIBUTION_ENGINE_VERSION}. ${needs(declared)}Use a compatible IA installation; preserve the lock and archive engine ranges.`);
29
29
  }
30
+ /** The root as `open` takes it: a link above the workspace is not a link inside the installation. */
31
+ function canonical(root) {
32
+ try {
33
+ return realpathSync(root);
34
+ }
35
+ catch (error) {
36
+ if (error.code === 'ENOENT')
37
+ return resolve(root);
38
+ throw error;
39
+ }
40
+ }
30
41
  function safe(root, path) {
31
42
  portablePath(path);
32
43
  const absolute = resolve(root, path), volume = parse(absolute).root;
@@ -171,8 +182,8 @@ export function generationSources(pointer, lock, inputs, bundles) {
171
182
  return Object.freeze(sources);
172
183
  }
173
184
  /** Complete immutable payload verification; no execution, writes or network. */
174
- export function readExpandedBundle(root, pkg, maximumBytes = DISTRIBUTION_LIMITS.expanded) {
175
- const directory = `${INSTALL_PATHS.store}/${pkg.archive}`, manifestBytes = required(root, `${directory}/distribution.json`);
185
+ export function readExpandedBundle(workspace, pkg, maximumBytes = DISTRIBUTION_LIMITS.expanded) {
186
+ const root = canonical(workspace), directory = `${INSTALL_PATHS.store}/${pkg.archive}`, manifestBytes = required(root, `${directory}/distribution.json`);
176
187
  if (sha256(manifestBytes) !== pkg.manifest)
177
188
  corrupt(`Manifest digest differs for ${pkg.id}`);
178
189
  const manifest = decode(manifestBytes, decodeBundleManifest);
@@ -220,7 +231,8 @@ export function readExpandedBundle(root, pkg, maximumBytes = DISTRIBUTION_LIMITS
220
231
  verifyReleaseControl(manifest, utf8(control), corrupt);
221
232
  return { manifest, files, archiveDigest: pkg.archive, manifestDigest: pkg.manifest };
222
233
  }
223
- export function readInstalledGeneration(root, candidate) {
234
+ export function readInstalledGeneration(workspace, candidate) {
235
+ const root = canonical(workspace);
224
236
  if (!candidate && read(root, INSTALL_PATHS.pending))
225
237
  throw new InstallationError('recovery-required', 'Run explicit distribution recovery before reading');
226
238
  const activeBytes = read(root, INSTALL_PATHS.active), portableBytes = read(root, INSTALL_PATHS.lock);
@@ -1 +1 @@
1
- {"version":3,"file":"reader.js","sourceRoot":"","sources":["../../src/distribution/reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,SAAS,EACT,8BAA8B,EAC9B,MAAM,GACP,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,6BAA6B;IACnC,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,gCAAgC;IACzC,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,+BAA+B;CAC7C,CAAC,CAAC;AACH,SAAS,OAAO,CAAC,OAAe;IAC9B,MAAM,IAAI,iBAAiB,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;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AQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;gBAGjC,KAAK,EAAE,aAAa,EAAE,OAAO,GAAE,SAAS,OAAO,EAAO,EAAE,OAAO,GAAE,aAAkB;IA+C/F,OAAO,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAM,GAAG,IAAI;IAGxD,SAAS,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,GAAG,cAAc;CAGvD;AAsBD,4FAA4F;AAC5F,qBAAa,cAAc;;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAOV,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB;IAOrD,IAAI,UAAU,IAAI,MAAM,CAEvB;IACD,IAAI,aAAa,IAAI,MAAM,CAE1B;IACD,IAAI,OAAO,IAAI,cAAc,CAE5B;IACD,MAAM,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,UAAQ,GAAG,cAAc;IAsBpE,KAAK,IAAI,IAAI;CAId"}
@@ -3,7 +3,7 @@ import { canonicalRoot, stableSerialize } from '@inventarch/graph';
3
3
  import { DbError } from '../errors.js';
4
4
  import { Reader } from '../handle.js';
5
5
  import { inputOptions, pathKey, readInputs, safePath } from '../inputs.js';
6
- import { viewBuilder } from '../view.js';
6
+ import { declaredReaches, viewBuilder } from '../view.js';
7
7
  /** The view options `options` selects: each only when asked, else every existing reader's defaults. */
8
8
  const viewOf = (options) => ({
9
9
  ...(options.checks === 'structural' ? { checks: 'structural' } : {}),
@@ -76,6 +76,7 @@ export class EditorSnapshot extends Reader {
76
76
  rootView,
77
77
  cache: { state: 'disabled', observations: [] },
78
78
  views: new Map([['["",null]', rootView]]),
79
+ reaches: declaredReaches(captured.sources),
79
80
  }, options.locations, view);
80
81
  this.#view = view;
81
82
  const overlays = new Map(changes.map((c) => [pathKey(c.path), c])), savedSources = new Map(input.sources.map((s) => [s.path, s.text]));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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,CAAC;QAC7F,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAC1B,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACtG,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF"}
package/dist/handle.d.ts CHANGED
@@ -33,6 +33,12 @@ export interface ReadOptions {
33
33
  }
34
34
  export interface ScopeRequest extends ReadOptions {
35
35
  readonly identities?: readonly string[];
36
+ /**
37
+ * D08c: held outside the bound, neither counted nor evicted, for the scope a host keeps for the life of its handle
38
+ * whether or not a read names it. Nothing limits how many a caller pins, so only a host that holds the reader may, and
39
+ * only what it can count; a scope a client asks for through the Door cannot be pinned.
40
+ */
41
+ readonly pinned?: boolean;
36
42
  }
37
43
  export interface Scope {
38
44
  readonly token: string;
@@ -61,7 +67,9 @@ interface State {
61
67
  readonly build: ReturnType<typeof viewBuilder>;
62
68
  readonly rootView: View;
63
69
  readonly cache: CacheStatus;
70
+ /** D08c: the views held, by declared reach and phase, a location reading its reach's; least recently used first. */
64
71
  readonly views: Map<string, View>;
72
+ readonly reaches: readonly string[];
65
73
  /** D08: the retained pair's previous side and the capture pair's current revision; absent in an editor reader. */
66
74
  readonly retention?: Retention;
67
75
  }
@@ -96,6 +104,12 @@ export declare class Reader {
96
104
  resolveScope(options?: ScopeRequest): Scope;
97
105
  /** Whole-workspace preview can expose refused sources as diagnostics. Admitted-record counts cannot prove disclosure. */
98
106
  isCompleteScope(token: string): boolean;
107
+ /**
108
+ * D08c: whether this reader issued `token`, whatever has become of its scope: true of a token it evicted or a refresh
109
+ * retired, which reads refuse as IA-DB-STALE, false of a forged token or another reader's, which they refuse as
110
+ * IA-DB-SCOPE-UNAVAILABLE. It costs no memory per token, and grants nothing: a read needs a scope still held.
111
+ */
112
+ isIssuedScope(token: string): boolean;
99
113
  get revision(): string;
100
114
  /**
101
115
  * The root view's authored revision (graph `authoredRevisionOf`): `revision` without the sources at runtime
@@ -154,6 +168,11 @@ export declare class Reader {
154
168
  * graph G06c claimants whose path selections select it, records outside the scope treated as absent (D09).
155
169
  */
156
170
  resolveSeat(path: string, options?: ReadOptions): SeatResolution;
171
+ /**
172
+ * D02b: the repository's own @workspace, whatever the seat of its root: the capture decides it once, so a root it
173
+ * shares with other workspaces keeps it. Outside the scope it is absent (D09); a scope never substitutes another.
174
+ */
175
+ repositoryWorkspace(options?: ReadOptions): string | undefined;
157
176
  /**
158
177
  * D02a and D02b: the declarations the capture reads that declare nothing, so a host can say so where they are
159
178
  * authored: each `composition.sources` entry of an admitted @workspace that names no root, and each claimant