@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,31 +0,0 @@
1
- /** Contains only host-controlled diagnostics, never child output. */
2
- export declare class SigningFailure extends Error {
3
- }
4
- export interface SigningLot {
5
- readonly bytes: readonly string[];
6
- readonly keyId: string;
7
- readonly algorithm: string;
8
- }
9
- export interface SignatureRecord {
10
- readonly keyId: string;
11
- readonly signature: string;
12
- }
13
- export interface SigningProtocol {
14
- readonly request: (lot: SigningLot) => string;
15
- readonly response: (records: readonly SignatureRecord[]) => string;
16
- readonly reply: (text: string, lot: SigningLot) => readonly SignatureRecord[];
17
- }
18
- export type SigningMechanism = {
19
- readonly kind: 'file';
20
- readonly path: string;
21
- } | {
22
- readonly kind: 'command';
23
- readonly executable: string;
24
- readonly args: readonly string[];
25
- };
26
- export interface SigningLimits {
27
- readonly timeoutMs: number;
28
- readonly responseBytes: number;
29
- }
30
- /** Host-approved mechanism only. Repository declarations do not authorize execution. */
31
- export declare function invokeSigner(lot: SigningLot, mechanism: SigningMechanism, protocol: SigningProtocol, limits: SigningLimits): Promise<readonly SignatureRecord[]>;
@@ -1,2 +0,0 @@
1
- export declare function storeRoot(from: string): string;
2
- export declare const storeDirs: (store: string) => number;
@@ -1 +0,0 @@
1
- export declare function transportBytes(location: string, digest: string, lines: readonly string[]): Promise<Uint8Array>;
@@ -1,11 +0,0 @@
1
- import type { ReaderLifetime } from '@lapxo/topos/wire';
2
- export interface ProcessResult {
3
- readonly stdout: string;
4
- readonly stdoutBytes?: string;
5
- readonly stderr: string;
6
- readonly status: number | null;
7
- readonly signal: NodeJS.Signals | null;
8
- readonly failure?: string;
9
- }
10
- /** A synchronous fold waits on a supervising host process; the supervisor owns cancellation of its child group. */
11
- export declare function boundedProcess(command: string, args: readonly string[], input: string, limits: ReaderLifetime, cwd?: string, env?: Readonly<Record<string, string>>): ProcessResult;
@@ -1,48 +0,0 @@
1
- interface ResolveContext {
2
- parentURL?: string;
3
- }
4
- interface ResolveResult {
5
- url: string;
6
- }
7
- type NextResolve = (specifier: string, context: ResolveContext) => ResolveResult;
8
- /**
9
- * Resolve declared library bytes for this host. A library's shape may select an
10
- * archive coordinate; world selection remains the standing contract.
11
- */
12
- export declare function pinPlace(name: string): string;
13
- export declare function pinExport(name: string, sub: string): string;
14
- export declare function pinName(name: string): string;
15
- /** Node package resolution at a digest-laid library; exports remain authoritative. */
16
- export declare function resolvePinned(specifier: string, context: ResolveContext, nextResolve: NextResolve, pin: {
17
- readonly at: string;
18
- readonly pkg: string;
19
- readonly json: string;
20
- readonly exports: boolean;
21
- }): ResolveResult;
22
- /** Fixed execution selects libraries by the instrument's explicit local mount,
23
- * before opening any artifact. An alias or package-name guess grants nothing. */
24
- export declare function selectNativeDependencies(root: string, dependencies: readonly string[], manifest: string): readonly {
25
- line: string;
26
- library: {
27
- readonly name: string;
28
- readonly manifest: string;
29
- readonly coordinate?: string;
30
- };
31
- }[] | undefined;
32
- /** A declared artifact is not automatically an active Node library. This fixed
33
- * assertion reuses only the packages selected by the actual host boundary. */
34
- export declare function reuseNativeResolution(pins: readonly {
35
- pkg: string;
36
- at: string;
37
- }[]): boolean;
38
- /** Read one resolved archive's manifest; a selected fixed library cannot vanish
39
- * into the optional historical provider path when its archive is absent. */
40
- export declare function readProvidedPin(name: string, at: string, file: string, requiredName?: string): {
41
- at: string;
42
- pkg: string;
43
- exports: boolean;
44
- href: string;
45
- json: string;
46
- } | undefined;
47
- export declare function provide(): void;
48
- export {};
@@ -1,3 +0,0 @@
1
- export declare const readOnly: () => boolean;
2
- export declare const withoutEffects: <T>(evaluate: () => T) => T;
3
- export declare function requireEffects(operation: string): void;
@@ -1,47 +0,0 @@
1
- import type { ReaderLifetime, ReaderReference } from '@lapxo/topos/wire';
2
- import type { Capsule } from './capsule.ts';
3
- import { snapshotAccess } from '@lapxo/topos/contract';
4
- import type { ReadingIdentityContext, Snapshot, ResponseContext } from '@lapxo/topos/contract';
5
- import type { ReadingExecution, ReadingReference } from './reading-context.ts';
6
- export interface CurrentReading {
7
- readonly snapshot: Snapshot;
8
- readonly kept: ResponseContext;
9
- readonly current: ResponseContext;
10
- readonly permission: Parameters<typeof snapshotAccess>[3];
11
- }
12
- type File = {
13
- readonly place: string;
14
- readonly text: string;
15
- };
16
- export declare const inputLines: (files: readonly File[]) => readonly string[];
17
- /** One portable native receipt carrier shared by file plans and native capsule batches. */
18
- export declare function portableReadingReceipt(scope: string, by: string, closure: string, output: string, hash: (text: string) => string, modern?: boolean, costs?: readonly string[]): readonly string[];
19
- /** The selected world owns input projection and reading. The host only verifies closures and keeps native count/bytes receipts. */
20
- export declare function readingClosures(options: {
21
- root: string;
22
- store: string;
23
- reader: string;
24
- speaker: string;
25
- digest: (text: string) => string;
26
- capsule: Capsule;
27
- region: string;
28
- projection: string;
29
- readerReference?: ReaderReference;
30
- lifetime?: ReaderLifetime;
31
- allowsEmpty?: boolean;
32
- context?: ReadingIdentityContext;
33
- execution?: ReadingExecution;
34
- current?: CurrentReading;
35
- files: readonly File[];
36
- livePlace?: () => readonly string[];
37
- assertCurrent?: () => void;
38
- emit?: (line: string) => void;
39
- }): {
40
- lines: readonly string[];
41
- read: number;
42
- opened: number;
43
- executed: number;
44
- };
45
- /** Verify the native reading carriers before a file seal may reuse them. These are semantic receipts, not file-region seals. */
46
- export declare function verifiedReadingReceipts(store: string, lines: readonly string[], digest: (text: string) => string, environment?: readonly ReadingReference[] | ((context: ReadingIdentityContext) => readonly ReadingReference[] | undefined), requireContext?: boolean): number | undefined;
47
- export {};
@@ -1,29 +0,0 @@
1
- import type { ReadingIdentityContext } from '@lapxo/topos/contract';
2
- export type ReadingReference = readonly [string, string];
3
- export interface ReadingExecution {
4
- readonly context: ReadingIdentityContext;
5
- readonly env: Readonly<Record<string, string>>;
6
- readonly cwd: string;
7
- readonly flags: readonly string[];
8
- }
9
- interface Boundary {
10
- readonly identity: string;
11
- readonly execution?: ReadingExecution;
12
- }
13
- export declare const readingBoundary: () => Boundary | undefined;
14
- export declare function withReadingBoundary<T>(identity: string, execution: ReadingExecution | undefined, run: () => T): T;
15
- export declare function readingEnvironment(hash: (text: string) => string, env?: Readonly<Record<string, string | undefined>>, cwd?: string, flags?: readonly string[]): readonly ReadingReference[];
16
- export declare function readingProfile(lines: readonly string[], field: (line: string, name: string) => string): boolean;
17
- /** The caller supplies verified implementation and transitive references. This
18
- * constructor adds the process boundary that the host will actually hand over. */
19
- export declare function readingExecution(input: {
20
- instrument: string;
21
- implementation: string;
22
- policy: string;
23
- inputs: readonly ReadingReference[];
24
- }, hash: (text: string) => string, boundary?: {
25
- env: Readonly<Record<string, string | undefined>>;
26
- cwd: string;
27
- flags: readonly string[];
28
- }): ReadingExecution;
29
- export {};
@@ -1,6 +0,0 @@
1
- export declare function inspectReference(fragment: string, policy: readonly string[]): Promise<{
2
- reference: import("./reference-profile.ts").StandingReference;
3
- lines: readonly string[];
4
- standing: string;
5
- authentication: string;
6
- }>;
@@ -1,14 +0,0 @@
1
- export declare const laidAt: (store: string, digest: string) => string;
2
- /** A host artifact binding, not a measured ceiling or an object act. */
3
- export declare const isReleaseBinding: (line: string) => boolean;
4
- export declare const releasesOf: (lock: readonly string[]) => readonly string[];
5
- /**
6
- * What the host does before anything runs: each release the instrument's own lock names by digest is a snapshot of
7
- * lines and digests, kept by digest, and the place the line needs is a materialization of verified CAS bytes. Materialized files do not share writable inodes with the store. A blob is laid only when its bytes hash to the digest that names it. What stands laid is
8
- * said by resolvedOf: a line for each release whose blob hashes to its name and whose place, or the cas when its line
9
- * needs none, holds it.
10
- */
11
- export declare function layReleases(store: string, own: string, lock: readonly string[], contentStore?: string): number;
12
- export declare const resolvedOf: (store: string, own: string, lock: readonly string[], contentStore?: string) => readonly string[];
13
- /** A host loads verified release bytes from a runtime tree, never interprets a snapshot file as a directory. */
14
- export declare function runtimeTreeAt(store: string, own: string, digest: string, contentStore?: string, root?: string): string | undefined;
@@ -1,85 +0,0 @@
1
- import { type PlaceReceipt, type ClockBudget } from '@lapxo/topos/core';
2
- import type { PlaceActBudget } from './ports/place-act.ts';
3
- export interface RootClockSourceSelection {
4
- readonly selector: string;
5
- readonly profileSelector: string;
6
- readonly bootstrapCheckpoint: {
7
- scope: string;
8
- measure: string;
9
- };
10
- readonly resources: {
11
- bytes: number;
12
- lines: number;
13
- places: number;
14
- acts: number;
15
- };
16
- readonly inherited: {
17
- clock: ClockBudget;
18
- storage: PlaceActBudget;
19
- };
20
- }
21
- export declare function rootClockSource(root: string, selected: RootClockSourceSelection): {
22
- observation: Readonly<{
23
- history: readonly string[];
24
- anchor: import("@lapxo/topos/wire").Signer;
25
- algorithms: readonly string[];
26
- }>;
27
- resources: Readonly<{
28
- bytes: number;
29
- lines: number;
30
- places: number;
31
- acts: number;
32
- }>;
33
- authority: (encoded: string) => {
34
- anchor: import("@lapxo/topos/wire").Signer;
35
- history: readonly string[];
36
- checkpoint: string;
37
- };
38
- selection: import("./place-clock-selection.ts").HostClockSelection;
39
- trust: import("./ports/place-act.ts").PlaceActTrust;
40
- };
41
- /** Source mapping is an explicit Root declaration; absence never means a zero
42
- * clock or an inferred cursor. Existing legacy callers do not request it. */
43
- export declare function declaredRootClockSource(root: string): {
44
- observation: Readonly<{
45
- history: readonly string[];
46
- anchor: import("@lapxo/topos/wire").Signer;
47
- algorithms: readonly string[];
48
- }>;
49
- resources: Readonly<{
50
- bytes: number;
51
- lines: number;
52
- places: number;
53
- acts: number;
54
- }>;
55
- authority: (encoded: string) => {
56
- anchor: import("@lapxo/topos/wire").Signer;
57
- history: readonly string[];
58
- checkpoint: string;
59
- };
60
- selection: import("./place-clock-selection.ts").HostClockSelection;
61
- trust: import("./ports/place-act.ts").PlaceActTrust;
62
- };
63
- export declare function hasRootClockSource(root: string): boolean;
64
- export interface PortablePlaceContext {
65
- readonly identity: string;
66
- readonly context: string;
67
- readonly receipts: readonly PlaceReceipt[];
68
- readonly authority: {
69
- anchor: import('@lapxo/topos/wire').Signer;
70
- history: readonly string[];
71
- checkpoint: string;
72
- };
73
- }
74
- /** Historical inspection ONLY. The expected acting Root anchor and resource
75
- * selection come from the consumer's selected place, never from this packet.
76
- * This function returns data and cannot construct a current command permit. */
77
- export declare function inspectPortablePlaceContexts(encoded: string, expectedAnchor: import('@lapxo/topos/wire').Signer, selected: RootClockSourceSelection): {
78
- identity: string;
79
- context: import("@lapxo/topos/core").PlaceAct;
80
- }[];
81
- /** Prospective configuration is checked as authenticated Root history, never
82
- * against a prose birth condition. Initial heads are explicit typed selections;
83
- * stored committed chains cannot disappear when a selection is activated or
84
- * replaced. Preview reads only; the real admission repeats under its Root lock. */
85
- export declare function assertProspectiveRootClockSelection(root: string, signed: readonly string[]): void;
@@ -1,8 +0,0 @@
1
- import { capsuleAt } from './capsule.ts';
2
- import type { Capsule } from './capsule.ts';
3
- import type { ToposResolver } from './selected-topos.ts';
4
- /** Only explicit capsule offers request execution. Forms/classes/views do not need an executable alias. */
5
- export declare function selectedCapsules(pins: readonly string[], resolve?: typeof capsuleAt, select?: ToposResolver, host?: readonly string[]): readonly {
6
- readonly capsule: Capsule;
7
- readonly offer: string;
8
- }[];
@@ -1,24 +0,0 @@
1
- import type { StandingTopos } from '@lapxo/topos/standing';
2
- import { wireAt, fromLine } from '@lapxo/topos/wire';
3
- export interface SelectedTopos {
4
- readonly digest: string;
5
- readonly topos: StandingTopos;
6
- }
7
- export type ToposResolver = (digest: string) => StandingTopos;
8
- /** Local grammar is sufficient for locally declared records. Resolve selected
9
- * contracts only when a reader is missing; a local refusal remains a refusal. */
10
- export declare function admittedLine(line: string, local: readonly Readonly<Record<string, string>>[], epoch: number, pins: readonly string[], resolve?: ToposResolver): ReturnType<typeof fromLine>;
11
- /** Resolve content using the instrument wire's admitted digest algorithms. No transport interpretation. */
12
- export declare function toposAt(digest: string, store?: string): StandingTopos;
13
- export declare function contentAt(digest: string, store?: string): Uint8Array;
14
- /** The declared module runs from the store that supplied its verified bytes. No copy or live-checkout fallback. */
15
- export declare function contextModuleAt(digest: string, store?: string, dependencies?: readonly string[]): string;
16
- /** Selection verifies standing identity. Requested capabilities verify their artifact bytes separately. */
17
- export declare function selectedTopoi(pins: readonly string[], resolve?: ToposResolver): readonly SelectedTopos[];
18
- /** Read a declared wire list without copying a world's claims or executing its offers.
19
- * Independent declarations must agree; selection order cannot choose a contract.
20
- */
21
- export declare function selectedWireList(local: readonly string[], epoch: number, pins: readonly string[], list: string, resolve?: ToposResolver): readonly string[];
22
- /** Complete an admission snapshot from the selected standing. Local declarations
23
- * govern their own lists; independent selected contracts cannot choose by order. */
24
- export declare function selectedWireAt(local: readonly Readonly<Record<string, string>>[], epoch: number, pins: readonly string[], resolve?: ToposResolver): ReturnType<typeof wireAt>;
@@ -1,3 +0,0 @@
1
- import type { SigningLot } from './ports/signing.ts';
2
- /** Resolve data before acquisition; all mechanisms use one wire protocol and verification path. */
3
- export declare function signerFor(lines: readonly string[], keyId: string, selected?: string, keyFile?: string): (lot: SigningLot) => Promise<readonly import("./ports/signing.ts").SignatureRecord[]>;
@@ -1,12 +0,0 @@
1
- export interface ContentPort {
2
- readonly algorithms: ReadonlySet<string>;
3
- readonly read: (digest: string) => Uint8Array | undefined;
4
- readonly write: (digest: string, bytes: Uint8Array) => void;
5
- readonly fetch: (url: string, digest?: string) => Promise<Uint8Array>;
6
- }
7
- /** Transport uses declared locations; only the requested digest admits bytes into the cache. */
8
- export declare function resolveSelectedContent(lines: readonly string[], port: ContentPort, requested: readonly string[]): Promise<readonly string[]>;
9
- /** Exact resource URLs; no repository checkout or inferred release. */
10
- export declare function resolveSources(standing: readonly string[], requested: readonly string[]): Promise<void>;
11
- /** A changed verified store is the only reason to retry. A repeated miss never loops or changes a named pin. */
12
- export declare function resolveRequested<T>(resolve: (digest: string) => Promise<void>, fold: () => Promise<T>): Promise<T>;
@@ -1,2 +0,0 @@
1
- /** Record completed synchronous host work without changing its result or refusal. */
2
- export declare const timing: (spent: string[]) => <T>(what: string, fn: () => T) => T;
@@ -1,6 +0,0 @@
1
- /** Verified foreign histories stay separate from the local authority and local epoch inputs. */
2
- export declare function foreignWalkLines(root: string): Promise<readonly string[]>;
3
- /** A declared origin exports its own signed history. Foreign packets are retained with their contexts, never re-signed as local history. */
4
- export declare function renderWalk(root: string, resolution: number | undefined, peer: readonly string[], key?: string, keyFile?: string, signer?: string): Promise<readonly string[]>;
5
- /** The SDK proves the foreign prefix; the host admits the pair at one publication point. */
6
- export declare function landWalk(root: string, lines: readonly string[], key?: string, keyFile?: string, signer?: string): Promise<readonly string[]>;
@@ -1,7 +0,0 @@
1
- /**
2
- * A demand that landed after its coordinates. A take judges what moved, because it assumes the demand came first and the
3
- * tree after it; a demand that arrives second has nothing left to move — its cone is already in the ledger, every coordinate
4
- * of it vouched at a digest. Judging that is reading, not observing, so it is answered where it lands and no file is
5
- * touched to force it. A demand whose cone holds no vouched coordinate is not late, it is unlanded, and it waits for a take.
6
- */
7
- export declare function lateFacts(store: string, signed: readonly string[], answered: ReadonlySet<string>): readonly string[];
@@ -1,59 +0,0 @@
1
- export interface Gate {
2
- readonly kind: string;
3
- readonly status: 'green' | 'red';
4
- readonly ms: number;
5
- readonly at: string;
6
- readonly admitted: boolean;
7
- readonly why: string;
8
- }
9
- interface Effect {
10
- readonly kind: string;
11
- readonly status: 'green' | 'red';
12
- readonly ms: number;
13
- readonly at: string;
14
- readonly admitted: boolean;
15
- }
16
- /** E: the demand, its cone, the coordinates before and after by digest, and the effects that ran over the cone; an effect the ledger has never seen green answers for nothing yet: it runs, it lands, and it refuses nothing. */
17
- interface Envelope {
18
- readonly scope: string;
19
- readonly cone: readonly string[];
20
- readonly before: Readonly<Record<string, string>>;
21
- readonly after: Readonly<Record<string, string>>;
22
- readonly effects: readonly Effect[];
23
- }
24
- type Verdict = {
25
- readonly kind: 'fact';
26
- readonly why: string;
27
- readonly envelope: Envelope;
28
- readonly digest: string;
29
- readonly changed: readonly string[];
30
- } | {
31
- readonly kind: 'refuse';
32
- readonly why: string;
33
- readonly envelope: Envelope;
34
- readonly digest: string;
35
- readonly changed: readonly string[];
36
- };
37
- export declare function judgeTake(input: {
38
- readonly root: string;
39
- readonly scope: string;
40
- readonly value: string;
41
- readonly locations: readonly string[];
42
- readonly before: ReadonlyMap<string, string>;
43
- readonly after: ReadonlyMap<string, string>;
44
- readonly law?: readonly string[];
45
- readonly template: string;
46
- readonly shape?: string;
47
- readonly restsOn?: string;
48
- /** An unchanged cone may receive its first missing judgment; vouching bytes is not judgment. */
49
- readonly unpaid?: boolean;
50
- readonly witnessOf?: (coordinate: string) => string | undefined;
51
- }): Verdict & {
52
- readonly notOwned: readonly string[];
53
- };
54
- /** A take that met its cone carries the gates its batch passed: their runs join its envelope, and its receipt is sealed with them. */
55
- export declare function sealed<V extends {
56
- readonly envelope: Envelope;
57
- readonly digest: string;
58
- }>(root: string, verdict: V, gates: readonly Gate[]): V;
59
- export {};
@@ -1 +0,0 @@
1
- export declare function widenedWithoutWitness(proposed: readonly string[], standing: readonly string[], isCeiling: (line: string) => boolean, witness: string): readonly string[];
@@ -1,30 +0,0 @@
1
- export declare function underTheRegions<T>(store: string, regions: readonly string[], what: string, act: () => T | Promise<T>): Promise<T>;
2
- /** Protect the root authority/policy read through child publication. This is
3
- * exclusion only: callers must authenticate contexts and compare prepared heads
4
- * while held. It creates no grant, clock advance, lease or automatic recovery. */
5
- export declare function underAuthorityRegions<T>(store: string, regions: readonly string[], what: string, act: () => T | Promise<T>): Promise<T>;
6
- /** Protect an authority snapshot without taking a child region. The acquisition
7
- * gate and temporary root marker exclude a root mutation while registering the
8
- * shared read; existing child acts continue independently. This is exclusion,
9
- * never authorization or a clock advance. */
10
- export declare function underRootAuthority<T>(store: string, what: string, act: () => T | Promise<T>): Promise<T>;
11
- export interface RootAuthorityProtection {
12
- readonly store: string;
13
- readonly lock: string;
14
- readonly pid: number;
15
- readonly token: string;
16
- }
17
- /** The fixed host may hand its child evidence of an actual held exclusion.
18
- * It is an operational envelope, not a grant, signer or receipt identity. */
19
- export declare function rootAuthorityProtection(store: string): RootAuthorityProtection;
20
- /** expectedStore and expectedParent come from the fixed host's inheritance
21
- * channel, never from world data. Matching a live lock proves exclusion only;
22
- * signature, coverage and current context still require verification. */
23
- export declare function assertRootAuthorityProtection(proof: RootAuthorityProtection, expectedStore: string, expectedParent: number): void;
24
- /** A child can publish independently, but the joined root projection and its
25
- * derived ledger appends have one writer. Authority protection already excludes
26
- * root mutations, so this lock needs no acquisition-gate upgrade. */
27
- export declare function underRootProjection<T>(store: string, what: string, act: () => T | Promise<T>): Promise<T>;
28
- export declare const holdRoot: (store: string, what: string) => Promise<void>;
29
- export declare function underTheLock<T>(store: string, what: string, act: () => T | Promise<T>): Promise<T>;
30
- export declare const holds: (store: string, region: string) => boolean;
@@ -1,10 +0,0 @@
1
- /**
2
- * An alias is gone only when no pin will still name its digest. The pins are the root's uses lines and each world's own,
3
- * minus the pins this batch itself withdraws, plus the pins it adds. Checked before the trial, so a batch that would
4
- * orphan a pin lands nothing.
5
- */
6
- export declare function aliasPinned(root: string, signed: readonly string[]): readonly {
7
- readonly scope: string;
8
- readonly digest: string;
9
- readonly by: readonly string[];
10
- }[];
@@ -1,7 +0,0 @@
1
- export interface Held {
2
- readonly scope: string;
3
- readonly bytes: number;
4
- readonly at: string;
5
- }
6
- /** Bytes the store receipts name: a byte lives only while a standing line names it, and the receipts list what is there. */
7
- export declare const heldBytes: (_root: string, store: string, _standing: readonly string[]) => number;
@@ -1,26 +0,0 @@
1
- /**
2
- * The ceilings of a batch that would stand unread: no reading meets them and no reading of the instrument's own
3
- * carries their measure. A batch that also signs a reader goes through whole, since what a reader reads is known only
4
- * once it runs, and so does a ceiling a gate of the same act reads, whose reading lands with it or refuses it.
5
- */
6
- export declare function inertIn(batch: readonly string[], input: {
7
- readonly standing: readonly string[];
8
- readonly ceiling: (line: string) => boolean;
9
- readonly signsReader: boolean;
10
- readonly observed: readonly string[];
11
- readonly own: Readonly<Record<string, number>>;
12
- readonly epoch: number;
13
- }): readonly string[];
14
- /** What each ceiling of a batch would bite, read off the summaries of the cone before anything lands. */
15
- export declare function rankedIn(batch: readonly string[], fold: {
16
- readonly standing: readonly string[];
17
- readonly observed: readonly string[];
18
- readonly own: Readonly<Record<string, number>>;
19
- }): readonly string[];
20
- /** Every ceiling asked, at resolution one: what the fold reads for it, beside its bound, or unmeasured where no reading answers it. */
21
- export declare function readingsIn(ceilings: readonly string[], fold: {
22
- readonly standing: readonly string[];
23
- readonly observed: readonly string[];
24
- readonly own: Readonly<Record<string, number>>;
25
- readonly epoch: number;
26
- }): readonly string[];
@@ -1,14 +0,0 @@
1
- /**
2
- * A file goes from the tree through a line, never through a hand: its path withdrawn in the family the lock sources files
3
- * by is the only way a file goes, and the fold refuses it while a block still reads the file — what a run depends on is judged by the run's
4
- * own memo, which names every file each block read, and not by a search for the file's name in a test. A search misses
5
- * a name built in a loop; the memo does not. A test file goes with its own blocks, and is refused while one of them
6
- * is the only run of a vector or a sample, which it names.
7
- */
8
- export declare function coordinatesWithdrawn(root: string, store: string, signed: readonly string[], standing: readonly string[]): {
9
- readonly taken: readonly string[];
10
- readonly refused: readonly {
11
- readonly path: string;
12
- readonly by: string;
13
- }[];
14
- };
@@ -1,33 +0,0 @@
1
- export declare function storeOf(root: string): string;
2
- /**
3
- * The store of a place: every name under it is read here and nowhere else, whoever needs a place asks for it by its
4
- * steps, and one append-only file per writer stands beside the bytes kept by digest — one per region for a writer
5
- * whose lines are about regions, so a fold opens only the regions it reaches. A file is read once per stamp, and a
6
- * ledger only grows: what it held is kept, and only the bytes appended since, from where it last ended a line, are read.
7
- */
8
- export declare function storeAt(store: string, ...steps: readonly string[]): string;
9
- export declare function writerFile(store: string, writer: string): string;
10
- export declare function ledgerLines(store: string, writer: string): readonly string[];
11
- export declare function shardFile(store: string, writer: string, region: string): string;
12
- export declare const shardLines: (store: string, writer: string, region: string) => readonly string[];
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[];
18
- export declare function landShard(store: string, writer: string, region: string, lines: readonly string[]): number;
19
- export declare function signedLines(store: string, writer: string): string[];
20
- export declare function blobAt(store: string, digest: string): string;
21
- /** A file replaced whole: the bytes land in a temp beside it and the name moves in one rename, so a killed write keeps the temp, never a torn file under the name a later read parses. */
22
- export declare function replaceWhole(at: string, bytes: Uint8Array | string): void;
23
- export declare const landBlob: (store: string, digest: string, bytes: Uint8Array) => string;
24
- export declare function holdStore(store: string, kind: 'blobs' | 'laid' | 'answers', name: string, bytes: number): void;
25
- export declare const memoAt: (store: string, key: string) => string;
26
- export declare function landMemo(store: string, key: string, bytes: Uint8Array): string;
27
- export declare const landEnvelope: (store: string, digest: string, bytes: string) => string;
28
- export declare function land(store: string, writer: string, lines: readonly string[]): {
29
- readonly at: string;
30
- readonly appended: number;
31
- };
32
- export declare function keptVerdict(store: string, tree: string, lot: string): unknown[] | undefined;
33
- export declare function keepVerdict(store: string, tree: string, lot: string, judged: readonly unknown[]): void;
@@ -1,23 +0,0 @@
1
- export type Owned = {
2
- readonly ledger: readonly string[];
3
- readonly own: ReadonlyMap<string, readonly string[]>;
4
- readonly nowhere: readonly string[];
5
- readonly forked: readonly {
6
- readonly place: string;
7
- readonly key: string;
8
- }[];
9
- };
10
- /**
11
- * A lot named with --place lands in those own locks and not the ledger: a lot never mixes. A line the ledger does not admit is a place's own when that place's own lock admits it: signed by a key the tree admits,
12
- * inside the window it held, inside its coverage of the place, the line's scope read as a region of the place. An own
13
- * lock speaks of its place without naming it, so a line whose scope names a place first is the ledger's alone, and the
14
- * same line can stand in many own locks: named places take every line they admit, and with none named a line lands in
15
- * the one own lock that admits it. The lines are told to their locks for the gates and land in them signed, beside what
16
- * the ledger takes. A line no lock admits, or one two locks would take and no place names, is admitted nowhere, and a
17
- * batch that holds one is refused whole: nothing is ever written into a lock bare. An own lot never forks a lock: lines
18
- * that would leave a place's lock with two standing claims where it had one are refused whole, so a lot for many places
19
- * lands the same lines at each, and lines meant for one place go in a lot of their own.
20
- */
21
- export declare function ownedOf(root: string, signed: readonly string[], admits: (line: string) => boolean, coverage: (by: string) => readonly string[], named?: readonly string[], placedAt?: (line: string) => readonly string[] | undefined): Owned;
22
- /** A place's own lock gains the lines a batch landed there, appended whole: a reader never meets half of it, and every line already there keeps its bytes as they were. */
23
- export declare function landOwned(root: string, place: string, lines: readonly string[], committed?: boolean): void;
@@ -1,15 +0,0 @@
1
- import type { SigningLot, SignatureRecord } from '../host/ports/signing.ts';
2
- /** Prepare and verify a whole lot. No key material and no output/admission side effects. */
3
- export declare function signConsentLot(lines: readonly string[], stamp: {
4
- readonly epoch?: number;
5
- readonly by: string;
6
- readonly algorithm: string;
7
- }, publicKey: string, admitted: readonly string[], invoke: (lot: SigningLot) => Promise<readonly SignatureRecord[]>): Promise<{
8
- readonly kind: 'fact';
9
- readonly lines: readonly string[];
10
- } | {
11
- readonly kind: 'refuse';
12
- readonly why: string;
13
- }>;
14
- export declare function verifiesOwnerLine(line: string, publicKeyPem: string, admitted: readonly string[]): boolean;
15
- export declare function verifiesFields(fields: Readonly<Record<string, string>>, publicKey: string, admitted: readonly string[]): boolean;
@@ -1,3 +0,0 @@
1
- /** A new world selection names standing bytes. Artifact aliases remain separate.
2
- * Admission reads laid content only; it never fetches or executes a provider. */
3
- export declare function admitStandingPins(root: string, lines: readonly string[], read?: (digest: string) => Uint8Array): void;
@@ -1,21 +0,0 @@
1
- import type { CoordinateRole } from '../fold/wire.ts';
2
- /** A location is a file or a directory; `x/*` names the directory `x/`. A deeper glob is not a location. */
3
- export declare function locationsOf(needs: string): {
4
- readonly locations: readonly string[];
5
- readonly refused: readonly string[];
6
- };
7
- /**
8
- * The source coordinates under one location, by digest. A path whose role is not source is never walked, so nothing under
9
- * it is read. A link is a coordinate whose bytes are its target; it is never followed.
10
- */
11
- export declare function coordinatesOf(root: string, location: string, roleOf: (coordinate: string) => CoordinateRole): Map<string, string>;
12
- /** The law a witness file says it answers for: its own `witness=<law>` line, or its `"witness"` field. */
13
- export declare function witnessOf(root: string, coordinate: string): string | undefined;
14
- export declare const vouching: (standing: readonly string[]) => string;
15
- export declare const sourced: (standing: readonly string[]) => string;
16
- export declare const sourceOf: (line: string) => string | undefined;
17
- export declare function inside(path: string, location: string): boolean;
18
- export declare function vouchedCoordinates(store: string): Map<string, string>;
19
- export declare function everLanded(store: string): ReadonlySet<string>;
20
- export declare function hasVouchedTree(store: string): boolean;
21
- export declare function landCoordinates(store: string, present: ReadonlyMap<string, string>, gone: readonly string[], at: string): number;