UNPKG

@code-yeongyu/senpi

Version:

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

94 lines • 3.67 kB
import type { ServiceTier } from "../../types.ts"; import { type OpenAiRemoteCompactionIdentity, type OpenAiRemoteCompactionOrigin } from "./openai-remote-model.ts"; export declare const OPENAI_REMOTE_COMPACTION_SCHEMA = "senpi.compaction.openai-remote.v1"; export type OpenAiInputText = { type: "input_text"; text: string; }; export type OpenAiInputImage = { type: "input_image"; detail: "auto"; image_url: string; }; export type OpenAiInputContent = OpenAiInputText | OpenAiInputImage; export type OpenAiOutputText = { type: "output_text"; text: string; annotations: []; }; export type OpenAiMessageInputItem = { type?: "message"; id?: string; role: "user" | "system" | "developer"; content: string | OpenAiInputContent[]; status?: "in_progress" | "completed" | "incomplete"; }; export type OpenAiAssistantMessageItem = { type: "message"; id: string; role: "assistant"; status: "completed"; content: OpenAiOutputText[]; phase?: "commentary" | "final_answer"; }; export type OpenAiFunctionCallItem = { type: "function_call"; id?: string; call_id: string; name: string; arguments: string; }; export type OpenAiFunctionCallOutputItem = { type: "function_call_output"; call_id: string; output: string | OpenAiInputContent[]; }; export type OpenAiRemoteTransport = "websocket" | "responses-v2" | "compact-endpoint"; export type OpenAiCompactionItem = { type: "compaction"; encrypted_content: string; id?: string | null; created_by?: string; }; export type OpenAiContextCompactionItem = { type: "context_compaction"; encrypted_content: string; id?: string | null; created_by?: string; }; export type OpenAiContextCompactionTriggerItem = { type: "context_compaction"; }; export type OpenAiProviderNativeItem = Record<string, unknown> & { type: string; }; export type OpenAiRemoteInputItem = OpenAiMessageInputItem | OpenAiAssistantMessageItem | OpenAiFunctionCallItem | OpenAiFunctionCallOutputItem | OpenAiCompactionItem | OpenAiContextCompactionItem | OpenAiProviderNativeItem; export type OpenAiCompactBody = { model: string; input: OpenAiRemoteInputItem[]; instructions?: string; prompt_cache_key?: string; service_tier?: ServiceTier; }; export type OpenAiRemoteCompactionDetails = OpenAiRemoteCompactionIdentity & { schema: typeof OPENAI_REMOTE_COMPACTION_SCHEMA; mode: "openai-remote"; transport: OpenAiRemoteTransport; modelId: string; responseId: string; createdAt: number; requestInputItemCount: number; retainedInputItemCount: number; replacementInput: OpenAiRemoteInputItem[]; /** Absent in legacy checkpoints, which intentionally cannot use native replay. */ origin?: OpenAiRemoteCompactionOrigin; usage?: Record<string, unknown>; }; export declare function isRecord(value: unknown): value is Record<string, unknown>; export declare function getOpenAiRemoteCompactionDetails(value: unknown): OpenAiRemoteCompactionDetails | undefined; export declare function isOpenAiCompactionItem(item: OpenAiRemoteInputItem): item is OpenAiCompactionItem; export declare function isOpenAiContextCompactionItem(item: OpenAiRemoteInputItem): item is OpenAiContextCompactionItem; export declare function isOpenAiRemoteCompactionOutputItem(item: OpenAiRemoteInputItem): item is OpenAiCompactionItem | OpenAiContextCompactionItem; export declare function isRetainedRemoteOutputItem(item: OpenAiRemoteInputItem): boolean; export declare function isRetainedResponsesStreamInputItem(item: OpenAiRemoteInputItem): boolean; //# sourceMappingURL=openai-remote-schema.d.ts.map