@skill-harness/adapters 0.11.0 → 0.13.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 (117) hide show
  1. package/README.md +2 -1
  2. package/dist/archive-access.d.ts +58 -0
  3. package/dist/archive-access.js +61 -0
  4. package/dist/archive-checkpoint.d.ts +47 -0
  5. package/dist/archive-checkpoint.js +116 -0
  6. package/dist/archive-facts.d.ts +19 -0
  7. package/dist/archive-facts.js +20 -0
  8. package/dist/archive-observer.d.ts +21 -0
  9. package/dist/archive-observer.js +79 -0
  10. package/dist/archive-policy.d.ts +107 -0
  11. package/dist/archive-policy.js +135 -0
  12. package/dist/archive-read-capability.d.ts +49 -0
  13. package/dist/archive-read-capability.js +45 -0
  14. package/dist/archive-retention-policy.d.ts +52 -0
  15. package/dist/archive-retention-policy.js +49 -0
  16. package/dist/archived-work.d.ts +44 -0
  17. package/dist/archived-work.js +59 -0
  18. package/dist/blind-intervention.d.ts +29 -0
  19. package/dist/blind-intervention.js +211 -0
  20. package/dist/closed-schema.d.ts +6 -0
  21. package/dist/closed-schema.js +70 -14
  22. package/dist/codex-diagnostic-model.d.ts +14 -0
  23. package/dist/codex-diagnostic-model.js +39 -0
  24. package/dist/codex-host-observer.d.ts +111 -0
  25. package/dist/codex-host-observer.js +309 -0
  26. package/dist/codex-https.d.ts +7 -0
  27. package/dist/codex-https.js +221 -0
  28. package/dist/codex-model-profile.d.ts +38 -0
  29. package/dist/codex-model-profile.js +54 -0
  30. package/dist/codex-producer-ipc.d.ts +55 -0
  31. package/dist/codex-producer-ipc.js +67 -0
  32. package/dist/codex-sdk-transport.d.ts +50 -0
  33. package/dist/codex-sdk-transport.js +294 -0
  34. package/dist/codex-subscription.d.ts +114 -0
  35. package/dist/codex-subscription.js +268 -0
  36. package/dist/evidence-archive.d.ts +57 -0
  37. package/dist/evidence-archive.js +221 -0
  38. package/dist/execution-projection-schema.d.ts +10 -0
  39. package/dist/execution-projection-schema.js +30 -0
  40. package/dist/execution-retention-archive.d.ts +69 -0
  41. package/dist/execution-retention-archive.js +154 -0
  42. package/dist/generated/retention-v2-contract.d.ts +72 -0
  43. package/dist/generated/retention-v2-contract.js +105 -0
  44. package/dist/generated/retention-v2-json.d.ts +24 -0
  45. package/dist/generated/retention-v2-json.js +268 -0
  46. package/dist/generated/retention-v2-native-json.d.ts +2 -0
  47. package/dist/generated/retention-v2-native-json.js +33 -0
  48. package/dist/generated/retention-v2-native.d.ts +58 -0
  49. package/dist/generated/retention-v2-native.js +155 -0
  50. package/dist/generated/retention-v2-pin.d.ts +2 -0
  51. package/dist/generated/retention-v2-pin.js +4 -0
  52. package/dist/generated/retention-v2-types.d.ts +49 -0
  53. package/dist/generated/retention-v2-types.js +2 -0
  54. package/dist/generated/retention-v2-work-types.d.ts +260 -0
  55. package/dist/generated/retention-v2-work-types.js +13 -0
  56. package/dist/generated/work-v4/execution-id.d.ts +5 -0
  57. package/dist/generated/work-v4/execution-id.js +14 -0
  58. package/dist/generated/work-v4/json.d.ts +24 -0
  59. package/dist/generated/work-v4/json.js +268 -0
  60. package/dist/generated/work-v4/occurrences.d.ts +226 -0
  61. package/dist/generated/work-v4/occurrences.js +116 -0
  62. package/dist/generated/work-v4/pin.d.ts +1 -0
  63. package/dist/generated/work-v4/pin.js +3 -0
  64. package/dist/generated/work-v4/projection.d.ts +294 -0
  65. package/dist/generated/work-v4/projection.js +238 -0
  66. package/dist/generated/work-v4/reader.d.ts +24 -0
  67. package/dist/generated/work-v4/reader.js +109 -0
  68. package/dist/generated/work-v4/snapshot.d.ts +28 -0
  69. package/dist/generated/work-v4/snapshot.js +268 -0
  70. package/dist/generated/work-v4/types.d.ts +260 -0
  71. package/dist/generated/work-v4/types.js +13 -0
  72. package/dist/generated/work-v4/validation.d.ts +13 -0
  73. package/dist/generated/work-v4/validation.js +227 -0
  74. package/dist/index.d.ts +24 -0
  75. package/dist/index.js +24 -0
  76. package/dist/installed-review-session.d.ts +28 -0
  77. package/dist/installed-review-session.js +166 -0
  78. package/dist/intervention-run.d.ts +403 -0
  79. package/dist/intervention-run.js +169 -0
  80. package/dist/learning-case.d.ts +12 -0
  81. package/dist/learning-case.js +15 -0
  82. package/dist/learning-journal.d.ts +18 -0
  83. package/dist/learning-journal.js +256 -0
  84. package/dist/pi-daddy-ledger-v2.d.ts +4 -4
  85. package/dist/pi-daddy-ledger-v2.js +9 -7
  86. package/dist/pi-daddy-ledger-v3.d.ts +683 -0
  87. package/dist/pi-daddy-ledger-v3.js +961 -0
  88. package/dist/pi.js +115 -24
  89. package/dist/principal-payload-port.d.ts +25 -0
  90. package/dist/principal-payload-port.js +40 -0
  91. package/dist/producer-product.d.ts +70 -0
  92. package/dist/producer-product.js +186 -0
  93. package/dist/producer-review.d.ts +53 -0
  94. package/dist/producer-review.js +207 -0
  95. package/dist/prompt-capture-extension.d.ts +10 -0
  96. package/dist/prompt-capture-extension.js +26 -0
  97. package/dist/prompt-provenance.d.ts +22 -0
  98. package/dist/prompt-provenance.js +146 -0
  99. package/dist/reviewed-archive-export.d.ts +42 -0
  100. package/dist/reviewed-archive-export.js +78 -0
  101. package/dist/trajectory.d.ts +15 -9
  102. package/dist/trajectory.js +375 -55
  103. package/dist/trust-lifecycle.d.ts +128 -0
  104. package/dist/trust-lifecycle.js +200 -0
  105. package/dist/weekly-investigation.d.ts +237 -0
  106. package/dist/weekly-investigation.js +330 -0
  107. package/dist/work-candidates.d.ts +29 -0
  108. package/dist/work-candidates.js +78 -0
  109. package/dist/work-case-archive.d.ts +25 -0
  110. package/dist/work-case-archive.js +63 -0
  111. package/dist/work-case-review.d.ts +45 -0
  112. package/dist/work-case-review.js +220 -0
  113. package/dist/work-signal-cases.d.ts +15 -0
  114. package/dist/work-signal-cases.js +54 -0
  115. package/dist/work-signal-observation.d.ts +23 -0
  116. package/dist/work-signal-observation.js +89 -0
  117. package/package.json +4 -3
