Files
openclaw/src/agents/agent-tools.before-tool-call.runtime.ts
T
2026-06-04 05:43:42 -04:00

22 lines
682 B
TypeScript

/**
* Lazy runtime dependencies for before_tool_call handling.
* Keeps diagnostics and loop-detection imports behind a seam that tests can
* replace without loading the full runtime graph.
*/
import { getDiagnosticSessionState } from "../logging/diagnostic-session-state.js";
import { logToolLoopAction } from "../logging/diagnostic.js";
import {
detectToolCallLoop,
recordToolCall,
recordToolCallOutcome,
} from "./tool-loop-detection.js";
/** Runtime seam for before_tool_call diagnostics and loop detection. */
export const beforeToolCallRuntime = {
getDiagnosticSessionState,
logToolLoopAction,
detectToolCallLoop,
recordToolCall,
recordToolCallOutcome,
};