import type { PhaseRole } from "./caller-context.js"; export declare class PhaseOwnershipError extends Error { readonly toolName: string; readonly callerPhase: PhaseRole | "orchestrator"; readonly attemptedPhase: string; readonly hint: string; constructor(toolName: string, callerPhase: PhaseRole | "orchestrator", attemptedPhase: string, hint?: string); } /** * Assert that the calling subagent's phase context matches the phase * named in the tool's arguments. From an orchestrator caller, this is * a no-op. From a subagent caller with a mismatched phase, throws * `PhaseOwnershipError`. * * @param toolName Display name of the tool / subcommand for the error message. * @param namedPhase The phase string passed to the tool (e.g. `--phase commit` * or the `phase` positional arg of `set-bug-summary`). */ export declare function assertPhaseOwnership(toolName: string, namedPhase: string): void; /** * Assert that a `forge_store update-status bug X status ` * call is permitted from the current caller context. Status transitions * are owned by specific phases or by the orchestrator; calling outside * the allowed set is rejected. */ export declare function assertBugStatusOwnership(toolName: string, statusValue: string): void; /** * Phase-event emissions (`forge_store emit` with a phase token in the * payload) are always orchestrator-owned per `meta-fix-bug.md ยง Iron * Laws`. The orchestrator composes the canonical event from runtime * telemetry plus the subagent's SUMMARY and emits it; subagents that * call emit themselves hallucinate runtime facts. */ export declare function assertOrchestratorOnlyEmit(toolName: string): void;