@lapxo/bound 0.2.2 → 0.2.4

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 (79) hide show
  1. package/.github/workflows/release.yml +67 -0
  2. package/.github/workflows/test.yml +35 -0
  3. package/CITATION.cff +19 -0
  4. package/TARGET.bound +80 -21
  5. package/dist/cli/accept.js +103 -71
  6. package/dist/cli/place.js +3 -2
  7. package/dist/cli/standing-result.js +3 -5
  8. package/dist/cli/takes.js +4 -3
  9. package/dist/cli/verb.js +2 -1
  10. package/dist/engine/ports.d.ts +6 -1
  11. package/dist/engine/ports.js +23 -9
  12. package/dist/fold/claims.d.ts +29 -0
  13. package/dist/fold/claims.js +2 -1
  14. package/dist/fold/closed.js +2 -1
  15. package/dist/fold/digests.js +7 -7
  16. package/dist/host/admitted-place.js +3 -31
  17. package/dist/host/call-context.d.ts +20 -0
  18. package/dist/host/call-context.js +14 -0
  19. package/dist/host/capsule-process.js +2 -1
  20. package/dist/host/capsule.js +7 -4
  21. package/dist/host/commit-result.d.ts +6 -0
  22. package/dist/host/commit-result.js +5 -0
  23. package/dist/host/contextual-place.js +9 -14
  24. package/dist/host/host-controls.js +19 -0
  25. package/dist/host/in-process-act.d.ts +82 -0
  26. package/dist/host/in-process-act.js +84 -0
  27. package/dist/host/in-process-context.d.ts +46 -0
  28. package/dist/host/in-process-context.js +91 -0
  29. package/dist/host/in-process-root.d.ts +117 -0
  30. package/dist/host/in-process-root.js +84 -0
  31. package/dist/host/in-process.d.ts +41 -0
  32. package/dist/host/in-process.js +55 -0
  33. package/dist/host/index.d.ts +15 -0
  34. package/dist/host/index.js +7 -0
  35. package/dist/host/native/loader.js +1 -1
  36. package/dist/host/native/module-closure.d.ts +35 -0
  37. package/dist/host/native/module-closure.js +34 -3
  38. package/dist/host/native/module-delivery.d.ts +62 -0
  39. package/dist/host/native/module-delivery.js +151 -0
  40. package/dist/host/native/module-syntax.js +3 -1
  41. package/dist/host/native-receiver.d.ts +19 -0
  42. package/dist/host/native-receiver.js +25 -0
  43. package/dist/host/order.js +2 -0
  44. package/dist/host/place-act-transaction.d.ts +24 -0
  45. package/dist/host/place-act-transaction.js +78 -0
  46. package/dist/host/place-clock-selection.d.ts +55 -0
  47. package/dist/host/place-clock-selection.js +1 -1
  48. package/dist/host/ports/local-act.d.ts +44 -0
  49. package/dist/host/ports/local-act.js +13 -2
  50. package/dist/host/ports/place-act.d.ts +49 -0
  51. package/dist/host/ports/place-act.js +19 -54
  52. package/dist/host/ports/publication.d.ts +10 -0
  53. package/dist/host/root-clock-source.d.ts +86 -0
  54. package/dist/host/root-clock-source.js +7 -5
  55. package/dist/host/signature-era.js +12 -0
  56. package/dist/host/signing.js +1 -1
  57. package/dist/host/source-content.js +2 -1
  58. package/dist/host/standing-carrier.js +18 -0
  59. package/dist/host/standing-projection.js +50 -0
  60. package/dist/land/act.js +60 -26
  61. package/dist/observe/run.js +2 -1
  62. package/dist/observe/runner.js +16 -8
  63. package/docs/contracts/closure-delivery.md +23 -0
  64. package/docs/contracts/closure-delivery.publication.json +25 -0
  65. package/docs/contracts/native-host.md +21 -0
  66. package/docs/contracts/native-host.publication.json +25 -0
  67. package/docs/contracts/native-publication.inventory.json +2 -1
  68. package/docs/contracts/publication.inventory.json +29 -0
  69. package/docs/guide.md +10 -0
  70. package/docs/reference.md +39 -0
  71. package/docs/why.md +109 -0
  72. package/package.json +43 -2
  73. package/receipts.bound +10405 -9625
  74. package/samples/module-delivery/inputs/delivery.json +1 -0
  75. package/samples/native-host/no.json +10 -0
  76. package/samples/native-host/yes.json +20 -0
  77. package/samples/no/module-delivery/delivery.json +1 -0
  78. package/vectors/native/module-delivery.vector.json +32 -0
  79. package/vectors/native/native-host.vector.json +62 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "scope": "contract/published/native-host",
