/**
 * Shared foundation for feature-agent graph nodes.
 *
 * Provides consistent logging, spec file reading, executor invocation,
 * and error handling so every node follows the same patterns.
 */
import type { IAgentExecutor, AgentExecutionOptions } from '../../../../../application/ports/output/agents/agent-executor.interface.js';
import type { FeatureAgentState } from '../state.js';
/**
 * Create a scoped logger that prefixes messages with the node name.
 * Output goes to stdout which the worker redirects to the log file.
 */
export declare function createNodeLogger(nodeName: string): {
    info(message: string): void;
    error(message: string): void;
};
export type NodeLogger = ReturnType<typeof createNodeLogger>;
/**
 * Safely read a file from the spec directory. Returns empty string if file doesn't exist.
 */
export declare function readSpecFile(specDir: string, filename: string): string;
/**
 * Build executor options with cwd. Each node gets a clean agent context.
 */
export declare function buildExecutorOptions(state: FeatureAgentState): AgentExecutionOptions;
/**
 * Determine whether the current node should trigger an interrupt
 * for human approval given the configured approval mode.
 */
export declare function shouldInterrupt(nodeName: string, approvalMode: string | undefined): boolean;
/**
 * Execute a node with consistent logging and error handling.
 *
 * Wraps the node's core logic with:
 * - Entry/exit logging with timing
 * - Error catching that returns error state instead of throwing
 * - Consistent state shape for success and failure
 */
export declare function executeNode(nodeName: string, executor: IAgentExecutor, buildPrompt: (state: FeatureAgentState, log: NodeLogger) => string): (state: FeatureAgentState) => Promise<Partial<FeatureAgentState>>;
//# sourceMappingURL=node-helpers.d.ts.map