@lapxo/bound 0.2.5 → 0.2.6

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.
Files changed (237) hide show
  1. package/CITATION.cff +1 -1
  2. package/README.md +20 -3
  3. package/TARGET.bound +75 -42
  4. package/dist/cli/accept.js +59 -70
  5. package/dist/cli/act-result.js +3 -3
  6. package/dist/cli/args.js +1 -1
  7. package/dist/cli/host.js +1 -1
  8. package/dist/cli/native.js +1 -1
  9. package/dist/cli/pass.js +22 -21
  10. package/dist/cli/place.js +6 -6
  11. package/dist/cli/release-result.js +3 -3
  12. package/dist/cli/retained-judgment.js +1 -1
  13. package/dist/cli/standing-result.js +3 -3
  14. package/dist/cli/takes.js +10 -10
  15. package/dist/cli/verb.js +79 -77
  16. package/dist/engine/computation.js +1 -1
  17. package/dist/engine/index.js +1 -1
  18. package/dist/engine/object.js +1 -1
  19. package/dist/engine/ports.js +1 -1
  20. package/dist/fold/admission-history.js +1 -1
  21. package/dist/fold/ceilings.js +1 -1
  22. package/dist/fold/claims.js +2 -2
  23. package/dist/fold/closed.js +1 -1
  24. package/dist/fold/configures.js +1 -1
  25. package/dist/fold/digests.js +10 -10
  26. package/dist/fold/evidence.js +1 -1
  27. package/dist/fold/keys.js +3 -3
  28. package/dist/fold/laid.js +1 -1
  29. package/dist/fold/observed.js +27 -26
  30. package/dist/fold/opened.js +1 -1
  31. package/dist/fold/own.js +3 -3
  32. package/dist/fold/paid.js +1 -1
  33. package/dist/fold/place-inputs.js +1 -1
  34. package/dist/fold/places.js +1 -1
  35. package/dist/fold/reach.js +1 -1
  36. package/dist/fold/readers.js +1 -1
  37. package/dist/fold/region.js +1 -1
  38. package/dist/fold/release-policy.js +1 -1
  39. package/dist/fold/resolved.js +1 -1
  40. package/dist/fold/roles.js +1 -1
  41. package/dist/fold/shards.js +8 -8
  42. package/dist/fold/signed.js +3 -3
  43. package/dist/fold/signers.js +1 -1
  44. package/dist/fold/stranger.js +6 -6
  45. package/dist/fold/wire.js +1 -1
  46. package/dist/fold/zoom.js +1 -1
  47. package/dist/host/act-cost.js +1 -1
  48. package/dist/host/adapters/keys/ed25519.js +1 -1
  49. package/dist/host/adapters/transport/http.js +1 -1
  50. package/dist/host/admitted-place.js +1 -1
  51. package/dist/host/call-context.js +1 -1
  52. package/dist/host/capsule-process.js +1 -1
  53. package/dist/host/capsule.js +1 -1
  54. package/dist/host/cell-receipts.js +1 -1
  55. package/dist/host/command-server.js +4 -0
  56. package/dist/host/content-store.js +1 -1
  57. package/dist/host/contextual-place.js +1 -1
  58. package/dist/host/digest.js +1 -1
  59. package/dist/host/host-controls.js +1 -1
  60. package/dist/host/in-process-act.js +1 -1
  61. package/dist/host/in-process-context.js +1 -1
  62. package/dist/host/in-process-root.js +1 -1
  63. package/dist/host/in-process.js +1 -1
  64. package/dist/host/index.d.ts +1 -1
  65. package/dist/host/index.js +1 -1
  66. package/dist/host/located.js +6 -6
  67. package/dist/host/native/authority-card-view.js +5 -0
  68. package/dist/host/native/authority-card.js +1 -0
  69. package/dist/host/native/command.js +1 -1
  70. package/dist/host/native/custody.js +1 -1
  71. package/dist/host/native/generated-custodian.js +1 -1
  72. package/dist/host/native/installed-package.d.ts +1 -0
  73. package/dist/host/native/installed-package.js +5 -0
  74. package/dist/host/native/module-delivery.d.ts +1 -1
  75. package/dist/host/native/module-delivery.js +1 -1
  76. package/dist/host/native/module-inventory.js +2 -0
  77. package/dist/host/native/module-syntax.js +1 -1
  78. package/dist/host/native/native-binary.js +1 -1
  79. package/dist/host/native/probes.js +1 -0
  80. package/dist/host/native/reading-witness-admission.js +5 -0
  81. package/dist/host/native/reading.js +1 -1
  82. package/dist/host/native/route.js +1 -1
  83. package/dist/host/native-place-state.js +1 -0
  84. package/dist/host/native-receiver.js +1 -1
  85. package/dist/host/objects.js +1 -1
  86. package/dist/host/persistent-host.js +1 -0
  87. package/dist/host/physical-lines.d.ts +1 -0
  88. package/dist/host/physical-lines.js +1 -0
  89. package/dist/host/place-act-transaction.js +1 -1
  90. package/dist/host/place-clock-selection.js +1 -1
  91. package/dist/host/ports/local-act.js +1 -1
  92. package/dist/host/ports/place-act.js +1 -1
  93. package/dist/host/ports/store.js +1 -1
  94. package/dist/host/ports/transport.js +1 -1
  95. package/dist/host/profile-composition.d.ts +1 -0
  96. package/dist/host/profile-composition.js +2 -0
  97. package/dist/host/reading-closures.js +6 -6
  98. package/dist/host/reading-context.js +1 -1
  99. package/dist/host/reading-identity.js +2 -2
  100. package/dist/host/reading-preparation.js +1 -1
  101. package/dist/host/reference-authenticated.d.ts +1 -1
  102. package/dist/host/reference-authenticated.js +1 -1
  103. package/dist/host/reference-export.js +1 -1
  104. package/dist/host/reference-native-api.d.ts +1 -1
  105. package/dist/host/reference-native-api.js +1 -1
  106. package/dist/host/reference-native.js +1 -1
  107. package/dist/host/reference-standing.js +1 -1
  108. package/dist/host/reference.js +1 -1
  109. package/dist/host/refusals.js +2 -2
  110. package/dist/host/release.js +1 -1
  111. package/dist/host/root-clock-source.js +1 -1
  112. package/dist/host/selected-capsules.js +1 -1
  113. package/dist/host/selected-topos.js +1 -1
  114. package/dist/host/signing.js +2 -2
  115. package/dist/host/source-content.js +1 -1
  116. package/dist/host/standing-carrier.js +1 -1
  117. package/dist/host/standing-projection.js +1 -1
  118. package/dist/host/timing.js +1 -1
  119. package/dist/host/walk.js +1 -1
  120. package/dist/host/work-trace.js +1 -0
  121. package/dist/judge/late.js +1 -1
  122. package/dist/judge/take.js +1 -1
  123. package/dist/judge/widening.js +1 -1
  124. package/dist/land/act.js +6 -6
  125. package/dist/land/alias.js +1 -1
  126. package/dist/land/held.js +1 -1
  127. package/dist/land/ledger.js +5 -6
  128. package/dist/land/sign.js +1 -1
  129. package/dist/land/standing-pin.js +1 -1
  130. package/dist/land/vouched.js +1 -1
  131. package/dist/land/withdraw.js +1 -1
  132. package/dist/observe/files.js +1 -1
  133. package/dist/observe/identity.js +1 -1
  134. package/dist/observe/match.js +1 -1
  135. package/dist/observe/regions.js +1 -1
  136. package/dist/observe/run.js +1 -2
  137. package/dist/observe/runner.js +1 -1
  138. package/dist/public-types.d.ts +945 -40
  139. package/dist/render/capsule.js +1 -1
  140. package/dist/render/field.js +1 -1
  141. package/dist/render/open.js +1 -1
  142. package/dist/render/page.js +1 -1
  143. package/dist/render/receipt-projection.js +1 -0
  144. package/dist/render/receipts.js +1 -1
  145. package/dist/render/shape.js +1 -1
  146. package/dist/render/target.js +4 -4
  147. package/dist/render/view.js +5 -5
  148. package/dist/vendor/bundle.json +1 -1
  149. package/dist/vendor/library14.js +1 -0
  150. package/dist/vendor/runtime.js +53 -30
  151. package/dist/wasm/adapter.d.ts +1 -1
  152. package/docs/contracts/authenticated-reference.publication.json +1 -1
  153. package/docs/contracts/authority-preflight.md +17 -0
  154. package/docs/contracts/authority-preflight.publication.json +25 -0
  155. package/docs/contracts/installed-package.md +21 -0
  156. package/docs/contracts/installed-package.publication.json +25 -0
  157. package/docs/contracts/materialized-leaf-sequence.md +15 -0
  158. package/docs/contracts/materialized-leaf-sequence.publication.json +25 -0
  159. package/docs/contracts/module-inventory.md +15 -0
  160. package/docs/contracts/module-inventory.publication.json +25 -0
  161. package/docs/contracts/native-host.md +29 -1
  162. package/docs/contracts/native-host.publication.json +4 -4
  163. package/docs/contracts/native-probes.md +13 -0
  164. package/docs/contracts/native-probes.publication.json +25 -0
  165. package/docs/contracts/native-publication.inventory.json +9 -1
  166. package/docs/contracts/native-view-batch.md +17 -0
  167. package/docs/contracts/native-view-batch.publication.json +25 -0
  168. package/docs/contracts/physical-lines.md +19 -0
  169. package/docs/contracts/physical-lines.publication.json +25 -0
  170. package/docs/contracts/profile-composition.md +17 -0
  171. package/docs/contracts/profile-composition.publication.json +25 -0
  172. package/docs/contracts/profile-preparation-native-meaning.md +9 -0
  173. package/docs/contracts/publication.md +12 -0
  174. package/docs/contracts/reading-identity.md +26 -2
  175. package/docs/contracts/reading-identity.publication.json +4 -4
  176. package/docs/contracts/reading-witness-admission.md +49 -0
  177. package/docs/contracts/readme.publication.json +1 -1
  178. package/docs/contracts/reference-port.md +11 -0
  179. package/docs/contracts/reference-port.publication.json +1 -1
  180. package/docs/contracts/refusals.bound +346 -145
  181. package/docs/contracts/refusals.md +119 -54
  182. package/docs/contracts/refusals.publication.json +2 -2
  183. package/docs/reference.md +8 -0
  184. package/licenses/wasm/{fast-text-encoding.txt → NOTICE.txt} +111 -0
  185. package/package.json +69 -8
  186. package/receipts.bound +12921 -11722
  187. package/samples/authority-preflight/no.json +6 -0
  188. package/samples/authority-preflight/yes.json +30 -0
  189. package/samples/engine-alphabet/reader.js +3 -1457
  190. package/samples/engine-alphabet/receipts.bound +7 -7
  191. package/samples/engine-interval/reader.js +3 -1457
  192. package/samples/engine-interval/receipts.bound +7 -7
  193. package/samples/installed-package/consumer.mjs +29 -0
  194. package/samples/installed-package/fixture.json +48 -0
  195. package/samples/installed-package/no.json +10 -0
  196. package/samples/installed-package/yes.json +52 -0
  197. package/samples/materialized-leaf-sequence/no.json +11 -0
  198. package/samples/materialized-leaf-sequence/yes.json +10 -0
  199. package/samples/module-inventory/yes.json +28 -0
  200. package/samples/native/physical-line-reader.mjs +1 -0
  201. package/samples/native/physical-line-reader.source.mjs +13 -0
  202. package/samples/native-host/no.json +6 -1
  203. package/samples/native-host/yes.json +18 -1
  204. package/samples/native-probes/inputs/inspection.json +28 -0
  205. package/samples/native-probes/no.json +7 -0
  206. package/samples/native-probes/yes.json +28 -0
  207. package/samples/native-view-batch/no.json +14 -0
  208. package/samples/native-view-batch/yes.json +10 -0
  209. package/samples/no/engine-order/reader.js +3 -1457
  210. package/samples/no/module-inventory/no.json +10 -0
  211. package/samples/physical-lines/no.json +5 -0
  212. package/samples/physical-lines/yes.json +9 -0
  213. package/samples/profile-composition/no.json +6 -0
  214. package/samples/profile-composition/yes.json +14 -0
  215. package/samples/reading-identity/no.json +7 -1
  216. package/samples/reading-identity/yes.json +24 -1
  217. package/vectors/native/authority-preflight.vector.json +55 -0
  218. package/vectors/native/installed-package.vector.json +31 -0
  219. package/vectors/native/materialized-leaf-sequence.vector.json +31 -0
  220. package/vectors/native/module-inventory.vector.json +56 -0
  221. package/vectors/native/native-host.vector.json +214 -0
  222. package/vectors/native/native-probes.vector.json +31 -0
  223. package/vectors/native/native-view-batch.vector.json +31 -0
  224. package/vectors/native/physical-lines.vector.json +105 -0
  225. package/vectors/native/profile-composition.vector.json +53 -0
  226. package/vectors/native/reading-identity.vector.json +38 -0
  227. package/vectors/native/refusals.vector.json +36 -2
  228. package/dist/vendor/library11.js +0 -1
  229. package/dist/vendor/sources.json +0 -1
  230. package/licenses/wasm/bound.txt +0 -21
  231. package/licenses/wasm/jitl-quickjs-ffi-types.txt +0 -21
  232. package/licenses/wasm/jitl-quickjs-wasmfile-release-sync.txt +0 -47
  233. package/licenses/wasm/obligations.txt +0 -21
  234. package/licenses/wasm/quickjs-emscripten-core.txt +0 -21
  235. package/licenses/wasm/topos.txt +0 -21
  236. /package/dist/vendor/{50086958553b9376d600583f7dff354196bfeb41170fc6d1482ca7bea7c493e2.LICENSE → 28cba430228db1c04f446c93f81b09a2705d6bf3e222d35adbe5a4cee4061884.LICENSE} +0 -0
  237. /package/dist/vendor/{b3e938d28f88a1851af303a40c749e12ebd5a686daac4f0b343b5cdd2e040419.LICENSE → 7aca161279d14bc0e054dcc281cd110aeb95be2e026b42fdf527a260e58b2aae.LICENSE} +0 -0