3
+ "members": [
4
+ {
5
+ "role": "contract",
6
+ "path": "docs/contracts/native-host.md",
7
+ "digest": "sha256:e7821cd2641caa4725aa20095027d903693756a8568a2163a79d7bb665b7643b"
8
+ },
9
+ {
10
+ "role": "yes",
11
+ "path": "samples/native-host/yes.json",
12
+ "digest": "sha256:6c02edaea00db315e20b15f96b281cf605db2c7499f3d1b9839096a704492c44"
13
+ },
14
+ {
15
+ "role": "vector",
16
+ "path": "vectors/native/native-host.vector.json",
17
+ "digest": "sha256:b62d77a3de11d960657fa9e7b58d4e88c68d0c389d683937bba4fa6c04a9d952"
18
+ },
19
+ {
20
+ "role": "no",
21
+ "path": "samples/native-host/no.json",
22
+ "digest": "sha256:27f323ca2a0d1547197e6beab3427bdcda45c0318fac52bc58b2b0164a2df38d"
23
+ }
24
+ ]
25
+ }
@@ -9,6 +9,7 @@
9
9
  "contract/published/standing",
10
10
  "contract/published/refusals",
11
11
  "contract/published/host-ports",
12
- "contract/published/readme"
12
+ "contract/published/readme",
13
+ "contract/published/native-host"
13
14
  ]
