@lapxo/bound 0.2.0 → 0.2.1

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 (225) hide show
  1. package/README.md +40 -121
  2. package/TARGET.bound +51 -23
  3. package/dist/cli/standing-result.js +4 -3
  4. package/dist/cli/verb.js +36 -3
  5. package/dist/engine/encoding.js +2 -0
  6. package/dist/engine/index.d.ts +2 -0
  7. package/dist/engine/index.js +2 -0
  8. package/dist/engine/ports.d.ts +32 -0
  9. package/dist/engine/ports.js +103 -0
  10. package/dist/host/admitted-place.js +6 -0
  11. package/dist/host/contextual-place.js +2 -2
  12. package/dist/host/io.js +2 -2
  13. package/dist/host/reference-authenticated.d.ts +12 -0
  14. package/dist/host/reference-authenticated.js +47 -31
  15. package/dist/host/reference-contracts.js +6 -0
  16. package/dist/host/reference-export.d.ts +33 -0
  17. package/dist/host/reference-export.js +81 -0
  18. package/dist/host/reference-native-api.d.ts +3 -0
  19. package/dist/host/reference-native-api.js +3 -0
  20. package/dist/host/reference-native.d.ts +21 -1
  21. package/dist/host/reference-native.js +34 -10
  22. package/dist/host/reference-profile.js +2 -1
  23. package/dist/host/reference-standing.js +18 -0
  24. package/dist/host/refusals.d.ts +14 -0
  25. package/dist/host/refusals.js +43 -0
  26. package/dist/host/signing.js +7 -1
  27. package/dist/observe/files.js +11 -1
  28. package/dist/wasm/object.js +2 -2
  29. package/docs/contracts/authenticated-reference.publication.json +2 -2
  30. package/docs/contracts/host-ports.md +23 -0
  31. package/docs/contracts/host-ports.publication.json +25 -0
  32. package/docs/contracts/native-publication.inventory.json +7 -1
  33. package/docs/contracts/optional-wasm-adapter.publication.json +1 -1
  34. package/docs/contracts/readme.publication.json +25 -0
  35. package/docs/contracts/reference-backend.md +24 -0
  36. package/docs/contracts/reference-backend.publication.json +25 -0
  37. package/docs/contracts/reference-export.md +31 -0
  38. package/docs/contracts/reference-export.publication.json +25 -0
  39. package/docs/contracts/reference-port.md +8 -1
  40. package/docs/contracts/reference-port.publication.json +1 -1
  41. package/docs/contracts/refusals.bound +94 -0
  42. package/docs/contracts/refusals.md +47 -0
  43. package/docs/contracts/refusals.publication.json +25 -0
  44. package/docs/contracts/standing.bound +9 -0
  45. package/docs/contracts/standing.md +24 -0
  46. package/docs/contracts/standing.publication.json +25 -0
  47. package/package.json +49 -4
  48. package/receipts.bound +9550 -7668
  49. package/samples/authenticated-reference/compatibility.json +306 -0
  50. package/samples/authenticated-reference/yes.json +2 -2
  51. package/samples/host-ports/no.json +16 -0
  52. package/samples/host-ports/yes.json +9 -0
  53. package/samples/readme/no.json +1 -0
  54. package/samples/readme/yes.json +1 -0
  55. package/samples/reference-backend/no.json +1 -0
  56. package/samples/reference-backend/world-fixture.json +8 -0
  57. package/samples/reference-backend/yes.json +1 -0
  58. package/samples/reference-export/no.json +5 -0
  59. package/samples/reference-export/yes.json +15 -0
  60. package/samples/reference-port/no/catalog/TARGET.bound +33 -0
  61. package/samples/reference-port/no/route-notes/TARGET.bound +33 -0
  62. package/samples/refusals/no.json +4 -0
  63. package/samples/refusals/yes.json +9 -0
  64. package/samples/standing/no.json +4 -0
  65. package/samples/standing/yes.json +21 -0
  66. package/vectors/native/authenticated-reference-formation.vector.json +55 -1
  67. package/vectors/native/authenticated-reference.vector.json +32 -396
  68. package/vectors/native/host-ports.vector.json +107 -0
  69. package/vectors/native/readme.vector.json +76 -0
  70. package/vectors/native/reference-backend.vector.json +84 -0
  71. package/vectors/native/reference-export.vector.json +78 -0
  72. package/vectors/native/refusals.vector.json +95 -0
  73. package/vectors/native/standing.vector.json +116 -0
  74. package/vectors/wasm-object.cli.json +16 -61
  75. package/dist/cli/accept.d.ts +0 -28
  76. package/dist/cli/act-result.d.ts +0 -12
  77. package/dist/cli/args.d.ts +0 -11
  78. package/dist/cli/custodian.d.ts +0 -1
  79. package/dist/cli/host.d.ts +0 -1
  80. package/dist/cli/names.d.ts +0 -25
  81. package/dist/cli/native-descendant.d.ts +0 -1
  82. package/dist/cli/native.d.ts +0 -1
  83. package/dist/cli/observe.d.ts +0 -1
  84. package/dist/cli/owner.d.ts +0 -37
  85. package/dist/cli/pass.d.ts +0 -6
  86. package/dist/cli/place.d.ts +0 -76
  87. package/dist/cli/release-result.d.ts +0 -5
  88. package/dist/cli/standing-result.d.ts +0 -5
  89. package/dist/cli/takes.d.ts +0 -30
  90. package/dist/fold/admission-history.d.ts +0 -6
  91. package/dist/fold/ceilings.d.ts +0 -24
  92. package/dist/fold/claims.d.ts +0 -29
  93. package/dist/fold/closed.d.ts +0 -15
  94. package/dist/fold/configures.d.ts +0 -4
  95. package/dist/fold/digests.d.ts +0 -29
  96. package/dist/fold/evidence.d.ts +0 -32
  97. package/dist/fold/fold-worker.d.ts +0 -1
  98. package/dist/fold/kept.d.ts +0 -29
  99. package/dist/fold/keys.d.ts +0 -17
  100. package/dist/fold/laid.d.ts +0 -17
  101. package/dist/fold/nos.d.ts +0 -8
  102. package/dist/fold/object.d.ts +0 -3
  103. package/dist/fold/observed.d.ts +0 -35
  104. package/dist/fold/opened.d.ts +0 -5
  105. package/dist/fold/own.d.ts +0 -24
  106. package/dist/fold/paid.d.ts +0 -11
  107. package/dist/fold/place-inputs.d.ts +0 -17
  108. package/dist/fold/places.d.ts +0 -24
  109. package/dist/fold/rank.d.ts +0 -3
  110. package/dist/fold/reach.d.ts +0 -18
  111. package/dist/fold/readers.d.ts +0 -47
  112. package/dist/fold/receipts.d.ts +0 -8
  113. package/dist/fold/region-declarations.d.ts +0 -2
  114. package/dist/fold/region.d.ts +0 -72
  115. package/dist/fold/release-policy.d.ts +0 -67
  116. package/dist/fold/resolved.d.ts +0 -18
  117. package/dist/fold/roles.d.ts +0 -17
  118. package/dist/fold/second.d.ts +0 -18
  119. package/dist/fold/shards.d.ts +0 -29
  120. package/dist/fold/signed.d.ts +0 -23
  121. package/dist/fold/signers.d.ts +0 -24
  122. package/dist/fold/stranger.d.ts +0 -3
  123. package/dist/fold/views.d.ts +0 -27
  124. package/dist/fold/wire.d.ts +0 -19
  125. package/dist/fold/zoom.d.ts +0 -16
  126. package/dist/host/act-cost.d.ts +0 -13
  127. package/dist/host/adapters/keys/ed25519.d.ts +0 -7
  128. package/dist/host/adapters/modules/javascript.d.ts +0 -3
  129. package/dist/host/adapters/transport/http.d.ts +0 -5
  130. package/dist/host/admitted-place.d.ts +0 -5
  131. package/dist/host/archive.d.ts +0 -11
  132. package/dist/host/capsule-process.d.ts +0 -21
  133. package/dist/host/capsule.d.ts +0 -19
  134. package/dist/host/cell-receipts.d.ts +0 -2
  135. package/dist/host/content-needed.d.ts +0 -5
  136. package/dist/host/content-store.d.ts +0 -8
  137. package/dist/host/contextual-place.d.ts +0 -59
  138. package/dist/host/digest.d.ts +0 -3
  139. package/dist/host/hash.d.ts +0 -9
  140. package/dist/host/io.d.ts +0 -11
  141. package/dist/host/lifetime.d.ts +0 -1
  142. package/dist/host/located.d.ts +0 -4
  143. package/dist/host/native/bounded-file.d.ts +0 -8
  144. package/dist/host/native/command.d.ts +0 -36
  145. package/dist/host/native/control-bridge-worker.d.ts +0 -1
  146. package/dist/host/native/control-bridge.d.ts +0 -30
  147. package/dist/host/native/control-selection.d.ts +0 -29
  148. package/dist/host/native/custody.d.ts +0 -5
  149. package/dist/host/native/deadline.d.ts +0 -12
  150. package/dist/host/native/descendants.d.ts +0 -1
  151. package/dist/host/native/generated-custodian.d.ts +0 -122
  152. package/dist/host/native/generated.d.ts +0 -217
  153. package/dist/host/native/image.d.ts +0 -36
  154. package/dist/host/native/jobs.d.ts +0 -75
  155. package/dist/host/native/loader.d.ts +0 -80
  156. package/dist/host/native/materialize.d.ts +0 -22
  157. package/dist/host/native/module-closure.d.ts +0 -27
  158. package/dist/host/native/module-syntax.d.ts +0 -8
  159. package/dist/host/native/native-binary.d.ts +0 -54
  160. package/dist/host/native/native-program.d.ts +0 -56
  161. package/dist/host/native/node-jobs.d.ts +0 -84
  162. package/dist/host/native/node-launch.d.ts +0 -72
  163. package/dist/host/native/preload.d.ts +0 -1
  164. package/dist/host/native/reading.d.ts +0 -91
  165. package/dist/host/native/receipt-environment.d.ts +0 -3
  166. package/dist/host/native/references.d.ts +0 -5
  167. package/dist/host/native/root.d.ts +0 -17
  168. package/dist/host/native/route.d.ts +0 -66
  169. package/dist/host/native/runtime.d.ts +0 -4
  170. package/dist/host/native-reader-context.d.ts +0 -3
  171. package/dist/host/objects.d.ts +0 -6
  172. package/dist/host/place-clock-selection.d.ts +0 -55
  173. package/dist/host/ports/ingress.d.ts +0 -24
  174. package/dist/host/ports/local-act.d.ts +0 -44
  175. package/dist/host/ports/place-act.d.ts +0 -46
  176. package/dist/host/ports/publication.d.ts +0 -10
  177. package/dist/host/ports/signing.d.ts +0 -31
  178. package/dist/host/ports/store.d.ts +0 -2
  179. package/dist/host/ports/transport.d.ts +0 -1
  180. package/dist/host/process-lifetime.d.ts +0 -11
  181. package/dist/host/provide.d.ts +0 -48
  182. package/dist/host/read-only.d.ts +0 -3
  183. package/dist/host/reading-closures.d.ts +0 -47
  184. package/dist/host/reading-context.d.ts +0 -29
  185. package/dist/host/reference.d.ts +0 -6
  186. package/dist/host/release.d.ts +0 -14
  187. package/dist/host/root-clock-source.d.ts +0 -85
  188. package/dist/host/selected-capsules.d.ts +0 -8
  189. package/dist/host/selected-topos.d.ts +0 -24
  190. package/dist/host/signing.d.ts +0 -3
  191. package/dist/host/source-content.d.ts +0 -12
  192. package/dist/host/timing.d.ts +0 -2
  193. package/dist/host/walk.d.ts +0 -6
  194. package/dist/judge/late.d.ts +0 -7
  195. package/dist/judge/take.d.ts +0 -59
  196. package/dist/judge/widening.d.ts +0 -1
  197. package/dist/land/act.d.ts +0 -30
  198. package/dist/land/alias.d.ts +0 -10
  199. package/dist/land/held.d.ts +0 -7
  200. package/dist/land/inert.d.ts +0 -26
  201. package/dist/land/leaving.d.ts +0 -14
  202. package/dist/land/ledger.d.ts +0 -33
  203. package/dist/land/owned.d.ts +0 -23
  204. package/dist/land/sign.d.ts +0 -15
  205. package/dist/land/standing-pin.d.ts +0 -3
  206. package/dist/land/vouched.d.ts +0 -21
  207. package/dist/land/withdraw.d.ts +0 -14
  208. package/dist/observe/files.d.ts +0 -14
  209. package/dist/observe/identity.d.ts +0 -21
  210. package/dist/observe/match.d.ts +0 -1
  211. package/dist/observe/regions.d.ts +0 -33
  212. package/dist/observe/run.d.ts +0 -31
  213. package/dist/observe/runner.d.ts +0 -20
  214. package/dist/render/capsule.d.ts +0 -24
  215. package/dist/render/field.d.ts +0 -3
  216. package/dist/render/names.d.ts +0 -3
  217. package/dist/render/open.d.ts +0 -27
  218. package/dist/render/page.d.ts +0 -3
  219. package/dist/render/receipts.d.ts +0 -3
  220. package/dist/render/shape.d.ts +0 -16
  221. package/dist/render/target.d.ts +0 -18
  222. package/dist/render/view.d.ts +0 -22
  223. package/dist/wasm/node-worker.d.ts +0 -1
  224. package/dist/wasm/object.d.ts +0 -8
  225. package/dist/wasm/worker.d.ts +0 -1
