import { t } from "structural"; import { ToolResult } from "./tools/common.ts"; export type SequenceIdTagged = T & { id: bigint; }; export declare const ToolCallRequestSchema: t.Struct<{ type: t.Value<"function">; function: t.Type; arguments: t.Struct<{ filePath: t.Type; }>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"list">; arguments: t.OptionalKey>; }>>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"shell">; arguments: t.Struct<{ cmd: t.Type; timeout: t.Type; }>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"edit">; arguments: t.Type; replace: t.Type; filePath: t.Type; }>>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"create">; arguments: t.Struct<{ filePath: t.Type; content: t.Type; }>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"mcp">; arguments: t.Struct<{ server: t.Type; tool: t.Type; arguments: t.OptionalKey>; }>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"fetch">; arguments: t.Struct<{ url: t.Type; includeMarkup: t.OptionalKey>; }>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"append">; arguments: t.Type; text: t.Type; }>>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"prepend">; arguments: t.Type; text: t.Type; }>>; }> | t.UnwrappedTypeStruct<{ name: t.Value<"rewrite">; arguments: t.Type; text: t.Type; }>>; }>>; toolCallId: t.TypeOf; }>; export type ToolCallRequest = t.GetType; export type ToolCallItem = SequenceIdTagged<{ type: "tool"; tool: t.GetType; }>; export type ToolOutputItem = SequenceIdTagged<{ type: "tool-output"; result: ToolResult; toolCallId: string; }>; export type ToolMalformedItem = SequenceIdTagged<{ type: "tool-malformed"; error: string; original: Partial<{ id: string; function: Partial<{ name: string; arguments: string; }>; }>; toolCallId: string; }>; export type ToolFailedItem = SequenceIdTagged<{ type: "tool-failed"; error: string; toolCallId: string; toolName: string; }>; export type ToolRejectItem = SequenceIdTagged<{ type: "tool-reject"; toolCallId: string; }>; export type FileOutdatedItem = SequenceIdTagged<{ type: "file-outdated"; toolCallId: string; }>; export type FileUnreadableItem = SequenceIdTagged<{ type: "file-unreadable"; path: string; toolCallId: string; }>; export type AnthropicAssistantData = { thinkingBlocks: Array<{ type: "thinking"; thinking: string; signature: string; } | { type: "redacted_thinking"; data: string; }>; }; export type AssistantItem = SequenceIdTagged<{ type: "assistant"; content: string; reasoningContent?: string; openai?: { encryptedReasoningContent?: string | null; reasoningId?: string; }; anthropic?: AnthropicAssistantData; tokenUsage: number; outputTokens: number; }>; export type UserItem = SequenceIdTagged<{ type: "user"; content: string; }>; export type RequestFailed = SequenceIdTagged<{ type: "request-failed"; }>; export type Notification = SequenceIdTagged<{ type: "notification"; content: string; }>; export type HistoryItem = UserItem | AssistantItem | ToolCallItem | ToolOutputItem | ToolFailedItem | ToolMalformedItem | ToolRejectItem | FileOutdatedItem | FileUnreadableItem | RequestFailed | Notification; export declare function sequenceId(): bigint;