14
15
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "profile": "quartet-process@1",
3
+ "scope": "contract/published",
4
+ "surface": [
5
+ "contract/published/attest-evidence-view",
6
+ "contract/published/cli/fold",
7
+ "contract/published/cli/land",
8
+ "contract/published/cli/sign",
9
+ "contract/published/pipeline/archive",
10
+ "contract/published/typed-object-sample",
11
+ "contract/published/view/card",
12
+ "contract/published/view/citation-file",
13
+ "contract/published/view/explanation",
14
+ "contract/published/view/guide",
15
+ "contract/published/view/help",
16
+ "contract/published/view/lines",
17
+ "contract/published/view/manifest-render",
18
+ "contract/published/view/programs",
19
+ "contract/published/view/readme-historical",
20
+ "contract/published/view/receipts",
21
+ "contract/published/view/reference",
22
+ "contract/published/view/release-workflow-render",
23
+ "contract/published/view/tsconfig",
24
+ "contract/published/view/usage-profile",
25
+ "contract/published/view/walk",
26
+ "contract/published/view/why"
27
+ ],
28
+ "note": "Explicit public-surface inventory. A selected coordinate without a descriptor is unpaid. Outstanding capability demands are not advertised implementations."
29
+ }
package/docs/guide.md ADDED
@@ -0,0 +1,10 @@
1
+ ## First session
2
+
3
+ 1. fold --as readme --check prints SAME when that page's cone did not move.
4
+ 2. the digest at zero
5
+ 3. fold --as help prints the three verbs and no fourth.
6
+ 4. Land the batch with the key that covers it.
7
+ 5. Write the line as by=target.
8
+ 6. the lines at eight
9
+ 7. Preview with fold --as before it lands.
10
+ 8. the regions at one
@@ -0,0 +1,39 @@
1
+ **line** — the lock a place is bound by, and the fold that reads it
2
+
3
+ | | |
4
+ |---|---|
5
+ | pin | closure-delivery |
6
+ | pin | ep-closure-reader |
7
+ | pin | native-publication |
8
+ | pin | process-readings |
9
+ | pin | programs |
10
+ | pin | prose-render |
11
+ | pin | publication-additions |
12
+ | pin | publication-readings |
13
+ | pin | published-dependencies |
14
+ | pin | rendering |
15
+ | pin | source-readings |
16
+ | pin | wire |
17
+
18
+ - [closure-delivery](contracts/closure-delivery.md)
19
+ - [archive](contracts/archive.md)
20
+ - [cli](contracts/cli.md)
21
+ - [documents](contracts/documents.md)
22
+ - [engine](contracts/engine.md)
23
+ - [evidence-view](contracts/evidence-view.md)
24
+ - [host-ports](contracts/host-ports.md)
25
+ - [reference-backend](contracts/reference-backend.md)
26
+ - [reference-export](contracts/reference-export.md)
27
+ - [refusals](contracts/refusals.md)
28
+ - [standing](contracts/standing.md)
29
+ - [typed-object](contracts/typed-object.md)
30
+ - [views](contracts/views.md)
31
+ - [view-walk](contracts/view-walk.md)
32
+ - [why](why.md)
33
+ - [guide](guide.md)
34
+ - [native-host](contracts/native-host.md)
35
+ - [publication](contracts/publication.md)
36
+ - [README](../README.md)
37
+ - [reference](reference.md)
38
+ - [reference-port](contracts/reference-port.md)
39
+ - [usage](usage.md)
package/docs/why.md ADDED
@@ -0,0 +1,109 @@
1
+ ## How Bound reads a project
2
+
3
+ Bound reads a project's admitted statements and observations through its selected Topos, then renders the declared views and records their inputs in receipts. The example below explains the object; a file-fold alone does not calculate its intervals.
4
+
5
+ ## Use Bound in a project
6
+
7
+ From a project with an admitted lock and selected views, inspect its standing, ask for its evidence, then verify the committed outputs:
8
+
9
+ ```sh
10
+ npx @lapxo/bound@0.1.8 fold --as lines
11
+ npx @lapxo/bound@0.1.8 fold --as receipts@1
12
+ npx @lapxo/bound@0.1.8 fold --check
13
+ ```
14
+
15
+ Use this flow to review a project change or check a dependency's declared contract. `--check` verifies existing evidence; it does not execute a missing reading. A file fold names readings and explicitly says that it computed no encounters.
16
+
17
+ Independent observations are judged through the declared typed cells view. The selected topos supplies the form, origin evidence and bounds. Bound keeps attribution and exact-ID withdrawals through the fold.
18
+
19
+ A selected form can instead describe a set of artifacts, a delivery interval or another domain's values. The project declares the form, origin evidence and views; Bound does not infer them from filenames or units.
20
+
21
+
22
+ ## A meeting everyone can understand
23
+
24
+ Ana is available from 10 to 14, Luis from 12 to 16, and the room from 10 to 13. Their common availability is 12 to 13. A boss available from 18 to 20 makes the encounter incompatible. Withdrawing that exact reading restores the overlap; Ana, Luis and the room remain.
25
+
26
+ With an interval form, those are object operations: observe independent claims, meet them, withdraw by id, and read the state. A narrower compatible meet is not a fork. Folding a file of declarations alone does not calculate meeting availability.
27
+
28
+ The same pattern applies to a delivery window, a sensor's allowed range, or an agreed performance budget. The chosen topos determines the units and how evidence is obtained. Bound does not supply a meeting-specific rule.
29
+
30
+ ## See how information holds together
31
+
32
+ ![Cells, travelling bounds and a local join](https://raw.githubusercontent.com/Lapxo/bound/2053bb6d6188f04538114eae6a0add5166944ed3/docs/readme-assets/atlas.svg)
33
+
34
+ A travelling ceiling on B reaches C and G through their declared rest. A local join widens B alone. D is independent. The figure shows those relations; point size and camera distance do not measure information.
35
+
36
+ | State | Meaning |
37
+ | --- | --- |
38
+ | REQUIRED | Compatible bounds, fewer than two independent origins. |
39
+ | FREE | Independent origins meet and their encounter fits the bounds. |
40
+ | CONFLICT | Bounds conflict, or eligible claims have no common encounter. |
41
+ | FORBIDDEN | An inhabited encounter does not fit the bounds. |
42
+
43
+ Bounds are checked before origins and claims. A receipt is evidence of a reading, not another origin. Duplicating one does not add freedom.
44
+
45
+ ## Change a project without erasing evidence
46
+
47
+ Work in the project's directory. Use an existing admitted key identifier and its matching private key stored outside every repository. The admitted key also names its signer with `keys/<who> measure=signer value=file`; `signer/timeout` and `signer/response-bytes` declare its limits. Your public key and coverage belong to the authority contract; possession of a private key alone does not authorize a scope.
48
+
49
+ ```sh
50
+ export BOUND_KEY_ID='your-admitted-key-id'
51
+ export BOUND_KEY_FILE="$HOME/Private/keys/your-device.pem"
52
+ lot_dir="$(mktemp -d)"
53
+ ```
54
+
55
+ Have the selected view produce a proposal at `$lot_dir/proposal.bound`, or prepare the project's permitted lines there for review. Unsigned proposals use `by=target`, without a preassigned epoch or `sig`. Lots stay outside the repository; the committed bound files are only `TARGET.bound` and `receipts.bound`.
56
+
57
+ ```sh
58
+ npx @lapxo/bound@0.1.8 sign "$lot_dir/proposal.bound" \
59
+ --key "$BOUND_KEY_ID" --key-file "$BOUND_KEY_FILE" \
60
+ > "$lot_dir/signed.bound" &&
61
+ npx @lapxo/bound@0.1.8 land "$lot_dir/signed.bound" &&
62
+ npx @lapxo/bound@0.1.8 fold
63
+ ```
64
+
65
+ `sign` assigns the admitted epoch and writes the signed lot to stdout. `land` validates the whole lot before admission. A refusal is evidence to inspect; it is not success. Do not proceed after a failed signature or admission. The key file is a PKCS8 private key matching the admitted public key; do not put it in the lot, source tree, package or CI artifacts.
66
+
67
+ For typed object withdrawals, `takes` names the exact claim or mark id. Removing a local join leaves the travelling sign live. For untyped configuration, use the wire's exact withdrawal selectors; do not combine withdrawal and replacement with identical selectors in one lot. Wire alphabet updates supersede by epoch.
68
+
69
+ [Authority, withdrawals, receipts and PR review](https://github.com/Lapxo/bound/blob/2053bb6d6188f04538114eae6a0add5166944ed3/docs/usage.md).
70
+
71
+ ## Select a topos by what it declares
72
+
73
+ `sources/<name>` says where a world can be obtained. An admitted `uses/<name>` names the digest of that topos's folded standing: canonical live claims in wire byte order, excluding signature envelopes and host shape. Re-signing the same standing preserves the pin. A changed live form, class, view or offer changes it.
74
+
75
+ `restsOn` closes artifact bytes separately. A capsule is one offer. Forms, classes and views need no capsule merely to be selected. Runtime and packing do not define standing identity. npm dependency ranges remain package metadata; they are not standing pins.
76
+
77
+ | Responsibility | Owner |
78
+ | --- | --- |
79
+ | Meet, state, live acts and rest | Obligations |
80
+ | Wire, forms, classes, views and offer contracts | Topos |
81
+ | Admission, folding and evidence | Bound |
82
+ | Domain measurement and representation | Selected topos |
83
+ | Storage, transport and execution | Host |
84
+
85
+ Cell `restsOn` is the object's relation. Directory prefixes and file summaries are host coordinates, not object rest. Wire tokens are protocol constants, not organization, host, path or key literals.
86
+
87
+ ## Repository rules
88
+
89
+ Commit `TARGET.bound`, `receipts.bound` and the outputs the forge reads. Ignore `.bound/` from the first line of `.gitignore`. Keep proposals, signed lots, keys, ledgers, caches and dependency blobs outside the published tree.
90
+
91
+ The lock is the project's own contract and pins. Read a dependency's declarations from its selected standing; do not copy its lines into your lock. README, package metadata and workflows must be renders of admitted declarations. A scan is an observation, not permission to lower a ceiling.
92
+
93
+ A PR proposes lines and the leaf changes they render. The judge uses the team's accepted contract independently of the proposed revision. Preserve refusals, conflicting origins and unpaid demands. [Repository and contribution rules](https://github.com/Lapxo/bound/blob/2053bb6d6188f04538114eae6a0add5166944ed3/docs/usage.md#repository-and-pr-review).
94
+
95
+ ## An atlas you can question
96
+
97
+ Information can share a history without sharing a single presentation. The same admitted cells can support a compact status view, a spatial view of their relations, or a focused reading of one disagreement. Each view asks for a region and resolution; its selected topos determines the representation.
98
+
99
+ This makes changes inspectable. A local act can remain local, travelling bounds can reach dependent cells, and a receipt can name the inputs of the reading you saw. You can ask what changed and what depends on it without turning a drawing into the algebra.
100
+
101
+ A pin names standing, not a download URL or runtime entry. Its declared artifact dependencies close the bytes needed for an offered operation. The boundary lets a form or view remain meaningful even when it has no executable capsule.
102
+
103
+ Use Bound where independently attributed observations must be judged against an accepted contract: compatibility between components, operational limits, or a team's project requirements. The selected topos must supply the actual measurements; a digest identifies the evidence without declaring it true.
104
+
105
+ [Contribute a counterexample or a proposed lot](CONTRIBUTING.md).
106
+
107
+ ## Foundations and related libraries
108
+
109
+ The two-sided constraint object is described in Nahum Ochoa's [Two-Sided Constraints on a Valued Lattice](https://doi.org/10.5281/zenodo.21858428), DOI `10.5281/zenodo.21858428`. Bound uses the object through [Obligations](https://github.com/Lapxo/obligations); [Topos](https://github.com/Lapxo/topos) supplies the wire and contracts for forms, views and selected worlds. Bound admits, folds and retains evidence across those declared boundaries. A digest identifies bytes; it does not certify that an observation is true.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapxo/bound",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
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",
@@ -28,6 +28,14 @@
28
28
  "./reference/native": {
29
29
  "types": "./dist/host/reference-native-api.d.ts",
30
30
  "default": "./dist/host/reference-native-api.js"
31
+ },
32
+ "./closure/native": {
33
+ "types": "./dist/host/native/module-delivery.d.ts",
34
+ "default": "./dist/host/native/module-delivery.js"
35
+ },
36
+ "./host": {
37
+ "types": "./dist/host/index.d.ts",
38
+ "default": "./dist/host/index.js"
31
39
  }
32
40
  },
33
41
  "scripts": {
@@ -163,7 +171,40 @@
163
171
  "samples/readme/yes.json",
164
172
  "samples/readme/no.json",
165
173
  "vectors/native/readme.vector.json",
166
- "samples/engine-place/inputs/closure.json"
174
+ "samples/engine-place/inputs/closure.json",
175
+ "dist/host/native/module-delivery.d.ts",
176
+ "dist/host/native/module-closure.d.ts",
177
+ "docs/contracts/closure-delivery.md",
178
+ "docs/contracts/closure-delivery.publication.json",
179
+ "samples/module-delivery/inputs/delivery.json",
180
+ "samples/no/module-delivery/delivery.json",
181
+ "vectors/native/module-delivery.vector.json",
182
+ "dist/host/index.d.ts",
183
+ "dist/host/in-process.d.ts",
184
+ "dist/host/in-process-context.d.ts",
185
+ "dist/host/in-process-act.d.ts",
186
+ "dist/host/in-process-root.d.ts",
187
+ "dist/host/native-receiver.d.ts",
188
+ "dist/host/call-context.d.ts",
189
+ "dist/host/ports/place-act.d.ts",
190
+ "dist/host/place-act-transaction.d.ts",
191
+ "dist/host/ports/publication.d.ts",
192
+ "dist/host/root-clock-source.d.ts",
193
+ "dist/fold/claims.d.ts",
194
+ "dist/host/ports/local-act.d.ts",
195
+ "dist/host/place-clock-selection.d.ts",
196
+ "dist/host/commit-result.d.ts",
197
+ "docs/contracts/native-host.publication.json",
198
+ "samples/native-host/yes.json",
199
+ "samples/native-host/no.json",
200
+ "vectors/native/native-host.vector.json",
201
+ ".github/workflows/release.yml",
202
+ ".github/workflows/test.yml",
203
+ "CITATION.cff",
204
+ "docs/contracts/publication.inventory.json",
205
+ "docs/guide.md",
206
+ "docs/reference.md",
207
+ "docs/why.md"
167
208
  ],
168
209
  "author": "Lapxo",
169
210
  "license": "MIT",