@@ -1,76 +0,0 @@
1
- import type { ReleasePolicyResult } from '../fold/release-policy.ts';
2
- import type { Fork } from '../fold/claims.ts';
3
- import type { Packed } from '../fold/region.ts';
4
- import type { OpenCell } from '../render/open.ts';
5
- import type { SecondHead } from '../fold/second.ts';
6
- import { renderTarget } from '../render/target.ts';
7
- /**
8
- * Everything the fold knows about one place of the tree, or about the whole tree: what every region is rendered from,
9
- * whether it was read back from a key already answered rather than taken again, and the middle of the last ten folds
10
- * of this place, those that had to fold apart from those that read. A region whose points are ledger lines that move
11
- * at every beat is judged when it is read and never kept: a kept fold answers for the regions whose digest is in its
12
- * key and for no others.
13
- */
14
- export interface PlaceFold {
15
- readonly release?: ReleasePolicyResult;
16
- readonly root: string;
17
- readonly store: string;
18
- readonly under?: string;
19
- readonly epoch: number;
20
- readonly standing: readonly string[];
21
- readonly claims: number;
22
- readonly forks: readonly Fork[];
23
- readonly grey: readonly string[];
24
- readonly refused: readonly string[];
25
- readonly vacuous: number;
26
- readonly demands: readonly string[];
27
- readonly paid: readonly string[];
28
- readonly missing: readonly string[];
29
- readonly history: readonly string[];
30
- readonly observed: readonly string[];
31
- readonly receiptHistory?: readonly string[];
32
- readonly ceilings: {
33
- readonly read: number;
34
- readonly total: number;
35
- readonly unread: readonly string[];
36
- readonly vacuous: readonly string[];
37
- readonly short: readonly string[];
38
- readonly over: readonly string[];
39
- };
40
- readonly orphans: readonly string[];
41
- readonly lock: number;
42
- readonly signed: ReadonlyMap<string, number>;
43
- readonly second: SecondHead;
44
- readonly effects: string;
45
- readonly costs: readonly number[];
46
- readonly landed: number;
47
- readonly kept?: boolean;
48
- readonly key: string;
49
- readonly instrument: string;
50
- readonly own: Readonly<Record<string, number>>;
51
- readonly open: readonly OpenCell[];
52
- readonly beats: {
53
- readonly kept: number;
54
- readonly folded: number;
55
- };
56
- readonly regions?: Packed;
57
- }
58
- export declare function standingOf(root: string, under?: string, told?: readonly string[]): {
59
- readonly standing: readonly string[];
60
- readonly lock: readonly string[];
61
- readonly rendered: ReturnType<typeof renderTarget>;
62
- readonly owned: readonly string[];
63
- };
64
- export declare function coneOf(root: string, entry: string, ceilings: readonly string[], descent?: readonly string[]): {
65
- readonly standing: readonly string[];
66
- readonly observed: readonly string[];
67
- readonly receiptHistory?: readonly string[];
68
- readonly own: Readonly<Record<string, number>>;
69
- readonly kept: boolean;
70
- };
71
- export declare const ownCeilings: (under?: string) => readonly string[];
72
- export declare function foldPlace(root: string, entry: string, under?: string, look?: boolean, given?: {
73
- readonly standing: ReturnType<typeof standingOf>;
74
- readonly observed?: readonly string[];
75
- readonly free?: boolean;
76
- }): PlaceFold;
@@ -1,5 +0,0 @@
1
- /** Judge an external signed approval without landing it, fetching its source,
2
- * executing a provider, or changing the release-policy verdict of the place.
3
- * The anchor is the place's key, never a key offered by the approval. */
4
- export declare function releaseApproval(lock: readonly string[], lines: readonly string[]): string;
5
- export declare function printReleaseApproval(root: string, file: string): void;
@@ -1,5 +0,0 @@
1
- /** An evidence projection, never a new authority lock. Authentication uses
2
- * the admission snapshot at each local epoch; the existing fold applies
3
- * supersessions and withdrawals across all declared classes. Storage layout
4
- * and delivery mode do not enter this public boundary. */
5
- export declare function printStandingResult(root: string): void;
@@ -1,30 +0,0 @@
1
- import { judgeTake } from '../judge/take.ts';
2
- import type { Gate } from '../judge/take.ts';
3
- export type Judged = {
4
- readonly kind: 'refused';
5
- readonly scope: string;
6
- readonly why: string;
7
- } | {
8
- readonly kind: 'owed';
9
- readonly scope: string;
10
- readonly why: string;
11
- } | {
12
- readonly kind: 'conditioned';
13
- readonly scope: string;
14
- readonly demand: string;
15
- readonly receipt: string;
16
- readonly condition: string;
17
- } | {
18
- readonly kind: 'judged';
19
- readonly scope: string;
20
- readonly demand: string;
21
- readonly locations: readonly string[];
22
- readonly before: ReadonlyMap<string, string>;
23
- readonly after: ReadonlyMap<string, string>;
24
- readonly verdict: ReturnType<typeof judgeTake>;
25
- readonly ignored: ReadonlyMap<string, number>;
26
- readonly started: number;
27
- };
28
- export declare function judgeDemand(root: string, demand: string): Judged;
29
- /** A take its batch let land: its receipt sealed with the gates the batch passed, its cone vouched, its fact landed. */
30
- export declare function landTake(root: string, one: Judged, gates: readonly Gate[]): void;
@@ -1,6 +0,0 @@
1
- import type { Signer } from '@lapxo/topos/wire';
2
- /** Local admission history only. Foreign ingress is evidence, never coverage.
3
- * The clock cutoff is meaningful for configuration; object clocks stay intact. */
4
- export declare function admissionHistoryAt(root: string, epoch: number): readonly string[];
5
- /** The existing bootstrap's public root of trust, not today's key selection. */
6
- export declare function admissionAnchor(root: string): Signer;
@@ -1,24 +0,0 @@
1
- type Side = 'short' | 'over';
2
- export interface CeilingFold {
3
- readonly read: readonly string[];
4
- readonly over: readonly {
5
- readonly ceiling: string;
6
- readonly question: string;
7
- readonly got: string;
8
- readonly side: Side;
9
- }[];
10
- readonly unread: readonly string[];
11
- readonly vacuous: readonly string[];
12
- readonly readings: ReadonlyMap<string, readonly string[]>;
13
- }
14
- export declare const answersElsewhere: (ceiling: string, own: Readonly<Record<string, number>>, under?: string, places?: ReadonlySet<string>) => boolean;
15
- export declare function foldCeilings(input: {
16
- readonly standing: readonly string[];
17
- readonly ceilings: readonly string[];
18
- readonly observed: readonly string[];
19
- readonly own: Readonly<Record<string, number>>;
20
- readonly epoch: number;
21
- readonly under?: string;
22
- readonly places?: ReadonlySet<string>;
23
- }): CeilingFold;
24
- export {};
@@ -1,29 +0,0 @@
1
- import { parse } from '@lapxo/topos/wire';
2
- export { CAPSULE, EXTENSION, LOCK, RECEIPTS } from '@lapxo/topos/wire';
3
- /** Pure syntax is retained by the exact record bytes, never by a path, epoch or
4
- * claimed digest. This does not retain admission, coverage or current grants. */
5
- export declare function parsedLine(line: string): ReturnType<typeof parse>;
6
- export declare const fieldOf: (line: string, name: string) => string;
7
- export declare const fieldsOf: (line: string) => Record<string, string>;
8
- export declare function selfName(): string;
9
- export declare function isWire(line: string): boolean;
10
- export declare const wireLinesOf: (text: string | undefined) => readonly string[];
11
- export declare const isConfig: (line: string) => boolean;
12
- export declare const sayingOf: (line: string) => string;
13
- /** One key per claim: scope, role and measure; what a line says, its envelope set aside, is one however often it landed. */
14
- export declare function claimKey(line: string): string;
15
- export interface Fork {
16
- readonly key: string;
17
- readonly lines: readonly string[];
18
- readonly state?: string;
19
- }
20
- export declare function foldClaims(lines: readonly string[], receipts?: readonly {
21
- readonly scope: string;
22
- readonly moved: readonly string[];
23
- }[], _placed?: boolean): {
24
- readonly standing: readonly string[];
25
- readonly superseded: readonly string[];
26
- readonly retracted: readonly string[];
27
- readonly forks: readonly Fork[];
28
- readonly vacuous: readonly string[];
29
- };
@@ -1,15 +0,0 @@
1
- export declare const idleCount: () => number;
2
- export declare const noteIdle: () => void;
3
- export declare const actSeconds: () => number;
4
- export declare const receiptsSeen: () => {
5
- readonly count: number;
6
- readonly ms: number;
7
- };
8
- /** File-fold identity uses public inputs; admission history stays in its separate ledger guard. */
9
- export declare function fileRegionDigest(root: string, place: string, region: string, algorithm: string, inputs?: readonly string[]): string;
10
- export declare const instrumentKept: (store: string) => string;
11
- export declare function instrumentKeep(store: string, id: string): void;
12
- export declare function receiptPlaces(root: string, store: string): readonly string[];
13
- export declare function closeReceipts(root: string, store: string, semantic?: ReadonlyMap<string, string>): Promise<readonly string[]>;
14
- /** One comparison. A place meets its receipt; the root meets when every receipt it names meets. */
15
- export declare function meets(root: string, store: string, place: string, current?: boolean, active?: readonly string[]): boolean;
@@ -1,4 +0,0 @@
1
- /** Every reads line that configures nothing is a ceiling: a bound some reading has to meet. */
2
- export declare function isCeiling(line: string): boolean;
3
- /** A demand that names no place asks nothing of the tree: it tells a render what to write, and no take pays it. */
4
- export declare function asksThePlace(line: string): boolean;
@@ -1,29 +0,0 @@
1
- export declare const algorithmCost: () => number;
2
- /**
3
- * The signature algorithms this tree admits, and the one it signs with now: each carries its era after its name, the
4
- * wire's `era` line names the one that is current, and every other is history, read and never written again. A wire
5
- * that names no era signs with the one that carries a digest, which is how the first era was named.
6
- */
7
- export declare function signaturesOf(store: string, told?: readonly string[]): {
8
- readonly admitted: readonly string[];
9
- readonly era: string;
10
- };
11
- export declare function eraOf(standing: readonly string[]): {
12
- readonly admitted: readonly string[];
13
- readonly era: string;
14
- };
15
- export declare const bytesDigest: (store: string, bytes: Uint8Array) => string;
16
- export declare const fullDigest: (store: string, input: string | readonly string[]) => string;
17
- export declare function coordinateDigest(store: string, at: string): string | undefined;
18
- export declare function memoized(store: string, key: string, compute: () => string): string;
19
- /**
20
- * The digest of the instrument itself: the entry module and everything it imports, by their bytes, and the source of
21
- * every region its lock says it depends on, followed as far as those regions depend — code it runs as much as its own.
22
- * A region its own lock names a release for, laid where it needs it, is that release by digest: what it runs, never a
23
- * sibling rebuilt beside it.
24
- * A fold is a function of its points and the instrument is one of them, so a fold kept by another bound is another
25
- * origin's fold — readable as history, never as this instrument's own state.
26
- */
27
- export declare function instrumentOf(store: string, entry: string, standing?: readonly string[], root?: string, releases?: readonly string[]): string;
28
- export declare function instrumentDigest(store: string, entry: string, standing?: readonly string[], root?: string, releases?: readonly string[]): string;
29
- export declare function instrumentCoordinates(store: string, entry: string, standing?: readonly string[], root?: string, releases?: readonly string[], fresh?: boolean): ReadonlyMap<string, string>;
@@ -1,32 +0,0 @@
1
- import type { VerdictObservation } from '@lapxo/topos/authority';
2
- /** The instrument maps an abstract relation to its declared snapshot vocabulary. Topos has no actor or origin policy. */
3
- export interface SnapshotInput {
4
- readonly declared: boolean;
5
- readonly expected: {
6
- readonly set?: string;
7
- readonly standing: string;
8
- readonly epoch: number;
9
- };
10
- readonly statement?: {
11
- readonly admitted: boolean;
12
- readonly set: string;
13
- readonly standing: string;
14
- readonly epoch: number;
15
- };
16
- readonly priorDisagreement?: boolean;
17
- readonly comparison?: {
18
- readonly admitted: boolean;
19
- readonly set: string;
20
- readonly verdict: 'agrees' | 'forks';
21
- readonly epoch: number;
22
- };
23
- }
24
- export declare function snapshotVerdict(input: SnapshotInput): {
25
- verdict: "none" | "grey" | "stale" | "agrees" | "forks";
26
- external: boolean;
27
- epoch: number;
28
- };
29
- /** This selector belongs to the instrument, not the SDK's abstract evidence contract. */
30
- export declare function attestationObservations(configuration: readonly Readonly<Record<string, string>>[], result: {
31
- readonly verdict: string;
32
- }): readonly VerdictObservation[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,29 +0,0 @@
1
- import type { PlaceFold } from '../cli/place.ts';
2
- /**
3
- * The points a fold folds: each coordinate the place holds at the digest its readers last read it, with what they said of
4
- * it there, the lines that stand, and the receipts the store keeps. A coordinate is never a digest it had before nor a coordinate
5
- * of another place, so an edit elsewhere moves nothing here; and a reader is what it said, so a reader edit that says
6
- * the same moves nothing either. A fold is a function of these points, so a fold that was not found is never a
7
- * mystery — what moved is the difference between the points kept beside the last one and the points there are now.
8
- */
9
- export type PlaceReads = {
10
- readonly owned: readonly string[];
11
- readonly scopes: ReadonlySet<string>;
12
- readonly place: string;
13
- };
14
- export declare function foldPoints(store: string, standing: readonly string[], under: string | undefined, keeper?: string, instrument?: string, observed?: readonly string[], root?: string, answered?: ReadonlyMap<string, string>, reads?: PlaceReads): readonly string[];
15
- /**
16
- * What a reader said at one digest, as one digest: every point of a fold that stands for an answer is this. The writer
17
- * whose class the lock names live is judged when read, so a fold keeps what it said — which lines it found standing and
18
- * which ledger it folded — and not when.
19
- */
20
- export declare const saidDigest: (store: string, lines: readonly string[]) => string;
21
- export declare function movedPoints(store: string, now: readonly string[], key: string): {
22
- readonly gone: readonly string[];
23
- readonly came: readonly string[];
24
- } | undefined;
25
- export declare const foldsElsewhere: () => number;
26
- export declare function keptPlace(store: string, under?: string, currentInstrument?: string): PlaceFold | undefined;
27
- export declare const keptRender: (store: string, key: string, name: string) => string | undefined;
28
- export declare const keepRender: (store: string, _signer: string, key: string, name: string, _epoch: number, text_: string) => void;
29
- export declare function keepFold(store: string, key: string, fold: PlaceFold, points: readonly string[], instrument?: string): void;
@@ -1,17 +0,0 @@
1
- /**
2
- * Whose lines carry a class of writing, as the lock says it. Every ledger the store keeps is read, the key claims
3
- * folded, and the class answered with the id the lock admitted first for it: no module here holds a signer's name, so
4
- * the day another head runs the same work its lines come out under its own name without a letter changing.
5
- */
6
- export declare const keyOf: (store: string, kind: string, told?: readonly string[]) => string | undefined;
7
- export declare function keyFor(store: string, kind: string, told?: readonly string[]): string;
8
- export declare function lockSigners(store: string, told?: readonly string[]): readonly string[];
9
- export declare function lockLines(store: string): readonly string[];
10
- /** What stands of the lock, folded once per landing of any of its ledgers: lockLines is the bytes, lockSigners the ids that write them, signedLockLines the same lines still carrying their signatures. */
11
- export declare function lockStanding(store: string): readonly string[];
12
- export declare function signedLockLines(store: string, told?: readonly string[]): string[];
13
- /**
14
- * A release's lock, where the store signs no key of its own: the lock as it was laid is the place's only lines, read
15
- * and never written. What it says is true where a pin names the release; no ledger is made of it.
16
- */
17
- export declare function releaseOf(store: string): readonly string[] | undefined;
@@ -1,17 +0,0 @@
1
- /**
2
- * A release is named by the digest of its folder, and what is laid is read again from its bytes by the same method: every
3
- * coordinate but those the tree's roles call foreign, a dotted one only where the folder's own lock writes into it, sorted, each a
4
- * ustar entry of mode 0644, owner 0 and time 0, then two empty blocks, gzipped at level nine. The mark the host writes is
5
- * none of those coordinates, so the digest of a place is the digest of the release laid there, or it is not that release.
6
- */
7
- export declare function releaseDigest(store: string, place: string): {
8
- readonly state: string;
9
- readonly digest: string;
10
- };
11
- /**
12
- * What the pass lands after it lays: for each release the own lock lays where it needs it, the digest its bytes give, by
13
- * the stamps of the bytes it read. What is read is the receipt of the bytes as they lie now: none is a count, and one
14
- * whose digest is not the one the lock names is a count.
15
- */
16
- export declare function landLaid(store: string, own: string, lock: readonly string[], folder: string | undefined): void;
17
- export declare const laidDiffers: (store: string, own: string, lock: readonly string[], folder: string | undefined) => number;
@@ -1,8 +0,0 @@
1
- /**
2
- * A bug found lands as a no of the law it broke. From the epoch the lock asks for it on — the next one while no line
3
- * asks yet, the epoch an accept would sign it at — every law of the place a witness names, a demand or a ceiling, holds
4
- * its bug in a no: a need under the wire's sample family /<area>/no/, or a no of the place named after the law. What this
5
- * counts is each law witnessed since then that holds none. When the lock lists no sample family, every such law is a
6
- * demand: the folder is not guessed.
7
- */
8
- export declare function bugsWithoutANo(root: string, store: string, standing: readonly string[], place: string, measure: string): number;
@@ -1,3 +0,0 @@
1
- /** Compatibility path; the engine owns the single object projection. */
2
- export { objectFold } from '../engine/index.ts';
3
- export type { ObjectReading } from '../engine/index.ts';
@@ -1,35 +0,0 @@
1
- export declare const cased: (question: string) => boolean;
2
- export declare function isReaderLock(line: string): boolean;
3
- export declare function readerModules(store: string): readonly string[];
4
- type Placed = {
5
- readonly question: string;
6
- readonly measure: string;
7
- readonly value: string;
8
- readonly place: string;
9
- readonly by: string;
10
- readonly at: string;
11
- };
12
- export declare function placedReadings(observed: readonly string[]): readonly Placed[];
13
- export declare function casesHeld(observed: readonly string[]): number;
14
- export declare const readersBehind: () => readonly {
15
- readonly module: string;
16
- readonly places: number;
17
- }[];
18
- export declare const readerRefusals: () => readonly string[];
19
- export declare function readerLines(store: string): readonly string[];
20
- /**
21
- * A reader never blocks a fold that did not ask to wait: what it read before is served at once, and a reader whose
22
- * identity is new, or whose places moved, is grey by name and runs behind the fold. A fold that judges waits. A fold
23
- * that reaches only some regions observes only those, and a place with no reader reads what it carries.
24
- */
25
- export declare const carriesOnly: (root: string, store: string) => boolean;
26
- /** A reader whose `needs` meet the reach runs, wherever its module lives. The module path is not the region it reads. */
27
- export declare function readerReaches(reach: readonly string[] | undefined, where: readonly string[]): boolean;
28
- export declare function observedClaims(root: string, store: string, options?: {
29
- readonly wait?: boolean;
30
- readonly only?: string;
31
- readonly reach?: readonly string[];
32
- readonly answered?: Map<string, string>;
33
- readonly selected?: string;
34
- }): readonly string[];
35
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * What one landed line opens inside its place: a region whose reads cover the line's scope, a view whose shape covers
3
- * it, and the scope's own tail. Every other region stays on its receipt at one step.
4
- */
5
- export declare function openedBy(places: readonly string[], standing: readonly string[], lines: readonly string[]): readonly string[];
@@ -1,24 +0,0 @@
1
- import type { CoordinateRole } from './wire.ts';
2
- type RoleOf = (coordinate: string) => CoordinateRole;
3
- export declare const outsideTheirCapsule: (root: string, standing: readonly string[], lines: readonly string[]) => readonly string[];
4
- /**
5
- * What the instrument reads of itself rather than through a reader: how many programs its source opens, how many
6
- * signed lines stand unadmitted, how many stores it keeps, which of the modules it runs are no source, how many samples
7
- * nothing names, how many alphabets are spelled both in code and in the lock, and how many regions it writes that no
8
- * line of the lock describes, how many bodies are written twice anywhere in the tree rather than once and used by
9
- * digest, and whether the version a package carries is the one the lock names. Inside one package, only what lies
10
- * there. A cost is read now and never read back from the fold it was taken with: a beat is a line of the ledger.
11
- */
12
- export declare function costReadings(store: string, standing: readonly string[], under?: string): Readonly<Record<string, number>>;
13
- export declare function ownReadings(input: {
14
- readonly root: string;
15
- readonly store: string;
16
- readonly entry: string;
17
- readonly roleOf: RoleOf;
18
- readonly standing: readonly string[];
19
- readonly observed: readonly string[];
20
- readonly unadmitted: number;
21
- readonly orphans: number;
22
- readonly under?: string;
23
- }): Readonly<Record<string, number>>;
24
- export {};
@@ -1,11 +0,0 @@
1
- import { state } from '@lapxo/obligations/views/field';
2
- import type { PlaceFold } from '../cli/place.ts';
3
- /** Where a case lies: a demand is judged only over a cone that holds one, by a take or read from a landed cone alike. */
4
- export declare const holdsCases: (location: string) => boolean;
5
- export declare function paidOf(store: string, demands: readonly string[], observed: readonly string[], views: string): {
6
- readonly paid: readonly string[];
7
- readonly missing: readonly string[];
8
- readonly answered: ReadonlySet<string>;
9
- };
10
- export type Verdict = ReturnType<typeof state>;
11
- export declare const verdictsFor: (fold: PlaceFold) => Readonly<Record<string, Verdict>>;
@@ -1,17 +0,0 @@
1
- import { type View } from '../fold/views.ts';
2
- import type { PlaceFold } from '../cli/place.ts';
3
- /**
4
- * A place seen from inside it: the wire and the keys it is read with, the regions it is written in, and every line of
5
- * the place — its manifest, its build, its pages, its prose, its own ceilings and every line a view of it reads. Nothing
6
- * of the tree's history, and nothing the instrument keeps for itself, crosses; a need outside the place is left behind.
7
- * A capsule renders a place from these lines, in the tree as in the place published alone, so both write one coordinate; the
8
- * lock a place is rendered with is these lines as target lines its first land signs at epoch one, the bootstrap first.
9
- * A view is the place's own: a line of it that names coordinates is taken when one of them is a coordinate of the place, and a
10
- * line that names none where its view names this place or no place at all, or at a world that holds no line of a view
11
- * the views/world list names. A line another published place leads is taken only by its needs.
12
- */
13
- export declare function takenFor(held: readonly string[], under: string, world?: {
14
- readonly own: readonly string[];
15
- readonly tree: ReadonlyMap<string, View>;
16
- }): (line: string) => boolean;
17
- export declare function placeLines(fold: Pick<PlaceFold, 'root' | 'standing' | 'under'>): readonly string[];
@@ -1,24 +0,0 @@
1
- type Spoken = {
2
- readonly place: string;
3
- readonly line: string;
4
- };
5
- /** A dependency's lock describes the dependency, never a child of its host.
6
- * Retiring a mount does not turn its retained bytes into local declarations. */
7
- export declare function mountedCoordinatesIn(root: string, history?: readonly string[]): readonly string[];
8
- export declare function localDirectoriesIn(root: string, history?: readonly string[]): readonly string[];
9
- export declare function placesIn(root: string, history?: readonly string[]): readonly string[];
10
- /** A directory with no own lock is founded by the root: a line of its region family names the directory's coordinates, and a covered batch that names the place lands its first own lock. */
11
- export declare const foundableIn: (root: string, standing: readonly string[], family: string, name: string) => boolean;
12
- export declare const capsuleAt: (root: string, name: string) => boolean;
13
- /** A world is a place whose own lock names capsule/key. A view named by wire/views/world resolves into these and no other place. */
14
- export declare const worldAt: (root: string, name: string) => boolean;
15
- export declare const worldsIn: (root: string) => readonly string[];
16
- export declare function kindsOf(root: string, place: string): readonly string[];
17
- type ClassDefault = {
18
- readonly classes: readonly string[];
19
- readonly line: string;
20
- };
21
- export declare function classDefaults(root: string): readonly ClassDefault[];
22
- export declare const fromPlace: (place: string, places: readonly string[]) => (path: string) => string;
23
- export declare function spoken(root: string): readonly Spoken[];
24
- export {};
@@ -1,3 +0,0 @@
1
- import type { PlaceFold } from '../cli/place.ts';
2
- /** What rests on a signed line: the rank of a signature is the lines that would move with it and nothing else. */
3
- export declare function rankLines(fold: PlaceFold): readonly string[];
@@ -1,18 +0,0 @@
1
- import type { Capsule } from '../host/capsule.ts';
2
- export declare const placedAt: (places: readonly string[], line: string) => string | undefined;
3
- export declare function touchedBy(root: string, places: readonly string[], lines: readonly string[], standing: readonly string[]): readonly string[];
4
- /** A selected world can execute only its explicit capsule offers. Dependency aliases are host projections, not selections. */
5
- export declare const selectionLines: (fold: {
6
- readonly root: string;
7
- readonly standing: readonly string[];
8
- readonly under?: string;
9
- }) => readonly string[];
10
- export declare const projectionLines: (fold: {
11
- readonly root: string;
12
- readonly standing: readonly string[];
13
- readonly under?: string;
14
- }) => readonly string[];
15
- export declare function capsulesFor(standing: readonly string[], place: string, root?: string): readonly {
16
- readonly capsule: Capsule;
17
- readonly offer: string;
18
- }[];
@@ -1,47 +0,0 @@
1
- import type { Capsule } from '../host/capsule.ts';
2
- import type { CoordinateRole } from './wire.ts';
3
- import { capsulesFor } from './reach.ts';
4
- import type { Kind } from '../observe/run.ts';
5
- export interface ReaderClaim {
6
- readonly id: string;
7
- readonly shape: readonly string[];
8
- readonly where: readonly string[];
9
- readonly module: string;
10
- readonly kind: Kind;
11
- readonly capsule?: {
12
- readonly selected?: Capsule;
13
- readonly digest: string;
14
- readonly entry: string;
15
- readonly region: string;
16
- readonly reads: readonly string[];
17
- readonly globs: ReadonlyMap<string, readonly string[]>;
18
- };
19
- }
20
- export type Offer = {
21
- readonly place: string;
22
- readonly seen: string;
23
- readonly bytes: () => Uint8Array;
24
- readonly digest?: () => string;
25
- };
26
- export type Look = {
27
- readonly under: (dir: string, pruned: boolean) => readonly string[];
28
- readonly stamp: (at: string) => string;
29
- };
30
- export declare function lookOf(root: string, roleOf: (coordinate: string) => CoordinateRole): Look;
31
- /**
32
- * The reader regions of the capsules a place can run, where the place's own lock offers them or, at a world, the wire's offers/world list does for a
33
- * region its own lock does not name: each selected capsule that writes a declared region reads the coordinates
34
- * it declares among the place's offered coordinates. Selection identifies attribution, never independence.
35
- * An existing reader suppresses only that same selected provider, region and place; an ambiguous legacy
36
- * owner refuses instead of hiding another provider or invoking the same provider twice.
37
- * A newly declared region does not need a retired reader in private history to be observed.
38
- */
39
- export declare function capsuleReadersOf(root: string, store: string, standing: readonly string[], lines: readonly ReaderClaim[], resolve?: typeof capsulesFor): readonly ReaderClaim[];
40
- export declare function handedAt(root: string, reader: ReaderClaim, roleOf: (coordinate: string) => CoordinateRole, look: Look, place: string): readonly string[];
41
- /**
42
- * What a reader is offered at the places it reads: a coordinate for a reader of coordinates, the listing for one that reads a
43
- * directory, and for one that runs over its place its sources and every coordinate its shape names besides — a coordinate a view
44
- * writes from what readers said is offered only when named, so no reading moves its own offer — each by the stamp it
45
- * was seen at and the bytes that key what it said; a capsule reader is offered the coordinates it is handed.
46
- */
47
- export declare function offersOf(root: string, store: string, reader: ReaderClaim, roleOf: (coordinate: string) => CoordinateRole, look: Look, into: (where: string) => boolean): readonly Offer[];
@@ -1,8 +0,0 @@
1
- /** A receipt as the fold sees it: the scope it paid and the coordinates it moved. */
2
- interface Receipt {
3
- readonly scope: string;
4
- readonly digest: string;
5
- readonly moved: readonly string[];
6
- }
7
- export declare function receiptsIn(store: string, scopes?: readonly string[]): readonly Receipt[];
8
- export {};
@@ -1,2 +0,0 @@
1
- /** Region input selectors consumed by the host, rather than measured ceilings. */
2
- export declare function isRegionDeclaration(line: string, wire: readonly string[]): boolean;