@lapxo/bound 0.1.8 → 0.1.9
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 +56 -20
- package/TARGET.bound +25 -25
- package/dist/cli/accept.js +83 -59
- package/dist/cli/act-result.d.ts +9 -0
- package/dist/cli/act-result.js +68 -13
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.js +5 -2
- package/dist/cli/custodian.d.ts +1 -0
- package/dist/cli/custodian.js +29 -0
- package/dist/cli/native-descendant.d.ts +1 -0
- package/dist/cli/native-descendant.js +19 -0
- package/dist/cli/native.d.ts +1 -0
- package/dist/cli/native.js +60 -0
- package/dist/cli/observe.js +9 -2
- package/dist/cli/pass.js +6 -1
- package/dist/cli/standing-result.js +7 -26
- package/dist/cli/verb.js +24 -5
- package/dist/fold/admission-history.js +2 -2
- package/dist/fold/claims.d.ts +4 -0
- package/dist/fold/claims.js +23 -3
- package/dist/fold/closed.d.ts +1 -1
- package/dist/fold/closed.js +16 -4
- package/dist/fold/digests.d.ts +1 -1
- package/dist/fold/digests.js +3 -2
- package/dist/fold/evidence.d.ts +1 -1
- package/dist/fold/kept.js +2 -1
- package/dist/fold/observed.d.ts +1 -0
- package/dist/fold/observed.js +54 -9
- package/dist/fold/readers.d.ts +4 -3
- package/dist/fold/readers.js +18 -13
- package/dist/fold/resolved.js +11 -1
- package/dist/fold/signers.js +2 -2
- package/dist/host/adapters/modules/javascript.d.ts +2 -0
- package/dist/host/adapters/modules/javascript.js +8 -6
- package/dist/host/admitted-place.d.ts +5 -0
- package/dist/host/admitted-place.js +54 -0
- package/dist/host/capsule-process.d.ts +1 -1
- package/dist/host/capsule-process.js +4 -1
- package/dist/host/capsule.d.ts +4 -0
- package/dist/host/capsule.js +16 -2
- package/dist/host/contextual-place.d.ts +59 -0
- package/dist/host/contextual-place.js +77 -0
- package/dist/host/hash.d.ts +7 -0
- package/dist/host/hash.js +6 -0
- package/dist/host/io.d.ts +2 -0
- package/dist/host/io.js +2 -0
- package/dist/host/lifetime.js +61 -22
- package/dist/host/native/bounded-file.d.ts +8 -0
- package/dist/host/native/bounded-file.js +32 -0
- package/dist/host/native/command.d.ts +36 -0
- package/dist/host/native/command.js +91 -0
- package/dist/host/native/control-bridge-worker.d.ts +1 -0
- package/dist/host/native/control-bridge-worker.js +88 -0
- package/dist/host/native/control-bridge.d.ts +30 -0
- package/dist/host/native/control-bridge.js +110 -0
- package/dist/host/native/control-selection.d.ts +29 -0
- package/dist/host/native/control-selection.js +32 -0
- package/dist/host/native/custody.d.ts +5 -0
- package/dist/host/native/custody.js +91 -0
- package/dist/host/native/deadline.d.ts +12 -0
- package/dist/host/native/deadline.js +28 -0
- package/dist/host/native/descendants.d.ts +1 -0
- package/dist/host/native/descendants.js +528 -0
- package/dist/host/native/generated-custodian.d.ts +122 -0
- package/dist/host/native/generated-custodian.js +267 -0
- package/dist/host/native/generated.d.ts +217 -0
- package/dist/host/native/generated.js +379 -0
- package/dist/host/native/image.d.ts +36 -0
- package/dist/host/native/image.js +45 -0
- package/dist/host/native/jobs.d.ts +75 -0
- package/dist/host/native/jobs.js +148 -0
- package/dist/host/native/loader.d.ts +80 -0
- package/dist/host/native/loader.js +269 -0
- package/dist/host/native/materialize.d.ts +22 -0
- package/dist/host/native/materialize.js +175 -0
- package/dist/host/native/module-closure.d.ts +27 -0
- package/dist/host/native/module-closure.js +99 -0
- package/dist/host/native/module-syntax.d.ts +8 -0
- package/dist/host/native/module-syntax.js +63 -0
- package/dist/host/native/native-binary.d.ts +54 -0
- package/dist/host/native/native-binary.js +115 -0
- package/dist/host/native/native-program.d.ts +56 -0
- package/dist/host/native/native-program.js +72 -0
- package/dist/host/native/node-jobs.d.ts +84 -0
- package/dist/host/native/node-jobs.js +187 -0
- package/dist/host/native/node-launch.d.ts +72 -0
- package/dist/host/native/node-launch.js +159 -0
- package/dist/host/native/preload.d.ts +1 -0
- package/dist/host/native/preload.js +45 -0
- package/dist/host/native/reading.d.ts +91 -0
- package/dist/host/native/reading.js +249 -0
- package/dist/host/native/receipt-environment.d.ts +3 -0
- package/dist/host/native/receipt-environment.js +41 -0
- package/dist/host/native/references.d.ts +5 -0
- package/dist/host/native/references.js +30 -0
- package/dist/host/native/root.d.ts +17 -0
- package/dist/host/native/root.js +37 -0
- package/dist/host/native/route.d.ts +66 -0
- package/dist/host/native/route.js +216 -0
- package/dist/host/native/runtime.d.ts +4 -0
- package/dist/host/native/runtime.js +9 -0
- package/dist/host/native-reader-context.d.ts +3 -0
- package/dist/host/native-reader-context.js +8 -0
- package/dist/host/place-clock-selection.d.ts +55 -0
- package/dist/host/place-clock-selection.js +124 -0
- package/dist/host/ports/local-act.d.ts +10 -0
- package/dist/host/ports/local-act.js +78 -6
- package/dist/host/ports/place-act.d.ts +46 -0
- package/dist/host/ports/place-act.js +169 -0
- package/dist/host/process-lifetime.js +8 -3
- package/dist/host/provide.d.ts +25 -0
- package/dist/host/provide.js +115 -13
- package/dist/host/reading-closures.d.ts +15 -1
- package/dist/host/reading-closures.js +88 -6
- package/dist/host/reading-context.d.ts +29 -0
- package/dist/host/reading-context.js +53 -0
- package/dist/host/root-clock-source.d.ts +85 -0
- package/dist/host/root-clock-source.js +305 -0
- package/dist/host/selected-capsules.js +3 -2
- package/dist/land/act.d.ts +26 -0
- package/dist/land/act.js +96 -3
- package/dist/land/ledger.d.ts +4 -0
- package/dist/land/ledger.js +20 -2
- package/dist/observe/runner.d.ts +4 -0
- package/dist/observe/runner.js +9 -2
- package/docs/contracts/cli.md +13 -0
- package/package.json +2 -2
- package/receipts.bound +296 -256
package/dist/land/ledger.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export declare function ledgerLines(store: string, writer: string): readonly str
|
|
|
11
11
|
export declare function shardFile(store: string, writer: string, region: string): string;
|
|
12
12
|
export declare const shardLines: (store: string, writer: string, region: string) => readonly string[];
|
|
13
13
|
export declare function ledgerWriters(store: string): readonly string[];
|
|
14
|
+
/** One synchronous root-history read, not a retained authority snapshot.
|
|
15
|
+
* Preserve writer order and each writer's legacy-before-committed ordering.
|
|
16
|
+
* Every call rereads the complete committed inventory exactly once. */
|
|
17
|
+
export declare function rootLedgerLines(store: string): readonly string[];
|
|
14
18
|
export declare function landShard(store: string, writer: string, region: string, lines: readonly string[]): number;
|
|
15
19
|
export declare function signedLines(store: string, writer: string): string[];
|
|
16
20
|
export declare function blobAt(store: string, digest: string): string;
|
package/dist/land/ledger.js
CHANGED
|
@@ -40,12 +40,30 @@ function journalLines(store, writer, place, legacy) {
|
|
|
40
40
|
journalMemo.set(key, lines);
|
|
41
41
|
return lines;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
function legacyWriters(store) {
|
|
44
44
|
const at = join(store, 'ledger');
|
|
45
|
-
|
|
45
|
+
return existsSync(at) ? readdirSync(at).filter(name => name.endsWith(EXTENSION)).map(name => name.slice(0, -EXTENSION.length)) : [];
|
|
46
|
+
}
|
|
47
|
+
export function ledgerWriters(store) {
|
|
48
|
+
const legacy = legacyWriters(store);
|
|
46
49
|
const committed = committedLocalActs(store).flatMap(act => act.bundle.placements?.filter(p => p.place === '.').flatMap(p => actLines(p.records).map(line => fieldOf(line, 'by'))) ?? []);
|
|
47
50
|
return [...new Set([...legacy, ...committed])];
|
|
48
51
|
}
|
|
52
|
+
/** One synchronous root-history read, not a retained authority snapshot.
|
|
53
|
+
* Preserve writer order and each writer's legacy-before-committed ordering.
|
|
54
|
+
* Every call rereads the complete committed inventory exactly once. */
|
|
55
|
+
export function rootLedgerLines(store) {
|
|
56
|
+
const legacy = legacyWriters(store), acts = committedLocalActs(store);
|
|
57
|
+
const fresh = acts.flatMap(act => act.bundle.placements?.filter(p => p.place === '.').flatMap(p => actLines(p.records)) ?? []);
|
|
58
|
+
const writers = [...new Set([...legacy, ...fresh.map(line => fieldOf(line, 'by'))])];
|
|
59
|
+
return writers.flatMap(writer => {
|
|
60
|
+
// Authority-history identity needs actual bytes. A writer's size and mtime
|
|
61
|
+
// cannot distinguish a same-size edit or stand in for an admission proof.
|
|
62
|
+
const at = writerFile(store, writer), prior = existsSync(at) ? readFileSync(at, 'utf8').split('\n').filter(line => line.startsWith(PROTOCOL)) : [];
|
|
63
|
+
const committed = fresh.filter(line => fieldOf(line, 'by') === writer);
|
|
64
|
+
return committed.length ? [...new Set([...prior, ...committed])] : prior;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
49
67
|
export function landShard(store, writer, region, lines) {
|
|
50
68
|
return appendNew(shardFile(store, writer, region), lines);
|
|
51
69
|
}
|
package/dist/observe/runner.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const ownRoot: () => string;
|
|
2
|
+
/** A published instrument carries its own content store even before any ledger
|
|
3
|
+
* exists. Public-lock recognition grants no authority; legacy signed delivery
|
|
4
|
+
* trees retain their historical colocated-ledger or sibling-store layout. */
|
|
5
|
+
export declare function instrumentStoreAt(root: string): string;
|
|
2
6
|
export declare const ownStore: () => string;
|
|
3
7
|
export declare const ownLock: () => readonly string[];
|
|
4
8
|
export declare const sourceOf: () => string;
|
package/dist/observe/runner.js
CHANGED
|
@@ -21,8 +21,15 @@ const moduleAt = fromBlob() ? undefined : fileURLToPath(import.meta.url);
|
|
|
21
21
|
const runtimeAt = moduleAt === undefined ? '' : resolve(dirname(moduleAt), '..');
|
|
22
22
|
const runtimeExtension = moduleAt === undefined ? '' : extname(moduleAt);
|
|
23
23
|
export const ownRoot = () => (fromBlob() ? join(resolve(dirname(self()), '..', '..', '..'), 'bound') : resolve(runtimeAt, '..'));
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/** A published instrument carries its own content store even before any ledger
|
|
25
|
+
* exists. Public-lock recognition grants no authority; legacy signed delivery
|
|
26
|
+
* trees retain their historical colocated-ledger or sibling-store layout. */
|
|
27
|
+
export function instrumentStoreAt(root) {
|
|
28
|
+
const lines = (observeText(join(root, LOCK)) ?? '').split('\n').filter(isWire);
|
|
29
|
+
const published = lines.length > 0 && publicLock(lines) !== undefined;
|
|
30
|
+
return published || existsSync(join(root, EXTENSION, 'ledger')) ? join(root, EXTENSION) : join(root, '..', EXTENSION);
|
|
31
|
+
}
|
|
32
|
+
export const ownStore = () => instrumentStoreAt(ownRoot());
|
|
26
33
|
/** The colocated public artifact is read without an unrelated parent's authority store. */
|
|
27
34
|
// An act is judged by the instrument it started with, even when that act changes its colocated lock.
|
|
28
35
|
let instrumentLock;
|
package/docs/contracts/cli.md
CHANGED
|
@@ -25,3 +25,16 @@ The query verifies the record signatures and coverage against the authority snap
|
|
|
25
25
|
## Standing admission
|
|
26
26
|
|
|
27
27
|
A uses/ selection admits canonical standing bytes, never an archive. The bytes must already be held under their verified digest or in the single local coordinate explicitly named by needs. Admission checks identity and canonical form without fetching, executing or writing the content store. Missing or corrupt bytes refuse the whole lot. A corrupt held copy cannot be hidden by another source. Archives remain separate dependency declarations.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Declared reading identity
|
|
31
|
+
|
|
32
|
+
A place selects both `wire/reading-context value=reading-context@1` and `wire/reading-receipt value=reading-receipt@1`. Partial or conflicting selections refuse. Every reader under this profile declares an input projection; a legacy reader is refused by name instead of receiving a new identity without its closure.
|
|
33
|
+
|
|
34
|
+
The host commits the full instrument reference, the verified capsule implementation, effective reader policy, declared transitive references, each input's actual bytes and dependent receipt identities. The process environment is captured explicitly: inherited variable values (hashed, never printed), the place working directory, child flags, runtime bytes and platform conditions. The same captured boundary is handed to execution and keys the capsule cache. These references grant neither authority nor independence and cannot prove undeclared inputs absent.
|
|
35
|
+
|
|
36
|
+
An unchanged cross-process fold reads retained receipts with zero opened readings. Changed input reopens that reading and its dependents; changing shared implementation, policy or execution conditions invalidates the readings that depend on them. The semantic receipt names the reading and result together; elapsed time and signature envelopes remain separate. Old receipts are not promoted.
|
|
37
|
+
|
|
38
|
+
Retained evidence may be inspected without asserting a current response. Reusing a current response also requires the existing snapshot-access contract: matching principal, authorization, request, implementation and snapshot, declared freshness, and both inspection and reuse permission. Unknown or expired freshness, withdrawn permission or changed context refuse before running a provider. A new observation needs its own admitted act.
|
|
39
|
+
|
|
40
|
+
`fold --check` verifies the retained published evidence and instrument. It opens no reader and grants no permission to assert an old response today. A live fold additionally compares the current captured execution boundary.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lapxo/bound",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@lapxo/obligations": "0.3.5",
|
|
36
|
-
"@lapxo/topos": "0.1.
|
|
36
|
+
"@lapxo/topos": "^0.1.17",
|
|
37
37
|
"acorn": "8.19.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|