@skill-harness/adapters 0.8.0 → 0.10.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.
@@ -0,0 +1,460 @@
1
+ /** pi-daddy commit whose contract artifact this schema was taken from. */
2
+ export declare const PI_DADDY_CONTRACT_COMMIT = "1948b9406c13c9730f2fc103e68023d6e58c5e85";
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";
5
+ /** pi-daddy's canonical, closed ledgerVersion 2 event schema (JSON Schema draft 2020-12). */
6
+ export declare const PI_DADDY_LEDGER_V2_SCHEMA: {
7
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
8
+ readonly $id: "https://github.com/mojomanyana/pi-daddy/contracts/ledger/v2/ledger-event.schema.json";
9
+ readonly title: "pi-daddy ledgerVersion 2 event";
10
+ readonly description: "One JSON object per JSONL line. This schema covers only explicit ledgerVersion 2 events; legacy GrantRecord lines have no version/event discriminator and are intentionally outside this schema.";
11
+ readonly oneOf: readonly [{
12
+ readonly $ref: "#/$defs/capabilityDecision";
13
+ }, {
14
+ readonly $ref: "#/$defs/workspaceLease";
15
+ }, {
16
+ readonly $ref: "#/$defs/childLifecycle";
17
+ }, {
18
+ readonly $ref: "#/$defs/checkReceipt";
19
+ }];
20
+ readonly $defs: {
21
+ readonly correlation: {
22
+ readonly type: "object";
23
+ readonly description: "Opaque, non-authoritative controller metadata. String and aggregate byte limits are additionally enforced by the runtime and cannot be represented exactly in JSON Schema.";
24
+ readonly properties: {
25
+ readonly schema_version: {
26
+ readonly type: "string";
27
+ readonly maxLength: 512;
28
+ };
29
+ readonly run_id: {
30
+ readonly type: "string";
31
+ readonly maxLength: 512;
32
+ };
33
+ readonly task_id: {
34
+ readonly type: "string";
35
+ readonly maxLength: 512;
36
+ };
37
+ readonly workspace_id: {
38
+ readonly type: "string";
39
+ readonly maxLength: 512;
40
+ };
41
+ readonly context_id: {
42
+ readonly type: "string";
43
+ readonly maxLength: 512;
44
+ };
45
+ readonly phase: {
46
+ readonly type: "string";
47
+ readonly maxLength: 512;
48
+ };
49
+ readonly assurance: {
50
+ readonly type: "string";
51
+ readonly maxLength: 512;
52
+ };
53
+ readonly assurance_effective: {
54
+ readonly type: "string";
55
+ readonly maxLength: 512;
56
+ };
57
+ readonly policy_label: {
58
+ readonly type: "string";
59
+ readonly maxLength: 512;
60
+ };
61
+ readonly assurance_source: {
62
+ readonly type: "string";
63
+ readonly maxLength: 512;
64
+ };
65
+ readonly assurance_scope: {};
66
+ readonly activated_at: {
67
+ readonly type: "string";
68
+ readonly maxLength: 512;
69
+ };
70
+ readonly plan_digest: {
71
+ readonly type: "string";
72
+ readonly maxLength: 512;
73
+ };
74
+ readonly definition_digest: {
75
+ readonly type: "string";
76
+ readonly maxLength: 512;
77
+ };
78
+ readonly task_digest: {
79
+ readonly type: "string";
80
+ readonly maxLength: 512;
81
+ };
82
+ readonly base_sha: {
83
+ readonly type: "string";
84
+ readonly maxLength: 512;
85
+ };
86
+ readonly head_sha: {
87
+ readonly type: "string";
88
+ readonly maxLength: 512;
89
+ };
90
+ readonly tree_sha: {
91
+ readonly type: "string";
92
+ readonly maxLength: 512;
93
+ };
94
+ readonly event_seq: {
95
+ readonly type: "number";
96
+ };
97
+ readonly last_change_seq: {
98
+ readonly type: "number";
99
+ };
100
+ readonly last_authority_seq: {
101
+ readonly type: "number";
102
+ };
103
+ readonly check_receipt_id: {
104
+ readonly type: "string";
105
+ readonly maxLength: 512;
106
+ };
107
+ };
108
+ readonly additionalProperties: false;
109
+ };
110
+ readonly refusalCode: {
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"];
113
+ };
114
+ readonly refusal: {
115
+ readonly type: "object";
116
+ readonly properties: {
117
+ readonly code: {
118
+ readonly $ref: "#/$defs/refusalCode";
119
+ };
120
+ readonly message: {
121
+ readonly type: "string";
122
+ };
123
+ readonly details: {
124
+ readonly type: "object";
125
+ readonly additionalProperties: {
126
+ readonly type: readonly ["string", "number", "boolean", "null"];
127
+ };
128
+ };
129
+ };
130
+ readonly required: readonly ["code", "message"];
131
+ readonly additionalProperties: false;
132
+ };
133
+ readonly approvalSource: {
134
+ readonly type: "string";
135
+ readonly enum: readonly ["prompt", "session", "persisted", "inherited"];
136
+ };
137
+ readonly approvalScope: {
138
+ readonly type: "string";
139
+ readonly enum: readonly ["once", "session", "always"];
140
+ };
141
+ readonly approvalUse: {
142
+ readonly type: "object";
143
+ readonly properties: {
144
+ readonly max: {
145
+ readonly type: "integer";
146
+ readonly minimum: 0;
147
+ };
148
+ readonly remaining: {
149
+ readonly type: "integer";
150
+ readonly minimum: 0;
151
+ };
152
+ };
153
+ readonly required: readonly ["max", "remaining"];
154
+ readonly additionalProperties: false;
155
+ };
156
+ readonly definitionDigest: {
157
+ readonly type: "object";
158
+ readonly properties: {
159
+ readonly name: {
160
+ readonly type: "string";
161
+ };
162
+ readonly source: {
163
+ readonly type: "string";
164
+ };
165
+ readonly sha256: {
166
+ readonly type: "string";
167
+ readonly pattern: "^[a-fA-F0-9]{64}$";
168
+ };
169
+ };
170
+ readonly required: readonly ["name", "source", "sha256"];
171
+ readonly additionalProperties: false;
172
+ };
173
+ readonly capabilityDecision: {
174
+ readonly type: "object";
175
+ readonly properties: {
176
+ readonly ledgerVersion: {
177
+ readonly const: 2;
178
+ };
179
+ readonly event: {
180
+ readonly const: "capability_decision";
181
+ };
182
+ readonly ts: {
183
+ readonly type: "string";
184
+ readonly format: "date-time";
185
+ };
186
+ readonly parentId: {
187
+ readonly type: "string";
188
+ readonly minLength: 1;
189
+ };
190
+ readonly childId: {
191
+ readonly type: "string";
192
+ readonly minLength: 1;
193
+ };
194
+ readonly depth: {
195
+ readonly type: "integer";
196
+ readonly minimum: 0;
197
+ };
198
+ readonly agentType: {
199
+ readonly type: "string";
200
+ };
201
+ readonly requested: {
202
+ readonly type: "array";
203
+ readonly items: {
204
+ readonly type: "string";
205
+ };
206
+ };
207
+ readonly parentGrant: {
208
+ readonly type: "array";
209
+ readonly items: {
210
+ readonly type: "string";
211
+ };
212
+ };
213
+ readonly effective: {
214
+ readonly type: "array";
215
+ readonly items: {
216
+ readonly type: "string";
217
+ };
218
+ };
219
+ readonly denied: {
220
+ readonly type: "array";
221
+ readonly items: {
222
+ readonly type: "string";
223
+ };
224
+ };
225
+ readonly clipped: {
226
+ readonly type: "array";
227
+ readonly items: {
228
+ readonly type: "string";
229
+ };
230
+ };
231
+ readonly gatedBlocked: {
232
+ readonly type: "array";
233
+ readonly items: {
234
+ readonly type: "string";
235
+ };
236
+ };
237
+ readonly blocked: {
238
+ readonly type: "boolean";
239
+ };
240
+ readonly reason: {
241
+ readonly type: "string";
242
+ };
243
+ readonly approved: {
244
+ readonly type: "array";
245
+ readonly items: {
246
+ readonly type: "string";
247
+ };
248
+ };
249
+ readonly approvalSource: {
250
+ readonly $ref: "#/$defs/approvalSource";
251
+ };
252
+ readonly approvalSources: {
253
+ readonly type: "object";
254
+ readonly additionalProperties: {
255
+ readonly $ref: "#/$defs/approvalSource";
256
+ };
257
+ };
258
+ readonly approvalScopes: {
259
+ readonly type: "object";
260
+ readonly additionalProperties: {
261
+ readonly $ref: "#/$defs/approvalScope";
262
+ };
263
+ };
264
+ readonly approvalExpiresAt: {
265
+ readonly type: "object";
266
+ readonly additionalProperties: {
267
+ readonly type: "string";
268
+ readonly format: "date-time";
269
+ };
270
+ };
271
+ readonly approvalUses: {
272
+ readonly type: "object";
273
+ readonly additionalProperties: {
274
+ readonly $ref: "#/$defs/approvalUse";
275
+ };
276
+ };
277
+ readonly approvalScope: {
278
+ readonly $ref: "#/$defs/approvalScope";
279
+ };
280
+ readonly humanDenied: {
281
+ readonly const: true;
282
+ };
283
+ readonly gateOutcome: {
284
+ readonly type: "string";
285
+ readonly enum: readonly ["declined", "dismissed", "no-ui", "error"];
286
+ };
287
+ readonly definitionDigest: {
288
+ readonly $ref: "#/$defs/definitionDigest";
289
+ };
290
+ readonly executor: {
291
+ readonly type: "string";
292
+ readonly enum: readonly ["process", "herdr"];
293
+ };
294
+ readonly taskFrom: {
295
+ readonly type: "string";
296
+ };
297
+ readonly taskDigest: {
298
+ readonly type: "string";
299
+ readonly pattern: "^[a-fA-F0-9]{64}$";
300
+ };
301
+ readonly correlation: {
302
+ readonly $ref: "#/$defs/correlation";
303
+ };
304
+ readonly refusal: {
305
+ readonly $ref: "#/$defs/refusal";
306
+ };
307
+ };
308
+ readonly required: readonly ["ledgerVersion", "event", "ts", "parentId", "childId", "depth", "requested", "parentGrant", "effective", "denied", "clipped", "gatedBlocked", "blocked", "executor", "taskDigest"];
309
+ readonly additionalProperties: false;
310
+ };
311
+ readonly workspaceLease: {
312
+ readonly type: "object";
313
+ readonly properties: {
314
+ readonly ledgerVersion: {
315
+ readonly const: 2;
316
+ };
317
+ readonly event: {
318
+ readonly const: "workspace_lease";
319
+ };
320
+ readonly ts: {
321
+ readonly type: "string";
322
+ readonly format: "date-time";
323
+ };
324
+ readonly childId: {
325
+ readonly type: "string";
326
+ readonly minLength: 1;
327
+ };
328
+ readonly workspaceId: {
329
+ readonly type: "string";
330
+ readonly minLength: 1;
331
+ };
332
+ readonly root: {
333
+ readonly type: "string";
334
+ readonly minLength: 1;
335
+ };
336
+ readonly access: {
337
+ readonly type: "string";
338
+ readonly enum: readonly ["read", "write"];
339
+ };
340
+ readonly outcome: {
341
+ readonly type: "string";
342
+ readonly enum: readonly ["acquired", "uncontended", "refused", "released", "released-unrecorded", "lost", "retained", "timeout", "recovered"];
343
+ };
344
+ readonly recovered: {
345
+ readonly oneOf: readonly [{
346
+ readonly type: "boolean";
347
+ }, {
348
+ readonly const: "unknown";
349
+ }];
350
+ };
351
+ readonly releaseReason: {
352
+ readonly type: "string";
353
+ };
354
+ readonly refusal: {
355
+ readonly $ref: "#/$defs/refusal";
356
+ };
357
+ readonly correlation: {
358
+ readonly $ref: "#/$defs/correlation";
359
+ };
360
+ };
361
+ readonly required: readonly ["ledgerVersion", "event", "ts", "childId", "workspaceId", "root", "access", "outcome"];
362
+ readonly additionalProperties: false;
363
+ };
364
+ readonly childLifecycle: {
365
+ readonly type: "object";
366
+ readonly properties: {
367
+ readonly ledgerVersion: {
368
+ readonly const: 2;
369
+ };
370
+ readonly event: {
371
+ readonly const: "child_lifecycle";
372
+ };
373
+ readonly ts: {
374
+ readonly type: "string";
375
+ readonly format: "date-time";
376
+ };
377
+ readonly childId: {
378
+ readonly type: "string";
379
+ readonly minLength: 1;
380
+ };
381
+ readonly state: {
382
+ readonly type: "string";
383
+ readonly enum: readonly ["starting", "completed", "failed"];
384
+ };
385
+ readonly executor: {
386
+ readonly type: "string";
387
+ readonly enum: readonly ["process", "herdr"];
388
+ };
389
+ readonly exitCode: {
390
+ readonly type: readonly ["integer", "null"];
391
+ };
392
+ readonly signal: {
393
+ readonly oneOf: readonly [{
394
+ readonly type: "string";
395
+ readonly enum: readonly ["SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD", "SIGCONT", "SIGFPE", "SIGHUP", "SIGILL", "SIGINT", "SIGIO", "SIGIOT", "SIGKILL", "SIGPIPE", "SIGPOLL", "SIGPROF", "SIGPWR", "SIGQUIT", "SIGSEGV", "SIGSTKFLT", "SIGSTOP", "SIGSYS", "SIGTERM", "SIGTRAP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGUNUSED", "SIGURG", "SIGUSR1", "SIGUSR2", "SIGVTALRM", "SIGWINCH", "SIGXCPU", "SIGXFSZ", "SIGBREAK", "SIGLOST", "SIGINFO"];
396
+ }, {
397
+ readonly type: "null";
398
+ }];
399
+ };
400
+ readonly timedOut: {
401
+ readonly const: true;
402
+ };
403
+ readonly aborted: {
404
+ readonly const: true;
405
+ };
406
+ readonly truncated: {
407
+ readonly const: true;
408
+ };
409
+ readonly reason: {
410
+ readonly type: "string";
411
+ };
412
+ readonly correlation: {
413
+ readonly $ref: "#/$defs/correlation";
414
+ };
415
+ };
416
+ readonly required: readonly ["ledgerVersion", "event", "ts", "childId", "state", "executor"];
417
+ readonly additionalProperties: false;
418
+ };
419
+ readonly checkReceipt: {
420
+ readonly type: "object";
421
+ readonly properties: {
422
+ readonly ledgerVersion: {
423
+ readonly const: 2;
424
+ };
425
+ readonly event: {
426
+ readonly const: "check_receipt";
427
+ };
428
+ readonly ts: {
429
+ readonly type: "string";
430
+ readonly format: "date-time";
431
+ };
432
+ readonly childId: {
433
+ readonly type: "string";
434
+ readonly minLength: 1;
435
+ };
436
+ readonly receiptId: {
437
+ readonly type: "string";
438
+ readonly pattern: "^[a-fA-F0-9]{64}$";
439
+ };
440
+ readonly workspaceId: {
441
+ readonly type: "string";
442
+ readonly minLength: 1;
443
+ };
444
+ readonly checkId: {
445
+ readonly type: "string";
446
+ readonly minLength: 1;
447
+ };
448
+ readonly treeSha: {
449
+ readonly type: "string";
450
+ readonly minLength: 1;
451
+ };
452
+ readonly correlation: {
453
+ readonly $ref: "#/$defs/correlation";
454
+ };
455
+ };
456
+ readonly required: readonly ["ledgerVersion", "event", "ts", "childId", "receiptId", "workspaceId", "checkId", "treeSha"];
457
+ readonly additionalProperties: false;
458
+ };
459
+ };
460
+ };