@lapxo/bound 0.1.4 → 0.1.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 (66) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +26 -5
  3. package/TARGET.bound +84 -19
  4. package/dist/cli/accept.d.ts +5 -0
  5. package/dist/cli/accept.js +60 -14
  6. package/dist/cli/act-result.d.ts +3 -0
  7. package/dist/cli/act-result.js +48 -0
  8. package/dist/cli/owner.d.ts +2 -0
  9. package/dist/cli/owner.js +18 -2
  10. package/dist/cli/pass.js +15 -10
  11. package/dist/cli/place.js +8 -1
  12. package/dist/cli/verb.js +48 -2
  13. package/dist/fold/admission-history.d.ts +6 -0
  14. package/dist/fold/admission-history.js +22 -0
  15. package/dist/fold/claims.js +5 -1
  16. package/dist/fold/closed.js +44 -13
  17. package/dist/fold/digests.js +18 -11
  18. package/dist/fold/kept.js +9 -4
  19. package/dist/fold/keys.js +9 -6
  20. package/dist/fold/observed.js +196 -174
  21. package/dist/fold/resolved.js +6 -2
  22. package/dist/fold/signed.d.ts +5 -0
  23. package/dist/fold/signed.js +19 -15
  24. package/dist/host/act-cost.d.ts +13 -0
  25. package/dist/host/act-cost.js +25 -0
  26. package/dist/host/adapters/modules/javascript.d.ts +1 -0
  27. package/dist/host/adapters/modules/javascript.js +48 -0
  28. package/dist/host/capsule-process.js +22 -19
  29. package/dist/host/capsule.d.ts +2 -1
  30. package/dist/host/capsule.js +13 -12
  31. package/dist/host/io.d.ts +1 -1
  32. package/dist/host/io.js +1 -1
  33. package/dist/host/ports/ingress.d.ts +24 -0
  34. package/dist/host/ports/ingress.js +57 -0
  35. package/dist/host/ports/local-act.d.ts +34 -0
  36. package/dist/host/ports/local-act.js +100 -0
  37. package/dist/host/ports/publication.d.ts +10 -0
  38. package/dist/host/ports/publication.js +56 -0
  39. package/dist/host/reading-closures.d.ts +31 -0
  40. package/dist/host/reading-closures.js +146 -0
  41. package/dist/host/release.js +24 -2
  42. package/dist/host/selected-capsules.js +4 -4
  43. package/dist/host/walk.d.ts +6 -0
  44. package/dist/host/walk.js +193 -0
  45. package/dist/land/ledger.d.ts +1 -0
  46. package/dist/land/ledger.js +21 -2
  47. package/dist/land/owned.d.ts +1 -1
  48. package/dist/land/owned.js +5 -4
  49. package/dist/observe/files.js +12 -2
  50. package/dist/observe/regions.js +3 -5
  51. package/dist/render/field.d.ts +1 -7
  52. package/dist/render/field.js +6 -12
  53. package/dist/render/names.d.ts +1 -1
  54. package/dist/render/names.js +1 -1
  55. package/dist/render/view.js +16 -11
  56. package/docs/contracts/archive.md +11 -0
  57. package/docs/contracts/cli.md +19 -0
  58. package/docs/contracts/documents.md +35 -0
  59. package/docs/contracts/evidence-view.md +6 -0
  60. package/docs/contracts/publication.md +17 -0
  61. package/docs/contracts/typed-object.md +27 -0
  62. package/docs/contracts/view-walk.md +7 -0
  63. package/docs/contracts/views.md +29 -0
  64. package/docs/usage.md +6 -0
  65. package/package.json +6 -4
  66. package/receipts.bound +367 -77
