import { type GoalRow } from './goals.js'; import type { CompletionCriticInput, CompletionCriticVerdict } from './llm/goal-critic.js'; /** How long complete_goal waits for the owner's explicit yes/no. * Independent of the default 60s tool wall clock — confirmation is a * human round-trip and must outlive AGIM_NATIVE_TOOL_TIMEOUT_MS. */ export declare function resolveGoalConfirmationTimeoutMs(): number; /** Tool-bridge wall budget for mcp__agim__complete_goal: confirmation * timeout plus a small settle margin so the approval deny path can * return before the tool race aborts. */ export declare function resolveCompleteGoalToolTimeoutMs(): number; /** Backward-compatible test seam; idempotency is now persisted in goals.db. */ export declare function __resetCompletionCacheForTesting(): void; export interface GoalRpcCtx { platform: string; channelId: string; threadId: string; userId: string; /** Optional — included in the audit log + progress note attribution * so we can tell native-set goals from sidecar-set ones. */ callerAgent?: string; traceId?: string; /** Optional workspace scope hash (cwd) stamped onto new goals. */ workspaceScope?: string; /** Tests can bypass the external semantic model while exercising CAS. */ skipSemanticReview?: boolean; /** Test seam for deterministic semantic verdicts. Never populated from RPC payloads. */ reviewGoalCompletion?: (input: CompletionCriticInput) => Promise; skipUserConfirmation?: boolean; confirmGoalCompletion?: (input: { goalId: number; goalVersion: number; recap: string; }) => Promise; signal?: AbortSignal; } export type GoalOp = 'long_task' | 'complete_goal'; export interface LongTaskPayload { goal?: unknown; summary?: unknown; /** v1.3.7 (F7) — must be true to override (auto-pause) an existing * active goal. Without it, long_task refuses when a goal is already * active so the model makes an explicit choice rather than silently * burying the prior objective. */ force?: unknown; } export interface CompleteGoalPayload { goalId?: unknown; goalVersion?: unknown; evidenceIds?: unknown; recap?: unknown; status?: unknown; } export type GoalRpcResult = { ok: true; result: Record; } | { ok: false; error: string; }; export declare function handleGoalOp(op: GoalOp, payload: unknown, ctx: GoalRpcCtx): Promise; /** Exposed so tests + ad-hoc inspectors can prune state. Not used in * production code paths. */ export declare function _activeGoalSnapshot(ctx: GoalRpcCtx): GoalRow | null; //# sourceMappingURL=goal-rpc.d.ts.map