@@ -0,0 +1,256 @@
1
+ import { constants, openSync, closeSync, readSync, writeSync, fstatSync, lstatSync, fsyncSync, mkdirSync, unlinkSync } from 'node:fs';
2
+ import { createHash, randomUUID } from 'node:crypto';
3
+ import { types } from 'node:util';
4
+ import { isAbsolute, join, dirname, parse, resolve } from 'node:path';
5
+ import { interventionCanonicalJson } from '@skill-harness/core';
6
+ export function learningJson(value) {
7
+ const limit = 2 * 1024 * 1024, cache = new WeakMap(), visiting = new WeakSet();
8
+ const size = (v, depth) => {
9
+ if (depth > 16)
10
+ throw Error('learning JSON depth bound');
11
+ if (v === null || typeof v === 'boolean' || typeof v === 'string' || typeof v === 'number' && Number.isFinite(v)) {
12
+ if (typeof v === 'string' && Buffer.byteLength(v) > limit)
13
+ throw Error('learning JSON byte bound');
14
+ const bytes = Buffer.byteLength(JSON.stringify(v));
15
+ if (bytes > limit)
16
+ throw Error('learning JSON byte bound');
17
+ return { bytes, height: 0 };
18
+ }
19
+ if (!v || typeof v !== 'object')
20
+ throw Error('plain learning JSON required');
21
+ if (types.isProxy(v))
22
+ throw Error('learning proxy refused');
23
+ const old = cache.get(v);
24
+ if (old) {
25
+ if (depth + old.height > 16)
26
+ throw Error('learning JSON depth bound');
27
+ return old;
28
+ }
29
+ if (visiting.has(v))
30
+ throw Error('cyclic learning JSON refused');
31
+ visiting.add(v);
32
+ const array = Array.isArray(v), prototype = Object.getPrototypeOf(v), descriptors = Object.getOwnPropertyDescriptors(v);
33
+ if (array ? prototype !== Array.prototype : prototype !== Object.prototype && prototype !== null)
34
+ throw Error('plain learning JSON required');
35
+ const keys = Reflect.ownKeys(descriptors);
36
+ if (array && (v.length > 4096 || keys.length !== v.length + 1))
37
+ throw Error('dense bounded learning array required');
38
+ const fields = array ? Array.from({ length: v.length }, (_, i) => String(i)) : keys;
39
+ let bytes = 2, height = 0;
40
+ for (let i = 0; i < fields.length; i++) {
41
+ const key = fields[i];
42
+ if (typeof key !== 'string')
43
+ throw Error('plain learning property required');
44
+ const d = descriptors[key];
45
+ if (!d || !('value' in d) || !d.enumerable)
46
+ throw Error('plain learning property required');
47
+ const child = size(d.value, depth + 1);
48
+ bytes += child.bytes + (i ? 1 : 0) + (array ? 0 : Buffer.byteLength(JSON.stringify(key)) + 1);
49
+ height = Math.max(height, child.height + 1);
50
+ if (bytes > limit)
51
+ throw Error('learning JSON byte bound');
52
+ }
53
+ visiting.delete(v);
54
+ const result = { bytes, height };
55
+ cache.set(v, result);
56
+ return result;
57
+ };
58
+ size(value, 0);
59
+ return interventionCanonicalJson(value);
60
+ }
61
+ export const learningHash = (value) => createHash('sha256').update(learningJson(value)).digest('hex');
62
+ export const learningCopy = (value) => JSON.parse(learningJson(value));
63
+ const LIMIT = 4 * 1024 * 1024;
64
+ function directory(path) {
65
+ if (!isAbsolute(path))
66
+ throw Error('absolute learning directory required');
67
+ for (let p = path;; p = dirname(p)) {
68
+ const s = lstatSync(p);
69
+ if (!s.isDirectory() || s.isSymbolicLink())
70
+ throw Error('learning directory substitution');
71
+ if (p === parse(p).root)
72
+ break;
73
+ }
74
+ const s = lstatSync(path);
75
+ if ((s.mode & 0o077) || (process.getuid && s.uid !== process.getuid()))
76
+ throw Error('private owned learning directory required');
77
+ }
78
+ function sync(path) { const fd = openSync(path, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW); try {
79
+ fsyncSync(fd);
80
+ }
81
+ finally {
82
+ closeSync(fd);
83
+ } }
84
+ export function learningFile(path, limit = 1024 * 1024) {
85
+ if (!constants.O_NOFOLLOW || !constants.O_NONBLOCK)
86
+ throw Error('required safe file flags unavailable');
87
+ if (!isAbsolute(path))
88
+ throw Error('absolute learning file required');
89
+ // Reject every symlink ancestor, but do not require public parent directories to be private.
90
+ for (let p = dirname(path);; p = dirname(p)) {
91
+ const s = lstatSync(p);
92
+ if (!s.isDirectory() || s.isSymbolicLink())
93
+ throw Error('learning file ancestor substitution');
94
+ if (p === parse(p).root)
95
+ break;
96
+ }
97
+ const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
98
+ try {
99
+ const s = fstatSync(fd);
100
+ if (!s.isFile() || s.nlink !== 1 || s.size > limit)
101
+ throw Error('bounded regular learning file required');
102
+ const out = Buffer.alloc(limit + 1);
103
+ let n = 0;
104
+ while (n < out.length) {
105
+ const k = readSync(fd, out, n, out.length - n, n);
106
+ if (!k)
107
+ break;
108
+ n += k;
109
+ }
110
+ if (n > limit)
111
+ throw Error('learning file bound exceeded');
112
+ return out.subarray(0, n);
113
+ }
114
+ finally {
115
+ closeSync(fd);
116
+ }
117
+ }
118
+ /** Shared durable CAS for the weekly supervisor and trust lifecycle. Trusted cooperative filesystem,
119
+ * not hostile same-UID rollback protection. A stranded claim is never automatically recovered. */
120
+ export function learningJournal(path, initial) {
121
+ if (!constants.O_NOFOLLOW || !constants.O_NONBLOCK || !constants.O_DIRECTORY)
122
+ throw Error('required safe journal flags unavailable');
123
+ if (initial !== undefined) {
124
+ directory(dirname(path));
125
+ mkdirSync(path, { mode: 0o700 });
126
+ directory(path);
127
+ const value = learningCopy(initial), body = { prior: null, value }, record = { ...body, id: learningHash(body) };
128
+ const fd = openSync(join(path, 'events.jsonl'), constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600);
129
+ try {
130
+ writeAll(fd, Buffer.from(learningJson(record) + '\n'));
131
+ fsyncSync(fd);
132
+ }
133
+ finally {
134
+ closeSync(fd);
135
+ }
136
+ sync(path);
137
+ sync(dirname(path));
138
+ }
139
+ directory(path);
140
+ const identity = lstatSync(path), file = join(path, 'events.jsonl');
141
+ const check = () => { directory(path); const s = lstatSync(path); if (s.dev !== identity.dev || s.ino !== identity.ino)
142
+ throw Error('learning directory identity changed'); };
143
+ const read = () => {
144
+ check();
145
+ const stat = lstatSync(file);
146
+ if ((stat.mode & 0o077) || (process.getuid && stat.uid !== process.getuid()))
147
+ throw Error('private learning journal required');
148
+ const text = learningFile(file, LIMIT).toString('utf8');
149
+ if (!text.endsWith('\n'))
150
+ throw Error('learning history incomplete');
151
+ const lines = text.slice(0, -1).split('\n');
152
+ if (!lines.length || lines.length > 4096)
153
+ throw Error('learning history bound');
154
+ let prior = null;
155
+ return lines.map(line => { const r = JSON.parse(line); if (learningJson(r) !== line || Object.keys(r).sort().join() !== 'id,prior,value' || r.prior !== prior || r.id !== learningHash({ prior, value: r.value }))
156
+ throw Error('learning history identity mismatch'); prior = r.id; return r; });
157
+ };
158
+ read();
159
+ return { read, append(prior, value) {
160
+ check();
161
+ const lock = join(path, 'writer.lock'), token = randomUUID();
162
+ const fd = openSync(lock, constants.O_RDWR | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600), owned = fstatSync(fd);
163
+ let error, result;
164
+ try {
165
+ writeAll(fd, Buffer.from(token));
166
+ fsyncSync(fd);
167
+ const history = read();
168
+ if (history.at(-1).id !== prior)
169
+ throw Error('stale learning CAS');
170
+ if (history.length >= 4096)
171
+ throw Error('learning history bound');
172
+ const body = { prior, value: learningCopy(value) }, event = { ...body, id: learningHash(body) }, line = Buffer.from(learningJson(event) + '\n');
173
+ const out = openSync(file, constants.O_WRONLY | constants.O_APPEND | constants.O_NOFOLLOW | constants.O_NONBLOCK);
174
+ try {
175
+ const s = fstatSync(out);
176
+ if (!s.isFile() || s.nlink !== 1 || (s.mode & 0o077) || s.size + line.length > LIMIT)
177
+ throw Error('learning append refused');
178
+ writeAll(out, line);
179
+ fsyncSync(out);
180
+ }
181
+ finally {
182
+ closeSync(out);
183
+ }
184
+ sync(path);
185
+ result = event;
186
+ }
187
+ catch (e) {
188
+ error = e;
189
+ }
190
+ finally {
191
+ try {
192
+ const s = lstatSync(lock);
193
+ if (s.dev !== owned.dev || s.ino !== owned.ino || learningFile(lock, 128).toString() !== token)
194
+ throw Error('learning lock ownership lost');
195
+ unlinkSync(lock);
196
+ sync(path);
197
+ }
198
+ catch (e) {
199
+ error ??= e;
200
+ }
201
+ finally {
202
+ try {
203
+ closeSync(fd);
204
+ }
205
+ catch (e) {
206
+ error ??= e;
207
+ }
208
+ }
209
+ }
210
+ if (error)
211
+ throw error;
212
+ return result;
213
+ } };
214
+ }
215
+ /** One authoritative store per weekly key/policy in this archive; a renamed directory cannot refill it. */
216
+ export function registerLearningStore(root, kind, key, target, binding) {
217
+ if (!/^[a-f0-9]{64}$/.test(key) || !isAbsolute(target) || !['weekly', 'trust', 'intervention', 'access'].includes(kind))
218
+ throw Error('invalid learning registration');
219
+ directory(root);
220
+ directory(dirname(target));
221
+ const parent = join(root, 'learning-stores');
222
+ try {
223
+ mkdirSync(parent, { mode: 0o700 });
224
+ sync(root);
225
+ }
226
+ catch (e) {
227
+ if (e.code !== 'EEXIST')
228
+ throw e;
229
+ }
230
+ directory(parent);
231
+ const path = join(parent, `${kind}-${key}`), initial = { type: 'learning-registration-v1', target: resolve(target), binding };
232
+ try {
233
+ learningJournal(path, initial);
234
+ }
235
+ catch (e) {
236
+ if (e.code !== 'EEXIST')
237
+ throw e;
238
+ const records = learningJournal(path).read();
239
+ if (records.length !== 1 || learningHash(records[0].value) !== learningHash(initial))
240
+ throw Error('learning key already bound to another store or input');
241
+ }
242
+ }
243
+ export function verifyLearningStore(root, kind, key, target, binding) {
244
+ if (!/^[a-f0-9]{64}$/.test(key) || !isAbsolute(target))
245
+ throw Error('invalid learning registration');
246
+ const records = learningJournal(join(root, 'learning-stores', `${kind}-${key}`)).read();
247
+ if (records.length !== 1 || learningHash(records[0].value) !== learningHash({ type: 'learning-registration-v1', target: resolve(target), binding }))
248
+ throw Error('learning store registration mismatch');
249
+ }
250
+ function writeAll(fd, bytes) { let n = 0; while (n < bytes.length) {
251
+ const k = writeSync(fd, bytes, n, bytes.length - n);
252
+ if (!k)
253
+ throw Error('learning write stalled');
254
+ n += k;
255
+ } }
256
+ //# sourceMappingURL=learning-journal.js.map
@@ -1,7 +1,7 @@
1
- /** pi-daddy commit whose contract artifact this schema was taken from. */
2
- export declare const PI_DADDY_CONTRACT_COMMIT = "1948b9406c13c9730f2fc103e68023d6e58c5e85";
1
+ /** pi-daddy commit whose contract artifacts this schema was taken from. */
2
+ export declare const PI_DADDY_CONTRACT_COMMIT = "c364a6717e3d5e369ecd3298b9cbb595eb94d9b2";
3
3
  /** SHA-256 of the byte-exact producer schema file this object was generated from. */