@@ -0,0 +1,35 @@
1
+ # Explanation — historical profile
2
+
3
+ The declared view selects idea, what-holds and refuses from the byte-pinned historical document provider. The place owns its language and prose. Idea renders its own heading and body. The other two regions require their declared law readings or captured refusals; absent evidence supplies no invented result. The executable sample uses two unrelated places, checks the complete explanation file, repeats the product fold without a file difference and asks the named view directly. It also refuses a well-formed view asking an unoffered region. This quartet proves own-prose projection and absence under this profile; it does not certify law readings, a rejection corpus, typed-object states or the pending general document contract. Bound does not parse this prose.
4
+
5
+ # README — historical profile
6
+
7
+ The declared view selects hero@3, commands@3 and idea@3 from the byte-pinned historical document provider. The place supplies its name, tagline, language, sentence rule and idea. Commands and measured badges are absent in the sample: no command, number or success is invented to fill them. Two unrelated places check the generated README, a second unchanged product fold and the named view; a declared unoffered region refuses by name. The implementation member is verified against the admitted historical artifact. This quartet proves the selected prose profile, not command execution, badges with measured values or a general document grammar. The eight text@3 demands remain unpaid.
8
+
9
+ # Citation file — historical profile
10
+
11
+ The declared view asks the pinned document provider for cff at resolution 3. It projects the place name, version and optional citation metadata into CFF text. The sample uses the exact implementation member from the admitted historical artifact, names its hash and license, and exercises two unrelated places through the compiled CLI. It checks complete citation bytes and two equal readings; title and version follow each place. An unoffered region refuses by view name. Missing optional metadata is omitted; missing name can produce an empty answer under this historical profile. Rendering is not verification of a scientific claim or an external DOI. This pinned profile does not implement the pending general document contract.
12
+
13
+ # Guide — historical profile
14
+
15
+ The declared view asks seq from the pinned historical document provider. The place owns page/seq lines and their heading. Canonical input order supplies the steps; the provider numbers that order and writes the requested shape. The executable sample uses two unrelated procedures, checks their complete Markdown and reads each view twice without differences. A declared view with an unoffered region refuses by name. An empty step set may have an empty answer; it is not invented evidence. A rendered instruction does not prove that instruction was executed. The implementation bytes remain the existing pinned profile, not a document grammar inside Bound.
16
+
17
+ # Reference — historical profile
18
+
19
+ The declared view combines term, set and ref from the pinned historical document provider. The profile projects the place term and meaning, its selected world names and links to its declared Markdown shapes. The executable sample runs two unrelated places, checks their own term and meaning, the actual selected world and relative guide link, and captures two identical CLI readings. A view asking an unoffered region refuses by name. Missing terms or links can yield empty component answers; these are not measurements or a claim that obligations were paid. These historical regions and selectors belong to the selected Topos; Bound supplies verified inputs and dispatch only. The general document contract remains unpaid.
20
+
21
+ # Manifest render profile
22
+
23
+ This declared view uses the selected verbatim-prose provider at text@3. The place assigns its complete manifest text to its output shape; Bound verifies and dispatches the selected offer and writes that shape. The provider does not infer a package schema, dependency graph or fields from the filename. The sample renders two places with distinct JSON bodies twice and checks exact file bytes. Two distinct prose bodies assigned to the same shape refuse; earlier outputs remain unchanged. This proves rendering, not that arbitrary JSON is an installable package.
24
+
25
+ # Workflow render profile
26
+
27
+ This declared view uses the selected verbatim-prose provider at text@3. The place owns the workflow text and its shape; Bound does not infer a forge or manufacture pipeline steps. The sample writes distinct YAML bodies in two places, reads the rendered files twice and compares exact bytes. Conflicting bodies for one shape refuse without replacing prior outputs. This is a render contract, not evidence that a forge executed, staged or published a release. The release pipeline has its separate artifact gate.
28
+
29
+ # Usage render profile
30
+
31
+ This declared view uses the selected verbatim-prose provider at text@3. A prose line with measure=text and the requested shape supplies its own body. The sample renders distinct Markdown bodies in two places twice and compares exact bytes. Multiple identical bodies are one text; differing bodies for one shape refuse. It invents no sections or documentation schema. This existing profile does not pay the eight general-document demands or validate commands that prose happens to mention; executable commands require their own captured vectors.
32
+
33
+ # Build configuration — historical profile
34
+
35
+ The declared tsconfig view asks the admitted package provider for its build region. It projects the place's build/* lines whose shape matches the requested file: true and false become JSON booleans, other option values remain strings, and include separates its declared alternatives. The byte-fixed fixture names the implementation member and its artifact independently; Bound does not interpret compiler options. Two unrelated places exercise the compiled CLI, check the complete generated configuration and two byte-identical readings. A declared view asking an unoffered region refuses by name. This profile renders configuration; it does not validate compiler options or claim a successful build. An empty option set renders an empty compilerOptions object. It is a pinned historical profile, not the pending general document contract.
@@ -0,0 +1,6 @@
1
+ # Authenticated evidence view
2
+
3
+ The declared evidence@8 view projects authenticated delivery history of this place. It preserves signatures and key attribution, including admitted receipts from an attest-class key. Evidence is not normative configuration, proof of truth, or an independent observation origin. Authority and coverage are checked by the existing Topos contract; no consumer or device type changes that boundary.
4
+
5
+
6
+ The no sample specifies an uncovered write and tampered signed bytes. Both must refuse by name. Exact withdrawals remove only covered normative lines; authenticated evidence remains inspectable. The vectors assert status, signature verification and observable CLI output. No private key bytes are printed or shipped.
@@ -0,0 +1,17 @@
1
+ # Published contracts
2
+
3
+ Every public surface names its contract, accepted sample, captured executable vector and rejected sample. Missing members, differing artifact digests and failed vectors remain unpaid. Publication conformance is distinct from installed-artifact acceptance.
4
+
5
+ The selected Topos projects each quartet as a reading through the existing wire. Execution proofs are dependency readings; identical vector bytes share one proof. Each reading names its exact handed inputs and dependent receipt digests. Bound verifies those closures and keeps native count/bytes receipts by digest. A closed reading costs no new execution. The publication aggregate reads the quartet receipts; it never starts an inventory batch.
6
+
7
+ Execution slots, per-execution timeout and response bytes are declared resource lines in the selected Topos. Bounds remain unchanged. A failed reading is not cached as a successful proof. Earlier completed readings stay verified, so a later refusal does not force them to execute again. Changed, missing or corrupt bytes cannot reuse their receipts. Output and execution history retain their exact coordinates.
8
+
9
+ ## Act cost
10
+
11
+ Each declared reading and each host invocation is measured separately. The total duration of a pass is a diagnostic; it is not the cost of one indivisible act. The cost/act ceiling reads the largest measured act or the remaining unpartitioned host work. Nested invocations are not charged twice. A slow or refused act retains its cost. Native reading receipts retain measured seconds separately from semantic identity; reusing a receipt performs no new reader execution. Missing historical durations are not invented as zero.
12
+
13
+ ## Public verification
14
+
15
+ Full-resolution native reading receipts carry the verified canonical UTF-8 input closure in the bytes row and the verified output in the count row, through the wire’s existing about field. Count, digest and measured duration keep their existing meanings. The host verifies the supplied bytes against those digests before reuse; an altered supplied carrier is not replaced by a cached copy. Historical local-only receipts still require their authentic CAS bytes. No private ledger or store is needed to verify a complete public receipt.
16
+
17
+ File-region seals hash configuration through Topos’s existing publication projection. Admission envelopes and retired history stay in the authority ledger; live declarations and ordinary file bytes remain inputs. Object history uses its own contract. A public checkout must carry receipts made for its actual files and compiled reader, not seals copied from a different tree. Verification does not run readers, fetch dependencies, refresh receipts or grant authority.
@@ -0,0 +1,27 @@
1
+ ## Typed cell, claim and mark records
2
+
3
+ The object profile is selected by admitted `wire/object/*` claims in a historical wire snapshot. The epoch of `wire/object/types` is its activation E; a typed record must have epoch >= E. An older record keeps the older grammar. Merely adding object words to `wire/fields` does not admit a typed profile.
4
+
5
+ `fromLine` selects grammar before validating required fields: a record without `type` remains configuration, retaining its required `at`, `role`, `form`, `measure` and `value`; a typed record selects its exact required/allowed row. Configuration cannot carry object-only fields. An incomplete typed record receives no configuration defaults. The parse result distinguishes configuration from cell/claim/mark. `sign=+1|-1` is an object act, `sig` its signature envelope, and a host sign operation produces that envelope.
6
+
7
+ The common object envelope is `type`, `scope`, `id`, `epoch`, `by`, `sig`. Object records reject `at`: epoch orders acts, and `widens` names a local join witness. The following is the declared reference profile. The admitted row alphabets, not this table or a host decoder, are the source of required/allowed field permission.
8
+
9
+ | Row | Fields in addition to the common envelope | Meaning |
10
+ | --- | --- | --- |
11
+ | cell | form, measure, params, restsOn, topos | Define a cell and its selected form/context. |
12
+ | claim/positive | sign, origin, value | Observe an encoded span, sign=+1. |
13
+ | claim/negative | sign, takes | Withdraw an exact claim ID, sign=-1. |
14
+ | mark/travelling | sign, pole, reach, value | Ceiling sign: sign=+1, pole=ceiling, reach=travels. |
15
+ | mark/local | sign, pole, reach, value, widens | Local join: sign=+1, pole=ceiling, reach=local; another mark, retaining the travelling sign. |
16
+ | mark/floor-travelling | sign, pole, reach, value | Travelling require: sign=+1, pole=floor, reach=travels; no widens. |
17
+ | mark/negative | sign, takes | Withdraw an exact mark ID, sign=-1; no pole/reach/widens. |
18
+
19
+ Each row has both `wire/object/required/<row>` and `wire/object/allowed/<row>`. Unknown keys, missing required keys, floor/local, floor+widens, and travelling widening refuse without coercion. A configuration demand is unrelated to a floor mark. `by` authenticates a signing key; it is not an independent observation origin.
20
+
21
+ For a cell, `restsOn=none` represents no parents; otherwise it is a canonical byte-ordered alphabet of coordinates. Several parents are permitted. Only declared cell-coordinate edges form object rest; a directory prefix, a configuration artifact digest, and a host source location do not. Context validation rejects reachable cycles before algebraic parts are requested.
22
+
23
+ The cell's `topos` names folded standing, and its `params` identifies declared parameter bytes. A selected provider decodes values and supplies origin/witness authorization from admitted evidence. A host does not infer interval endpoints, map a key to an origin, or accept widens as its own witness. Missing pin, artifact, decoder, origin or witness refuses by cause. Cell definitions and pins are immutable in this profile; migration is not inferred.
24
+
25
+ `objectHistory` preserves typed history separately from configuration; `validateObjectContext` checks IDs, cell ownership, exact takes, witness order and declared rest under the selected context. Exact redelivery is idempotent; one ID with different canonical content refuses. Signature-envelope differences never bypass verification.
26
+
27
+ After admission, the instrument projects the acts into Obligations. Sign and require travel along declared rest; a witnessed join is local. Descendants inherit travelling marks without local widening. Live exact-ID withdrawals remain confined to their authenticated history. Keys, snapshots, signing devices and repeated receipts do not create independent origins. Compatible meets are not forks. Object states and their precedence come from Obligations; configuration folds do not compute object encounters.
@@ -0,0 +1,7 @@
1
+ # Walk
2
+
3
+ `bound fold --as walk@<resolution>` compares the admitted place with an authenticated peer inventory. Resolution is interpreted by the declared Topos selection and projection contract; it is not restricted to three fixed numbers. The wire declares region membership, context, origin and cuts. The output names touched regions, open regions and payload bytes; protocol and imported bytes carry their own units.
4
+
5
+ Foreign history retains its signed origin epoch. Sender keys authenticate that history and never grant coverage or independent origins in the receiver. Whole-region prefixes are verified before ingress. Import and the receiver-signed local receipt commit atomically; only that receipt advances the receiver's local epoch. Foreign withdrawals are confined to the same authenticated origin and exact identifier. A repeated valid delivery adds no lines and retains its existing import receipt. A rejected or interrupted ingress adds neither evidence nor a receipt.
6
+
7
+ The published sample uses the same compiled public reader on measurement and artifact places. It compares equal summaries, opens a differing region, exchanges at intermediate declared resolutions, converges by union, retains disagreement and verifies replay after a later local act. It rejects tampered payloads, missing records, unauthorized signatures, non-prefix epochs and undeclared context changes. It interrupts a real receiver signer and verifies unchanged ingress and local history. Dead-owner recovery is a separate host action; this view does not silently recover it. The typed object's origin-local claims and withdrawals are a separate conformance vector, not inferred from configuration counts.
@@ -0,0 +1,29 @@
1
+ # Help view
2
+
3
+ A declared help view projects the instrument verb and flag table. It is generated from that table, not copied prose or a claim that another world is supported. Asking it does not authorize a line or call a selected external reader. The sample declares view/help value=help, checks the printed three verbs and refuses a declared view whose region has no provider.
4
+
5
+ # Lines view
6
+
7
+ A declared lines view projects canonical normative standing as wire lines. It is a configuration reading; it does not compute encounters or turn evidence into authority. Live exact withdrawals disappear from normative standing while authenticated evidence remains inspectable through its own view. The sample verifies signatures and attribution, redelivery ONCE, exact withdrawals, tampering and uncovered writes. A declared missing provider refuses rather than returning an invented reading.
8
+
9
+ # Receipts view
10
+
11
+ The native receipt view projects the fold through the admitted Topos receipt contract. The sample uses the published place profile receipts@8|receipts@0|receipts@1: observations, summary and current region bytes. These are that profile’s declared projections, not a universal enumeration of resolutions. A receipt identifies the actual observed set; it is not an origin or a valuation. The sample obtains a native receipt, verifies its signed delivery from an attest-class key through evidence, and checks idempotent delivery. The refused sample names an uncovered write, tampered signature and declared view without a provider. No harness-written JSON is used as a receipt.
12
+
13
+ ## Public verification
14
+
15
+ Full-resolution native reading receipts carry the verified canonical UTF-8 input closure in the bytes row and the verified output in the count row, through the wire’s existing about field. Count, digest and measured duration keep their existing meanings. The host verifies the supplied bytes against those digests before reuse; an altered supplied carrier is not replaced by a cached copy. Historical local-only receipts still require their authentic CAS bytes. No private ledger or store is needed to verify a complete public receipt.
16
+
17
+ File-region seals hash configuration through Topos’s existing publication projection. Admission envelopes and retired history stay in the authority ledger; live declarations and ordinary file bytes remain inputs. Object history uses its own contract. A public checkout must carry receipts made for its actual files and compiled reader, not seals copied from a different tree. Verification does not run readers, fetch dependencies, refresh receipts or grant authority.
18
+
19
+ # Why a coordinate
20
+
21
+ `bound fold <coordinate> --as why` explains the live declarations whose exact `needs` member or `shape` names that coordinate. It prints the selector, witness and value. It does not compute an object encounter or infer authority from a path. The published sample bootstraps two independent places, explains each declared source coordinate and prints `OPEN` for a coordinate no declaration names. That absence is not zero, green or a state. A declared view with no provider refuses by name with a nonzero status. Calling why without a coordinate is not this sample’s acceptance vector; its empty historical capture pays nothing.
22
+
23
+ # Declared programs
24
+
25
+ The programs view asks the selected Topos demand-status projection at resolution 8. Selection, minimum, evidence, elapsed reading and time ceiling coordinates belong to that Topos contract; Bound only hands admitted declarations and region receipts. Program status is derived from that evidence and the declared dependency graph. A demand with no evidence remains unread, its dependant remains blocked, and a missing elapsed reading keeps deadline unread. No cell encounter, origin count or information quantity is computed by this view. The sample uses the published SDK implementation on two unrelated demand chains, captures equal readings twice, names the next unblocked coordinate, and refuses dependency cycles. It does not provide stage conformance evidence or claim either program closed.
26
+
27
+ # Demand card
28
+
29
+ The declared card view asks the selected Topos demand-card projection at resolution 8. It reads the selected demand coordinates, their explicit dependencies and the handed evidence region under selectors declared by that Topos. It does not infer progress from files or convert a declaration into proof. A requirement without evidence is unread; an unpaid predecessor blocks its dependant. The next coordinate is an unblocked unpaid demand. Deadline is unread when no elapsed receipt is handed; absence is not zero. These labels describe program evidence, not Obligations cell states. The sample pins the implementation member from the published Topos SDK, folds two unrelated places twice with equal stdout and refuses a declared dependency cycle. This sample intentionally has no evidence to close either program; it certifies the projection of absence and order, not stage acceptance.
package/docs/usage.md CHANGED
@@ -51,3 +51,9 @@ The accepted TARGET is independent of a contributor's scan. Commit native receip
51
51
  A contribution is a proposed lot with the leaf changes rendered from it. Send that lot for admission by the team's coverage. Do not submit hand-edited lock output as already accepted. Check secrets, extra bound files, foreign vendoring and uncaptured page claims before review.
