mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 03:15:46 -06:00
79c517df89
* fix(agents): detect stable tool argument churn * fix(agents): refine argument churn evidence * fix(agents): route argument churn through recovery * fix(agents): reconcile rewritten loop arguments * fix(agents): defer churn recovery across policy waits * fix(agents): preserve churn clocks across policy waits * fix(agents): harden concurrent churn policy tracking * fix(agents): avoid stale churn false positives * fix(agents): satisfy loop diagnostic CI guards * fix(agents): normalize write churn outcomes * fix(logging): order churn activity events * fix(agents): classify churn no-progress outcomes --------- Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { markDiagnosticArgumentChurnObservation } from "../logging/diagnostic-run-activity.js";
|
|
/**
|
|
* 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 { getArgumentChurnNoProgressStreak } from "./tool-loop-argument-churn.js";
|
|
import { reconcileToolCallExecutionParams } from "./tool-loop-call-reconciliation.js";
|
|
import {
|
|
detectToolCallLoop,
|
|
recordToolCall,
|
|
recordToolCallOutcome,
|
|
} from "./tool-loop-detection.js";
|
|
import { resolveToolLoopWarningThreshold } from "./tool-loop-thresholds.js";
|
|
|
|
/** Runtime seam for before_tool_call diagnostics and loop detection. */
|
|
export const beforeToolCallRuntime = {
|
|
getArgumentChurnNoProgressStreak,
|
|
markDiagnosticArgumentChurnObservation,
|
|
getDiagnosticSessionState,
|
|
logToolLoopAction,
|
|
detectToolCallLoop,
|
|
reconcileToolCallExecutionParams,
|
|
recordToolCall,
|
|
recordToolCallOutcome,
|
|
resolveToolLoopWarningThreshold,
|
|
};
|