UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

40 lines • 1.71 kB
import { type Api, type AssistantMessage, type Model } from "@earendil-works/pi-ai"; /** @deprecated Resolve the active Context.tools allowlist through resolveSdkTools(). */ export declare const sdkTools: ("Bash" | "Glob" | "Grep" | "Read")[]; /** @deprecated Use TOOL_EXECUTION_DENIED_MESSAGE from tools.ts. */ export declare const toolExecutionDeniedMessage: string; export type TextBlock = { type: "text"; text: string; index?: number; }; export type ThinkingBlock = { type: "thinking"; thinking: string; thinkingSignature: string; index?: number; }; export type ToolBlock = { type: "toolCall"; id: string; name: string; arguments: Record<string, unknown>; partialJson?: string; index?: number; }; export type StreamBlock = TextBlock | ThinkingBlock | ToolBlock; type SdkUsage = { input_tokens?: number | null; output_tokens?: number | null; cache_read_input_tokens?: number | null; cache_creation_input_tokens?: number | null; }; export declare function mapStopReason(reason: string | null | undefined): "stop" | "length" | "toolUse"; export declare function mapToolName(name: string): string; export declare function asRecord(value: unknown): Record<string, unknown>; export declare function mapToolArguments(name: string, argumentsValue: Record<string, unknown>): Record<string, unknown>; export declare function updateUsage(model: Model<Api>, output: AssistantMessage, usage: SdkUsage, scope: "request-start" | "request-delta" | "query"): void; export declare function emptyOutput(model: Model<Api>): AssistantMessage; export declare function errorMessage(error: unknown): string; export {}; //# sourceMappingURL=stream-protocol.d.ts.map