import type { WorkflowGateMode, WorkflowPhase } from '../types/index.js';
export declare function isCursorAuthError(exitCode: number, stderr: string): boolean;
export type CursorFallback = {
    prompt: string;
    ruleFile: string;
    resumeCommand: string;
};
export declare function buildCursorFallback(phase: WorkflowPhase, storyId: string, cwd: string): CursorFallback;
export type SupportedRuntime = 'claude' | 'cursor' | 'codex' | 'agentforce' | 'windsurf';
export declare function detectRuntime(): SupportedRuntime | null;
export type RuntimeInvocation = {
    command: string;
    args: string[];
    ruleFile: string | null;
};
export type RuntimeInvocationOptions = {
    gates?: WorkflowGateMode;
    maxAgents?: number;
    capabilitySignals?: string[];
};
export declare function collectSubagentCapabilitySignals(cwd: string, storyId: string): string[];
export declare function claudePermissionArgs(gates: WorkflowGateMode): string[];
export declare function codexPermissionArgs(gates: WorkflowGateMode): string[];
export declare function cursorPermissionArgs(_gates: WorkflowGateMode): string[];
export declare function buildInvocation(runtime: SupportedRuntime, phase: WorkflowPhase, storyId: string, cwd: string, options?: RuntimeInvocationOptions | WorkflowGateMode): RuntimeInvocation;
