import { type GoalStatus } from './goals.js'; export type GoalEvidenceKind = 'control' | 'observation' | 'mutation' | 'mutation_verification'; export interface GoalEvidenceContext { goalId: number; goalVersion: number; traceId?: string; /** Opaque hash of the agent cwd/workspace. Empty = unknown scope. */ workspaceScope?: string; } export interface GoalToolOperation { ledgerId: number; goalId: number; goalVersion: number; epoch: number; kind: Exclude; workspaceScope: string; /** In-memory only; never persisted in plaintext. */ semanticInput: string; } export interface IssuedEvidence { id: string; kind: 'observation' | 'verification'; epoch: number; } /** Hash a cwd/workspace path into an opaque scope token. Empty input → * empty scope (conservative global bumps). */ export declare function hashWorkspaceScope(cwd: string | undefined | null): string; /** Reconcile mutation intents owned by processes that are no longer alive. * Live foreign owners remain blocking, so concurrent agents cannot mistake * each other's in-flight writes for crash debris. */ export declare function reconcileInterruptedGoalOperations(): number; export declare function isDetachedGoalCommand(input: unknown): boolean; export declare function isGoalExecContainmentAvailable(): boolean; export declare function classifyGoalEvidence(toolName: string, input: unknown, _parallelSafe: boolean): GoalEvidenceKind; export declare function beginGoalToolOperation(input: { context: GoalEvidenceContext; toolCallId: string; toolName: string; args: unknown; kind: GoalEvidenceKind; }): GoalToolOperation | null; export declare function finishGoalToolOperation(operation: GoalToolOperation | null, result: { ok: boolean; output: string; /** True when cancellation/timeout cannot prove whether a mutation landed. */ uncertain?: boolean; metadata?: Record; }): IssuedEvidence | null; export interface CompleteGoalCasInput { platform: string; channelId: string; threadId: string; userId: string; goalId: number; goalVersion: number; evidenceIds: string[]; recap: string; status: Extract; traceId?: string; } export interface GoalEvidenceReview { goalTitle: string; goalBody: string; recentToolCalls: Array<{ name: string; isError: false; preview: string; }>; } export declare function getGoalEvidenceReview(input: { platform: string; channelId: string; threadId: string; userId: string; goalId: number; goalVersion: number; evidenceIds: string[]; traceId?: string; }): GoalEvidenceReview | null; export type CompleteGoalCasResult = { ok: true; alreadyCompleted: boolean; title: string; version: number; mutationEpoch: number; } | { ok: false; error: string; }; export declare function completeGoalCas(input: CompleteGoalCasInput): CompleteGoalCasResult; export declare function __resetGoalEvidenceKeyForTesting(): void; //# sourceMappingURL=goal-evidence.d.ts.map