@@ -0,0 +1,49 @@
1
+ # Reading witness admission
2
+
3
+ `readingWitnessAdmission(root, proposed, selectedStanding, vocabulary, place)` is an admission hook for explicitly selected reading-witness policy. It returns `allow` with verified evidence identities, `ask` with `reading-witness/<scope>` needs, or `refuse` with the public `reading-witness` code and a diagnostic cause. The shared native admission path consumes this result before its existing widening rule. The hook neither signs nor lands a lot.
4
+
5
+ Selection is opt-in. The current admitted Root vocabulary selects `wire/reading-witness-admission = bound-reading-witness-admission@1`. Policy records have role `writes`, measure `reading-witness`, value `lock`, and canonical JSON in `about`. A policy has these fields:
6
+
7
+ ```json
8
+ {
9
+ "profile": "bound-reading-witness-policy@1",
10
+ "scope": "core/lines",
11
+ "place": ".",
12
+ "unit": "physical-lines/utf8-lf@1",
13
+ "inventory": ["src"],
14
+ "selectors": ["src/*.txt"],
15
+ "producer": "device",
16
+ "port": "port/physical",
17
+ "readerMapping": "reader/capsule/physical/port",
18
+ "byteBudget": "65536",
19
+ "rowBudget": "65536",
20
+ "entryBudget": 32,
21
+ "evidenceBytes": 4194304,
22
+ "receiptRows": 512,
23
+ "authorityBytes": 1048576,
24
+ "authorityLines": 2048
25
+ }
26
+ ```
27
+
28
+ The scope, place, inventory, selectors, producer and port are declarations, not application names compiled into the runtime. `place` is `.` for Root or a relative child place. Shared admission supplies the actual selected place separately, so a Root `core/lines` policy cannot apply to a child merely because its local scope has the same spelling. Other readings and ceilings retain their existing rules. A matching policy never falls back to prefix-only witnessing.
29
+
30
+ A selected widening names `at=witness:sha256:...`. The digest addresses a bounded local CAS blob containing canonical JSON followed by one LF:
31
+
32
+ ```json
33
+ {
34
+ "profile": "bound-reading-witness-proof@1",
35
+ "witness": "topos-reading-witness/1 ...",
36
+ "authorization": "bound-lock/1 ...",
37
+ "receipts": ["bound-lock/1 ..."]
38
+ }
39
+ ```
40
+
41
+ The Topos witness uses `authentication=key-covered`. The authorization is an original signed Bound record at the policy scope, with role `writes`, form `alphabet`, measure `reading-witness`, value equal to the SHA-256 of `readingWitnessStatementBytes(witness)`, and `restsOn` equal to the digest of the canonical policy JSON plus LF. The witness evidence digest names the exact signed authorization line plus LF. Its coverage digest names the current producer's declared coverage array. Existing Bound authority evaluation verifies signature, admitted algorithm, window, scope coverage and current producer eligibility. No caller-supplied success callback establishes this authority.
42
+
43
+ The current native port and signed reader mapping must remain admitted. Their selected archive and native member references must match the retained canonical reading context. Inline native receipt carriers are checked by the existing `verifiedReadingReceipts` path, including canonical `reading-context@1` identity and reading receipt identity. The witness `run` names that exact receipt unit scope. All file inputs must match the explicit inventory by name and digest.
44
+
45
+ The physical reading is then made again from the declared local inventory by the existing Topos physical reader through Bound's adapter. The exact model, parameters, selection, unit, scale, resolution, reader, implementation, context, result and reading identities must agree with the signed witness. The native output must contain the same measured line count at the policy scope. Missing selectors, stray files, links, incomplete inventories, altered inputs, withdrawn ports, old mappings and invalid evidence cannot authorize widening. Proof processing reads only its declared local CAS blob and inventory; it does not resolve arbitrary foreign evidence paths or CI URLs.
46
+
47
+ The native consumer vector first enables the optional selector and policy through an ordinary act on an existing native place. It records an actual over-ceiling physical reading, refuses absent and forged proof, then attempts a real widening transaction with a signed authorization and retained native evidence. The prior inscription is explicitly withdrawn in the same batch, so a successful act must leave exactly the new effective ceiling. This tests admission and its real act receipt, rather than interpreting a local judge result as a landing.
48
+
49
+ The previous native preflight root-lock refusal remains preserved in the evidence packet. Native evidence inspection requires the existing Root authority lease; the shared prospective admission and authority-card paths acquire that real lease. This contract adds no bypass flag and does not weaken current protection.
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "role": "contract",
6
6
  "path": "README.md",