52
52
 
53
53
  A review includes the product fold, meaningful suites and verification of the rendered bytes. Preserve their actual output and exit status.
54
+
55
+ ## Declaring a demand
56
+
57
+ A new demand records what remains to be proved. Admission does not create conformance evidence or pay it. An OWED line after land says the declaration was admitted and remains unpaid. Signing authority and conformance evidence are separate inputs.
58
+
59
+ The selected program projection reads declared requirements and handed evidence. Missing evidence stays unread; a missing elapsed-time reading is not zero. A dependency cannot close before its requirements and predecessors. Declaring a plan never certifies a release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapxo/bound",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Read the bounds you already wrote, fold them, and name the contradictions.",
6
6
  "main": "dist/cli/verb.js",
@@ -13,7 +13,7 @@
13
13
  "./package.json": "./package.json"
14
14
  },
15
15
  "scripts": {
16
- "test": "node --import ./test/setup.ts --test test/*.test.ts",
16
+ "test": "node --import ./test/setup.ts --test --test-concurrency=2 test/*.test.ts",
17
17
  "clean": "rm -rf dist .tsbuildinfo* tsconfig.tsbuildinfo",
18
18
  "build": "node tools/build.mjs",
19
19
  "prepack": "npm run build"
@@ -26,13 +26,15 @@
26
26
  "TARGET.bound",
27
27
  "receipts.bound",
28
28
  "docs/usage.md",
29
- "docs/readme-assets/atlas.svg"
29
+ "docs/readme-assets/atlas.svg",
30
+ "docs/contracts/*.md"
30
31
  ],
31
32
  "author": "Lapxo",
32
33
  "license": "MIT",
33
34
  "dependencies": {
34
35
  "@lapxo/obligations": "0.3.5",
35
- "@lapxo/topos": "0.1.9"
36
+ "@lapxo/topos": "^0.1.12",
37
+ "acorn": "8.19.0"
36
38
  },
37
39
  "devDependencies": {
38
40
  "@types/node": "^20.0.0",