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