7
- "digest": "sha256:bc8277eaef68f8ab8a049607003502a1979fb58a36f9468d6224ec14df7e131f"
7
+ "digest": "sha256:1ee7dba6bcdb7fad0280271ea8cf3657719b6aa88efcebe585f8ca9c76664a39"
8
8
  },
9
9
  {
10
10
  "role": "yes",
@@ -38,3 +38,14 @@ For the opt-in `authenticated-standing@1` profile, the host checks the selected
38
38
  The original weather and editorial carriers, their signatures and effective-order counterexamples remain byte-identical. `inspectAuthenticatedReference` accepts their independently supplied legacy trust tuple without inventing the newer contract commitments. Its native vector verifies both positive carriers and their arrival-equivalent projection, and rejects signature, coverage, era, effective-order, blob and semantic-standing failures. Authority and context preparation use the existing host and SDK; no replacement verifier or form algebra is supplied by the carrier.
39
39
 
40
40
  This preserves the carrier/API contract, not an implicit native backend. The historical receiver TARGETs omit the explicit backend and interpretation-contract lines required by native opening in 0.2.1. They therefore refuse with `reference/backend` before transport; the vector asserts that refusal instead of re-signing or weakening the fixtures. No automatic ESM fallback is added. Native positive opening with the complete admitted context is demonstrated separately by the reference-export and reference-backend quartets, including ESM/WASM equality and altered-byte refusal. `compatibility.json` records every inherited condition and expected result; the no sample still contains the original bad signature.
41
+
42
+
43
+ ## Located content and declared previews
44
+
45
+ The native `inspectReference` API and CLI consume Topos0.2.4 `#topos-reference:1` using its existing decoder and inspector. Content identity excludes the location. A holder may supply bytes; an absent location or a viewer produces `needs/bytes/<blob>` without a fetch. Unavailable bytes remain open. Available bytes must match both exact blob bytes and semantic standing. No inspection authenticates an origin, admits a declaration or folds an encounter. An authenticated host selection refuses a located-only profile rather than downgrading trust. Historical `#bound:1` bytes remain unchanged.
46
+
47
+ The receiver may supply `signal` and `allowedOrigins`. Origin refusal happens before transport; redirects are not followed. HTTP enforces the declared byte budget while reading, cancels an overrun, and distinguishes cancellation/timeout from unavailable content. A late valid delivery can satisfy the same reference. Scheme and lifetime policy remain selected by admitted lines; a carrier chooses neither policy nor authority. Command transports retain their existing finite process contract.
48
+
49
+ `inspectReferencePreview(line,budget,maxInlineBytes)` delegates to the Topos reference-projection contract. It never fetches. The receiver explicitly supplies record/inline byte budgets; overflow and wrong inline digests refuse without truncation. Duplicate relations follow the declared preserve/refuse choice. A preview neither replaces full content nor proves relation truth, completeness or authenticity. A fragment can be read by page code: secrecy is not promised, and secrets must not be included inline.
50
+
51
+ The executable additional quartet is retained inside the selected process reader, as `vectors/reference-wire.vector.json`: positive and negative cases run over catalog and route-notes, using `test/reference-wire-acceptance.test.ts` and `test/response-protocol.test.ts`. The logical receipt is `conformance/reference-wire`; its contract, two positive places, corruption/stream/origin/cancellation negatives and exact process predicates are committed by that reader digest. Root judges the count; the reader does not alter policy. This adds no mandatory project server.
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "role": "contract",
6
6
  "path": "docs/contracts/reference-port.md",
7
- "digest": "sha256:d6198b9ab177086cb334e9e9cd7adb5c67b0af7165a79d23812aa2496d17674c"
7
+ "digest": "sha256:7fe99f71468a800f88d64104710b8b877d874f3415b9f4480eee5d30a9d871ae"
8
8
  },
9
9
  {
10
10
  "role": "yes",