4
- export declare const PI_DADDY_LEDGER_V2_SCHEMA_SHA256 = "69c3a6856481b9250587c5785a8aadda87baba6cb03c79b209cff4f55f70a81c";
4
+ export declare const PI_DADDY_LEDGER_V2_SCHEMA_SHA256 = "3862bc451c25393dd40b198c62a8f94a3f58784e31da6dff05e3f06be71a3f86";
5
5
  /** pi-daddy's canonical, closed ledgerVersion 2 event schema (JSON Schema draft 2020-12). */
6
6
  export declare const PI_DADDY_LEDGER_V2_SCHEMA: {
7
7
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
@@ -109,7 +109,7 @@ export declare const PI_DADDY_LEDGER_V2_SCHEMA: {
109
109
  };
110
110
  readonly refusalCode: {
111
111
  readonly type: "string";
112
- readonly enum: readonly ["CAPABILITY_ESCALATION", "GRANT_ID_MALFORMED", "DEFINITION_NOT_AUTHORIZED", "UNDECLARED_TOOLS", "UNKNOWN_TOOL", "GATED_UNAPPROVED", "APPROVAL_EXPIRED", "APPROVAL_SCOPE_MISMATCH", "APPROVAL_FLOW_FAILED", "DEPTH_EXCEEDED", "FANOUT_EXCEEDED", "EXECUTOR_UNAVAILABLE", "CHILD_TIMED_OUT", "CHILD_CANCELLED", "CHILD_EXIT_NONZERO", "TASK_MISSING", "UNKNOWN_DEFINITION", "CEILING_PATTERNS_UNRESOLVED", "NARROWING_VIOLATED", "DEFINITION_UNREADABLE", "CORRELATION_TOO_LARGE", "CORRELATION_INVALID", "LEDGER_WRITE_FAILED", "FANOUT_FAILED", "WORKSPACE_NOT_REGISTERED", "WORKSPACE_WRITE_CONFLICT", "WORKSPACE_LEASE_STALE", "CHECK_NOT_CONFIGURED", "CHECK_CONFIGURATION_INVALID", "CHECK_IDENTITY_UNAVAILABLE", "CHECK_IDENTITY_MISMATCH"];
112
+ readonly enum: readonly ["CAPABILITY_ESCALATION", "GRANT_ID_MALFORMED", "DEFINITION_NOT_AUTHORIZED", "UNDECLARED_TOOLS", "UNKNOWN_TOOL", "GATED_UNAPPROVED", "APPROVAL_EXPIRED", "APPROVAL_SCOPE_MISMATCH", "APPROVAL_FLOW_FAILED", "DEPTH_EXCEEDED", "FANOUT_EXCEEDED", "EXECUTOR_UNAVAILABLE", "CHILD_TIMED_OUT", "CHILD_CANCELLED", "CHILD_EXIT_NONZERO", "TASK_MISSING", "UNKNOWN_DEFINITION", "CEILING_PATTERNS_UNRESOLVED", "NARROWING_VIOLATED", "DEFINITION_UNREADABLE", "CORRELATION_TOO_LARGE", "CORRELATION_INVALID", "LEDGER_WRITE_FAILED", "FANOUT_FAILED", "WORKSPACE_NOT_REGISTERED", "WORKSPACE_NOT_AUTHORIZED", "WORKSPACE_WRITE_CONFLICT", "WORKSPACE_LEASE_STALE", "CHECK_NOT_CONFIGURED", "CHECK_CONFIGURATION_INVALID", "CHECK_IDENTITY_UNAVAILABLE", "CHECK_IDENTITY_MISMATCH"];
113
113
  };
114
114
  readonly refusal: {
115
115
  readonly type: "object";
@@ -1,18 +1,19 @@
1
1
  // GENERATED by scripts/vendor-pi-daddy-contract.mjs — do not edit by hand.
2
2
  //
3
3
  // The runtime copy of pi-daddy's canonical `ledgerVersion: 2` JSON Schema, pinned to
4
- // producer commit 1948b9406c13c9730f2fc103e68023d6e58c5e85.
4
+ // producer commit c364a6717e3d5e369ecd3298b9cbb595eb94d9b2.
5
5
  // It is a module rather than a file read so it survives bundling (the pi extension is a
6
6
  // committed esbuild bundle) and so the published package needs no data asset.
7
7
  //
8
- // contracts/pi-daddy/ledger/v2/ holds the byte-exact producer artifact and its recorded
9
- // SHA-256 digests; packages/adapters/test/pi-daddy-contract.test.ts asserts those digests
10
- // and that this object still deep-equals the vendored bytes. Re-pin with:
8
+ // contracts/pi-daddy/ledger/v2/ holds the byte-exact producer artifacts and their
9
+ // SHA-256 digests; packages/adapters/test/pi-daddy-contract.test.ts asserts those
10
+ // digests and that this object still deep-equals the vendored bytes. Re-pin by first
11
+ // recording the commit/version in this script's PRODUCER_RELEASES map, then run:
11
12
  // node scripts/vendor-pi-daddy-contract.mjs <pi-daddy-checkout> <commit> [pr]
12
- /** pi-daddy commit whose contract artifact this schema was taken from. */
13
- export const PI_DADDY_CONTRACT_COMMIT = "1948b9406c13c9730f2fc103e68023d6e58c5e85";
13
+ /** pi-daddy commit whose contract artifacts this schema was taken from. */
14
+ export const PI_DADDY_CONTRACT_COMMIT = "c364a6717e3d5e369ecd3298b9cbb595eb94d9b2";
14
15
  /** SHA-256 of the byte-exact producer schema file this object was generated from. */
15
- export const PI_DADDY_LEDGER_V2_SCHEMA_SHA256 = "69c3a6856481b9250587c5785a8aadda87baba6cb03c79b209cff4f55f70a81c";
16
+ export const PI_DADDY_LEDGER_V2_SCHEMA_SHA256 = "3862bc451c25393dd40b198c62a8f94a3f58784e31da6dff05e3f06be71a3f86";
16
17
  /** pi-daddy's canonical, closed ledgerVersion 2 event schema (JSON Schema draft 2020-12). */
17
18
  export const PI_DADDY_LEDGER_V2_SCHEMA = {
18
19
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -151,6 +152,7 @@ export const PI_DADDY_LEDGER_V2_SCHEMA = {
151
152
  "LEDGER_WRITE_FAILED",
152
153
  "FANOUT_FAILED",
153
154
  "WORKSPACE_NOT_REGISTERED",
155
+ "WORKSPACE_NOT_AUTHORIZED",
154
156
  "WORKSPACE_WRITE_CONFLICT",
155
157
  "WORKSPACE_LEASE_STALE",
156
158
  "CHECK_NOT_CONFIGURED",