import { type WorkflowRun } from '../engine/runtime.js'; import type { ApplicationIdentity, LoadedWorkflowApplication } from './types.js'; /** 只观测通用 SDK Run 的提交锁,不加载或推进应用;普通领域流程不获取此锁。 */ export declare function inspectWorkflowApplicationLocks(projectRoot: string, applicationId: string, runId: string): Promise<{ kind: string; file: string; path: string; status: "missing" | "active" | "stale" | "unknown" | "malformed"; owner: import("../../platform/fs/recoverable-file-lock.js").RecoverableFileLockOwner | null; token: string | null; coordinator?: Array<{ file: string; status: "active" | "unknown" | "malformed"; owner: import("../../platform/fs/recoverable-file-lock.js").RecoverableFileLockOwner | null; token: string; }>; }[]>; export declare function repairWorkflowApplicationLock(projectRoot: string, applicationId: string, runId: string, token: string, confirmedOwnerStopped?: boolean): Promise<"changed" | "removed" | "missing" | "blocked">; export declare function inspectWorkflowApplicationStorageIndex(projectRoot: string, applicationId: string): Promise; export declare function repairWorkflowApplicationStorageIndex(options: { projectRoot: string; applicationId: string; operation: 'audit' | 'rebuild'; expectedEpoch: string; }): Promise; /** Run 内的不可变归属是恢复依据;current 文件只是选择投影。 */ export declare function resolveWorkflowApplicationFile(projectRoot: string, id: string, runId: string): Promise; export declare function loadWorkflowApplication(options: { file: string; projectRoot: string; runId?: string; /** 领域从 portable checkpoint 恢复时,在执行模块加载前核对原固定身份。 */ expectedIdentity?: ApplicationIdentity; /** 显式迁移只请求当前定义;仍先核对同一 Run 的固定身份,不修改保存记录。 */ useLatestDefinition?: boolean; /** 诊断不恢复 Run,也不写回领域投影。 */ readOnly?: boolean; }): Promise; export declare function selectWorkflowApplication(application: LoadedWorkflowApplication, runId: string): Promise; export declare function inspectWorkflowApplicationRun(projectRoot: string, applicationId: string, runId: string, options?: { readOnly?: boolean; }): Promise<{ application: LoadedWorkflowApplication; run: WorkflowRun; }>; /** Hook 只观测固定应用;投影修复与迁移必须通过显式 Runtime 操作。 */ export declare function readSelectedWorkflowApplication(projectRoot: string): Promise<{ application: LoadedWorkflowApplication; run: WorkflowRun; } | null>; /** 保留当前选择的身份,即使固定包或 Run 损坏也不把它显示为没有任务。 */ export declare function inspectSelectedWorkflowApplicationStatus(projectRoot: string): Promise<{ healthy: boolean; application: ApplicationIdentity; run: { history: { actions: number; waits: number; evidenceWaits: number; children: number; outputs: number; }; continuation: { nextRequest?: { runId: string; expectedRevision: number; operation: "next"; } | undefined; instruction: string; actionId?: string | undefined; mode: import("../workflow-contract/output-envelope.js").CliContinuationMode; cwd: string; commandArgs: string[]; requiredInputs: string[]; }; inspection: { commandArgs: string[]; request: { operation: "inspect"; runId: string; }; }; outputs?: WorkflowRun["outputs"]; outputsOmitted?: { count: number; reason: string; request: { operation: "query"; runId: string; view: "history"; filter: "actions"; limit: number; }; }; current: { actions: ({ stopConfirmationRequired: boolean; instruction: string; confirmStoppedRequest: { reason: string; stoppedActions: { actionId: string; attempt: number; inputHash: string; claimToken: string; evidence: string; }[]; runId: string; expectedRevision: number; operation: "cancel"; }; executeRequests?: undefined; claimRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; } | { instruction: string; stopConfirmationRequired?: undefined; confirmStoppedRequest?: undefined; executeRequests?: undefined; claimRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; } | { instruction: string; executeRequests: { actionId: string; executorId: string; runId: string; expectedRevision: number; operation: "execute"; }[]; claimRequest: { actionId: string; attempt: number; inputHash: string; executorId: string; sessionId: string; capabilities: string[]; runId: string; expectedRevision: number; operation: "claim"; }; stopConfirmationRequired?: undefined; confirmStoppedRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; } | { markUnknownRequest: { actionId: string; attempt: number; reason: string; runId: string; expectedRevision: number; operation: "mark-unknown"; }; instruction: string; outcomeRequest: { outcome: { actionId: string; attempt: number; inputHash: string; claimToken: string; outcomeId: string; status: string; output: string; }; runId: string; expectedRevision: number; operation: "record-outcome"; }; stopConfirmationRequired?: undefined; confirmStoppedRequest?: undefined; executeRequests?: undefined; claimRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; } | { instruction: string; outcomeRequest: { outcome: { actionId: string; attempt: number; inputHash: string; claimToken: string; outcomeId: string; status: string; output: string; }; runId: string; expectedRevision: number; operation: "record-outcome"; }; stopConfirmationRequired?: undefined; confirmStoppedRequest?: undefined; executeRequests?: undefined; claimRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; } | { retryRequest: { actionId: string; attempt: number; reconciliation: { resolution: "not-executed"; evidence: null; }; runId: string; expectedRevision: number; operation: "retry"; }; requiredInputs: string[]; instruction: string; outcomeRequest: { outcome: { actionId: string; attempt: number; inputHash: string; claimToken: string; outcomeId: string; status: string; output: string; }; runId: string; expectedRevision: number; operation: "record-outcome"; }; stopConfirmationRequired?: undefined; confirmStoppedRequest?: undefined; executeRequests?: undefined; claimRequest?: undefined; validator?: import("../engine/workflow-definition.js").WorkflowReference | undefined; outputSchema?: import("../engine/runtime-json.js").RuntimeValue | undefined; protocolVersion: 1; id: string; runId: string; stepId: string; type: string; ref?: string; attempt: number; input: import("../engine/runtime-json.js").RuntimeValue; inputHash: string; status: import("../engine/runtime-action.js").RuntimeActionStatus; retry: import("../engine/runtime-action.js").RuntimeRetryPolicy; requiredCapabilities: string[]; claim?: import("../engine/runtime-action.js").RuntimeClaim; executionOrigin?: { workflow: { id: string; version: string; hash: string; }; }; executionStop?: import("../engine/runtime-action.js").RuntimeStoppedAction; outcome?: import("../engine/runtime-action.js").RuntimeOutcome; receipts: { outcomeId: string; hash: string; }[]; rejectedOutcomes?: { outcome: import("../engine/runtime-action.js").RuntimeOutcome; code: "OUTPUT_INVALID" | "OUTCOME_REJECTED" | "OUTCOME_PROCESSING_ERROR"; reason: string; }[]; reconciliations: { attempt: number; resolution: "not-executed"; evidence: import("../engine/runtime-json.js").RuntimeValue; }[]; reason?: string; cancellation?: import("../engine/runtime-action.js").RuntimeStoppedAction; })[]; waits: { resolveRequest: { waitId: string; proposalHash: string; decisionId: string; choice: string; runId: string; expectedRevision: number; operation: "resolve-wait"; }; reviseRequest: { waitId: string; proposalHash: string; proposal: string; runId: string; expectedRevision: number; operation: "revise-wait"; }; instruction: string; decision?: { id: string; choice: string; proposalHash: string; reason?: string; } | undefined; id: string; stepId: string; sequence: number; status: "pending" | "cancelled" | "resolved"; proposal: import("../engine/runtime-json.js").RuntimeValue; proposalHash: string; choices: string[]; }[]; evidenceWaits: { recordRequest: { evidenceId: string; kind: string; ref: string; contentHash: string; submissionId: string; runId: string; expectedRevision: number; operation: "record-evidence"; }; id: string; stepId: string; sequence: number; kind: string; status: "pending" | "resolved" | "invalidated" | "cancelled"; receipt?: { ref: string; contentHash: string; submissionId: string; }; invalidation?: { ref: string; contentHash: string; submissionId: string; reason: string; }; }[]; approvals: { decision?: { id: string; choice: string; proposalHash: string; reason?: string; } | undefined; id: string; stepId: string; sequence: number; status: "pending" | "cancelled" | "resolved"; proposal: import("../engine/runtime-json.js").RuntimeValue; proposalHash: string; choices: string[]; }[]; children: { inspection: { operation: "inspect"; runId: string; }; actionId: string; runId: string; workflow: import("../engine/workflow-run.js").WorkflowRef; }[]; joins: { [k: string]: { [k: string]: number; }; }; }; reason?: string | undefined; schema: "comet.application.run-view.v1"; applicationId: string; projectRoot: string; runId: string; revision: number; workflow: import("../engine/workflow-run.js").WorkflowRef & { hash: string; }; definitionHashes: Record; status: "running" | "failed" | "cancelled" | "waiting" | "completed"; sequence: number; }; name: string; applicationId: string; selected: true; inspection: { commandArgs: string[]; request: { operation: "inspect"; runId: string; }; }; } | { healthy: boolean; error: { code: string | (string & Record); message: string; }; name: string; applicationId: string; selected: true; inspection: { commandArgs: string[]; request: { operation: "inspect"; runId: string; }; }; } | null>; export type SelectedWorkflowApplicationStatus = NonNullable>>; //# sourceMappingURL=application.d.ts.map