donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
37 lines • 1.8 kB
TypeScript
import type { GptClient } from '../clients/GptClient';
import type { DonobuFlowsManager } from '../managers/DonobuFlowsManager';
import type { InteractionVisualizer } from '../managers/InteractionVisualizer';
import type { TargetInspector } from '../managers/TargetInspector';
import type { ControlPanel } from '../models/ControlPanel';
import type { FlowsPersistence } from '../persistence/flows/FlowsPersistence';
import type { FlowMetadata } from './FlowMetadata';
import type { ProposedToolCall } from './ProposedToolCall';
import type { ToolCall } from './ToolCall';
/**
* This is supplied as context when invoking a tool.
*/
export type ToolCallContext = {
readonly flowsManager: DonobuFlowsManager;
readonly envData: Record<string, string>;
readonly targetInspector: TargetInspector;
readonly controlPanel: ControlPanel;
readonly persistence: FlowsPersistence;
readonly gptClient: GptClient | null;
readonly interactionVisualizer: InteractionVisualizer;
readonly proposedToolCalls: ProposedToolCall[];
readonly invokedToolCalls: ToolCall[];
readonly metadata: FlowMetadata;
readonly toolCallId: string;
/**
* Original (un-interpolated) parameters supplied to the current tool call.
*
* `ToolManager.invokeTool` interpolates `{{...}}` expressions in the tool's
* parameters before invoking the tool, but a tool may need the raw text to
* preserve env var references in its output (e.g. `AssertTool` emits
* Playwright steps that retain `{{$.env.X}}` so cached replays stay correct
* across env value changes). Set by `ToolManager` immediately before the
* tool runs; absent for direct/legacy invocation paths.
*/
rawParameters?: Record<string, any>;
};
//# sourceMappingURL=ToolCallContext.d.ts.map