agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
32 lines • 1.28 kB
TypeScript
/**
* Role: one completed-JSON owner for Anthropic streamed tool arguments.
* Consumes already-decoded events; it neither frames SSE nor assembles a
* message. Original block positions, not provider IDs, associate evidence.
*/
import type { LLMResponse } from '../../provider-contract/types.js';
type Failure = NonNullable<LLMResponse['toolCalls'][number]['argumentsFailure']>;
type ToolBlock = {
readonly id: string;
readonly name: string;
readonly input: unknown;
};
/** Per-response raw argument evidence, shared by SDK and fetch adapters. */
export declare class AnthropicToolArguments {
private readonly blocks;
private readonly starts;
private observedTool;
private ended;
private invalid;
/** Record only the protocol facts needed to judge a tool's completed JSON. */
observe(event: unknown): void;
/** EOF/abort is not a completed response, even if an SDK exposes a partial object. */
assertTerminal(hasFinalTools?: boolean): void;
/** A finite refusal, never an SDK's partial/repaired object, for unsafe input. */
finish(index: number, tool: ToolBlock): {
input: Record<string, unknown>;
failure?: Failure;
raw: string;
};
}
export {};
//# sourceMappingURL=anthropicToolArguments.d.ts.map