@githolon/runtime 0.110.0

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 (71) hide show
  1. package/LICENSE.md +45 -0
  2. package/dist/RUNTIME-SOURCES.sha256 +289 -0
  3. package/dist/application-reception.js +206 -0
  4. package/dist/nomos-native-runtime.js +22519 -0
  5. package/dist/nomos-runner.html +13 -0
  6. package/dist/nomos-runner.js +34769 -0
  7. package/dist/remote-reception.cjs +582 -0
  8. package/dist/remote-reception.js +555 -0
  9. package/dist/typescript-application-desk.js +796 -0
  10. package/package.json +71 -0
  11. package/runner/README.md +75 -0
  12. package/runner/build.ts +225 -0
  13. package/runner/node-entry.mjs +31858 -0
  14. package/runner/nomos-runner.html +13 -0
  15. package/runner/shims.js +17 -0
  16. package/src/admission_decision.ts +60 -0
  17. package/src/application_reception.ts +134 -0
  18. package/src/nominal_value.ts +122 -0
  19. package/src/protocol/nomos/custody/v1/snapshot_pb.d.ts +67 -0
  20. package/src/protocol/nomos/custody/v1/snapshot_pb.js +18 -0
  21. package/src/protocol/nomos/discovery/v1/workspace_placement_pb.d.ts +56 -0
  22. package/src/protocol/nomos/discovery/v1/workspace_placement_pb.js +18 -0
  23. package/src/protocol/nomos/kernel/v1/kernel_pb.d.ts +11183 -0
  24. package/src/protocol/nomos/kernel/v1/kernel_pb.js +2217 -0
  25. package/src/protocol/nomos/kernel/v1/progress_pb.d.ts +250 -0
  26. package/src/protocol/nomos/kernel/v1/progress_pb.js +66 -0
  27. package/src/protocol/nomos/runtime/v2/application_desk_pb.d.ts +162 -0
  28. package/src/protocol/nomos/runtime/v2/application_desk_pb.js +60 -0
  29. package/src/protocol/nomos/runtime/v2/application_readiness_desk_pb.d.ts +202 -0
  30. package/src/protocol/nomos/runtime/v2/application_readiness_desk_pb.js +67 -0
  31. package/src/protocol/nomos/runtime/v2/authentication_desk_pb.d.ts +158 -0
  32. package/src/protocol/nomos/runtime/v2/authentication_desk_pb.js +50 -0
  33. package/src/protocol/nomos/runtime/v2/compatibility_desk_pb.d.ts +204 -0
  34. package/src/protocol/nomos/runtime/v2/compatibility_desk_pb.js +68 -0
  35. package/src/protocol/nomos/runtime/v2/correspondence_desk_pb.d.ts +3661 -0
  36. package/src/protocol/nomos/runtime/v2/correspondence_desk_pb.js +735 -0
  37. package/src/protocol/nomos/runtime/v2/credentials_desk_pb.d.ts +122 -0
  38. package/src/protocol/nomos/runtime/v2/credentials_desk_pb.js +41 -0
  39. package/src/protocol/nomos/runtime/v2/custody_desk_pb.d.ts +611 -0
  40. package/src/protocol/nomos/runtime/v2/custody_desk_pb.js +123 -0
  41. package/src/protocol/nomos/runtime/v2/framework_pb.d.ts +211 -0
  42. package/src/protocol/nomos/runtime/v2/framework_pb.js +29 -0
  43. package/src/protocol/nomos/runtime/v2/identity_desk_pb.d.ts +305 -0
  44. package/src/protocol/nomos/runtime/v2/identity_desk_pb.js +61 -0
  45. package/src/protocol/nomos/runtime/v2/interaction_desk_pb.d.ts +73 -0
  46. package/src/protocol/nomos/runtime/v2/interaction_desk_pb.js +25 -0
  47. package/src/protocol/nomos/runtime/v2/law_desk_pb.d.ts +133 -0
  48. package/src/protocol/nomos/runtime/v2/law_desk_pb.js +39 -0
  49. package/src/protocol/nomos/runtime/v2/maintenance_desk_pb.d.ts +267 -0
  50. package/src/protocol/nomos/runtime/v2/maintenance_desk_pb.js +84 -0
  51. package/src/protocol/nomos/runtime/v2/model_adoption_desk_pb.d.ts +233 -0
  52. package/src/protocol/nomos/runtime/v2/model_adoption_desk_pb.js +57 -0
  53. package/src/protocol/nomos/runtime/v2/observability_desk_pb.d.ts +1015 -0
  54. package/src/protocol/nomos/runtime/v2/observability_desk_pb.js +230 -0
  55. package/src/protocol/nomos/runtime/v2/placement_desk_pb.d.ts +431 -0
  56. package/src/protocol/nomos/runtime/v2/placement_desk_pb.js +125 -0
  57. package/src/protocol/nomos/runtime/v2/receiving_group_desk_pb.d.ts +336 -0
  58. package/src/protocol/nomos/runtime/v2/receiving_group_desk_pb.js +78 -0
  59. package/src/protocol/nomos/runtime/v2/records_desk_pb.d.ts +716 -0
  60. package/src/protocol/nomos/runtime/v2/records_desk_pb.js +200 -0
  61. package/src/protocol/nomos/runtime/v2/recovery_desk_pb.d.ts +535 -0
  62. package/src/protocol/nomos/runtime/v2/recovery_desk_pb.js +160 -0
  63. package/src/protocol/nomos/runtime/v2/residency_desk_pb.d.ts +1162 -0
  64. package/src/protocol/nomos/runtime/v2/residency_desk_pb.js +212 -0
  65. package/src/protocol/nomos/runtime/v2/runtime_pb.d.ts +796 -0
  66. package/src/protocol/nomos/runtime/v2/runtime_pb.js +72 -0
  67. package/src/protocol/nomos/runtime/v2/sealing_desk_pb.d.ts +581 -0
  68. package/src/protocol/nomos/runtime/v2/sealing_desk_pb.js +149 -0
  69. package/src/remote_reception.public.d.ts +97 -0
  70. package/src/remote_reception.ts +446 -0
  71. package/src/typescript_application_desk.public.d.ts +62 -0
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
6
+ <title>Nomos runner</title>
7
+ </head>
8
+ <body>
9
+ <!-- The Nomos WebView runner. A Flutter app loads this page off-screen; all interaction is via the bridge
10
+ Runtime v2 protobuf frame port. There is no UI here by design. -->
11
+ <script src="./nomos-runner.js"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,17 @@
1
+ // Browser/WebView polyfills for the Node-isms the client's third-party deps assume (the client's OWN code is
2
+ // browser-safe). esbuild injects this ahead of everything so the globals exist before the client loads:
3
+ // • `Buffer` — isomorphic-git uses the Node Buffer global (its own source flags this for bundler consumers).
4
+ // • `process` — a few deps probe `process.env`/`process.platform`; a minimal stub satisfies them.
5
+ import { Buffer } from "buffer";
6
+ globalThis.Buffer = globalThis.Buffer || Buffer;
7
+
8
+ if (typeof globalThis.queueMicrotask !== "function") {
9
+ globalThis.queueMicrotask = (callback) => {
10
+ if (typeof callback !== "function") {
11
+ throw new TypeError("queueMicrotask callback must be a function");
12
+ }
13
+ Promise.resolve().then(callback);
14
+ };
15
+ }
16
+
17
+ globalThis.process = globalThis.process || { env: {}, platform: "browser", browser: true, version: "", versions: {}, nextTick: (fn, ...a) => queueMicrotask(() => fn(...a)) };
@@ -0,0 +1,60 @@
1
+ import { KernelRefusalCode, type OfferResponse } from './protocol/nomos/kernel/v1/kernel_pb.js';
2
+ export { KernelRefusalCode };
3
+
4
+ export interface DomainRefusalEvidence {
5
+ readonly lawSha256: Uint8Array;
6
+ readonly invariant: string;
7
+ readonly typeIdentity: string;
8
+ readonly valueUsda: Uint8Array;
9
+ }
10
+ export type AdmissionDecision<S, R> =
11
+ | { readonly kind: 'admitted'; readonly value: S }
12
+ | { readonly kind: 'domainRefused'; readonly reason: R; readonly evidence: DomainRefusalEvidence }
13
+ | { readonly kind: 'frameworkRefused'; readonly code: KernelRefusalCode; readonly message: string }
14
+ | { readonly kind: 'unsupportedRefusalContract'; readonly evidence: DomainRefusalEvidence };
15
+
16
+ // Bundles may have separate copies of this module. The shared symbol preserves
17
+ // the typed offer envelope across those copies without class-identity coupling.
18
+ const offerFailure = Symbol.for('nomos.typedOfferFailure.v1');
19
+ export class NomosTypedOfferFailure extends Error {
20
+ readonly [offerFailure] = true;
21
+ readonly response: OfferResponse;
22
+ constructor(response: OfferResponse, message: string) { super(message); this.response = response; }
23
+ static is(value: unknown): value is NomosTypedOfferFailure {
24
+ return value instanceof Error && (value as NomosTypedOfferFailure)[offerFailure] === true;
25
+ }
26
+ }
27
+ const unsupported = Symbol.for('nomos.unsupportedNominalRefusal.v1');
28
+ export class UnsupportedNominalRefusal extends Error {
29
+ readonly [unsupported] = true;
30
+ }
31
+
32
+ /** Pure adaptation of a completed offer. Scheduling, retries and policy remain
33
+ * in Peer Office; transport and dependency failures are deliberately propagated. */
34
+ export async function admissionDecision<S, R>(command: () => Promise<S>,
35
+ decode: (value: DomainRefusalEvidence) => R | undefined): Promise<AdmissionDecision<S, R>> {
36
+ try { return { kind: 'admitted', value: await command() }; }
37
+ catch (error) {
38
+ if (!NomosTypedOfferFailure.is(error) || error.response?.outcome?.case !== 'refused') throw error;
39
+ const reply = error.response.outcome.value;
40
+ const code = reply.refusal?.code ?? KernelRefusalCode.UNSPECIFIED;
41
+ const value = reply.domainRefusal;
42
+ if (value === undefined) {
43
+ if (code === KernelRefusalCode.DOMAIN_REFUSED) throw new TypeError('Kernel domain refusal omitted its nominal value');
44
+ return { kind: 'frameworkRefused', code, message: reply.refusal?.message ?? '' };
45
+ }
46
+ if (code !== KernelRefusalCode.DOMAIN_REFUSED || value.lawSha256.length !== 32
47
+ || !value.invariant || !value.typeIdentity || !value.valueUsda.length || value.valueUsda.length > 65536) {
48
+ throw new TypeError('Invalid kernel domain-refusal envelope');
49
+ }
50
+ const evidence: DomainRefusalEvidence = Object.freeze({ lawSha256: value.lawSha256.slice(),
51
+ invariant: value.invariant, typeIdentity: value.typeIdentity, valueUsda: value.valueUsda.slice() });
52
+ try {
53
+ const reason = decode(evidence);
54
+ return reason === undefined ? { kind: 'unsupportedRefusalContract', evidence } : { kind: 'domainRefused', reason, evidence };
55
+ } catch (error) {
56
+ if (!(error instanceof Error) || (error as UnsupportedNominalRefusal)[unsupported] !== true) throw error;
57
+ return { kind: 'unsupportedRefusalContract', evidence };
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,134 @@
1
+ // TENANT-FACING SOURCE. A generated TypeScript application typechecks this file
2
+ // under its OWN tsconfig (`moduleResolution: "Bundler"`, no
3
+ // `allowImportingTsExtensions`), so these specifiers stay `.js` and TypeScript
4
+ // resolves them to the sibling `.ts`. No `.js` file exists or should: the
5
+ // hand-copied `admission_decision.js` that used to be carried between checkouts
6
+ // to keep a Node import honest is gone, and the files Node executes from source
7
+ // (`remote_reception.ts`, `generated_offer_counter.ts`) name `.ts` instead.
8
+ export * from './admission_decision.js';
9
+ export { NominalValue, parseNominalValue } from './nominal_value.js';
10
+ declare const _nomosDigest: unique symbol;
11
+ export type Sha256Digest = string & { readonly [_nomosDigest]: "sha256" };
12
+ export type GitObjectId = string & { readonly [_nomosDigest]: "git-object" };
13
+
14
+ /** Pure value constructors shared by generated code and the Peer Office. */
15
+ export const sha256Digest = (value: string): Sha256Digest => {
16
+ if (!/^[0-9a-f]{64}$/.test(value)) {
17
+ throw new TypeError("expected a 64-character lowercase hexadecimal SHA-256 digest");
18
+ }
19
+ return value as Sha256Digest;
20
+ };
21
+ export const gitObjectId = (value: string): GitObjectId => {
22
+ if (!/^[0-9a-f]{40}$/.test(value)) {
23
+ throw new TypeError("expected a 40-character lowercase hexadecimal Git object id");
24
+ }
25
+ return value as GitObjectId;
26
+ };
27
+
28
+ /** Exact generated call shape Reception may hand back to the application desk. */
29
+ export interface ReceptionGeneratedCall {
30
+ readonly domain: string;
31
+ readonly directive: string;
32
+ readonly protobufType: string;
33
+ readonly protobufPayload: Uint8Array;
34
+ readonly routingCandidates: readonly string[];
35
+ }
36
+
37
+ export interface ReceptionInvitationFrameworkCalls {
38
+ readonly invitation?: {
39
+ redeem(input: {
40
+ readonly domain: string;
41
+ readonly workspace: string;
42
+ readonly directive: string;
43
+ readonly orderId: string;
44
+ readonly object: string;
45
+ readonly relation: string;
46
+ readonly invitationPublicKey: string;
47
+ readonly invitationSignature: string;
48
+ readonly invitationId: string;
49
+ readonly redeemedAt: string;
50
+ }): ReceptionGeneratedCall;
51
+ };
52
+ }
53
+
54
+ /** Identity already established by the Peer Office for this Reception session. */
55
+ export interface ReceptionUser {
56
+ readonly identityId: string;
57
+ readonly identityAddress: string;
58
+ }
59
+
60
+ /** Presentation-only observations of Peer Office work. */
61
+ export interface ReceptionStatus {
62
+ readonly phase: "opening" | "current" | "saving" | "receiving" | "catching-up" | "offline" | "attention";
63
+ readonly localChanges: number;
64
+ readonly acceptedChanges: number;
65
+ readonly decisionsNeeded: number;
66
+ readonly lastUpdatedAt: Date | null;
67
+ readonly message: string | null;
68
+ }
69
+
70
+ export interface ReceptionStatusDesk {
71
+ current(): Promise<ReceptionStatus>;
72
+ watch(listener: (status: ReceptionStatus) => void): () => void;
73
+ }
74
+
75
+ export interface ReceptionInvitationMaterial {
76
+ readonly address: string;
77
+ readonly token: string;
78
+ }
79
+
80
+ export interface ReceptionInvitationMatch {
81
+ readonly orderId: string;
82
+ readonly object: string;
83
+ readonly relation: string;
84
+ }
85
+
86
+ export interface ReceptionInvitationPolicy {
87
+ readonly domain: string;
88
+ readonly domainHash: string;
89
+ readonly redeem: string;
90
+ readonly pending: (address: string) => Promise<readonly ReceptionInvitationMatch[]>;
91
+ }
92
+
93
+ /** Result of Reception asking the Peer Office to follow one workspace reference. */
94
+ export interface ReceptionFollow<ApplicationDesk> {
95
+ readonly reception: ReceptionSession<ApplicationDesk>;
96
+ /** Background correspondence receipt, not a reason to block the local child handle. */
97
+ readonly settled: Promise<void>;
98
+ }
99
+
100
+ /**
101
+ * Ephemeral language-native Reception state around one Peer Office application
102
+ * desk. It contains no kernel, custody, placement, credential or sync truth.
103
+ */
104
+ export interface ReceptionSession<ApplicationDesk> {
105
+ readonly desk: ApplicationDesk;
106
+ readonly user: ReceptionUser;
107
+ readonly status: ReceptionStatusDesk;
108
+ follow(workspace: string): Promise<ReceptionFollow<ApplicationDesk>>;
109
+ createInvitation(): Promise<ReceptionInvitationMaterial>;
110
+ redeemInvitation(
111
+ link: string,
112
+ policies: readonly ReceptionInvitationPolicy[],
113
+ frameworkCalls: ReceptionInvitationFrameworkCalls,
114
+ ): Promise<void>;
115
+ close(): Promise<void>;
116
+ }
117
+
118
+ /** Immutable compatibility requirements emitted from the compiler graph. */
119
+ export interface ApplicationCompatibility {
120
+ readonly lawIdentity: Sha256Digest;
121
+ readonly matrixUsda: Uint8Array;
122
+ readonly readyCommands: readonly {
123
+ readonly domain: string;
124
+ readonly packageHash: Sha256Digest;
125
+ readonly directiveId: string;
126
+ }[];
127
+ }
128
+
129
+ /** Stateless compiler output received by a language-native Reception. */
130
+ export interface GeneratedApplication<ApplicationDesk, Application> {
131
+ readonly name: string;
132
+ readonly compatibility: ApplicationCompatibility;
133
+ receive(reception: ReceptionSession<ApplicationDesk>): Application;
134
+ }
@@ -0,0 +1,122 @@
1
+ /** Read the kernel's bounded, canonical nominal value syntax. This reader does
2
+ * not compose layers or interpret law. Generated codecs own schema traversal. */
3
+ export class NominalValue {
4
+ readonly typeName: string;
5
+ readonly name: string;
6
+ readonly properties: ReadonlyMap<string, unknown>;
7
+ readonly children: readonly NominalValue[];
8
+ constructor(typeName: string, name: string, properties: ReadonlyMap<string, unknown>, children: readonly NominalValue[]) {
9
+ this.typeName = typeName; this.name = name; this.properties = properties; this.children = children;
10
+ }
11
+ property(name: string): unknown { return this.properties.get(name); }
12
+ relationship(name: string): string | undefined {
13
+ const value = this.property(name);
14
+ return typeof value === 'string' ? value : undefined;
15
+ }
16
+ child(name: string): NominalValue {
17
+ const child = this.children.find(value => value.name === name);
18
+ if (!child) throw new TypeError(`Missing nominal child ${name}`);
19
+ return child;
20
+ }
21
+ field(path: string): NominalValue | undefined {
22
+ const values = this.children.filter(value => value.relationship('nomos:field') === path);
23
+ if (values.length > 1) throw new TypeError(`Duplicate nominal field ${path}`);
24
+ return values[0];
25
+ }
26
+ requiredField(path: string): NominalValue {
27
+ const field = this.field(path);
28
+ if (!field) throw new TypeError(`Missing nominal field ${path}`);
29
+ return field;
30
+ }
31
+ stringValue(): string {
32
+ const value = this.property('nomos:value');
33
+ if (!['NomosStringValue', 'NomosTokenValue'].includes(this.typeName) || typeof value !== 'string') throw new TypeError('Expected nominal text');
34
+ return value;
35
+ }
36
+ numberValue(integer = false): number {
37
+ const value = this.property('nomos:value');
38
+ if (this.typeName !== (integer ? 'NomosIntValue' : 'NomosNumberValue') || typeof value !== 'number'
39
+ || !Number.isFinite(value) || (integer && !Number.isSafeInteger(value))) throw new TypeError('Expected lossless nominal number');
40
+ return value;
41
+ }
42
+ boolValue(): boolean {
43
+ const value = this.property('nomos:value');
44
+ if (this.typeName !== 'NomosBoolValue' || typeof value !== 'boolean') throw new TypeError('Expected nominal boolean');
45
+ return value;
46
+ }
47
+ }
48
+
49
+ export function parseNominalValue(bytes: Uint8Array): NominalValue {
50
+ if (bytes.length > 65536) throw new TypeError('Nominal refusal exceeds its byte limit');
51
+ const source = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
52
+ if (!source.startsWith('#usda 1.0')) throw new TypeError('Expected canonical nominal USDA');
53
+ const tokens: string[] = [];
54
+ const pattern = /\s+|#[^\n]*|"(?:[^"\\]|\\.)*"|<[^<>\n]*>|[{}()=]|[A-Za-z_][A-Za-z_0-9:]*|-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/gy;
55
+ let offset = 0;
56
+ while (offset < source.length) {
57
+ pattern.lastIndex = offset;
58
+ const match = pattern.exec(source);
59
+ if (!match) throw new TypeError(`Unsupported nominal USDA syntax at ${offset}`);
60
+ offset = pattern.lastIndex;
61
+ if (!/^\s|^#/.test(match[0])) tokens.push(match[0]);
62
+ }
63
+ let cursor = 0;
64
+ const take = (): string => {
65
+ const value = tokens[cursor++];
66
+ if (value === undefined) throw new TypeError('Truncated nominal USDA');
67
+ return value;
68
+ };
69
+ const expect = (value: string): void => { if (take() !== value) throw new TypeError(`Expected ${value}`); };
70
+ const string = (value: string): string => {
71
+ if (!value.startsWith('"')) throw new TypeError('Expected USDA string');
72
+ // Canonical kernel strings use the JSON-compatible escape subset.
73
+ const result: unknown = JSON.parse(value);
74
+ if (typeof result !== 'string') throw new TypeError('Expected USDA string');
75
+ return result;
76
+ };
77
+ const prim = (depth: number): NominalValue => {
78
+ if (depth > 128) throw new TypeError('Nominal value exceeds nesting limit');
79
+ expect('def');
80
+ const typeName = take();
81
+ const name = string(take());
82
+ expect('{');
83
+ const properties = new Map<string, unknown>();
84
+ const children: NominalValue[] = [];
85
+ while (tokens[cursor] !== '}') {
86
+ if (tokens[cursor] === 'def') {
87
+ const child = prim(depth + 1);
88
+ if (children.some(value => value.name === child.name)) throw new TypeError('Duplicate nominal child');
89
+ children.push(child);
90
+ continue;
91
+ }
92
+ while (tokens[cursor] === 'custom' || tokens[cursor] === 'uniform') take();
93
+ const type = take(), key = take();
94
+ expect('=');
95
+ const token = take();
96
+ let value: unknown;
97
+ if (type === 'rel') {
98
+ if (!token.startsWith('</') || !token.endsWith('>')) throw new TypeError('Expected nominal relationship');
99
+ value = token.slice(1, -1);
100
+ } else if (type === 'string' || type === 'token') value = string(token);
101
+ else if (type === 'bool') {
102
+ if (!['true', 'false', '1', '0'].includes(token)) throw new TypeError('Expected nominal boolean');
103
+ value = token === 'true' || token === '1';
104
+ } else if (['int', 'int64', 'uint64', 'double', 'float'].includes(type)) {
105
+ value = Number(token);
106
+ if (!Number.isFinite(value) || (type.includes('int') && !Number.isSafeInteger(value))) throw new TypeError('Unsafe nominal number');
107
+ } else throw new TypeError(`Unsupported nominal property type ${type}`);
108
+ if (properties.has(key)) throw new TypeError('Duplicate nominal property');
109
+ properties.set(key, value);
110
+ }
111
+ expect('}');
112
+ return new NominalValue(typeName, name, properties, children);
113
+ };
114
+ if (tokens[cursor] === '(') {
115
+ take(); expect('defaultPrim'); expect('=');
116
+ if (string(take()) !== 'Value') throw new TypeError('Unexpected default nominal prim');
117
+ expect(')');
118
+ }
119
+ const root = prim(0);
120
+ if (cursor !== tokens.length || root.name !== 'Value') throw new TypeError('Expected one nominal Value root');
121
+ return root;
122
+ }
@@ -0,0 +1,67 @@
1
+ // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file nomos/custody/v1/snapshot.proto (package nomos.custody.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { Message } from "@bufbuild/protobuf";
7
+
8
+ /**
9
+ * Describes the file nomos/custody/v1/snapshot.proto.
10
+ */
11
+ export declare const file_nomos_custody_v1_snapshot: GenFile;
12
+
13
+ /**
14
+ * Opaque local custody cache. Git tree and checkpoint bytes remain kernel-owned;
15
+ * the host records only enough typed metadata to offer them back on next open.
16
+ * Field numbers deliberately match the historical runtime-v1 message so stored
17
+ * PB3 snapshots remain wire-compatible across this ownership correction.
18
+ *
19
+ * @generated from message nomos.custody.v1.LocalCustodySnapshot
20
+ */
21
+ export declare type LocalCustodySnapshot = Message<"nomos.custody.v1.LocalCustodySnapshot"> & {
22
+ /**
23
+ * @generated from field: uint32 format_version = 1;
24
+ */
25
+ formatVersion: number;
26
+
27
+ /**
28
+ * @generated from field: optional string workspace = 2;
29
+ */
30
+ workspace?: string | undefined;
31
+
32
+ /**
33
+ * @generated from field: bytes tree = 3;
34
+ */
35
+ tree: Uint8Array;
36
+
37
+ /**
38
+ * @generated from field: optional bytes checkpoint = 4;
39
+ */
40
+ checkpoint?: Uint8Array | undefined;
41
+
42
+ /**
43
+ * @generated from field: optional bytes frontier = 5;
44
+ */
45
+ frontier?: Uint8Array | undefined;
46
+
47
+ /**
48
+ * @generated from field: optional string cursor = 6;
49
+ */
50
+ cursor?: string | undefined;
51
+
52
+ /**
53
+ * @generated from field: optional string state_root = 7;
54
+ */
55
+ stateRoot?: string | undefined;
56
+
57
+ /**
58
+ * @generated from field: optional string synced_base = 8;
59
+ */
60
+ syncedBase?: string | undefined;
61
+ };
62
+
63
+ /**
64
+ * Describes the message nomos.custody.v1.LocalCustodySnapshot.
65
+ * Use `create(LocalCustodySnapshotSchema)` to create a new message.
66
+ */
67
+ export declare const LocalCustodySnapshotSchema: GenMessage<LocalCustodySnapshot>;
@@ -0,0 +1,18 @@
1
+ // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file nomos/custody/v1/snapshot.proto (package nomos.custody.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
6
+
7
+ /**
8
+ * Describes the file nomos/custody/v1/snapshot.proto.
9
+ */
10
+ export const file_nomos_custody_v1_snapshot = /*@__PURE__*/
11
+ fileDesc("Ch9ub21vcy9jdXN0b2R5L3YxL3NuYXBzaG90LnByb3RvEhBub21vcy5jdXN0b2R5LnYxIqACChRMb2NhbEN1c3RvZHlTbmFwc2hvdBIWCg5mb3JtYXRfdmVyc2lvbhgBIAEoDRIWCgl3b3Jrc3BhY2UYAiABKAlIAIgBARIMCgR0cmVlGAMgASgMEhcKCmNoZWNrcG9pbnQYBCABKAxIAYgBARIVCghmcm9udGllchgFIAEoDEgCiAEBEhMKBmN1cnNvchgGIAEoCUgDiAEBEhcKCnN0YXRlX3Jvb3QYByABKAlIBIgBARIYCgtzeW5jZWRfYmFzZRgIIAEoCUgFiAEBQgwKCl93b3Jrc3BhY2VCDQoLX2NoZWNrcG9pbnRCCwoJX2Zyb250aWVyQgkKB19jdXJzb3JCDQoLX3N0YXRlX3Jvb3RCDgoMX3N5bmNlZF9iYXNlYgZwcm90bzM");
12
+
13
+ /**
14
+ * Describes the message nomos.custody.v1.LocalCustodySnapshot.
15
+ * Use `create(LocalCustodySnapshotSchema)` to create a new message.
16
+ */
17
+ export const LocalCustodySnapshotSchema = /*@__PURE__*/
18
+ messageDesc(file_nomos_custody_v1_snapshot, 0);
@@ -0,0 +1,56 @@
1
+ // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file nomos/discovery/v1/workspace_placement.proto (package nomos.discovery.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import type { Message } from "@bufbuild/protobuf";
7
+
8
+ /**
9
+ * Describes the file nomos/discovery/v1/workspace_placement.proto.
10
+ */
11
+ export declare const file_nomos_discovery_v1_workspace_placement: GenFile;
12
+
13
+ /**
14
+ * An availability description returned by a workspace discovery provider.
15
+ *
16
+ * This is deliberately outside the kernel and peer-runtime protocol packages:
17
+ * it reports where custody might be reached, but proves neither placement nor
18
+ * workspace authority. The Peer Office passes policy_usda to the kernel before
19
+ * acting on it, and every remote mutation still enters through offer.
20
+ *
21
+ * @generated from message nomos.discovery.v1.DiscoveredWorkspacePlacement
22
+ */
23
+ export declare type DiscoveredWorkspacePlacement = Message<"nomos.discovery.v1.DiscoveredWorkspacePlacement"> & {
24
+ /**
25
+ * @generated from field: string workspace = 1;
26
+ */
27
+ workspace: string;
28
+
29
+ /**
30
+ * @generated from field: optional string frontier = 2;
31
+ */
32
+ frontier?: string | undefined;
33
+
34
+ /**
35
+ * @generated from field: bytes policy_usda = 3;
36
+ */
37
+ policyUsda: Uint8Array;
38
+
39
+ /**
40
+ * @generated from field: string custody_lease_url = 4;
41
+ */
42
+ custodyLeaseUrl: string;
43
+
44
+ /**
45
+ * Provider-supplied availability hint, not committed placement policy.
46
+ *
47
+ * @generated from field: string candidate_reception_url = 5;
48
+ */
49
+ candidateReceptionUrl: string;
50
+ };
51
+
52
+ /**
53
+ * Describes the message nomos.discovery.v1.DiscoveredWorkspacePlacement.
54
+ * Use `create(DiscoveredWorkspacePlacementSchema)` to create a new message.
55
+ */
56
+ export declare const DiscoveredWorkspacePlacementSchema: GenMessage<DiscoveredWorkspacePlacement>;
@@ -0,0 +1,18 @@
1
+ // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file nomos/discovery/v1/workspace_placement.proto (package nomos.discovery.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
6
+
7
+ /**
8
+ * Describes the file nomos/discovery/v1/workspace_placement.proto.
9
+ */
10
+ export const file_nomos_discovery_v1_workspace_placement = /*@__PURE__*/
11
+ fileDesc("Cixub21vcy9kaXNjb3ZlcnkvdjEvd29ya3NwYWNlX3BsYWNlbWVudC5wcm90bxISbm9tb3MuZGlzY292ZXJ5LnYxIqYBChxEaXNjb3ZlcmVkV29ya3NwYWNlUGxhY2VtZW50EhEKCXdvcmtzcGFjZRgBIAEoCRIVCghmcm9udGllchgCIAEoCUgAiAEBEhMKC3BvbGljeV91c2RhGAMgASgMEhkKEWN1c3RvZHlfbGVhc2VfdXJsGAQgASgJEh8KF2NhbmRpZGF0ZV9yZWNlcHRpb25fdXJsGAUgASgJQgsKCV9mcm9udGllcmIGcHJvdG8z");
12
+
13
+ /**
14
+ * Describes the message nomos.discovery.v1.DiscoveredWorkspacePlacement.
15
+ * Use `create(DiscoveredWorkspacePlacementSchema)` to create a new message.
16
+ */
17
+ export const DiscoveredWorkspacePlacementSchema = /*@__PURE__*/
18
+ messageDesc(file_nomos_discovery_v1_workspace_placement, 0);