import type { InteractiveQuestion } from './interactive-question.js';
import type { ToolResult } from './common/primitives.js';
/**
 * Persisted token that blocks a tool from proceeding until the LLM relays
 * the interactiveQuestions via AskUserQuestion and retries with answers.
 */
export interface ClarificationToken {
    /** MCP tool name that emitted the questions, e.g. 'create_spec'. */
    toolName: string;
    /** Spec ID scoped to this clarification, when applicable. */
    specId?: string;
    /** Project hash (sha256 of projectPath, 16-char hex). */
    projectId: string;
    /** sha256(JSON.stringify(questions)) — verifies answers match the pending batch. */
    questionsHash: string;
    /** ISO timestamp of emission — used to compute 5-min TTL. */
    emittedAt: string;
    /** Full question list so the error-builder can cite them verbatim. */
    questions: InteractiveQuestion[];
}
/**
 * On-disk shape of `data/projects/{hash}/pending-clarifications.json`.
 */
export interface PendingClarificationsFile {
    version: 1;
    tokens: ClarificationToken[];
}
/**
 * Context passed to checkGate() to determine whether a tool call should proceed.
 */
export interface GateContext {
    projectId: string;
    toolName: string;
    specId?: string;
    clarificationAnswers?: Record<string, string>;
}
/**
 * Result returned by checkGate().
 */
export type GateResult = {
    allow: true;
} | {
    allow: false;
    error: ToolResult;
};
//# sourceMappingURL=clarification-token.d.ts.map