Class: ToolCallTracker
Makaio Framework / ai-adapters-core / ToolCallTracker
Class: ToolCallTracker
Section titled “Class: ToolCallTracker”Defined in: ../../../adapters/core/src/agent/tool-call-tracker.ts:48
Tracks tool.use → tool.output correlation across adapters.
Different adapters have different correlation capabilities:
- Claude Code: toolu_* IDs
- Codex/OpenAI: call_* IDs
- Others: may have nothing
ToolCallTracker provides a unified interface that:
- Uses native IDs when available
- Falls back to FIFO by tool name otherwise
- Generates UUIDs for adapters without native IDs
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ToolCallTracker():
ToolCallTracker
Returns
Section titled “Returns”ToolCallTracker
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: ../../../adapters/core/src/agent/tool-call-tracker.ts:110
Clear all pending entries. Call on turn end to prevent stale entries from leaking across turns.
Returns
Section titled “Returns”void
register()
Section titled “register()”register(
toolName,args?,nativeId?):string
Defined in: ../../../adapters/core/src/agent/tool-call-tracker.ts:59
Register a tool.use event. Returns correlation ID to use. If nativeId provided, uses that. Otherwise generates UUID.
Parameters
Section titled “Parameters”toolName
Section titled “toolName”string
Name of the tool being invoked
Record<string, unknown>
Tool arguments (optional, for future correlation strategies)
nativeId?
Section titled “nativeId?”string
Native provider ID if available
Returns
Section titled “Returns”string
Correlation ID to use for this tool call
resolve()
Section titled “resolve()”resolve(
hints):ResolveResult
Defined in: ../../../adapters/core/src/agent/tool-call-tracker.ts:78
Find correlation ID for a tool output. Tries native ID first, then falls back to FIFO by tool name, and finally to the oldest pending tool call.
Parameters
Section titled “Parameters”Available hints for correlation
Returns
Section titled “Returns”ResolveResult
Correlation result with strategy metadata