import type { AgentTool } from "@gajae-code/agent-core"; import { readVisibleSkillActiveState } from "./active-state"; export declare const DEEP_INTERVIEW_MUTATION_BLOCK_MESSAGE = "Deep-interview phase boundary: continue gathering context/questions/risks and emit a handoff/spec before code edits. Mutation tools and patch execution are blocked while deep-interview is active; finalize specs through `gjc deep-interview --write --stage final` or hand off to an execution phase."; export declare const WORKFLOW_STATE_MUTATION_BLOCK_MESSAGE = ".gjc workflow state and artifacts are runtime-owned. Agent mutation tools cannot edit `.gjc/**`; use the sanctioned `gjc` CLI instead."; export declare const RALPLAN_MUTATION_BLOCK_MESSAGE = "Ralplan planning phase boundary: keep refining the consensus plan and persist plan artifacts through `gjc ralplan --write` (stage scratch files under a temp dir if needed). Product-code mutation tools and patch execution are blocked while ralplan is active; mutate only after the plan is approved and execution begins."; export declare const ULTRAGOAL_GOAL_PLANNING_MUTATION_BLOCK_MESSAGE = "Ultragoal goal-planning phase boundary: finish goal planning and record goals through `gjc ultragoal` before editing code. Product-code mutation tools and patch execution are blocked until goal planning completes and execution begins."; export declare const AUTORESEARCH_MUTATION_BLOCK_MESSAGE = "Autoresearch research-only boundary: this workflow produces findings, evidence, and a verdict \u2014 never product code. Product-code mutation tools and patch execution are blocked everywhere, on every branch. Mission research artifacts (`autoresearch.sh` at the workdir root and mission state through the sanctioned `gjc autoresearch` CLI) stay writable; run experiments through the `python` tool, or finish the mission and hand off to an approved implementation workflow."; type ToolWithEditMode = AgentTool & { mode?: unknown; customWireName?: unknown; }; export interface WorkflowMutationGuardInput { cwd: string; sessionId?: string; threadId?: string; tool: ToolWithEditMode; args: unknown; forceOverride?: boolean; enforceWorkflowState?: boolean; guardContext?: WorkflowGuardContext; } export interface WorkflowMutationDecision { blocked: boolean; message?: string; targets: string[]; reason?: string; command?: string; } export interface WorkflowGuardContext { sessionId: string | null; activeState: Awaited>; modeStates: ReadonlyMap; } interface ModeState { active?: boolean; current_phase?: string; session_id?: string; thread_id?: string; [key: string]: unknown; } export declare function readWorkflowGuardContext(cwd: string, options?: { sessionId?: string; threadId?: string; }): Promise; export declare function assertWorkflowMutationRawPathsAllowed(input: { cwd: string; sessionId?: string; threadId?: string; rawPaths: string[]; forceOverride?: boolean; guardContext?: WorkflowGuardContext; }): Promise; export declare function getWorkflowMutationDecision(input: WorkflowMutationGuardInput): Promise; export declare function assertWorkflowMutationAllowed(input: WorkflowMutationGuardInput): Promise; export {};