import { OMP_SDK_TOOL_IDS } from './sdk-settings'; import type { OmpModelsConfig, OmpSdkAuth, OmpSdkToolId as SettingsOmpSdkToolId } from './sdk-settings'; import type { OmpSdkTerminalEvidence, ReasoningEffort, ResultEvent } from '../types'; export declare const OMP_SDK_PROTOCOL_VERSION: 1; export declare const OMP_SDK_BACKEND_VERSION: "17.2.1"; export declare const OMP_SDK_BUN_VERSION: "1.3.14"; export declare const OMP_SDK_MAX_REQUEST_BYTES: number; export declare const OMP_SDK_MAX_FRAME_BYTES: number; export declare const OMP_SDK_MAX_STDOUT_BYTES: number; export declare const OMP_SDK_MAX_CREDENTIAL_BYTES: number; export declare const OMP_SDK_EXECUTION_CONTEXTS: readonly ["host", "detached", "docker", "benchmark"]; export { OMP_SDK_TOOL_IDS }; export type OmpSdkToolId = SettingsOmpSdkToolId; export type OmpSdkRequestAuth = OmpSdkAuth; export type OmpSdkModelsConfig = OmpModelsConfig; export type OmpSdkOutputMode = 'json' | 'text'; export type OmpSdkExecutionContext = (typeof OMP_SDK_EXECUTION_CONTEXTS)[number]; interface OmpSdkRequestBase { readonly protocolVersion: 1; readonly runId: string; readonly cwd: string; readonly executionContext: OmpSdkExecutionContext; readonly prompt: string; readonly modelSelector: string; readonly reasoningEffort: ReasoningEffort; readonly modelsConfig: OmpSdkModelsConfig; readonly auth: OmpSdkRequestAuth; readonly tools: readonly OmpSdkToolId[]; readonly context: string; } export interface OmpSdkJsonSidecarRequest extends OmpSdkRequestBase { readonly outputMode: 'json'; readonly outputSchema: boolean | Readonly>; } export interface OmpSdkTextSidecarRequest extends OmpSdkRequestBase { readonly outputMode: 'text'; readonly outputSchema?: never; } export type OmpSdkSidecarRequest = OmpSdkJsonSidecarRequest | OmpSdkTextSidecarRequest; export declare const OMP_SDK_TEXT_OUTPUT_SCHEMA: Readonly>; export declare const OMP_SDK_PROGRESS_STAGES: readonly ["starting", "resolving-model", "running", "tearing-down"]; export type OmpSdkProgressStage = (typeof OMP_SDK_PROGRESS_STAGES)[number]; export interface OmpSdkProtocolProgressFrame { readonly protocolVersion: 1; readonly type: 'progress'; readonly runId: string; readonly sequence: number; readonly stage: OmpSdkProgressStage; } export interface OmpSdkProtocolResultFrame extends OmpSdkTerminalEvidence { readonly protocolVersion: 1; readonly type: 'result'; readonly runId: string; readonly value: unknown; } export declare const OMP_SDK_ERROR_CODES: readonly ["invalid-request", "model-resolution", "model-fallback", "provider-auth", "provider-rate-limit", "provider-timeout", "provider-error", "schema-violation", "cancelled", "sdk-error", "cleanup-error", "internal-error"]; export type OmpSdkErrorCode = (typeof OMP_SDK_ERROR_CODES)[number]; export type OmpSdkErrorCategory = 'request' | 'model' | 'auth' | 'rate-limit' | 'timeout' | 'provider' | 'schema' | 'cancelled' | 'sdk' | 'cleanup' | 'internal'; export interface OmpSdkSafeError { readonly code: OmpSdkErrorCode; readonly category: OmpSdkErrorCategory; readonly retryable: boolean; readonly redacted: true; } export interface OmpSdkProtocolErrorFrame { readonly protocolVersion: 1; readonly type: 'error'; readonly runId: string; readonly backend: OmpSdkTerminalEvidence['backend']; readonly runtime: OmpSdkTerminalEvidence['runtime']; readonly error: OmpSdkSafeError; } export type OmpSdkProtocolFrame = OmpSdkProtocolProgressFrame | OmpSdkProtocolResultFrame | OmpSdkProtocolErrorFrame; export type OmpSdkProtocolTerminalFrame = OmpSdkProtocolResultFrame | OmpSdkProtocolErrorFrame; export type OmpSdkCollectedTerminal = { readonly type: 'result'; readonly frame: OmpSdkProtocolResultFrame; readonly event: ResultEvent; } | { readonly type: 'error'; readonly frame: OmpSdkProtocolErrorFrame; }; export interface OmpSdkProtocolCollectorOptions { readonly request: OmpSdkSidecarRequest; readonly maxFrameBytes?: number; readonly maxStdoutBytes?: number; } export interface OmpSdkProtocolCollector { readonly progress: readonly OmpSdkProtocolProgressFrame[]; write(chunk: string | Uint8Array): readonly OmpSdkProtocolFrame[]; finish(exitCode: number): OmpSdkCollectedTerminal; } export declare const CATEGORY: Readonly>; //# sourceMappingURL=sdk-protocol-types.d.ts.map