dsh-run2skill 0.1.1-alpha → 0.3.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.
package/lib/index.d.ts CHANGED
@@ -475,6 +475,8 @@ declare const GlobalV1Schema: z.ZodObject<{
475
475
  resolutionContractDigest: z.ZodString;
476
476
  }, z.core.$strict>, z.ZodObject<{
477
477
  scope: z.ZodLiteral<"USER">;
478
+ }, z.core.$strict>, z.ZodObject<{
479
+ scope: z.ZodLiteral<"ALL">;
478
480
  }, z.core.$strict>], "scope">;
479
481
  hideBefore: z.ZodString;
480
482
  candidateDigest: z.ZodString;
@@ -487,6 +489,8 @@ declare const GlobalV1Schema: z.ZodObject<{
487
489
  }>;
488
490
  deletedWorkItems: z.ZodNumber;
489
491
  deletedLineages: z.ZodNumber;
492
+ targetWorkItems: z.ZodOptional<z.ZodNumber>;
493
+ targetLineages: z.ZodOptional<z.ZodNumber>;
490
494
  lastError: z.ZodOptional<z.ZodObject<{
491
495
  code: z.ZodString;
492
496
  occurredAt: z.ZodString;
@@ -494,6 +498,13 @@ declare const GlobalV1Schema: z.ZodObject<{
494
498
  }, z.core.$strict>>;
495
499
  completedPurgeFences: z.ZodOptional<z.ZodObject<{
496
500
  schemaVersion: z.ZodLiteral<1>;
501
+ all: z.ZodOptional<z.ZodObject<{
502
+ schemaVersion: z.ZodLiteral<1>;
503
+ purgeId: z.ZodString;
504
+ completedAt: z.ZodString;
505
+ hideBefore: z.ZodString;
506
+ scope: z.ZodLiteral<"ALL">;
507
+ }, z.core.$strict>>;
497
508
  user: z.ZodOptional<z.ZodObject<{
498
509
  schemaVersion: z.ZodLiteral<1>;
499
510
  purgeId: z.ZodString;
@@ -510,11 +521,37 @@ declare const GlobalV1Schema: z.ZodObject<{
510
521
  scopeIdentityDigest: z.ZodString;
511
522
  }, z.core.$strict>>;
512
523
  }, z.core.$strict>>;
524
+ recentSkillActivity: z.ZodOptional<z.ZodObject<{
525
+ schemaVersion: z.ZodLiteral<1>;
526
+ items: z.ZodArray<z.ZodObject<{
527
+ schemaVersion: z.ZodLiteral<1>;
528
+ activityId: z.ZodString;
529
+ workItemId: z.ZodString;
530
+ skillName: z.ZodString;
531
+ operation: z.ZodEnum<{
532
+ CREATED: "CREATED";
533
+ UPDATED: "UPDATED";
534
+ }>;
535
+ scope: z.ZodEnum<{
536
+ PROJECT: "PROJECT";
537
+ USER: "USER";
538
+ }>;
539
+ occurredAt: z.ZodString;
540
+ }, z.core.$strict>>;
541
+ }, z.core.$strict>>;
513
542
  }, z.core.$strict>;
514
543
  type CaptureWorkItemV1 = z.infer<typeof CaptureWorkItemV1Schema>;
515
544
  type GlobalV1 = z.infer<typeof GlobalV1Schema>;
516
545
  //#endregion
517
546
  //#region src/domain/learn/diagnostics.d.ts
547
+ declare const LearningTerminalDetailV1Schema: z.ZodEnum<{
548
+ MODEL_STREAM_FAILURE: "MODEL_STREAM_FAILURE";
549
+ MODEL_FINISH_MISSING: "MODEL_FINISH_MISSING";
550
+ MODEL_USAGE_INVALID: "MODEL_USAGE_INVALID";
551
+ MODEL_ASSEMBLY_FAILED: "MODEL_ASSEMBLY_FAILED";
552
+ MODEL_UNEXPECTED_FINISH: "MODEL_UNEXPECTED_FINISH";
553
+ }>;
554
+ type LearningTerminalDetailV1 = z.infer<typeof LearningTerminalDetailV1Schema>;
518
555
  declare const LearningDiagnosticRecordV1Schema: z.ZodObject<{
519
556
  schemaVersion: z.ZodLiteral<1>;
520
557
  workItemId: z.ZodString;
@@ -606,6 +643,7 @@ type DshStreamChunk = {
606
643
  interface DshGenerateOptions {
607
644
  readonly provider: string;
608
645
  readonly model: string;
646
+ readonly reasoningEffort?: string;
609
647
  readonly messages: DshUserMessage[];
610
648
  readonly system: string;
611
649
  readonly maxTokens: number;
@@ -627,6 +665,15 @@ interface DshLlmPort {
627
665
  readonly context?: {
628
666
  readonly contextWindow: number;
629
667
  };
668
+ readonly defaultMaxTokens?: number;
669
+ readonly reasoning?: {
670
+ readonly efforts: readonly {
671
+ readonly id: string;
672
+ readonly name: string;
673
+ readonly description?: string;
674
+ }[];
675
+ readonly defaultEffort?: string;
676
+ };
630
677
  }>;
631
678
  stream(options: DshGenerateOptions): AsyncIterable<DshStreamChunk>;
632
679
  }
@@ -647,6 +694,22 @@ interface AgentScopeProjection {
647
694
  }[] | undefined;
648
695
  };
649
696
  }
697
+ type AgentScopeResolution<TAgent> = {
698
+ readonly status: 'AVAILABLE';
699
+ readonly agent: TAgent;
700
+ readonly cwd: string | undefined;
701
+ readonly lifecycleKey: string;
702
+ } | {
703
+ readonly status: 'UNAVAILABLE';
704
+ };
705
+ declare class ExactAgentScopeRegistry<TAgent extends object> {
706
+ private readonly scopes;
707
+ register(agent: TAgent & AgentScopeProjection): () => void;
708
+ resolve(item: CaptureWorkItemV1): AgentScopeResolution<TAgent>;
709
+ resolveLifecycleKey(lifecycleKey: string): AgentScopeResolution<TAgent>;
710
+ resolveUniqueCwd(cwd: string): AgentScopeResolution<TAgent>;
711
+ clear(): void;
712
+ }
650
713
  //#endregion
651
714
  //#region src/adapters/dsh-skills/skill-catalog.d.ts
652
715
  interface DshSkillRegistryPort<TView extends object> {
@@ -654,56 +717,6 @@ interface DshSkillRegistryPort<TView extends object> {
654
717
  get(name: string, view: TView): Promise<unknown>;
655
718
  }
656
719
  //#endregion
657
- //#region src/adapters/dsh-session/types.d.ts
658
- interface DshSessionHeader {
659
- readonly version: number;
660
- readonly id: string;
661
- readonly createdAt: number;
662
- readonly cwd?: string;
663
- readonly parentSession?: string;
664
- readonly origin?: 'subagent';
665
- readonly delegationDepth?: number;
666
- }
667
- interface DshSessionEvent {
668
- readonly type: string;
669
- readonly seq: number;
670
- readonly time: number;
671
- readonly data: unknown;
672
- }
673
- interface SessionPersistenceSnapshot {
674
- readonly header: DshSessionHeader;
675
- readonly revision: string;
676
- }
677
- interface SessionPersistencePort {
678
- listSnapshots(signal?: AbortSignal): Promise<readonly SessionPersistenceSnapshot[]>;
679
- readFrom(sessionId: string, fromSeq: number, signal?: AbortSignal): Promise<{
680
- readonly meta: DshSessionHeader;
681
- readonly events: readonly DshSessionEvent[];
682
- }>;
683
- }
684
- //#endregion
685
- //#region src/adapters/dsh-connection/observe-summary-rpc.d.ts
686
- type ObserveRpcError = {
687
- readonly code: string;
688
- readonly message: string;
689
- readonly details: Record<string, unknown>;
690
- };
691
- type ObserveRpcResult<T> = {
692
- readonly ok: true;
693
- readonly value: T;
694
- } | {
695
- readonly ok: false;
696
- readonly error: ObserveRpcError;
697
- };
698
- type ObserveSummaryRpcHandler = (endpoint: string, payload: unknown, signal: AbortSignal) => Promise<ObserveRpcResult<unknown>>;
699
- interface ObserveSummaryHostConnection {
700
- readonly rpc: {
701
- handle(channel: string, handler: ObserveSummaryRpcHandler, options: {
702
- readonly authority: 'loopback';
703
- }): () => Promise<void>;
704
- };
705
- }
706
- //#endregion
707
720
  //#region src/adapters/dsh-storage/domain.d.ts
708
721
  declare const run2skillDomainSpec: {
709
722
  readonly name: "run2skill_v1";
@@ -755,6 +768,8 @@ declare const run2skillDomainSpec: {
755
768
  resolutionContractDigest: import("zod").ZodString;
756
769
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
757
770
  scope: import("zod").ZodLiteral<"USER">;
771
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
772
+ scope: import("zod").ZodLiteral<"ALL">;
758
773
  }, import("zod/v4/core").$strict>], "scope">;
759
774
  hideBefore: import("zod").ZodString;
760
775
  candidateDigest: import("zod").ZodString;
@@ -767,6 +782,8 @@ declare const run2skillDomainSpec: {
767
782
  }>;
768
783
  deletedWorkItems: import("zod").ZodNumber;
769
784
  deletedLineages: import("zod").ZodNumber;
785
+ targetWorkItems: import("zod").ZodOptional<import("zod").ZodNumber>;
786
+ targetLineages: import("zod").ZodOptional<import("zod").ZodNumber>;
770
787
  lastError: import("zod").ZodOptional<import("zod").ZodObject<{
771
788
  code: import("zod").ZodString;
772
789
  occurredAt: import("zod").ZodString;
@@ -774,6 +791,13 @@ declare const run2skillDomainSpec: {
774
791
  }, import("zod/v4/core").$strict>>;
775
792
  completedPurgeFences: import("zod").ZodOptional<import("zod").ZodObject<{
776
793
  schemaVersion: import("zod").ZodLiteral<1>;
794
+ all: import("zod").ZodOptional<import("zod").ZodObject<{
795
+ schemaVersion: import("zod").ZodLiteral<1>;
796
+ purgeId: import("zod").ZodString;
797
+ completedAt: import("zod").ZodString;
798
+ hideBefore: import("zod").ZodString;
799
+ scope: import("zod").ZodLiteral<"ALL">;
800
+ }, import("zod/v4/core").$strict>>;
777
801
  user: import("zod").ZodOptional<import("zod").ZodObject<{
778
802
  schemaVersion: import("zod").ZodLiteral<1>;
779
803
  purgeId: import("zod").ZodString;
@@ -790,6 +814,24 @@ declare const run2skillDomainSpec: {
790
814
  scopeIdentityDigest: import("zod").ZodString;
791
815
  }, import("zod/v4/core").$strict>>;
792
816
  }, import("zod/v4/core").$strict>>;
817
+ recentSkillActivity: import("zod").ZodOptional<import("zod").ZodObject<{
818
+ schemaVersion: import("zod").ZodLiteral<1>;
819
+ items: import("zod").ZodArray<import("zod").ZodObject<{
820
+ schemaVersion: import("zod").ZodLiteral<1>;
821
+ activityId: import("zod").ZodString;
822
+ workItemId: import("zod").ZodString;
823
+ skillName: import("zod").ZodString;
824
+ operation: import("zod").ZodEnum<{
825
+ CREATED: "CREATED";
826
+ UPDATED: "UPDATED";
827
+ }>;
828
+ scope: import("zod").ZodEnum<{
829
+ PROJECT: "PROJECT";
830
+ USER: "USER";
831
+ }>;
832
+ occurredAt: import("zod").ZodString;
833
+ }, import("zod/v4/core").$strict>>;
834
+ }, import("zod/v4/core").$strict>>;
793
835
  }, import("zod/v4/core").$strict>;
794
836
  readonly initial: {
795
837
  schemaVersion: 1;
@@ -837,6 +879,8 @@ declare const run2skillDomainSpec: {
837
879
  resolutionContractDigest: string;
838
880
  } | {
839
881
  scope: "USER";
882
+ } | {
883
+ scope: "ALL";
840
884
  };
841
885
  hideBefore: string;
842
886
  candidateDigest: string;
@@ -844,6 +888,8 @@ declare const run2skillDomainSpec: {
844
888
  phase: "HIDING" | "DELETING_LINEAGES" | "DELETING_WORK_ITEMS" | "VERIFYING";
845
889
  deletedWorkItems: number;
846
890
  deletedLineages: number;
891
+ targetWorkItems?: number | undefined;
892
+ targetLineages?: number | undefined;
847
893
  lastError?: {
848
894
  code: string;
849
895
  occurredAt: string;
@@ -859,6 +905,13 @@ declare const run2skillDomainSpec: {
859
905
  scope: "PROJECT";
860
906
  scopeIdentityDigest: string;
861
907
  }>;
908
+ all?: {
909
+ schemaVersion: 1;
910
+ purgeId: string;
911
+ completedAt: string;
912
+ hideBefore: string;
913
+ scope: "ALL";
914
+ } | undefined;
862
915
  user?: {
863
916
  schemaVersion: 1;
864
917
  purgeId: string;
@@ -867,6 +920,18 @@ declare const run2skillDomainSpec: {
867
920
  scope: "USER";
868
921
  } | undefined;
869
922
  } | undefined;
923
+ recentSkillActivity?: {
924
+ schemaVersion: 1;
925
+ items: {
926
+ schemaVersion: 1;
927
+ activityId: string;
928
+ workItemId: string;
929
+ skillName: string;
930
+ operation: "CREATED" | "UPDATED";
931
+ scope: "PROJECT" | "USER";
932
+ occurredAt: string;
933
+ }[];
934
+ } | undefined;
870
935
  };
871
936
  };
872
937
  readonly tables: {
@@ -1334,144 +1399,3417 @@ declare const run2skillDomainSpec: {
1334
1399
  };
1335
1400
  };
1336
1401
  //#endregion
1337
- //#region src/adapters/dsh-storage/learning-diagnostic-domain.d.ts
1338
- declare const learningDiagnosticDomainSpec: {
1339
- readonly name: "run2skill_learning_diagnostics_v1";
1340
- readonly version: 1;
1341
- readonly tables: {
1342
- readonly terminal_details: {
1343
- readonly valueSchema: import("zod").ZodObject<{
1344
- schemaVersion: import("zod").ZodLiteral<1>;
1345
- workItemId: import("zod").ZodString;
1346
- workItemRevision: import("zod").ZodNumber;
1347
- attempt: import("zod").ZodNumber;
1348
- requestOrdinal: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
1349
- callKind: import("zod").ZodEnum<{
1350
- PRIMARY: "PRIMARY";
1351
- FORMAT_REPAIR: "FORMAT_REPAIR";
1352
- }>;
1353
- callOutcome: import("zod").ZodEnum<{
1354
- SUCCEEDED: "SUCCEEDED";
1355
- FAILED: "FAILED";
1356
- ABORTED: "ABORTED";
1357
- TIMED_OUT: "TIMED_OUT";
1358
- }>;
1359
- failureCode: import("zod").ZodEnum<{
1360
- SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
1361
- AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
1362
- MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
1363
- MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
1364
- CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
1365
- CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
1366
- ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
1367
- MODEL_TIMEOUT: "MODEL_TIMEOUT";
1368
- MODEL_ABORTED: "MODEL_ABORTED";
1369
- MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
1370
- MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
1371
- INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
1372
- LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
1373
- STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
1374
- }>;
1375
- failureOccurredAt: import("zod").ZodString;
1376
- detail: import("zod").ZodEnum<{
1377
- MODEL_STREAM_FAILURE: "MODEL_STREAM_FAILURE";
1378
- MODEL_FINISH_MISSING: "MODEL_FINISH_MISSING";
1379
- MODEL_USAGE_INVALID: "MODEL_USAGE_INVALID";
1380
- MODEL_ASSEMBLY_FAILED: "MODEL_ASSEMBLY_FAILED";
1381
- MODEL_UNEXPECTED_FINISH: "MODEL_UNEXPECTED_FINISH";
1382
- }>;
1383
- }, import("zod/v4/core").$strict>;
1384
- };
1385
- readonly health_checks: {
1386
- readonly valueSchema: import("zod").ZodObject<{
1387
- schemaVersion: import("zod").ZodLiteral<1>;
1388
- generation: import("zod").ZodNumber;
1389
- }, import("zod/v4/core").$strict>;
1390
- };
1391
- };
1392
- };
1393
- interface LearningDiagnosticDomain {
1394
- readonly name: 'run2skill_learning_diagnostics_v1';
1395
- table(name: 'terminal_details'): Run2skillTable<string, LearningDiagnosticRecordV1>;
1396
- table(name: 'health_checks'): Run2skillTable<string, LearningDiagnosticHealthV1>;
1397
- close(): Promise<void>;
1398
- }
1399
- //#endregion
1400
- //#region src/domain/publication/schemas.d.ts
1401
- declare const PublicationJournalStageV1Schema: z.ZodEnum<{
1402
- APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
1403
- FACTS_REVALIDATED: "FACTS_REVALIDATED";
1404
- ROOT_PREPARED: "ROOT_PREPARED";
1405
- TARGET_INSTALLED: "TARGET_INSTALLED";
1406
- DISK_VERIFIED: "DISK_VERIFIED";
1407
- READBACK_CONFIRMED: "READBACK_CONFIRMED";
1408
- LINEAGE_PENDING: "LINEAGE_PENDING";
1409
- LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
1410
- OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
1411
- }>;
1412
- type PublicationJournalStageV1 = z.infer<typeof PublicationJournalStageV1Schema>;
1413
- declare const LineageV1Schema: z.ZodObject<{
1402
+ //#region src/domain/v2/schemas.d.ts
1403
+ declare const TurnObservationV2Schema: z.ZodObject<{
1414
1404
  schemaVersion: z.ZodLiteral<1>;
1415
- scope: z.ZodEnum<{
1416
- PROJECT: "PROJECT";
1417
- USER: "USER";
1418
- }>;
1419
- provider: z.ZodString;
1420
- source: z.ZodEnum<{
1421
- "project-dsh": "project-dsh";
1422
- "user-dsh": "user-dsh";
1405
+ revision: z.ZodNumber;
1406
+ observationId: z.ZodString;
1407
+ sessionLifecycleKey: z.ZodString;
1408
+ turn: z.ZodNumber;
1409
+ turnEndSeq: z.ZodNumber;
1410
+ turnInstanceDigest: z.ZodString;
1411
+ observedAt: z.ZodString;
1412
+ outcomeKind: z.ZodString;
1413
+ assistantOutcomeSummary: z.ZodString;
1414
+ toolOutcomeSummary: z.ZodArray<z.ZodObject<{
1415
+ toolName: z.ZodString;
1416
+ outcome: z.ZodString;
1417
+ contentDigest: z.ZodString;
1418
+ }, z.core.$strict>>;
1419
+ routeObservation: z.ZodObject<{
1420
+ provider: z.ZodOptional<z.ZodString>;
1421
+ model: z.ZodOptional<z.ZodString>;
1422
+ complete: z.ZodBoolean;
1423
+ }, z.core.$strict>;
1424
+ completeness: z.ZodEnum<{
1425
+ COMPLETE: "COMPLETE";
1426
+ INCOMPLETE: "INCOMPLETE";
1423
1427
  }>;
1424
- skillName: z.ZodString;
1425
- canonicalTargetPath: z.ZodString;
1426
- targetIdentityDigest: z.ZodString;
1427
- currentRevision: z.ZodNumber;
1428
- revisions: z.ZodArray<z.ZodObject<{
1429
- revision: z.ZodNumber;
1430
- origin: z.ZodEnum<{
1431
- ADOPTED_BASE: "ADOPTED_BASE";
1432
- MANUAL_BASE: "MANUAL_BASE";
1433
- RUN2SKILL: "RUN2SKILL";
1428
+ explicitSaveRequested: z.ZodBoolean;
1429
+ scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1430
+ status: z.ZodLiteral<"PROJECT">;
1431
+ workspaceId: z.ZodString;
1432
+ scopeIdentityDigest: z.ZodString;
1433
+ }, z.core.$strict>, z.ZodObject<{
1434
+ status: z.ZodLiteral<"USER">;
1435
+ scopeIdentityDigest: z.ZodString;
1436
+ }, z.core.$strict>, z.ZodObject<{
1437
+ status: z.ZodLiteral<"UNRESOLVED">;
1438
+ reason: z.ZodEnum<{
1439
+ NO_CWD: "NO_CWD";
1440
+ UNREGISTERED: "UNREGISTERED";
1441
+ UNAVAILABLE: "UNAVAILABLE";
1434
1442
  }>;
1435
- proposalId: z.ZodOptional<z.ZodString>;
1436
- exactSkillBytes: z.ZodString;
1437
- skillBytesDigest: z.ZodString;
1438
- committedAt: z.ZodString;
1443
+ }, z.core.$strict>], "status">;
1444
+ directUserEvidence: z.ZodArray<z.ZodObject<{
1445
+ source: z.ZodLiteral<"USER_DIRECT">;
1446
+ messageSeq: z.ZodNumber;
1447
+ excerpt: z.ZodString;
1448
+ excerptDigest: z.ZodString;
1449
+ redactionKinds: z.ZodArray<z.ZodEnum<{
1450
+ PRIVATE_KEY: "PRIVATE_KEY";
1451
+ AUTHORIZATION: "AUTHORIZATION";
1452
+ BEARER_TOKEN: "BEARER_TOKEN";
1453
+ API_KEY: "API_KEY";
1454
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
1455
+ URL_CREDENTIAL: "URL_CREDENTIAL";
1456
+ }>>;
1457
+ truncated: z.ZodBoolean;
1458
+ }, z.core.$strict>>;
1459
+ evidenceDigest: z.ZodString;
1460
+ contentDigest: z.ZodString;
1461
+ sessionRecovery: z.ZodOptional<z.ZodObject<{
1462
+ headerRevision: z.ZodString;
1463
+ observedLogPrefixDigest: z.ZodString;
1439
1464
  }, z.core.$strict>>;
1440
- lineageId: z.ZodString;
1441
1465
  }, z.core.$strict>;
1442
- type LineageV1 = z.infer<typeof LineageV1Schema>;
1443
- //#endregion
1444
- //#region src/adapters/dsh-storage/types.d.ts
1445
- interface Run2skillTable<K extends string, V> {
1446
- get(key: K): V | undefined;
1447
- entries(): IterableIterator<[K, V]>;
1448
- keys(): IterableIterator<K>;
1449
- readonly size: number;
1450
- put(key: K, value: V): Promise<void>;
1451
- delete(key: K): Promise<boolean>;
1452
- update(key: K, transform: (current: V) => V): Promise<V>;
1453
- }
1454
- interface Run2skillDomain {
1455
- readonly name: 'run2skill_v1';
1456
- readonly global: {
1457
- get(): GlobalV1;
1458
- set(value: GlobalV1): Promise<void>;
1459
- };
1460
- table(name: 'work_items'): Run2skillTable<string, CaptureWorkItemV1>;
1461
- table(name: 'lineages'): Run2skillTable<string, LineageV1>;
1462
- close(): Promise<void>;
1463
- }
1464
- interface Run2skillStorageContext {
1465
- readonly storageDomain: {
1466
- open(spec: typeof run2skillDomainSpec | typeof learningDiagnosticDomainSpec): Promise<Run2skillDomain | LearningDiagnosticDomain>;
1467
- };
1468
- }
1469
- //#endregion
1470
- //#region src/domain/purge/schemas.d.ts
1471
- declare const PurgeJournalV1Schema: z.ZodObject<{
1466
+ declare const SessionBatchV2Schema: z.ZodObject<{
1472
1467
  schemaVersion: z.ZodLiteral<1>;
1473
- purgeId: z.ZodString;
1474
- scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1468
+ revision: z.ZodNumber;
1469
+ batchId: z.ZodString;
1470
+ sessionLifecycleKey: z.ZodString;
1471
+ firstTurnEndSeq: z.ZodNumber;
1472
+ lastTurnEndSeq: z.ZodNumber;
1473
+ detectorPolicyVersion: z.ZodString;
1474
+ triggerReasons: z.ZodArray<z.ZodEnum<{
1475
+ EXPLICIT: "EXPLICIT";
1476
+ THRESHOLD: "THRESHOLD";
1477
+ IDLE: "IDLE";
1478
+ }>>;
1479
+ observationManifest: z.ZodArray<z.ZodObject<{
1480
+ observationId: z.ZodString;
1481
+ turnEndSeq: z.ZodNumber;
1482
+ evidenceDigest: z.ZodString;
1483
+ completeness: z.ZodEnum<{
1484
+ COMPLETE: "COMPLETE";
1485
+ INCOMPLETE: "INCOMPLETE";
1486
+ }>;
1487
+ }, z.core.$strict>>;
1488
+ observationManifestDigest: z.ZodString;
1489
+ batchManifestBaseline: z.ZodObject<{
1490
+ observedAt: z.ZodString;
1491
+ rootManifestDigest: z.ZodString;
1492
+ runtimeCatalogDigest: z.ZodString;
1493
+ complete: z.ZodBoolean;
1494
+ ownershipCandidates: z.ZodOptional<z.ZodArray<z.ZodObject<{
1495
+ candidateId: z.ZodString;
1496
+ name: z.ZodString;
1497
+ provider: z.ZodString;
1498
+ source: z.ZodString;
1499
+ scope: z.ZodEnum<{
1500
+ PROJECT: "PROJECT";
1501
+ USER: "USER";
1502
+ }>;
1503
+ writable: z.ZodBoolean;
1504
+ targetPathDigest: z.ZodOptional<z.ZodString>;
1505
+ bodyDigest: z.ZodString;
1506
+ }, z.core.$strict>>>;
1507
+ }, z.core.$strict>;
1508
+ manifestEndObservation: z.ZodDiscriminatedUnion<[z.ZodObject<{
1509
+ state: z.ZodLiteral<"PENDING">;
1510
+ }, z.core.$strict>, z.ZodObject<{
1511
+ state: z.ZodLiteral<"OBSERVED">;
1512
+ observedAt: z.ZodString;
1513
+ rootManifestDigest: z.ZodString;
1514
+ runtimeCatalogDigest: z.ZodString;
1515
+ complete: z.ZodBoolean;
1516
+ }, z.core.$strict>], "state">;
1517
+ routeSnapshot: z.ZodObject<{
1518
+ provider: z.ZodString;
1519
+ model: z.ZodString;
1520
+ policyVersion: z.ZodString;
1521
+ maxInputBytes: z.ZodNumber;
1522
+ maxOutputBytes: z.ZodNumber;
1523
+ detectionReasoningEffort: z.ZodOptional<z.ZodString>;
1524
+ failureCode: z.ZodOptional<z.ZodLiteral<"ROUTE_UNAVAILABLE">>;
1525
+ }, z.core.$strict>;
1526
+ detector: z.ZodObject<{
1527
+ result: z.ZodEnum<{
1528
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1529
+ READY: "READY";
1530
+ NOT_RUN: "NOT_RUN";
1531
+ NONE: "NONE";
1532
+ DEFER: "DEFER";
1533
+ }>;
1534
+ failureCode: z.ZodOptional<z.ZodString>;
1535
+ calls: z.ZodArray<z.ZodObject<{
1536
+ stage: z.ZodLiteral<"DETECTION">;
1537
+ callId: z.ZodString;
1538
+ ordinal: z.ZodNumber;
1539
+ inputDigest: z.ZodString;
1540
+ provider: z.ZodString;
1541
+ model: z.ZodString;
1542
+ policyVersion: z.ZodString;
1543
+ outcome: z.ZodEnum<{
1544
+ SUCCEEDED: "SUCCEEDED";
1545
+ FAILED: "FAILED";
1546
+ ABORTED: "ABORTED";
1547
+ TIMED_OUT: "TIMED_OUT";
1548
+ RESERVED: "RESERVED";
1549
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
1550
+ }>;
1551
+ outputDigest: z.ZodOptional<z.ZodString>;
1552
+ failureCode: z.ZodOptional<z.ZodString>;
1553
+ }, z.core.$strict>>;
1554
+ carryDigest: z.ZodOptional<z.ZodString>;
1555
+ carry: z.ZodArray<z.ZodObject<{
1556
+ summary: z.ZodString;
1557
+ behaviorSignatureDraft: z.ZodString;
1558
+ evidenceDigests: z.ZodArray<z.ZodString>;
1559
+ remainingBatches: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1560
+ }, z.core.$strict>>;
1561
+ intentIds: z.ZodArray<z.ZodString>;
1562
+ }, z.core.$strict>;
1563
+ state: z.ZodEnum<{
1564
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1565
+ FROZEN: "FROZEN";
1566
+ DETECTION_CLAIMED: "DETECTION_CLAIMED";
1567
+ COMMITTED_NONE: "COMMITTED_NONE";
1568
+ COMMITTED_DEFER: "COMMITTED_DEFER";
1569
+ COMMITTED_READY: "COMMITTED_READY";
1570
+ }>;
1571
+ createdAt: z.ZodString;
1572
+ updatedAt: z.ZodString;
1573
+ }, z.core.$strict>;
1574
+ declare const ExperienceIntentV2Schema: z.ZodObject<{
1575
+ schemaVersion: z.ZodLiteral<1>;
1576
+ revision: z.ZodNumber;
1577
+ intentId: z.ZodString;
1578
+ batchId: z.ZodString;
1579
+ ordinal: z.ZodNumber;
1580
+ sessionLifecycleKey: z.ZodString;
1581
+ detectorPolicyVersion: z.ZodString;
1582
+ persistenceScope: z.ZodEnum<{
1583
+ PROJECT: "PROJECT";
1584
+ USER: "USER";
1585
+ }>;
1586
+ explicitSave: z.ZodBoolean;
1587
+ experienceType: z.ZodEnum<{
1588
+ CORRECTION: "CORRECTION";
1589
+ CONSTRAINT: "CONSTRAINT";
1590
+ WORKFLOW: "WORKFLOW";
1591
+ }>;
1592
+ applicabilitySummary: z.ZodString;
1593
+ keySteps: z.ZodArray<z.ZodString>;
1594
+ prohibitions: z.ZodArray<z.ZodString>;
1595
+ behaviorSignature: z.ZodString;
1596
+ evidenceRefs: z.ZodArray<z.ZodObject<{
1597
+ observationId: z.ZodString;
1598
+ sessionLifecycleKey: z.ZodString;
1599
+ turnEndSeq: z.ZodNumber;
1600
+ evidenceDigest: z.ZodString;
1601
+ }, z.core.$strict>>;
1602
+ evidenceDigests: z.ZodArray<z.ZodString>;
1603
+ completeness: z.ZodObject<{
1604
+ status: z.ZodEnum<{
1605
+ COMPLETE: "COMPLETE";
1606
+ INCOMPLETE: "INCOMPLETE";
1607
+ }>;
1608
+ blockers: z.ZodArray<z.ZodString>;
1609
+ }, z.core.$strict>;
1610
+ quiescence: z.ZodDiscriminatedUnion<[z.ZodObject<{
1611
+ state: z.ZodLiteral<"WAITING">;
1612
+ batchLastTurnEndSeq: z.ZodNumber;
1613
+ requiredIdleMs: z.ZodNumber;
1614
+ }, z.core.$strict>, z.ZodObject<{
1615
+ state: z.ZodLiteral<"SATISFIED">;
1616
+ batchLastTurnEndSeq: z.ZodNumber;
1617
+ requiredIdleMs: z.ZodNumber;
1618
+ observedThroughTurnEndSeq: z.ZodNumber;
1619
+ detectedThroughTurnEndSeq: z.ZodNumber;
1620
+ activityRevision: z.ZodString;
1621
+ satisfiedAt: z.ZodString;
1622
+ fenceDigest: z.ZodString;
1623
+ }, z.core.$strict>], "state">;
1624
+ ownership: z.ZodObject<{
1625
+ state: z.ZodEnum<{
1626
+ NOT_STARTED: "NOT_STARTED";
1627
+ ARBITRATING: "ARBITRATING";
1628
+ RESOLVED_BY_AGENT: "RESOLVED_BY_AGENT";
1629
+ NEEDS_CONFIRMATION: "NEEDS_CONFIRMATION";
1630
+ RUN2SKILL_OWNED: "RUN2SKILL_OWNED";
1631
+ }>;
1632
+ claimId: z.ZodOptional<z.ZodString>;
1633
+ claimedIntentRevision: z.ZodOptional<z.ZodNumber>;
1634
+ claimedAt: z.ZodOptional<z.ZodString>;
1635
+ inputDigest: z.ZodOptional<z.ZodString>;
1636
+ evidence: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1637
+ status: z.ZodLiteral<"UNAVAILABLE">;
1638
+ reasonCode: z.ZodEnum<{
1639
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
1640
+ INTENT_INCOMPLETE: "INTENT_INCOMPLETE";
1641
+ BASELINE_INCOMPLETE: "BASELINE_INCOMPLETE";
1642
+ CLAIM_INPUT_UNAVAILABLE: "CLAIM_INPUT_UNAVAILABLE";
1643
+ BASELINE_TIME_INVALID: "BASELINE_TIME_INVALID";
1644
+ OBSERVATION_FAILED: "OBSERVATION_FAILED";
1645
+ OBSERVATION_INVALID: "OBSERVATION_INVALID";
1646
+ OBSERVATION_OUTCOME_UNKNOWN: "OBSERVATION_OUTCOME_UNKNOWN";
1647
+ SESSION_CONTEXT_UNAVAILABLE: "SESSION_CONTEXT_UNAVAILABLE";
1648
+ SESSION_SNAPSHOT_UNAVAILABLE: "SESSION_SNAPSHOT_UNAVAILABLE";
1649
+ SESSION_WINDOW_INCOMPLETE: "SESSION_WINDOW_INCOMPLETE";
1650
+ SESSION_CHANGED_DURING_CHECK: "SESSION_CHANGED_DURING_CHECK";
1651
+ OWNERSHIP_ANALYSIS_UNAVAILABLE: "OWNERSHIP_ANALYSIS_UNAVAILABLE";
1652
+ }>;
1653
+ }, z.core.$strict>, z.ZodObject<{
1654
+ status: z.ZodLiteral<"OBSERVED">;
1655
+ inputDigest: z.ZodString;
1656
+ observedAfterTurnEndSeq: z.ZodNumber;
1657
+ observedAt: z.ZodString;
1658
+ endManifest: z.ZodObject<{
1659
+ rootManifestDigest: z.ZodString;
1660
+ runtimeCatalogDigest: z.ZodString;
1661
+ complete: z.ZodBoolean;
1662
+ }, z.core.$strict>;
1663
+ catalogComplete: z.ZodBoolean;
1664
+ toolEvidenceComplete: z.ZodBoolean;
1665
+ agentActivity: z.ZodEnum<{
1666
+ NONE: "NONE";
1667
+ WRITE_SUCCEEDED: "WRITE_SUCCEEDED";
1668
+ WRITE_FAILED: "WRITE_FAILED";
1669
+ BODY_GENERATED: "BODY_GENERATED";
1670
+ AMBIGUOUS: "AMBIGUOUS";
1671
+ }>;
1672
+ changedCandidates: z.ZodArray<z.ZodObject<{
1673
+ candidateId: z.ZodString;
1674
+ provider: z.ZodString;
1675
+ source: z.ZodString;
1676
+ scope: z.ZodEnum<{
1677
+ PROJECT: "PROJECT";
1678
+ USER: "USER";
1679
+ }>;
1680
+ writable: z.ZodBoolean;
1681
+ exactReadbackComplete: z.ZodBoolean;
1682
+ bodyDigest: z.ZodOptional<z.ZodString>;
1683
+ writeAttribution: z.ZodEnum<{
1684
+ UNKNOWN: "UNKNOWN";
1685
+ AGENT_WRITE_SUCCEEDED: "AGENT_WRITE_SUCCEEDED";
1686
+ NOT_AGENT: "NOT_AGENT";
1687
+ }>;
1688
+ intentBinding: z.ZodEnum<{
1689
+ UNKNOWN: "UNKNOWN";
1690
+ MATCH: "MATCH";
1691
+ NO_MATCH: "NO_MATCH";
1692
+ }>;
1693
+ }, z.core.$strict>>;
1694
+ }, z.core.$strict>], "status">>;
1695
+ evidenceDigest: z.ZodOptional<z.ZodString>;
1696
+ receiptDigest: z.ZodOptional<z.ZodString>;
1697
+ reasonCode: z.ZodOptional<z.ZodString>;
1698
+ resolvedCandidateId: z.ZodOptional<z.ZodString>;
1699
+ resolvedCandidateBodyDigest: z.ZodOptional<z.ZodString>;
1700
+ }, z.core.$strict>;
1701
+ recall: z.ZodObject<{
1702
+ state: z.ZodEnum<{
1703
+ COMPLETE: "COMPLETE";
1704
+ INCOMPLETE: "INCOMPLETE";
1705
+ NOT_STARTED: "NOT_STARTED";
1706
+ SCANNING: "SCANNING";
1707
+ }>;
1708
+ runtimeCatalogDigest: z.ZodOptional<z.ZodString>;
1709
+ pendingCatalogDigest: z.ZodOptional<z.ZodString>;
1710
+ complete: z.ZodBoolean;
1711
+ summaryScanComplete: z.ZodBoolean;
1712
+ catalogEpoch: z.ZodOptional<z.ZodNumber>;
1713
+ catalogMutationReceiptDigest: z.ZodOptional<z.ZodString>;
1714
+ scanBasisRevision: z.ZodOptional<z.ZodNumber>;
1715
+ scanRouteProvider: z.ZodOptional<z.ZodString>;
1716
+ scanRouteModel: z.ZodOptional<z.ZodString>;
1717
+ scanPolicyVersion: z.ZodOptional<z.ZodString>;
1718
+ scanBindingDigest: z.ZodOptional<z.ZodString>;
1719
+ scanPlanDigest: z.ZodOptional<z.ZodString>;
1720
+ scanPageCount: z.ZodOptional<z.ZodNumber>;
1721
+ scanSummaryCount: z.ZodOptional<z.ZodNumber>;
1722
+ scanPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1723
+ ordinal: z.ZodNumber;
1724
+ itemCount: z.ZodNumber;
1725
+ inputDigest: z.ZodString;
1726
+ membershipDigest: z.ZodString;
1727
+ }, z.core.$strict>>>;
1728
+ summaryClassifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
1729
+ candidateId: z.ZodString;
1730
+ summaryDigest: z.ZodString;
1731
+ classification: z.ZodEnum<{
1732
+ RELEVANT: "RELEVANT";
1733
+ POSSIBLE: "POSSIBLE";
1734
+ UNRELATED: "UNRELATED";
1735
+ }>;
1736
+ pageOrdinal: z.ZodNumber;
1737
+ callId: z.ZodString;
1738
+ inputDigest: z.ZodString;
1739
+ outputDigest: z.ZodString;
1740
+ }, z.core.$strict>>>;
1741
+ incompleteReason: z.ZodOptional<z.ZodString>;
1742
+ selfExclusion: z.ZodOptional<z.ZodObject<{
1743
+ intentId: z.ZodString;
1744
+ priorGenerationRevision: z.ZodNumber;
1745
+ barrierReceiptDigest: z.ZodString;
1746
+ selfExclusionDigest: z.ZodString;
1747
+ }, z.core.$strict>>;
1748
+ candidates: z.ZodArray<z.ZodObject<{
1749
+ candidateId: z.ZodString;
1750
+ summary: z.ZodObject<{
1751
+ name: z.ZodString;
1752
+ description: z.ZodString;
1753
+ whenToUse: z.ZodOptional<z.ZodString>;
1754
+ provider: z.ZodString;
1755
+ source: z.ZodString;
1756
+ scope: z.ZodEnum<{
1757
+ PROJECT: "PROJECT";
1758
+ USER: "USER";
1759
+ }>;
1760
+ writable: z.ZodBoolean;
1761
+ }, z.core.$strict>;
1762
+ classification: z.ZodEnum<{
1763
+ RELEVANT: "RELEVANT";
1764
+ POSSIBLE: "POSSIBLE";
1765
+ UNRELATED: "UNRELATED";
1766
+ }>;
1767
+ capability: z.ZodEnum<{
1768
+ UNAVAILABLE: "UNAVAILABLE";
1769
+ AVAILABLE: "AVAILABLE";
1770
+ READABLE_NOT_MERGEABLE: "READABLE_NOT_MERGEABLE";
1771
+ }>;
1772
+ bodyDigest: z.ZodOptional<z.ZodString>;
1773
+ unavailableReason: z.ZodOptional<z.ZodEnum<{
1774
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
1775
+ CANDIDATE_DISAPPEARED: "CANDIDATE_DISAPPEARED";
1776
+ IDENTITY_CHANGED: "IDENTITY_CHANGED";
1777
+ READ_FAILED: "READ_FAILED";
1778
+ FILTERED_UNSAFE: "FILTERED_UNSAFE";
1779
+ INPUT_BUDGET_EXCEEDED: "INPUT_BUDGET_EXCEEDED";
1780
+ READ_TIMEOUT: "READ_TIMEOUT";
1781
+ SNAPSHOT_TIMEOUT: "SNAPSHOT_TIMEOUT";
1782
+ }>>;
1783
+ }, z.core.$strict>>;
1784
+ }, z.core.$strict>;
1785
+ coverage: z.ZodObject<{
1786
+ state: z.ZodEnum<{
1787
+ ANALYZING: "ANALYZING";
1788
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1789
+ CREATE: "CREATE";
1790
+ MERGE: "MERGE";
1791
+ NOT_STARTED: "NOT_STARTED";
1792
+ COVERED: "COVERED";
1793
+ }>;
1794
+ retryUsed: z.ZodBoolean;
1795
+ inputDigest: z.ZodOptional<z.ZodString>;
1796
+ targetDigest: z.ZodOptional<z.ZodString>;
1797
+ targetCandidateId: z.ZodOptional<z.ZodString>;
1798
+ basisRevision: z.ZodOptional<z.ZodNumber>;
1799
+ routeProvider: z.ZodOptional<z.ZodString>;
1800
+ routeModel: z.ZodOptional<z.ZodString>;
1801
+ routeMaxInputBytes: z.ZodOptional<z.ZodNumber>;
1802
+ routeMaxOutputBytes: z.ZodOptional<z.ZodNumber>;
1803
+ reserveBytes: z.ZodOptional<z.ZodNumber>;
1804
+ mergeOutputReserveBytes: z.ZodOptional<z.ZodNumber>;
1805
+ policyVersion: z.ZodOptional<z.ZodString>;
1806
+ bindingDigest: z.ZodOptional<z.ZodString>;
1807
+ planDigest: z.ZodOptional<z.ZodString>;
1808
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1809
+ ordinal: z.ZodNumber;
1810
+ itemCount: z.ZodNumber;
1811
+ inputDigest: z.ZodString;
1812
+ membershipDigest: z.ZodString;
1813
+ }, z.core.$strict>>>;
1814
+ candidateBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1815
+ ordinal: z.ZodNumber;
1816
+ candidateId: z.ZodString;
1817
+ bodyDigest: z.ZodString;
1818
+ bodyBytes: z.ZodNumber;
1819
+ pageOrdinal: z.ZodNumber;
1820
+ }, z.core.$strict>>>;
1821
+ decisions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1822
+ candidateId: z.ZodString;
1823
+ decision: z.ZodEnum<{
1824
+ AMBIGUOUS: "AMBIGUOUS";
1825
+ UNRELATED: "UNRELATED";
1826
+ COVERED: "COVERED";
1827
+ PARTIAL: "PARTIAL";
1828
+ }>;
1829
+ reason: z.ZodString;
1830
+ pageOrdinal: z.ZodNumber;
1831
+ callId: z.ZodString;
1832
+ inputDigest: z.ZodString;
1833
+ outputDigest: z.ZodString;
1834
+ }, z.core.$strict>>>;
1835
+ reasonCode: z.ZodOptional<z.ZodString>;
1836
+ }, z.core.$strict>;
1837
+ generation: z.ZodObject<{
1838
+ state: z.ZodEnum<{
1839
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1840
+ NOT_STARTED: "NOT_STARTED";
1841
+ RESULT_COMMITTED: "RESULT_COMMITTED";
1842
+ PROPOSAL_COMMIT_AUTHORIZED: "PROPOSAL_COMMIT_AUTHORIZED";
1843
+ GENERATION_AUTHORIZED: "GENERATION_AUTHORIZED";
1844
+ GENERATION_LEASED: "GENERATION_LEASED";
1845
+ GENERATION_CALL_RESERVED: "GENERATION_CALL_RESERVED";
1846
+ GENERATION_CALL_TERMINAL: "GENERATION_CALL_TERMINAL";
1847
+ PROPOSAL_BODY_COMMITTED: "PROPOSAL_BODY_COMMITTED";
1848
+ PROPOSAL_READY: "PROPOSAL_READY";
1849
+ }>;
1850
+ action: z.ZodOptional<z.ZodEnum<{
1851
+ CREATE: "CREATE";
1852
+ MERGE: "MERGE";
1853
+ }>>;
1854
+ inputDigest: z.ZodOptional<z.ZodString>;
1855
+ resultDigest: z.ZodOptional<z.ZodString>;
1856
+ leaseId: z.ZodOptional<z.ZodString>;
1857
+ generationRevision: z.ZodOptional<z.ZodNumber>;
1858
+ catalogEpoch: z.ZodOptional<z.ZodNumber>;
1859
+ externalPendingDigest: z.ZodOptional<z.ZodString>;
1860
+ selfExclusionDigest: z.ZodOptional<z.ZodString>;
1861
+ sealedResult: z.ZodOptional<z.ZodObject<{
1862
+ resultId: z.ZodString;
1863
+ leaseId: z.ZodString;
1864
+ intentId: z.ZodString;
1865
+ generationRevision: z.ZodNumber;
1866
+ callId: z.ZodString;
1867
+ action: z.ZodEnum<{
1868
+ CREATE: "CREATE";
1869
+ MERGE: "MERGE";
1870
+ }>;
1871
+ body: z.ZodObject<{
1872
+ name: z.ZodString;
1873
+ description: z.ZodString;
1874
+ whenToUse: z.ZodString;
1875
+ exactSkillBytes: z.ZodString;
1876
+ skillBytesDigest: z.ZodString;
1877
+ }, z.core.$strict>;
1878
+ targetDigest: z.ZodString;
1879
+ baseSkillBytes: z.ZodOptional<z.ZodString>;
1880
+ baseSkillBytesDigest: z.ZodOptional<z.ZodString>;
1881
+ inputDigest: z.ZodString;
1882
+ runtimeCatalogDigest: z.ZodString;
1883
+ pendingCatalogDigest: z.ZodString;
1884
+ externalPendingDigest: z.ZodString;
1885
+ inputCatalogEpoch: z.ZodNumber;
1886
+ outcomeCatalogEpoch: z.ZodNumber;
1887
+ sealedAt: z.ZodString;
1888
+ mutationReceiptDigest: z.ZodString;
1889
+ receiptDigest: z.ZodString;
1890
+ }, z.core.$strict>>;
1891
+ proposalId: z.ZodOptional<z.ZodString>;
1892
+ reasonCode: z.ZodOptional<z.ZodEnum<{
1893
+ GENERATION_KNOWN_FAILED: "GENERATION_KNOWN_FAILED";
1894
+ GENERATION_RESULT_LOST: "GENERATION_RESULT_LOST";
1895
+ GENERATION_OUTCOME_UNKNOWN: "GENERATION_OUTCOME_UNKNOWN";
1896
+ STALE_RESULT: "STALE_RESULT";
1897
+ }>>;
1898
+ revalidationAuthorization: z.ZodOptional<z.ZodObject<{
1899
+ runtimeCatalogDigest: z.ZodString;
1900
+ pendingCatalogDigest: z.ZodString;
1901
+ externalPendingDigest: z.ZodString;
1902
+ catalogEpoch: z.ZodNumber;
1903
+ catalogMutationReceiptDigest: z.ZodString;
1904
+ sealedResultReceiptDigest: z.ZodString;
1905
+ selfExclusionDigest: z.ZodOptional<z.ZodString>;
1906
+ authorizedAt: z.ZodString;
1907
+ }, z.core.$strict>>;
1908
+ userRetryUsed: z.ZodBoolean;
1909
+ staleRefreshUsed: z.ZodBoolean;
1910
+ receipts: z.ZodArray<z.ZodObject<{
1911
+ kind: z.ZodEnum<{
1912
+ CALL_RESERVED: "CALL_RESERVED";
1913
+ LEASE_ACQUIRED: "LEASE_ACQUIRED";
1914
+ CALL_TERMINAL: "CALL_TERMINAL";
1915
+ RESULT_SEALED: "RESULT_SEALED";
1916
+ BARRIER_COMMITTED: "BARRIER_COMMITTED";
1917
+ PROPOSAL_AUTHORIZED: "PROPOSAL_AUTHORIZED";
1918
+ BODY_COMMITTED: "BODY_COMMITTED";
1919
+ INDEX_COMMITTED: "INDEX_COMMITTED";
1920
+ }>;
1921
+ digest: z.ZodString;
1922
+ leaseId: z.ZodString;
1923
+ intentId: z.ZodString;
1924
+ generationRevision: z.ZodNumber;
1925
+ callId: z.ZodOptional<z.ZodString>;
1926
+ catalogEpoch: z.ZodOptional<z.ZodNumber>;
1927
+ recordedAt: z.ZodString;
1928
+ }, z.core.$strict>>;
1929
+ }, z.core.$strict>;
1930
+ duplicateBarrier: z.ZodOptional<z.ZodObject<{
1931
+ barrierId: z.ZodString;
1932
+ leaseId: z.ZodString;
1933
+ intentId: z.ZodString;
1934
+ generationRevision: z.ZodNumber;
1935
+ kind: z.ZodEnum<{
1936
+ KNOWN_FAILED: "KNOWN_FAILED";
1937
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
1938
+ STALE_RESULT: "STALE_RESULT";
1939
+ RESULT_LOST: "RESULT_LOST";
1940
+ }>;
1941
+ behaviorSignature: z.ZodString;
1942
+ inputDigest: z.ZodString;
1943
+ callId: z.ZodOptional<z.ZodString>;
1944
+ priorGenerationRevision: z.ZodOptional<z.ZodNumber>;
1945
+ inputCatalogEpoch: z.ZodNumber;
1946
+ outcomeCatalogEpoch: z.ZodNumber;
1947
+ mutationReceiptDigest: z.ZodString;
1948
+ recordedAt: z.ZodString;
1949
+ receiptDigest: z.ZodString;
1950
+ }, z.core.$strict>>;
1951
+ stageCalls: z.ZodArray<z.ZodObject<{
1952
+ stage: z.ZodEnum<{
1953
+ CATALOG_SCAN: "CATALOG_SCAN";
1954
+ COVERAGE: "COVERAGE";
1955
+ GENERATION: "GENERATION";
1956
+ }>;
1957
+ intentRevision: z.ZodNumber;
1958
+ callId: z.ZodString;
1959
+ ordinal: z.ZodNumber;
1960
+ itemCount: z.ZodOptional<z.ZodNumber>;
1961
+ inputDigest: z.ZodString;
1962
+ provider: z.ZodString;
1963
+ model: z.ZodString;
1964
+ policyVersion: z.ZodString;
1965
+ outcome: z.ZodEnum<{
1966
+ SUCCEEDED: "SUCCEEDED";
1967
+ FAILED: "FAILED";
1968
+ ABORTED: "ABORTED";
1969
+ TIMED_OUT: "TIMED_OUT";
1970
+ RESERVED: "RESERVED";
1971
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
1972
+ }>;
1973
+ outputDigest: z.ZodOptional<z.ZodString>;
1974
+ failureCode: z.ZodOptional<z.ZodString>;
1975
+ }, z.core.$strict>>;
1976
+ reasonReceipts: z.ZodArray<z.ZodObject<{
1977
+ revision: z.ZodNumber;
1978
+ reasonCode: z.ZodString;
1979
+ recordedAt: z.ZodString;
1980
+ }, z.core.$strict>>;
1981
+ lineageId: z.ZodOptional<z.ZodString>;
1982
+ status: z.ZodEnum<{
1983
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
1984
+ DISCARDED: "DISCARDED";
1985
+ READY: "READY";
1986
+ RESOLVED_BY_AGENT: "RESOLVED_BY_AGENT";
1987
+ NEEDS_CONFIRMATION: "NEEDS_CONFIRMATION";
1988
+ RUN2SKILL_OWNED: "RUN2SKILL_OWNED";
1989
+ COVERED: "COVERED";
1990
+ PROPOSAL_READY: "PROPOSAL_READY";
1991
+ DETECTOR_STAGED: "DETECTOR_STAGED";
1992
+ WAITING_FOR_QUIESCENCE: "WAITING_FOR_QUIESCENCE";
1993
+ OWNERSHIP_ARBITRATING: "OWNERSHIP_ARBITRATING";
1994
+ RECALLING: "RECALLING";
1995
+ COVERAGE_READY: "COVERAGE_READY";
1996
+ COVERAGE_ANALYZING: "COVERAGE_ANALYZING";
1997
+ COVERED_NEEDS_CONFIRMATION: "COVERED_NEEDS_CONFIRMATION";
1998
+ COVERAGE_RETRY_AUTHORIZED: "COVERAGE_RETRY_AUTHORIZED";
1999
+ CREATE_AUTHORIZED: "CREATE_AUTHORIZED";
2000
+ MERGE_AUTHORIZED: "MERGE_AUTHORIZED";
2001
+ GENERATING: "GENERATING";
2002
+ }>;
2003
+ createdAt: z.ZodString;
2004
+ updatedAt: z.ZodString;
2005
+ }, z.core.$strict>;
2006
+ declare const LegacyItemV2Schema: z.ZodObject<{
2007
+ schemaVersion: z.ZodLiteral<1>;
2008
+ legacyItemId: z.ZodString;
2009
+ sourceWorkItemId: z.ZodString;
2010
+ sourceDigest: z.ZodString;
2011
+ disposition: z.ZodEnum<{
2012
+ AUDIT_ONLY_NO_SIGNAL: "AUDIT_ONLY_NO_SIGNAL";
2013
+ LEGACY_NEEDS_ATTENTION: "LEGACY_NEEDS_ATTENTION";
2014
+ LEGACY_CALL_OUTCOME_UNKNOWN: "LEGACY_CALL_OUTCOME_UNKNOWN";
2015
+ ACTIVE_LEGACY_PROPOSAL: "ACTIVE_LEGACY_PROPOSAL";
2016
+ ACTIVE_LEGACY_PUBLICATION: "ACTIVE_LEGACY_PUBLICATION";
2017
+ AUDIT_ONLY_DISCARDED: "AUDIT_ONLY_DISCARDED";
2018
+ AUDIT_ONLY_PUBLISHED: "AUDIT_ONLY_PUBLISHED";
2019
+ }>;
2020
+ importedAt: z.ZodString;
2021
+ sourceWorkItem: z.ZodObject<{
2022
+ schemaVersion: z.ZodLiteral<1>;
2023
+ revision: z.ZodNumber;
2024
+ workItemId: z.ZodString;
2025
+ signalKey: z.ZodObject<{
2026
+ rootSessionId: z.ZodString;
2027
+ sessionCreatedAt: z.ZodNumber;
2028
+ sessionCwdDigest: z.ZodString;
2029
+ turn: z.ZodNumber;
2030
+ turnEndSeq: z.ZodNumber;
2031
+ turnInstanceDigest: z.ZodString;
2032
+ triggerPolicyVersion: z.ZodLiteral<"cheap-trigger-v1">;
2033
+ }, z.core.$strict>;
2034
+ captureReason: z.ZodEnum<{
2035
+ CHEAP_TRIGGER: "CHEAP_TRIGGER";
2036
+ SCAN_INCOMPLETE: "SCAN_INCOMPLETE";
2037
+ }>;
2038
+ createdAt: z.ZodString;
2039
+ updatedAt: z.ZodString;
2040
+ turnOutcomeKind: z.ZodString;
2041
+ rootIdentity: z.ZodObject<{
2042
+ status: z.ZodLiteral<"ROOT">;
2043
+ parentSessionId: z.ZodOptional<z.ZodString>;
2044
+ }, z.core.$strict>;
2045
+ workspaceBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
2046
+ status: z.ZodLiteral<"BOUND">;
2047
+ workspaceId: z.ZodString;
2048
+ canonicalPath: z.ZodString;
2049
+ observedAt: z.ZodString;
2050
+ }, z.core.$strict>, z.ZodObject<{
2051
+ status: z.ZodEnum<{
2052
+ NO_CWD: "NO_CWD";
2053
+ UNREGISTERED: "UNREGISTERED";
2054
+ UNAVAILABLE: "UNAVAILABLE";
2055
+ }>;
2056
+ observedAt: z.ZodString;
2057
+ }, z.core.$strict>], "status">;
2058
+ scanStatus: z.ZodEnum<{
2059
+ COMPLETE: "COMPLETE";
2060
+ INCOMPLETE: "INCOMPLETE";
2061
+ }>;
2062
+ triggerHits: z.ZodArray<z.ZodObject<{
2063
+ kind: z.ZodEnum<{
2064
+ EXPLICIT_SAVE: "EXPLICIT_SAVE";
2065
+ CORRECTION: "CORRECTION";
2066
+ CONSTRAINT: "CONSTRAINT";
2067
+ WORKFLOW: "WORKFLOW";
2068
+ }>;
2069
+ messageSeq: z.ZodNumber;
2070
+ ruleId: z.ZodString;
2071
+ confidence: z.ZodLiteral<"HIGH">;
2072
+ }, z.core.$strict>>;
2073
+ evidenceRefs: z.ZodArray<z.ZodObject<{
2074
+ source: z.ZodLiteral<"USER_DIRECT">;
2075
+ messageSeq: z.ZodNumber;
2076
+ excerpt: z.ZodString;
2077
+ excerptDigest: z.ZodString;
2078
+ redactionKinds: z.ZodArray<z.ZodEnum<{
2079
+ PRIVATE_KEY: "PRIVATE_KEY";
2080
+ AUTHORIZATION: "AUTHORIZATION";
2081
+ BEARER_TOKEN: "BEARER_TOKEN";
2082
+ API_KEY: "API_KEY";
2083
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
2084
+ URL_CREDENTIAL: "URL_CREDENTIAL";
2085
+ }>>;
2086
+ truncated: z.ZodBoolean;
2087
+ }, z.core.$strict>>;
2088
+ captureBlockers: z.ZodArray<z.ZodEnum<{
2089
+ TURN_BOUNDARY_INCOMPLETE: "TURN_BOUNDARY_INCOMPLETE";
2090
+ TEXT_LIMIT_EXCEEDED: "TEXT_LIMIT_EXCEEDED";
2091
+ REDACTION_UNAVAILABLE: "REDACTION_UNAVAILABLE";
2092
+ }>>;
2093
+ processingState: z.ZodEnum<{
2094
+ CAPTURED: "CAPTURED";
2095
+ ANALYZING: "ANALYZING";
2096
+ LEARNED: "LEARNED";
2097
+ READY_FOR_REVIEW: "READY_FOR_REVIEW";
2098
+ PUBLISHING: "PUBLISHING";
2099
+ TERMINAL: "TERMINAL";
2100
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
2101
+ RESOLVED_NO_SIGNAL: "RESOLVED_NO_SIGNAL";
2102
+ }>;
2103
+ learning: z.ZodOptional<z.ZodObject<{
2104
+ policyVersion: z.ZodLiteral<"learning-v1">;
2105
+ attempt: z.ZodNumber;
2106
+ requestBudgetUsed: z.ZodNumber;
2107
+ claimedAt: z.ZodOptional<z.ZodString>;
2108
+ nextEligibleAt: z.ZodOptional<z.ZodString>;
2109
+ modelRoute: z.ZodOptional<z.ZodObject<{
2110
+ provider: z.ZodString;
2111
+ model: z.ZodString;
2112
+ }, z.core.$strict>>;
2113
+ calls: z.ZodArray<z.ZodObject<{
2114
+ requestOrdinal: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
2115
+ kind: z.ZodEnum<{
2116
+ PRIMARY: "PRIMARY";
2117
+ FORMAT_REPAIR: "FORMAT_REPAIR";
2118
+ }>;
2119
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2120
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2121
+ outcome: z.ZodEnum<{
2122
+ SUCCEEDED: "SUCCEEDED";
2123
+ FAILED: "FAILED";
2124
+ ABORTED: "ABORTED";
2125
+ TIMED_OUT: "TIMED_OUT";
2126
+ }>;
2127
+ }, z.core.$strict>>;
2128
+ failure: z.ZodOptional<z.ZodObject<{
2129
+ code: z.ZodEnum<{
2130
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
2131
+ AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
2132
+ MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
2133
+ MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
2134
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
2135
+ CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
2136
+ ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
2137
+ MODEL_TIMEOUT: "MODEL_TIMEOUT";
2138
+ MODEL_ABORTED: "MODEL_ABORTED";
2139
+ MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
2140
+ MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
2141
+ INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
2142
+ LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
2143
+ STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
2144
+ }>;
2145
+ retryable: z.ZodBoolean;
2146
+ occurredAt: z.ZodString;
2147
+ }, z.core.$strict>>;
2148
+ experiences: z.ZodOptional<z.ZodArray<z.ZodObject<{
2149
+ experienceId: z.ZodString;
2150
+ type: z.ZodEnum<{
2151
+ CORRECTION: "CORRECTION";
2152
+ CONSTRAINT: "CONSTRAINT";
2153
+ WORKFLOW: "WORKFLOW";
2154
+ }>;
2155
+ lesson: z.ZodString;
2156
+ persistenceScope: z.ZodEnum<{
2157
+ PROJECT: "PROJECT";
2158
+ USER: "USER";
2159
+ }>;
2160
+ evidenceStrength: z.ZodLiteral<"HIGH">;
2161
+ supportingEvidence: z.ZodArray<z.ZodObject<{
2162
+ messageSeq: z.ZodNumber;
2163
+ excerptDigest: z.ZodString;
2164
+ }, z.core.$strict>>;
2165
+ contextSummary: z.ZodOptional<z.ZodString>;
2166
+ }, z.core.$strict>>>;
2167
+ proposal: z.ZodOptional<z.ZodObject<{
2168
+ learningProposalId: z.ZodString;
2169
+ policyVersion: z.ZodLiteral<"learning-v1">;
2170
+ name: z.ZodString;
2171
+ description: z.ZodString;
2172
+ whenToUse: z.ZodString;
2173
+ content: z.ZodString;
2174
+ invocation: z.ZodObject<{
2175
+ modelInvocable: z.ZodLiteral<true>;
2176
+ userInvocable: z.ZodLiteral<false>;
2177
+ }, z.core.$strict>;
2178
+ persistenceScope: z.ZodEnum<{
2179
+ PROJECT: "PROJECT";
2180
+ USER: "USER";
2181
+ }>;
2182
+ supportingExperienceIds: z.ZodArray<z.ZodString>;
2183
+ curation: z.ZodObject<{
2184
+ decision: z.ZodEnum<{
2185
+ CREATE: "CREATE";
2186
+ MERGE: "MERGE";
2187
+ DISCARD: "DISCARD";
2188
+ }>;
2189
+ candidateKey: z.ZodOptional<z.ZodString>;
2190
+ rationale: z.ZodString;
2191
+ }, z.core.$strict>;
2192
+ catalogObservationDigest: z.ZodString;
2193
+ shortlistDigests: z.ZodArray<z.ZodString>;
2194
+ }, z.core.$strict>>;
2195
+ publicationOutcome: z.ZodOptional<z.ZodLiteral<"NEEDS_ATTENTION">>;
2196
+ }, z.core.$strict>>;
2197
+ review: z.ZodOptional<z.ZodObject<{
2198
+ policyVersion: z.ZodLiteral<"review-v1">;
2199
+ proposal: z.ZodObject<{
2200
+ schemaVersion: z.ZodLiteral<1>;
2201
+ revision: z.ZodNumber;
2202
+ createdAt: z.ZodString;
2203
+ sourceLearningProposalId: z.ZodString;
2204
+ kind: z.ZodEnum<{
2205
+ CREATE: "CREATE";
2206
+ MERGE: "MERGE";
2207
+ DISCARD: "DISCARD";
2208
+ }>;
2209
+ name: z.ZodString;
2210
+ description: z.ZodString;
2211
+ whenToUse: z.ZodString;
2212
+ invocation: z.ZodObject<{
2213
+ modelInvocable: z.ZodLiteral<true>;
2214
+ userInvocable: z.ZodLiteral<false>;
2215
+ }, z.core.$strict>;
2216
+ exactSkillBytes: z.ZodString;
2217
+ skillBytesDigest: z.ZodString;
2218
+ rendererVersion: z.ZodString;
2219
+ persistenceScope: z.ZodEnum<{
2220
+ PROJECT: "PROJECT";
2221
+ USER: "USER";
2222
+ }>;
2223
+ workspaceBinding: z.ZodOptional<z.ZodObject<{
2224
+ workspaceId: z.ZodString;
2225
+ canonicalPath: z.ZodString;
2226
+ observedAt: z.ZodString;
2227
+ }, z.core.$strict>>;
2228
+ dshHomeBinding: z.ZodOptional<z.ZodObject<{
2229
+ resolutionKind: z.ZodEnum<{
2230
+ CONFIGURATION: "CONFIGURATION";
2231
+ ENVIRONMENT: "ENVIRONMENT";
2232
+ DEFAULT: "DEFAULT";
2233
+ }>;
2234
+ canonicalPath: z.ZodString;
2235
+ identityDigest: z.ZodString;
2236
+ observedAt: z.ZodString;
2237
+ }, z.core.$strict>>;
2238
+ supportingExperienceIds: z.ZodArray<z.ZodString>;
2239
+ catalogObservationDigest: z.ZodString;
2240
+ curationRationale: z.ZodString;
2241
+ actionBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
2242
+ kind: z.ZodLiteral<"CREATE">;
2243
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
2244
+ scope: z.ZodEnum<{
2245
+ PROJECT: "PROJECT";
2246
+ USER: "USER";
2247
+ }>;
2248
+ expectedProvider: z.ZodLiteral<"filesystem">;
2249
+ expectedSource: z.ZodEnum<{
2250
+ "project-dsh": "project-dsh";
2251
+ "user-dsh": "user-dsh";
2252
+ }>;
2253
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
2254
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
2255
+ resolutionContractDigest: z.ZodString;
2256
+ declaredRootPath: z.ZodString;
2257
+ state: z.ZodLiteral<"EXISTING">;
2258
+ canonicalRootPath: z.ZodString;
2259
+ rootIdentityDigest: z.ZodString;
2260
+ }, z.core.$strict>, z.ZodObject<{
2261
+ scope: z.ZodEnum<{
2262
+ PROJECT: "PROJECT";
2263
+ USER: "USER";
2264
+ }>;
2265
+ expectedProvider: z.ZodLiteral<"filesystem">;
2266
+ expectedSource: z.ZodEnum<{
2267
+ "project-dsh": "project-dsh";
2268
+ "user-dsh": "user-dsh";
2269
+ }>;
2270
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
2271
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
2272
+ resolutionContractDigest: z.ZodString;
2273
+ declaredRootPath: z.ZodString;
2274
+ state: z.ZodLiteral<"ABSENT">;
2275
+ canonicalExistingAncestorPath: z.ZodString;
2276
+ ancestorIdentityDigest: z.ZodString;
2277
+ missingSegments: z.ZodArray<z.ZodString>;
2278
+ }, z.core.$strict>], "state">;
2279
+ targetBinding: z.ZodObject<{
2280
+ skillName: z.ZodString;
2281
+ bundlePath: z.ZodString;
2282
+ skillFilePath: z.ZodString;
2283
+ }, z.core.$strict>;
2284
+ expectedAbsence: z.ZodObject<{
2285
+ catalogObservationDigest: z.ZodString;
2286
+ observedAt: z.ZodString;
2287
+ flatSkillFilePath: z.ZodString;
2288
+ bundlePathAbsent: z.ZodLiteral<true>;
2289
+ skillFilePathAbsent: z.ZodLiteral<true>;
2290
+ flatSkillFilePathAbsent: z.ZodLiteral<true>;
2291
+ }, z.core.$strict>;
2292
+ }, z.core.$strict>, z.ZodObject<{
2293
+ kind: z.ZodLiteral<"MERGE">;
2294
+ rootBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
2295
+ scope: z.ZodEnum<{
2296
+ PROJECT: "PROJECT";
2297
+ USER: "USER";
2298
+ }>;
2299
+ expectedProvider: z.ZodLiteral<"filesystem">;
2300
+ expectedSource: z.ZodEnum<{
2301
+ "project-dsh": "project-dsh";
2302
+ "user-dsh": "user-dsh";
2303
+ }>;
2304
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
2305
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
2306
+ resolutionContractDigest: z.ZodString;
2307
+ declaredRootPath: z.ZodString;
2308
+ state: z.ZodLiteral<"EXISTING">;
2309
+ canonicalRootPath: z.ZodString;
2310
+ rootIdentityDigest: z.ZodString;
2311
+ }, z.core.$strict>, z.ZodObject<{
2312
+ scope: z.ZodEnum<{
2313
+ PROJECT: "PROJECT";
2314
+ USER: "USER";
2315
+ }>;
2316
+ expectedProvider: z.ZodLiteral<"filesystem">;
2317
+ expectedSource: z.ZodEnum<{
2318
+ "project-dsh": "project-dsh";
2319
+ "user-dsh": "user-dsh";
2320
+ }>;
2321
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
2322
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
2323
+ resolutionContractDigest: z.ZodString;
2324
+ declaredRootPath: z.ZodString;
2325
+ state: z.ZodLiteral<"ABSENT">;
2326
+ canonicalExistingAncestorPath: z.ZodString;
2327
+ ancestorIdentityDigest: z.ZodString;
2328
+ missingSegments: z.ZodArray<z.ZodString>;
2329
+ }, z.core.$strict>], "state">;
2330
+ targetBinding: z.ZodObject<{
2331
+ skillName: z.ZodString;
2332
+ bundlePath: z.ZodString;
2333
+ skillFilePath: z.ZodString;
2334
+ }, z.core.$strict>;
2335
+ baseBinding: z.ZodObject<{
2336
+ candidateKey: z.ZodString;
2337
+ provider: z.ZodString;
2338
+ source: z.ZodString;
2339
+ path: z.ZodString;
2340
+ exactBytes: z.ZodString;
2341
+ bytesDigest: z.ZodString;
2342
+ catalogObservationDigest: z.ZodString;
2343
+ observedAt: z.ZodString;
2344
+ }, z.core.$strict>;
2345
+ }, z.core.$strict>, z.ZodObject<{
2346
+ kind: z.ZodLiteral<"DISCARD">;
2347
+ coveringCandidateBinding: z.ZodObject<{
2348
+ candidateKey: z.ZodString;
2349
+ provider: z.ZodString;
2350
+ source: z.ZodString;
2351
+ name: z.ZodString;
2352
+ description: z.ZodString;
2353
+ whenToUse: z.ZodOptional<z.ZodString>;
2354
+ content: z.ZodString;
2355
+ contentDigest: z.ZodString;
2356
+ path: z.ZodOptional<z.ZodString>;
2357
+ catalogObservationDigest: z.ZodString;
2358
+ observedAt: z.ZodString;
2359
+ }, z.core.$strict>;
2360
+ }, z.core.$strict>], "kind">;
2361
+ proposalId: z.ZodString;
2362
+ digest: z.ZodString;
2363
+ }, z.core.$strict>;
2364
+ reviewDecision: z.ZodEnum<{
2365
+ PENDING: "PENDING";
2366
+ APPROVED: "APPROVED";
2367
+ REJECTED: "REJECTED";
2368
+ }>;
2369
+ publicationOutcome: z.ZodEnum<{
2370
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
2371
+ PENDING_REVIEW: "PENDING_REVIEW";
2372
+ DISCARDED: "DISCARDED";
2373
+ NEEDS_REFRESH: "NEEDS_REFRESH";
2374
+ PUBLISHED: "PUBLISHED";
2375
+ PUBLISH_FAILED: "PUBLISH_FAILED";
2376
+ }>;
2377
+ coverageRetryCount: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
2378
+ decidedAt: z.ZodOptional<z.ZodString>;
2379
+ decisionReason: z.ZodOptional<z.ZodEnum<{
2380
+ USER_REJECTED: "USER_REJECTED";
2381
+ COVERAGE_CONFIRMED: "COVERAGE_CONFIRMED";
2382
+ }>>;
2383
+ failure: z.ZodOptional<z.ZodObject<{
2384
+ code: z.ZodString;
2385
+ retryable: z.ZodBoolean;
2386
+ occurredAt: z.ZodString;
2387
+ }, z.core.$strict>>;
2388
+ }, z.core.$strict>>;
2389
+ publication: z.ZodOptional<z.ZodObject<{
2390
+ schemaVersion: z.ZodLiteral<1>;
2391
+ policyVersion: z.ZodLiteral<"publication-v1">;
2392
+ attemptCount: z.ZodNumber;
2393
+ activeAttemptId: z.ZodString;
2394
+ targetIdentityDigest: z.ZodString;
2395
+ journal: z.ZodArray<z.ZodObject<{
2396
+ schemaVersion: z.ZodLiteral<1>;
2397
+ ordinal: z.ZodNumber;
2398
+ attempt: z.ZodNumber;
2399
+ attemptId: z.ZodString;
2400
+ stage: z.ZodEnum<{
2401
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
2402
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
2403
+ ROOT_PREPARED: "ROOT_PREPARED";
2404
+ TARGET_INSTALLED: "TARGET_INSTALLED";
2405
+ DISK_VERIFIED: "DISK_VERIFIED";
2406
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
2407
+ LINEAGE_PENDING: "LINEAGE_PENDING";
2408
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
2409
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
2410
+ }>;
2411
+ targetIdentityDigest: z.ZodString;
2412
+ expectedHash: z.ZodOptional<z.ZodString>;
2413
+ observedHash: z.ZodOptional<z.ZodString>;
2414
+ occurredAt: z.ZodString;
2415
+ previousDigest: z.ZodNullable<z.ZodString>;
2416
+ digest: z.ZodString;
2417
+ }, z.core.$strict>>;
2418
+ pendingLineage: z.ZodOptional<z.ZodObject<{
2419
+ schemaVersion: z.ZodLiteral<1>;
2420
+ scope: z.ZodEnum<{
2421
+ PROJECT: "PROJECT";
2422
+ USER: "USER";
2423
+ }>;
2424
+ provider: z.ZodString;
2425
+ source: z.ZodEnum<{
2426
+ "project-dsh": "project-dsh";
2427
+ "user-dsh": "user-dsh";
2428
+ }>;
2429
+ skillName: z.ZodString;
2430
+ canonicalTargetPath: z.ZodString;
2431
+ targetIdentityDigest: z.ZodString;
2432
+ currentRevision: z.ZodNumber;
2433
+ revisions: z.ZodArray<z.ZodObject<{
2434
+ revision: z.ZodNumber;
2435
+ origin: z.ZodEnum<{
2436
+ ADOPTED_BASE: "ADOPTED_BASE";
2437
+ MANUAL_BASE: "MANUAL_BASE";
2438
+ RUN2SKILL: "RUN2SKILL";
2439
+ }>;
2440
+ proposalId: z.ZodOptional<z.ZodString>;
2441
+ exactSkillBytes: z.ZodString;
2442
+ skillBytesDigest: z.ZodString;
2443
+ committedAt: z.ZodString;
2444
+ }, z.core.$strict>>;
2445
+ lineageId: z.ZodString;
2446
+ }, z.core.$strict>>;
2447
+ }, z.core.$strict>>;
2448
+ }, z.core.$strict>;
2449
+ }, z.core.$strict>;
2450
+ declare const ProposalLineageV2Schema: z.ZodUnion<readonly [z.ZodObject<{
2451
+ schemaVersion: z.ZodLiteral<1>;
2452
+ revision: z.ZodNumber;
2453
+ lineageId: z.ZodString;
2454
+ persistenceScope: z.ZodEnum<{
2455
+ PROJECT: "PROJECT";
2456
+ USER: "USER";
2457
+ }>;
2458
+ origin: z.ZodLiteral<"LEGACY_V1">;
2459
+ state: z.ZodLiteral<"PUBLISHED">;
2460
+ sourceDigest: z.ZodString;
2461
+ importedAt: z.ZodString;
2462
+ updatedAt: z.ZodString;
2463
+ legacySnapshot: z.ZodObject<{
2464
+ schemaVersion: z.ZodLiteral<1>;
2465
+ scope: z.ZodEnum<{
2466
+ PROJECT: "PROJECT";
2467
+ USER: "USER";
2468
+ }>;
2469
+ provider: z.ZodString;
2470
+ source: z.ZodEnum<{
2471
+ "project-dsh": "project-dsh";
2472
+ "user-dsh": "user-dsh";
2473
+ }>;
2474
+ skillName: z.ZodString;
2475
+ canonicalTargetPath: z.ZodString;
2476
+ targetIdentityDigest: z.ZodString;
2477
+ currentRevision: z.ZodNumber;
2478
+ revisions: z.ZodArray<z.ZodObject<{
2479
+ revision: z.ZodNumber;
2480
+ origin: z.ZodEnum<{
2481
+ ADOPTED_BASE: "ADOPTED_BASE";
2482
+ MANUAL_BASE: "MANUAL_BASE";
2483
+ RUN2SKILL: "RUN2SKILL";
2484
+ }>;
2485
+ proposalId: z.ZodOptional<z.ZodString>;
2486
+ exactSkillBytes: z.ZodString;
2487
+ skillBytesDigest: z.ZodString;
2488
+ committedAt: z.ZodString;
2489
+ }, z.core.$strict>>;
2490
+ lineageId: z.ZodString;
2491
+ }, z.core.$strict>;
2492
+ }, z.core.$strict>, z.ZodObject<{
2493
+ schemaVersion: z.ZodLiteral<1>;
2494
+ revision: z.ZodNumber;
2495
+ lineageId: z.ZodString;
2496
+ persistenceScope: z.ZodEnum<{
2497
+ PROJECT: "PROJECT";
2498
+ USER: "USER";
2499
+ }>;
2500
+ origin: z.ZodLiteral<"RUN2SKILL_V2">;
2501
+ state: z.ZodEnum<{
2502
+ TERMINAL: "TERMINAL";
2503
+ PUBLISHED: "PUBLISHED";
2504
+ RESERVED: "RESERVED";
2505
+ REFRESHING: "REFRESHING";
2506
+ ACTIVE_PROPOSAL: "ACTIVE_PROPOSAL";
2507
+ }>;
2508
+ behaviorSignature: z.ZodString;
2509
+ ownerIntentId: z.ZodString;
2510
+ ownerIntentRevision: z.ZodNumber;
2511
+ currentProposalRevision: z.ZodNumber;
2512
+ proposalRevisions: z.ZodArray<z.ZodObject<{
2513
+ revision: z.ZodNumber;
2514
+ proposalId: z.ZodString;
2515
+ ownerIntentId: z.ZodString;
2516
+ ownerIntentRevision: z.ZodNumber;
2517
+ action: z.ZodEnum<{
2518
+ CREATE: "CREATE";
2519
+ MERGE: "MERGE";
2520
+ }>;
2521
+ body: z.ZodObject<{
2522
+ name: z.ZodString;
2523
+ description: z.ZodString;
2524
+ whenToUse: z.ZodString;
2525
+ exactSkillBytes: z.ZodString;
2526
+ skillBytesDigest: z.ZodString;
2527
+ }, z.core.$strict>;
2528
+ runtimeCatalogDigest: z.ZodString;
2529
+ pendingCatalogDigest: z.ZodString;
2530
+ generationResultReceiptDigest: z.ZodString;
2531
+ catalogMutationReceiptDigest: z.ZodString;
2532
+ catalogEpoch: z.ZodNumber;
2533
+ targetIdentityDigest: z.ZodOptional<z.ZodString>;
2534
+ baseSkillBytes: z.ZodOptional<z.ZodString>;
2535
+ baseSkillBytesDigest: z.ZodOptional<z.ZodString>;
2536
+ projectScopeBinding: z.ZodOptional<z.ZodObject<{
2537
+ workspaceId: z.ZodString;
2538
+ scopeIdentityDigest: z.ZodString;
2539
+ }, z.core.$strict>>;
2540
+ state: z.ZodEnum<{
2541
+ TERMINAL: "TERMINAL";
2542
+ PUBLISHED: "PUBLISHED";
2543
+ ACTIVE_PROPOSAL: "ACTIVE_PROPOSAL";
2544
+ SUPERSEDED: "SUPERSEDED";
2545
+ }>;
2546
+ reviewDecision: z.ZodOptional<z.ZodEnum<{
2547
+ APPROVED: "APPROVED";
2548
+ REJECTED: "REJECTED";
2549
+ }>>;
2550
+ reviewedAt: z.ZodOptional<z.ZodString>;
2551
+ reviewReceiptDigest: z.ZodOptional<z.ZodString>;
2552
+ reviewCatalog: z.ZodOptional<z.ZodObject<{
2553
+ status: z.ZodLiteral<"CURRENT">;
2554
+ runtimeCatalogDigest: z.ZodString;
2555
+ pendingCatalogDigest: z.ZodString;
2556
+ catalogEpoch: z.ZodNumber;
2557
+ catalogMutationReceiptDigest: z.ZodString;
2558
+ }, z.core.$strict>>;
2559
+ reviewFailureCode: z.ZodOptional<z.ZodEnum<{
2560
+ CATALOG_CHANGED: "CATALOG_CHANGED";
2561
+ CATALOG_UNAVAILABLE: "CATALOG_UNAVAILABLE";
2562
+ }>>;
2563
+ reviewAttemptedAt: z.ZodOptional<z.ZodString>;
2564
+ publicationFailureCode: z.ZodOptional<z.ZodEnum<{
2565
+ CATALOG_CHANGED: "CATALOG_CHANGED";
2566
+ PUBLICATION_CONFLICT: "PUBLICATION_CONFLICT";
2567
+ CATALOG_UNAVAILABLE: "CATALOG_UNAVAILABLE";
2568
+ PUBLICATION_UNAVAILABLE: "PUBLICATION_UNAVAILABLE";
2569
+ }>>;
2570
+ publicationAttemptedAt: z.ZodOptional<z.ZodString>;
2571
+ publicationExternalReceiptDigest: z.ZodOptional<z.ZodString>;
2572
+ publishedAt: z.ZodOptional<z.ZodString>;
2573
+ publicationReceiptDigest: z.ZodOptional<z.ZodString>;
2574
+ createdAt: z.ZodString;
2575
+ }, z.core.$strict>>;
2576
+ currentSkillRevision: z.ZodDefault<z.ZodNumber>;
2577
+ skillRevisions: z.ZodDefault<z.ZodArray<z.ZodObject<{
2578
+ revision: z.ZodNumber;
2579
+ origin: z.ZodEnum<{
2580
+ ADOPTED_BASE: "ADOPTED_BASE";
2581
+ RUN2SKILL: "RUN2SKILL";
2582
+ }>;
2583
+ proposalId: z.ZodOptional<z.ZodString>;
2584
+ exactSkillBytes: z.ZodString;
2585
+ skillBytesDigest: z.ZodString;
2586
+ committedAt: z.ZodString;
2587
+ }, z.core.$strict>>>;
2588
+ createdAt: z.ZodString;
2589
+ updatedAt: z.ZodString;
2590
+ }, z.core.$strict>]>;
2591
+ declare const GlobalV2Schema: z.ZodObject<{
2592
+ schemaVersion: z.ZodLiteral<1>;
2593
+ migration: z.ZodDiscriminatedUnion<[z.ZodObject<{
2594
+ schemaVersion: z.ZodLiteral<1>;
2595
+ source: z.ZodObject<{
2596
+ domainName: z.ZodLiteral<"run2skill_v1">;
2597
+ domainVersion: z.ZodLiteral<2>;
2598
+ globalSchemaVersion: z.ZodLiteral<1>;
2599
+ }, z.core.$strict>;
2600
+ phase: z.ZodLiteral<"NOT_STARTED">;
2601
+ }, z.core.$strict>, z.ZodObject<{
2602
+ schemaVersion: z.ZodLiteral<1>;
2603
+ source: z.ZodObject<{
2604
+ domainName: z.ZodLiteral<"run2skill_v1">;
2605
+ domainVersion: z.ZodLiteral<2>;
2606
+ globalSchemaVersion: z.ZodLiteral<1>;
2607
+ }, z.core.$strict>;
2608
+ sourceFingerprint: z.ZodString;
2609
+ counts: z.ZodObject<{
2610
+ workItems: z.ZodNumber;
2611
+ lineages: z.ZodNumber;
2612
+ activeLegacyProposals: z.ZodNumber;
2613
+ }, z.core.$strict>;
2614
+ startedAt: z.ZodString;
2615
+ updatedAt: z.ZodString;
2616
+ phase: z.ZodLiteral<"COPYING">;
2617
+ }, z.core.$strict>, z.ZodObject<{
2618
+ schemaVersion: z.ZodLiteral<1>;
2619
+ source: z.ZodObject<{
2620
+ domainName: z.ZodLiteral<"run2skill_v1">;
2621
+ domainVersion: z.ZodLiteral<2>;
2622
+ globalSchemaVersion: z.ZodLiteral<1>;
2623
+ }, z.core.$strict>;
2624
+ sourceFingerprint: z.ZodString;
2625
+ counts: z.ZodObject<{
2626
+ workItems: z.ZodNumber;
2627
+ lineages: z.ZodNumber;
2628
+ activeLegacyProposals: z.ZodNumber;
2629
+ }, z.core.$strict>;
2630
+ startedAt: z.ZodString;
2631
+ updatedAt: z.ZodString;
2632
+ phase: z.ZodLiteral<"VALIDATING">;
2633
+ }, z.core.$strict>, z.ZodObject<{
2634
+ schemaVersion: z.ZodLiteral<1>;
2635
+ source: z.ZodObject<{
2636
+ domainName: z.ZodLiteral<"run2skill_v1">;
2637
+ domainVersion: z.ZodLiteral<2>;
2638
+ globalSchemaVersion: z.ZodLiteral<1>;
2639
+ }, z.core.$strict>;
2640
+ committedAt: z.ZodString;
2641
+ activationFenceDigest: z.ZodString;
2642
+ sourceFingerprint: z.ZodString;
2643
+ counts: z.ZodObject<{
2644
+ workItems: z.ZodNumber;
2645
+ lineages: z.ZodNumber;
2646
+ activeLegacyProposals: z.ZodNumber;
2647
+ }, z.core.$strict>;
2648
+ startedAt: z.ZodString;
2649
+ updatedAt: z.ZodString;
2650
+ phase: z.ZodLiteral<"COMMITTED">;
2651
+ }, z.core.$strict>, z.ZodObject<{
2652
+ schemaVersion: z.ZodLiteral<1>;
2653
+ source: z.ZodObject<{
2654
+ domainName: z.ZodLiteral<"run2skill_v1">;
2655
+ domainVersion: z.ZodLiteral<2>;
2656
+ globalSchemaVersion: z.ZodLiteral<1>;
2657
+ }, z.core.$strict>;
2658
+ failureCode: z.ZodString;
2659
+ sourceFingerprint: z.ZodString;
2660
+ counts: z.ZodObject<{
2661
+ workItems: z.ZodNumber;
2662
+ lineages: z.ZodNumber;
2663
+ activeLegacyProposals: z.ZodNumber;
2664
+ }, z.core.$strict>;
2665
+ startedAt: z.ZodString;
2666
+ updatedAt: z.ZodString;
2667
+ phase: z.ZodLiteral<"FAILED">;
2668
+ }, z.core.$strict>], "phase">;
2669
+ sessions: z.ZodRecord<z.ZodString, z.ZodObject<{
2670
+ observedThroughTurnEndSeq: z.ZodNumber;
2671
+ detectedThroughTurnEndSeq: z.ZodNumber;
2672
+ headerRevision: z.ZodOptional<z.ZodString>;
2673
+ observedLogPrefixDigest: z.ZodOptional<z.ZodString>;
2674
+ activeBatchId: z.ZodOptional<z.ZodString>;
2675
+ lastActivityAt: z.ZodOptional<z.ZodString>;
2676
+ batchManifestBaseline: z.ZodOptional<z.ZodObject<{
2677
+ observedAt: z.ZodString;
2678
+ rootManifestDigest: z.ZodString;
2679
+ runtimeCatalogDigest: z.ZodString;
2680
+ complete: z.ZodBoolean;
2681
+ ownershipCandidates: z.ZodOptional<z.ZodArray<z.ZodObject<{
2682
+ candidateId: z.ZodString;
2683
+ name: z.ZodString;
2684
+ provider: z.ZodString;
2685
+ source: z.ZodString;
2686
+ scope: z.ZodEnum<{
2687
+ PROJECT: "PROJECT";
2688
+ USER: "USER";
2689
+ }>;
2690
+ writable: z.ZodBoolean;
2691
+ targetPathDigest: z.ZodOptional<z.ZodString>;
2692
+ bodyDigest: z.ZodString;
2693
+ }, z.core.$strict>>>;
2694
+ afterTurnEndSeq: z.ZodNumber;
2695
+ }, z.core.$strict>>;
2696
+ openExperienceCarry: z.ZodArray<z.ZodObject<{
2697
+ summary: z.ZodString;
2698
+ behaviorSignatureDraft: z.ZodString;
2699
+ evidenceDigests: z.ZodArray<z.ZodString>;
2700
+ remainingBatches: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
2701
+ }, z.core.$strict>>;
2702
+ updatedAt: z.ZodString;
2703
+ }, z.core.$strict>>;
2704
+ behaviorSignatureIndex: z.ZodRecord<z.ZodString, z.ZodObject<{
2705
+ schemaVersion: z.ZodLiteral<1>;
2706
+ persistenceScope: z.ZodEnum<{
2707
+ PROJECT: "PROJECT";
2708
+ USER: "USER";
2709
+ }>;
2710
+ behaviorSignature: z.ZodString;
2711
+ ownerIntentId: z.ZodString;
2712
+ ownerRevision: z.ZodNumber;
2713
+ state: z.ZodEnum<{
2714
+ RESERVED: "RESERVED";
2715
+ ACTIVE: "ACTIVE";
2716
+ }>;
2717
+ updatedAt: z.ZodString;
2718
+ }, z.core.$strict>>;
2719
+ proposalGenerationLease: z.ZodOptional<z.ZodObject<{
2720
+ schemaVersion: z.ZodLiteral<1>;
2721
+ leaseId: z.ZodString;
2722
+ ownerIntentId: z.ZodString;
2723
+ ownerRevision: z.ZodNumber;
2724
+ generationRevision: z.ZodNumber;
2725
+ action: z.ZodEnum<{
2726
+ CREATE: "CREATE";
2727
+ MERGE: "MERGE";
2728
+ }>;
2729
+ inputDigest: z.ZodString;
2730
+ externalPendingDigest: z.ZodString;
2731
+ catalogEpoch: z.ZodNumber;
2732
+ acquiredAt: z.ZodString;
2733
+ callId: z.ZodOptional<z.ZodString>;
2734
+ callOutcomeReceiptDigest: z.ZodOptional<z.ZodString>;
2735
+ sealedResultReceiptDigest: z.ZodOptional<z.ZodString>;
2736
+ barrierReceiptDigest: z.ZodOptional<z.ZodString>;
2737
+ proposalAuthorizationReceiptDigest: z.ZodOptional<z.ZodString>;
2738
+ completionReceiptDigest: z.ZodOptional<z.ZodString>;
2739
+ state: z.ZodEnum<{
2740
+ NOT_CALLED: "NOT_CALLED";
2741
+ CALL_RESERVED: "CALL_RESERVED";
2742
+ KNOWN_FAILED: "KNOWN_FAILED";
2743
+ SUCCEEDED_RESULT_MISSING: "SUCCEEDED_RESULT_MISSING";
2744
+ RESULT_COMMITTED: "RESULT_COMMITTED";
2745
+ PROPOSAL_COMMIT_AUTHORIZED: "PROPOSAL_COMMIT_AUTHORIZED";
2746
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
2747
+ BODY_COMMITTED_INDEX_PENDING: "BODY_COMMITTED_INDEX_PENDING";
2748
+ ACTIVE_COMPLETE: "ACTIVE_COMPLETE";
2749
+ }>;
2750
+ }, z.core.$strict>>;
2751
+ proposalCatalogEpoch: z.ZodNumber;
2752
+ proposalCatalogLastMutation: z.ZodDefault<z.ZodObject<{
2753
+ epoch: z.ZodNumber;
2754
+ kind: z.ZodEnum<{
2755
+ GENESIS: "GENESIS";
2756
+ PROPOSAL: "PROPOSAL";
2757
+ GENERATION_RESULT: "GENERATION_RESULT";
2758
+ BARRIER: "BARRIER";
2759
+ LEGACY: "LEGACY";
2760
+ REVIEW: "REVIEW";
2761
+ PUBLICATION: "PUBLICATION";
2762
+ PURGE: "PURGE";
2763
+ USER_ACTION: "USER_ACTION";
2764
+ }>;
2765
+ ownerId: z.ZodString;
2766
+ mutationId: z.ZodString;
2767
+ digest: z.ZodString;
2768
+ }, z.core.$strict>>;
2769
+ proposalCatalogMutationJournal: z.ZodOptional<z.ZodObject<{
2770
+ schemaVersion: z.ZodLiteral<1>;
2771
+ mutationId: z.ZodString;
2772
+ ownerId: z.ZodString;
2773
+ kind: z.ZodEnum<{
2774
+ PROPOSAL: "PROPOSAL";
2775
+ GENERATION_RESULT: "GENERATION_RESULT";
2776
+ BARRIER: "BARRIER";
2777
+ LEGACY: "LEGACY";
2778
+ REVIEW: "REVIEW";
2779
+ PUBLICATION: "PUBLICATION";
2780
+ PURGE: "PURGE";
2781
+ USER_ACTION: "USER_ACTION";
2782
+ }>;
2783
+ phase: z.ZodEnum<{
2784
+ NEEDS_REFRESH: "NEEDS_REFRESH";
2785
+ PREPARED: "PREPARED";
2786
+ EXECUTING: "EXECUTING";
2787
+ }>;
2788
+ preparedAt: z.ZodString;
2789
+ executionStartedAt: z.ZodOptional<z.ZodString>;
2790
+ failureCode: z.ZodOptional<z.ZodEnum<{
2791
+ CATALOG_CHANGED: "CATALOG_CHANGED";
2792
+ PUBLICATION_CONFLICT: "PUBLICATION_CONFLICT";
2793
+ }>>;
2794
+ failedAt: z.ZodOptional<z.ZodString>;
2795
+ }, z.core.$strict>>;
2796
+ purgeJournal: z.ZodOptional<z.ZodObject<{
2797
+ schemaVersion: z.ZodLiteral<1>;
2798
+ purgeId: z.ZodString;
2799
+ scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
2800
+ scope: z.ZodLiteral<"ALL">;
2801
+ }, z.core.$strict>, z.ZodObject<{
2802
+ scope: z.ZodLiteral<"USER">;
2803
+ scopeIdentityDigest: z.ZodString;
2804
+ }, z.core.$strict>, z.ZodObject<{
2805
+ scope: z.ZodLiteral<"PROJECT">;
2806
+ workspaceId: z.ZodString;
2807
+ scopeIdentityDigest: z.ZodString;
2808
+ }, z.core.$strict>], "scope">;
2809
+ hideBefore: z.ZodString;
2810
+ phase: z.ZodEnum<{
2811
+ VALIDATING: "VALIDATING";
2812
+ PREPARED: "PREPARED";
2813
+ QUIESCED: "QUIESCED";
2814
+ DELETING: "DELETING";
2815
+ }>;
2816
+ updatedAt: z.ZodString;
2817
+ }, z.core.$strict>>;
2818
+ legacyCompletedPurgeFences: z.ZodOptional<z.ZodObject<{
2819
+ schemaVersion: z.ZodLiteral<1>;
2820
+ all: z.ZodOptional<z.ZodObject<{
2821
+ schemaVersion: z.ZodLiteral<1>;
2822
+ purgeId: z.ZodString;
2823
+ completedAt: z.ZodString;
2824
+ hideBefore: z.ZodString;
2825
+ scope: z.ZodLiteral<"ALL">;
2826
+ }, z.core.$strict>>;
2827
+ user: z.ZodOptional<z.ZodObject<{
2828
+ schemaVersion: z.ZodLiteral<1>;
2829
+ purgeId: z.ZodString;
2830
+ completedAt: z.ZodString;
2831
+ hideBefore: z.ZodString;
2832
+ scope: z.ZodLiteral<"USER">;
2833
+ }, z.core.$strict>>;
2834
+ projects: z.ZodRecord<z.ZodString, z.ZodObject<{
2835
+ schemaVersion: z.ZodLiteral<1>;
2836
+ purgeId: z.ZodString;
2837
+ completedAt: z.ZodString;
2838
+ hideBefore: z.ZodString;
2839
+ scope: z.ZodLiteral<"PROJECT">;
2840
+ scopeIdentityDigest: z.ZodString;
2841
+ }, z.core.$strict>>;
2842
+ }, z.core.$strict>>;
2843
+ activation: z.ZodOptional<z.ZodObject<{
2844
+ committedAt: z.ZodString;
2845
+ sourceFingerprint: z.ZodString;
2846
+ observerStartWatermarks: z.ZodRecord<z.ZodString, z.ZodObject<{
2847
+ nextSeq: z.ZodNumber;
2848
+ observedTailSeq: z.ZodNumber;
2849
+ headerRevision: z.ZodOptional<z.ZodString>;
2850
+ headerDigest: z.ZodOptional<z.ZodString>;
2851
+ }, z.core.$strict>>;
2852
+ observerStartWatermarkDigest: z.ZodString;
2853
+ legacyPendingCatalogDigest: z.ZodString;
2854
+ legacyPendingCandidateCount: z.ZodNumber;
2855
+ }, z.core.$strict>>;
2856
+ }, z.core.$strict>;
2857
+ type TurnObservationV2 = z.infer<typeof TurnObservationV2Schema>;
2858
+ type SessionBatchV2 = z.infer<typeof SessionBatchV2Schema>;
2859
+ type ExperienceIntentV2 = z.infer<typeof ExperienceIntentV2Schema>;
2860
+ type LegacyItemV2 = z.infer<typeof LegacyItemV2Schema>;
2861
+ type ProposalLineageV2 = z.infer<typeof ProposalLineageV2Schema>;
2862
+ type GlobalV2 = z.infer<typeof GlobalV2Schema>;
2863
+ //#endregion
2864
+ //#region src/adapters/dsh-storage/v2-types.d.ts
2865
+ interface Run2skillV2Domain {
2866
+ readonly name: 'run2skill_v2';
2867
+ readonly global: {
2868
+ get(): GlobalV2;
2869
+ set(value: GlobalV2): Promise<void>;
2870
+ };
2871
+ table(name: 'turn_observations'): Run2skillTable<string, TurnObservationV2>;
2872
+ table(name: 'session_batches'): Run2skillTable<string, SessionBatchV2>;
2873
+ table(name: 'experience_intents'): Run2skillTable<string, ExperienceIntentV2>;
2874
+ table(name: 'proposal_lineages'): Run2skillTable<string, ProposalLineageV2>;
2875
+ table(name: 'legacy_items'): Run2skillTable<string, LegacyItemV2>;
2876
+ close(): Promise<void>;
2877
+ }
2878
+ //#endregion
2879
+ //#region src/adapters/dsh-storage/v2-domain.d.ts
2880
+ declare const run2skillV2DomainSpec: {
2881
+ readonly name: "run2skill_v2";
2882
+ readonly version: 1;
2883
+ readonly global: {
2884
+ readonly schema: import("zod").ZodObject<{
2885
+ schemaVersion: import("zod").ZodLiteral<1>;
2886
+ migration: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
2887
+ schemaVersion: import("zod").ZodLiteral<1>;
2888
+ source: import("zod").ZodObject<{
2889
+ domainName: import("zod").ZodLiteral<"run2skill_v1">;
2890
+ domainVersion: import("zod").ZodLiteral<2>;
2891
+ globalSchemaVersion: import("zod").ZodLiteral<1>;
2892
+ }, import("zod/v4/core").$strict>;
2893
+ phase: import("zod").ZodLiteral<"NOT_STARTED">;
2894
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
2895
+ schemaVersion: import("zod").ZodLiteral<1>;
2896
+ source: import("zod").ZodObject<{
2897
+ domainName: import("zod").ZodLiteral<"run2skill_v1">;
2898
+ domainVersion: import("zod").ZodLiteral<2>;
2899
+ globalSchemaVersion: import("zod").ZodLiteral<1>;
2900
+ }, import("zod/v4/core").$strict>;
2901
+ sourceFingerprint: import("zod").ZodString;
2902
+ counts: import("zod").ZodObject<{
2903
+ workItems: import("zod").ZodNumber;
2904
+ lineages: import("zod").ZodNumber;
2905
+ activeLegacyProposals: import("zod").ZodNumber;
2906
+ }, import("zod/v4/core").$strict>;
2907
+ startedAt: import("zod").ZodString;
2908
+ updatedAt: import("zod").ZodString;
2909
+ phase: import("zod").ZodLiteral<"COPYING">;
2910
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
2911
+ schemaVersion: import("zod").ZodLiteral<1>;
2912
+ source: import("zod").ZodObject<{
2913
+ domainName: import("zod").ZodLiteral<"run2skill_v1">;
2914
+ domainVersion: import("zod").ZodLiteral<2>;
2915
+ globalSchemaVersion: import("zod").ZodLiteral<1>;
2916
+ }, import("zod/v4/core").$strict>;
2917
+ sourceFingerprint: import("zod").ZodString;
2918
+ counts: import("zod").ZodObject<{
2919
+ workItems: import("zod").ZodNumber;
2920
+ lineages: import("zod").ZodNumber;
2921
+ activeLegacyProposals: import("zod").ZodNumber;
2922
+ }, import("zod/v4/core").$strict>;
2923
+ startedAt: import("zod").ZodString;
2924
+ updatedAt: import("zod").ZodString;
2925
+ phase: import("zod").ZodLiteral<"VALIDATING">;
2926
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
2927
+ schemaVersion: import("zod").ZodLiteral<1>;
2928
+ source: import("zod").ZodObject<{
2929
+ domainName: import("zod").ZodLiteral<"run2skill_v1">;
2930
+ domainVersion: import("zod").ZodLiteral<2>;
2931
+ globalSchemaVersion: import("zod").ZodLiteral<1>;
2932
+ }, import("zod/v4/core").$strict>;
2933
+ committedAt: import("zod").ZodString;
2934
+ activationFenceDigest: import("zod").ZodString;
2935
+ sourceFingerprint: import("zod").ZodString;
2936
+ counts: import("zod").ZodObject<{
2937
+ workItems: import("zod").ZodNumber;
2938
+ lineages: import("zod").ZodNumber;
2939
+ activeLegacyProposals: import("zod").ZodNumber;
2940
+ }, import("zod/v4/core").$strict>;
2941
+ startedAt: import("zod").ZodString;
2942
+ updatedAt: import("zod").ZodString;
2943
+ phase: import("zod").ZodLiteral<"COMMITTED">;
2944
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
2945
+ schemaVersion: import("zod").ZodLiteral<1>;
2946
+ source: import("zod").ZodObject<{
2947
+ domainName: import("zod").ZodLiteral<"run2skill_v1">;
2948
+ domainVersion: import("zod").ZodLiteral<2>;
2949
+ globalSchemaVersion: import("zod").ZodLiteral<1>;
2950
+ }, import("zod/v4/core").$strict>;
2951
+ failureCode: import("zod").ZodString;
2952
+ sourceFingerprint: import("zod").ZodString;
2953
+ counts: import("zod").ZodObject<{
2954
+ workItems: import("zod").ZodNumber;
2955
+ lineages: import("zod").ZodNumber;
2956
+ activeLegacyProposals: import("zod").ZodNumber;
2957
+ }, import("zod/v4/core").$strict>;
2958
+ startedAt: import("zod").ZodString;
2959
+ updatedAt: import("zod").ZodString;
2960
+ phase: import("zod").ZodLiteral<"FAILED">;
2961
+ }, import("zod/v4/core").$strict>], "phase">;
2962
+ sessions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
2963
+ observedThroughTurnEndSeq: import("zod").ZodNumber;
2964
+ detectedThroughTurnEndSeq: import("zod").ZodNumber;
2965
+ headerRevision: import("zod").ZodOptional<import("zod").ZodString>;
2966
+ observedLogPrefixDigest: import("zod").ZodOptional<import("zod").ZodString>;
2967
+ activeBatchId: import("zod").ZodOptional<import("zod").ZodString>;
2968
+ lastActivityAt: import("zod").ZodOptional<import("zod").ZodString>;
2969
+ batchManifestBaseline: import("zod").ZodOptional<import("zod").ZodObject<{
2970
+ observedAt: import("zod").ZodString;
2971
+ rootManifestDigest: import("zod").ZodString;
2972
+ runtimeCatalogDigest: import("zod").ZodString;
2973
+ complete: import("zod").ZodBoolean;
2974
+ ownershipCandidates: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
2975
+ candidateId: import("zod").ZodString;
2976
+ name: import("zod").ZodString;
2977
+ provider: import("zod").ZodString;
2978
+ source: import("zod").ZodString;
2979
+ scope: import("zod").ZodEnum<{
2980
+ PROJECT: "PROJECT";
2981
+ USER: "USER";
2982
+ }>;
2983
+ writable: import("zod").ZodBoolean;
2984
+ targetPathDigest: import("zod").ZodOptional<import("zod").ZodString>;
2985
+ bodyDigest: import("zod").ZodString;
2986
+ }, import("zod/v4/core").$strict>>>;
2987
+ afterTurnEndSeq: import("zod").ZodNumber;
2988
+ }, import("zod/v4/core").$strict>>;
2989
+ openExperienceCarry: import("zod").ZodArray<import("zod").ZodObject<{
2990
+ summary: import("zod").ZodString;
2991
+ behaviorSignatureDraft: import("zod").ZodString;
2992
+ evidenceDigests: import("zod").ZodArray<import("zod").ZodString>;
2993
+ remainingBatches: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
2994
+ }, import("zod/v4/core").$strict>>;
2995
+ updatedAt: import("zod").ZodString;
2996
+ }, import("zod/v4/core").$strict>>;
2997
+ behaviorSignatureIndex: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
2998
+ schemaVersion: import("zod").ZodLiteral<1>;
2999
+ persistenceScope: import("zod").ZodEnum<{
3000
+ PROJECT: "PROJECT";
3001
+ USER: "USER";
3002
+ }>;
3003
+ behaviorSignature: import("zod").ZodString;
3004
+ ownerIntentId: import("zod").ZodString;
3005
+ ownerRevision: import("zod").ZodNumber;
3006
+ state: import("zod").ZodEnum<{
3007
+ RESERVED: "RESERVED";
3008
+ ACTIVE: "ACTIVE";
3009
+ }>;
3010
+ updatedAt: import("zod").ZodString;
3011
+ }, import("zod/v4/core").$strict>>;
3012
+ proposalGenerationLease: import("zod").ZodOptional<import("zod").ZodObject<{
3013
+ schemaVersion: import("zod").ZodLiteral<1>;
3014
+ leaseId: import("zod").ZodString;
3015
+ ownerIntentId: import("zod").ZodString;
3016
+ ownerRevision: import("zod").ZodNumber;
3017
+ generationRevision: import("zod").ZodNumber;
3018
+ action: import("zod").ZodEnum<{
3019
+ CREATE: "CREATE";
3020
+ MERGE: "MERGE";
3021
+ }>;
3022
+ inputDigest: import("zod").ZodString;
3023
+ externalPendingDigest: import("zod").ZodString;
3024
+ catalogEpoch: import("zod").ZodNumber;
3025
+ acquiredAt: import("zod").ZodString;
3026
+ callId: import("zod").ZodOptional<import("zod").ZodString>;
3027
+ callOutcomeReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3028
+ sealedResultReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3029
+ barrierReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3030
+ proposalAuthorizationReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3031
+ completionReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3032
+ state: import("zod").ZodEnum<{
3033
+ NOT_CALLED: "NOT_CALLED";
3034
+ CALL_RESERVED: "CALL_RESERVED";
3035
+ KNOWN_FAILED: "KNOWN_FAILED";
3036
+ SUCCEEDED_RESULT_MISSING: "SUCCEEDED_RESULT_MISSING";
3037
+ RESULT_COMMITTED: "RESULT_COMMITTED";
3038
+ PROPOSAL_COMMIT_AUTHORIZED: "PROPOSAL_COMMIT_AUTHORIZED";
3039
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
3040
+ BODY_COMMITTED_INDEX_PENDING: "BODY_COMMITTED_INDEX_PENDING";
3041
+ ACTIVE_COMPLETE: "ACTIVE_COMPLETE";
3042
+ }>;
3043
+ }, import("zod/v4/core").$strict>>;
3044
+ proposalCatalogEpoch: import("zod").ZodNumber;
3045
+ proposalCatalogLastMutation: import("zod").ZodDefault<import("zod").ZodObject<{
3046
+ epoch: import("zod").ZodNumber;
3047
+ kind: import("zod").ZodEnum<{
3048
+ GENESIS: "GENESIS";
3049
+ PROPOSAL: "PROPOSAL";
3050
+ GENERATION_RESULT: "GENERATION_RESULT";
3051
+ BARRIER: "BARRIER";
3052
+ LEGACY: "LEGACY";
3053
+ REVIEW: "REVIEW";
3054
+ PUBLICATION: "PUBLICATION";
3055
+ PURGE: "PURGE";
3056
+ USER_ACTION: "USER_ACTION";
3057
+ }>;
3058
+ ownerId: import("zod").ZodString;
3059
+ mutationId: import("zod").ZodString;
3060
+ digest: import("zod").ZodString;
3061
+ }, import("zod/v4/core").$strict>>;
3062
+ proposalCatalogMutationJournal: import("zod").ZodOptional<import("zod").ZodObject<{
3063
+ schemaVersion: import("zod").ZodLiteral<1>;
3064
+ mutationId: import("zod").ZodString;
3065
+ ownerId: import("zod").ZodString;
3066
+ kind: import("zod").ZodEnum<{
3067
+ PROPOSAL: "PROPOSAL";
3068
+ GENERATION_RESULT: "GENERATION_RESULT";
3069
+ BARRIER: "BARRIER";
3070
+ LEGACY: "LEGACY";
3071
+ REVIEW: "REVIEW";
3072
+ PUBLICATION: "PUBLICATION";
3073
+ PURGE: "PURGE";
3074
+ USER_ACTION: "USER_ACTION";
3075
+ }>;
3076
+ phase: import("zod").ZodEnum<{
3077
+ NEEDS_REFRESH: "NEEDS_REFRESH";
3078
+ PREPARED: "PREPARED";
3079
+ EXECUTING: "EXECUTING";
3080
+ }>;
3081
+ preparedAt: import("zod").ZodString;
3082
+ executionStartedAt: import("zod").ZodOptional<import("zod").ZodString>;
3083
+ failureCode: import("zod").ZodOptional<import("zod").ZodEnum<{
3084
+ CATALOG_CHANGED: "CATALOG_CHANGED";
3085
+ PUBLICATION_CONFLICT: "PUBLICATION_CONFLICT";
3086
+ }>>;
3087
+ failedAt: import("zod").ZodOptional<import("zod").ZodString>;
3088
+ }, import("zod/v4/core").$strict>>;
3089
+ purgeJournal: import("zod").ZodOptional<import("zod").ZodObject<{
3090
+ schemaVersion: import("zod").ZodLiteral<1>;
3091
+ purgeId: import("zod").ZodString;
3092
+ scopeBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3093
+ scope: import("zod").ZodLiteral<"ALL">;
3094
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3095
+ scope: import("zod").ZodLiteral<"USER">;
3096
+ scopeIdentityDigest: import("zod").ZodString;
3097
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3098
+ scope: import("zod").ZodLiteral<"PROJECT">;
3099
+ workspaceId: import("zod").ZodString;
3100
+ scopeIdentityDigest: import("zod").ZodString;
3101
+ }, import("zod/v4/core").$strict>], "scope">;
3102
+ hideBefore: import("zod").ZodString;
3103
+ phase: import("zod").ZodEnum<{
3104
+ VALIDATING: "VALIDATING";
3105
+ PREPARED: "PREPARED";
3106
+ QUIESCED: "QUIESCED";
3107
+ DELETING: "DELETING";
3108
+ }>;
3109
+ updatedAt: import("zod").ZodString;
3110
+ }, import("zod/v4/core").$strict>>;
3111
+ legacyCompletedPurgeFences: import("zod").ZodOptional<import("zod").ZodObject<{
3112
+ schemaVersion: import("zod").ZodLiteral<1>;
3113
+ all: import("zod").ZodOptional<import("zod").ZodObject<{
3114
+ schemaVersion: import("zod").ZodLiteral<1>;
3115
+ purgeId: import("zod").ZodString;
3116
+ completedAt: import("zod").ZodString;
3117
+ hideBefore: import("zod").ZodString;
3118
+ scope: import("zod").ZodLiteral<"ALL">;
3119
+ }, import("zod/v4/core").$strict>>;
3120
+ user: import("zod").ZodOptional<import("zod").ZodObject<{
3121
+ schemaVersion: import("zod").ZodLiteral<1>;
3122
+ purgeId: import("zod").ZodString;
3123
+ completedAt: import("zod").ZodString;
3124
+ hideBefore: import("zod").ZodString;
3125
+ scope: import("zod").ZodLiteral<"USER">;
3126
+ }, import("zod/v4/core").$strict>>;
3127
+ projects: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
3128
+ schemaVersion: import("zod").ZodLiteral<1>;
3129
+ purgeId: import("zod").ZodString;
3130
+ completedAt: import("zod").ZodString;
3131
+ hideBefore: import("zod").ZodString;
3132
+ scope: import("zod").ZodLiteral<"PROJECT">;
3133
+ scopeIdentityDigest: import("zod").ZodString;
3134
+ }, import("zod/v4/core").$strict>>;
3135
+ }, import("zod/v4/core").$strict>>;
3136
+ activation: import("zod").ZodOptional<import("zod").ZodObject<{
3137
+ committedAt: import("zod").ZodString;
3138
+ sourceFingerprint: import("zod").ZodString;
3139
+ observerStartWatermarks: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
3140
+ nextSeq: import("zod").ZodNumber;
3141
+ observedTailSeq: import("zod").ZodNumber;
3142
+ headerRevision: import("zod").ZodOptional<import("zod").ZodString>;
3143
+ headerDigest: import("zod").ZodOptional<import("zod").ZodString>;
3144
+ }, import("zod/v4/core").$strict>>;
3145
+ observerStartWatermarkDigest: import("zod").ZodString;
3146
+ legacyPendingCatalogDigest: import("zod").ZodString;
3147
+ legacyPendingCandidateCount: import("zod").ZodNumber;
3148
+ }, import("zod/v4/core").$strict>>;
3149
+ }, import("zod/v4/core").$strict>;
3150
+ readonly initial: {
3151
+ schemaVersion: 1;
3152
+ migration: {
3153
+ schemaVersion: 1;
3154
+ source: {
3155
+ domainName: "run2skill_v1";
3156
+ domainVersion: 2;
3157
+ globalSchemaVersion: 1;
3158
+ };
3159
+ phase: "NOT_STARTED";
3160
+ } | {
3161
+ schemaVersion: 1;
3162
+ source: {
3163
+ domainName: "run2skill_v1";
3164
+ domainVersion: 2;
3165
+ globalSchemaVersion: 1;
3166
+ };
3167
+ sourceFingerprint: string;
3168
+ counts: {
3169
+ workItems: number;
3170
+ lineages: number;
3171
+ activeLegacyProposals: number;
3172
+ };
3173
+ startedAt: string;
3174
+ updatedAt: string;
3175
+ phase: "COPYING";
3176
+ } | {
3177
+ schemaVersion: 1;
3178
+ source: {
3179
+ domainName: "run2skill_v1";
3180
+ domainVersion: 2;
3181
+ globalSchemaVersion: 1;
3182
+ };
3183
+ sourceFingerprint: string;
3184
+ counts: {
3185
+ workItems: number;
3186
+ lineages: number;
3187
+ activeLegacyProposals: number;
3188
+ };
3189
+ startedAt: string;
3190
+ updatedAt: string;
3191
+ phase: "VALIDATING";
3192
+ } | {
3193
+ schemaVersion: 1;
3194
+ source: {
3195
+ domainName: "run2skill_v1";
3196
+ domainVersion: 2;
3197
+ globalSchemaVersion: 1;
3198
+ };
3199
+ committedAt: string;
3200
+ activationFenceDigest: string;
3201
+ sourceFingerprint: string;
3202
+ counts: {
3203
+ workItems: number;
3204
+ lineages: number;
3205
+ activeLegacyProposals: number;
3206
+ };
3207
+ startedAt: string;
3208
+ updatedAt: string;
3209
+ phase: "COMMITTED";
3210
+ } | {
3211
+ schemaVersion: 1;
3212
+ source: {
3213
+ domainName: "run2skill_v1";
3214
+ domainVersion: 2;
3215
+ globalSchemaVersion: 1;
3216
+ };
3217
+ failureCode: string;
3218
+ sourceFingerprint: string;
3219
+ counts: {
3220
+ workItems: number;
3221
+ lineages: number;
3222
+ activeLegacyProposals: number;
3223
+ };
3224
+ startedAt: string;
3225
+ updatedAt: string;
3226
+ phase: "FAILED";
3227
+ };
3228
+ sessions: Record<string, {
3229
+ observedThroughTurnEndSeq: number;
3230
+ detectedThroughTurnEndSeq: number;
3231
+ openExperienceCarry: {
3232
+ summary: string;
3233
+ behaviorSignatureDraft: string;
3234
+ evidenceDigests: string[];
3235
+ remainingBatches: 0 | 1 | 2;
3236
+ }[];
3237
+ updatedAt: string;
3238
+ headerRevision?: string | undefined;
3239
+ observedLogPrefixDigest?: string | undefined;
3240
+ activeBatchId?: string | undefined;
3241
+ lastActivityAt?: string | undefined;
3242
+ batchManifestBaseline?: {
3243
+ observedAt: string;
3244
+ rootManifestDigest: string;
3245
+ runtimeCatalogDigest: string;
3246
+ complete: boolean;
3247
+ afterTurnEndSeq: number;
3248
+ ownershipCandidates?: {
3249
+ candidateId: string;
3250
+ name: string;
3251
+ provider: string;
3252
+ source: string;
3253
+ scope: "PROJECT" | "USER";
3254
+ writable: boolean;
3255
+ bodyDigest: string;
3256
+ targetPathDigest?: string | undefined;
3257
+ }[] | undefined;
3258
+ } | undefined;
3259
+ }>;
3260
+ behaviorSignatureIndex: Record<string, {
3261
+ schemaVersion: 1;
3262
+ persistenceScope: "PROJECT" | "USER";
3263
+ behaviorSignature: string;
3264
+ ownerIntentId: string;
3265
+ ownerRevision: number;
3266
+ state: "RESERVED" | "ACTIVE";
3267
+ updatedAt: string;
3268
+ }>;
3269
+ proposalCatalogEpoch: number;
3270
+ proposalCatalogLastMutation: {
3271
+ epoch: number;
3272
+ kind: "GENESIS" | "PROPOSAL" | "GENERATION_RESULT" | "BARRIER" | "LEGACY" | "REVIEW" | "PUBLICATION" | "PURGE" | "USER_ACTION";
3273
+ ownerId: string;
3274
+ mutationId: string;
3275
+ digest: string;
3276
+ };
3277
+ proposalGenerationLease?: {
3278
+ schemaVersion: 1;
3279
+ leaseId: string;
3280
+ ownerIntentId: string;
3281
+ ownerRevision: number;
3282
+ generationRevision: number;
3283
+ action: "CREATE" | "MERGE";
3284
+ inputDigest: string;
3285
+ externalPendingDigest: string;
3286
+ catalogEpoch: number;
3287
+ acquiredAt: string;
3288
+ state: "NOT_CALLED" | "CALL_RESERVED" | "KNOWN_FAILED" | "SUCCEEDED_RESULT_MISSING" | "RESULT_COMMITTED" | "PROPOSAL_COMMIT_AUTHORIZED" | "OUTCOME_UNKNOWN" | "BODY_COMMITTED_INDEX_PENDING" | "ACTIVE_COMPLETE";
3289
+ callId?: string | undefined;
3290
+ callOutcomeReceiptDigest?: string | undefined;
3291
+ sealedResultReceiptDigest?: string | undefined;
3292
+ barrierReceiptDigest?: string | undefined;
3293
+ proposalAuthorizationReceiptDigest?: string | undefined;
3294
+ completionReceiptDigest?: string | undefined;
3295
+ } | undefined;
3296
+ proposalCatalogMutationJournal?: {
3297
+ schemaVersion: 1;
3298
+ mutationId: string;
3299
+ ownerId: string;
3300
+ kind: "PROPOSAL" | "GENERATION_RESULT" | "BARRIER" | "LEGACY" | "REVIEW" | "PUBLICATION" | "PURGE" | "USER_ACTION";
3301
+ phase: "NEEDS_REFRESH" | "PREPARED" | "EXECUTING";
3302
+ preparedAt: string;
3303
+ executionStartedAt?: string | undefined;
3304
+ failureCode?: "CATALOG_CHANGED" | "PUBLICATION_CONFLICT" | undefined;
3305
+ failedAt?: string | undefined;
3306
+ } | undefined;
3307
+ purgeJournal?: {
3308
+ schemaVersion: 1;
3309
+ purgeId: string;
3310
+ scopeBinding: {
3311
+ scope: "ALL";
3312
+ } | {
3313
+ scope: "USER";
3314
+ scopeIdentityDigest: string;
3315
+ } | {
3316
+ scope: "PROJECT";
3317
+ workspaceId: string;
3318
+ scopeIdentityDigest: string;
3319
+ };
3320
+ hideBefore: string;
3321
+ phase: "VALIDATING" | "PREPARED" | "QUIESCED" | "DELETING";
3322
+ updatedAt: string;
3323
+ } | undefined;
3324
+ legacyCompletedPurgeFences?: {
3325
+ schemaVersion: 1;
3326
+ projects: Record<string, {
3327
+ schemaVersion: 1;
3328
+ purgeId: string;
3329
+ completedAt: string;
3330
+ hideBefore: string;
3331
+ scope: "PROJECT";
3332
+ scopeIdentityDigest: string;
3333
+ }>;
3334
+ all?: {
3335
+ schemaVersion: 1;
3336
+ purgeId: string;
3337
+ completedAt: string;
3338
+ hideBefore: string;
3339
+ scope: "ALL";
3340
+ } | undefined;
3341
+ user?: {
3342
+ schemaVersion: 1;
3343
+ purgeId: string;
3344
+ completedAt: string;
3345
+ hideBefore: string;
3346
+ scope: "USER";
3347
+ } | undefined;
3348
+ } | undefined;
3349
+ activation?: {
3350
+ committedAt: string;
3351
+ sourceFingerprint: string;
3352
+ observerStartWatermarks: Record<string, {
3353
+ nextSeq: number;
3354
+ observedTailSeq: number;
3355
+ headerRevision?: string | undefined;
3356
+ headerDigest?: string | undefined;
3357
+ }>;
3358
+ observerStartWatermarkDigest: string;
3359
+ legacyPendingCatalogDigest: string;
3360
+ legacyPendingCandidateCount: number;
3361
+ } | undefined;
3362
+ };
3363
+ };
3364
+ readonly tables: {
3365
+ readonly turn_observations: {
3366
+ readonly valueSchema: import("zod").ZodObject<{
3367
+ schemaVersion: import("zod").ZodLiteral<1>;
3368
+ revision: import("zod").ZodNumber;
3369
+ observationId: import("zod").ZodString;
3370
+ sessionLifecycleKey: import("zod").ZodString;
3371
+ turn: import("zod").ZodNumber;
3372
+ turnEndSeq: import("zod").ZodNumber;
3373
+ turnInstanceDigest: import("zod").ZodString;
3374
+ observedAt: import("zod").ZodString;
3375
+ outcomeKind: import("zod").ZodString;
3376
+ assistantOutcomeSummary: import("zod").ZodString;
3377
+ toolOutcomeSummary: import("zod").ZodArray<import("zod").ZodObject<{
3378
+ toolName: import("zod").ZodString;
3379
+ outcome: import("zod").ZodString;
3380
+ contentDigest: import("zod").ZodString;
3381
+ }, import("zod/v4/core").$strict>>;
3382
+ routeObservation: import("zod").ZodObject<{
3383
+ provider: import("zod").ZodOptional<import("zod").ZodString>;
3384
+ model: import("zod").ZodOptional<import("zod").ZodString>;
3385
+ complete: import("zod").ZodBoolean;
3386
+ }, import("zod/v4/core").$strict>;
3387
+ completeness: import("zod").ZodEnum<{
3388
+ COMPLETE: "COMPLETE";
3389
+ INCOMPLETE: "INCOMPLETE";
3390
+ }>;
3391
+ explicitSaveRequested: import("zod").ZodBoolean;
3392
+ scopeBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3393
+ status: import("zod").ZodLiteral<"PROJECT">;
3394
+ workspaceId: import("zod").ZodString;
3395
+ scopeIdentityDigest: import("zod").ZodString;
3396
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3397
+ status: import("zod").ZodLiteral<"USER">;
3398
+ scopeIdentityDigest: import("zod").ZodString;
3399
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3400
+ status: import("zod").ZodLiteral<"UNRESOLVED">;
3401
+ reason: import("zod").ZodEnum<{
3402
+ NO_CWD: "NO_CWD";
3403
+ UNREGISTERED: "UNREGISTERED";
3404
+ UNAVAILABLE: "UNAVAILABLE";
3405
+ }>;
3406
+ }, import("zod/v4/core").$strict>], "status">;
3407
+ directUserEvidence: import("zod").ZodArray<import("zod").ZodObject<{
3408
+ source: import("zod").ZodLiteral<"USER_DIRECT">;
3409
+ messageSeq: import("zod").ZodNumber;
3410
+ excerpt: import("zod").ZodString;
3411
+ excerptDigest: import("zod").ZodString;
3412
+ redactionKinds: import("zod").ZodArray<import("zod").ZodEnum<{
3413
+ PRIVATE_KEY: "PRIVATE_KEY";
3414
+ AUTHORIZATION: "AUTHORIZATION";
3415
+ BEARER_TOKEN: "BEARER_TOKEN";
3416
+ API_KEY: "API_KEY";
3417
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
3418
+ URL_CREDENTIAL: "URL_CREDENTIAL";
3419
+ }>>;
3420
+ truncated: import("zod").ZodBoolean;
3421
+ }, import("zod/v4/core").$strict>>;
3422
+ evidenceDigest: import("zod").ZodString;
3423
+ contentDigest: import("zod").ZodString;
3424
+ sessionRecovery: import("zod").ZodOptional<import("zod").ZodObject<{
3425
+ headerRevision: import("zod").ZodString;
3426
+ observedLogPrefixDigest: import("zod").ZodString;
3427
+ }, import("zod/v4/core").$strict>>;
3428
+ }, import("zod/v4/core").$strict>;
3429
+ };
3430
+ readonly session_batches: {
3431
+ readonly valueSchema: import("zod").ZodObject<{
3432
+ schemaVersion: import("zod").ZodLiteral<1>;
3433
+ revision: import("zod").ZodNumber;
3434
+ batchId: import("zod").ZodString;
3435
+ sessionLifecycleKey: import("zod").ZodString;
3436
+ firstTurnEndSeq: import("zod").ZodNumber;
3437
+ lastTurnEndSeq: import("zod").ZodNumber;
3438
+ detectorPolicyVersion: import("zod").ZodString;
3439
+ triggerReasons: import("zod").ZodArray<import("zod").ZodEnum<{
3440
+ EXPLICIT: "EXPLICIT";
3441
+ THRESHOLD: "THRESHOLD";
3442
+ IDLE: "IDLE";
3443
+ }>>;
3444
+ observationManifest: import("zod").ZodArray<import("zod").ZodObject<{
3445
+ observationId: import("zod").ZodString;
3446
+ turnEndSeq: import("zod").ZodNumber;
3447
+ evidenceDigest: import("zod").ZodString;
3448
+ completeness: import("zod").ZodEnum<{
3449
+ COMPLETE: "COMPLETE";
3450
+ INCOMPLETE: "INCOMPLETE";
3451
+ }>;
3452
+ }, import("zod/v4/core").$strict>>;
3453
+ observationManifestDigest: import("zod").ZodString;
3454
+ batchManifestBaseline: import("zod").ZodObject<{
3455
+ observedAt: import("zod").ZodString;
3456
+ rootManifestDigest: import("zod").ZodString;
3457
+ runtimeCatalogDigest: import("zod").ZodString;
3458
+ complete: import("zod").ZodBoolean;
3459
+ ownershipCandidates: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3460
+ candidateId: import("zod").ZodString;
3461
+ name: import("zod").ZodString;
3462
+ provider: import("zod").ZodString;
3463
+ source: import("zod").ZodString;
3464
+ scope: import("zod").ZodEnum<{
3465
+ PROJECT: "PROJECT";
3466
+ USER: "USER";
3467
+ }>;
3468
+ writable: import("zod").ZodBoolean;
3469
+ targetPathDigest: import("zod").ZodOptional<import("zod").ZodString>;
3470
+ bodyDigest: import("zod").ZodString;
3471
+ }, import("zod/v4/core").$strict>>>;
3472
+ }, import("zod/v4/core").$strict>;
3473
+ manifestEndObservation: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3474
+ state: import("zod").ZodLiteral<"PENDING">;
3475
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3476
+ state: import("zod").ZodLiteral<"OBSERVED">;
3477
+ observedAt: import("zod").ZodString;
3478
+ rootManifestDigest: import("zod").ZodString;
3479
+ runtimeCatalogDigest: import("zod").ZodString;
3480
+ complete: import("zod").ZodBoolean;
3481
+ }, import("zod/v4/core").$strict>], "state">;
3482
+ routeSnapshot: import("zod").ZodObject<{
3483
+ provider: import("zod").ZodString;
3484
+ model: import("zod").ZodString;
3485
+ policyVersion: import("zod").ZodString;
3486
+ maxInputBytes: import("zod").ZodNumber;
3487
+ maxOutputBytes: import("zod").ZodNumber;
3488
+ detectionReasoningEffort: import("zod").ZodOptional<import("zod").ZodString>;
3489
+ failureCode: import("zod").ZodOptional<import("zod").ZodLiteral<"ROUTE_UNAVAILABLE">>;
3490
+ }, import("zod/v4/core").$strict>;
3491
+ detector: import("zod").ZodObject<{
3492
+ result: import("zod").ZodEnum<{
3493
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
3494
+ READY: "READY";
3495
+ NOT_RUN: "NOT_RUN";
3496
+ NONE: "NONE";
3497
+ DEFER: "DEFER";
3498
+ }>;
3499
+ failureCode: import("zod").ZodOptional<import("zod").ZodString>;
3500
+ calls: import("zod").ZodArray<import("zod").ZodObject<{
3501
+ stage: import("zod").ZodLiteral<"DETECTION">;
3502
+ callId: import("zod").ZodString;
3503
+ ordinal: import("zod").ZodNumber;
3504
+ inputDigest: import("zod").ZodString;
3505
+ provider: import("zod").ZodString;
3506
+ model: import("zod").ZodString;
3507
+ policyVersion: import("zod").ZodString;
3508
+ outcome: import("zod").ZodEnum<{
3509
+ SUCCEEDED: "SUCCEEDED";
3510
+ FAILED: "FAILED";
3511
+ ABORTED: "ABORTED";
3512
+ TIMED_OUT: "TIMED_OUT";
3513
+ RESERVED: "RESERVED";
3514
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
3515
+ }>;
3516
+ outputDigest: import("zod").ZodOptional<import("zod").ZodString>;
3517
+ failureCode: import("zod").ZodOptional<import("zod").ZodString>;
3518
+ }, import("zod/v4/core").$strict>>;
3519
+ carryDigest: import("zod").ZodOptional<import("zod").ZodString>;
3520
+ carry: import("zod").ZodArray<import("zod").ZodObject<{
3521
+ summary: import("zod").ZodString;
3522
+ behaviorSignatureDraft: import("zod").ZodString;
3523
+ evidenceDigests: import("zod").ZodArray<import("zod").ZodString>;
3524
+ remainingBatches: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
3525
+ }, import("zod/v4/core").$strict>>;
3526
+ intentIds: import("zod").ZodArray<import("zod").ZodString>;
3527
+ }, import("zod/v4/core").$strict>;
3528
+ state: import("zod").ZodEnum<{
3529
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
3530
+ FROZEN: "FROZEN";
3531
+ DETECTION_CLAIMED: "DETECTION_CLAIMED";
3532
+ COMMITTED_NONE: "COMMITTED_NONE";
3533
+ COMMITTED_DEFER: "COMMITTED_DEFER";
3534
+ COMMITTED_READY: "COMMITTED_READY";
3535
+ }>;
3536
+ createdAt: import("zod").ZodString;
3537
+ updatedAt: import("zod").ZodString;
3538
+ }, import("zod/v4/core").$strict>;
3539
+ };
3540
+ readonly experience_intents: {
3541
+ readonly valueSchema: import("zod").ZodObject<{
3542
+ schemaVersion: import("zod").ZodLiteral<1>;
3543
+ revision: import("zod").ZodNumber;
3544
+ intentId: import("zod").ZodString;
3545
+ batchId: import("zod").ZodString;
3546
+ ordinal: import("zod").ZodNumber;
3547
+ sessionLifecycleKey: import("zod").ZodString;
3548
+ detectorPolicyVersion: import("zod").ZodString;
3549
+ persistenceScope: import("zod").ZodEnum<{
3550
+ PROJECT: "PROJECT";
3551
+ USER: "USER";
3552
+ }>;
3553
+ explicitSave: import("zod").ZodBoolean;
3554
+ experienceType: import("zod").ZodEnum<{
3555
+ CORRECTION: "CORRECTION";
3556
+ CONSTRAINT: "CONSTRAINT";
3557
+ WORKFLOW: "WORKFLOW";
3558
+ }>;
3559
+ applicabilitySummary: import("zod").ZodString;
3560
+ keySteps: import("zod").ZodArray<import("zod").ZodString>;
3561
+ prohibitions: import("zod").ZodArray<import("zod").ZodString>;
3562
+ behaviorSignature: import("zod").ZodString;
3563
+ evidenceRefs: import("zod").ZodArray<import("zod").ZodObject<{
3564
+ observationId: import("zod").ZodString;
3565
+ sessionLifecycleKey: import("zod").ZodString;
3566
+ turnEndSeq: import("zod").ZodNumber;
3567
+ evidenceDigest: import("zod").ZodString;
3568
+ }, import("zod/v4/core").$strict>>;
3569
+ evidenceDigests: import("zod").ZodArray<import("zod").ZodString>;
3570
+ completeness: import("zod").ZodObject<{
3571
+ status: import("zod").ZodEnum<{
3572
+ COMPLETE: "COMPLETE";
3573
+ INCOMPLETE: "INCOMPLETE";
3574
+ }>;
3575
+ blockers: import("zod").ZodArray<import("zod").ZodString>;
3576
+ }, import("zod/v4/core").$strict>;
3577
+ quiescence: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3578
+ state: import("zod").ZodLiteral<"WAITING">;
3579
+ batchLastTurnEndSeq: import("zod").ZodNumber;
3580
+ requiredIdleMs: import("zod").ZodNumber;
3581
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3582
+ state: import("zod").ZodLiteral<"SATISFIED">;
3583
+ batchLastTurnEndSeq: import("zod").ZodNumber;
3584
+ requiredIdleMs: import("zod").ZodNumber;
3585
+ observedThroughTurnEndSeq: import("zod").ZodNumber;
3586
+ detectedThroughTurnEndSeq: import("zod").ZodNumber;
3587
+ activityRevision: import("zod").ZodString;
3588
+ satisfiedAt: import("zod").ZodString;
3589
+ fenceDigest: import("zod").ZodString;
3590
+ }, import("zod/v4/core").$strict>], "state">;
3591
+ ownership: import("zod").ZodObject<{
3592
+ state: import("zod").ZodEnum<{
3593
+ NOT_STARTED: "NOT_STARTED";
3594
+ ARBITRATING: "ARBITRATING";
3595
+ RESOLVED_BY_AGENT: "RESOLVED_BY_AGENT";
3596
+ NEEDS_CONFIRMATION: "NEEDS_CONFIRMATION";
3597
+ RUN2SKILL_OWNED: "RUN2SKILL_OWNED";
3598
+ }>;
3599
+ claimId: import("zod").ZodOptional<import("zod").ZodString>;
3600
+ claimedIntentRevision: import("zod").ZodOptional<import("zod").ZodNumber>;
3601
+ claimedAt: import("zod").ZodOptional<import("zod").ZodString>;
3602
+ inputDigest: import("zod").ZodOptional<import("zod").ZodString>;
3603
+ evidence: import("zod").ZodOptional<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
3604
+ status: import("zod").ZodLiteral<"UNAVAILABLE">;
3605
+ reasonCode: import("zod").ZodEnum<{
3606
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
3607
+ INTENT_INCOMPLETE: "INTENT_INCOMPLETE";
3608
+ BASELINE_INCOMPLETE: "BASELINE_INCOMPLETE";
3609
+ CLAIM_INPUT_UNAVAILABLE: "CLAIM_INPUT_UNAVAILABLE";
3610
+ BASELINE_TIME_INVALID: "BASELINE_TIME_INVALID";
3611
+ OBSERVATION_FAILED: "OBSERVATION_FAILED";
3612
+ OBSERVATION_INVALID: "OBSERVATION_INVALID";
3613
+ OBSERVATION_OUTCOME_UNKNOWN: "OBSERVATION_OUTCOME_UNKNOWN";
3614
+ SESSION_CONTEXT_UNAVAILABLE: "SESSION_CONTEXT_UNAVAILABLE";
3615
+ SESSION_SNAPSHOT_UNAVAILABLE: "SESSION_SNAPSHOT_UNAVAILABLE";
3616
+ SESSION_WINDOW_INCOMPLETE: "SESSION_WINDOW_INCOMPLETE";
3617
+ SESSION_CHANGED_DURING_CHECK: "SESSION_CHANGED_DURING_CHECK";
3618
+ OWNERSHIP_ANALYSIS_UNAVAILABLE: "OWNERSHIP_ANALYSIS_UNAVAILABLE";
3619
+ }>;
3620
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
3621
+ status: import("zod").ZodLiteral<"OBSERVED">;
3622
+ inputDigest: import("zod").ZodString;
3623
+ observedAfterTurnEndSeq: import("zod").ZodNumber;
3624
+ observedAt: import("zod").ZodString;
3625
+ endManifest: import("zod").ZodObject<{
3626
+ rootManifestDigest: import("zod").ZodString;
3627
+ runtimeCatalogDigest: import("zod").ZodString;
3628
+ complete: import("zod").ZodBoolean;
3629
+ }, import("zod/v4/core").$strict>;
3630
+ catalogComplete: import("zod").ZodBoolean;
3631
+ toolEvidenceComplete: import("zod").ZodBoolean;
3632
+ agentActivity: import("zod").ZodEnum<{
3633
+ NONE: "NONE";
3634
+ WRITE_SUCCEEDED: "WRITE_SUCCEEDED";
3635
+ WRITE_FAILED: "WRITE_FAILED";
3636
+ BODY_GENERATED: "BODY_GENERATED";
3637
+ AMBIGUOUS: "AMBIGUOUS";
3638
+ }>;
3639
+ changedCandidates: import("zod").ZodArray<import("zod").ZodObject<{
3640
+ candidateId: import("zod").ZodString;
3641
+ provider: import("zod").ZodString;
3642
+ source: import("zod").ZodString;
3643
+ scope: import("zod").ZodEnum<{
3644
+ PROJECT: "PROJECT";
3645
+ USER: "USER";
3646
+ }>;
3647
+ writable: import("zod").ZodBoolean;
3648
+ exactReadbackComplete: import("zod").ZodBoolean;
3649
+ bodyDigest: import("zod").ZodOptional<import("zod").ZodString>;
3650
+ writeAttribution: import("zod").ZodEnum<{
3651
+ UNKNOWN: "UNKNOWN";
3652
+ AGENT_WRITE_SUCCEEDED: "AGENT_WRITE_SUCCEEDED";
3653
+ NOT_AGENT: "NOT_AGENT";
3654
+ }>;
3655
+ intentBinding: import("zod").ZodEnum<{
3656
+ UNKNOWN: "UNKNOWN";
3657
+ MATCH: "MATCH";
3658
+ NO_MATCH: "NO_MATCH";
3659
+ }>;
3660
+ }, import("zod/v4/core").$strict>>;
3661
+ }, import("zod/v4/core").$strict>], "status">>;
3662
+ evidenceDigest: import("zod").ZodOptional<import("zod").ZodString>;
3663
+ receiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3664
+ reasonCode: import("zod").ZodOptional<import("zod").ZodString>;
3665
+ resolvedCandidateId: import("zod").ZodOptional<import("zod").ZodString>;
3666
+ resolvedCandidateBodyDigest: import("zod").ZodOptional<import("zod").ZodString>;
3667
+ }, import("zod/v4/core").$strict>;
3668
+ recall: import("zod").ZodObject<{
3669
+ state: import("zod").ZodEnum<{
3670
+ COMPLETE: "COMPLETE";
3671
+ INCOMPLETE: "INCOMPLETE";
3672
+ NOT_STARTED: "NOT_STARTED";
3673
+ SCANNING: "SCANNING";
3674
+ }>;
3675
+ runtimeCatalogDigest: import("zod").ZodOptional<import("zod").ZodString>;
3676
+ pendingCatalogDigest: import("zod").ZodOptional<import("zod").ZodString>;
3677
+ complete: import("zod").ZodBoolean;
3678
+ summaryScanComplete: import("zod").ZodBoolean;
3679
+ catalogEpoch: import("zod").ZodOptional<import("zod").ZodNumber>;
3680
+ catalogMutationReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
3681
+ scanBasisRevision: import("zod").ZodOptional<import("zod").ZodNumber>;
3682
+ scanRouteProvider: import("zod").ZodOptional<import("zod").ZodString>;
3683
+ scanRouteModel: import("zod").ZodOptional<import("zod").ZodString>;
3684
+ scanPolicyVersion: import("zod").ZodOptional<import("zod").ZodString>;
3685
+ scanBindingDigest: import("zod").ZodOptional<import("zod").ZodString>;
3686
+ scanPlanDigest: import("zod").ZodOptional<import("zod").ZodString>;
3687
+ scanPageCount: import("zod").ZodOptional<import("zod").ZodNumber>;
3688
+ scanSummaryCount: import("zod").ZodOptional<import("zod").ZodNumber>;
3689
+ scanPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3690
+ ordinal: import("zod").ZodNumber;
3691
+ itemCount: import("zod").ZodNumber;
3692
+ inputDigest: import("zod").ZodString;
3693
+ membershipDigest: import("zod").ZodString;
3694
+ }, import("zod/v4/core").$strict>>>;
3695
+ summaryClassifications: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3696
+ candidateId: import("zod").ZodString;
3697
+ summaryDigest: import("zod").ZodString;
3698
+ classification: import("zod").ZodEnum<{
3699
+ RELEVANT: "RELEVANT";
3700
+ POSSIBLE: "POSSIBLE";
3701
+ UNRELATED: "UNRELATED";
3702
+ }>;
3703
+ pageOrdinal: import("zod").ZodNumber;
3704
+ callId: import("zod").ZodString;
3705
+ inputDigest: import("zod").ZodString;
3706
+ outputDigest: import("zod").ZodString;
3707
+ }, import("zod/v4/core").$strict>>>;
3708
+ incompleteReason: import("zod").ZodOptional<import("zod").ZodString>;
3709
+ selfExclusion: import("zod").ZodOptional<import("zod").ZodObject<{
3710
+ intentId: import("zod").ZodString;
3711
+ priorGenerationRevision: import("zod").ZodNumber;
3712
+ barrierReceiptDigest: import("zod").ZodString;
3713
+ selfExclusionDigest: import("zod").ZodString;
3714
+ }, import("zod/v4/core").$strict>>;
3715
+ candidates: import("zod").ZodArray<import("zod").ZodObject<{
3716
+ candidateId: import("zod").ZodString;
3717
+ summary: import("zod").ZodObject<{
3718
+ name: import("zod").ZodString;
3719
+ description: import("zod").ZodString;
3720
+ whenToUse: import("zod").ZodOptional<import("zod").ZodString>;
3721
+ provider: import("zod").ZodString;
3722
+ source: import("zod").ZodString;
3723
+ scope: import("zod").ZodEnum<{
3724
+ PROJECT: "PROJECT";
3725
+ USER: "USER";
3726
+ }>;
3727
+ writable: import("zod").ZodBoolean;
3728
+ }, import("zod/v4/core").$strict>;
3729
+ classification: import("zod").ZodEnum<{
3730
+ RELEVANT: "RELEVANT";
3731
+ POSSIBLE: "POSSIBLE";
3732
+ UNRELATED: "UNRELATED";
3733
+ }>;
3734
+ capability: import("zod").ZodEnum<{
3735
+ UNAVAILABLE: "UNAVAILABLE";
3736
+ AVAILABLE: "AVAILABLE";
3737
+ READABLE_NOT_MERGEABLE: "READABLE_NOT_MERGEABLE";
3738
+ }>;
3739
+ bodyDigest: import("zod").ZodOptional<import("zod").ZodString>;
3740
+ unavailableReason: import("zod").ZodOptional<import("zod").ZodEnum<{
3741
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
3742
+ CANDIDATE_DISAPPEARED: "CANDIDATE_DISAPPEARED";
3743
+ IDENTITY_CHANGED: "IDENTITY_CHANGED";
3744
+ READ_FAILED: "READ_FAILED";
3745
+ FILTERED_UNSAFE: "FILTERED_UNSAFE";
3746
+ INPUT_BUDGET_EXCEEDED: "INPUT_BUDGET_EXCEEDED";
3747
+ READ_TIMEOUT: "READ_TIMEOUT";
3748
+ SNAPSHOT_TIMEOUT: "SNAPSHOT_TIMEOUT";
3749
+ }>>;
3750
+ }, import("zod/v4/core").$strict>>;
3751
+ }, import("zod/v4/core").$strict>;
3752
+ coverage: import("zod").ZodObject<{
3753
+ state: import("zod").ZodEnum<{
3754
+ ANALYZING: "ANALYZING";
3755
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
3756
+ CREATE: "CREATE";
3757
+ MERGE: "MERGE";
3758
+ NOT_STARTED: "NOT_STARTED";
3759
+ COVERED: "COVERED";
3760
+ }>;
3761
+ retryUsed: import("zod").ZodBoolean;
3762
+ inputDigest: import("zod").ZodOptional<import("zod").ZodString>;
3763
+ targetDigest: import("zod").ZodOptional<import("zod").ZodString>;
3764
+ targetCandidateId: import("zod").ZodOptional<import("zod").ZodString>;
3765
+ basisRevision: import("zod").ZodOptional<import("zod").ZodNumber>;
3766
+ routeProvider: import("zod").ZodOptional<import("zod").ZodString>;
3767
+ routeModel: import("zod").ZodOptional<import("zod").ZodString>;
3768
+ routeMaxInputBytes: import("zod").ZodOptional<import("zod").ZodNumber>;
3769
+ routeMaxOutputBytes: import("zod").ZodOptional<import("zod").ZodNumber>;
3770
+ reserveBytes: import("zod").ZodOptional<import("zod").ZodNumber>;
3771
+ mergeOutputReserveBytes: import("zod").ZodOptional<import("zod").ZodNumber>;
3772
+ policyVersion: import("zod").ZodOptional<import("zod").ZodString>;
3773
+ bindingDigest: import("zod").ZodOptional<import("zod").ZodString>;
3774
+ planDigest: import("zod").ZodOptional<import("zod").ZodString>;
3775
+ pages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3776
+ ordinal: import("zod").ZodNumber;
3777
+ itemCount: import("zod").ZodNumber;
3778
+ inputDigest: import("zod").ZodString;
3779
+ membershipDigest: import("zod").ZodString;
3780
+ }, import("zod/v4/core").$strict>>>;
3781
+ candidateBindings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3782
+ ordinal: import("zod").ZodNumber;
3783
+ candidateId: import("zod").ZodString;
3784
+ bodyDigest: import("zod").ZodString;
3785
+ bodyBytes: import("zod").ZodNumber;
3786
+ pageOrdinal: import("zod").ZodNumber;
3787
+ }, import("zod/v4/core").$strict>>>;
3788
+ decisions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
3789
+ candidateId: import("zod").ZodString;
3790
+ decision: import("zod").ZodEnum<{
3791
+ AMBIGUOUS: "AMBIGUOUS";
3792
+ UNRELATED: "UNRELATED";
3793
+ COVERED: "COVERED";
3794
+ PARTIAL: "PARTIAL";
3795
+ }>;
3796
+ reason: import("zod").ZodString;
3797
+ pageOrdinal: import("zod").ZodNumber;
3798
+ callId: import("zod").ZodString;
3799
+ inputDigest: import("zod").ZodString;
3800
+ outputDigest: import("zod").ZodString;
3801
+ }, import("zod/v4/core").$strict>>>;
3802
+ reasonCode: import("zod").ZodOptional<import("zod").ZodString>;
3803
+ }, import("zod/v4/core").$strict>;
3804
+ generation: import("zod").ZodObject<{
3805
+ state: import("zod").ZodEnum<{
3806
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
3807
+ NOT_STARTED: "NOT_STARTED";
3808
+ RESULT_COMMITTED: "RESULT_COMMITTED";
3809
+ PROPOSAL_COMMIT_AUTHORIZED: "PROPOSAL_COMMIT_AUTHORIZED";
3810
+ GENERATION_AUTHORIZED: "GENERATION_AUTHORIZED";
3811
+ GENERATION_LEASED: "GENERATION_LEASED";
3812
+ GENERATION_CALL_RESERVED: "GENERATION_CALL_RESERVED";
3813
+ GENERATION_CALL_TERMINAL: "GENERATION_CALL_TERMINAL";
3814
+ PROPOSAL_BODY_COMMITTED: "PROPOSAL_BODY_COMMITTED";
3815
+ PROPOSAL_READY: "PROPOSAL_READY";
3816
+ }>;
3817
+ action: import("zod").ZodOptional<import("zod").ZodEnum<{
3818
+ CREATE: "CREATE";
3819
+ MERGE: "MERGE";
3820
+ }>>;
3821
+ inputDigest: import("zod").ZodOptional<import("zod").ZodString>;
3822
+ resultDigest: import("zod").ZodOptional<import("zod").ZodString>;
3823
+ leaseId: import("zod").ZodOptional<import("zod").ZodString>;
3824
+ generationRevision: import("zod").ZodOptional<import("zod").ZodNumber>;
3825
+ catalogEpoch: import("zod").ZodOptional<import("zod").ZodNumber>;
3826
+ externalPendingDigest: import("zod").ZodOptional<import("zod").ZodString>;
3827
+ selfExclusionDigest: import("zod").ZodOptional<import("zod").ZodString>;
3828
+ sealedResult: import("zod").ZodOptional<import("zod").ZodObject<{
3829
+ resultId: import("zod").ZodString;
3830
+ leaseId: import("zod").ZodString;
3831
+ intentId: import("zod").ZodString;
3832
+ generationRevision: import("zod").ZodNumber;
3833
+ callId: import("zod").ZodString;
3834
+ action: import("zod").ZodEnum<{
3835
+ CREATE: "CREATE";
3836
+ MERGE: "MERGE";
3837
+ }>;
3838
+ body: import("zod").ZodObject<{
3839
+ name: import("zod").ZodString;
3840
+ description: import("zod").ZodString;
3841
+ whenToUse: import("zod").ZodString;
3842
+ exactSkillBytes: import("zod").ZodString;
3843
+ skillBytesDigest: import("zod").ZodString;
3844
+ }, import("zod/v4/core").$strict>;
3845
+ targetDigest: import("zod").ZodString;
3846
+ baseSkillBytes: import("zod").ZodOptional<import("zod").ZodString>;
3847
+ baseSkillBytesDigest: import("zod").ZodOptional<import("zod").ZodString>;
3848
+ inputDigest: import("zod").ZodString;
3849
+ runtimeCatalogDigest: import("zod").ZodString;
3850
+ pendingCatalogDigest: import("zod").ZodString;
3851
+ externalPendingDigest: import("zod").ZodString;
3852
+ inputCatalogEpoch: import("zod").ZodNumber;
3853
+ outcomeCatalogEpoch: import("zod").ZodNumber;
3854
+ sealedAt: import("zod").ZodString;
3855
+ mutationReceiptDigest: import("zod").ZodString;
3856
+ receiptDigest: import("zod").ZodString;
3857
+ }, import("zod/v4/core").$strict>>;
3858
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
3859
+ reasonCode: import("zod").ZodOptional<import("zod").ZodEnum<{
3860
+ GENERATION_KNOWN_FAILED: "GENERATION_KNOWN_FAILED";
3861
+ GENERATION_RESULT_LOST: "GENERATION_RESULT_LOST";
3862
+ GENERATION_OUTCOME_UNKNOWN: "GENERATION_OUTCOME_UNKNOWN";
3863
+ STALE_RESULT: "STALE_RESULT";
3864
+ }>>;
3865
+ revalidationAuthorization: import("zod").ZodOptional<import("zod").ZodObject<{
3866
+ runtimeCatalogDigest: import("zod").ZodString;
3867
+ pendingCatalogDigest: import("zod").ZodString;
3868
+ externalPendingDigest: import("zod").ZodString;
3869
+ catalogEpoch: import("zod").ZodNumber;
3870
+ catalogMutationReceiptDigest: import("zod").ZodString;
3871
+ sealedResultReceiptDigest: import("zod").ZodString;
3872
+ selfExclusionDigest: import("zod").ZodOptional<import("zod").ZodString>;
3873
+ authorizedAt: import("zod").ZodString;
3874
+ }, import("zod/v4/core").$strict>>;
3875
+ userRetryUsed: import("zod").ZodBoolean;
3876
+ staleRefreshUsed: import("zod").ZodBoolean;
3877
+ receipts: import("zod").ZodArray<import("zod").ZodObject<{
3878
+ kind: import("zod").ZodEnum<{
3879
+ CALL_RESERVED: "CALL_RESERVED";
3880
+ LEASE_ACQUIRED: "LEASE_ACQUIRED";
3881
+ CALL_TERMINAL: "CALL_TERMINAL";
3882
+ RESULT_SEALED: "RESULT_SEALED";
3883
+ BARRIER_COMMITTED: "BARRIER_COMMITTED";
3884
+ PROPOSAL_AUTHORIZED: "PROPOSAL_AUTHORIZED";
3885
+ BODY_COMMITTED: "BODY_COMMITTED";
3886
+ INDEX_COMMITTED: "INDEX_COMMITTED";
3887
+ }>;
3888
+ digest: import("zod").ZodString;
3889
+ leaseId: import("zod").ZodString;
3890
+ intentId: import("zod").ZodString;
3891
+ generationRevision: import("zod").ZodNumber;
3892
+ callId: import("zod").ZodOptional<import("zod").ZodString>;
3893
+ catalogEpoch: import("zod").ZodOptional<import("zod").ZodNumber>;
3894
+ recordedAt: import("zod").ZodString;
3895
+ }, import("zod/v4/core").$strict>>;
3896
+ }, import("zod/v4/core").$strict>;
3897
+ duplicateBarrier: import("zod").ZodOptional<import("zod").ZodObject<{
3898
+ barrierId: import("zod").ZodString;
3899
+ leaseId: import("zod").ZodString;
3900
+ intentId: import("zod").ZodString;
3901
+ generationRevision: import("zod").ZodNumber;
3902
+ kind: import("zod").ZodEnum<{
3903
+ KNOWN_FAILED: "KNOWN_FAILED";
3904
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
3905
+ STALE_RESULT: "STALE_RESULT";
3906
+ RESULT_LOST: "RESULT_LOST";
3907
+ }>;
3908
+ behaviorSignature: import("zod").ZodString;
3909
+ inputDigest: import("zod").ZodString;
3910
+ callId: import("zod").ZodOptional<import("zod").ZodString>;
3911
+ priorGenerationRevision: import("zod").ZodOptional<import("zod").ZodNumber>;
3912
+ inputCatalogEpoch: import("zod").ZodNumber;
3913
+ outcomeCatalogEpoch: import("zod").ZodNumber;
3914
+ mutationReceiptDigest: import("zod").ZodString;
3915
+ recordedAt: import("zod").ZodString;
3916
+ receiptDigest: import("zod").ZodString;
3917
+ }, import("zod/v4/core").$strict>>;
3918
+ stageCalls: import("zod").ZodArray<import("zod").ZodObject<{
3919
+ stage: import("zod").ZodEnum<{
3920
+ CATALOG_SCAN: "CATALOG_SCAN";
3921
+ COVERAGE: "COVERAGE";
3922
+ GENERATION: "GENERATION";
3923
+ }>;
3924
+ intentRevision: import("zod").ZodNumber;
3925
+ callId: import("zod").ZodString;
3926
+ ordinal: import("zod").ZodNumber;
3927
+ itemCount: import("zod").ZodOptional<import("zod").ZodNumber>;
3928
+ inputDigest: import("zod").ZodString;
3929
+ provider: import("zod").ZodString;
3930
+ model: import("zod").ZodString;
3931
+ policyVersion: import("zod").ZodString;
3932
+ outcome: import("zod").ZodEnum<{
3933
+ SUCCEEDED: "SUCCEEDED";
3934
+ FAILED: "FAILED";
3935
+ ABORTED: "ABORTED";
3936
+ TIMED_OUT: "TIMED_OUT";
3937
+ RESERVED: "RESERVED";
3938
+ OUTCOME_UNKNOWN: "OUTCOME_UNKNOWN";
3939
+ }>;
3940
+ outputDigest: import("zod").ZodOptional<import("zod").ZodString>;
3941
+ failureCode: import("zod").ZodOptional<import("zod").ZodString>;
3942
+ }, import("zod/v4/core").$strict>>;
3943
+ reasonReceipts: import("zod").ZodArray<import("zod").ZodObject<{
3944
+ revision: import("zod").ZodNumber;
3945
+ reasonCode: import("zod").ZodString;
3946
+ recordedAt: import("zod").ZodString;
3947
+ }, import("zod/v4/core").$strict>>;
3948
+ lineageId: import("zod").ZodOptional<import("zod").ZodString>;
3949
+ status: import("zod").ZodEnum<{
3950
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
3951
+ DISCARDED: "DISCARDED";
3952
+ READY: "READY";
3953
+ RESOLVED_BY_AGENT: "RESOLVED_BY_AGENT";
3954
+ NEEDS_CONFIRMATION: "NEEDS_CONFIRMATION";
3955
+ RUN2SKILL_OWNED: "RUN2SKILL_OWNED";
3956
+ COVERED: "COVERED";
3957
+ PROPOSAL_READY: "PROPOSAL_READY";
3958
+ DETECTOR_STAGED: "DETECTOR_STAGED";
3959
+ WAITING_FOR_QUIESCENCE: "WAITING_FOR_QUIESCENCE";
3960
+ OWNERSHIP_ARBITRATING: "OWNERSHIP_ARBITRATING";
3961
+ RECALLING: "RECALLING";
3962
+ COVERAGE_READY: "COVERAGE_READY";
3963
+ COVERAGE_ANALYZING: "COVERAGE_ANALYZING";
3964
+ COVERED_NEEDS_CONFIRMATION: "COVERED_NEEDS_CONFIRMATION";
3965
+ COVERAGE_RETRY_AUTHORIZED: "COVERAGE_RETRY_AUTHORIZED";
3966
+ CREATE_AUTHORIZED: "CREATE_AUTHORIZED";
3967
+ MERGE_AUTHORIZED: "MERGE_AUTHORIZED";
3968
+ GENERATING: "GENERATING";
3969
+ }>;
3970
+ createdAt: import("zod").ZodString;
3971
+ updatedAt: import("zod").ZodString;
3972
+ }, import("zod/v4/core").$strict>;
3973
+ };
3974
+ readonly proposal_lineages: {
3975
+ readonly valueSchema: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
3976
+ schemaVersion: import("zod").ZodLiteral<1>;
3977
+ revision: import("zod").ZodNumber;
3978
+ lineageId: import("zod").ZodString;
3979
+ persistenceScope: import("zod").ZodEnum<{
3980
+ PROJECT: "PROJECT";
3981
+ USER: "USER";
3982
+ }>;
3983
+ origin: import("zod").ZodLiteral<"LEGACY_V1">;
3984
+ state: import("zod").ZodLiteral<"PUBLISHED">;
3985
+ sourceDigest: import("zod").ZodString;
3986
+ importedAt: import("zod").ZodString;
3987
+ updatedAt: import("zod").ZodString;
3988
+ legacySnapshot: import("zod").ZodObject<{
3989
+ schemaVersion: import("zod").ZodLiteral<1>;
3990
+ scope: import("zod").ZodEnum<{
3991
+ PROJECT: "PROJECT";
3992
+ USER: "USER";
3993
+ }>;
3994
+ provider: import("zod").ZodString;
3995
+ source: import("zod").ZodEnum<{
3996
+ "project-dsh": "project-dsh";
3997
+ "user-dsh": "user-dsh";
3998
+ }>;
3999
+ skillName: import("zod").ZodString;
4000
+ canonicalTargetPath: import("zod").ZodString;
4001
+ targetIdentityDigest: import("zod").ZodString;
4002
+ currentRevision: import("zod").ZodNumber;
4003
+ revisions: import("zod").ZodArray<import("zod").ZodObject<{
4004
+ revision: import("zod").ZodNumber;
4005
+ origin: import("zod").ZodEnum<{
4006
+ ADOPTED_BASE: "ADOPTED_BASE";
4007
+ MANUAL_BASE: "MANUAL_BASE";
4008
+ RUN2SKILL: "RUN2SKILL";
4009
+ }>;
4010
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
4011
+ exactSkillBytes: import("zod").ZodString;
4012
+ skillBytesDigest: import("zod").ZodString;
4013
+ committedAt: import("zod").ZodString;
4014
+ }, import("zod/v4/core").$strict>>;
4015
+ lineageId: import("zod").ZodString;
4016
+ }, import("zod/v4/core").$strict>;
4017
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4018
+ schemaVersion: import("zod").ZodLiteral<1>;
4019
+ revision: import("zod").ZodNumber;
4020
+ lineageId: import("zod").ZodString;
4021
+ persistenceScope: import("zod").ZodEnum<{
4022
+ PROJECT: "PROJECT";
4023
+ USER: "USER";
4024
+ }>;
4025
+ origin: import("zod").ZodLiteral<"RUN2SKILL_V2">;
4026
+ state: import("zod").ZodEnum<{
4027
+ TERMINAL: "TERMINAL";
4028
+ PUBLISHED: "PUBLISHED";
4029
+ RESERVED: "RESERVED";
4030
+ REFRESHING: "REFRESHING";
4031
+ ACTIVE_PROPOSAL: "ACTIVE_PROPOSAL";
4032
+ }>;
4033
+ behaviorSignature: import("zod").ZodString;
4034
+ ownerIntentId: import("zod").ZodString;
4035
+ ownerIntentRevision: import("zod").ZodNumber;
4036
+ currentProposalRevision: import("zod").ZodNumber;
4037
+ proposalRevisions: import("zod").ZodArray<import("zod").ZodObject<{
4038
+ revision: import("zod").ZodNumber;
4039
+ proposalId: import("zod").ZodString;
4040
+ ownerIntentId: import("zod").ZodString;
4041
+ ownerIntentRevision: import("zod").ZodNumber;
4042
+ action: import("zod").ZodEnum<{
4043
+ CREATE: "CREATE";
4044
+ MERGE: "MERGE";
4045
+ }>;
4046
+ body: import("zod").ZodObject<{
4047
+ name: import("zod").ZodString;
4048
+ description: import("zod").ZodString;
4049
+ whenToUse: import("zod").ZodString;
4050
+ exactSkillBytes: import("zod").ZodString;
4051
+ skillBytesDigest: import("zod").ZodString;
4052
+ }, import("zod/v4/core").$strict>;
4053
+ runtimeCatalogDigest: import("zod").ZodString;
4054
+ pendingCatalogDigest: import("zod").ZodString;
4055
+ generationResultReceiptDigest: import("zod").ZodString;
4056
+ catalogMutationReceiptDigest: import("zod").ZodString;
4057
+ catalogEpoch: import("zod").ZodNumber;
4058
+ targetIdentityDigest: import("zod").ZodOptional<import("zod").ZodString>;
4059
+ baseSkillBytes: import("zod").ZodOptional<import("zod").ZodString>;
4060
+ baseSkillBytesDigest: import("zod").ZodOptional<import("zod").ZodString>;
4061
+ projectScopeBinding: import("zod").ZodOptional<import("zod").ZodObject<{
4062
+ workspaceId: import("zod").ZodString;
4063
+ scopeIdentityDigest: import("zod").ZodString;
4064
+ }, import("zod/v4/core").$strict>>;
4065
+ state: import("zod").ZodEnum<{
4066
+ TERMINAL: "TERMINAL";
4067
+ PUBLISHED: "PUBLISHED";
4068
+ ACTIVE_PROPOSAL: "ACTIVE_PROPOSAL";
4069
+ SUPERSEDED: "SUPERSEDED";
4070
+ }>;
4071
+ reviewDecision: import("zod").ZodOptional<import("zod").ZodEnum<{
4072
+ APPROVED: "APPROVED";
4073
+ REJECTED: "REJECTED";
4074
+ }>>;
4075
+ reviewedAt: import("zod").ZodOptional<import("zod").ZodString>;
4076
+ reviewReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
4077
+ reviewCatalog: import("zod").ZodOptional<import("zod").ZodObject<{
4078
+ status: import("zod").ZodLiteral<"CURRENT">;
4079
+ runtimeCatalogDigest: import("zod").ZodString;
4080
+ pendingCatalogDigest: import("zod").ZodString;
4081
+ catalogEpoch: import("zod").ZodNumber;
4082
+ catalogMutationReceiptDigest: import("zod").ZodString;
4083
+ }, import("zod/v4/core").$strict>>;
4084
+ reviewFailureCode: import("zod").ZodOptional<import("zod").ZodEnum<{
4085
+ CATALOG_CHANGED: "CATALOG_CHANGED";
4086
+ CATALOG_UNAVAILABLE: "CATALOG_UNAVAILABLE";
4087
+ }>>;
4088
+ reviewAttemptedAt: import("zod").ZodOptional<import("zod").ZodString>;
4089
+ publicationFailureCode: import("zod").ZodOptional<import("zod").ZodEnum<{
4090
+ CATALOG_CHANGED: "CATALOG_CHANGED";
4091
+ PUBLICATION_CONFLICT: "PUBLICATION_CONFLICT";
4092
+ CATALOG_UNAVAILABLE: "CATALOG_UNAVAILABLE";
4093
+ PUBLICATION_UNAVAILABLE: "PUBLICATION_UNAVAILABLE";
4094
+ }>>;
4095
+ publicationAttemptedAt: import("zod").ZodOptional<import("zod").ZodString>;
4096
+ publicationExternalReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
4097
+ publishedAt: import("zod").ZodOptional<import("zod").ZodString>;
4098
+ publicationReceiptDigest: import("zod").ZodOptional<import("zod").ZodString>;
4099
+ createdAt: import("zod").ZodString;
4100
+ }, import("zod/v4/core").$strict>>;
4101
+ currentSkillRevision: import("zod").ZodDefault<import("zod").ZodNumber>;
4102
+ skillRevisions: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
4103
+ revision: import("zod").ZodNumber;
4104
+ origin: import("zod").ZodEnum<{
4105
+ ADOPTED_BASE: "ADOPTED_BASE";
4106
+ RUN2SKILL: "RUN2SKILL";
4107
+ }>;
4108
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
4109
+ exactSkillBytes: import("zod").ZodString;
4110
+ skillBytesDigest: import("zod").ZodString;
4111
+ committedAt: import("zod").ZodString;
4112
+ }, import("zod/v4/core").$strict>>>;
4113
+ createdAt: import("zod").ZodString;
4114
+ updatedAt: import("zod").ZodString;
4115
+ }, import("zod/v4/core").$strict>]>;
4116
+ };
4117
+ readonly legacy_items: {
4118
+ readonly valueSchema: import("zod").ZodObject<{
4119
+ schemaVersion: import("zod").ZodLiteral<1>;
4120
+ legacyItemId: import("zod").ZodString;
4121
+ sourceWorkItemId: import("zod").ZodString;
4122
+ sourceDigest: import("zod").ZodString;
4123
+ disposition: import("zod").ZodEnum<{
4124
+ AUDIT_ONLY_NO_SIGNAL: "AUDIT_ONLY_NO_SIGNAL";
4125
+ LEGACY_NEEDS_ATTENTION: "LEGACY_NEEDS_ATTENTION";
4126
+ LEGACY_CALL_OUTCOME_UNKNOWN: "LEGACY_CALL_OUTCOME_UNKNOWN";
4127
+ ACTIVE_LEGACY_PROPOSAL: "ACTIVE_LEGACY_PROPOSAL";
4128
+ ACTIVE_LEGACY_PUBLICATION: "ACTIVE_LEGACY_PUBLICATION";
4129
+ AUDIT_ONLY_DISCARDED: "AUDIT_ONLY_DISCARDED";
4130
+ AUDIT_ONLY_PUBLISHED: "AUDIT_ONLY_PUBLISHED";
4131
+ }>;
4132
+ importedAt: import("zod").ZodString;
4133
+ sourceWorkItem: import("zod").ZodObject<{
4134
+ schemaVersion: import("zod").ZodLiteral<1>;
4135
+ revision: import("zod").ZodNumber;
4136
+ workItemId: import("zod").ZodString;
4137
+ signalKey: import("zod").ZodObject<{
4138
+ rootSessionId: import("zod").ZodString;
4139
+ sessionCreatedAt: import("zod").ZodNumber;
4140
+ sessionCwdDigest: import("zod").ZodString;
4141
+ turn: import("zod").ZodNumber;
4142
+ turnEndSeq: import("zod").ZodNumber;
4143
+ turnInstanceDigest: import("zod").ZodString;
4144
+ triggerPolicyVersion: import("zod").ZodLiteral<"cheap-trigger-v1">;
4145
+ }, import("zod/v4/core").$strict>;
4146
+ captureReason: import("zod").ZodEnum<{
4147
+ CHEAP_TRIGGER: "CHEAP_TRIGGER";
4148
+ SCAN_INCOMPLETE: "SCAN_INCOMPLETE";
4149
+ }>;
4150
+ createdAt: import("zod").ZodString;
4151
+ updatedAt: import("zod").ZodString;
4152
+ turnOutcomeKind: import("zod").ZodString;
4153
+ rootIdentity: import("zod").ZodObject<{
4154
+ status: import("zod").ZodLiteral<"ROOT">;
4155
+ parentSessionId: import("zod").ZodOptional<import("zod").ZodString>;
4156
+ }, import("zod/v4/core").$strict>;
4157
+ workspaceBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
4158
+ status: import("zod").ZodLiteral<"BOUND">;
4159
+ workspaceId: import("zod").ZodString;
4160
+ canonicalPath: import("zod").ZodString;
4161
+ observedAt: import("zod").ZodString;
4162
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4163
+ status: import("zod").ZodEnum<{
4164
+ NO_CWD: "NO_CWD";
4165
+ UNREGISTERED: "UNREGISTERED";
4166
+ UNAVAILABLE: "UNAVAILABLE";
4167
+ }>;
4168
+ observedAt: import("zod").ZodString;
4169
+ }, import("zod/v4/core").$strict>], "status">;
4170
+ scanStatus: import("zod").ZodEnum<{
4171
+ COMPLETE: "COMPLETE";
4172
+ INCOMPLETE: "INCOMPLETE";
4173
+ }>;
4174
+ triggerHits: import("zod").ZodArray<import("zod").ZodObject<{
4175
+ kind: import("zod").ZodEnum<{
4176
+ EXPLICIT_SAVE: "EXPLICIT_SAVE";
4177
+ CORRECTION: "CORRECTION";
4178
+ CONSTRAINT: "CONSTRAINT";
4179
+ WORKFLOW: "WORKFLOW";
4180
+ }>;
4181
+ messageSeq: import("zod").ZodNumber;
4182
+ ruleId: import("zod").ZodString;
4183
+ confidence: import("zod").ZodLiteral<"HIGH">;
4184
+ }, import("zod/v4/core").$strict>>;
4185
+ evidenceRefs: import("zod").ZodArray<import("zod").ZodObject<{
4186
+ source: import("zod").ZodLiteral<"USER_DIRECT">;
4187
+ messageSeq: import("zod").ZodNumber;
4188
+ excerpt: import("zod").ZodString;
4189
+ excerptDigest: import("zod").ZodString;
4190
+ redactionKinds: import("zod").ZodArray<import("zod").ZodEnum<{
4191
+ PRIVATE_KEY: "PRIVATE_KEY";
4192
+ AUTHORIZATION: "AUTHORIZATION";
4193
+ BEARER_TOKEN: "BEARER_TOKEN";
4194
+ API_KEY: "API_KEY";
4195
+ SECRET_ASSIGNMENT: "SECRET_ASSIGNMENT";
4196
+ URL_CREDENTIAL: "URL_CREDENTIAL";
4197
+ }>>;
4198
+ truncated: import("zod").ZodBoolean;
4199
+ }, import("zod/v4/core").$strict>>;
4200
+ captureBlockers: import("zod").ZodArray<import("zod").ZodEnum<{
4201
+ TURN_BOUNDARY_INCOMPLETE: "TURN_BOUNDARY_INCOMPLETE";
4202
+ TEXT_LIMIT_EXCEEDED: "TEXT_LIMIT_EXCEEDED";
4203
+ REDACTION_UNAVAILABLE: "REDACTION_UNAVAILABLE";
4204
+ }>>;
4205
+ processingState: import("zod").ZodEnum<{
4206
+ CAPTURED: "CAPTURED";
4207
+ ANALYZING: "ANALYZING";
4208
+ LEARNED: "LEARNED";
4209
+ READY_FOR_REVIEW: "READY_FOR_REVIEW";
4210
+ PUBLISHING: "PUBLISHING";
4211
+ TERMINAL: "TERMINAL";
4212
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
4213
+ RESOLVED_NO_SIGNAL: "RESOLVED_NO_SIGNAL";
4214
+ }>;
4215
+ learning: import("zod").ZodOptional<import("zod").ZodObject<{
4216
+ policyVersion: import("zod").ZodLiteral<"learning-v1">;
4217
+ attempt: import("zod").ZodNumber;
4218
+ requestBudgetUsed: import("zod").ZodNumber;
4219
+ claimedAt: import("zod").ZodOptional<import("zod").ZodString>;
4220
+ nextEligibleAt: import("zod").ZodOptional<import("zod").ZodString>;
4221
+ modelRoute: import("zod").ZodOptional<import("zod").ZodObject<{
4222
+ provider: import("zod").ZodString;
4223
+ model: import("zod").ZodString;
4224
+ }, import("zod/v4/core").$strict>>;
4225
+ calls: import("zod").ZodArray<import("zod").ZodObject<{
4226
+ requestOrdinal: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
4227
+ kind: import("zod").ZodEnum<{
4228
+ PRIMARY: "PRIMARY";
4229
+ FORMAT_REPAIR: "FORMAT_REPAIR";
4230
+ }>;
4231
+ inputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
4232
+ outputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
4233
+ outcome: import("zod").ZodEnum<{
4234
+ SUCCEEDED: "SUCCEEDED";
4235
+ FAILED: "FAILED";
4236
+ ABORTED: "ABORTED";
4237
+ TIMED_OUT: "TIMED_OUT";
4238
+ }>;
4239
+ }, import("zod/v4/core").$strict>>;
4240
+ failure: import("zod").ZodOptional<import("zod").ZodObject<{
4241
+ code: import("zod").ZodEnum<{
4242
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
4243
+ AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
4244
+ MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
4245
+ MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
4246
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
4247
+ CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
4248
+ ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
4249
+ MODEL_TIMEOUT: "MODEL_TIMEOUT";
4250
+ MODEL_ABORTED: "MODEL_ABORTED";
4251
+ MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
4252
+ MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
4253
+ INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
4254
+ LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
4255
+ STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
4256
+ }>;
4257
+ retryable: import("zod").ZodBoolean;
4258
+ occurredAt: import("zod").ZodString;
4259
+ }, import("zod/v4/core").$strict>>;
4260
+ experiences: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
4261
+ experienceId: import("zod").ZodString;
4262
+ type: import("zod").ZodEnum<{
4263
+ CORRECTION: "CORRECTION";
4264
+ CONSTRAINT: "CONSTRAINT";
4265
+ WORKFLOW: "WORKFLOW";
4266
+ }>;
4267
+ lesson: import("zod").ZodString;
4268
+ persistenceScope: import("zod").ZodEnum<{
4269
+ PROJECT: "PROJECT";
4270
+ USER: "USER";
4271
+ }>;
4272
+ evidenceStrength: import("zod").ZodLiteral<"HIGH">;
4273
+ supportingEvidence: import("zod").ZodArray<import("zod").ZodObject<{
4274
+ messageSeq: import("zod").ZodNumber;
4275
+ excerptDigest: import("zod").ZodString;
4276
+ }, import("zod/v4/core").$strict>>;
4277
+ contextSummary: import("zod").ZodOptional<import("zod").ZodString>;
4278
+ }, import("zod/v4/core").$strict>>>;
4279
+ proposal: import("zod").ZodOptional<import("zod").ZodObject<{
4280
+ learningProposalId: import("zod").ZodString;
4281
+ policyVersion: import("zod").ZodLiteral<"learning-v1">;
4282
+ name: import("zod").ZodString;
4283
+ description: import("zod").ZodString;
4284
+ whenToUse: import("zod").ZodString;
4285
+ content: import("zod").ZodString;
4286
+ invocation: import("zod").ZodObject<{
4287
+ modelInvocable: import("zod").ZodLiteral<true>;
4288
+ userInvocable: import("zod").ZodLiteral<false>;
4289
+ }, import("zod/v4/core").$strict>;
4290
+ persistenceScope: import("zod").ZodEnum<{
4291
+ PROJECT: "PROJECT";
4292
+ USER: "USER";
4293
+ }>;
4294
+ supportingExperienceIds: import("zod").ZodArray<import("zod").ZodString>;
4295
+ curation: import("zod").ZodObject<{
4296
+ decision: import("zod").ZodEnum<{
4297
+ CREATE: "CREATE";
4298
+ MERGE: "MERGE";
4299
+ DISCARD: "DISCARD";
4300
+ }>;
4301
+ candidateKey: import("zod").ZodOptional<import("zod").ZodString>;
4302
+ rationale: import("zod").ZodString;
4303
+ }, import("zod/v4/core").$strict>;
4304
+ catalogObservationDigest: import("zod").ZodString;
4305
+ shortlistDigests: import("zod").ZodArray<import("zod").ZodString>;
4306
+ }, import("zod/v4/core").$strict>>;
4307
+ publicationOutcome: import("zod").ZodOptional<import("zod").ZodLiteral<"NEEDS_ATTENTION">>;
4308
+ }, import("zod/v4/core").$strict>>;
4309
+ review: import("zod").ZodOptional<import("zod").ZodObject<{
4310
+ policyVersion: import("zod").ZodLiteral<"review-v1">;
4311
+ proposal: import("zod").ZodObject<{
4312
+ schemaVersion: import("zod").ZodLiteral<1>;
4313
+ revision: import("zod").ZodNumber;
4314
+ createdAt: import("zod").ZodString;
4315
+ sourceLearningProposalId: import("zod").ZodString;
4316
+ kind: import("zod").ZodEnum<{
4317
+ CREATE: "CREATE";
4318
+ MERGE: "MERGE";
4319
+ DISCARD: "DISCARD";
4320
+ }>;
4321
+ name: import("zod").ZodString;
4322
+ description: import("zod").ZodString;
4323
+ whenToUse: import("zod").ZodString;
4324
+ invocation: import("zod").ZodObject<{
4325
+ modelInvocable: import("zod").ZodLiteral<true>;
4326
+ userInvocable: import("zod").ZodLiteral<false>;
4327
+ }, import("zod/v4/core").$strict>;
4328
+ exactSkillBytes: import("zod").ZodString;
4329
+ skillBytesDigest: import("zod").ZodString;
4330
+ rendererVersion: import("zod").ZodString;
4331
+ persistenceScope: import("zod").ZodEnum<{
4332
+ PROJECT: "PROJECT";
4333
+ USER: "USER";
4334
+ }>;
4335
+ workspaceBinding: import("zod").ZodOptional<import("zod").ZodObject<{
4336
+ workspaceId: import("zod").ZodString;
4337
+ canonicalPath: import("zod").ZodString;
4338
+ observedAt: import("zod").ZodString;
4339
+ }, import("zod/v4/core").$strict>>;
4340
+ dshHomeBinding: import("zod").ZodOptional<import("zod").ZodObject<{
4341
+ resolutionKind: import("zod").ZodEnum<{
4342
+ CONFIGURATION: "CONFIGURATION";
4343
+ ENVIRONMENT: "ENVIRONMENT";
4344
+ DEFAULT: "DEFAULT";
4345
+ }>;
4346
+ canonicalPath: import("zod").ZodString;
4347
+ identityDigest: import("zod").ZodString;
4348
+ observedAt: import("zod").ZodString;
4349
+ }, import("zod/v4/core").$strict>>;
4350
+ supportingExperienceIds: import("zod").ZodArray<import("zod").ZodString>;
4351
+ catalogObservationDigest: import("zod").ZodString;
4352
+ curationRationale: import("zod").ZodString;
4353
+ actionBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
4354
+ kind: import("zod").ZodLiteral<"CREATE">;
4355
+ rootBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
4356
+ scope: import("zod").ZodEnum<{
4357
+ PROJECT: "PROJECT";
4358
+ USER: "USER";
4359
+ }>;
4360
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
4361
+ expectedSource: import("zod").ZodEnum<{
4362
+ "project-dsh": "project-dsh";
4363
+ "user-dsh": "user-dsh";
4364
+ }>;
4365
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
4366
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
4367
+ resolutionContractDigest: import("zod").ZodString;
4368
+ declaredRootPath: import("zod").ZodString;
4369
+ state: import("zod").ZodLiteral<"EXISTING">;
4370
+ canonicalRootPath: import("zod").ZodString;
4371
+ rootIdentityDigest: import("zod").ZodString;
4372
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4373
+ scope: import("zod").ZodEnum<{
4374
+ PROJECT: "PROJECT";
4375
+ USER: "USER";
4376
+ }>;
4377
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
4378
+ expectedSource: import("zod").ZodEnum<{
4379
+ "project-dsh": "project-dsh";
4380
+ "user-dsh": "user-dsh";
4381
+ }>;
4382
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
4383
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
4384
+ resolutionContractDigest: import("zod").ZodString;
4385
+ declaredRootPath: import("zod").ZodString;
4386
+ state: import("zod").ZodLiteral<"ABSENT">;
4387
+ canonicalExistingAncestorPath: import("zod").ZodString;
4388
+ ancestorIdentityDigest: import("zod").ZodString;
4389
+ missingSegments: import("zod").ZodArray<import("zod").ZodString>;
4390
+ }, import("zod/v4/core").$strict>], "state">;
4391
+ targetBinding: import("zod").ZodObject<{
4392
+ skillName: import("zod").ZodString;
4393
+ bundlePath: import("zod").ZodString;
4394
+ skillFilePath: import("zod").ZodString;
4395
+ }, import("zod/v4/core").$strict>;
4396
+ expectedAbsence: import("zod").ZodObject<{
4397
+ catalogObservationDigest: import("zod").ZodString;
4398
+ observedAt: import("zod").ZodString;
4399
+ flatSkillFilePath: import("zod").ZodString;
4400
+ bundlePathAbsent: import("zod").ZodLiteral<true>;
4401
+ skillFilePathAbsent: import("zod").ZodLiteral<true>;
4402
+ flatSkillFilePathAbsent: import("zod").ZodLiteral<true>;
4403
+ }, import("zod/v4/core").$strict>;
4404
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4405
+ kind: import("zod").ZodLiteral<"MERGE">;
4406
+ rootBinding: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
4407
+ scope: import("zod").ZodEnum<{
4408
+ PROJECT: "PROJECT";
4409
+ USER: "USER";
4410
+ }>;
4411
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
4412
+ expectedSource: import("zod").ZodEnum<{
4413
+ "project-dsh": "project-dsh";
4414
+ "user-dsh": "user-dsh";
4415
+ }>;
4416
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
4417
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
4418
+ resolutionContractDigest: import("zod").ZodString;
4419
+ declaredRootPath: import("zod").ZodString;
4420
+ state: import("zod").ZodLiteral<"EXISTING">;
4421
+ canonicalRootPath: import("zod").ZodString;
4422
+ rootIdentityDigest: import("zod").ZodString;
4423
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4424
+ scope: import("zod").ZodEnum<{
4425
+ PROJECT: "PROJECT";
4426
+ USER: "USER";
4427
+ }>;
4428
+ expectedProvider: import("zod").ZodLiteral<"filesystem">;
4429
+ expectedSource: import("zod").ZodEnum<{
4430
+ "project-dsh": "project-dsh";
4431
+ "user-dsh": "user-dsh";
4432
+ }>;
4433
+ resolverVersion: import("zod").ZodLiteral<"stock-root-resolver-v2">;
4434
+ rootContractVersion: import("zod").ZodLiteral<"stock-dsh-web-default-roots-v1">;
4435
+ resolutionContractDigest: import("zod").ZodString;
4436
+ declaredRootPath: import("zod").ZodString;
4437
+ state: import("zod").ZodLiteral<"ABSENT">;
4438
+ canonicalExistingAncestorPath: import("zod").ZodString;
4439
+ ancestorIdentityDigest: import("zod").ZodString;
4440
+ missingSegments: import("zod").ZodArray<import("zod").ZodString>;
4441
+ }, import("zod/v4/core").$strict>], "state">;
4442
+ targetBinding: import("zod").ZodObject<{
4443
+ skillName: import("zod").ZodString;
4444
+ bundlePath: import("zod").ZodString;
4445
+ skillFilePath: import("zod").ZodString;
4446
+ }, import("zod/v4/core").$strict>;
4447
+ baseBinding: import("zod").ZodObject<{
4448
+ candidateKey: import("zod").ZodString;
4449
+ provider: import("zod").ZodString;
4450
+ source: import("zod").ZodString;
4451
+ path: import("zod").ZodString;
4452
+ exactBytes: import("zod").ZodString;
4453
+ bytesDigest: import("zod").ZodString;
4454
+ catalogObservationDigest: import("zod").ZodString;
4455
+ observedAt: import("zod").ZodString;
4456
+ }, import("zod/v4/core").$strict>;
4457
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4458
+ kind: import("zod").ZodLiteral<"DISCARD">;
4459
+ coveringCandidateBinding: import("zod").ZodObject<{
4460
+ candidateKey: import("zod").ZodString;
4461
+ provider: import("zod").ZodString;
4462
+ source: import("zod").ZodString;
4463
+ name: import("zod").ZodString;
4464
+ description: import("zod").ZodString;
4465
+ whenToUse: import("zod").ZodOptional<import("zod").ZodString>;
4466
+ content: import("zod").ZodString;
4467
+ contentDigest: import("zod").ZodString;
4468
+ path: import("zod").ZodOptional<import("zod").ZodString>;
4469
+ catalogObservationDigest: import("zod").ZodString;
4470
+ observedAt: import("zod").ZodString;
4471
+ }, import("zod/v4/core").$strict>;
4472
+ }, import("zod/v4/core").$strict>], "kind">;
4473
+ proposalId: import("zod").ZodString;
4474
+ digest: import("zod").ZodString;
4475
+ }, import("zod/v4/core").$strict>;
4476
+ reviewDecision: import("zod").ZodEnum<{
4477
+ PENDING: "PENDING";
4478
+ APPROVED: "APPROVED";
4479
+ REJECTED: "REJECTED";
4480
+ }>;
4481
+ publicationOutcome: import("zod").ZodEnum<{
4482
+ NEEDS_ATTENTION: "NEEDS_ATTENTION";
4483
+ PENDING_REVIEW: "PENDING_REVIEW";
4484
+ DISCARDED: "DISCARDED";
4485
+ NEEDS_REFRESH: "NEEDS_REFRESH";
4486
+ PUBLISHED: "PUBLISHED";
4487
+ PUBLISH_FAILED: "PUBLISH_FAILED";
4488
+ }>;
4489
+ coverageRetryCount: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<0>, import("zod").ZodLiteral<1>]>;
4490
+ decidedAt: import("zod").ZodOptional<import("zod").ZodString>;
4491
+ decisionReason: import("zod").ZodOptional<import("zod").ZodEnum<{
4492
+ USER_REJECTED: "USER_REJECTED";
4493
+ COVERAGE_CONFIRMED: "COVERAGE_CONFIRMED";
4494
+ }>>;
4495
+ failure: import("zod").ZodOptional<import("zod").ZodObject<{
4496
+ code: import("zod").ZodString;
4497
+ retryable: import("zod").ZodBoolean;
4498
+ occurredAt: import("zod").ZodString;
4499
+ }, import("zod/v4/core").$strict>>;
4500
+ }, import("zod/v4/core").$strict>>;
4501
+ publication: import("zod").ZodOptional<import("zod").ZodObject<{
4502
+ schemaVersion: import("zod").ZodLiteral<1>;
4503
+ policyVersion: import("zod").ZodLiteral<"publication-v1">;
4504
+ attemptCount: import("zod").ZodNumber;
4505
+ activeAttemptId: import("zod").ZodString;
4506
+ targetIdentityDigest: import("zod").ZodString;
4507
+ journal: import("zod").ZodArray<import("zod").ZodObject<{
4508
+ schemaVersion: import("zod").ZodLiteral<1>;
4509
+ ordinal: import("zod").ZodNumber;
4510
+ attempt: import("zod").ZodNumber;
4511
+ attemptId: import("zod").ZodString;
4512
+ stage: import("zod").ZodEnum<{
4513
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
4514
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
4515
+ ROOT_PREPARED: "ROOT_PREPARED";
4516
+ TARGET_INSTALLED: "TARGET_INSTALLED";
4517
+ DISK_VERIFIED: "DISK_VERIFIED";
4518
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
4519
+ LINEAGE_PENDING: "LINEAGE_PENDING";
4520
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
4521
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
4522
+ }>;
4523
+ targetIdentityDigest: import("zod").ZodString;
4524
+ expectedHash: import("zod").ZodOptional<import("zod").ZodString>;
4525
+ observedHash: import("zod").ZodOptional<import("zod").ZodString>;
4526
+ occurredAt: import("zod").ZodString;
4527
+ previousDigest: import("zod").ZodNullable<import("zod").ZodString>;
4528
+ digest: import("zod").ZodString;
4529
+ }, import("zod/v4/core").$strict>>;
4530
+ pendingLineage: import("zod").ZodOptional<import("zod").ZodObject<{
4531
+ schemaVersion: import("zod").ZodLiteral<1>;
4532
+ scope: import("zod").ZodEnum<{
4533
+ PROJECT: "PROJECT";
4534
+ USER: "USER";
4535
+ }>;
4536
+ provider: import("zod").ZodString;
4537
+ source: import("zod").ZodEnum<{
4538
+ "project-dsh": "project-dsh";
4539
+ "user-dsh": "user-dsh";
4540
+ }>;
4541
+ skillName: import("zod").ZodString;
4542
+ canonicalTargetPath: import("zod").ZodString;
4543
+ targetIdentityDigest: import("zod").ZodString;
4544
+ currentRevision: import("zod").ZodNumber;
4545
+ revisions: import("zod").ZodArray<import("zod").ZodObject<{
4546
+ revision: import("zod").ZodNumber;
4547
+ origin: import("zod").ZodEnum<{
4548
+ ADOPTED_BASE: "ADOPTED_BASE";
4549
+ MANUAL_BASE: "MANUAL_BASE";
4550
+ RUN2SKILL: "RUN2SKILL";
4551
+ }>;
4552
+ proposalId: import("zod").ZodOptional<import("zod").ZodString>;
4553
+ exactSkillBytes: import("zod").ZodString;
4554
+ skillBytesDigest: import("zod").ZodString;
4555
+ committedAt: import("zod").ZodString;
4556
+ }, import("zod/v4/core").$strict>>;
4557
+ lineageId: import("zod").ZodString;
4558
+ }, import("zod/v4/core").$strict>>;
4559
+ }, import("zod/v4/core").$strict>>;
4560
+ }, import("zod/v4/core").$strict>;
4561
+ }, import("zod/v4/core").$strict>;
4562
+ };
4563
+ };
4564
+ };
4565
+ //#endregion
4566
+ //#region src/domain/publication/schemas.d.ts
4567
+ declare const PublicationJournalStageV1Schema: z.ZodEnum<{
4568
+ APPROVAL_COMMITTED: "APPROVAL_COMMITTED";
4569
+ FACTS_REVALIDATED: "FACTS_REVALIDATED";
4570
+ ROOT_PREPARED: "ROOT_PREPARED";
4571
+ TARGET_INSTALLED: "TARGET_INSTALLED";
4572
+ DISK_VERIFIED: "DISK_VERIFIED";
4573
+ READBACK_CONFIRMED: "READBACK_CONFIRMED";
4574
+ LINEAGE_PENDING: "LINEAGE_PENDING";
4575
+ LINEAGE_COMMITTED: "LINEAGE_COMMITTED";
4576
+ OUTCOME_COMMITTED: "OUTCOME_COMMITTED";
4577
+ }>;
4578
+ type PublicationJournalStageV1 = z.infer<typeof PublicationJournalStageV1Schema>;
4579
+ declare const LineageV1Schema: z.ZodObject<{
4580
+ schemaVersion: z.ZodLiteral<1>;
4581
+ scope: z.ZodEnum<{
4582
+ PROJECT: "PROJECT";
4583
+ USER: "USER";
4584
+ }>;
4585
+ provider: z.ZodString;
4586
+ source: z.ZodEnum<{
4587
+ "project-dsh": "project-dsh";
4588
+ "user-dsh": "user-dsh";
4589
+ }>;
4590
+ skillName: z.ZodString;
4591
+ canonicalTargetPath: z.ZodString;
4592
+ targetIdentityDigest: z.ZodString;
4593
+ currentRevision: z.ZodNumber;
4594
+ revisions: z.ZodArray<z.ZodObject<{
4595
+ revision: z.ZodNumber;
4596
+ origin: z.ZodEnum<{
4597
+ ADOPTED_BASE: "ADOPTED_BASE";
4598
+ MANUAL_BASE: "MANUAL_BASE";
4599
+ RUN2SKILL: "RUN2SKILL";
4600
+ }>;
4601
+ proposalId: z.ZodOptional<z.ZodString>;
4602
+ exactSkillBytes: z.ZodString;
4603
+ skillBytesDigest: z.ZodString;
4604
+ committedAt: z.ZodString;
4605
+ }, z.core.$strict>>;
4606
+ lineageId: z.ZodString;
4607
+ }, z.core.$strict>;
4608
+ type LineageV1 = z.infer<typeof LineageV1Schema>;
4609
+ //#endregion
4610
+ //#region src/adapters/dsh-storage/types.d.ts
4611
+ interface Run2skillTable<K extends string, V> {
4612
+ get(key: K): V | undefined;
4613
+ entries(): IterableIterator<[K, V]>;
4614
+ keys(): IterableIterator<K>;
4615
+ readonly size: number;
4616
+ put(key: K, value: V): Promise<void>;
4617
+ delete(key: K): Promise<boolean>;
4618
+ update(key: K, transform: (current: V) => V): Promise<V>;
4619
+ }
4620
+ interface Run2skillDomain {
4621
+ readonly name: 'run2skill_v1';
4622
+ readonly global: {
4623
+ get(): GlobalV1;
4624
+ set(value: GlobalV1): Promise<void>;
4625
+ };
4626
+ table(name: 'work_items'): Run2skillTable<string, CaptureWorkItemV1>;
4627
+ table(name: 'lineages'): Run2skillTable<string, LineageV1>;
4628
+ close(): Promise<void>;
4629
+ }
4630
+ interface Run2skillStorageContext {
4631
+ readonly storageDomain: {
4632
+ open(spec: typeof run2skillDomainSpec | typeof learningDiagnosticDomainSpec | typeof run2skillV2DomainSpec): Promise<Run2skillDomain | LearningDiagnosticDomain | Run2skillV2Domain>;
4633
+ };
4634
+ }
4635
+ //#endregion
4636
+ //#region src/adapters/dsh-storage/learning-diagnostic-domain.d.ts
4637
+ declare const learningDiagnosticDomainSpec: {
4638
+ readonly name: "run2skill_learning_diagnostics_v1";
4639
+ readonly version: 1;
4640
+ readonly tables: {
4641
+ readonly terminal_details: {
4642
+ readonly valueSchema: import("zod").ZodObject<{
4643
+ schemaVersion: import("zod").ZodLiteral<1>;
4644
+ workItemId: import("zod").ZodString;
4645
+ workItemRevision: import("zod").ZodNumber;
4646
+ attempt: import("zod").ZodNumber;
4647
+ requestOrdinal: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<1>, import("zod").ZodLiteral<2>]>;
4648
+ callKind: import("zod").ZodEnum<{
4649
+ PRIMARY: "PRIMARY";
4650
+ FORMAT_REPAIR: "FORMAT_REPAIR";
4651
+ }>;
4652
+ callOutcome: import("zod").ZodEnum<{
4653
+ SUCCEEDED: "SUCCEEDED";
4654
+ FAILED: "FAILED";
4655
+ ABORTED: "ABORTED";
4656
+ TIMED_OUT: "TIMED_OUT";
4657
+ }>;
4658
+ failureCode: import("zod").ZodEnum<{
4659
+ SESSION_LOG_UNAVAILABLE: "SESSION_LOG_UNAVAILABLE";
4660
+ AGENT_SCOPE_UNAVAILABLE: "AGENT_SCOPE_UNAVAILABLE";
4661
+ MODEL_ROUTE_UNAVAILABLE: "MODEL_ROUTE_UNAVAILABLE";
4662
+ MODEL_INFO_UNAVAILABLE: "MODEL_INFO_UNAVAILABLE";
4663
+ CATALOG_INCOMPLETE: "CATALOG_INCOMPLETE";
4664
+ CANDIDATE_UNAVAILABLE: "CANDIDATE_UNAVAILABLE";
4665
+ ENVELOPE_UNBUILDABLE: "ENVELOPE_UNBUILDABLE";
4666
+ MODEL_TIMEOUT: "MODEL_TIMEOUT";
4667
+ MODEL_ABORTED: "MODEL_ABORTED";
4668
+ MODEL_TERMINAL_FAILURE: "MODEL_TERMINAL_FAILURE";
4669
+ MODEL_OUTPUT_LIMIT_EXCEEDED: "MODEL_OUTPUT_LIMIT_EXCEEDED";
4670
+ INVALID_STRUCTURED_OUTPUT: "INVALID_STRUCTURED_OUTPUT";
4671
+ LEARNING_GUARD_REJECTED: "LEARNING_GUARD_REJECTED";
4672
+ STORE_WRITE_FAILED: "STORE_WRITE_FAILED";
4673
+ }>;
4674
+ failureOccurredAt: import("zod").ZodString;
4675
+ detail: import("zod").ZodEnum<{
4676
+ MODEL_STREAM_FAILURE: "MODEL_STREAM_FAILURE";
4677
+ MODEL_FINISH_MISSING: "MODEL_FINISH_MISSING";
4678
+ MODEL_USAGE_INVALID: "MODEL_USAGE_INVALID";
4679
+ MODEL_ASSEMBLY_FAILED: "MODEL_ASSEMBLY_FAILED";
4680
+ MODEL_UNEXPECTED_FINISH: "MODEL_UNEXPECTED_FINISH";
4681
+ }>;
4682
+ }, import("zod/v4/core").$strict>;
4683
+ };
4684
+ readonly health_checks: {
4685
+ readonly valueSchema: import("zod").ZodObject<{
4686
+ schemaVersion: import("zod").ZodLiteral<1>;
4687
+ generation: import("zod").ZodNumber;
4688
+ }, import("zod/v4/core").$strict>;
4689
+ };
4690
+ };
4691
+ };
4692
+ interface LearningDiagnosticDomain {
4693
+ readonly name: 'run2skill_learning_diagnostics_v1';
4694
+ table(name: 'terminal_details'): Run2skillTable<string, LearningDiagnosticRecordV1>;
4695
+ table(name: 'health_checks'): Run2skillTable<string, LearningDiagnosticHealthV1>;
4696
+ close(): Promise<void>;
4697
+ }
4698
+ //#endregion
4699
+ //#region src/adapters/dsh-storage/learning-diagnostic-store.d.ts
4700
+ declare class LearningDiagnosticStore {
4701
+ #private;
4702
+ private readonly main;
4703
+ constructor(main: Run2skillDomain, sidecar: LearningDiagnosticDomain, runMutation?: <T>(operation: () => Promise<T>) => Promise<T>);
4704
+ attach(item: CaptureWorkItemV1, requestOrdinal: 1 | 2, detail: LearningTerminalDetailV1): Promise<{
4705
+ readonly changed: boolean;
4706
+ }>;
4707
+ detailFor(item: CaptureWorkItemV1): LearningTerminalDetailV1 | undefined;
4708
+ deleteWorkItem(workItemId: string): Promise<void>;
4709
+ deleteWorkItemWithinMutation(workItemId: string): Promise<void>;
4710
+ deleteAllWithinMutation(): Promise<void>;
4711
+ cleanupOrphans(): Promise<{
4712
+ readonly deleted: number;
4713
+ }>;
4714
+ verifyReady(): Promise<void>;
4715
+ }
4716
+ //#endregion
4717
+ //#region src/adapters/dsh-session/types.d.ts
4718
+ interface DshSessionHeader {
4719
+ readonly version: number;
4720
+ readonly id: string;
4721
+ readonly createdAt: number;
4722
+ readonly cwd?: string;
4723
+ readonly parentSession?: string;
4724
+ readonly origin?: 'subagent';
4725
+ readonly delegationDepth?: number;
4726
+ readonly agentPreset?: string;
4727
+ }
4728
+ interface DshSessionEvent {
4729
+ readonly type: string;
4730
+ readonly seq: number;
4731
+ readonly time: number;
4732
+ readonly data: unknown;
4733
+ readonly ignorable?: true;
4734
+ }
4735
+ interface DirectUserCoordinate {
4736
+ readonly messageSeq: number;
4737
+ readonly messageId: string;
4738
+ }
4739
+ interface TurnIngressCandidate {
4740
+ readonly header: DshSessionHeader;
4741
+ readonly turn: number;
4742
+ readonly turnStartSeq?: number;
4743
+ readonly turnEndSeq: number;
4744
+ readonly directUserMessages: readonly DirectUserCoordinate[];
4745
+ }
4746
+ interface SessionPersistenceSnapshot {
4747
+ readonly header: DshSessionHeader;
4748
+ readonly revision: string;
4749
+ }
4750
+ interface SessionPersistencePort {
4751
+ listSnapshots(signal?: AbortSignal): Promise<readonly SessionPersistenceSnapshot[]>;
4752
+ readFrom(sessionId: string, fromSeq: number, signal?: AbortSignal): Promise<{
4753
+ readonly meta: DshSessionHeader;
4754
+ readonly events: readonly DshSessionEvent[];
4755
+ }>;
4756
+ }
4757
+ //#endregion
4758
+ //#region src/adapters/dsh-connection/observe-summary-rpc.d.ts
4759
+ type ObserveRpcError = {
4760
+ readonly code: string;
4761
+ readonly message: string;
4762
+ readonly details: Record<string, unknown>;
4763
+ };
4764
+ type ObserveRpcResult<T> = {
4765
+ readonly ok: true;
4766
+ readonly value: T;
4767
+ } | {
4768
+ readonly ok: false;
4769
+ readonly error: ObserveRpcError;
4770
+ };
4771
+ type ObserveSummaryRpcHandler = (endpoint: string, payload: unknown, signal: AbortSignal) => Promise<ObserveRpcResult<unknown>>;
4772
+ interface ObserveSummaryHostConnection {
4773
+ readonly rpc: {
4774
+ handle(channel: string, handler: ObserveSummaryRpcHandler, options: {
4775
+ readonly authority: 'loopback';
4776
+ }): () => Promise<void>;
4777
+ };
4778
+ }
4779
+ //#endregion
4780
+ //#region src/application/automatic-learning-policy.d.ts
4781
+ interface AutomaticLearningSnapshot {
4782
+ readonly automaticLearning: boolean;
4783
+ }
4784
+ interface AutomaticLearningPolicyPort {
4785
+ snapshot(): AutomaticLearningSnapshot;
4786
+ }
4787
+ //#endregion
4788
+ //#region src/domain/purge/schemas.d.ts
4789
+ declare const PurgeScopeBindingV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4790
+ scope: z.ZodLiteral<"PROJECT">;
4791
+ workspaceId: z.ZodString;
4792
+ canonicalWorkspacePath: z.ZodString;
4793
+ workspaceObservedAt: z.ZodString;
4794
+ canonicalRootPath: z.ZodString;
4795
+ rootContractVersion: z.ZodLiteral<"stock-dsh-web-default-roots-v1">;
4796
+ resolverVersion: z.ZodLiteral<"stock-root-resolver-v2">;
4797
+ resolutionContractDigest: z.ZodString;
4798
+ }, z.core.$strict>, z.ZodObject<{
4799
+ scope: z.ZodLiteral<"USER">;
4800
+ }, z.core.$strict>, z.ZodObject<{
4801
+ scope: z.ZodLiteral<"ALL">;
4802
+ }, z.core.$strict>], "scope">;
4803
+ declare const PurgePhaseV1Schema: z.ZodEnum<{
4804
+ HIDING: "HIDING";
4805
+ DELETING_LINEAGES: "DELETING_LINEAGES";
4806
+ DELETING_WORK_ITEMS: "DELETING_WORK_ITEMS";
4807
+ VERIFYING: "VERIFYING";
4808
+ }>;
4809
+ declare const PurgeJournalV1Schema: z.ZodObject<{
4810
+ schemaVersion: z.ZodLiteral<1>;
4811
+ purgeId: z.ZodString;
4812
+ scopeBinding: z.ZodDiscriminatedUnion<[z.ZodObject<{
1475
4813
  scope: z.ZodLiteral<"PROJECT">;
1476
4814
  workspaceId: z.ZodString;
1477
4815
  canonicalWorkspacePath: z.ZodString;
@@ -1482,6 +4820,8 @@ declare const PurgeJournalV1Schema: z.ZodObject<{
1482
4820
  resolutionContractDigest: z.ZodString;
1483
4821
  }, z.core.$strict>, z.ZodObject<{
1484
4822
  scope: z.ZodLiteral<"USER">;
4823
+ }, z.core.$strict>, z.ZodObject<{
4824
+ scope: z.ZodLiteral<"ALL">;
1485
4825
  }, z.core.$strict>], "scope">;
1486
4826
  hideBefore: z.ZodString;
1487
4827
  candidateDigest: z.ZodString;
@@ -1494,23 +4834,61 @@ declare const PurgeJournalV1Schema: z.ZodObject<{
1494
4834
  }>;
1495
4835
  deletedWorkItems: z.ZodNumber;
1496
4836
  deletedLineages: z.ZodNumber;
4837
+ targetWorkItems: z.ZodOptional<z.ZodNumber>;
4838
+ targetLineages: z.ZodOptional<z.ZodNumber>;
1497
4839
  lastError: z.ZodOptional<z.ZodObject<{
1498
4840
  code: z.ZodString;
1499
4841
  occurredAt: z.ZodString;
1500
4842
  }, z.core.$strict>>;
1501
4843
  }, z.core.$strict>;
4844
+ type PurgeScopeBindingV1 = z.infer<typeof PurgeScopeBindingV1Schema>;
4845
+ type PurgePhaseV1 = z.infer<typeof PurgePhaseV1Schema>;
1502
4846
  type PurgeJournalV1 = z.infer<typeof PurgeJournalV1Schema>;
1503
4847
  //#endregion
4848
+ //#region src/domain/purge/scope.d.ts
4849
+ type PurgeClassification = 'DELETE' | 'KEEP_NEW' | 'KEEP_SCOPE' | 'KEEP_UNPROVEN';
4850
+ //#endregion
1504
4851
  //#region src/adapters/dsh-storage/purge-visibility.d.ts
1505
4852
  declare class PurgeVisibility {
1506
4853
  private readonly domain;
1507
4854
  constructor(domain: Run2skillDomain);
4855
+ revision(): `visibility_${string}`;
1508
4856
  active(): PurgeJournalV1 | undefined;
1509
4857
  workItemWasPurged(item: CaptureWorkItemV1): boolean;
1510
4858
  workItemVisible(item: CaptureWorkItemV1): boolean;
1511
4859
  lineageVisible(lineage: LineageV1): boolean;
1512
4860
  }
1513
4861
  //#endregion
4862
+ //#region src/application/capture/runtime-notices.d.ts
4863
+ interface RuntimeNoticeInput {
4864
+ readonly healthCode: string;
4865
+ readonly sessionId: string;
4866
+ readonly turnEndSeq?: number;
4867
+ readonly signalClass?: 'EXPLICIT_SAVE' | 'OTHER_HIGH';
4868
+ }
4869
+ type RuntimeNoticeKind = 'HEALTH' | 'UNSAVED_SIGNAL';
4870
+ interface RuntimeNotice extends RuntimeNoticeInput {
4871
+ readonly kind: RuntimeNoticeKind;
4872
+ readonly count: number;
4873
+ readonly firstObservedAt: number;
4874
+ readonly lastObservedAt: number;
4875
+ readonly requiresAttention: boolean;
4876
+ }
4877
+ declare class RuntimeNotices {
4878
+ #private;
4879
+ constructor(options?: {
4880
+ now?: () => number;
4881
+ limit?: number;
4882
+ aggregationWindowMs?: number;
4883
+ });
4884
+ record(input: RuntimeNoticeInput): void;
4885
+ recordUnsaved(input: RuntimeNoticeInput): void;
4886
+ unsavedCompletenessKnown(): boolean;
4887
+ clearSignal(sessionId: string, turnEndSeq: number): void;
4888
+ markUnsavedAttention(sessionId: string, turnEndSeq: number): void;
4889
+ list(): readonly RuntimeNotice[];
4890
+ }
4891
+ //#endregion
1514
4892
  //#region src/adapters/dsh-workspace/binding.d.ts
1515
4893
  interface DshWorkspaceProjection {
1516
4894
  readonly id: string;
@@ -1522,70 +4900,73 @@ interface DshWorkspaceRegistryPort {
1522
4900
  get?(id: string): DshWorkspaceProjection | undefined;
1523
4901
  }
1524
4902
  //#endregion
1525
- //#region src/application/learn/learning-worker.d.ts
1526
- type LearningAgent = object & AgentScopeProjection;
1527
- interface LearningSkillView<TAgent extends LearningAgent> {
1528
- readonly cwd?: string;
1529
- readonly scope: TAgent;
1530
- readonly signal: AbortSignal;
1531
- }
1532
- //#endregion
1533
- //#region src/adapters/dsh-skills/stock-root-contract.d.ts
1534
- interface StockSkillRuntimeConfiguration {
1535
- readonly profile: string;
1536
- readonly presetId?: string | undefined;
1537
- readonly providerName: string;
1538
- readonly includeDefaultRoots: boolean;
1539
- readonly customSkillDirs: readonly string[];
1540
- readonly configuredDshHome?: string | undefined;
1541
- }
1542
- interface StockFiberProjection {
1543
- readonly parent: {
1544
- readonly fiber: StockFiberProjection;
1545
- };
1546
- readonly config: unknown;
1547
- }
1548
- interface StockPluginRuntimeProjection {
1549
- readonly name?: string | undefined;
1550
- readonly fibers: Iterable<StockFiberProjection>;
4903
+ //#region src/application/capture/bounded-gap-scanner.d.ts
4904
+ interface GapScanMetrics {
4905
+ readonly processedSessions: number;
4906
+ readonly processedEvents: number;
4907
+ readonly maxReadFromLatencyMs: number;
4908
+ readonly peakHeapBytes: number;
1551
4909
  }
1552
- interface StockPresetMountProjection {
1553
- readonly presetId: string;
1554
- readonly fiber: StockFiberProjection;
1555
- }
1556
- interface StockPresetMountPort {
1557
- standingMountFor(agentContext: object): StockPresetMountProjection | undefined | Promise<StockPresetMountProjection | undefined>;
1558
- }
1559
- interface StockComposedAgentProjection {
1560
- readonly ctx: {
1561
- readonly registry: {
1562
- values(): Iterable<StockPluginRuntimeProjection>;
1563
- };
4910
+ type GapScanResult = GapScanMetrics & ({
4911
+ readonly status: 'COMPLETE';
4912
+ } | {
4913
+ readonly status: 'MORE';
4914
+ readonly cursor: {
4915
+ readonly lifecycleKey: string;
4916
+ readonly nextSeq: number;
1564
4917
  };
4918
+ } | {
4919
+ readonly status: 'UNAVAILABLE';
4920
+ readonly healthCode: string;
4921
+ });
4922
+ //#endregion
4923
+ //#region src/application/capture/recovery-lifecycle.d.ts
4924
+ interface RecoveryScannerPort {
4925
+ ensureActivated(signal?: AbortSignal): Promise<GapScanResult>;
4926
+ scanBatch(signal?: AbortSignal): Promise<GapScanResult>;
4927
+ }
4928
+ interface RecoveryRuntime<Candidate = TurnIngressCandidate> {
4929
+ readonly scanner: RecoveryScannerPort;
4930
+ processCandidate(candidate: Candidate): Promise<void>;
4931
+ close(): Promise<void>;
4932
+ }
4933
+ interface RecoveryRuntimeFactory<Candidate = TurnIngressCandidate> {
4934
+ open(): Promise<RecoveryRuntime<Candidate>>;
1565
4935
  }
1566
- interface StockAgentPresetObservationPort {
1567
- composedPreset(agentContext: object): string | undefined;
1568
- resolve(id: string): Promise<{
1569
- readonly id: string;
1570
- readonly trust: 'system' | 'user';
1571
- }>;
1572
- read(id: string): Promise<string>;
1573
- }
1574
- declare function resolvePinnedStockPresetConfiguration(presets: StockAgentPresetObservationPort, agent: {
1575
- readonly ctx: object;
1576
- }, expectedDigests?: Readonly<Record<'standard' | 'code', string>>): Promise<StockSkillRuntimeConfiguration | undefined>;
1577
- /** Reads the exact stock filesystem fiber mounted for one Agent's joined generation. */
1578
- declare function resolveStockSkillRuntimeConfiguration(mounts: StockPresetMountPort, agent: StockComposedAgentProjection): Promise<StockSkillRuntimeConfiguration | undefined>;
1579
4936
  //#endregion
1580
- //#region src/adapters/dsh-settings/automatic-learning.d.ts
1581
- interface DshSettingsScope<T> {
1582
- get(): T;
1583
- watch(callback: (next: T, previous: T) => void | Promise<void>): () => void;
4937
+ //#region src/application/learn/learning-scheduler.d.ts
4938
+ interface LearningSchedulerStore {
4939
+ recoverInterrupted(): Promise<readonly CaptureWorkItemV1[]>;
4940
+ resumeAvailableAgentScopes(available: (item: CaptureWorkItemV1) => boolean): Promise<readonly CaptureWorkItemV1[]>;
4941
+ listEligible(now: string): readonly CaptureWorkItemV1[];
4942
+ nextEligibleAt(now: string): string | undefined;
1584
4943
  }
1585
- interface DshSettingsPort {
1586
- register<T>(namespace: string, schema: z$1<T>, options: {
1587
- readonly applies: 'live';
1588
- }): DshSettingsScope<T>;
4944
+ interface LearningWorkerPort {
4945
+ canResolveScope(item: CaptureWorkItemV1): boolean;
4946
+ run(item: CaptureWorkItemV1, signal: AbortSignal, settings: AutomaticLearningSnapshot): Promise<void>;
4947
+ }
4948
+ interface LearningSchedulerOptions {
4949
+ readonly store: LearningSchedulerStore;
4950
+ readonly worker: LearningWorkerPort;
4951
+ readonly policy: AutomaticLearningPolicyPort;
4952
+ readonly notices: RuntimeNotices;
4953
+ readonly now?: () => number;
4954
+ }
4955
+ declare class LearningScheduler {
4956
+ #private;
4957
+ constructor(options: LearningSchedulerOptions);
4958
+ start(): Promise<void>;
4959
+ wake(): void;
4960
+ abortMatching(predicate: (item: CaptureWorkItemV1) => boolean): void;
4961
+ dispose(): Promise<void>;
4962
+ }
4963
+ //#endregion
4964
+ //#region src/application/learn/learning-worker.d.ts
4965
+ type LearningAgent = object & AgentScopeProjection;
4966
+ interface LearningSkillView<TAgent extends LearningAgent> {
4967
+ readonly cwd?: string;
4968
+ readonly scope: TAgent;
4969
+ readonly signal: AbortSignal;
1589
4970
  }
1590
4971
  //#endregion
1591
4972
  //#region src/domain/review/schemas.d.ts
@@ -1799,71 +5180,6 @@ declare const ProposalRefV1Schema: z.ZodObject<{
1799
5180
  }, z.core.$strict>;
1800
5181
  type ProposalRefV1 = z.infer<typeof ProposalRefV1Schema>;
1801
5182
  //#endregion
1802
- //#region src/adapters/dsh-publication/filesystem-cas.d.mts
1803
- interface PublicationResult {
1804
- readonly status: 'written' | 'conflict' | 'finalized';
1805
- readonly code?: string;
1806
- readonly txid: string;
1807
- readonly target?: string;
1808
- readonly backup?: string | null;
1809
- }
1810
- interface PublicationHooks {
1811
- readonly beforeInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1812
- readonly beforeBackupMove?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1813
- readonly beforeBackupRename?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1814
- readonly afterInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
1815
- }
1816
- interface RootPreparation {
1817
- readonly root: string;
1818
- readonly createdSegments: readonly string[];
1819
- readonly rootIdentityDigest: string;
1820
- }
1821
- declare class PublicationConflict extends Error {
1822
- readonly code: string;
1823
- constructor(code: string, message: string);
1824
- }
1825
- declare function preparePublicationRoot(input: {
1826
- readonly binding: RootBindingV2;
1827
- readonly verifyIdentity: (canonicalPath: string, identityDigest: string) => Promise<boolean>;
1828
- readonly verifyParity: (binding: RootBindingV2, canonicalRoot: string) => Promise<boolean>;
1829
- readonly crashAt?: string;
1830
- }): Promise<RootPreparation>;
1831
- declare function createBundle(input: {
1832
- readonly root: string;
1833
- readonly name: string;
1834
- readonly txid: string;
1835
- readonly nextBytes: string | Uint8Array;
1836
- readonly rootPreparation?: RootPreparation;
1837
- readonly crashAt?: string;
1838
- readonly hooks?: PublicationHooks;
1839
- }): Promise<PublicationResult>;
1840
- declare function mergeBundle(input: {
1841
- readonly root: string;
1842
- readonly name: string;
1843
- readonly txid: string;
1844
- readonly expectedHash: string;
1845
- readonly nextBytes: string | Uint8Array;
1846
- readonly rootPreparation?: RootPreparation;
1847
- readonly crashAt?: string;
1848
- readonly hooks?: PublicationHooks;
1849
- }): Promise<PublicationResult>;
1850
- declare function recoverTransaction(input: {
1851
- readonly root: string;
1852
- readonly txid: string;
1853
- }): Promise<PublicationResult>;
1854
- declare function finalizeTransaction(input: {
1855
- readonly root: string;
1856
- readonly txid: string;
1857
- readonly confirmedExactReadback: true;
1858
- }): Promise<PublicationResult>;
1859
- //#endregion
1860
- //#region src/adapters/dsh-publication/target-single-flight.d.ts
1861
- declare class PublicationTargetSingleFlight {
1862
- #private;
1863
- run<T>(canonicalTargetPath: string, task: () => Promise<T>): Promise<T>;
1864
- get activeTargetCount(): number;
1865
- }
1866
- //#endregion
1867
5183
  //#region src/adapters/dsh-storage/publication-saga-store.d.ts
1868
5184
  type FailureOutcome = 'NEEDS_ATTENTION' | 'NEEDS_REFRESH' | 'PUBLISH_FAILED';
1869
5185
  declare class PublicationSagaStore {
@@ -2002,11 +5318,311 @@ declare class PublicationScheduler {
2002
5318
  dispose(): Promise<void>;
2003
5319
  }
2004
5320
  //#endregion
5321
+ //#region src/application/review/v2-proposal-review.d.ts
5322
+ interface V2ProposalRef {
5323
+ readonly proposalId: string;
5324
+ readonly revision: number;
5325
+ readonly digest: string;
5326
+ }
5327
+ type V2ProposalReviewRevalidation = {
5328
+ readonly status: 'CURRENT';
5329
+ readonly runtimeCatalogDigest: string;
5330
+ readonly pendingCatalogDigest: string;
5331
+ readonly catalogEpoch: number;
5332
+ readonly catalogMutationReceiptDigest: string;
5333
+ } | {
5334
+ readonly status: 'STALE' | 'UNAVAILABLE';
5335
+ };
5336
+ //#endregion
5337
+ //#region src/application/publication/v2-proposal-publication.d.ts
5338
+ type NativeProposalLineageV2 = Extract<ProposalLineageV2, {
5339
+ readonly origin: 'RUN2SKILL_V2';
5340
+ }>;
5341
+ type NativeProposalRevisionV2 = NativeProposalLineageV2['proposalRevisions'][number];
5342
+ interface V2ProposalPublicationRequest {
5343
+ readonly lineageId: string;
5344
+ readonly expectedLineageRevision: number;
5345
+ readonly proposalRef: V2ProposalRef;
5346
+ }
5347
+ type V2ProposalPublicationOutcome = {
5348
+ readonly status: 'PUBLISHED';
5349
+ readonly externalReceiptDigest: string;
5350
+ } | {
5351
+ readonly status: 'STALE' | 'UNAVAILABLE' | 'CONFLICT';
5352
+ };
5353
+ type V2ProposalPublicationRecoveryOutcome = V2ProposalPublicationOutcome | {
5354
+ readonly status: 'ABSENT';
5355
+ };
5356
+ interface V2ProposalPublicationInput {
5357
+ readonly lineage: NativeProposalLineageV2;
5358
+ readonly proposal: NativeProposalRevisionV2;
5359
+ readonly proposalRef: V2ProposalRef;
5360
+ readonly intent: ExperienceIntentV2;
5361
+ readonly batch: SessionBatchV2;
5362
+ }
5363
+ interface V2ProposalPublicationOptions {
5364
+ revalidate(input: V2ProposalPublicationInput): Promise<V2ProposalReviewRevalidation>;
5365
+ /** Recover an existing attempt only. ABSENT must guarantee that no external transaction exists. */
5366
+ recover?(input: V2ProposalPublicationInput & {
5367
+ readonly attemptId: string;
5368
+ }): Promise<unknown>;
5369
+ publish(input: V2ProposalPublicationInput & {
5370
+ readonly attemptId: string;
5371
+ }): Promise<unknown>;
5372
+ readonly now?: () => string;
5373
+ }
5374
+ interface V2ProposalPublicationResult {
5375
+ readonly changed: boolean;
5376
+ readonly state: 'PUBLISHED' | 'NEEDS_ATTENTION';
5377
+ readonly lineage: NativeProposalLineageV2;
5378
+ }
5379
+ declare class V2ProposalPublicationError extends Error {
5380
+ readonly code: 'PUBLICATION_LINEAGE_NOT_FOUND' | 'PUBLICATION_REVISION_CONFLICT' | 'STALE_PROPOSAL_REF' | 'INVALID_PUBLICATION_STATE' | 'PUBLICATION_INPUT_UNAVAILABLE' | 'PUBLICATION_BUSY' | 'PUBLICATION_RECOVERY_CONFLICT';
5381
+ constructor(code: 'PUBLICATION_LINEAGE_NOT_FOUND' | 'PUBLICATION_REVISION_CONFLICT' | 'STALE_PROPOSAL_REF' | 'INVALID_PUBLICATION_STATE' | 'PUBLICATION_INPUT_UNAVAILABLE' | 'PUBLICATION_BUSY' | 'PUBLICATION_RECOVERY_CONFLICT');
5382
+ }
5383
+ /**
5384
+ * Publishes one approved native v2 Proposal behind a durable Catalog mutation
5385
+ * fence. The filesystem port must use attemptId as an idempotency key and
5386
+ * return success only after exact readback.
5387
+ */
5388
+ declare class V2ProposalPublicationCoordinator {
5389
+ #private;
5390
+ private readonly domain;
5391
+ private readonly options;
5392
+ constructor(domain: Run2skillV2Domain, options: V2ProposalPublicationOptions);
5393
+ publish(request: V2ProposalPublicationRequest): Promise<V2ProposalPublicationResult>;
5394
+ recover(): Promise<'IDLE' | 'RECOVERED'>;
5395
+ }
5396
+ //#endregion
5397
+ //#region src/adapters/dsh-skills/stock-root-contract.d.ts
5398
+ interface StockSkillRuntimeConfiguration {
5399
+ readonly profile: string;
5400
+ readonly presetId?: string | undefined;
5401
+ readonly providerName: string;
5402
+ readonly includeDefaultRoots: boolean;
5403
+ readonly customSkillDirs: readonly string[];
5404
+ readonly configuredDshHome?: string | undefined;
5405
+ readonly configuredAgentsHome?: string | undefined;
5406
+ readonly configuredBundledSkillDir?: string | undefined;
5407
+ readonly usesContextFileSystem?: true | undefined;
5408
+ }
5409
+ interface StockFiberProjection {
5410
+ readonly parent: {
5411
+ readonly fiber: StockFiberProjection;
5412
+ };
5413
+ readonly config: unknown;
5414
+ }
5415
+ interface StockPluginRuntimeProjection {
5416
+ readonly name?: string | undefined;
5417
+ readonly fibers: Iterable<StockFiberProjection>;
5418
+ }
5419
+ interface StockPresetMountProjection {
5420
+ readonly presetId: string;
5421
+ readonly fiber: StockFiberProjection;
5422
+ }
5423
+ interface StockPresetMountPort {
5424
+ standingMountFor(agentContext: object): StockPresetMountProjection | undefined | Promise<StockPresetMountProjection | undefined>;
5425
+ }
5426
+ interface StockComposedAgentProjection {
5427
+ readonly ctx: {
5428
+ readonly registry: {
5429
+ values(): Iterable<StockPluginRuntimeProjection>;
5430
+ };
5431
+ readonly get?: (name: string) => unknown;
5432
+ };
5433
+ }
5434
+ interface StockAgentPresetObservationPort {
5435
+ composedPreset(agentContext: object): string | undefined;
5436
+ resolve(id: string): Promise<{
5437
+ readonly id: string;
5438
+ readonly trust: 'system' | 'user';
5439
+ }>;
5440
+ read(id: string): Promise<string>;
5441
+ }
5442
+ declare function resolvePinnedStockPresetConfiguration(presets: StockAgentPresetObservationPort, agent: {
5443
+ readonly ctx: object;
5444
+ }, expectedDigests?: Readonly<Record<'standard' | 'code', readonly string[]>>): Promise<StockSkillRuntimeConfiguration | undefined>;
5445
+ /** Reads the exact stock filesystem fiber mounted for one Agent's joined generation. */
5446
+ declare function resolveStockSkillRuntimeConfiguration(mounts: StockPresetMountPort, agent: StockComposedAgentProjection): Promise<StockSkillRuntimeConfiguration | undefined>;
5447
+ //#endregion
5448
+ //#region src/adapters/dsh-settings/automatic-learning.d.ts
5449
+ interface DshSettingsScope<T> {
5450
+ get(): T;
5451
+ watch(callback: (next: T, previous: T) => void | Promise<void>): () => void;
5452
+ }
5453
+ interface DshSettingsPort {
5454
+ register<T>(namespace: string, schema: z$1<T>, options: {
5455
+ readonly applies: 'live';
5456
+ }): DshSettingsScope<T>;
5457
+ }
5458
+ interface AutomaticLearningSettingsPolicy extends AutomaticLearningPolicyPort {
5459
+ watch(callback: (next: AutomaticLearningSnapshot, previous: AutomaticLearningSnapshot) => void | Promise<void>): () => void;
5460
+ }
5461
+ //#endregion
5462
+ //#region src/application/purge/purge-service.d.ts
5463
+ interface PurgePreviewV1 {
5464
+ readonly apiVersion: 1;
5465
+ readonly previewId: string;
5466
+ readonly digest: string;
5467
+ readonly expiresAt: string;
5468
+ readonly scopeBinding: PurgeScopeBindingV1;
5469
+ readonly hideBefore: string;
5470
+ readonly workItemCount: number;
5471
+ readonly lineageCount: number;
5472
+ readonly derivedRecordCount: number;
5473
+ readonly blockedOrUnprovenCount: number;
5474
+ readonly willDelete: readonly {
5475
+ readonly kind: 'WORK_ITEMS' | 'LINEAGES';
5476
+ readonly count: number;
5477
+ }[];
5478
+ readonly willKeep: readonly {
5479
+ readonly reason: Exclude<PurgeClassification, 'DELETE'>;
5480
+ readonly count: number;
5481
+ }[];
5482
+ readonly busyPublicationCount: number;
5483
+ }
5484
+ type PurgeReceiptV1 = {
5485
+ readonly apiVersion: 1;
5486
+ readonly purgeId: string;
5487
+ readonly state: 'COMPLETED' | 'IN_PROGRESS';
5488
+ readonly phase?: PurgePhaseV1;
5489
+ readonly deletedWorkItems: number;
5490
+ readonly deletedLineages: number;
5491
+ };
5492
+ type PurgeStatusV1 = {
5493
+ readonly apiVersion: 1;
5494
+ readonly state: 'IDLE';
5495
+ } | ({
5496
+ readonly apiVersion: 1;
5497
+ readonly state: 'IN_PROGRESS';
5498
+ } & Omit<PurgeJournalV1, 'schemaVersion' | 'scopeBinding' | 'candidateDigest'>);
5499
+ type PurgeConfirmationScope = {
5500
+ readonly scope: 'ALL';
5501
+ } | {
5502
+ readonly scope: 'USER';
5503
+ } | {
5504
+ readonly scope: 'PROJECT';
5505
+ readonly workspaceId: string;
5506
+ };
5507
+ interface PurgeScopeResolver {
5508
+ resolve(scope: 'PROJECT' | 'USER', workspaceId?: string): Promise<PurgeScopeBindingV1>;
5509
+ }
5510
+ interface PurgeServiceOptions {
5511
+ readonly now?: () => number;
5512
+ readonly previewTtlMs?: number;
5513
+ readonly onHidden?: (journal: PurgeJournalV1) => void | Promise<void>;
5514
+ readonly onPhasePersisted?: (phase: PurgePhaseV1) => void | Promise<void>;
5515
+ readonly beforeDeleteWorkItem?: (workItemId: string) => void | Promise<void>;
5516
+ readonly beforeDeleteAll?: () => void | Promise<void>;
5517
+ readonly assertDeletionReady?: () => void | Promise<void>;
5518
+ readonly v2Domain?: Run2skillV2Domain;
5519
+ }
5520
+ declare class PurgeService {
5521
+ #private;
5522
+ private readonly domain;
5523
+ private readonly scopeResolver;
5524
+ constructor(domain: Run2skillDomain, scopeResolver: PurgeScopeResolver, options?: PurgeServiceOptions);
5525
+ preview(scope: 'ALL' | 'PROJECT' | 'USER', workspaceId?: string): Promise<PurgePreviewV1>;
5526
+ confirm(previewId: string, digest: string, confirmationScope?: PurgeConfirmationScope): Promise<PurgeReceiptV1>;
5527
+ status(): PurgeStatusV1;
5528
+ recover(): Promise<PurgeReceiptV1 | undefined>;
5529
+ retry(purgeId: string): Promise<PurgeReceiptV1>;
5530
+ }
5531
+ //#endregion
5532
+ //#region src/application/migration/legacy-source-cutover-gate.d.ts
5533
+ /**
5534
+ * Serializes every legacy mutation with the v1 -> v2 cutover and permanently
5535
+ * rejects v1 writes after a successful migration commit.
5536
+ */
5537
+ declare class LegacySourceCutoverGate {
5538
+ #private;
5539
+ get state(): 'ACCEPTING' | 'CUTTING_OVER' | 'SEALED';
5540
+ runLegacyMutation<T>(operation: () => T | Promise<T>): Promise<T>;
5541
+ sealAndRun<T>(operation: () => T | Promise<T>, durableCommitObserved?: () => boolean): Promise<T>;
5542
+ }
5543
+ //#endregion
5544
+ //#region src/application/host-mutation-gate.d.ts
5545
+ declare class HostMutationGate extends LegacySourceCutoverGate {
5546
+ run<T>(operation: () => Promise<T>): Promise<T>;
5547
+ }
5548
+ //#endregion
5549
+ //#region src/adapters/dsh-publication/filesystem-cas.d.mts
5550
+ interface PublicationResult {
5551
+ readonly status: 'written' | 'conflict' | 'finalized';
5552
+ readonly code?: string;
5553
+ readonly txid: string;
5554
+ readonly target?: string;
5555
+ readonly backup?: string | null;
5556
+ }
5557
+ interface PublicationHooks {
5558
+ readonly beforeInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
5559
+ readonly beforeBackupMove?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
5560
+ readonly beforeBackupRename?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
5561
+ readonly afterInstall?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
5562
+ readonly afterBackupRemoval?: (record: Readonly<Record<string, unknown>>) => Promise<void>;
5563
+ }
5564
+ interface RootPreparation {
5565
+ readonly root: string;
5566
+ readonly createdSegments: readonly string[];
5567
+ readonly rootIdentityDigest: string;
5568
+ }
5569
+ declare class PublicationConflict extends Error {
5570
+ readonly code: string;
5571
+ constructor(code: string, message: string);
5572
+ }
5573
+ declare function preparePublicationRoot(input: {
5574
+ readonly binding: RootBindingV2;
5575
+ readonly verifyIdentity: (canonicalPath: string, identityDigest: string) => Promise<boolean>;
5576
+ readonly verifyParity: (binding: RootBindingV2, canonicalRoot: string, rootIdentityDigest: string) => Promise<boolean>;
5577
+ readonly crashAt?: string;
5578
+ }): Promise<RootPreparation>;
5579
+ declare function createBundle(input: {
5580
+ readonly root: string;
5581
+ readonly name: string;
5582
+ readonly txid: string;
5583
+ readonly nextBytes: string | Uint8Array;
5584
+ readonly rootPreparation?: RootPreparation;
5585
+ readonly crashAt?: string;
5586
+ readonly hooks?: PublicationHooks;
5587
+ }): Promise<PublicationResult>;
5588
+ declare function mergeBundle(input: {
5589
+ readonly root: string;
5590
+ readonly name: string;
5591
+ readonly txid: string;
5592
+ readonly expectedHash: string;
5593
+ readonly nextBytes: string | Uint8Array;
5594
+ readonly rootPreparation?: RootPreparation;
5595
+ readonly crashAt?: string;
5596
+ readonly hooks?: PublicationHooks;
5597
+ }): Promise<PublicationResult>;
5598
+ declare function recoverTransaction(input: {
5599
+ readonly root: string;
5600
+ readonly txid: string;
5601
+ }): Promise<PublicationResult>;
5602
+ declare function finalizeTransaction(input: {
5603
+ readonly root: string;
5604
+ readonly txid: string;
5605
+ readonly confirmedExactReadback: true;
5606
+ readonly crashAt?: string;
5607
+ readonly hooks?: PublicationHooks;
5608
+ }): Promise<PublicationResult>;
5609
+ //#endregion
5610
+ //#region src/adapters/dsh-publication/target-single-flight.d.ts
5611
+ declare class PublicationTargetSingleFlight {
5612
+ #private;
5613
+ run<T>(canonicalTargetPath: string, task: () => Promise<T>): Promise<T>;
5614
+ get activeTargetCount(): number;
5615
+ }
5616
+ //#endregion
2005
5617
  //#region src/host/index.d.ts
2006
5618
  declare const name = "run2skill";
2007
- declare const inject: readonly ["sessions", "sessionPersistence", "storageDomain", "workspaceRegistry", "connection", "llm", "skills", "settings", "agentPresets"];
5619
+ declare const inject: readonly ["agents", "sessions", "sessionPersistence", "storageDomain", "workspaceRegistry", "connection", "llm", "skills", "settings", "agentPresets", "fs"];
2008
5620
  type Run2skillAgent = object & AgentScopeProjection & Parameters<typeof resolveStockSkillRuntimeConfiguration>[1];
5621
+ type Run2skillAgentPresets = Parameters<typeof resolvePinnedStockPresetConfiguration>[0] & {
5622
+ standingKeyFor(id?: string): Promise<object>;
5623
+ };
2009
5624
  interface Run2skillHostContext extends Run2skillStorageContext {
5625
+ readonly agents: unknown;
2010
5626
  readonly sessions: unknown;
2011
5627
  readonly sessionPersistence: SessionPersistencePort;
2012
5628
  readonly workspaceRegistry: DshWorkspaceRegistryPort;
@@ -2014,9 +5630,33 @@ interface Run2skillHostContext extends Run2skillStorageContext {
2014
5630
  readonly llm: DshLlmPort;
2015
5631
  readonly skills: DshSkillRegistryPort<LearningSkillView<Run2skillAgent>>;
2016
5632
  readonly settings: DshSettingsPort;
2017
- readonly agentPresets: Parameters<typeof resolvePinnedStockPresetConfiguration>[0];
5633
+ readonly agentPresets: Run2skillAgentPresets;
5634
+ /** Host-plane DSH filesystem used by the supported web presets. */
5635
+ readonly fs: unknown;
2018
5636
  on(event: string, listener: (...args: never[]) => unknown): void;
2019
5637
  }
5638
+ declare class Run2skillRuntimeFactory implements RecoveryRuntimeFactory {
5639
+ #private;
5640
+ private readonly context;
5641
+ private readonly notices;
5642
+ private readonly scopes;
5643
+ private readonly automaticLearning;
5644
+ private readonly mutationGate;
5645
+ currentDomain: Run2skillDomain | undefined;
5646
+ currentScheduler: LearningScheduler | undefined;
5647
+ currentPublicationScheduler: PublicationScheduler | undefined;
5648
+ currentPurgeService: PurgeService | undefined;
5649
+ currentDiagnosticStore: LearningDiagnosticStore | undefined;
5650
+ constructor(context: Run2skillHostContext, notices: RuntimeNotices, scopes: ExactAgentScopeRegistry<Run2skillAgent>, automaticLearning: AutomaticLearningSettingsPolicy, mutationGate: HostMutationGate);
5651
+ wakeLearning(): void;
5652
+ wakePublication(): void;
5653
+ wakeCuration(): void;
5654
+ captureRootConfiguration(agent: Run2skillAgent): Promise<void>;
5655
+ releaseRootConfiguration(agent: Run2skillAgent): void;
5656
+ currentCurationWake: (() => void) | undefined;
5657
+ resolvePurgeScope(scope: 'PROJECT' | 'USER', workspaceId?: string): Promise<PurgeScopeBindingV1>;
5658
+ open(): Promise<RecoveryRuntime>;
5659
+ }
2020
5660
  declare function apply(context: Run2skillHostContext): Promise<() => Promise<void>>;
2021
5661
  //#endregion
2022
- 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 };
5662
+ export { ApprovalPublicationSaga, ApprovalPublicationSagaOptions, ApprovedProposalRevalidator, PublicationConflict, PublicationFileSystemPort, PublicationFileSystemResult, PublicationReadbackPort, PublicationReadbackResult, PublicationRevalidationPort, PublicationRevalidationResult, PublicationRootPreparation, PublicationScheduler, PublicationSchedulerOptions, PublicationSingleFlightPort, PublicationTargetSingleFlight, PublicationWorkerPort, Run2skillHostContext, Run2skillRuntimeFactory, V2ProposalPublicationCoordinator, V2ProposalPublicationError, V2ProposalPublicationInput, V2ProposalPublicationOptions, V2ProposalPublicationOutcome, V2ProposalPublicationRecoveryOutcome, V2ProposalPublicationRequest, V2ProposalPublicationResult, apply, createBundle, finalizeTransaction, inject, mergeBundle, name, preparePublicationRoot, recoverTransaction };