mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:20:44 +00:00
fix: support codex app-server image understanding
This commit is contained in:
@@ -16,6 +16,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Codex/media understanding: support `codex/*` image models through bounded Codex app-server image turns, while keeping `openai-codex/*` on the OpenAI Codex OAuth route and validating app-server responses against generated protocol contracts. Fixes #70201.
|
||||
- Providers/Google: honor the private-network SSRF opt-in for Gemini image generation requests, so trusted proxy setups that resolve Google API hosts to private addresses can use `image_generate`. Fixes #67216.
|
||||
- Agents/transport: stop embedded runs from lowering the process-wide undici stream timeouts, so slow Gemini image generation and other long-running provider requests no longer inherit short run-attempt headers timeouts. Fixes #70423. Thanks @giangthb.
|
||||
- Providers/OpenRouter: send image-understanding prompts as user text before image parts, restoring non-empty vision responses for OpenRouter multimodal models. Fixes #70410.
|
||||
|
||||
@@ -121,7 +121,7 @@ This table maps common inference tasks to the corresponding infer command.
|
||||
- Use `--json` when the output will be consumed by another command or script.
|
||||
- Use `--provider` or `--model provider/model` when a specific backend is required.
|
||||
- For `image describe`, `audio transcribe`, and `video describe`, `--model` must use the form `<provider/model>`.
|
||||
- For `image describe`, an explicit `--model` runs that provider/model directly. The model must be image-capable in the model catalog or provider config.
|
||||
- For `image describe`, an explicit `--model` runs that provider/model directly. The model must be image-capable in the model catalog or provider config. `codex/<model>` runs a bounded Codex app-server image-understanding turn; `openai-codex/<model>` uses the OpenAI Codex OAuth provider path.
|
||||
- Stateless execution commands default to local.
|
||||
- Gateway-managed state commands default to gateway.
|
||||
- The normal local path does not require the gateway to be running.
|
||||
|
||||
@@ -222,11 +222,11 @@ If you omit `capabilities`, the entry is eligible for the list it appears in.
|
||||
|
||||
## Provider support matrix (OpenClaw integrations)
|
||||
|
||||
| Capability | Provider integration | Notes |
|
||||
| ---------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Image | OpenAI, OpenRouter, Anthropic, Google, MiniMax, Moonshot, Qwen, Z.AI, config providers | Vendor plugins register image support; MiniMax and MiniMax OAuth both use `MiniMax-VL-01`; image-capable config providers auto-register. |
|
||||
| Audio | OpenAI, Groq, Deepgram, Google, Mistral | Provider transcription (Whisper/Deepgram/Gemini/Voxtral). |
|
||||
| Video | Google, Qwen, Moonshot | Provider video understanding via vendor plugins; Qwen video understanding uses the Standard DashScope endpoints. |
|
||||
| Capability | Provider integration | Notes |
|
||||
| ---------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Image | OpenAI, OpenAI Codex OAuth, Codex app-server, OpenRouter, Anthropic, Google, MiniMax, Moonshot, Qwen, Z.AI, config providers | Vendor plugins register image support; `openai-codex/*` uses OAuth provider plumbing; `codex/*` uses a bounded Codex app-server turn; MiniMax and MiniMax OAuth both use `MiniMax-VL-01`; image-capable config providers auto-register. |
|
||||
| Audio | OpenAI, Groq, Deepgram, Google, Mistral | Provider transcription (Whisper/Deepgram/Gemini/Voxtral). |
|
||||
| Video | Google, Qwen, Moonshot | Provider video understanding via vendor plugins; Qwen video understanding uses the Standard DashScope endpoints. |
|
||||
|
||||
MiniMax note:
|
||||
|
||||
|
||||
@@ -57,6 +57,13 @@ Codex OAuth configs should use `openai-codex/gpt-*`; new native app-server
|
||||
harness configs should use `openai/gpt-*` plus `embeddedHarness.runtime:
|
||||
"codex"`.
|
||||
|
||||
`agents.defaults.imageModel` follows the same prefix split. Use
|
||||
`openai-codex/gpt-*` when image understanding should run through the OpenAI
|
||||
Codex OAuth provider path. Use `codex/gpt-*` when image understanding should run
|
||||
through a bounded Codex app-server turn. The Codex app-server model must
|
||||
advertise image input support; text-only Codex models fail before the media turn
|
||||
starts.
|
||||
|
||||
Use `/status` to confirm the effective harness for the current session. If the
|
||||
selection is surprising, enable debug logging for the `agents/harness` subsystem
|
||||
and inspect the gateway's structured `agent harness selected` record. It
|
||||
|
||||
@@ -16,6 +16,7 @@ describe("codex plugin", () => {
|
||||
it("registers the codex provider and agent harness", () => {
|
||||
const registerAgentHarness = vi.fn();
|
||||
const registerCommand = vi.fn();
|
||||
const registerMediaUnderstandingProvider = vi.fn();
|
||||
const registerProvider = vi.fn();
|
||||
|
||||
plugin.register(
|
||||
@@ -28,6 +29,7 @@ describe("codex plugin", () => {
|
||||
runtime: {} as never,
|
||||
registerAgentHarness,
|
||||
registerCommand,
|
||||
registerMediaUnderstandingProvider,
|
||||
registerProvider,
|
||||
}),
|
||||
);
|
||||
@@ -38,6 +40,13 @@ describe("codex plugin", () => {
|
||||
label: "Codex agent harness",
|
||||
dispose: expect.any(Function),
|
||||
});
|
||||
expect(registerMediaUnderstandingProvider.mock.calls[0]?.[0]).toMatchObject({
|
||||
id: "codex",
|
||||
capabilities: ["image"],
|
||||
defaultModels: { image: "gpt-5.5" },
|
||||
describeImage: expect.any(Function),
|
||||
describeImages: expect.any(Function),
|
||||
});
|
||||
expect(registerCommand.mock.calls[0]?.[0]).toMatchObject({
|
||||
name: "codex",
|
||||
description: "Inspect and control the Codex app-server harness",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { createCodexAppServerAgentHarness } from "./harness.js";
|
||||
import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
||||
import { buildCodexProvider } from "./provider.js";
|
||||
import { createCodexCommand } from "./src/commands.js";
|
||||
|
||||
@@ -10,6 +11,9 @@ export default definePluginEntry({
|
||||
register(api) {
|
||||
api.registerAgentHarness(createCodexAppServerAgentHarness({ pluginConfig: api.pluginConfig }));
|
||||
api.registerProvider(buildCodexProvider({ pluginConfig: api.pluginConfig }));
|
||||
api.registerMediaUnderstandingProvider(
|
||||
buildCodexMediaUnderstandingProvider({ pluginConfig: api.pluginConfig }),
|
||||
);
|
||||
api.registerCommand(createCodexCommand({ pluginConfig: api.pluginConfig }));
|
||||
},
|
||||
});
|
||||
|
||||
262
extensions/codex/media-understanding-provider.test.ts
Normal file
262
extensions/codex/media-understanding-provider.test.ts
Normal file
@@ -0,0 +1,262 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
||||
import type { CodexAppServerClient } from "./src/app-server/client.js";
|
||||
import type { CodexServerNotification, JsonValue } from "./src/app-server/protocol.js";
|
||||
|
||||
function codexModel(inputModalities: string[] = ["text", "image"]) {
|
||||
return {
|
||||
id: "gpt-5.4",
|
||||
model: "gpt-5.4",
|
||||
upgrade: null,
|
||||
upgradeInfo: null,
|
||||
availabilityNux: null,
|
||||
displayName: "gpt-5.4",
|
||||
description: "GPT-5.4",
|
||||
hidden: false,
|
||||
supportedReasoningEfforts: [{ reasoningEffort: "low", description: "fast" }],
|
||||
defaultReasoningEffort: "low",
|
||||
inputModalities,
|
||||
supportsPersonality: false,
|
||||
additionalSpeedTiers: [],
|
||||
isDefault: true,
|
||||
};
|
||||
}
|
||||
|
||||
function threadStartResult() {
|
||||
return {
|
||||
thread: {
|
||||
id: "thread-1",
|
||||
forkedFromId: null,
|
||||
preview: "",
|
||||
ephemeral: true,
|
||||
modelProvider: "openai",
|
||||
createdAt: 1,
|
||||
updatedAt: 1,
|
||||
status: { type: "idle" },
|
||||
path: null,
|
||||
cwd: "/tmp/openclaw-agent",
|
||||
cliVersion: "0.118.0",
|
||||
source: "unknown",
|
||||
agentNickname: null,
|
||||
agentRole: null,
|
||||
gitInfo: null,
|
||||
name: null,
|
||||
turns: [],
|
||||
},
|
||||
model: "gpt-5.4",
|
||||
modelProvider: "openai",
|
||||
serviceTier: null,
|
||||
cwd: "/tmp/openclaw-agent",
|
||||
instructionSources: [],
|
||||
approvalPolicy: "never",
|
||||
approvalsReviewer: "user",
|
||||
sandbox: { type: "dangerFullAccess" },
|
||||
permissionProfile: null,
|
||||
reasoningEffort: null,
|
||||
};
|
||||
}
|
||||
|
||||
function turnStartResult(status = "inProgress", items: JsonValue[] = []) {
|
||||
return {
|
||||
turn: {
|
||||
id: "turn-1",
|
||||
status,
|
||||
items,
|
||||
error: null,
|
||||
startedAt: null,
|
||||
completedAt: null,
|
||||
durationMs: null,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function createFakeClient(options?: {
|
||||
inputModalities?: string[];
|
||||
completeWithItems?: boolean;
|
||||
notifyError?: string;
|
||||
}) {
|
||||
const notifications = new Set<(notification: CodexServerNotification) => void>();
|
||||
const requests: Array<{ method: string; params?: JsonValue }> = [];
|
||||
const request = vi.fn(async (method: string, params?: JsonValue) => {
|
||||
requests.push({ method, params });
|
||||
if (method === "model/list") {
|
||||
return {
|
||||
data: [codexModel(options?.inputModalities)],
|
||||
nextCursor: null,
|
||||
};
|
||||
}
|
||||
if (method === "thread/start") {
|
||||
return threadStartResult();
|
||||
}
|
||||
if (method === "turn/start") {
|
||||
if (options?.notifyError) {
|
||||
for (const notify of notifications) {
|
||||
notify({
|
||||
method: "error",
|
||||
params: {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
error: {
|
||||
message: options.notifyError,
|
||||
codexErrorInfo: null,
|
||||
additionalDetails: null,
|
||||
},
|
||||
willRetry: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
} else if (!options?.completeWithItems) {
|
||||
for (const notify of notifications) {
|
||||
notify({
|
||||
method: "item/agentMessage/delta",
|
||||
params: {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
itemId: "msg-1",
|
||||
delta: "A red square.",
|
||||
},
|
||||
});
|
||||
notify({
|
||||
method: "turn/completed",
|
||||
params: {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
turn: turnStartResult("completed").turn,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
return turnStartResult(
|
||||
options?.completeWithItems ? "completed" : "inProgress",
|
||||
options?.completeWithItems
|
||||
? [
|
||||
{
|
||||
id: "msg-1",
|
||||
type: "agentMessage",
|
||||
text: "A blue circle.",
|
||||
phase: null,
|
||||
memoryCitation: null,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
);
|
||||
}
|
||||
return {};
|
||||
});
|
||||
|
||||
const client = {
|
||||
request,
|
||||
addNotificationHandler(handler: (notification: CodexServerNotification) => void) {
|
||||
notifications.add(handler);
|
||||
return () => notifications.delete(handler);
|
||||
},
|
||||
} as unknown as CodexAppServerClient;
|
||||
|
||||
return { client, requests };
|
||||
}
|
||||
|
||||
describe("codex media understanding provider", () => {
|
||||
it("runs image understanding through a bounded Codex app-server turn", async () => {
|
||||
const { client, requests } = createFakeClient();
|
||||
const provider = buildCodexMediaUnderstandingProvider({
|
||||
clientFactory: async () => client,
|
||||
});
|
||||
|
||||
const result = await provider.describeImage?.({
|
||||
buffer: Buffer.from("image-bytes"),
|
||||
fileName: "image.png",
|
||||
mime: "image/png",
|
||||
provider: "codex",
|
||||
model: "gpt-5.4",
|
||||
prompt: "Describe briefly.",
|
||||
timeoutMs: 30_000,
|
||||
cfg: {},
|
||||
agentDir: "/tmp/openclaw-agent",
|
||||
});
|
||||
|
||||
expect(result).toEqual({ text: "A red square.", model: "gpt-5.4" });
|
||||
expect(requests.map((entry) => entry.method)).toEqual([
|
||||
"model/list",
|
||||
"thread/start",
|
||||
"turn/start",
|
||||
]);
|
||||
expect(requests[1]?.params).toMatchObject({
|
||||
model: "gpt-5.4",
|
||||
modelProvider: "openai",
|
||||
approvalPolicy: "never",
|
||||
sandbox: "read-only",
|
||||
dynamicTools: [],
|
||||
ephemeral: true,
|
||||
persistExtendedHistory: false,
|
||||
});
|
||||
expect(requests[2]?.params).toMatchObject({
|
||||
threadId: "thread-1",
|
||||
approvalPolicy: "never",
|
||||
model: "gpt-5.4",
|
||||
input: [
|
||||
{ type: "text", text: "Describe briefly.", text_elements: [] },
|
||||
{ type: "image", url: "data:image/png;base64,aW1hZ2UtYnl0ZXM=" },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it("extracts text from terminal turn items", async () => {
|
||||
const { client } = createFakeClient({ completeWithItems: true });
|
||||
const provider = buildCodexMediaUnderstandingProvider({
|
||||
clientFactory: async () => client,
|
||||
});
|
||||
|
||||
const result = await provider.describeImages?.({
|
||||
images: [{ buffer: Buffer.from("image-bytes"), fileName: "image.png", mime: "image/png" }],
|
||||
provider: "codex",
|
||||
model: "gpt-5.4",
|
||||
prompt: "Describe briefly.",
|
||||
timeoutMs: 30_000,
|
||||
cfg: {},
|
||||
agentDir: "/tmp/openclaw-agent",
|
||||
});
|
||||
|
||||
expect(result).toEqual({ text: "A blue circle.", model: "gpt-5.4" });
|
||||
});
|
||||
|
||||
it("rejects text-only Codex app-server models before starting a turn", async () => {
|
||||
const { client, requests } = createFakeClient({ inputModalities: ["text"] });
|
||||
const provider = buildCodexMediaUnderstandingProvider({
|
||||
clientFactory: async () => client,
|
||||
});
|
||||
|
||||
await expect(
|
||||
provider.describeImage?.({
|
||||
buffer: Buffer.from("image-bytes"),
|
||||
fileName: "image.png",
|
||||
mime: "image/png",
|
||||
provider: "codex",
|
||||
model: "gpt-5.4",
|
||||
timeoutMs: 30_000,
|
||||
cfg: {},
|
||||
agentDir: "/tmp/openclaw-agent",
|
||||
}),
|
||||
).rejects.toThrow("Codex app-server model does not support images: gpt-5.4");
|
||||
expect(requests.map((entry) => entry.method)).toEqual(["model/list"]);
|
||||
});
|
||||
|
||||
it("surfaces Codex app-server turn errors", async () => {
|
||||
const { client } = createFakeClient({ notifyError: "vision unavailable" });
|
||||
const provider = buildCodexMediaUnderstandingProvider({
|
||||
clientFactory: async () => client,
|
||||
});
|
||||
|
||||
await expect(
|
||||
provider.describeImage?.({
|
||||
buffer: Buffer.from("image-bytes"),
|
||||
fileName: "image.png",
|
||||
mime: "image/png",
|
||||
provider: "codex",
|
||||
model: "gpt-5.4",
|
||||
timeoutMs: 30_000,
|
||||
cfg: {},
|
||||
agentDir: "/tmp/openclaw-agent",
|
||||
}),
|
||||
).rejects.toThrow("vision unavailable");
|
||||
});
|
||||
});
|
||||
338
extensions/codex/media-understanding-provider.ts
Normal file
338
extensions/codex/media-understanding-provider.ts
Normal file
@@ -0,0 +1,338 @@
|
||||
import {
|
||||
type ImagesDescriptionRequest,
|
||||
type ImagesDescriptionResult,
|
||||
type MediaUnderstandingProvider,
|
||||
} from "openclaw/plugin-sdk/media-understanding";
|
||||
import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
|
||||
import { type CodexAppServerClientFactory } from "./src/app-server/client-factory.js";
|
||||
import type { CodexAppServerClient } from "./src/app-server/client.js";
|
||||
import { resolveCodexAppServerRuntimeOptions } from "./src/app-server/config.js";
|
||||
import { readModelListResult } from "./src/app-server/models.js";
|
||||
import {
|
||||
isJsonObject,
|
||||
type CodexServerNotification,
|
||||
type CodexThreadItem,
|
||||
type CodexThreadStartParams,
|
||||
type CodexTurn,
|
||||
type CodexTurnStartParams,
|
||||
type JsonObject,
|
||||
} from "./src/app-server/protocol.js";
|
||||
import {
|
||||
assertCodexThreadStartResponse,
|
||||
assertCodexTurnStartResponse,
|
||||
readCodexErrorNotification,
|
||||
readCodexTurnCompletedNotification,
|
||||
} from "./src/app-server/protocol-validators.js";
|
||||
import { createIsolatedCodexAppServerClient } from "./src/app-server/shared-client.js";
|
||||
|
||||
const DEFAULT_CODEX_IMAGE_MODEL =
|
||||
FALLBACK_CODEX_MODELS.find((model) => model.inputModalities.includes("image"))?.id ??
|
||||
FALLBACK_CODEX_MODELS[0]?.id;
|
||||
const DEFAULT_CODEX_IMAGE_PROMPT = "Describe the image.";
|
||||
|
||||
export type CodexMediaUnderstandingProviderOptions = {
|
||||
pluginConfig?: unknown;
|
||||
clientFactory?: CodexAppServerClientFactory;
|
||||
};
|
||||
|
||||
export function buildCodexMediaUnderstandingProvider(
|
||||
options: CodexMediaUnderstandingProviderOptions = {},
|
||||
): MediaUnderstandingProvider {
|
||||
return {
|
||||
id: CODEX_PROVIDER_ID,
|
||||
capabilities: ["image"],
|
||||
...(DEFAULT_CODEX_IMAGE_MODEL ? { defaultModels: { image: DEFAULT_CODEX_IMAGE_MODEL } } : {}),
|
||||
describeImage: async (req) =>
|
||||
describeCodexImages(
|
||||
{
|
||||
images: [
|
||||
{
|
||||
buffer: req.buffer,
|
||||
fileName: req.fileName,
|
||||
mime: req.mime,
|
||||
},
|
||||
],
|
||||
provider: req.provider,
|
||||
model: req.model,
|
||||
prompt: req.prompt,
|
||||
maxTokens: req.maxTokens,
|
||||
timeoutMs: req.timeoutMs,
|
||||
profile: req.profile,
|
||||
preferredProfile: req.preferredProfile,
|
||||
authStore: req.authStore,
|
||||
agentDir: req.agentDir,
|
||||
cfg: req.cfg,
|
||||
},
|
||||
options,
|
||||
),
|
||||
describeImages: async (req) => describeCodexImages(req, options),
|
||||
};
|
||||
}
|
||||
|
||||
async function describeCodexImages(
|
||||
req: ImagesDescriptionRequest,
|
||||
options: CodexMediaUnderstandingProviderOptions,
|
||||
): Promise<ImagesDescriptionResult> {
|
||||
const model = req.model.trim();
|
||||
if (!model) {
|
||||
throw new Error("Codex image understanding requires model id.");
|
||||
}
|
||||
|
||||
const appServer = resolveCodexAppServerRuntimeOptions({ pluginConfig: options.pluginConfig });
|
||||
const timeoutMs = Math.max(100, req.timeoutMs);
|
||||
const ownsClient = !options.clientFactory;
|
||||
const client = options.clientFactory
|
||||
? await options.clientFactory(appServer.start, req.profile)
|
||||
: await createIsolatedCodexAppServerClient({
|
||||
startOptions: appServer.start,
|
||||
timeoutMs,
|
||||
authProfileId: req.profile,
|
||||
});
|
||||
const abortController = new AbortController();
|
||||
const timeout = setTimeout(() => abortController.abort("timeout"), timeoutMs);
|
||||
timeout.unref?.();
|
||||
|
||||
try {
|
||||
await assertCodexModelSupportsImage({
|
||||
client,
|
||||
model,
|
||||
timeoutMs,
|
||||
signal: abortController.signal,
|
||||
});
|
||||
const thread = assertCodexThreadStartResponse(
|
||||
await client.request<unknown>(
|
||||
"thread/start",
|
||||
{
|
||||
model,
|
||||
modelProvider: "openai",
|
||||
cwd: req.agentDir || process.cwd(),
|
||||
approvalPolicy: "never",
|
||||
sandbox: "read-only",
|
||||
serviceName: "OpenClaw",
|
||||
developerInstructions:
|
||||
"You are OpenClaw's bounded image-understanding worker. Describe only the provided image content. Do not call tools, edit files, or ask follow-up questions.",
|
||||
dynamicTools: [],
|
||||
experimentalRawEvents: true,
|
||||
persistExtendedHistory: false,
|
||||
ephemeral: true,
|
||||
} satisfies CodexThreadStartParams,
|
||||
{ timeoutMs, signal: abortController.signal },
|
||||
),
|
||||
);
|
||||
const collector = createCodexImageTurnCollector(thread.thread.id);
|
||||
const cleanup = client.addNotificationHandler(collector.handleNotification);
|
||||
try {
|
||||
const turn = assertCodexTurnStartResponse(
|
||||
await client.request<unknown>(
|
||||
"turn/start",
|
||||
{
|
||||
threadId: thread.thread.id,
|
||||
input: [
|
||||
{ type: "text", text: buildCodexImagePrompt(req), text_elements: [] },
|
||||
...req.images.map((image) => ({
|
||||
type: "image" as const,
|
||||
url: `data:${image.mime ?? "image/png"};base64,${image.buffer.toString("base64")}`,
|
||||
})),
|
||||
],
|
||||
cwd: req.agentDir || process.cwd(),
|
||||
approvalPolicy: "never",
|
||||
model,
|
||||
effort: "low",
|
||||
} satisfies CodexTurnStartParams,
|
||||
{ timeoutMs, signal: abortController.signal },
|
||||
),
|
||||
);
|
||||
const text = await collector.collect(turn.turn, {
|
||||
timeoutMs,
|
||||
signal: abortController.signal,
|
||||
});
|
||||
return { text, model };
|
||||
} finally {
|
||||
cleanup();
|
||||
}
|
||||
} finally {
|
||||
clearTimeout(timeout);
|
||||
if (ownsClient) {
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function assertCodexModelSupportsImage(params: {
|
||||
client: CodexAppServerClient;
|
||||
model: string;
|
||||
timeoutMs: number;
|
||||
signal: AbortSignal;
|
||||
}): Promise<void> {
|
||||
const result = await params.client.request<unknown>(
|
||||
"model/list",
|
||||
{ limit: 100, cursor: null, includeHidden: false },
|
||||
{ timeoutMs: Math.min(params.timeoutMs, 5_000), signal: params.signal },
|
||||
);
|
||||
const listed = readModelListResult(result).models;
|
||||
const match = listed.find((entry) => entry.model === params.model || entry.id === params.model);
|
||||
if (!match) {
|
||||
throw new Error(`Codex app-server model not found: ${params.model}`);
|
||||
}
|
||||
if (!match.inputModalities.includes("image")) {
|
||||
throw new Error(`Codex app-server model does not support images: ${params.model}`);
|
||||
}
|
||||
}
|
||||
|
||||
function buildCodexImagePrompt(req: ImagesDescriptionRequest): string {
|
||||
const prompt = req.prompt?.trim() || DEFAULT_CODEX_IMAGE_PROMPT;
|
||||
if (req.images.length <= 1) {
|
||||
return prompt;
|
||||
}
|
||||
return `${prompt}\n\nAnalyze all ${req.images.length} images together.`;
|
||||
}
|
||||
|
||||
function createCodexImageTurnCollector(threadId: string) {
|
||||
let turnId: string | undefined;
|
||||
let completedTurn: CodexTurn | undefined;
|
||||
let promptError: string | undefined;
|
||||
const pending: CodexServerNotification[] = [];
|
||||
const assistantTextByItem = new Map<string, string>();
|
||||
const assistantItemOrder: string[] = [];
|
||||
let resolveCompletion: (() => void) | undefined;
|
||||
const completion = new Promise<void>((resolve) => {
|
||||
resolveCompletion = resolve;
|
||||
});
|
||||
|
||||
const rememberAssistantText = (itemId: string, text: string) => {
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
if (!assistantTextByItem.has(itemId)) {
|
||||
assistantItemOrder.push(itemId);
|
||||
}
|
||||
assistantTextByItem.set(itemId, text);
|
||||
};
|
||||
|
||||
const handleNotification = (notification: CodexServerNotification): void => {
|
||||
const params = isJsonObject(notification.params) ? notification.params : undefined;
|
||||
if (!params || readString(params, "threadId") !== threadId) {
|
||||
return;
|
||||
}
|
||||
if (!turnId) {
|
||||
pending.push(notification);
|
||||
return;
|
||||
}
|
||||
const notificationTurnId = readNotificationTurnId(params);
|
||||
if (notificationTurnId !== turnId) {
|
||||
return;
|
||||
}
|
||||
if (notification.method === "item/agentMessage/delta") {
|
||||
const itemId = readString(params, "itemId") ?? readString(params, "id") ?? "assistant";
|
||||
const delta = readString(params, "delta") ?? "";
|
||||
rememberAssistantText(itemId, `${assistantTextByItem.get(itemId) ?? ""}${delta}`);
|
||||
return;
|
||||
}
|
||||
if (notification.method === "turn/completed") {
|
||||
completedTurn = readCodexTurnCompletedNotification(notification.params)?.turn ?? completedTurn;
|
||||
resolveCompletion?.();
|
||||
return;
|
||||
}
|
||||
if (notification.method === "error") {
|
||||
promptError =
|
||||
readCodexErrorNotification(notification.params)?.error.message ??
|
||||
"codex app-server image turn failed";
|
||||
resolveCompletion?.();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
handleNotification,
|
||||
async collect(
|
||||
startedTurn: CodexTurn,
|
||||
options: { timeoutMs: number; signal: AbortSignal },
|
||||
): Promise<string> {
|
||||
turnId = startedTurn.id;
|
||||
if (isTerminalTurn(startedTurn)) {
|
||||
completedTurn = startedTurn;
|
||||
}
|
||||
for (const notification of pending.splice(0)) {
|
||||
handleNotification(notification);
|
||||
}
|
||||
if (!completedTurn && !promptError) {
|
||||
await waitForTurnCompletion({
|
||||
completion,
|
||||
timeoutMs: options.timeoutMs,
|
||||
signal: options.signal,
|
||||
});
|
||||
}
|
||||
if (promptError) {
|
||||
throw new Error(promptError);
|
||||
}
|
||||
if (completedTurn?.status === "failed") {
|
||||
throw new Error(completedTurn.error?.message ?? "codex app-server image turn failed");
|
||||
}
|
||||
const itemText = collectAssistantTextFromItems(completedTurn?.items);
|
||||
const deltaText = assistantItemOrder
|
||||
.map((itemId) => assistantTextByItem.get(itemId)?.trim())
|
||||
.filter((text): text is string => Boolean(text))
|
||||
.join("\n\n")
|
||||
.trim();
|
||||
const text = (itemText || deltaText).trim();
|
||||
if (!text) {
|
||||
throw new Error("Codex app-server image turn returned no text.");
|
||||
}
|
||||
return text;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
async function waitForTurnCompletion(params: {
|
||||
completion: Promise<void>;
|
||||
timeoutMs: number;
|
||||
signal: AbortSignal;
|
||||
}): Promise<void> {
|
||||
let timeout: ReturnType<typeof setTimeout> | undefined;
|
||||
let cleanupAbort: (() => void) | undefined;
|
||||
try {
|
||||
await Promise.race([
|
||||
params.completion,
|
||||
new Promise<never>((_, reject) => {
|
||||
timeout = setTimeout(
|
||||
() => reject(new Error("codex app-server image turn timed out")),
|
||||
params.timeoutMs,
|
||||
);
|
||||
timeout.unref?.();
|
||||
const abortListener = () => reject(new Error("codex app-server image turn aborted"));
|
||||
params.signal.addEventListener("abort", abortListener, { once: true });
|
||||
cleanupAbort = () => params.signal.removeEventListener("abort", abortListener);
|
||||
}),
|
||||
]);
|
||||
} finally {
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
cleanupAbort?.();
|
||||
}
|
||||
}
|
||||
|
||||
function collectAssistantTextFromItems(items: CodexThreadItem[] | undefined): string {
|
||||
return (items ?? [])
|
||||
.filter((item) => item.type === "agentMessage")
|
||||
.map((item) => item.text.trim())
|
||||
.filter(Boolean)
|
||||
.join("\n\n")
|
||||
.trim();
|
||||
}
|
||||
|
||||
function readNotificationTurnId(record: JsonObject): string | undefined {
|
||||
const direct = readString(record, "turnId");
|
||||
if (direct) {
|
||||
return direct;
|
||||
}
|
||||
return isJsonObject(record.turn) ? readString(record.turn, "id") : undefined;
|
||||
}
|
||||
|
||||
function readString(record: JsonObject, key: string): string | undefined {
|
||||
const value = record[key];
|
||||
return typeof value === "string" ? value : undefined;
|
||||
}
|
||||
|
||||
function isTerminalTurn(turn: CodexTurn): boolean {
|
||||
return turn.status === "completed" || turn.status === "interrupted" || turn.status === "failed";
|
||||
}
|
||||
@@ -3,6 +3,17 @@
|
||||
"name": "Codex",
|
||||
"description": "Codex app-server harness and Codex-managed GPT model catalog.",
|
||||
"providers": ["codex"],
|
||||
"contracts": {
|
||||
"mediaUnderstandingProviders": ["codex"]
|
||||
},
|
||||
"mediaUnderstandingProviderMetadata": {
|
||||
"codex": {
|
||||
"capabilities": ["image"],
|
||||
"defaultModels": {
|
||||
"image": "gpt-5.5"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providerDiscoveryEntry": "./provider-discovery.ts",
|
||||
"syntheticAuthRefs": ["codex"],
|
||||
"nonSecretAuthMarkers": ["codex-app-server"],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-coding-agent": "0.70.0",
|
||||
"ajv": "^8.18.0",
|
||||
"ws": "^8.20.0",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
|
||||
@@ -60,6 +60,7 @@ async function handleMessageToolCall(
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
callId: "call-1",
|
||||
namespace: null,
|
||||
tool: "message",
|
||||
arguments: arguments_,
|
||||
});
|
||||
@@ -85,6 +86,7 @@ describe("createCodexDynamicToolBridge", () => {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
callId: "call-1",
|
||||
namespace: null,
|
||||
tool: toolName,
|
||||
arguments: { prompt: "hello" },
|
||||
});
|
||||
@@ -117,6 +119,7 @@ describe("createCodexDynamicToolBridge", () => {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
callId: "call-1",
|
||||
namespace: null,
|
||||
tool: "tts",
|
||||
arguments: { text: "hello" },
|
||||
});
|
||||
@@ -232,6 +235,7 @@ describe("createCodexDynamicToolBridge", () => {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
callId: "call-1",
|
||||
namespace: null,
|
||||
tool: "exec",
|
||||
arguments: { command: "git status" },
|
||||
});
|
||||
@@ -254,6 +258,7 @@ describe("createCodexDynamicToolBridge", () => {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
callId: "call-1",
|
||||
namespace: null,
|
||||
tool: "exec",
|
||||
arguments: { command: "pwd" },
|
||||
});
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
type JsonObject,
|
||||
type JsonValue,
|
||||
} from "./protocol.js";
|
||||
import { readCodexTurn } from "./protocol-validators.js";
|
||||
|
||||
export type CodexAppServerToolTelemetry = {
|
||||
didSendViaMessagingTool: boolean;
|
||||
@@ -797,28 +798,5 @@ function readItem(value: JsonValue | undefined): CodexThreadItem | undefined {
|
||||
}
|
||||
|
||||
function readTurn(value: JsonValue | undefined): CodexTurn | undefined {
|
||||
if (!isJsonObject(value)) {
|
||||
return undefined;
|
||||
}
|
||||
const id = typeof value.id === "string" ? value.id : undefined;
|
||||
const status = typeof value.status === "string" ? value.status : undefined;
|
||||
if (!id || !status) {
|
||||
return undefined;
|
||||
}
|
||||
const items = Array.isArray(value.items)
|
||||
? value.items.flatMap((item) => {
|
||||
const parsed = readItem(item);
|
||||
return parsed ? [parsed] : [];
|
||||
})
|
||||
: undefined;
|
||||
return {
|
||||
id,
|
||||
status: status as CodexTurn["status"],
|
||||
error: isJsonObject(value.error)
|
||||
? {
|
||||
message: typeof value.error.message === "string" ? value.error.message : undefined,
|
||||
}
|
||||
: null,
|
||||
items,
|
||||
};
|
||||
return readCodexTurn(value);
|
||||
}
|
||||
|
||||
@@ -58,13 +58,20 @@ describe("listCodexAppServerModels", () => {
|
||||
{
|
||||
id: "gpt-5.4",
|
||||
model: "gpt-5.4",
|
||||
upgrade: null,
|
||||
upgradeInfo: null,
|
||||
availabilityNux: null,
|
||||
displayName: "gpt-5.4",
|
||||
description: "GPT-5.4",
|
||||
hidden: false,
|
||||
inputModalities: ["text", "image"],
|
||||
supportedReasoningEfforts: [
|
||||
{ reasoningEffort: "low", description: "fast" },
|
||||
{ reasoningEffort: "xhigh", description: "deep" },
|
||||
],
|
||||
defaultReasoningEffort: "medium",
|
||||
supportsPersonality: false,
|
||||
additionalSpeedTiers: [],
|
||||
isDefault: true,
|
||||
},
|
||||
],
|
||||
@@ -78,6 +85,8 @@ describe("listCodexAppServerModels", () => {
|
||||
id: "gpt-5.4",
|
||||
model: "gpt-5.4",
|
||||
displayName: "gpt-5.4",
|
||||
description: "GPT-5.4",
|
||||
hidden: false,
|
||||
inputModalities: ["text", "image"],
|
||||
supportedReasoningEfforts: ["low", "xhigh"],
|
||||
defaultReasoningEffort: "medium",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { CodexAppServerStartOptions } from "./config.js";
|
||||
import { type JsonObject, type JsonValue } from "./protocol.js";
|
||||
import type { v2 } from "./protocol-generated/typescript/index.js";
|
||||
import { readCodexModelListResponse } from "./protocol-validators.js";
|
||||
import {
|
||||
createIsolatedCodexAppServerClient,
|
||||
getSharedCodexAppServerClient,
|
||||
@@ -49,7 +50,7 @@ export async function listCodexAppServerModels(
|
||||
authProfileId: options.authProfileId,
|
||||
});
|
||||
try {
|
||||
const response = await client.request<JsonObject>(
|
||||
const response = await client.request<unknown>(
|
||||
"model/list",
|
||||
{
|
||||
limit: options.limit ?? null,
|
||||
@@ -66,21 +67,19 @@ export async function listCodexAppServerModels(
|
||||
}
|
||||
}
|
||||
|
||||
function readModelListResult(value: JsonValue | undefined): CodexAppServerModelListResult {
|
||||
if (!isJsonObjectValue(value) || !Array.isArray(value.data)) {
|
||||
export function readModelListResult(value: unknown): CodexAppServerModelListResult {
|
||||
const response = readCodexModelListResponse(value);
|
||||
if (!response) {
|
||||
return { models: [] };
|
||||
}
|
||||
const models = value.data
|
||||
const models = response.data
|
||||
.map((entry) => readCodexModel(entry))
|
||||
.filter((entry): entry is CodexAppServerModel => entry !== undefined);
|
||||
const nextCursor = typeof value.nextCursor === "string" ? value.nextCursor : undefined;
|
||||
const nextCursor = response.nextCursor ?? undefined;
|
||||
return { models, ...(nextCursor ? { nextCursor } : {}) };
|
||||
}
|
||||
|
||||
function readCodexModel(value: unknown): CodexAppServerModel | undefined {
|
||||
if (!isJsonObjectValue(value)) {
|
||||
return undefined;
|
||||
}
|
||||
function readCodexModel(value: v2.Model): CodexAppServerModel | undefined {
|
||||
const id = readNonEmptyString(value.id);
|
||||
const model = readNonEmptyString(value.model) ?? id;
|
||||
if (!id || !model) {
|
||||
@@ -95,9 +94,9 @@ function readCodexModel(value: unknown): CodexAppServerModel | undefined {
|
||||
...(readNonEmptyString(value.description)
|
||||
? { description: readNonEmptyString(value.description) }
|
||||
: {}),
|
||||
...(typeof value.hidden === "boolean" ? { hidden: value.hidden } : {}),
|
||||
...(typeof value.isDefault === "boolean" ? { isDefault: value.isDefault } : {}),
|
||||
inputModalities: readStringArray(value.inputModalities),
|
||||
hidden: value.hidden,
|
||||
isDefault: value.isDefault,
|
||||
inputModalities: value.inputModalities,
|
||||
supportedReasoningEfforts: readReasoningEfforts(value.supportedReasoningEfforts),
|
||||
...(readNonEmptyString(value.defaultReasoningEffort)
|
||||
? { defaultReasoningEffort: readNonEmptyString(value.defaultReasoningEffort) }
|
||||
@@ -105,34 +104,13 @@ function readCodexModel(value: unknown): CodexAppServerModel | undefined {
|
||||
};
|
||||
}
|
||||
|
||||
function readReasoningEfforts(value: unknown): string[] {
|
||||
if (!Array.isArray(value)) {
|
||||
return [];
|
||||
}
|
||||
function readReasoningEfforts(value: v2.ReasoningEffortOption[]): string[] {
|
||||
const efforts = value
|
||||
.map((entry) => {
|
||||
if (!isJsonObjectValue(entry)) {
|
||||
return undefined;
|
||||
}
|
||||
return readNonEmptyString(entry.reasoningEffort);
|
||||
})
|
||||
.map((entry) => readNonEmptyString(entry.reasoningEffort))
|
||||
.filter((entry): entry is string => entry !== undefined);
|
||||
return [...new Set(efforts)];
|
||||
}
|
||||
|
||||
function readStringArray(value: unknown): string[] {
|
||||
if (!Array.isArray(value)) {
|
||||
return [];
|
||||
}
|
||||
return [
|
||||
...new Set(
|
||||
value
|
||||
.map((entry) => readNonEmptyString(entry))
|
||||
.filter((entry): entry is string => entry !== undefined),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
function readNonEmptyString(value: unknown): string | undefined {
|
||||
if (typeof value !== "string") {
|
||||
return undefined;
|
||||
@@ -140,7 +118,3 @@ function readNonEmptyString(value: unknown): string | undefined {
|
||||
const trimmed = value.trim();
|
||||
return trimmed || undefined;
|
||||
}
|
||||
|
||||
function isJsonObjectValue(value: unknown): value is JsonObject {
|
||||
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"arguments": true,
|
||||
"callId": {
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"tool": {
|
||||
"type": "string"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"arguments",
|
||||
"callId",
|
||||
"threadId",
|
||||
"tool",
|
||||
"turnId"
|
||||
],
|
||||
"title": "DynamicToolCallParams",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"CodexErrorInfo": {
|
||||
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
|
||||
"oneOf": [
|
||||
{
|
||||
"enum": [
|
||||
"contextWindowExceeded",
|
||||
"usageLimitExceeded",
|
||||
"serverOverloaded",
|
||||
"cyberPolicy",
|
||||
"internalServerError",
|
||||
"unauthorized",
|
||||
"badRequest",
|
||||
"threadRollbackFailed",
|
||||
"sandboxError",
|
||||
"other"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"httpConnectionFailed": {
|
||||
"properties": {
|
||||
"httpStatusCode": {
|
||||
"format": "uint16",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"httpConnectionFailed"
|
||||
],
|
||||
"title": "HttpConnectionFailedCodexErrorInfo",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "Failed to connect to the response SSE stream.",
|
||||
"properties": {
|
||||
"responseStreamConnectionFailed": {
|
||||
"properties": {
|
||||
"httpStatusCode": {
|
||||
"format": "uint16",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"responseStreamConnectionFailed"
|
||||
],
|
||||
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
|
||||
"properties": {
|
||||
"responseStreamDisconnected": {
|
||||
"properties": {
|
||||
"httpStatusCode": {
|
||||
"format": "uint16",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"responseStreamDisconnected"
|
||||
],
|
||||
"title": "ResponseStreamDisconnectedCodexErrorInfo",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "Reached the retry limit for responses.",
|
||||
"properties": {
|
||||
"responseTooManyFailedAttempts": {
|
||||
"properties": {
|
||||
"httpStatusCode": {
|
||||
"format": "uint16",
|
||||
"minimum": 0.0,
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"responseTooManyFailedAttempts"
|
||||
],
|
||||
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
|
||||
"properties": {
|
||||
"activeTurnNotSteerable": {
|
||||
"properties": {
|
||||
"turnKind": {
|
||||
"$ref": "#/definitions/NonSteerableTurnKind"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"turnKind"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"activeTurnNotSteerable"
|
||||
],
|
||||
"title": "ActiveTurnNotSteerableCodexErrorInfo",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"NonSteerableTurnKind": {
|
||||
"enum": [
|
||||
"review",
|
||||
"compact"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"TurnError": {
|
||||
"properties": {
|
||||
"additionalDetails": {
|
||||
"default": null,
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"codexErrorInfo": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/CodexErrorInfo"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"error": {
|
||||
"$ref": "#/definitions/TurnError"
|
||||
},
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
},
|
||||
"willRetry": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"error",
|
||||
"threadId",
|
||||
"turnId",
|
||||
"willRetry"
|
||||
],
|
||||
"title": "ErrorNotification",
|
||||
"type": "object"
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"InputModality": {
|
||||
"description": "Canonical user-input modality tags advertised by a model.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Plain text turns and tool payloads.",
|
||||
"enum": [
|
||||
"text"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "Image attachments included in user turns.",
|
||||
"enum": [
|
||||
"image"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Model": {
|
||||
"properties": {
|
||||
"additionalSpeedTiers": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"availabilityNux": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ModelAvailabilityNux"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"defaultReasoningEffort": {
|
||||
"$ref": "#/definitions/ReasoningEffort"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"inputModalities": {
|
||||
"default": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"items": {
|
||||
"$ref": "#/definitions/InputModality"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"isDefault": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"supportedReasoningEfforts": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/ReasoningEffortOption"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"supportsPersonality": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"upgrade": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"upgradeInfo": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ModelUpgradeInfo"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"defaultReasoningEffort",
|
||||
"description",
|
||||
"displayName",
|
||||
"hidden",
|
||||
"id",
|
||||
"isDefault",
|
||||
"model",
|
||||
"supportedReasoningEfforts"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ModelAvailabilityNux": {
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ModelUpgradeInfo": {
|
||||
"properties": {
|
||||
"migrationMarkdown": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
"modelLink": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"upgradeCopy": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"model"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ReasoningEffort": {
|
||||
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
|
||||
"enum": [
|
||||
"none",
|
||||
"minimal",
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
"xhigh"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ReasoningEffortOption": {
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"reasoningEffort": {
|
||||
"$ref": "#/definitions/ReasoningEffort"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"description",
|
||||
"reasoningEffort"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"data": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Model"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"nextCursor": {
|
||||
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
],
|
||||
"title": "ModelListResponse",
|
||||
"type": "object"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* A path that is guaranteed to be absolute and normalized (though it is not
|
||||
* guaranteed to be canonicalized or exist on the filesystem).
|
||||
*
|
||||
* IMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set
|
||||
* using [AbsolutePathBufGuard::new]. If no base path is set, the
|
||||
* deserialization will fail unless the path being deserialized is already
|
||||
* absolute.
|
||||
*/
|
||||
export type AbsolutePathBuf = string;
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type AgentPath = string;
|
||||
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FileChange } from "./FileChange.js";
|
||||
import type { ThreadId } from "./ThreadId.js";
|
||||
|
||||
export type ApplyPatchApprovalParams = { conversationId: ThreadId,
|
||||
/**
|
||||
* Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent]
|
||||
* and [codex_protocol::protocol::PatchApplyEndEvent].
|
||||
*/
|
||||
callId: string, fileChanges: { [key in string]?: FileChange },
|
||||
/**
|
||||
* Optional explanatory reason (e.g. request for extra write access).
|
||||
*/
|
||||
reason: string | null,
|
||||
/**
|
||||
* When set, the agent is asking the user to allow writes under this root
|
||||
* for the remainder of the session (unclear if this is honored today).
|
||||
*/
|
||||
grantRoot: string | null, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReviewDecision } from "./ReviewDecision.js";
|
||||
|
||||
export type ApplyPatchApprovalResponse = { decision: ReviewDecision, };
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Authentication mode for OpenAI-backed providers.
|
||||
*/
|
||||
export type AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens" | "agentIdentity";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ClientInfo = { name: string, title: string | null, version: string, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ClientNotification = { "method": "initialized" };
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ModeKind } from "./ModeKind.js";
|
||||
import type { Settings } from "./Settings.js";
|
||||
|
||||
/**
|
||||
* Collaboration mode for a Codex session.
|
||||
*/
|
||||
export type CollaborationMode = { mode: ModeKind, settings: Settings, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ImageDetail } from "./ImageDetail.js";
|
||||
|
||||
export type ContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "output_text", text: string, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ConversationGitInfo = { sha: string | null, branch: string | null, origin_url: string | null, };
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ConversationGitInfo } from "./ConversationGitInfo.js";
|
||||
import type { SessionSource } from "./SessionSource.js";
|
||||
import type { ThreadId } from "./ThreadId.js";
|
||||
|
||||
export type ConversationSummary = { conversationId: ThreadId, path: string, preview: string, timestamp: string | null, updatedAt: string | null, modelProvider: string, cwd: string, cliVersion: string, source: SessionSource, gitInfo: ConversationGitInfo | null, };
|
||||
@@ -0,0 +1,16 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ParsedCommand } from "./ParsedCommand.js";
|
||||
import type { ThreadId } from "./ThreadId.js";
|
||||
|
||||
export type ExecCommandApprovalParams = { conversationId: ThreadId,
|
||||
/**
|
||||
* Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent]
|
||||
* and [codex_protocol::protocol::ExecCommandEndEvent].
|
||||
*/
|
||||
callId: string,
|
||||
/**
|
||||
* Identifier for this specific approval callback.
|
||||
*/
|
||||
approvalId: string | null, command: Array<string>, cwd: string, reason: string | null, parsedCmd: Array<ParsedCommand>, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReviewDecision } from "./ReviewDecision.js";
|
||||
|
||||
export type ExecCommandApprovalResponse = { decision: ReviewDecision, };
|
||||
@@ -0,0 +1,12 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Proposed execpolicy change to allow commands starting with this prefix.
|
||||
*
|
||||
* The `command` tokens form the prefix that would be added as an execpolicy
|
||||
* `prefix_rule(..., decision="allow")`, letting the agent bypass approval for
|
||||
* commands that start with this token sequence.
|
||||
*/
|
||||
export type ExecPolicyAmendment = Array<string>;
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type FileChange = { "type": "add", content: string, } | { "type": "delete", content: string, } | { "type": "update", unified_diff: string, move_path: string | null, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ForcedLoginMethod = "chatgpt" | "api";
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem.js";
|
||||
|
||||
export type FunctionCallOutputBody = string | Array<FunctionCallOutputContentItem>;
|
||||
@@ -0,0 +1,10 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ImageDetail } from "./ImageDetail.js";
|
||||
|
||||
/**
|
||||
* Responses API compatible content items that can be returned by a tool call.
|
||||
* This is a subset of ContentItem with the types we support as function call outputs.
|
||||
*/
|
||||
export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type FuzzyFileSearchMatchType = "file" | "directory";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type FuzzyFileSearchParams = { query: string, roots: Array<string>, cancellationToken: string | null, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js";
|
||||
|
||||
export type FuzzyFileSearchResponse = { files: Array<FuzzyFileSearchResult>, };
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FuzzyFileSearchMatchType } from "./FuzzyFileSearchMatchType.js";
|
||||
|
||||
/**
|
||||
* Superset of [`codex_file_search::FileMatch`]
|
||||
*/
|
||||
export type FuzzyFileSearchResult = { root: string, path: string, match_type: FuzzyFileSearchMatchType, file_name: string, score: number, indices: Array<number> | null, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type FuzzyFileSearchSessionCompletedNotification = { sessionId: string, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js";
|
||||
|
||||
export type FuzzyFileSearchSessionUpdatedNotification = { sessionId: string, query: string, files: Array<FuzzyFileSearchResult>, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GetAuthStatusParams = { includeToken: boolean | null, refreshToken: boolean | null, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AuthMode } from "./AuthMode.js";
|
||||
|
||||
export type GetAuthStatusResponse = { authMethod: AuthMode | null, authToken: string | null, requiresOpenaiAuth: boolean | null, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ThreadId } from "./ThreadId.js";
|
||||
|
||||
export type GetConversationSummaryParams = { rolloutPath: string, } | { conversationId: ThreadId, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ConversationSummary } from "./ConversationSummary.js";
|
||||
|
||||
export type GetConversationSummaryResponse = { summary: ConversationSummary, };
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Details of a ghost commit created from a repository state.
|
||||
*/
|
||||
export type GhostCommit = { id: string, parent: string | null, preexisting_untracked_files: Array<string>, preexisting_untracked_dirs: Array<string>, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GitDiffToRemoteParams = { cwd: string, };
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GitSha } from "./GitSha.js";
|
||||
|
||||
export type GitDiffToRemoteResponse = { sha: GitSha, diff: string, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GitSha = string;
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ImageDetail = "auto" | "low" | "high" | "original";
|
||||
@@ -0,0 +1,17 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Client-declared capabilities negotiated during initialize.
|
||||
*/
|
||||
export type InitializeCapabilities = {
|
||||
/**
|
||||
* Opt into receiving experimental API methods and fields.
|
||||
*/
|
||||
experimentalApi: boolean,
|
||||
/**
|
||||
* Exact notification method names that should be suppressed for this
|
||||
* connection (for example `thread/started`).
|
||||
*/
|
||||
optOutNotificationMethods?: Array<string> | null, };
|
||||
@@ -0,0 +1,7 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ClientInfo } from "./ClientInfo.js";
|
||||
import type { InitializeCapabilities } from "./InitializeCapabilities.js";
|
||||
|
||||
export type InitializeParams = { clientInfo: ClientInfo, capabilities: InitializeCapabilities | null, };
|
||||
@@ -0,0 +1,20 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AbsolutePathBuf } from "./AbsolutePathBuf.js";
|
||||
|
||||
export type InitializeResponse = { userAgent: string,
|
||||
/**
|
||||
* Absolute path to the server's $CODEX_HOME directory.
|
||||
*/
|
||||
codexHome: AbsolutePathBuf,
|
||||
/**
|
||||
* Platform family for the running app-server target, for example
|
||||
* `"unix"` or `"windows"`.
|
||||
*/
|
||||
platformFamily: string,
|
||||
/**
|
||||
* Operating system for the running app-server target, for example
|
||||
* `"macos"`, `"linux"`, or `"windows"`.
|
||||
*/
|
||||
platformOs: string, };
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Canonical user-input modality tags advertised by a model.
|
||||
*/
|
||||
export type InputModality = "text" | "image";
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { LocalShellExecAction } from "./LocalShellExecAction.js";
|
||||
|
||||
export type LocalShellAction = { "type": "exec" } & LocalShellExecAction;
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LocalShellExecAction = { command: Array<string>, timeout_ms: bigint | null, working_directory: string | null, env: { [key in string]?: string } | null, user: string | null, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LocalShellStatus = "completed" | "in_progress" | "incomplete";
|
||||
@@ -0,0 +1,11 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Classifies an assistant message as interim commentary or final answer text.
|
||||
*
|
||||
* Providers do not emit this consistently, so callers must treat `None` as
|
||||
* "phase unknown" and keep compatibility behavior for legacy models.
|
||||
*/
|
||||
export type MessagePhase = "commentary" | "final_answer";
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Initial collaboration mode to use when the TUI starts.
|
||||
*/
|
||||
export type ModeKind = "plan" | "default";
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js";
|
||||
|
||||
export type NetworkPolicyAmendment = { host: string, action: NetworkPolicyRuleAction, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type NetworkPolicyRuleAction = "allow" | "deny";
|
||||
@@ -0,0 +1,12 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ParsedCommand = { "type": "read", cmd: string, name: string,
|
||||
/**
|
||||
* (Best effort) Path to the file being read by the command. When
|
||||
* possible, this is an absolute path, though when relative, it should
|
||||
* be resolved against the `cwd`` that will be used to run the command
|
||||
* to derive the absolute path.
|
||||
*/
|
||||
path: string, } | { "type": "list_files", cmd: string, path: string | null, } | { "type": "search", cmd: string, query: string | null, path: string | null, } | { "type": "unknown", cmd: string, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Personality = "none" | "friendly" | "pragmatic";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RealtimeConversationVersion = "v1" | "v2";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RealtimeOutputModality = "text" | "audio";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RealtimeVoice = "alloy" | "arbor" | "ash" | "ballad" | "breeze" | "cedar" | "coral" | "cove" | "echo" | "ember" | "juniper" | "maple" | "marin" | "sage" | "shimmer" | "sol" | "spruce" | "vale" | "verse";
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { RealtimeVoice } from "./RealtimeVoice.js";
|
||||
|
||||
export type RealtimeVoicesList = { v1: Array<RealtimeVoice>, v2: Array<RealtimeVoice>, defaultV1: RealtimeVoice, defaultV2: RealtimeVoice, };
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning
|
||||
*/
|
||||
export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ReasoningItemContent = { "type": "reasoning_text", text: string, } | { "type": "text", text: string, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ReasoningItemReasoningSummary = { "type": "summary_text", text: string, };
|
||||
@@ -0,0 +1,10 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* A summary of the reasoning performed by the model. This can be useful for
|
||||
* debugging and understanding the model's reasoning process.
|
||||
* See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries
|
||||
*/
|
||||
export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RequestId = string | number;
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { JsonValue } from "./serde_json/JsonValue.js";
|
||||
|
||||
/**
|
||||
* A known resource that the server is capable of reading.
|
||||
*/
|
||||
export type Resource = { annotations?: JsonValue, description?: string, mimeType?: string, name: string, size?: number, title?: string, uri: string, icons?: Array<JsonValue>, _meta?: JsonValue, };
|
||||
@@ -0,0 +1,17 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { JsonValue } from "./serde_json/JsonValue.js";
|
||||
|
||||
/**
|
||||
* Contents returned when reading a resource from an MCP server.
|
||||
*/
|
||||
export type ResourceContent = {
|
||||
/**
|
||||
* The URI of this resource.
|
||||
*/
|
||||
uri: string, mimeType?: string, text: string, _meta?: JsonValue, } | {
|
||||
/**
|
||||
* The URI of this resource.
|
||||
*/
|
||||
uri: string, mimeType?: string, blob: string, _meta?: JsonValue, };
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { JsonValue } from "./serde_json/JsonValue.js";
|
||||
|
||||
/**
|
||||
* A template description for resources available on the server.
|
||||
*/
|
||||
export type ResourceTemplate = { annotations?: JsonValue, uriTemplate: string, name: string, title?: string, description?: string, mimeType?: string, };
|
||||
@@ -0,0 +1,18 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ContentItem } from "./ContentItem.js";
|
||||
import type { FunctionCallOutputBody } from "./FunctionCallOutputBody.js";
|
||||
import type { GhostCommit } from "./GhostCommit.js";
|
||||
import type { LocalShellAction } from "./LocalShellAction.js";
|
||||
import type { LocalShellStatus } from "./LocalShellStatus.js";
|
||||
import type { MessagePhase } from "./MessagePhase.js";
|
||||
import type { ReasoningItemContent } from "./ReasoningItemContent.js";
|
||||
import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary.js";
|
||||
import type { WebSearchAction } from "./WebSearchAction.js";
|
||||
|
||||
export type ResponseItem = { "type": "message", role: string, content: Array<ContentItem>, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array<ReasoningItemReasoningSummary>, content?: Array<ReasoningItemContent>, encrypted_content: string | null, } | { "type": "local_shell_call",
|
||||
/**
|
||||
* Set when using the Responses API.
|
||||
*/
|
||||
call_id: string | null, status: LocalShellStatus, action: LocalShellAction, } | { "type": "function_call", name: string, namespace?: string, arguments: string, call_id: string, } | { "type": "tool_search_call", call_id: string | null, status?: string, execution: string, arguments: unknown, } | { "type": "function_call_output", call_id: string, output: FunctionCallOutputBody, } | { "type": "custom_tool_call", status?: string, call_id: string, name: string, input: string, } | { "type": "custom_tool_call_output", call_id: string, name?: string, output: FunctionCallOutputBody, } | { "type": "tool_search_output", call_id: string | null, status: string, execution: string, tools: unknown[], } | { "type": "web_search_call", status?: string, action?: WebSearchAction, } | { "type": "image_generation_call", id: string, status: string, revised_prompt?: string, result: string, } | { "type": "ghost_snapshot", ghost_commit: GhostCommit, } | { "type": "compaction", encrypted_content: string, } | { "type": "other" };
|
||||
@@ -0,0 +1,10 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js";
|
||||
import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js";
|
||||
|
||||
/**
|
||||
* User's decision in response to an ExecApprovalRequest.
|
||||
*/
|
||||
export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "timed_out" | "abort";
|
||||
@@ -0,0 +1,67 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification.js";
|
||||
import type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification.js";
|
||||
import type { AccountLoginCompletedNotification } from "./v2/AccountLoginCompletedNotification.js";
|
||||
import type { AccountRateLimitsUpdatedNotification } from "./v2/AccountRateLimitsUpdatedNotification.js";
|
||||
import type { AccountUpdatedNotification } from "./v2/AccountUpdatedNotification.js";
|
||||
import type { AgentMessageDeltaNotification } from "./v2/AgentMessageDeltaNotification.js";
|
||||
import type { AppListUpdatedNotification } from "./v2/AppListUpdatedNotification.js";
|
||||
import type { CommandExecOutputDeltaNotification } from "./v2/CommandExecOutputDeltaNotification.js";
|
||||
import type { CommandExecutionOutputDeltaNotification } from "./v2/CommandExecutionOutputDeltaNotification.js";
|
||||
import type { ConfigWarningNotification } from "./v2/ConfigWarningNotification.js";
|
||||
import type { ContextCompactedNotification } from "./v2/ContextCompactedNotification.js";
|
||||
import type { DeprecationNoticeNotification } from "./v2/DeprecationNoticeNotification.js";
|
||||
import type { ErrorNotification } from "./v2/ErrorNotification.js";
|
||||
import type { ExternalAgentConfigImportCompletedNotification } from "./v2/ExternalAgentConfigImportCompletedNotification.js";
|
||||
import type { FileChangeOutputDeltaNotification } from "./v2/FileChangeOutputDeltaNotification.js";
|
||||
import type { FileChangePatchUpdatedNotification } from "./v2/FileChangePatchUpdatedNotification.js";
|
||||
import type { FsChangedNotification } from "./v2/FsChangedNotification.js";
|
||||
import type { GuardianWarningNotification } from "./v2/GuardianWarningNotification.js";
|
||||
import type { HookCompletedNotification } from "./v2/HookCompletedNotification.js";
|
||||
import type { HookStartedNotification } from "./v2/HookStartedNotification.js";
|
||||
import type { ItemCompletedNotification } from "./v2/ItemCompletedNotification.js";
|
||||
import type { ItemGuardianApprovalReviewCompletedNotification } from "./v2/ItemGuardianApprovalReviewCompletedNotification.js";
|
||||
import type { ItemGuardianApprovalReviewStartedNotification } from "./v2/ItemGuardianApprovalReviewStartedNotification.js";
|
||||
import type { ItemStartedNotification } from "./v2/ItemStartedNotification.js";
|
||||
import type { McpServerOauthLoginCompletedNotification } from "./v2/McpServerOauthLoginCompletedNotification.js";
|
||||
import type { McpServerStatusUpdatedNotification } from "./v2/McpServerStatusUpdatedNotification.js";
|
||||
import type { McpToolCallProgressNotification } from "./v2/McpToolCallProgressNotification.js";
|
||||
import type { ModelReroutedNotification } from "./v2/ModelReroutedNotification.js";
|
||||
import type { ModelVerificationNotification } from "./v2/ModelVerificationNotification.js";
|
||||
import type { PlanDeltaNotification } from "./v2/PlanDeltaNotification.js";
|
||||
import type { RawResponseItemCompletedNotification } from "./v2/RawResponseItemCompletedNotification.js";
|
||||
import type { ReasoningSummaryPartAddedNotification } from "./v2/ReasoningSummaryPartAddedNotification.js";
|
||||
import type { ReasoningSummaryTextDeltaNotification } from "./v2/ReasoningSummaryTextDeltaNotification.js";
|
||||
import type { ReasoningTextDeltaNotification } from "./v2/ReasoningTextDeltaNotification.js";
|
||||
import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolvedNotification.js";
|
||||
import type { SkillsChangedNotification } from "./v2/SkillsChangedNotification.js";
|
||||
import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification.js";
|
||||
import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification.js";
|
||||
import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification.js";
|
||||
import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification.js";
|
||||
import type { ThreadRealtimeClosedNotification } from "./v2/ThreadRealtimeClosedNotification.js";
|
||||
import type { ThreadRealtimeErrorNotification } from "./v2/ThreadRealtimeErrorNotification.js";
|
||||
import type { ThreadRealtimeItemAddedNotification } from "./v2/ThreadRealtimeItemAddedNotification.js";
|
||||
import type { ThreadRealtimeOutputAudioDeltaNotification } from "./v2/ThreadRealtimeOutputAudioDeltaNotification.js";
|
||||
import type { ThreadRealtimeSdpNotification } from "./v2/ThreadRealtimeSdpNotification.js";
|
||||
import type { ThreadRealtimeStartedNotification } from "./v2/ThreadRealtimeStartedNotification.js";
|
||||
import type { ThreadRealtimeTranscriptDeltaNotification } from "./v2/ThreadRealtimeTranscriptDeltaNotification.js";
|
||||
import type { ThreadRealtimeTranscriptDoneNotification } from "./v2/ThreadRealtimeTranscriptDoneNotification.js";
|
||||
import type { ThreadStartedNotification } from "./v2/ThreadStartedNotification.js";
|
||||
import type { ThreadStatusChangedNotification } from "./v2/ThreadStatusChangedNotification.js";
|
||||
import type { ThreadTokenUsageUpdatedNotification } from "./v2/ThreadTokenUsageUpdatedNotification.js";
|
||||
import type { ThreadUnarchivedNotification } from "./v2/ThreadUnarchivedNotification.js";
|
||||
import type { TurnCompletedNotification } from "./v2/TurnCompletedNotification.js";
|
||||
import type { TurnDiffUpdatedNotification } from "./v2/TurnDiffUpdatedNotification.js";
|
||||
import type { TurnPlanUpdatedNotification } from "./v2/TurnPlanUpdatedNotification.js";
|
||||
import type { TurnStartedNotification } from "./v2/TurnStartedNotification.js";
|
||||
import type { WarningNotification } from "./v2/WarningNotification.js";
|
||||
import type { WindowsSandboxSetupCompletedNotification } from "./v2/WindowsSandboxSetupCompletedNotification.js";
|
||||
import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldWritableWarningNotification.js";
|
||||
|
||||
/**
|
||||
* Notification sent from the server to the client.
|
||||
*/
|
||||
export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "externalAgentConfig/import/completed", "params": ExternalAgentConfigImportCompletedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "model/verification", "params": ModelVerificationNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification };
|
||||
@@ -0,0 +1,18 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ApplyPatchApprovalParams } from "./ApplyPatchApprovalParams.js";
|
||||
import type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams.js";
|
||||
import type { RequestId } from "./RequestId.js";
|
||||
import type { ChatgptAuthTokensRefreshParams } from "./v2/ChatgptAuthTokensRefreshParams.js";
|
||||
import type { CommandExecutionRequestApprovalParams } from "./v2/CommandExecutionRequestApprovalParams.js";
|
||||
import type { DynamicToolCallParams } from "./v2/DynamicToolCallParams.js";
|
||||
import type { FileChangeRequestApprovalParams } from "./v2/FileChangeRequestApprovalParams.js";
|
||||
import type { McpServerElicitationRequestParams } from "./v2/McpServerElicitationRequestParams.js";
|
||||
import type { PermissionsRequestApprovalParams } from "./v2/PermissionsRequestApprovalParams.js";
|
||||
import type { ToolRequestUserInputParams } from "./v2/ToolRequestUserInputParams.js";
|
||||
|
||||
/**
|
||||
* Request initiated from the server and sent to the client.
|
||||
*/
|
||||
export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "mcpServer/elicitation/request", id: RequestId, params: McpServerElicitationRequestParams, } | { "method": "item/permissions/requestApproval", id: RequestId, params: PermissionsRequestApprovalParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ServiceTier = "fast" | "flex";
|
||||
@@ -0,0 +1,6 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { SubAgentSource } from "./SubAgentSource.js";
|
||||
|
||||
export type SessionSource = "cli" | "vscode" | "exec" | "mcp" | { "custom": string } | { "subagent": SubAgentSource } | "unknown";
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReasoningEffort } from "./ReasoningEffort.js";
|
||||
|
||||
/**
|
||||
* Settings for a collaboration mode.
|
||||
*/
|
||||
export type Settings = { model: string, reasoning_effort: ReasoningEffort | null, developer_instructions: string | null, };
|
||||
@@ -0,0 +1,7 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AgentPath } from "./AgentPath.js";
|
||||
import type { ThreadId } from "./ThreadId.js";
|
||||
|
||||
export type SubAgentSource = "review" | "compact" | { "thread_spawn": { parent_thread_id: ThreadId, depth: number, agent_path: AgentPath | null, agent_nickname: string | null, agent_role: string | null, } } | "memory_consolidation" | { "other": string };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ThreadId = string;
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ThreadMemoryMode = "enabled" | "disabled";
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { JsonValue } from "./serde_json/JsonValue.js";
|
||||
|
||||
/**
|
||||
* Definition for a tool the client can call.
|
||||
*/
|
||||
export type Tool = { name: string, title?: string, description?: string, inputSchema: JsonValue, outputSchema?: JsonValue, annotations?: JsonValue, icons?: Array<JsonValue>, _meta?: JsonValue, };
|
||||
@@ -0,0 +1,9 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Controls output length/detail on GPT-5 models via the Responses API.
|
||||
* Serialized with lowercase values to match the OpenAI API.
|
||||
*/
|
||||
export type Verbosity = "low" | "medium" | "high";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WebSearchAction = { "type": "search", query?: string, queries?: Array<string>, } | { "type": "open_page", url?: string, } | { "type": "find_in_page", url?: string, pattern?: string, } | { "type": "other" };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WebSearchContextSize = "low" | "medium" | "high";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WebSearchLocation = { country: string | null, region: string | null, city: string | null, timezone: string | null, };
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WebSearchMode = "disabled" | "cached" | "live";
|
||||
@@ -0,0 +1,7 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { WebSearchContextSize } from "./WebSearchContextSize.js";
|
||||
import type { WebSearchLocation } from "./WebSearchLocation.js";
|
||||
|
||||
export type WebSearchToolConfig = { context_size: WebSearchContextSize | null, allowed_domains: Array<string> | null, location: WebSearchLocation | null, };
|
||||
@@ -0,0 +1,80 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
export type { AbsolutePathBuf } from "./AbsolutePathBuf.js";
|
||||
export type { AgentPath } from "./AgentPath.js";
|
||||
export type { ApplyPatchApprovalParams } from "./ApplyPatchApprovalParams.js";
|
||||
export type { ApplyPatchApprovalResponse } from "./ApplyPatchApprovalResponse.js";
|
||||
export type { AuthMode } from "./AuthMode.js";
|
||||
export type { ClientInfo } from "./ClientInfo.js";
|
||||
export type { ClientNotification } from "./ClientNotification.js";
|
||||
export type { ClientRequest } from "./ClientRequest.js";
|
||||
export type { CollaborationMode } from "./CollaborationMode.js";
|
||||
export type { ContentItem } from "./ContentItem.js";
|
||||
export type { ConversationGitInfo } from "./ConversationGitInfo.js";
|
||||
export type { ConversationSummary } from "./ConversationSummary.js";
|
||||
export type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams.js";
|
||||
export type { ExecCommandApprovalResponse } from "./ExecCommandApprovalResponse.js";
|
||||
export type { ExecPolicyAmendment } from "./ExecPolicyAmendment.js";
|
||||
export type { FileChange } from "./FileChange.js";
|
||||
export type { ForcedLoginMethod } from "./ForcedLoginMethod.js";
|
||||
export type { FunctionCallOutputBody } from "./FunctionCallOutputBody.js";
|
||||
export type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem.js";
|
||||
export type { FuzzyFileSearchMatchType } from "./FuzzyFileSearchMatchType.js";
|
||||
export type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams.js";
|
||||
export type { FuzzyFileSearchResponse } from "./FuzzyFileSearchResponse.js";
|
||||
export type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js";
|
||||
export type { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification.js";
|
||||
export type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification.js";
|
||||
export type { GetAuthStatusParams } from "./GetAuthStatusParams.js";
|
||||
export type { GetAuthStatusResponse } from "./GetAuthStatusResponse.js";
|
||||
export type { GetConversationSummaryParams } from "./GetConversationSummaryParams.js";
|
||||
export type { GetConversationSummaryResponse } from "./GetConversationSummaryResponse.js";
|
||||
export type { GhostCommit } from "./GhostCommit.js";
|
||||
export type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams.js";
|
||||
export type { GitDiffToRemoteResponse } from "./GitDiffToRemoteResponse.js";
|
||||
export type { GitSha } from "./GitSha.js";
|
||||
export type { ImageDetail } from "./ImageDetail.js";
|
||||
export type { InitializeCapabilities } from "./InitializeCapabilities.js";
|
||||
export type { InitializeParams } from "./InitializeParams.js";
|
||||
export type { InitializeResponse } from "./InitializeResponse.js";
|
||||
export type { InputModality } from "./InputModality.js";
|
||||
export type { LocalShellAction } from "./LocalShellAction.js";
|
||||
export type { LocalShellExecAction } from "./LocalShellExecAction.js";
|
||||
export type { LocalShellStatus } from "./LocalShellStatus.js";
|
||||
export type { MessagePhase } from "./MessagePhase.js";
|
||||
export type { ModeKind } from "./ModeKind.js";
|
||||
export type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment.js";
|
||||
export type { NetworkPolicyRuleAction } from "./NetworkPolicyRuleAction.js";
|
||||
export type { ParsedCommand } from "./ParsedCommand.js";
|
||||
export type { Personality } from "./Personality.js";
|
||||
export type { PlanType } from "./PlanType.js";
|
||||
export type { RealtimeConversationVersion } from "./RealtimeConversationVersion.js";
|
||||
export type { RealtimeOutputModality } from "./RealtimeOutputModality.js";
|
||||
export type { RealtimeVoice } from "./RealtimeVoice.js";
|
||||
export type { RealtimeVoicesList } from "./RealtimeVoicesList.js";
|
||||
export type { ReasoningEffort } from "./ReasoningEffort.js";
|
||||
export type { ReasoningItemContent } from "./ReasoningItemContent.js";
|
||||
export type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary.js";
|
||||
export type { ReasoningSummary } from "./ReasoningSummary.js";
|
||||
export type { RequestId } from "./RequestId.js";
|
||||
export type { Resource } from "./Resource.js";
|
||||
export type { ResourceContent } from "./ResourceContent.js";
|
||||
export type { ResourceTemplate } from "./ResourceTemplate.js";
|
||||
export type { ResponseItem } from "./ResponseItem.js";
|
||||
export type { ReviewDecision } from "./ReviewDecision.js";
|
||||
export type { ServerNotification } from "./ServerNotification.js";
|
||||
export type { ServerRequest } from "./ServerRequest.js";
|
||||
export type { ServiceTier } from "./ServiceTier.js";
|
||||
export type { SessionSource } from "./SessionSource.js";
|
||||
export type { Settings } from "./Settings.js";
|
||||
export type { SubAgentSource } from "./SubAgentSource.js";
|
||||
export type { ThreadId } from "./ThreadId.js";
|
||||
export type { ThreadMemoryMode } from "./ThreadMemoryMode.js";
|
||||
export type { Tool } from "./Tool.js";
|
||||
export type { Verbosity } from "./Verbosity.js";
|
||||
export type { WebSearchAction } from "./WebSearchAction.js";
|
||||
export type { WebSearchContextSize } from "./WebSearchContextSize.js";
|
||||
export type { WebSearchLocation } from "./WebSearchLocation.js";
|
||||
export type { WebSearchMode } from "./WebSearchMode.js";
|
||||
export type { WebSearchToolConfig } from "./WebSearchToolConfig.js";
|
||||
export * as v2 from "./v2/index.js";
|
||||
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type JsonValue = number | string | boolean | Array<JsonValue> | { [key in string]?: JsonValue } | null;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user