import { type ParticipantBindingEpoch, type StoreValidationResult, type WorkerGeneration } from "./canonical.ts"; import { type LegacyWorkerMigrationInputV1, type LegacyWorkerState, type MigratedWorkerRecordV2, type ParticipantState } from "./boss-participant-state.ts"; export declare const FULL_WORKER_STORE_MIGRATION_VERSION: 1; export declare const FULL_WORKER_STORE_V2_RECORD_VERSION: "orc.worker-store-record.v2"; export declare const WORKER_STORE_MANAGER_RECIPIENT_CONTEXTS: readonly ["pi", "opencode", "headless_cli"]; export type WorkerStoreManagerRecipientContext = (typeof WORKER_STORE_MANAGER_RECIPIENT_CONTEXTS)[number]; export interface InteractiveOwningManagerRecipientV1 { recipientPrincipalId: string; recipientBindingEpoch: ParticipantBindingEpoch; recipientContext: "pi" | "opencode"; recipientSessionId: string; recipientTargetSessionId?: string; } export interface HeadlessOwningManagerRecipientV1 { recipientPrincipalId: string; recipientBindingEpoch: ParticipantBindingEpoch; recipientContext: "headless_cli"; } export type OwningManagerRecipientV1 = InteractiveOwningManagerRecipientV1 | HeadlessOwningManagerRecipientV1; export interface LegacyWorkerCompatibilityFieldsV1 { environment: { AGENT_INTERCOM_WORKER_ID: string; AGENT_INTERCOM_RUN_ID: string; workspacePath?: string; }; health: { observedLegacyState: LegacyWorkerState; lastConfirmedAt?: string; failureCode?: string; }; runtime: { runtimeId: string; processId?: number; leaseExpiresAt?: string; maxRuntimeAt?: string; }; adapter: { adapterId: string; adapterVersion: string; sessionId?: string; readinessReported: boolean; }; systemd: { unitName: string; activeState: string; subState: string; observedAt: string; }; notice: { pendingNoticeIds: string[]; lastDeliveredNoticeId?: string; owningManagerRecipient: OwningManagerRecipientV1; }; controller: { projectionId?: string; revision: number; }; } export interface FullWorkerStoreMigrationInputV1 extends LegacyWorkerCompatibilityFieldsV1 { version: typeof FULL_WORKER_STORE_MIGRATION_VERSION; worker: LegacyWorkerMigrationInputV1; } export interface WorkerStoreSurfaceIdentityV2 { workerIncarnationId: string; workerGeneration: WorkerGeneration; } export interface WorkerStoreRecordV2 { version: typeof FULL_WORKER_STORE_V2_RECORD_VERSION; worker: MigratedWorkerRecordV2; environment: { AGENT_INTERCOM_WORKER_ID: string; AGENT_INTERCOM_WORKER_INCARNATION_ID: string; AGENT_INTERCOM_WORKER_GENERATION: string; /** Deprecated incarnation alias retained only for the v2 rollout. */ AGENT_INTERCOM_RUN_ID: string; workspacePath?: string; }; health: WorkerStoreSurfaceIdentityV2 & { originalLegacyState: LegacyWorkerState; canonicalState: ParticipantState | null; lastConfirmedAt?: string; failureCode?: string; }; runtime: WorkerStoreSurfaceIdentityV2 & LegacyWorkerCompatibilityFieldsV1["runtime"]; adapter: WorkerStoreSurfaceIdentityV2 & LegacyWorkerCompatibilityFieldsV1["adapter"]; systemd: WorkerStoreSurfaceIdentityV2 & LegacyWorkerCompatibilityFieldsV1["systemd"]; notice: WorkerStoreSurfaceIdentityV2 & LegacyWorkerCompatibilityFieldsV1["notice"]; controller: WorkerStoreSurfaceIdentityV2 & LegacyWorkerCompatibilityFieldsV1["controller"]; compatibilityAudit: { sourceEnvironmentIncarnationField: "AGENT_INTERCOM_RUN_ID"; targetEnvironmentIncarnationField: "AGENT_INTERCOM_WORKER_INCARNATION_ID"; deprecatedEnvironmentAliasLastSupportedVersion: typeof FULL_WORKER_STORE_V2_RECORD_VERSION; bossRunIdDerived: false; preservedFieldGroups: ["environment", "health", "runtime", "adapter", "systemd", "notice", "controller"]; }; } export declare function parseFullWorkerStoreMigrationInputV1(value: unknown): FullWorkerStoreMigrationInputV1; export declare function migrateFullWorkerStoreV1(value: unknown): WorkerStoreRecordV2; export declare function parseWorkerStoreRecordV2(value: unknown): WorkerStoreRecordV2; export declare const validateFullWorkerStoreMigrationInputV1: (value: unknown) => StoreValidationResult; export declare const validateWorkerStoreRecordV2: (value: unknown) => StoreValidationResult; //# sourceMappingURL=worker-store-migration.d.ts.map