dsh-run2skill 0.1.0-alpha

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.
package/lib/index.d.ts ADDED
@@ -0,0 +1,1910 @@
1
+ import { z } from "zod";
2
+ import z$1 from "@deepseek-ai/schemastery";
3
+ //#region src/domain/observe/schemas.d.ts
4
+ declare const CaptureWorkItemV1Schema: z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<1>;
6
+ revision: z.ZodNumber;
7
+ workItemId: z.ZodString;
8
+ signalKey: z.ZodObject<{
9
+ rootSessionId: z.ZodString;
10
+ sessionCreatedAt: z.ZodNumber;
11
+ sessionCwdDigest: z.ZodString;
12
+ turn: z.ZodNumber;
13
+ turnEndSeq: z.ZodNumber;
14
+ turnInstanceDigest: z.ZodString;
15
+ triggerPolicyVersion: z.ZodLiteral<"cheap-trigger-v1">;
16
+ }, z.core.$strict>;
17
+ captureReason: z.ZodEnum<{
18
+ CHEAP_TRIGGER: "CHEAP_TRIGGER";
19
+ SCAN_INCOMPLETE: "SCAN_INCOMPLETE";
20
+ }>;
21
+ createdAt: z.ZodString;
22
+ updatedAt: z.ZodString;
23
+ turnOutcomeKind: z.ZodString;
24
+ rootIdentity: z.ZodObject<{
25
+ status: z.ZodLiteral<"ROOT">;
26
+ parentSessionId: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strict>;
28
+ workspaceBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
+ status: z.ZodLiteral<"BOUND">;
30
+ workspaceId: z.ZodString;
31
+ canonicalPath: z.ZodString;
32
+ observedAt: z.ZodString;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ status: z.ZodEnum<{
35
+ NO_CWD: "NO_CWD";
36
+ UNREGISTERED: "UNREGISTERED";
37
+ UNAVAILABLE: "UNAVAILABLE";
38
+ }>;
39
+ observedAt: z.ZodString;
40
+ }, z.core.$strict>], "status">;
41
+ scanStatus: z.ZodEnum<{
42
+ COMPLETE: "COMPLETE";
43
+ INCOMPLETE: "INCOMPLETE";
44
+ }>;
45
+ triggerHits: z.ZodArray<z.ZodObject<{
46
+ kind: z.ZodEnum<{
47
+ EXPLICIT_SAVE: "EXPLICIT_SAVE";
48
+ CORRECTION: "CORRECTION";
49
+ CONSTRAINT: "CONSTRAINT";
50
+ WORKFLOW: "WORKFLOW";
51
+ }>;
52
+ messageSeq: z.ZodNumber;
53
+ ruleId: z.ZodString;
54
+ confidence: z.ZodLiteral<"HIGH">;
55
+ }, z.core.$strict>>;
56
+ evidenceRefs: z.ZodArray<z.ZodObject<{
57
+ source: z.ZodLiteral<"USER_DIRECT">;
58
+ messageSeq: z.ZodNumber;
59
+ excerpt: z.ZodString;
60
+ excerptDigest: z.ZodString;
61
+ redactionKinds: z.ZodArray<z.ZodEnum<{
62
+ PRIVATE_KEY: "PRIVATE_KEY";
63
+ AUTHORIZATION: "AUTHORIZATION";
64
+ BEARER_TOKEN: "BEARER_TOKEN";
65
+ API_KEY: "API_KEY";
66
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
67
+ URL_CREDENTIAL: "URL_CREDENTIAL";
68
+ }>>;
69
+ truncated: z.ZodBoolean;
70
+ }, z.core.$strict>>;
71
+ captureBlockers: z.ZodArray<z.ZodEnum<{
72
+ TURN_BOUNDARY_INCOMPLETE: "TURN_BOUNDARY_INCOMPLETE";
73
+ TEXT_LIMIT_EXCEEDED: "TEXT_LIMIT_EXCEEDED";
74
+ REDACTION_UNAVAILABLE: "REDACTION_UNAVAILABLE";
75
+ }>>;
76
+ processingState: z.ZodEnum<{
77
+ CAPTURED: "CAPTURED";
78
+ ANALYZING: "ANALYZING";
79
+ LEARNED: "LEARNED";
80
+ READY_FOR_REVIEW: "READY_FOR_REVIEW";
81
+ PUBLISHING: "PUBLISHING";
82
+ TERMINAL: "TERMINAL";
83
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
84
+ RESOLVED_NO_SIGNAL: "RESOLVED_NO_SIGNAL";
85
+ }>;
86
+ learning: z.ZodOptional<z.ZodObject<{
87
+ policyVersion: z.ZodLiteral<"learning-v1">;
88
+ attempt: z.ZodNumber;
89
+ requestBudgetUsed: z.ZodNumber;
90
+ claimedAt: z.ZodOptional<z.ZodString>;
91
+ nextEligibleAt: z.ZodOptional<z.ZodString>;
92
+ modelRoute: z.ZodOptional<z.ZodObject<{
93
+ provider: z.ZodString;
94
+ model: z.ZodString;
95
+ }, z.core.$strict>>;
96
+ calls: z.ZodArray<z.ZodObject<{
97
+ requestOrdinal: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
98
+ kind: z.ZodEnum<{
99
+ PRIMARY: "PRIMARY";
100
+ FORMAT_REPAIR: "FORMAT_REPAIR";
101
+ }>;
102
+ inputTokens: z.ZodOptional<z.ZodNumber>;
103
+ outputTokens: z.ZodOptional<z.ZodNumber>;
104
+ outcome: z.ZodEnum<{
105
+ SUCCEEDED: "SUCCEEDED";
106
+ FAILED: "FAILED";
107
+ ABORTED: "ABORTED";
108
+ TIMED_OUT: "TIMED_OUT";
109
+ }>;
110
+ }, z.core.$strict>>;
111
+ failure: z.ZodOptional<z.ZodObject<{
112
+ code: z.ZodEnum<{
113
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
114
+ AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
115
+ MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
116
+ MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
117
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
118
+ CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
119
+ ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
120
+ MODEL_TIMEOUT: "MODEL_TIMEOUT";
121
+ MODEL_ABORTED: "MODEL_ABORTED";
122
+ MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
123
+ MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
124
+ INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
125
+ LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
126
+ STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
127
+ }>;
128
+ retryable: z.ZodBoolean;
129
+ occurredAt: z.ZodString;
130
+ }, z.core.$strict>>;
131
+ experiences: z.ZodOptional<z.ZodArray<z.ZodObject<{
132
+ experienceId: z.ZodString;
133
+ type: z.ZodEnum<{
134
+ CORRECTION: "CORRECTION";
135
+ CONSTRAINT: "CONSTRAINT";
136
+ WORKFLOW: "WORKFLOW";
137
+ }>;
138
+ lesson: z.ZodString;
139
+ persistenceScope: z.ZodEnum<{
140
+ PROJECT: "PROJECT";
141
+ USER: "USER";
142
+ }>;
143
+ evidenceStrength: z.ZodLiteral<"HIGH">;
144
+ supportingEvidence: z.ZodArray<z.ZodObject<{
145
+ messageSeq: z.ZodNumber;
146
+ excerptDigest: z.ZodString;
147
+ }, z.core.$strict>>;
148
+ contextSummary: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strict>>>;
150
+ proposal: z.ZodOptional<z.ZodObject<{
151
+ learningProposalId: z.ZodString;
152
+ policyVersion: z.ZodLiteral<"learning-v1">;
153
+ name: z.ZodString;
154
+ description: z.ZodString;
155
+ whenToUse: z.ZodString;
156
+ content: z.ZodString;
157
+ invocation: z.ZodObject<{
158
+ modelInvocable: z.ZodLiteral<true>;
159
+ userInvocable: z.ZodLiteral<false>;
160
+ }, z.core.$strict>;
161
+ persistenceScope: z.ZodEnum<{
162
+ PROJECT: "PROJECT";
163
+ USER: "USER";
164
+ }>;
165
+ supportingExperienceIds: z.ZodArray<z.ZodString>;
166
+ curation: z.ZodObject<{
167
+ decision: z.ZodEnum<{
168
+ CREATE: "CREATE";
169
+ MERGE: "MERGE";
170
+ DISCARD: "DISCARD";
171
+ }>;
172
+ candidateKey: z.ZodOptional<z.ZodString>;
173
+ rationale: z.ZodString;
174
+ }, z.core.$strict>;
175
+ catalogObservationDigest: z.ZodString;
176
+ shortlistDigests: z.ZodArray<z.ZodString>;
177
+ }, z.core.$strict>>;
178
+ publicationOutcome: z.ZodOptional<z.ZodLiteral<"NEEDS_ATTENTION">>;
179
+ }, z.core.$strict>>;
180
+ review: z.ZodOptional<z.ZodObject<{
181
+ policyVersion: z.ZodLiteral<"review-v1">;
182
+ proposal: z.ZodObject<{
183
+ schemaVersion: z.ZodLiteral<1>;
184
+ revision: z.ZodNumber;
185
+ createdAt: z.ZodString;
186
+ sourceLearningProposalId: z.ZodString;
187
+ kind: z.ZodEnum<{
188
+ CREATE: "CREATE";
189
+ MERGE: "MERGE";
190
+ DISCARD: "DISCARD";
191
+ }>;
192
+ name: z.ZodString;
193
+ description: z.ZodString;
194
+ whenToUse: z.ZodString;
195
+ invocation: z.ZodObject<{
196
+ modelInvocable: z.ZodLiteral<true>;
197
+ userInvocable: z.ZodLiteral<false>;
198
+ }, z.core.$strict>;
199
+ exactSkillBytes: z.ZodString;
200
+ skillBytesDigest: z.ZodString;
201
+ rendererVersion: z.ZodString;
202
+ persistenceScope: z.ZodEnum<{
203
+ PROJECT: "PROJECT";
204
+ USER: "USER";
205
+ }>;
206
+ workspaceBinding: z.ZodOptional<z.ZodObject<{
207
+ workspaceId: z.ZodString;
208
+ canonicalPath: z.ZodString;
209
+ observedAt: z.ZodString;
210
+ }, z.core.$strict>>;
211
+ dshHomeBinding: z.ZodOptional<z.ZodObject<{
212
+ resolutionKind: z.ZodEnum<{
213
+ CONFIGURATION: "CONFIGURATION";
214
+ ENVIRONMENT: "ENVIRONMENT";
215
+ DEFAULT: "DEFAULT";
216
+ }>;
217
+ canonicalPath: z.ZodString;
218
+ identityDigest: z.ZodString;
219
+ observedAt: z.ZodString;
220
+ }, z.core.$strict>>;
221
+ supportingExperienceIds: z.ZodArray<z.ZodString>;
222
+ catalogObservationDigest: z.ZodString;
223
+ curationRationale: z.ZodString;
224
+ actionBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
225
+ kind: z.ZodLiteral<"CREATE">;
226
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
227
+ scope: z.ZodEnum<{
228
+ PROJECT: "PROJECT";
229
+ USER: "USER";
230
+ }>;
231
+ expectedProvider: z.ZodLiteral<"filesystem">;
232
+ expectedSource: z.ZodEnum<{
233
+ "project-dsh": "project-dsh";
234
+ "user-dsh": "user-dsh";
235
+ }>;
236
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
237
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
238
+ resolutionContractDigest: z.ZodString;
239
+ declaredRootPath: z.ZodString;
240
+ state: z.ZodLiteral<"EXISTING">;
241
+ canonicalRootPath: z.ZodString;
242
+ rootIdentityDigest: z.ZodString;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ scope: z.ZodEnum<{
245
+ PROJECT: "PROJECT";
246
+ USER: "USER";
247
+ }>;
248
+ expectedProvider: z.ZodLiteral<"filesystem">;
249
+ expectedSource: z.ZodEnum<{
250
+ "project-dsh": "project-dsh";
251
+ "user-dsh": "user-dsh";
252
+ }>;
253
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
254
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
255
+ resolutionContractDigest: z.ZodString;
256
+ declaredRootPath: z.ZodString;
257
+ state: z.ZodLiteral<"ABSENT">;
258
+ canonicalExistingAncestorPath: z.ZodString;
259
+ ancestorIdentityDigest: z.ZodString;
260
+ missingSegments: z.ZodArray<z.ZodString>;
261
+ }, z.core.$strict>], "state">;
262
+ targetBinding: z.ZodObject<{
263
+ skillName: z.ZodString;
264
+ bundlePath: z.ZodString;
265
+ skillFilePath: z.ZodString;
266
+ }, z.core.$strict>;
267
+ expectedAbsence: z.ZodObject<{
268
+ catalogObservationDigest: z.ZodString;
269
+ observedAt: z.ZodString;
270
+ flatSkillFilePath: z.ZodString;
271
+ bundlePathAbsent: z.ZodLiteral<true>;
272
+ skillFilePathAbsent: z.ZodLiteral<true>;
273
+ flatSkillFilePathAbsent: z.ZodLiteral<true>;
274
+ }, z.core.$strict>;
275
+ }, z.core.$strict>, z.ZodObject<{
276
+ kind: z.ZodLiteral<"MERGE">;
277
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
278
+ scope: z.ZodEnum<{
279
+ PROJECT: "PROJECT";
280
+ USER: "USER";
281
+ }>;
282
+ expectedProvider: z.ZodLiteral<"filesystem">;
283
+ expectedSource: z.ZodEnum<{
284
+ "project-dsh": "project-dsh";
285
+ "user-dsh": "user-dsh";
286
+ }>;
287
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
288
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
289
+ resolutionContractDigest: z.ZodString;
290
+ declaredRootPath: z.ZodString;
291
+ state: z.ZodLiteral<"EXISTING">;
292
+ canonicalRootPath: z.ZodString;
293
+ rootIdentityDigest: z.ZodString;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ scope: z.ZodEnum<{
296
+ PROJECT: "PROJECT";
297
+ USER: "USER";
298
+ }>;
299
+ expectedProvider: z.ZodLiteral<"filesystem">;
300
+ expectedSource: z.ZodEnum<{
301
+ "project-dsh": "project-dsh";
302
+ "user-dsh": "user-dsh";
303
+ }>;
304
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
305
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
306
+ resolutionContractDigest: z.ZodString;
307
+ declaredRootPath: z.ZodString;
308
+ state: z.ZodLiteral<"ABSENT">;
309
+ canonicalExistingAncestorPath: z.ZodString;
310
+ ancestorIdentityDigest: z.ZodString;
311
+ missingSegments: z.ZodArray<z.ZodString>;
312
+ }, z.core.$strict>], "state">;
313
+ targetBinding: z.ZodObject<{
314
+ skillName: z.ZodString;
315
+ bundlePath: z.ZodString;
316
+ skillFilePath: z.ZodString;
317
+ }, z.core.$strict>;
318
+ baseBinding: z.ZodObject<{
319
+ candidateKey: z.ZodString;
320
+ provider: z.ZodString;
321
+ source: z.ZodString;
322
+ path: z.ZodString;
323
+ exactBytes: z.ZodString;
324
+ bytesDigest: z.ZodString;
325
+ catalogObservationDigest: z.ZodString;
326
+ observedAt: z.ZodString;
327
+ }, z.core.$strict>;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ kind: z.ZodLiteral<"DISCARD">;
330
+ coveringCandidateBinding: z.ZodObject<{
331
+ candidateKey: z.ZodString;
332
+ provider: z.ZodString;
333
+ source: z.ZodString;
334
+ name: z.ZodString;
335
+ description: z.ZodString;
336
+ whenToUse: z.ZodOptional<z.ZodString>;
337
+ content: z.ZodString;
338
+ contentDigest: z.ZodString;
339
+ path: z.ZodOptional<z.ZodString>;
340
+ catalogObservationDigest: z.ZodString;
341
+ observedAt: z.ZodString;
342
+ }, z.core.$strict>;
343
+ }, z.core.$strict>], "kind">;
344
+ proposalId: z.ZodString;
345
+ digest: z.ZodString;
346
+ }, z.core.$strict>;
347
+ reviewDecision: z.ZodEnum<{
348
+ PENDING: "PENDING";
349
+ APPROVED: "APPROVED";
350
+ REJECTED: "REJECTED";
351
+ }>;
352
+ publicationOutcome: z.ZodEnum<{
353
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
354
+ PENDING_REVIEW: "PENDING_REVIEW";
355
+ DISCARDED: "DISCARDED";
356
+ NEEDS_REFRESH: "NEEDS_REFRESH";
357
+ PUBLISHED: "PUBLISHED";
358
+ PUBLISH_FAILED: "PUBLISH_FAILED";
359
+ }>;
360
+ coverageRetryCount: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
361
+ decidedAt: z.ZodOptional<z.ZodString>;
362
+ decisionReason: z.ZodOptional<z.ZodEnum<{
363
+ USER_REJECTED: "USER_REJECTED";
364
+ COVERAGE_CONFIRMED: "COVERAGE_CONFIRMED";
365
+ }>>;
366
+ failure: z.ZodOptional<z.ZodObject<{
367
+ code: z.ZodString;
368
+ retryable: z.ZodBoolean;
369
+ occurredAt: z.ZodString;
370
+ }, z.core.$strict>>;
371
+ }, z.core.$strict>>;
372
+ publication: z.ZodOptional<z.ZodObject<{
373
+ schemaVersion: z.ZodLiteral<1>;
374
+ policyVersion: z.ZodLiteral<"publication-v1">;
375
+ attemptCount: z.ZodNumber;
376
+ activeAttemptId: z.ZodString;
377
+ targetIdentityDigest: z.ZodString;
378
+ journal: z.ZodArray<z.ZodObject<{
379
+ schemaVersion: z.ZodLiteral<1>;
380
+ ordinal: z.ZodNumber;
381
+ attempt: z.ZodNumber;
382
+ attemptId: z.ZodString;
383
+ stage: z.ZodEnum<{
384
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
385
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
386
+ ROOT_PREPARED: "ROOT_PREPARED";
387
+ TARGET_INSTALLED: "TARGET_INSTALLED";
388
+ DISK_VERIFIED: "DISK_VERIFIED";
389
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
390
+ LINEAGE_PENDING: "LINEAGE_PENDING";
391
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
392
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
393
+ }>;
394
+ targetIdentityDigest: z.ZodString;
395
+ expectedHash: z.ZodOptional<z.ZodString>;
396
+ observedHash: z.ZodOptional<z.ZodString>;
397
+ occurredAt: z.ZodString;
398
+ previousDigest: z.ZodNullable<z.ZodString>;
399
+ digest: z.ZodString;
400
+ }, z.core.$strict>>;
401
+ pendingLineage: z.ZodOptional<z.ZodObject<{
402
+ schemaVersion: z.ZodLiteral<1>;
403
+ scope: z.ZodEnum<{
404
+ PROJECT: "PROJECT";
405
+ USER: "USER";
406
+ }>;
407
+ provider: z.ZodString;
408
+ source: z.ZodEnum<{
409
+ "project-dsh": "project-dsh";
410
+ "user-dsh": "user-dsh";
411
+ }>;
412
+ skillName: z.ZodString;
413
+ canonicalTargetPath: z.ZodString;
414
+ targetIdentityDigest: z.ZodString;
415
+ currentRevision: z.ZodNumber;
416
+ revisions: z.ZodArray<z.ZodObject<{
417
+ revision: z.ZodNumber;
418
+ origin: z.ZodEnum<{
419
+ ADOPTED_BASE: "ADOPTED_BASE";
420
+ MANUAL_BASE: "MANUAL_BASE";
421
+ RUN2SKILL: "RUN2SKILL";
422
+ }>;
423
+ proposalId: z.ZodOptional<z.ZodString>;
424
+ exactSkillBytes: z.ZodString;
425
+ skillBytesDigest: z.ZodString;
426
+ committedAt: z.ZodString;
427
+ }, z.core.$strict>>;
428
+ lineageId: z.ZodString;
429
+ }, z.core.$strict>>;
430
+ }, z.core.$strict>>;
431
+ }, z.core.$strict>;
432
+ declare const GlobalV1Schema: z.ZodObject<{
433
+ schemaVersion: z.ZodLiteral<1>;
434
+ activeTriggerPolicyVersion: z.ZodLiteral<"cheap-trigger-v1">;
435
+ sessions: z.ZodRecord<z.ZodString, z.ZodObject<{
436
+ rootSessionId: z.ZodString;
437
+ sessionCreatedAt: z.ZodNumber;
438
+ sessionCwdDigest: z.ZodString;
439
+ triggerPolicyVersion: z.ZodLiteral<"cheap-trigger-v1">;
440
+ activationFenceSeq: z.ZodNumber;
441
+ durableNextSeq: z.ZodNumber;
442
+ observedTailSeq: z.ZodNumber;
443
+ lastScannedAt: z.ZodOptional<z.ZodString>;
444
+ headerRevision: z.ZodOptional<z.ZodString>;
445
+ headerDigest: z.ZodOptional<z.ZodString>;
446
+ }, z.core.$strict>>;
447
+ health: z.ZodObject<{
448
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
449
+ lastCode: z.ZodOptional<z.ZodString>;
450
+ }, z.core.$strict>;
451
+ recovery: z.ZodObject<{
452
+ recoveryLag: z.ZodBoolean;
453
+ cursor: z.ZodOptional<z.ZodObject<{
454
+ lifecycleKey: z.ZodString;
455
+ nextSeq: z.ZodNumber;
456
+ }, z.core.$strict>>;
457
+ }, z.core.$strict>;
458
+ lastSuccessfulStoreWriteAt: z.ZodOptional<z.ZodString>;
459
+ checkpoint: z.ZodObject<{
460
+ dirty: z.ZodBoolean;
461
+ pendingSessionCount: z.ZodNumber;
462
+ lastCheckpointAt: z.ZodOptional<z.ZodString>;
463
+ }, z.core.$strict>;
464
+ purgeJournal: z.ZodOptional<z.ZodObject<{
465
+ schemaVersion: z.ZodLiteral<1>;
466
+ purgeId: z.ZodString;
467
+ scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
468
+ scope: z.ZodLiteral<"PROJECT">;
469
+ workspaceId: z.ZodString;
470
+ canonicalWorkspacePath: z.ZodString;
471
+ workspaceObservedAt: z.ZodString;
472
+ canonicalRootPath: z.ZodString;
473
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
474
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
475
+ resolutionContractDigest: z.ZodString;
476
+ }, z.core.$strict>, z.ZodObject<{
477
+ scope: z.ZodLiteral<"USER">;
478
+ }, z.core.$strict>], "scope">;
479
+ hideBefore: z.ZodString;
480
+ candidateDigest: z.ZodString;
481
+ startedAt: z.ZodString;
482
+ phase: z.ZodEnum<{
483
+ HIDING: "HIDING";
484
+ DELETING_LINEAGES: "DELETING_LINEAGES";
485
+ DELETING_WORK_ITEMS: "DELETING_WORK_ITEMS";
486
+ VERIFYING: "VERIFYING";
487
+ }>;
488
+ deletedWorkItems: z.ZodNumber;
489
+ deletedLineages: z.ZodNumber;
490
+ lastError: z.ZodOptional<z.ZodObject<{
491
+ code: z.ZodString;
492
+ occurredAt: z.ZodString;
493
+ }, z.core.$strict>>;
494
+ }, z.core.$strict>>;
495
+ completedPurgeFences: z.ZodOptional<z.ZodObject<{
496
+ schemaVersion: z.ZodLiteral<1>;
497
+ user: z.ZodOptional<z.ZodObject<{
498
+ schemaVersion: z.ZodLiteral<1>;
499
+ purgeId: z.ZodString;
500
+ completedAt: z.ZodString;
501
+ hideBefore: z.ZodString;
502
+ scope: z.ZodLiteral<"USER">;
503
+ }, z.core.$strict>>;
504
+ projects: z.ZodRecord<z.ZodString, z.ZodObject<{
505
+ schemaVersion: z.ZodLiteral<1>;
506
+ purgeId: z.ZodString;
507
+ completedAt: z.ZodString;
508
+ hideBefore: z.ZodString;
509
+ scope: z.ZodLiteral<"PROJECT">;
510
+ scopeIdentityDigest: z.ZodString;
511
+ }, z.core.$strict>>;
512
+ }, z.core.$strict>>;
513
+ }, z.core.$strict>;
514
+ type CaptureWorkItemV1 = z.infer<typeof CaptureWorkItemV1Schema>;
515
+ type GlobalV1 = z.infer<typeof GlobalV1Schema>;
516
+ //#endregion
517
+ //#region src/adapters/dsh-llm/restricted-learning-client.d.ts
518
+ interface DshTokenUsage {
519
+ readonly inputTokens: number;
520
+ readonly outputTokens: number;
521
+ readonly cacheReadTokens?: number;
522
+ readonly cacheWriteTokens?: number;
523
+ readonly reasoningTokens?: number;
524
+ }
525
+ type DshStreamChunk = {
526
+ readonly type: 'block-start';
527
+ readonly index: number;
528
+ readonly blockType: string;
529
+ } | {
530
+ readonly type: 'text-delta' | 'reasoning-delta';
531
+ readonly index: number;
532
+ readonly text: string;
533
+ } | {
534
+ readonly type: 'tool-call-delta';
535
+ readonly index: number;
536
+ readonly id: string;
537
+ readonly name?: string;
538
+ readonly argumentsDelta: string;
539
+ } | {
540
+ readonly type: 'block-end';
541
+ readonly index: number;
542
+ readonly block: {
543
+ readonly type: string;
544
+ readonly text?: string;
545
+ readonly [key: string]: unknown;
546
+ };
547
+ } | {
548
+ readonly type: 'usage';
549
+ readonly usage: DshTokenUsage;
550
+ } | {
551
+ readonly type: 'finish';
552
+ readonly reason: {
553
+ readonly kind: string;
554
+ readonly [key: string]: unknown;
555
+ };
556
+ };
557
+ interface DshGenerateOptions {
558
+ readonly provider: string;
559
+ readonly model: string;
560
+ readonly messages: DshUserMessage[];
561
+ readonly system: string;
562
+ readonly maxTokens: number;
563
+ readonly signal: AbortSignal;
564
+ }
565
+ interface DshUserMessage {
566
+ readonly id: string;
567
+ readonly role: 'user';
568
+ readonly content: Array<{
569
+ readonly type: 'text';
570
+ readonly text: string;
571
+ }>;
572
+ readonly source: {
573
+ readonly kind: 'user';
574
+ };
575
+ }
576
+ interface DshLlmPort {
577
+ resolveModelInfo(provider: string, model: string, signal?: AbortSignal): Promise<{
578
+ readonly context?: {
579
+ readonly contextWindow: number;
580
+ };
581
+ }>;
582
+ stream(options: DshGenerateOptions): AsyncIterable<DshStreamChunk>;
583
+ }
584
+ //#endregion
585
+ //#region src/adapters/dsh-skills/exact-agent-scope.d.ts
586
+ interface AgentScopeProjection {
587
+ readonly id: string;
588
+ readonly session: {
589
+ readonly header: {
590
+ readonly id: string;
591
+ readonly createdAt: number;
592
+ readonly cwd?: string | undefined;
593
+ readonly agentPreset?: string | undefined;
594
+ };
595
+ readonly events?: readonly {
596
+ readonly type: string;
597
+ readonly data?: unknown;
598
+ }[] | undefined;
599
+ };
600
+ }
601
+ //#endregion
602
+ //#region src/adapters/dsh-skills/skill-catalog.d.ts
603
+ interface DshSkillRegistryPort<TView extends object> {
604
+ snapshot(view: TView): Promise<unknown>;
605
+ get(name: string, view: TView): Promise<unknown>;
606
+ }
607
+ //#endregion
608
+ //#region src/adapters/dsh-session/types.d.ts
609
+ interface DshSessionHeader {
610
+ readonly version: number;
611
+ readonly id: string;
612
+ readonly createdAt: number;
613
+ readonly cwd?: string;
614
+ readonly parentSession?: string;
615
+ readonly origin?: 'subagent';
616
+ readonly delegationDepth?: number;
617
+ }
618
+ interface DshSessionEvent {
619
+ readonly type: string;
620
+ readonly seq: number;
621
+ readonly time: number;
622
+ readonly data: unknown;
623
+ }
624
+ interface SessionPersistenceSnapshot {
625
+ readonly header: DshSessionHeader;
626
+ readonly revision: string;
627
+ }
628
+ interface SessionPersistencePort {
629
+ listSnapshots(signal?: AbortSignal): Promise<readonly SessionPersistenceSnapshot[]>;
630
+ readFrom(sessionId: string, fromSeq: number, signal?: AbortSignal): Promise<{
631
+ readonly meta: DshSessionHeader;
632
+ readonly events: readonly DshSessionEvent[];
633
+ }>;
634
+ }
635
+ //#endregion
636
+ //#region src/adapters/dsh-connection/observe-summary-rpc.d.ts
637
+ type ObserveRpcError = {
638
+ readonly code: string;
639
+ readonly message: string;
640
+ readonly details: Record<string, unknown>;
641
+ };
642
+ type ObserveRpcResult<T> = {
643
+ readonly ok: true;
644
+ readonly value: T;
645
+ } | {
646
+ readonly ok: false;
647
+ readonly error: ObserveRpcError;
648
+ };
649
+ type ObserveSummaryRpcHandler = (endpoint: string, payload: unknown, signal: AbortSignal) => Promise<ObserveRpcResult<unknown>>;
650
+ interface ObserveSummaryHostConnection {
651
+ readonly rpc: {
652
+ handle(channel: string, handler: ObserveSummaryRpcHandler, options: {
653
+ readonly authority: 'loopback';
654
+ }): () => Promise<void>;
655
+ };
656
+ }
657
+ //#endregion
658
+ //#region src/adapters/dsh-storage/domain.d.ts
659
+ declare const run2skillDomainSpec: {
660
+ readonly name: "run2skill_v1";
661
+ readonly version: 2;
662
+ readonly global: {
663
+ readonly schema: import("zod").ZodObject<{
664
+ schemaVersion: import("zod").ZodLiteral<1>;
665
+ activeTriggerPolicyVersion: import("zod").ZodLiteral<"cheap-trigger-v1">;
666
+ sessions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
667
+ rootSessionId: import("zod").ZodString;
668
+ sessionCreatedAt: import("zod").ZodNumber;
669
+ sessionCwdDigest: import("zod").ZodString;
670
+ triggerPolicyVersion: import("zod").ZodLiteral<"cheap-trigger-v1">;
671
+ activationFenceSeq: import("zod").ZodNumber;
672
+ durableNextSeq: import("zod").ZodNumber;
673
+ observedTailSeq: import("zod").ZodNumber;
674
+ lastScannedAt: import("zod").ZodOptional<import("zod").ZodString>;
675
+ headerRevision: import("zod").ZodOptional<import("zod").ZodString>;
676
+ headerDigest: import("zod").ZodOptional<import("zod").ZodString>;
677
+ }, import("zod/v4/core").$strict>>;
678
+ health: import("zod").ZodObject<{
679
+ counts: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>;
680
+ lastCode: import("zod").ZodOptional<import("zod").ZodString>;
681
+ }, import("zod/v4/core").$strict>;
682
+ recovery: import("zod").ZodObject<{
683
+ recoveryLag: import("zod").ZodBoolean;
684
+ cursor: import("zod").ZodOptional<import("zod").ZodObject<{
685
+ lifecycleKey: import("zod").ZodString;
686
+ nextSeq: import("zod").ZodNumber;
687
+ }, import("zod/v4/core").$strict>>;
688
+ }, import("zod/v4/core").$strict>;
689
+ lastSuccessfulStoreWriteAt: import("zod").ZodOptional<import("zod").ZodString>;
690
+ checkpoint: import("zod").ZodObject<{
691
+ dirty: import("zod").ZodBoolean;
692
+ pendingSessionCount: import("zod").ZodNumber;
693
+ lastCheckpointAt: import("zod").ZodOptional<import("zod").ZodString>;
694
+ }, import("zod/v4/core").$strict>;
695
+ purgeJournal: import("zod").ZodOptional<import("zod").ZodObject<{
696
+ schemaVersion: import("zod").ZodLiteral<1>;
697
+ purgeId: import("zod").ZodString;
698
+ scopeBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
699
+ scope: import("zod").ZodLiteral<"PROJECT">;
700
+ workspaceId: import("zod").ZodString;
701
+ canonicalWorkspacePath: import("zod").ZodString;
702
+ workspaceObservedAt: import("zod").ZodString;
703
+ canonicalRootPath: import("zod").ZodString;
704
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
705
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
706
+ resolutionContractDigest: import("zod").ZodString;
707
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
708
+ scope: import("zod").ZodLiteral<"USER">;
709
+ }, import("zod/v4/core").$strict>], "scope">;
710
+ hideBefore: import("zod").ZodString;
711
+ candidateDigest: import("zod").ZodString;
712
+ startedAt: import("zod").ZodString;
713
+ phase: import("zod").ZodEnum<{
714
+ HIDING: "HIDING";
715
+ DELETING_LINEAGES: "DELETING_LINEAGES";
716
+ DELETING_WORK_ITEMS: "DELETING_WORK_ITEMS";
717
+ VERIFYING: "VERIFYING";
718
+ }>;
719
+ deletedWorkItems: import("zod").ZodNumber;
720
+ deletedLineages: import("zod").ZodNumber;
721
+ lastError: import("zod").ZodOptional<import("zod").ZodObject<{
722
+ code: import("zod").ZodString;
723
+ occurredAt: import("zod").ZodString;
724
+ }, import("zod/v4/core").$strict>>;
725
+ }, import("zod/v4/core").$strict>>;
726
+ completedPurgeFences: import("zod").ZodOptional<import("zod").ZodObject<{
727
+ schemaVersion: import("zod").ZodLiteral<1>;
728
+ user: import("zod").ZodOptional<import("zod").ZodObject<{
729
+ schemaVersion: import("zod").ZodLiteral<1>;
730
+ purgeId: import("zod").ZodString;
731
+ completedAt: import("zod").ZodString;
732
+ hideBefore: import("zod").ZodString;
733
+ scope: import("zod").ZodLiteral<"USER">;
734
+ }, import("zod/v4/core").$strict>>;
735
+ projects: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
736
+ schemaVersion: import("zod").ZodLiteral<1>;
737
+ purgeId: import("zod").ZodString;
738
+ completedAt: import("zod").ZodString;
739
+ hideBefore: import("zod").ZodString;
740
+ scope: import("zod").ZodLiteral<"PROJECT">;
741
+ scopeIdentityDigest: import("zod").ZodString;
742
+ }, import("zod/v4/core").$strict>>;
743
+ }, import("zod/v4/core").$strict>>;
744
+ }, import("zod/v4/core").$strict>;
745
+ readonly initial: {
746
+ schemaVersion: 1;
747
+ activeTriggerPolicyVersion: "cheap-trigger-v1";
748
+ sessions: Record<string, {
749
+ rootSessionId: string;
750
+ sessionCreatedAt: number;
751
+ sessionCwdDigest: string;
752
+ triggerPolicyVersion: "cheap-trigger-v1";
753
+ activationFenceSeq: number;
754
+ durableNextSeq: number;
755
+ observedTailSeq: number;
756
+ lastScannedAt?: string | undefined;
757
+ headerRevision?: string | undefined;
758
+ headerDigest?: string | undefined;
759
+ }>;
760
+ health: {
761
+ counts: Record<string, number>;
762
+ lastCode?: string | undefined;
763
+ };
764
+ recovery: {
765
+ recoveryLag: boolean;
766
+ cursor?: {
767
+ lifecycleKey: string;
768
+ nextSeq: number;
769
+ } | undefined;
770
+ };
771
+ checkpoint: {
772
+ dirty: boolean;
773
+ pendingSessionCount: number;
774
+ lastCheckpointAt?: string | undefined;
775
+ };
776
+ lastSuccessfulStoreWriteAt?: string | undefined;
777
+ purgeJournal?: {
778
+ schemaVersion: 1;
779
+ purgeId: string;
780
+ scopeBinding: {
781
+ scope: "PROJECT";
782
+ workspaceId: string;
783
+ canonicalWorkspacePath: string;
784
+ workspaceObservedAt: string;
785
+ canonicalRootPath: string;
786
+ rootContractVersion: "stock-dsh-web-default-roots-v1";
787
+ resolverVersion: "stock-root-resolver-v2";
788
+ resolutionContractDigest: string;
789
+ } | {
790
+ scope: "USER";
791
+ };
792
+ hideBefore: string;
793
+ candidateDigest: string;
794
+ startedAt: string;
795
+ phase: "HIDING" | "DELETING_LINEAGES" | "DELETING_WORK_ITEMS" | "VERIFYING";
796
+ deletedWorkItems: number;
797
+ deletedLineages: number;
798
+ lastError?: {
799
+ code: string;
800
+ occurredAt: string;
801
+ } | undefined;
802
+ } | undefined;
803
+ completedPurgeFences?: {
804
+ schemaVersion: 1;
805
+ projects: Record<string, {
806
+ schemaVersion: 1;
807
+ purgeId: string;
808
+ completedAt: string;
809
+ hideBefore: string;
810
+ scope: "PROJECT";
811
+ scopeIdentityDigest: string;
812
+ }>;
813
+ user?: {
814
+ schemaVersion: 1;
815
+ purgeId: string;
816
+ completedAt: string;
817
+ hideBefore: string;
818
+ scope: "USER";
819
+ } | undefined;
820
+ } | undefined;
821
+ };
822
+ };
823
+ readonly tables: {
824
+ readonly work_items: {
825
+ readonly valueSchema: import("zod").ZodObject<{
826
+ schemaVersion: import("zod").ZodLiteral<1>;
827
+ revision: import("zod").ZodNumber;
828
+ workItemId: import("zod").ZodString;
829
+ signalKey: import("zod").ZodObject<{
830
+ rootSessionId: import("zod").ZodString;
831
+ sessionCreatedAt: import("zod").ZodNumber;
832
+ sessionCwdDigest: import("zod").ZodString;
833
+ turn: import("zod").ZodNumber;
834
+ turnEndSeq: import("zod").ZodNumber;
835
+ turnInstanceDigest: import("zod").ZodString;
836
+ triggerPolicyVersion: import("zod").ZodLiteral<"cheap-trigger-v1">;
837
+ }, import("zod/v4/core").$strict>;
838
+ captureReason: import("zod").ZodEnum<{
839
+ CHEAP_TRIGGER: "CHEAP_TRIGGER";
840
+ SCAN_INCOMPLETE: "SCAN_INCOMPLETE";
841
+ }>;
842
+ createdAt: import("zod").ZodString;
843
+ updatedAt: import("zod").ZodString;
844
+ turnOutcomeKind: import("zod").ZodString;
845
+ rootIdentity: import("zod").ZodObject<{
846
+ status: import("zod").ZodLiteral<"ROOT">;
847
+ parentSessionId: import("zod").ZodOptional<import("zod").ZodString>;
848
+ }, import("zod/v4/core").$strict>;
849
+ workspaceBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
850
+ status: import("zod").ZodLiteral<"BOUND">;
851
+ workspaceId: import("zod").ZodString;
852
+ canonicalPath: import("zod").ZodString;
853
+ observedAt: import("zod").ZodString;
854
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
855
+ status: import("zod").ZodEnum<{
856
+ NO_CWD: "NO_CWD";
857
+ UNREGISTERED: "UNREGISTERED";
858
+ UNAVAILABLE: "UNAVAILABLE";
859
+ }>;
860
+ observedAt: import("zod").ZodString;
861
+ }, import("zod/v4/core").$strict>], "status">;
862
+ scanStatus: import("zod").ZodEnum<{
863
+ COMPLETE: "COMPLETE";
864
+ INCOMPLETE: "INCOMPLETE";
865
+ }>;
866
+ triggerHits: import("zod").ZodArray<import("zod").ZodObject<{
867
+ kind: import("zod").ZodEnum<{
868
+ EXPLICIT_SAVE: "EXPLICIT_SAVE";
869
+ CORRECTION: "CORRECTION";
870
+ CONSTRAINT: "CONSTRAINT";
871
+ WORKFLOW: "WORKFLOW";
872
+ }>;
873
+ messageSeq: import("zod").ZodNumber;
874
+ ruleId: import("zod").ZodString;
875
+ confidence: import("zod").ZodLiteral<"HIGH">;
876
+ }, import("zod/v4/core").$strict>>;
877
+ evidenceRefs: import("zod").ZodArray<import("zod").ZodObject<{
878
+ source: import("zod").ZodLiteral<"USER_DIRECT">;
879
+ messageSeq: import("zod").ZodNumber;
880
+ excerpt: import("zod").ZodString;
881
+ excerptDigest: import("zod").ZodString;
882
+ redactionKinds: import("zod").ZodArray<import("zod").ZodEnum<{
883
+ PRIVATE_KEY: "PRIVATE_KEY";
884
+ AUTHORIZATION: "AUTHORIZATION";
885
+ BEARER_TOKEN: "BEARER_TOKEN";
886
+ API_KEY: "API_KEY";
887
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
888
+ URL_CREDENTIAL: "URL_CREDENTIAL";
889
+ }>>;
890
+ truncated: import("zod").ZodBoolean;
891
+ }, import("zod/v4/core").$strict>>;
892
+ captureBlockers: import("zod").ZodArray<import("zod").ZodEnum<{
893
+ TURN_BOUNDARY_INCOMPLETE: "TURN_BOUNDARY_INCOMPLETE";
894
+ TEXT_LIMIT_EXCEEDED: "TEXT_LIMIT_EXCEEDED";
895
+ REDACTION_UNAVAILABLE: "REDACTION_UNAVAILABLE";
896
+ }>>;
897
+ processingState: import("zod").ZodEnum<{
898
+ CAPTURED: "CAPTURED";
899
+ ANALYZING: "ANALYZING";
900
+ LEARNED: "LEARNED";
901
+ READY_FOR_REVIEW: "READY_FOR_REVIEW";
902
+ PUBLISHING: "PUBLISHING";
903
+ TERMINAL: "TERMINAL";
904
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
905
+ RESOLVED_NO_SIGNAL: "RESOLVED_NO_SIGNAL";
906
+ }>;
907
+ learning: import("zod").ZodOptional<import("zod").ZodObject<{
908
+ policyVersion: import("zod").ZodLiteral<"learning-v1">;
909
+ attempt: import("zod").ZodNumber;
910
+ requestBudgetUsed: import("zod").ZodNumber;
911
+ claimedAt: import("zod").ZodOptional<import("zod").ZodString>;
912
+ nextEligibleAt: import("zod").ZodOptional<import("zod").ZodString>;
913
+ modelRoute: import("zod").ZodOptional<import("zod").ZodObject<{
914
+ provider: import("zod").ZodString;
915
+ model: import("zod").ZodString;
916
+ }, import("zod/v4/core").$strict>>;
917
+ calls: import("zod").ZodArray<import("zod").ZodObject<{
918
+ requestOrdinal: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
919
+ kind: import("zod").ZodEnum<{
920
+ PRIMARY: "PRIMARY";
921
+ FORMAT_REPAIR: "FORMAT_REPAIR";
922
+ }>;
923
+ inputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
924
+ outputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
925
+ outcome: import("zod").ZodEnum<{
926
+ SUCCEEDED: "SUCCEEDED";
927
+ FAILED: "FAILED";
928
+ ABORTED: "ABORTED";
929
+ TIMED_OUT: "TIMED_OUT";
930
+ }>;
931
+ }, import("zod/v4/core").$strict>>;
932
+ failure: import("zod").ZodOptional<import("zod").ZodObject<{
933
+ code: import("zod").ZodEnum<{
934
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
935
+ AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
936
+ MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
937
+ MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
938
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
939
+ CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
940
+ ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
941
+ MODEL_TIMEOUT: "MODEL_TIMEOUT";
942
+ MODEL_ABORTED: "MODEL_ABORTED";
943
+ MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
944
+ MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
945
+ INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
946
+ LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
947
+ STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
948
+ }>;
949
+ retryable: import("zod").ZodBoolean;
950
+ occurredAt: import("zod").ZodString;
951
+ }, import("zod/v4/core").$strict>>;
952
+ experiences: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
953
+ experienceId: import("zod").ZodString;
954
+ type: import("zod").ZodEnum<{
955
+ CORRECTION: "CORRECTION";
956
+ CONSTRAINT: "CONSTRAINT";
957
+ WORKFLOW: "WORKFLOW";
958
+ }>;
959
+ lesson: import("zod").ZodString;
960
+ persistenceScope: import("zod").ZodEnum<{
961
+ PROJECT: "PROJECT";
962
+ USER: "USER";
963
+ }>;
964
+ evidenceStrength: import("zod").ZodLiteral<"HIGH">;
965
+ supportingEvidence: import("zod").ZodArray<import("zod").ZodObject<{
966
+ messageSeq: import("zod").ZodNumber;
967
+ excerptDigest: import("zod").ZodString;
968
+ }, import("zod/v4/core").$strict>>;
969
+ contextSummary: import("zod").ZodOptional<import("zod").ZodString>;
970
+ }, import("zod/v4/core").$strict>>>;
971
+ proposal: import("zod").ZodOptional<import("zod").ZodObject<{
972
+ learningProposalId: import("zod").ZodString;
973
+ policyVersion: import("zod").ZodLiteral<"learning-v1">;
974
+ name: import("zod").ZodString;
975
+ description: import("zod").ZodString;
976
+ whenToUse: import("zod").ZodString;
977
+ content: import("zod").ZodString;
978
+ invocation: import("zod").ZodObject<{
979
+ modelInvocable: import("zod").ZodLiteral<true>;
980
+ userInvocable: import("zod").ZodLiteral<false>;
981
+ }, import("zod/v4/core").$strict>;
982
+ persistenceScope: import("zod").ZodEnum<{
983
+ PROJECT: "PROJECT";
984
+ USER: "USER";
985
+ }>;
986
+ supportingExperienceIds: import("zod").ZodArray<import("zod").ZodString>;
987
+ curation: import("zod").ZodObject<{
988
+ decision: import("zod").ZodEnum<{
989
+ CREATE: "CREATE";
990
+ MERGE: "MERGE";
991
+ DISCARD: "DISCARD";
992
+ }>;
993
+ candidateKey: import("zod").ZodOptional<import("zod").ZodString>;
994
+ rationale: import("zod").ZodString;
995
+ }, import("zod/v4/core").$strict>;
996
+ catalogObservationDigest: import("zod").ZodString;
997
+ shortlistDigests: import("zod").ZodArray<import("zod").ZodString>;
998
+ }, import("zod/v4/core").$strict>>;
999
+ publicationOutcome: import("zod").ZodOptional<import("zod").ZodLiteral<"NEEDS_ATTENTION">>;
1000
+ }, import("zod/v4/core").$strict>>;
1001
+ review: import("zod").ZodOptional<import("zod").ZodObject<{
1002
+ policyVersion: import("zod").ZodLiteral<"review-v1">;
1003
+ proposal: import("zod").ZodObject<{
1004
+ schemaVersion: import("zod").ZodLiteral<1>;
1005
+ revision: import("zod").ZodNumber;
1006
+ createdAt: import("zod").ZodString;
1007
+ sourceLearningProposalId: import("zod").ZodString;
1008
+ kind: import("zod").ZodEnum<{
1009
+ CREATE: "CREATE";
1010
+ MERGE: "MERGE";
1011
+ DISCARD: "DISCARD";
1012
+ }>;
1013
+ name: import("zod").ZodString;
1014
+ description: import("zod").ZodString;
1015
+ whenToUse: import("zod").ZodString;
1016
+ invocation: import("zod").ZodObject<{
1017
+ modelInvocable: import("zod").ZodLiteral<true>;
1018
+ userInvocable: import("zod").ZodLiteral<false>;
1019
+ }, import("zod/v4/core").$strict>;
1020
+ exactSkillBytes: import("zod").ZodString;
1021
+ skillBytesDigest: import("zod").ZodString;
1022
+ rendererVersion: import("zod").ZodString;
1023
+ persistenceScope: import("zod").ZodEnum<{
1024
+ PROJECT: "PROJECT";
1025
+ USER: "USER";
1026
+ }>;
1027
+ workspaceBinding: import("zod").ZodOptional<import("zod").ZodObject<{
1028
+ workspaceId: import("zod").ZodString;
1029
+ canonicalPath: import("zod").ZodString;
1030
+ observedAt: import("zod").ZodString;
1031
+ }, import("zod/v4/core").$strict>>;
1032
+ dshHomeBinding: import("zod").ZodOptional<import("zod").ZodObject<{
1033
+ resolutionKind: import("zod").ZodEnum<{
1034
+ CONFIGURATION: "CONFIGURATION";
1035
+ ENVIRONMENT: "ENVIRONMENT";
1036
+ DEFAULT: "DEFAULT";
1037
+ }>;
1038
+ canonicalPath: import("zod").ZodString;
1039
+ identityDigest: import("zod").ZodString;
1040
+ observedAt: import("zod").ZodString;
1041
+ }, import("zod/v4/core").$strict>>;
1042
+ supportingExperienceIds: import("zod").ZodArray<import("zod").ZodString>;
1043
+ catalogObservationDigest: import("zod").ZodString;
1044
+ curationRationale: import("zod").ZodString;
1045
+ actionBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1046
+ kind: import("zod").ZodLiteral<"CREATE">;
1047
+ rootBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1048
+ scope: import("zod").ZodEnum<{
1049
+ PROJECT: "PROJECT";
1050
+ USER: "USER";
1051
+ }>;
1052
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
1053
+ expectedSource: import("zod").ZodEnum<{
1054
+ "project-dsh": "project-dsh";
1055
+ "user-dsh": "user-dsh";
1056
+ }>;
1057
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
1058
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
1059
+ resolutionContractDigest: import("zod").ZodString;
1060
+ declaredRootPath: import("zod").ZodString;
1061
+ state: import("zod").ZodLiteral<"EXISTING">;
1062
+ canonicalRootPath: import("zod").ZodString;
1063
+ rootIdentityDigest: import("zod").ZodString;
1064
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1065
+ scope: import("zod").ZodEnum<{
1066
+ PROJECT: "PROJECT";
1067
+ USER: "USER";
1068
+ }>;
1069
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
1070
+ expectedSource: import("zod").ZodEnum<{
1071
+ "project-dsh": "project-dsh";
1072
+ "user-dsh": "user-dsh";
1073
+ }>;
1074
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
1075
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
1076
+ resolutionContractDigest: import("zod").ZodString;
1077
+ declaredRootPath: import("zod").ZodString;
1078
+ state: import("zod").ZodLiteral<"ABSENT">;
1079
+ canonicalExistingAncestorPath: import("zod").ZodString;
1080
+ ancestorIdentityDigest: import("zod").ZodString;
1081
+ missingSegments: import("zod").ZodArray<import("zod").ZodString>;
1082
+ }, import("zod/v4/core").$strict>], "state">;
1083
+ targetBinding: import("zod").ZodObject<{
1084
+ skillName: import("zod").ZodString;
1085
+ bundlePath: import("zod").ZodString;
1086
+ skillFilePath: import("zod").ZodString;
1087
+ }, import("zod/v4/core").$strict>;
1088
+ expectedAbsence: import("zod").ZodObject<{
1089
+ catalogObservationDigest: import("zod").ZodString;
1090
+ observedAt: import("zod").ZodString;
1091
+ flatSkillFilePath: import("zod").ZodString;
1092
+ bundlePathAbsent: import("zod").ZodLiteral<true>;
1093
+ skillFilePathAbsent: import("zod").ZodLiteral<true>;
1094
+ flatSkillFilePathAbsent: import("zod").ZodLiteral<true>;
1095
+ }, import("zod/v4/core").$strict>;
1096
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1097
+ kind: import("zod").ZodLiteral<"MERGE">;
1098
+ rootBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1099
+ scope: import("zod").ZodEnum<{
1100
+ PROJECT: "PROJECT";
1101
+ USER: "USER";
1102
+ }>;
1103
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
1104
+ expectedSource: import("zod").ZodEnum<{
1105
+ "project-dsh": "project-dsh";
1106
+ "user-dsh": "user-dsh";
1107
+ }>;
1108
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
1109
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
1110
+ resolutionContractDigest: import("zod").ZodString;
1111
+ declaredRootPath: import("zod").ZodString;
1112
+ state: import("zod").ZodLiteral<"EXISTING">;
1113
+ canonicalRootPath: import("zod").ZodString;
1114
+ rootIdentityDigest: import("zod").ZodString;
1115
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1116
+ scope: import("zod").ZodEnum<{
1117
+ PROJECT: "PROJECT";
1118
+ USER: "USER";
1119
+ }>;
1120
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
1121
+ expectedSource: import("zod").ZodEnum<{
1122
+ "project-dsh": "project-dsh";
1123
+ "user-dsh": "user-dsh";
1124
+ }>;
1125
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
1126
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
1127
+ resolutionContractDigest: import("zod").ZodString;
1128
+ declaredRootPath: import("zod").ZodString;
1129
+ state: import("zod").ZodLiteral<"ABSENT">;
1130
+ canonicalExistingAncestorPath: import("zod").ZodString;
1131
+ ancestorIdentityDigest: import("zod").ZodString;
1132
+ missingSegments: import("zod").ZodArray<import("zod").ZodString>;
1133
+ }, import("zod/v4/core").$strict>], "state">;
1134
+ targetBinding: import("zod").ZodObject<{
1135
+ skillName: import("zod").ZodString;
1136
+ bundlePath: import("zod").ZodString;
1137
+ skillFilePath: import("zod").ZodString;
1138
+ }, import("zod/v4/core").$strict>;
1139
+ baseBinding: import("zod").ZodObject<{
1140
+ candidateKey: import("zod").ZodString;
1141
+ provider: import("zod").ZodString;
1142
+ source: import("zod").ZodString;
1143
+ path: import("zod").ZodString;
1144
+ exactBytes: import("zod").ZodString;
1145
+ bytesDigest: import("zod").ZodString;
1146
+ catalogObservationDigest: import("zod").ZodString;
1147
+ observedAt: import("zod").ZodString;
1148
+ }, import("zod/v4/core").$strict>;
1149
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1150
+ kind: import("zod").ZodLiteral<"DISCARD">;
1151
+ coveringCandidateBinding: import("zod").ZodObject<{
1152
+ candidateKey: import("zod").ZodString;
1153
+ provider: import("zod").ZodString;
1154
+ source: import("zod").ZodString;
1155
+ name: import("zod").ZodString;
1156
+ description: import("zod").ZodString;
1157
+ whenToUse: import("zod").ZodOptional<import("zod").ZodString>;
1158
+ content: import("zod").ZodString;
1159
+ contentDigest: import("zod").ZodString;
1160
+ path: import("zod").ZodOptional<import("zod").ZodString>;
1161
+ catalogObservationDigest: import("zod").ZodString;
1162
+ observedAt: import("zod").ZodString;
1163
+ }, import("zod/v4/core").$strict>;
1164
+ }, import("zod/v4/core").$strict>], "kind">;
1165
+ proposalId: import("zod").ZodString;
1166
+ digest: import("zod").ZodString;
1167
+ }, import("zod/v4/core").$strict>;
1168
+ reviewDecision: import("zod").ZodEnum<{
1169
+ PENDING: "PENDING";
1170
+ APPROVED: "APPROVED";
1171
+ REJECTED: "REJECTED";
1172
+ }>;
1173
+ publicationOutcome: import("zod").ZodEnum<{
1174
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1175
+ PENDING_REVIEW: "PENDING_REVIEW";
1176
+ DISCARDED: "DISCARDED";
1177
+ NEEDS_REFRESH: "NEEDS_REFRESH";
1178
+ PUBLISHED: "PUBLISHED";
1179
+ PUBLISH_FAILED: "PUBLISH_FAILED";
1180
+ }>;
1181
+ coverageRetryCount: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>]>;
1182
+ decidedAt: import("zod").ZodOptional<import("zod").ZodString>;
1183
+ decisionReason: import("zod").ZodOptional<import("zod").ZodEnum<{
1184
+ USER_REJECTED: "USER_REJECTED";
1185
+ COVERAGE_CONFIRMED: "COVERAGE_CONFIRMED";
1186
+ }>>;
1187
+ failure: import("zod").ZodOptional<import("zod").ZodObject<{
1188
+ code: import("zod").ZodString;
1189
+ retryable: import("zod").ZodBoolean;
1190
+ occurredAt: import("zod").ZodString;
1191
+ }, import("zod/v4/core").$strict>>;
1192
+ }, import("zod/v4/core").$strict>>;
1193
+ publication: import("zod").ZodOptional<import("zod").ZodObject<{
1194
+ schemaVersion: import("zod").ZodLiteral<1>;
1195
+ policyVersion: import("zod").ZodLiteral<"publication-v1">;
1196
+ attemptCount: import("zod").ZodNumber;
1197
+ activeAttemptId: import("zod").ZodString;
1198
+ targetIdentityDigest: import("zod").ZodString;
1199
+ journal: import("zod").ZodArray<import("zod").ZodObject<{
1200
+ schemaVersion: import("zod").ZodLiteral<1>;
1201
+ ordinal: import("zod").ZodNumber;
1202
+ attempt: import("zod").ZodNumber;
1203
+ attemptId: import("zod").ZodString;
1204
+ stage: import("zod").ZodEnum<{
1205
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
1206
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
1207
+ ROOT_PREPARED: "ROOT_PREPARED";
1208
+ TARGET_INSTALLED: "TARGET_INSTALLED";
1209
+ DISK_VERIFIED: "DISK_VERIFIED";
1210
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
1211
+ LINEAGE_PENDING: "LINEAGE_PENDING";
1212
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
1213
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
1214
+ }>;
1215
+ targetIdentityDigest: import("zod").ZodString;
1216
+ expectedHash: import("zod").ZodOptional<import("zod").ZodString>;
1217
+ observedHash: import("zod").ZodOptional<import("zod").ZodString>;
1218
+ occurredAt: import("zod").ZodString;
1219
+ previousDigest: import("zod").ZodNullable<import("zod").ZodString>;
1220
+ digest: import("zod").ZodString;
1221
+ }, import("zod/v4/core").$strict>>;
1222
+ pendingLineage: import("zod").ZodOptional<import("zod").ZodObject<{
1223
+ schemaVersion: import("zod").ZodLiteral<1>;
1224
+ scope: import("zod").ZodEnum<{
1225
+ PROJECT: "PROJECT";
1226
+ USER: "USER";
1227
+ }>;
1228
+ provider: import("zod").ZodString;
1229
+ source: import("zod").ZodEnum<{
1230
+ "project-dsh": "project-dsh";
1231
+ "user-dsh": "user-dsh";
1232
+ }>;
1233
+ skillName: import("zod").ZodString;
1234
+ canonicalTargetPath: import("zod").ZodString;
1235
+ targetIdentityDigest: import("zod").ZodString;
1236
+ currentRevision: import("zod").ZodNumber;
1237
+ revisions: import("zod").ZodArray<import("zod").ZodObject<{
1238
+ revision: import("zod").ZodNumber;
1239
+ origin: import("zod").ZodEnum<{
1240
+ ADOPTED_BASE: "ADOPTED_BASE";
1241
+ MANUAL_BASE: "MANUAL_BASE";
1242
+ RUN2SKILL: "RUN2SKILL";
1243
+ }>;
1244
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
1245
+ exactSkillBytes: import("zod").ZodString;
1246
+ skillBytesDigest: import("zod").ZodString;
1247
+ committedAt: import("zod").ZodString;
1248
+ }, import("zod/v4/core").$strict>>;
1249
+ lineageId: import("zod").ZodString;
1250
+ }, import("zod/v4/core").$strict>>;
1251
+ }, import("zod/v4/core").$strict>>;
1252
+ }, import("zod/v4/core").$strict>;
1253
+ };
1254
+ readonly lineages: {
1255
+ readonly valueSchema: import("zod").ZodObject<{
1256
+ schemaVersion: import("zod").ZodLiteral<1>;
1257
+ scope: import("zod").ZodEnum<{
1258
+ PROJECT: "PROJECT";
1259
+ USER: "USER";
1260
+ }>;
1261
+ provider: import("zod").ZodString;
1262
+ source: import("zod").ZodEnum<{
1263
+ "project-dsh": "project-dsh";
1264
+ "user-dsh": "user-dsh";
1265
+ }>;
1266
+ skillName: import("zod").ZodString;
1267
+ canonicalTargetPath: import("zod").ZodString;
1268
+ targetIdentityDigest: import("zod").ZodString;
1269
+ currentRevision: import("zod").ZodNumber;
1270
+ revisions: import("zod").ZodArray<import("zod").ZodObject<{
1271
+ revision: import("zod").ZodNumber;
1272
+ origin: import("zod").ZodEnum<{
1273
+ ADOPTED_BASE: "ADOPTED_BASE";
1274
+ MANUAL_BASE: "MANUAL_BASE";
1275
+ RUN2SKILL: "RUN2SKILL";
1276
+ }>;
1277
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
1278
+ exactSkillBytes: import("zod").ZodString;
1279
+ skillBytesDigest: import("zod").ZodString;
1280
+ committedAt: import("zod").ZodString;
1281
+ }, import("zod/v4/core").$strict>>;
1282
+ lineageId: import("zod").ZodString;
1283
+ }, import("zod/v4/core").$strict>;
1284
+ };
1285
+ };
1286
+ };
1287
+ //#endregion
1288
+ //#region src/domain/publication/schemas.d.ts
1289
+ declare const PublicationJournalStageV1Schema: z.ZodEnum<{
1290
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
1291
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
1292
+ ROOT_PREPARED: "ROOT_PREPARED";
1293
+ TARGET_INSTALLED: "TARGET_INSTALLED";
1294
+ DISK_VERIFIED: "DISK_VERIFIED";
1295
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
1296
+ LINEAGE_PENDING: "LINEAGE_PENDING";
1297
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
1298
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
1299
+ }>;
1300
+ type PublicationJournalStageV1 = z.infer<typeof PublicationJournalStageV1Schema>;
1301
+ declare const LineageV1Schema: z.ZodObject<{
1302
+ schemaVersion: z.ZodLiteral<1>;
1303
+ scope: z.ZodEnum<{
1304
+ PROJECT: "PROJECT";
1305
+ USER: "USER";
1306
+ }>;
1307
+ provider: z.ZodString;
1308
+ source: z.ZodEnum<{
1309
+ "project-dsh": "project-dsh";
1310
+ "user-dsh": "user-dsh";
1311
+ }>;
1312
+ skillName: z.ZodString;
1313
+ canonicalTargetPath: z.ZodString;
1314
+ targetIdentityDigest: z.ZodString;
1315
+ currentRevision: z.ZodNumber;
1316
+ revisions: z.ZodArray<z.ZodObject<{
1317
+ revision: z.ZodNumber;
1318
+ origin: z.ZodEnum<{
1319
+ ADOPTED_BASE: "ADOPTED_BASE";
1320
+ MANUAL_BASE: "MANUAL_BASE";
1321
+ RUN2SKILL: "RUN2SKILL";
1322
+ }>;
1323
+ proposalId: z.ZodOptional<z.ZodString>;
1324
+ exactSkillBytes: z.ZodString;
1325
+ skillBytesDigest: z.ZodString;
1326
+ committedAt: z.ZodString;
1327
+ }, z.core.$strict>>;
1328
+ lineageId: z.ZodString;
1329
+ }, z.core.$strict>;
1330
+ type LineageV1 = z.infer<typeof LineageV1Schema>;
1331
+ //#endregion
1332
+ //#region src/adapters/dsh-storage/types.d.ts
1333
+ interface Run2skillTable<K extends string, V> {
1334
+ get(key: K): V | undefined;
1335
+ entries(): IterableIterator<[K, V]>;
1336
+ keys(): IterableIterator<K>;
1337
+ readonly size: number;
1338
+ put(key: K, value: V): Promise<void>;
1339
+ delete(key: K): Promise<boolean>;
1340
+ update(key: K, transform: (current: V) => V): Promise<V>;
1341
+ }
1342
+ interface Run2skillDomain {
1343
+ readonly name: 'run2skill_v1';
1344
+ readonly global: {
1345
+ get(): GlobalV1;
1346
+ set(value: GlobalV1): Promise<void>;
1347
+ };
1348
+ table(name: 'work_items'): Run2skillTable<string, CaptureWorkItemV1>;
1349
+ table(name: 'lineages'): Run2skillTable<string, LineageV1>;
1350
+ close(): Promise<void>;
1351
+ }
1352
+ interface Run2skillStorageContext {
1353
+ readonly storageDomain: {
1354
+ open(spec: typeof run2skillDomainSpec): Promise<Run2skillDomain>;
1355
+ };
1356
+ }
1357
+ //#endregion
1358
+ //#region src/domain/purge/schemas.d.ts
1359
+ declare const PurgeJournalV1Schema: z.ZodObject<{
1360
+ schemaVersion: z.ZodLiteral<1>;
1361
+ purgeId: z.ZodString;
1362
+ scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1363
+ scope: z.ZodLiteral<"PROJECT">;
1364
+ workspaceId: z.ZodString;
1365
+ canonicalWorkspacePath: z.ZodString;
1366
+ workspaceObservedAt: z.ZodString;
1367
+ canonicalRootPath: z.ZodString;
1368
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1369
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1370
+ resolutionContractDigest: z.ZodString;
1371
+ }, z.core.$strict>, z.ZodObject<{
1372
+ scope: z.ZodLiteral<"USER">;
1373
+ }, z.core.$strict>], "scope">;
1374
+ hideBefore: z.ZodString;
1375
+ candidateDigest: z.ZodString;
1376
+ startedAt: z.ZodString;
1377
+ phase: z.ZodEnum<{
1378
+ HIDING: "HIDING";
1379
+ DELETING_LINEAGES: "DELETING_LINEAGES";
1380
+ DELETING_WORK_ITEMS: "DELETING_WORK_ITEMS";
1381
+ VERIFYING: "VERIFYING";
1382
+ }>;
1383
+ deletedWorkItems: z.ZodNumber;
1384
+ deletedLineages: z.ZodNumber;
1385
+ lastError: z.ZodOptional<z.ZodObject<{
1386
+ code: z.ZodString;
1387
+ occurredAt: z.ZodString;
1388
+ }, z.core.$strict>>;
1389
+ }, z.core.$strict>;
1390
+ type PurgeJournalV1 = z.infer<typeof PurgeJournalV1Schema>;
1391
+ //#endregion
1392
+ //#region src/adapters/dsh-storage/purge-visibility.d.ts
1393
+ declare class PurgeVisibility {
1394
+ private readonly domain;
1395
+ constructor(domain: Run2skillDomain);
1396
+ active(): PurgeJournalV1 | undefined;
1397
+ workItemWasPurged(item: CaptureWorkItemV1): boolean;
1398
+ workItemVisible(item: CaptureWorkItemV1): boolean;
1399
+ lineageVisible(lineage: LineageV1): boolean;
1400
+ }
1401
+ //#endregion
1402
+ //#region src/adapters/dsh-workspace/binding.d.ts
1403
+ interface DshWorkspaceProjection {
1404
+ readonly id: string;
1405
+ readonly path: string;
1406
+ status?(): Promise<'ok' | 'missing-dir'>;
1407
+ }
1408
+ interface DshWorkspaceRegistryPort {
1409
+ resolveByPath(path: string): Promise<DshWorkspaceProjection | undefined>;
1410
+ get?(id: string): DshWorkspaceProjection | undefined;
1411
+ }
1412
+ //#endregion
1413
+ //#region src/application/learn/learning-worker.d.ts
1414
+ type LearningAgent = object & AgentScopeProjection;
1415
+ interface LearningSkillView<TAgent extends LearningAgent> {
1416
+ readonly cwd?: string;
1417
+ readonly scope: TAgent;
1418
+ readonly signal: AbortSignal;
1419
+ }
1420
+ //#endregion
1421
+ //#region src/adapters/dsh-skills/stock-root-contract.d.ts
1422
+ interface StockSkillRuntimeConfiguration {
1423
+ readonly profile: string;
1424
+ readonly presetId?: string | undefined;
1425
+ readonly providerName: string;
1426
+ readonly includeDefaultRoots: boolean;
1427
+ readonly customSkillDirs: readonly string[];
1428
+ readonly configuredDshHome?: string | undefined;
1429
+ }
1430
+ interface StockFiberProjection {
1431
+ readonly parent: {
1432
+ readonly fiber: StockFiberProjection;
1433
+ };
1434
+ readonly config: unknown;
1435
+ }
1436
+ interface StockPluginRuntimeProjection {
1437
+ readonly name?: string | undefined;
1438
+ readonly fibers: Iterable<StockFiberProjection>;
1439
+ }
1440
+ interface StockPresetMountProjection {
1441
+ readonly presetId: string;
1442
+ readonly fiber: StockFiberProjection;
1443
+ }
1444
+ interface StockPresetMountPort {
1445
+ standingMountFor(agentContext: object): StockPresetMountProjection | undefined | Promise<StockPresetMountProjection | undefined>;
1446
+ }
1447
+ interface StockComposedAgentProjection {
1448
+ readonly ctx: {
1449
+ readonly registry: {
1450
+ values(): Iterable<StockPluginRuntimeProjection>;
1451
+ };
1452
+ };
1453
+ }
1454
+ interface StockAgentPresetObservationPort {
1455
+ composedPreset(agentContext: object): string | undefined;
1456
+ resolve(id: string): Promise<{
1457
+ readonly id: string;
1458
+ readonly trust: 'system' | 'user';
1459
+ }>;
1460
+ read(id: string): Promise<string>;
1461
+ }
1462
+ declare function resolvePinnedStockPresetConfiguration(presets: StockAgentPresetObservationPort, agent: {
1463
+ readonly ctx: object;
1464
+ }, expectedDigests?: Readonly<Record<'standard' | 'code', string>>): Promise<StockSkillRuntimeConfiguration | undefined>;
1465
+ /** Reads the exact stock filesystem fiber mounted for one Agent's joined generation. */
1466
+ declare function resolveStockSkillRuntimeConfiguration(mounts: StockPresetMountPort, agent: StockComposedAgentProjection): Promise<StockSkillRuntimeConfiguration | undefined>;
1467
+ //#endregion
1468
+ //#region src/adapters/dsh-settings/automatic-learning.d.ts
1469
+ interface DshSettingsScope<T> {
1470
+ get(): T;
1471
+ watch(callback: (next: T, previous: T) => void | Promise<void>): () => void;
1472
+ }
1473
+ interface DshSettingsPort {
1474
+ register<T>(namespace: string, schema: z$1<T>, options: {
1475
+ readonly applies: 'live';
1476
+ }): DshSettingsScope<T>;
1477
+ }
1478
+ //#endregion
1479
+ //#region src/domain/review/schemas.d.ts
1480
+ declare const RootBindingV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1481
+ scope: z.ZodEnum<{
1482
+ PROJECT: "PROJECT";
1483
+ USER: "USER";
1484
+ }>;
1485
+ expectedProvider: z.ZodLiteral<"filesystem">;
1486
+ expectedSource: z.ZodEnum<{
1487
+ "project-dsh": "project-dsh";
1488
+ "user-dsh": "user-dsh";
1489
+ }>;
1490
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1491
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1492
+ resolutionContractDigest: z.ZodString;
1493
+ declaredRootPath: z.ZodString;
1494
+ state: z.ZodLiteral<"EXISTING">;
1495
+ canonicalRootPath: z.ZodString;
1496
+ rootIdentityDigest: z.ZodString;
1497
+ }, z.core.$strict>, z.ZodObject<{
1498
+ scope: z.ZodEnum<{
1499
+ PROJECT: "PROJECT";
1500
+ USER: "USER";
1501
+ }>;
1502
+ expectedProvider: z.ZodLiteral<"filesystem">;
1503
+ expectedSource: z.ZodEnum<{
1504
+ "project-dsh": "project-dsh";
1505
+ "user-dsh": "user-dsh";
1506
+ }>;
1507
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1508
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1509
+ resolutionContractDigest: z.ZodString;
1510
+ declaredRootPath: z.ZodString;
1511
+ state: z.ZodLiteral<"ABSENT">;
1512
+ canonicalExistingAncestorPath: z.ZodString;
1513
+ ancestorIdentityDigest: z.ZodString;
1514
+ missingSegments: z.ZodArray<z.ZodString>;
1515
+ }, z.core.$strict>], "state">;
1516
+ type RootBindingV2 = z.infer<typeof RootBindingV2Schema>;
1517
+ declare const ProposalSnapshotV1Schema: z.ZodObject<{
1518
+ schemaVersion: z.ZodLiteral<1>;
1519
+ revision: z.ZodNumber;
1520
+ createdAt: z.ZodString;
1521
+ sourceLearningProposalId: z.ZodString;
1522
+ kind: z.ZodEnum<{
1523
+ CREATE: "CREATE";
1524
+ MERGE: "MERGE";
1525
+ DISCARD: "DISCARD";
1526
+ }>;
1527
+ name: z.ZodString;
1528
+ description: z.ZodString;
1529
+ whenToUse: z.ZodString;
1530
+ invocation: z.ZodObject<{
1531
+ modelInvocable: z.ZodLiteral<true>;
1532
+ userInvocable: z.ZodLiteral<false>;
1533
+ }, z.core.$strict>;
1534
+ exactSkillBytes: z.ZodString;
1535
+ skillBytesDigest: z.ZodString;
1536
+ rendererVersion: z.ZodString;
1537
+ persistenceScope: z.ZodEnum<{
1538
+ PROJECT: "PROJECT";
1539
+ USER: "USER";
1540
+ }>;
1541
+ workspaceBinding: z.ZodOptional<z.ZodObject<{
1542
+ workspaceId: z.ZodString;
1543
+ canonicalPath: z.ZodString;
1544
+ observedAt: z.ZodString;
1545
+ }, z.core.$strict>>;
1546
+ dshHomeBinding: z.ZodOptional<z.ZodObject<{
1547
+ resolutionKind: z.ZodEnum<{
1548
+ CONFIGURATION: "CONFIGURATION";
1549
+ ENVIRONMENT: "ENVIRONMENT";
1550
+ DEFAULT: "DEFAULT";
1551
+ }>;
1552
+ canonicalPath: z.ZodString;
1553
+ identityDigest: z.ZodString;
1554
+ observedAt: z.ZodString;
1555
+ }, z.core.$strict>>;
1556
+ supportingExperienceIds: z.ZodArray<z.ZodString>;
1557
+ catalogObservationDigest: z.ZodString;
1558
+ curationRationale: z.ZodString;
1559
+ actionBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1560
+ kind: z.ZodLiteral<"CREATE">;
1561
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1562
+ scope: z.ZodEnum<{
1563
+ PROJECT: "PROJECT";
1564
+ USER: "USER";
1565
+ }>;
1566
+ expectedProvider: z.ZodLiteral<"filesystem">;
1567
+ expectedSource: z.ZodEnum<{
1568
+ "project-dsh": "project-dsh";
1569
+ "user-dsh": "user-dsh";
1570
+ }>;
1571
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1572
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1573
+ resolutionContractDigest: z.ZodString;
1574
+ declaredRootPath: z.ZodString;
1575
+ state: z.ZodLiteral<"EXISTING">;
1576
+ canonicalRootPath: z.ZodString;
1577
+ rootIdentityDigest: z.ZodString;
1578
+ }, z.core.$strict>, z.ZodObject<{
1579
+ scope: z.ZodEnum<{
1580
+ PROJECT: "PROJECT";
1581
+ USER: "USER";
1582
+ }>;
1583
+ expectedProvider: z.ZodLiteral<"filesystem">;
1584
+ expectedSource: z.ZodEnum<{
1585
+ "project-dsh": "project-dsh";
1586
+ "user-dsh": "user-dsh";
1587
+ }>;
1588
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1589
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1590
+ resolutionContractDigest: z.ZodString;
1591
+ declaredRootPath: z.ZodString;
1592
+ state: z.ZodLiteral<"ABSENT">;
1593
+ canonicalExistingAncestorPath: z.ZodString;
1594
+ ancestorIdentityDigest: z.ZodString;
1595
+ missingSegments: z.ZodArray<z.ZodString>;
1596
+ }, z.core.$strict>], "state">;
1597
+ targetBinding: z.ZodObject<{
1598
+ skillName: z.ZodString;
1599
+ bundlePath: z.ZodString;
1600
+ skillFilePath: z.ZodString;
1601
+ }, z.core.$strict>;
1602
+ expectedAbsence: z.ZodObject<{
1603
+ catalogObservationDigest: z.ZodString;
1604
+ observedAt: z.ZodString;
1605
+ flatSkillFilePath: z.ZodString;
1606
+ bundlePathAbsent: z.ZodLiteral<true>;
1607
+ skillFilePathAbsent: z.ZodLiteral<true>;
1608
+ flatSkillFilePathAbsent: z.ZodLiteral<true>;
1609
+ }, z.core.$strict>;
1610
+ }, z.core.$strict>, z.ZodObject<{
1611
+ kind: z.ZodLiteral<"MERGE">;
1612
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1613
+ scope: z.ZodEnum<{
1614
+ PROJECT: "PROJECT";
1615
+ USER: "USER";
1616
+ }>;
1617
+ expectedProvider: z.ZodLiteral<"filesystem">;
1618
+ expectedSource: z.ZodEnum<{
1619
+ "project-dsh": "project-dsh";
1620
+ "user-dsh": "user-dsh";
1621
+ }>;
1622
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1623
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1624
+ resolutionContractDigest: z.ZodString;
1625
+ declaredRootPath: z.ZodString;
1626
+ state: z.ZodLiteral<"EXISTING">;
1627
+ canonicalRootPath: z.ZodString;
1628
+ rootIdentityDigest: z.ZodString;
1629
+ }, z.core.$strict>, z.ZodObject<{
1630
+ scope: z.ZodEnum<{
1631
+ PROJECT: "PROJECT";
1632
+ USER: "USER";
1633
+ }>;
1634
+ expectedProvider: z.ZodLiteral<"filesystem">;
1635
+ expectedSource: z.ZodEnum<{
1636
+ "project-dsh": "project-dsh";
1637
+ "user-dsh": "user-dsh";
1638
+ }>;
1639
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
1640
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
1641
+ resolutionContractDigest: z.ZodString;
1642
+ declaredRootPath: z.ZodString;
1643
+ state: z.ZodLiteral<"ABSENT">;
1644
+ canonicalExistingAncestorPath: z.ZodString;
1645
+ ancestorIdentityDigest: z.ZodString;
1646
+ missingSegments: z.ZodArray<z.ZodString>;
1647
+ }, z.core.$strict>], "state">;
1648
+ targetBinding: z.ZodObject<{
1649
+ skillName: z.ZodString;
1650
+ bundlePath: z.ZodString;
1651
+ skillFilePath: z.ZodString;
1652
+ }, z.core.$strict>;
1653
+ baseBinding: z.ZodObject<{
1654
+ candidateKey: z.ZodString;
1655
+ provider: z.ZodString;
1656
+ source: z.ZodString;
1657
+ path: z.ZodString;
1658
+ exactBytes: z.ZodString;
1659
+ bytesDigest: z.ZodString;
1660
+ catalogObservationDigest: z.ZodString;
1661
+ observedAt: z.ZodString;
1662
+ }, z.core.$strict>;
1663
+ }, z.core.$strict>, z.ZodObject<{
1664
+ kind: z.ZodLiteral<"DISCARD">;
1665
+ coveringCandidateBinding: z.ZodObject<{
1666
+ candidateKey: z.ZodString;
1667
+ provider: z.ZodString;
1668
+ source: z.ZodString;
1669
+ name: z.ZodString;
1670
+ description: z.ZodString;
1671
+ whenToUse: z.ZodOptional<z.ZodString>;
1672
+ content: z.ZodString;
1673
+ contentDigest: z.ZodString;
1674
+ path: z.ZodOptional<z.ZodString>;
1675
+ catalogObservationDigest: z.ZodString;
1676
+ observedAt: z.ZodString;
1677
+ }, z.core.$strict>;
1678
+ }, z.core.$strict>], "kind">;
1679
+ proposalId: z.ZodString;
1680
+ digest: z.ZodString;
1681
+ }, z.core.$strict>;
1682
+ type ProposalSnapshotV1 = z.infer<typeof ProposalSnapshotV1Schema>;
1683
+ declare const ProposalRefV1Schema: z.ZodObject<{
1684
+ proposalId: z.ZodString;
1685
+ revision: z.ZodNumber;
1686
+ digest: z.ZodString;
1687
+ }, z.core.$strict>;
1688
+ type ProposalRefV1 = z.infer<typeof ProposalRefV1Schema>;
1689
+ //#endregion
1690
+ //#region src/adapters/dsh-publication/filesystem-cas.d.mts
1691
+ interface PublicationResult {
1692
+ readonly status: 'written' | 'conflict' | 'finalized';
1693
+ readonly code?: string;
1694
+ readonly txid: string;
1695
+ readonly target?: string;
1696
+ readonly backup?: string | null;
1697
+ }
1698
+ interface PublicationHooks {
1699
+ readonly beforeInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1700
+ readonly beforeBackupMove?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1701
+ readonly beforeBackupRename?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1702
+ readonly afterInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1703
+ }
1704
+ interface RootPreparation {
1705
+ readonly root: string;
1706
+ readonly createdSegments: readonly string[];
1707
+ readonly rootIdentityDigest: string;
1708
+ }
1709
+ declare class PublicationConflict extends Error {
1710
+ readonly code: string;
1711
+ constructor(code: string, message: string);
1712
+ }
1713
+ declare function preparePublicationRoot(input: {
1714
+ readonly binding: RootBindingV2;
1715
+ readonly verifyIdentity: (canonicalPath: string, identityDigest: string) => Promise<boolean>;
1716
+ readonly verifyParity: (binding: RootBindingV2, canonicalRoot: string) => Promise<boolean>;
1717
+ readonly crashAt?: string;
1718
+ }): Promise<RootPreparation>;
1719
+ declare function createBundle(input: {
1720
+ readonly root: string;
1721
+ readonly name: string;
1722
+ readonly txid: string;
1723
+ readonly nextBytes: string | Uint8Array;
1724
+ readonly rootPreparation?: RootPreparation;
1725
+ readonly crashAt?: string;
1726
+ readonly hooks?: PublicationHooks;
1727
+ }): Promise<PublicationResult>;
1728
+ declare function mergeBundle(input: {
1729
+ readonly root: string;
1730
+ readonly name: string;
1731
+ readonly txid: string;
1732
+ readonly expectedHash: string;
1733
+ readonly nextBytes: string | Uint8Array;
1734
+ readonly rootPreparation?: RootPreparation;
1735
+ readonly crashAt?: string;
1736
+ readonly hooks?: PublicationHooks;
1737
+ }): Promise<PublicationResult>;
1738
+ declare function recoverTransaction(input: {
1739
+ readonly root: string;
1740
+ readonly txid: string;
1741
+ }): Promise<PublicationResult>;
1742
+ declare function finalizeTransaction(input: {
1743
+ readonly root: string;
1744
+ readonly txid: string;
1745
+ readonly confirmedExactReadback: true;
1746
+ }): Promise<PublicationResult>;
1747
+ //#endregion
1748
+ //#region src/adapters/dsh-publication/target-single-flight.d.ts
1749
+ declare class PublicationTargetSingleFlight {
1750
+ #private;
1751
+ run<T>(canonicalTargetPath: string, task: () => Promise<T>): Promise<T>;
1752
+ get activeTargetCount(): number;
1753
+ }
1754
+ //#endregion
1755
+ //#region src/adapters/dsh-storage/publication-saga-store.d.ts
1756
+ type FailureOutcome = 'NEEDS_ATTENTION' | 'NEEDS_REFRESH' | 'PUBLISH_FAILED';
1757
+ declare class PublicationSagaStore {
1758
+ #private;
1759
+ constructor(domain: Run2skillDomain, now?: (() => string) | undefined, visibility?: PurgeVisibility);
1760
+ get(workItemId: string): CaptureWorkItemV1 | undefined;
1761
+ getLineage(lineageId: string): LineageV1 | undefined;
1762
+ listRecoverable(): CaptureWorkItemV1[];
1763
+ appendEvent(workItemId: string, stage: Exclude<PublicationJournalStageV1, 'APPROVAL_COMMITTED'>, hashes?: {
1764
+ readonly expectedHash?: string;
1765
+ readonly observedHash?: string;
1766
+ }): Promise<CaptureWorkItemV1>;
1767
+ stageLineage(workItemId: string, rawLineage: LineageV1): Promise<CaptureWorkItemV1>;
1768
+ commitLineage(workItemId: string): Promise<CaptureWorkItemV1>;
1769
+ complete(workItemId: string): Promise<CaptureWorkItemV1>;
1770
+ fail(workItemId: string, outcome: FailureOutcome, code: string, retryable: boolean): Promise<CaptureWorkItemV1>;
1771
+ retry(workItemId: string, expectedRevision: number, rawRef: ProposalRefV1): Promise<CaptureWorkItemV1>;
1772
+ }
1773
+ //#endregion
1774
+ //#region src/application/publication/approval-publication-saga.d.ts
1775
+ type PublicationRevalidationResult = {
1776
+ readonly status: 'VALID';
1777
+ } | {
1778
+ readonly status: 'NEEDS_REFRESH' | 'NEEDS_ATTENTION' | 'PUBLISH_FAILED';
1779
+ readonly code: string;
1780
+ readonly retryable?: boolean;
1781
+ };
1782
+ interface PublicationRevalidationPort {
1783
+ revalidateRootContract(item: CaptureWorkItemV1): Promise<PublicationRevalidationResult>;
1784
+ revalidate(item: CaptureWorkItemV1): Promise<PublicationRevalidationResult>;
1785
+ }
1786
+ interface PublicationRootPreparation {
1787
+ readonly root: string;
1788
+ readonly createdSegments: readonly string[];
1789
+ readonly rootIdentityDigest: string;
1790
+ }
1791
+ interface PublicationFileSystemResult {
1792
+ readonly status: 'written' | 'conflict' | 'finalized';
1793
+ readonly code?: string | undefined;
1794
+ readonly txid: string;
1795
+ readonly target?: string | undefined;
1796
+ readonly backup?: string | null | undefined;
1797
+ }
1798
+ interface PublicationFileSystemPort {
1799
+ recover(input: {
1800
+ readonly proposal: ProposalSnapshotV1;
1801
+ readonly attemptId: string;
1802
+ }): Promise<PublicationFileSystemResult | {
1803
+ readonly status: 'NO_JOURNAL';
1804
+ }>;
1805
+ prepareRoot(item: CaptureWorkItemV1): Promise<PublicationRootPreparation>;
1806
+ write(input: {
1807
+ readonly proposal: ProposalSnapshotV1;
1808
+ readonly attemptId: string;
1809
+ readonly rootPreparation: PublicationRootPreparation;
1810
+ }): Promise<PublicationFileSystemResult>;
1811
+ finalize(input: {
1812
+ readonly proposal: ProposalSnapshotV1;
1813
+ readonly attemptId: string;
1814
+ readonly rootIdentityDigest: string;
1815
+ }): Promise<PublicationFileSystemResult>;
1816
+ }
1817
+ type PublicationReadbackResult = {
1818
+ readonly status: 'CONFIRMED';
1819
+ readonly observedHash: string;
1820
+ } | {
1821
+ readonly status: 'CHANGED';
1822
+ readonly code: string;
1823
+ } | {
1824
+ readonly status: 'TIMEOUT';
1825
+ readonly code: string;
1826
+ };
1827
+ interface PublicationReadbackPort {
1828
+ confirmExact(item: CaptureWorkItemV1): Promise<PublicationReadbackResult>;
1829
+ }
1830
+ interface PublicationSingleFlightPort {
1831
+ run<T>(canonicalTargetPath: string, task: () => Promise<T>): Promise<T>;
1832
+ }
1833
+ interface ApprovalPublicationSagaOptions {
1834
+ readonly store: PublicationSagaStore;
1835
+ readonly revalidation: PublicationRevalidationPort;
1836
+ readonly fileSystem: PublicationFileSystemPort;
1837
+ readonly readback: PublicationReadbackPort;
1838
+ readonly singleFlight?: PublicationSingleFlightPort;
1839
+ readonly now?: () => string;
1840
+ }
1841
+ declare class ApprovalPublicationSaga {
1842
+ #private;
1843
+ constructor(options: ApprovalPublicationSagaOptions);
1844
+ run(workItemId: string): Promise<CaptureWorkItemV1>;
1845
+ }
1846
+ //#endregion
1847
+ //#region src/application/curation/proposal-snapshot-builder.d.ts
1848
+ type ProposalBuildFailureCode = 'CATALOG_INCOMPLETE' | 'CATALOG_CHANGED' | 'ROOT_OBSERVATION_UNAVAILABLE' | 'ROOT_CONTRACT_UNSUPPORTED' | 'ROOT_BINDING_AMBIGUOUS' | 'WORKSPACE_BINDING_UNAVAILABLE' | 'DSH_HOME_BINDING_UNAVAILABLE' | 'CANDIDATE_UNAVAILABLE' | 'CURATION_CONFLICT' | 'TARGET_FACTS_UNAVAILABLE' | 'TARGET_ALREADY_EXISTS' | 'TARGET_FORMAT_UNSUPPORTED' | 'BASE_UNAVAILABLE' | 'UNSAFE_SKILL' | 'APPROVAL_FACTS_CHANGED';
1849
+ type ProposalBuildResult = {
1850
+ readonly status: 'READY';
1851
+ readonly proposal: ProposalSnapshotV1;
1852
+ } | {
1853
+ readonly status: 'UNAVAILABLE';
1854
+ readonly failureCode: ProposalBuildFailureCode;
1855
+ };
1856
+ type RootContractRevalidationResult = {
1857
+ readonly status: 'VALID';
1858
+ } | {
1859
+ readonly status: 'UNAVAILABLE';
1860
+ readonly failureCode: ProposalBuildFailureCode;
1861
+ };
1862
+ //#endregion
1863
+ //#region src/application/publication/approved-proposal-revalidator.d.ts
1864
+ declare class ApprovedProposalRevalidator<TView extends object> implements PublicationRevalidationPort {
1865
+ private readonly builder;
1866
+ private readonly resolveView;
1867
+ constructor(builder: {
1868
+ revalidateApproved(item: CaptureWorkItemV1, view: TView): Promise<ProposalBuildResult>;
1869
+ revalidateApprovedRootContract(item: CaptureWorkItemV1, view: TView): Promise<RootContractRevalidationResult>;
1870
+ }, resolveView: (item: CaptureWorkItemV1) => TView | undefined);
1871
+ revalidate(item: CaptureWorkItemV1): Promise<PublicationRevalidationResult>;
1872
+ revalidateRootContract(item: CaptureWorkItemV1): Promise<PublicationRevalidationResult>;
1873
+ }
1874
+ //#endregion
1875
+ //#region src/application/publication/publication-scheduler.d.ts
1876
+ interface PublicationWorkerPort {
1877
+ run(workItemId: string): Promise<unknown>;
1878
+ }
1879
+ interface PublicationSchedulerOptions {
1880
+ readonly store: PublicationSagaStore;
1881
+ readonly worker: PublicationWorkerPort;
1882
+ readonly eligible?: (item: CaptureWorkItemV1) => boolean;
1883
+ readonly onError?: (workItemId: string) => void;
1884
+ }
1885
+ declare class PublicationScheduler {
1886
+ #private;
1887
+ constructor(options: PublicationSchedulerOptions);
1888
+ start(): Promise<void>;
1889
+ wake(): void;
1890
+ dispose(): Promise<void>;
1891
+ }
1892
+ //#endregion
1893
+ //#region src/host/index.d.ts
1894
+ declare const name = "run2skill";
1895
+ declare const inject: readonly ["sessions", "sessionPersistence", "storageDomain", "workspaceRegistry", "connection", "llm", "skills", "settings", "agentPresets"];
1896
+ type Run2skillAgent = object & AgentScopeProjection & Parameters<typeof resolveStockSkillRuntimeConfiguration>[1];
1897
+ interface Run2skillHostContext extends Run2skillStorageContext {
1898
+ readonly sessions: unknown;
1899
+ readonly sessionPersistence: SessionPersistencePort;
1900
+ readonly workspaceRegistry: DshWorkspaceRegistryPort;
1901
+ readonly connection: ObserveSummaryHostConnection;
1902
+ readonly llm: DshLlmPort;
1903
+ readonly skills: DshSkillRegistryPort<LearningSkillView<Run2skillAgent>>;
1904
+ readonly settings: DshSettingsPort;
1905
+ readonly agentPresets: Parameters<typeof resolvePinnedStockPresetConfiguration>[0];
1906
+ on(event: string, listener: (...args: never[]) => unknown): void;
1907
+ }
1908
+ declare function apply(context: Run2skillHostContext): Promise<() => Promise<void>>;
1909
+ //#endregion
1910
+ export { ApprovalPublicationSaga, ApprovalPublicationSagaOptions, ApprovedProposalRevalidator, PublicationConflict, PublicationFileSystemPort, PublicationFileSystemResult, PublicationReadbackPort, PublicationReadbackResult, PublicationRevalidationPort, PublicationRevalidationResult, PublicationRootPreparation, PublicationScheduler, PublicationSchedulerOptions, PublicationSingleFlightPort, PublicationTargetSingleFlight, PublicationWorkerPort, Run2skillHostContext, apply, createBundle, finalizeTransaction, inject, mergeBundle, name, preparePublicationRoot, recoverTransaction };