feat(codex): require Codex 0.156 and regenerate its protocol (#13481)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
567783ecdc
commit
d5d48742c9
14 files changed
+13611
-1823
No files matched your search
@@ -2383,6 +2383,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => {
|
||||
method: "item/tool/requestUserInput",
|
||||
requestId: ApprovalRequestId.make("req-user-input-1"),
|
||||
payload: {
|
||||
isBlocking: true,
|
||||
itemId: "item-user-input-1",
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
|
||||
@@ -441,7 +441,7 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
|
||||
requestAllCodexModels(client),
|
||||
// Usage is an enrichment: a failure or a slow answer degrades to "no
|
||||
// usage this probe" rather than costing the account and models.
|
||||
client.request("account/rateLimits/read", undefined).pipe(
|
||||
client.request("account/rateLimits/read", null).pipe(
|
||||
Effect.map((response): CodexRateLimitsProbe => ({
|
||||
snapshot: response.rateLimits,
|
||||
rateLimitsByLimitId: response.rateLimitsByLimitId,
|
||||
|
||||
@@ -90,25 +90,28 @@ describe("Codex thread history", () => {
|
||||
);
|
||||
}
|
||||
|
||||
it.effect("keeps the count-based rollback API for older threads", () =>
|
||||
it.effect("surfaces Codex rejecting a revert of a legacy thread", () =>
|
||||
Effect.gen(function* () {
|
||||
const rejection = CodexErrors.CodexAppServerRequestError.invalidRequest(
|
||||
"thread/revert only supports paginated threads",
|
||||
);
|
||||
const client: Parameters<typeof rollbackCodexThread>[0] = {
|
||||
raw: { request: () => Effect.succeed({ thread: {} }) },
|
||||
request: <M extends CodexRpc.ClientRequestMethod>(
|
||||
method: M,
|
||||
params: CodexRpc.ClientRequestParamsByMethod[M],
|
||||
) => {
|
||||
NodeAssert.equal(method, "thread/rollback");
|
||||
NodeAssert.deepEqual(params, { threadId: "legacy-thread", numTurns: 2 });
|
||||
raw: {
|
||||
request: (method) => {
|
||||
if (method === "thread/read") return Effect.succeed({ thread: {} });
|
||||
if (method === "thread/revert") return Effect.fail(rejection);
|
||||
return Effect.die(`Unexpected raw request: ${method}`);
|
||||
},
|
||||
},
|
||||
request: <M extends CodexRpc.ClientRequestMethod>(method: M) => {
|
||||
NodeAssert.equal(method, "thread/read");
|
||||
return Effect.succeed({
|
||||
thread: { id: "legacy-thread", turns: [] },
|
||||
thread: { id: "legacy-thread", turns: [{ id: "turn-1", items: [] }] },
|
||||
} as unknown as CodexRpc.ClientRequestResponsesByMethod[M]);
|
||||
},
|
||||
};
|
||||
NodeAssert.deepEqual(yield* rollbackCodexThread(client, "legacy-thread", 2), {
|
||||
threadId: "legacy-thread",
|
||||
turns: [],
|
||||
});
|
||||
const error = yield* Effect.flip(rollbackCodexThread(client, "legacy-thread", 1));
|
||||
NodeAssert.strictEqual(error, rejection);
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -680,6 +683,7 @@ function makeThreadStartedNotification(
|
||||
id: threadId,
|
||||
modelProvider: "openai",
|
||||
preview: "",
|
||||
projectId: null,
|
||||
sessionId: threadId,
|
||||
source,
|
||||
status: { type: "idle" as const },
|
||||
|
||||
@@ -163,8 +163,7 @@ export type CodexTurnStartParamsWithCollaborationMode =
|
||||
export type CodexResumeCursor = typeof CodexResumeCursorSchema.Type;
|
||||
type CodexServiceTier = NonNullable<EffectCodexSchema.V2ThreadStartParams["serviceTier"]>;
|
||||
type CodexThreadItem =
|
||||
| EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number]
|
||||
| EffectCodexSchema.V2ThreadRollbackResponse["thread"]["turns"][number]["items"][number];
|
||||
EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number];
|
||||
|
||||
export interface CodexSessionRuntimeOptions {
|
||||
readonly threadId: ThreadId;
|
||||
@@ -1185,7 +1184,7 @@ function updateSession(
|
||||
}
|
||||
|
||||
function parseThreadSnapshot(
|
||||
response: EffectCodexSchema.V2ThreadReadResponse | EffectCodexSchema.V2ThreadRollbackResponse,
|
||||
response: EffectCodexSchema.V2ThreadReadResponse,
|
||||
): CodexThreadSnapshot {
|
||||
return {
|
||||
threadId: response.thread.id,
|
||||
@@ -1273,11 +1272,8 @@ export const rollbackCodexThread = Effect.fn("rollbackCodexThread")(function* (
|
||||
threadId: string,
|
||||
numTurns: number,
|
||||
): Effect.fn.Return<CodexThreadSnapshot, CodexErrors.CodexAppServerError> {
|
||||
if ((yield* readCodexHistoryMode(client, threadId)) !== "paginated") {
|
||||
return parseThreadSnapshot(yield* client.request("thread/rollback", { threadId, numTurns }));
|
||||
}
|
||||
// Paginated threads replace history at a turn boundary instead of supporting
|
||||
// the legacy count-based rollback endpoint.
|
||||
// Codex replaces history at a turn boundary. It rejects threads that still
|
||||
// use legacy history, which have no rollback API since Codex 0.156.
|
||||
const snapshot = yield* readCodexThread(client, threadId);
|
||||
const retainedCount = Math.max(0, snapshot.turns.length - numTurns);
|
||||
const firstRemoved = snapshot.turns[retainedCount];
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"version": 1,
|
||||
"updatedAt": "2026-09-24T00:11:29Z",
|
||||
"updatedAt": "2026-09-24T18:40:00Z",
|
||||
"compatibility": [
|
||||
{
|
||||
"driver": "codex",
|
||||
"t3CodeRange": ">=0.0.42",
|
||||
"recommendedRange": ">=0.129.0",
|
||||
"recommendedRange": ">=0.156.0",
|
||||
"ranges": [
|
||||
{ "range": ">=0.129.0", "status": "supported" },
|
||||
{ "range": "<0.129.0", "status": "broken" }
|
||||
{ "range": ">=0.156.0", "status": "supported" },
|
||||
{ "range": ">=0.149.0 <0.156.0", "status": "unsupported" },
|
||||
{ "range": "<0.149.0", "status": "broken" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -65,6 +65,24 @@ describe("provider compatibility", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("supports Codex 0.156 and marks Codex without Thread.projectId broken", () => {
|
||||
const bundled = ModelManifest.BUNDLED_MODEL_MANIFEST.compatibility;
|
||||
for (const [t3CodeVersion, codexVersion, expected] of [
|
||||
["0.0.42", "0.148.0", "broken"],
|
||||
["0.0.42", "0.149.0", "unsupported"],
|
||||
["0.0.42", "0.155.0", "unsupported"],
|
||||
["0.0.42", "0.156.0", "supported"],
|
||||
["0.0.43-nightly.20260924.2200", "0.153.3", "unsupported"],
|
||||
["0.0.43-nightly.20260924.2200", "0.156.1", "supported"],
|
||||
] as const) {
|
||||
assert.strictEqual(
|
||||
resolveProviderCompatibility(bundled, driver, codexVersion, t3CodeVersion)?.status,
|
||||
expected,
|
||||
`T3 Code ${t3CodeVersion} with Codex ${codexVersion}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("compares Cursor build dates without treating semver prereleases as stable", () => {
|
||||
const cursor = ProviderDriverKind.make("cursor");
|
||||
const cursorPolicy: ProviderCompatibilityPolicy = {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"forkedFromId": null,
|
||||
"parentThreadId": null,
|
||||
"preview": "",
|
||||
"projectId": null,
|
||||
"ephemeral": false,
|
||||
"historyMode": "legacy",
|
||||
"modelProvider": "openai",
|
||||
@@ -389,6 +390,7 @@
|
||||
"forkedFromId": null,
|
||||
"parentThreadId": null,
|
||||
"preview": "",
|
||||
"projectId": null,
|
||||
"ephemeral": false,
|
||||
"historyMode": "legacy",
|
||||
"modelProvider": "openai",
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from "effect/unstable/http";
|
||||
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
||||
|
||||
const UPSTREAM_REF = "678157acaa819d5510adfe359abb5d0392cfe461";
|
||||
const UPSTREAM_REF = "fe74a774532af67b5a4a3dec03ce9469e17f89af";
|
||||
const USER_AGENT = "effect-codex-app-server-generator";
|
||||
const GITHUB_API_BASE =
|
||||
"https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol";
|
||||
@@ -145,112 +145,6 @@ const ManualSchemas: Record<string, Schema.Json> = {
|
||||
},
|
||||
};
|
||||
|
||||
// Codex 0.150 added these multi-agent values before our next full protocol
|
||||
// refresh. Keep every generated response namespace compatible with them.
|
||||
const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {
|
||||
CollabAgentTool: {
|
||||
type: "string",
|
||||
enum: [
|
||||
"spawnAgent",
|
||||
"sendInput",
|
||||
"resumeAgent",
|
||||
"wait",
|
||||
"closeAgent",
|
||||
"sendMessage",
|
||||
"followupTask",
|
||||
"interruptAgent",
|
||||
"listAgents",
|
||||
],
|
||||
},
|
||||
CollabAgentToolCallStatus: {
|
||||
type: "string",
|
||||
enum: ["inProgress", "completed", "failed", "interrupted"],
|
||||
},
|
||||
PlanType: {
|
||||
type: "string",
|
||||
enum: [
|
||||
"free",
|
||||
"go",
|
||||
"plus",
|
||||
"pro",
|
||||
"prolite",
|
||||
"team",
|
||||
"self_serve_business_prolite",
|
||||
"self_serve_business_usage_based",
|
||||
"business",
|
||||
"ent26",
|
||||
"enterprise_cbp_automation",
|
||||
"enterprise_cbp_usage_based",
|
||||
"enterprise",
|
||||
"edu",
|
||||
"edu_plus",
|
||||
"edu_pro",
|
||||
"unknown",
|
||||
],
|
||||
},
|
||||
SubAgentActivityKind: {
|
||||
type: "string",
|
||||
enum: ["started", "interacted", "interrupted", "completed"],
|
||||
},
|
||||
};
|
||||
|
||||
// Pinned protocol JSON omits later CodexErrorInfo variants. Keep historical
|
||||
// thread payloads decodable; do not fold unknown values into "other".
|
||||
const CodexErrorInfoCompatibilityValues = [
|
||||
"rateLimitExceeded",
|
||||
"misalignmentPolicyViolation",
|
||||
] as const;
|
||||
|
||||
const CodexErrorInfoCompatibilityExports = new Set([
|
||||
"V2ThreadReadResponse",
|
||||
"V2ThreadResumeResponse",
|
||||
"V2ThreadRollbackResponse",
|
||||
"V2ThreadForkResponse",
|
||||
"V2TurnCompletedNotification",
|
||||
]);
|
||||
|
||||
function applyCodex0151DefinitionCompatibility(
|
||||
exportName: string,
|
||||
definitionName: string,
|
||||
definitionSchema: Schema.Json,
|
||||
): Schema.Json {
|
||||
if (
|
||||
!CodexErrorInfoCompatibilityExports.has(exportName) ||
|
||||
definitionName !== "CodexErrorInfo" ||
|
||||
typeof definitionSchema !== "object"
|
||||
) {
|
||||
return definitionSchema;
|
||||
}
|
||||
|
||||
const schema = definitionSchema as {
|
||||
readonly oneOf?: ReadonlyArray<{ readonly enum?: ReadonlyArray<string> }>;
|
||||
};
|
||||
const [firstVariant, ...remainingVariants] = schema.oneOf ?? [];
|
||||
const currentEnum = firstVariant?.enum;
|
||||
if (!currentEnum) {
|
||||
return definitionSchema;
|
||||
}
|
||||
|
||||
const missingValues = CodexErrorInfoCompatibilityValues.filter(
|
||||
(value) => !currentEnum.includes(value),
|
||||
);
|
||||
if (missingValues.length === 0) {
|
||||
return definitionSchema;
|
||||
}
|
||||
|
||||
const enumValues = [...currentEnum];
|
||||
const otherIndex = enumValues.indexOf("other");
|
||||
const nextEnum =
|
||||
otherIndex === -1
|
||||
? [...enumValues, ...missingValues]
|
||||
: [...enumValues.slice(0, otherIndex), ...missingValues, ...enumValues.slice(otherIndex)];
|
||||
|
||||
return {
|
||||
...definitionSchema,
|
||||
oneOf: [{ ...firstVariant, enum: nextEnum }, ...remainingVariants],
|
||||
};
|
||||
}
|
||||
|
||||
const getGeneratedPaths = Effect.fn("getGeneratedPaths")(function* () {
|
||||
const path = yield* Path.Path;
|
||||
const generatedDir = path.join(import.meta.dirname, "..", "src", "_generated");
|
||||
@@ -470,61 +364,6 @@ function adaptSchemaForEffect(value: Schema.Json): Schema.Json {
|
||||
};
|
||||
}
|
||||
|
||||
// Codex 0.153 adds async questions to agent messages. Keep older protocol
|
||||
// fields until the next full refresh, including every thread history namespace.
|
||||
function addAsyncQuestionFields(value: Schema.Json): Schema.Json {
|
||||
if (Array.isArray(value)) {
|
||||
return value.map(addAsyncQuestionFields);
|
||||
}
|
||||
if (value === null || typeof value !== "object") {
|
||||
return value;
|
||||
}
|
||||
const properties = "properties" in value ? value.properties : undefined;
|
||||
const itemType =
|
||||
properties && typeof properties === "object" && "type" in properties
|
||||
? properties.type
|
||||
: undefined;
|
||||
if (
|
||||
properties &&
|
||||
typeof properties === "object" &&
|
||||
itemType &&
|
||||
typeof itemType === "object" &&
|
||||
"enum" in itemType &&
|
||||
Array.isArray(itemType.enum) &&
|
||||
itemType.enum.includes("agentMessage")
|
||||
) {
|
||||
return {
|
||||
...value,
|
||||
properties: {
|
||||
...Object.fromEntries(Object.entries(properties).filter(([key]) => key !== "type")),
|
||||
delivery: { anyOf: [{ type: "string", enum: ["async"] }, { type: "null" }] },
|
||||
questions: {
|
||||
anyOf: [
|
||||
{
|
||||
type: "array",
|
||||
items: {
|
||||
type: "object",
|
||||
properties: {
|
||||
title: { type: "string" },
|
||||
options: {
|
||||
anyOf: [{ type: "array", items: { type: "string" } }, { type: "null" }],
|
||||
},
|
||||
},
|
||||
required: ["title"],
|
||||
},
|
||||
},
|
||||
{ type: "null" },
|
||||
],
|
||||
},
|
||||
type: itemType,
|
||||
},
|
||||
};
|
||||
}
|
||||
return Object.fromEntries(
|
||||
Object.entries(value).map(([key, child]) => [key, addAsyncQuestionFields(child)]),
|
||||
);
|
||||
}
|
||||
|
||||
function toPascalCaseMethod(method: string) {
|
||||
return method
|
||||
.split("/")
|
||||
@@ -536,13 +375,14 @@ function toPascalCaseMethod(method: string) {
|
||||
}
|
||||
|
||||
function parseRequestEntries(fileContents: string): ReadonlyArray<MethodEntry> {
|
||||
const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params:\s*([^,}]+)/g;
|
||||
// Optional params render as `params?: Foo | undefined`; their JSON schema is `NullableFoo`.
|
||||
const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params(\??):\s*([^,}|]+)/g;
|
||||
const entries: Array<MethodEntry> = [];
|
||||
let match: RegExpExecArray | null;
|
||||
while ((match = entryPattern.exec(fileContents)) !== null) {
|
||||
entries.push({
|
||||
method: match[1]!,
|
||||
paramsType: match[2]!.trim(),
|
||||
paramsType: `${match[2] ? "Nullable" : ""}${match[3]!.trim()}`,
|
||||
});
|
||||
}
|
||||
return entries;
|
||||
@@ -800,13 +640,10 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
|
||||
);
|
||||
|
||||
for (const [definitionName, definitionSchema] of Object.entries(parsed.definitions ?? {})) {
|
||||
const compatibleDefinitionSchema =
|
||||
Codex0150DefinitionSchemas[definitionName] ??
|
||||
applyCodex0151DefinitionCompatibility(file.exportName, definitionName, definitionSchema);
|
||||
aggregateSchemas[localDefinitionNames.get(definitionName)!] = stripNullDefaults(
|
||||
normalizeNullableTypes(
|
||||
rewriteExternalRefs(
|
||||
compatibleDefinitionSchema,
|
||||
definitionSchema,
|
||||
localDefinitionNames,
|
||||
file.namespace,
|
||||
exportNameByQualifiedName,
|
||||
@@ -844,7 +681,7 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
|
||||
for (const [name, schema] of Object.entries(aggregateSchemas).toSorted(([left], [right]) =>
|
||||
left.localeCompare(right),
|
||||
)) {
|
||||
aggregateSchemas[name] = adaptSchemaForEffect(addAsyncQuestionFields(schema));
|
||||
aggregateSchemas[name] = adaptSchemaForEffect(schema);
|
||||
generator.addSchema(name, aggregateSchemas[name] as never);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file is generated by the effect-codex-app-server package. Do not edit manually.
|
||||
// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
|
||||
// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
|
||||
|
||||
import * as CodexSchema from "./schema.gen.ts";
|
||||
|
||||
@@ -16,14 +16,24 @@ export const CLIENT_REQUEST_METHODS = {
|
||||
"thread/goal/get": "thread/goal/get",
|
||||
"thread/goal/clear": "thread/goal/clear",
|
||||
"thread/metadata/update": "thread/metadata/update",
|
||||
"thread/attachment/add": "thread/attachment/add",
|
||||
"thread/attachment/list": "thread/attachment/list",
|
||||
"thread/attachment/remove": "thread/attachment/remove",
|
||||
"thread/section/move": "thread/section/move",
|
||||
"thread/unarchive": "thread/unarchive",
|
||||
"thread/compact/start": "thread/compact/start",
|
||||
"thread/shellCommand": "thread/shellCommand",
|
||||
"thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction",
|
||||
"thread/rollback": "thread/rollback",
|
||||
"thread/revert": "thread/revert",
|
||||
"thread/list": "thread/list",
|
||||
"threadSection/list": "threadSection/list",
|
||||
"threadSection/create": "threadSection/create",
|
||||
"threadSection/update": "threadSection/update",
|
||||
"threadSection/delete": "threadSection/delete",
|
||||
"thread/loaded/list": "thread/loaded/list",
|
||||
"thread/read": "thread/read",
|
||||
"thread/turns/list": "thread/turns/list",
|
||||
"thread/items/list": "thread/items/list",
|
||||
"thread/inject_items": "thread/inject_items",
|
||||
"skills/list": "skills/list",
|
||||
"skills/extraRoots/set": "skills/extraRoots/set",
|
||||
@@ -33,6 +43,7 @@ export const CLIENT_REQUEST_METHODS = {
|
||||
"marketplace/upgrade": "marketplace/upgrade",
|
||||
"plugin/list": "plugin/list",
|
||||
"plugin/installed": "plugin/installed",
|
||||
"plugin/reconcile": "plugin/reconcile",
|
||||
"plugin/read": "plugin/read",
|
||||
"plugin/skill/read": "plugin/skill/read",
|
||||
"plugin/share/save": "plugin/share/save",
|
||||
@@ -87,6 +98,7 @@ export const CLIENT_REQUEST_METHODS = {
|
||||
"config/read": "config/read",
|
||||
"externalAgentConfig/detect": "externalAgentConfig/detect",
|
||||
"externalAgentConfig/import": "externalAgentConfig/import",
|
||||
"externalAgentConfig/import/recordHistory": "externalAgentConfig/import/recordHistory",
|
||||
"externalAgentConfig/import/readHistories": "externalAgentConfig/import/readHistories",
|
||||
"config/value/write": "config/value/write",
|
||||
"config/batchWrite": "config/batchWrite",
|
||||
@@ -123,10 +135,15 @@ export const SERVER_NOTIFICATION_METHODS = {
|
||||
"thread/deleted": "thread/deleted",
|
||||
"thread/unarchived": "thread/unarchived",
|
||||
"thread/closed": "thread/closed",
|
||||
"thread/reverted": "thread/reverted",
|
||||
"skills/changed": "skills/changed",
|
||||
"thread/name/updated": "thread/name/updated",
|
||||
"thread/attachment/updated": "thread/attachment/updated",
|
||||
"thread/goal/updated": "thread/goal/updated",
|
||||
"thread/goal/cleared": "thread/goal/cleared",
|
||||
"thread/queue/changed": "thread/queue/changed",
|
||||
"project/changed": "project/changed",
|
||||
"thread/project/updated": "thread/project/updated",
|
||||
"thread/environment/connected": "thread/environment/connected",
|
||||
"thread/environment/disconnected": "thread/environment/disconnected",
|
||||
"thread/settings/updated": "thread/settings/updated",
|
||||
@@ -140,6 +157,7 @@ export const SERVER_NOTIFICATION_METHODS = {
|
||||
"item/started": "item/started",
|
||||
"item/autoApprovalReview/started": "item/autoApprovalReview/started",
|
||||
"item/autoApprovalReview/completed": "item/autoApprovalReview/completed",
|
||||
"autoApprovalReview/strictReviewRequired": "autoApprovalReview/strictReviewRequired",
|
||||
"item/completed": "item/completed",
|
||||
"rawResponseItem/completed": "rawResponseItem/completed",
|
||||
"rawResponse/completed": "rawResponse/completed",
|
||||
@@ -156,6 +174,7 @@ export const SERVER_NOTIFICATION_METHODS = {
|
||||
"item/mcpToolCall/progress": "item/mcpToolCall/progress",
|
||||
"mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed",
|
||||
"mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
|
||||
"mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
|
||||
"account/updated": "account/updated",
|
||||
"account/rateLimits/updated": "account/rateLimits/updated",
|
||||
"app/list/updated": "app/list/updated",
|
||||
@@ -169,6 +188,8 @@ export const SERVER_NOTIFICATION_METHODS = {
|
||||
"thread/compacted": "thread/compacted",
|
||||
"model/rerouted": "model/rerouted",
|
||||
"model/verification": "model/verification",
|
||||
"modelProvider/authRecoveryStarted": "modelProvider/authRecoveryStarted",
|
||||
"modelProvider/authRecoveryCompleted": "modelProvider/authRecoveryCompleted",
|
||||
"turn/moderationMetadata": "turn/moderationMetadata",
|
||||
"model/safetyBuffering/updated": "model/safetyBuffering/updated",
|
||||
warning: "warning",
|
||||
@@ -179,6 +200,9 @@ export const SERVER_NOTIFICATION_METHODS = {
|
||||
"fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted",
|
||||
"thread/realtime/started": "thread/realtime/started",
|
||||
"thread/realtime/itemAdded": "thread/realtime/itemAdded",
|
||||
"thread/realtime/item/started": "thread/realtime/item/started",
|
||||
"thread/realtime/item/transcript/delta": "thread/realtime/item/transcript/delta",
|
||||
"thread/realtime/item/completed": "thread/realtime/item/completed",
|
||||
"thread/realtime/transcript/delta": "thread/realtime/transcript/delta",
|
||||
"thread/realtime/transcript/done": "thread/realtime/transcript/done",
|
||||
"thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta",
|
||||
@@ -208,14 +232,24 @@ export interface ClientRequestParamsByMethod {
|
||||
readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams;
|
||||
readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams;
|
||||
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams;
|
||||
readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams;
|
||||
readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams;
|
||||
readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams;
|
||||
readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveParams;
|
||||
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams;
|
||||
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams;
|
||||
readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams;
|
||||
readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams;
|
||||
readonly "thread/rollback": CodexSchema.V2ThreadRollbackParams;
|
||||
readonly "thread/revert": CodexSchema.V2ThreadRevertParams;
|
||||
readonly "thread/list": CodexSchema.V2ThreadListParams;
|
||||
readonly "threadSection/list": CodexSchema.V2ThreadSectionListParams;
|
||||
readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateParams;
|
||||
readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams;
|
||||
readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams;
|
||||
readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams;
|
||||
readonly "thread/read": CodexSchema.V2ThreadReadParams;
|
||||
readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListParams;
|
||||
readonly "thread/items/list": CodexSchema.V2ThreadItemsListParams;
|
||||
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams;
|
||||
readonly "skills/list": CodexSchema.V2SkillsListParams;
|
||||
readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams;
|
||||
@@ -225,6 +259,7 @@ export interface ClientRequestParamsByMethod {
|
||||
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams;
|
||||
readonly "plugin/list": CodexSchema.V2PluginListParams;
|
||||
readonly "plugin/installed": CodexSchema.V2PluginInstalledParams;
|
||||
readonly "plugin/reconcile": CodexSchema.V2PluginReconcileParams;
|
||||
readonly "plugin/read": CodexSchema.V2PluginReadParams;
|
||||
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams;
|
||||
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams;
|
||||
@@ -266,9 +301,9 @@ export interface ClientRequestParamsByMethod {
|
||||
readonly "account/login/start": CodexSchema.V2LoginAccountParams;
|
||||
readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams;
|
||||
readonly "account/logout": undefined;
|
||||
readonly "account/rateLimits/read": undefined;
|
||||
readonly "account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams;
|
||||
readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams;
|
||||
readonly "account/usage/read": undefined;
|
||||
readonly "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams;
|
||||
readonly "account/workspaceMessages/read": undefined;
|
||||
readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams;
|
||||
readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams;
|
||||
@@ -279,6 +314,7 @@ export interface ClientRequestParamsByMethod {
|
||||
readonly "config/read": CodexSchema.V2ConfigReadParams;
|
||||
readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams;
|
||||
readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams;
|
||||
readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams;
|
||||
readonly "externalAgentConfig/import/readHistories": undefined;
|
||||
readonly "config/value/write": CodexSchema.V2ConfigValueWriteParams;
|
||||
readonly "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams;
|
||||
@@ -303,14 +339,24 @@ export interface ClientRequestResponsesByMethod {
|
||||
readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse;
|
||||
readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse;
|
||||
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse;
|
||||
readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse;
|
||||
readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse;
|
||||
readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse;
|
||||
readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse;
|
||||
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse;
|
||||
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse;
|
||||
readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse;
|
||||
readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse;
|
||||
readonly "thread/rollback": CodexSchema.V2ThreadRollbackResponse;
|
||||
readonly "thread/revert": CodexSchema.V2ThreadRevertResponse;
|
||||
readonly "thread/list": CodexSchema.V2ThreadListResponse;
|
||||
readonly "threadSection/list": CodexSchema.V2ThreadSectionListResponse;
|
||||
readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse;
|
||||
readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse;
|
||||
readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse;
|
||||
readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse;
|
||||
readonly "thread/read": CodexSchema.V2ThreadReadResponse;
|
||||
readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse;
|
||||
readonly "thread/items/list": CodexSchema.V2ThreadItemsListResponse;
|
||||
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse;
|
||||
readonly "skills/list": CodexSchema.V2SkillsListResponse;
|
||||
readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse;
|
||||
@@ -320,6 +366,7 @@ export interface ClientRequestResponsesByMethod {
|
||||
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse;
|
||||
readonly "plugin/list": CodexSchema.V2PluginListResponse;
|
||||
readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse;
|
||||
readonly "plugin/reconcile": CodexSchema.V2PluginReconcileResponse;
|
||||
readonly "plugin/read": CodexSchema.V2PluginReadResponse;
|
||||
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse;
|
||||
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse;
|
||||
@@ -374,6 +421,7 @@ export interface ClientRequestResponsesByMethod {
|
||||
readonly "config/read": CodexSchema.V2ConfigReadResponse;
|
||||
readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse;
|
||||
readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse;
|
||||
readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse;
|
||||
readonly "externalAgentConfig/import/readHistories": CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse;
|
||||
readonly "config/value/write": CodexSchema.V2ConfigWriteResponse;
|
||||
readonly "config/batchWrite": CodexSchema.V2ConfigWriteResponse;
|
||||
@@ -423,10 +471,15 @@ export interface ServerNotificationParamsByMethod {
|
||||
readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification;
|
||||
readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification;
|
||||
readonly "thread/closed": CodexSchema.V2ThreadClosedNotification;
|
||||
readonly "thread/reverted": CodexSchema.V2ThreadRevertedNotification;
|
||||
readonly "skills/changed": CodexSchema.V2SkillsChangedNotification;
|
||||
readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification;
|
||||
readonly "thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification;
|
||||
readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification;
|
||||
readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification;
|
||||
readonly "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification;
|
||||
readonly "project/changed": CodexSchema.V2ProjectChangedNotification;
|
||||
readonly "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification;
|
||||
readonly "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification;
|
||||
readonly "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification;
|
||||
readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification;
|
||||
@@ -440,6 +493,7 @@ export interface ServerNotificationParamsByMethod {
|
||||
readonly "item/started": CodexSchema.V2ItemStartedNotification;
|
||||
readonly "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification;
|
||||
readonly "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification;
|
||||
readonly "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification;
|
||||
readonly "item/completed": CodexSchema.V2ItemCompletedNotification;
|
||||
readonly "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification;
|
||||
readonly "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification;
|
||||
@@ -456,6 +510,7 @@ export interface ServerNotificationParamsByMethod {
|
||||
readonly "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification;
|
||||
readonly "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification;
|
||||
readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
|
||||
readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
|
||||
readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
|
||||
readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
|
||||
readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
|
||||
@@ -469,6 +524,8 @@ export interface ServerNotificationParamsByMethod {
|
||||
readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification;
|
||||
readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification;
|
||||
readonly "model/verification": CodexSchema.V2ModelVerificationNotification;
|
||||
readonly "modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification;
|
||||
readonly "modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification;
|
||||
readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification;
|
||||
readonly "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification;
|
||||
readonly warning: CodexSchema.V2WarningNotification;
|
||||
@@ -479,6 +536,9 @@ export interface ServerNotificationParamsByMethod {
|
||||
readonly "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification;
|
||||
readonly "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification;
|
||||
readonly "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification;
|
||||
readonly "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification;
|
||||
readonly "thread/realtime/item/transcript/delta": CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification;
|
||||
readonly "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification;
|
||||
readonly "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification;
|
||||
readonly "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification;
|
||||
readonly "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification;
|
||||
@@ -503,14 +563,24 @@ export const CLIENT_REQUEST_PARAMS = {
|
||||
"thread/goal/get": CodexSchema.V2ThreadGoalGetParams,
|
||||
"thread/goal/clear": CodexSchema.V2ThreadGoalClearParams,
|
||||
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams,
|
||||
"thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams,
|
||||
"thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams,
|
||||
"thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams,
|
||||
"thread/section/move": CodexSchema.V2ThreadSectionMoveParams,
|
||||
"thread/unarchive": CodexSchema.V2ThreadUnarchiveParams,
|
||||
"thread/compact/start": CodexSchema.V2ThreadCompactStartParams,
|
||||
"thread/shellCommand": CodexSchema.V2ThreadShellCommandParams,
|
||||
"thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
|
||||
"thread/rollback": CodexSchema.V2ThreadRollbackParams,
|
||||
"thread/revert": CodexSchema.V2ThreadRevertParams,
|
||||
"thread/list": CodexSchema.V2ThreadListParams,
|
||||
"threadSection/list": CodexSchema.V2ThreadSectionListParams,
|
||||
"threadSection/create": CodexSchema.V2ThreadSectionCreateParams,
|
||||
"threadSection/update": CodexSchema.V2ThreadSectionUpdateParams,
|
||||
"threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams,
|
||||
"thread/loaded/list": CodexSchema.V2ThreadLoadedListParams,
|
||||
"thread/read": CodexSchema.V2ThreadReadParams,
|
||||
"thread/turns/list": CodexSchema.V2ThreadTurnsListParams,
|
||||
"thread/items/list": CodexSchema.V2ThreadItemsListParams,
|
||||
"thread/inject_items": CodexSchema.V2ThreadInjectItemsParams,
|
||||
"skills/list": CodexSchema.V2SkillsListParams,
|
||||
"skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams,
|
||||
@@ -520,6 +590,7 @@ export const CLIENT_REQUEST_PARAMS = {
|
||||
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams,
|
||||
"plugin/list": CodexSchema.V2PluginListParams,
|
||||
"plugin/installed": CodexSchema.V2PluginInstalledParams,
|
||||
"plugin/reconcile": CodexSchema.V2PluginReconcileParams,
|
||||
"plugin/read": CodexSchema.V2PluginReadParams,
|
||||
"plugin/skill/read": CodexSchema.V2PluginSkillReadParams,
|
||||
"plugin/share/save": CodexSchema.V2PluginShareSaveParams,
|
||||
@@ -561,9 +632,9 @@ export const CLIENT_REQUEST_PARAMS = {
|
||||
"account/login/start": CodexSchema.V2LoginAccountParams,
|
||||
"account/login/cancel": CodexSchema.V2CancelLoginAccountParams,
|
||||
"account/logout": undefined,
|
||||
"account/rateLimits/read": undefined,
|
||||
"account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams,
|
||||
"account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams,
|
||||
"account/usage/read": undefined,
|
||||
"account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams,
|
||||
"account/workspaceMessages/read": undefined,
|
||||
"account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams,
|
||||
"feedback/upload": CodexSchema.V2FeedbackUploadParams,
|
||||
@@ -574,6 +645,8 @@ export const CLIENT_REQUEST_PARAMS = {
|
||||
"config/read": CodexSchema.V2ConfigReadParams,
|
||||
"externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams,
|
||||
"externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams,
|
||||
"externalAgentConfig/import/recordHistory":
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
|
||||
"externalAgentConfig/import/readHistories": undefined,
|
||||
"config/value/write": CodexSchema.V2ConfigValueWriteParams,
|
||||
"config/batchWrite": CodexSchema.V2ConfigBatchWriteParams,
|
||||
@@ -598,14 +671,24 @@ export const CLIENT_REQUEST_RESPONSES = {
|
||||
"thread/goal/get": CodexSchema.V2ThreadGoalGetResponse,
|
||||
"thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse,
|
||||
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse,
|
||||
"thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse,
|
||||
"thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse,
|
||||
"thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse,
|
||||
"thread/section/move": CodexSchema.V2ThreadSectionMoveResponse,
|
||||
"thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse,
|
||||
"thread/compact/start": CodexSchema.V2ThreadCompactStartResponse,
|
||||
"thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse,
|
||||
"thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse,
|
||||
"thread/rollback": CodexSchema.V2ThreadRollbackResponse,
|
||||
"thread/revert": CodexSchema.V2ThreadRevertResponse,
|
||||
"thread/list": CodexSchema.V2ThreadListResponse,
|
||||
"threadSection/list": CodexSchema.V2ThreadSectionListResponse,
|
||||
"threadSection/create": CodexSchema.V2ThreadSectionCreateResponse,
|
||||
"threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse,
|
||||
"threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse,
|
||||
"thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse,
|
||||
"thread/read": CodexSchema.V2ThreadReadResponse,
|
||||
"thread/turns/list": CodexSchema.V2ThreadTurnsListResponse,
|
||||
"thread/items/list": CodexSchema.V2ThreadItemsListResponse,
|
||||
"thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse,
|
||||
"skills/list": CodexSchema.V2SkillsListResponse,
|
||||
"skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse,
|
||||
@@ -615,6 +698,7 @@ export const CLIENT_REQUEST_RESPONSES = {
|
||||
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse,
|
||||
"plugin/list": CodexSchema.V2PluginListResponse,
|
||||
"plugin/installed": CodexSchema.V2PluginInstalledResponse,
|
||||
"plugin/reconcile": CodexSchema.V2PluginReconcileResponse,
|
||||
"plugin/read": CodexSchema.V2PluginReadResponse,
|
||||
"plugin/skill/read": CodexSchema.V2PluginSkillReadResponse,
|
||||
"plugin/share/save": CodexSchema.V2PluginShareSaveResponse,
|
||||
@@ -669,6 +753,8 @@ export const CLIENT_REQUEST_RESPONSES = {
|
||||
"config/read": CodexSchema.V2ConfigReadResponse,
|
||||
"externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse,
|
||||
"externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse,
|
||||
"externalAgentConfig/import/recordHistory":
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
|
||||
"externalAgentConfig/import/readHistories":
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
|
||||
"config/value/write": CodexSchema.V2ConfigWriteResponse,
|
||||
@@ -719,10 +805,15 @@ export const SERVER_NOTIFICATION_PARAMS = {
|
||||
"thread/deleted": CodexSchema.V2ThreadDeletedNotification,
|
||||
"thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification,
|
||||
"thread/closed": CodexSchema.V2ThreadClosedNotification,
|
||||
"thread/reverted": CodexSchema.V2ThreadRevertedNotification,
|
||||
"skills/changed": CodexSchema.V2SkillsChangedNotification,
|
||||
"thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification,
|
||||
"thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification,
|
||||
"thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification,
|
||||
"thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification,
|
||||
"thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification,
|
||||
"project/changed": CodexSchema.V2ProjectChangedNotification,
|
||||
"thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification,
|
||||
"thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification,
|
||||
"thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification,
|
||||
"thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification,
|
||||
@@ -737,6 +828,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
|
||||
"item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification,
|
||||
"item/autoApprovalReview/completed":
|
||||
CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification,
|
||||
"autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification,
|
||||
"item/completed": CodexSchema.V2ItemCompletedNotification,
|
||||
"rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification,
|
||||
"rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification,
|
||||
@@ -753,6 +845,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
|
||||
"item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification,
|
||||
"mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification,
|
||||
"mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
|
||||
"mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification,
|
||||
"account/updated": CodexSchema.V2AccountUpdatedNotification,
|
||||
"account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
|
||||
"app/list/updated": CodexSchema.V2AppListUpdatedNotification,
|
||||
@@ -768,6 +861,8 @@ export const SERVER_NOTIFICATION_PARAMS = {
|
||||
"thread/compacted": CodexSchema.V2ContextCompactedNotification,
|
||||
"model/rerouted": CodexSchema.V2ModelReroutedNotification,
|
||||
"model/verification": CodexSchema.V2ModelVerificationNotification,
|
||||
"modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification,
|
||||
"modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification,
|
||||
"turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification,
|
||||
"model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
|
||||
warning: CodexSchema.V2WarningNotification,
|
||||
@@ -778,6 +873,10 @@ export const SERVER_NOTIFICATION_PARAMS = {
|
||||
"fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification,
|
||||
"thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification,
|
||||
"thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification,
|
||||
"thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification,
|
||||
"thread/realtime/item/transcript/delta":
|
||||
CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
|
||||
"thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification,
|
||||
"thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification,
|
||||
"thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
|
||||
"thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file is generated by the effect-codex-app-server package. Do not edit manually.
|
||||
// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
|
||||
// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
|
||||
|
||||
import * as CodexSchema from "./schema.gen.ts";
|
||||
|
||||
@@ -20,6 +20,7 @@ export const v2 = {
|
||||
AppsListResponse: CodexSchema.V2AppsListResponse,
|
||||
AppsReadParams: CodexSchema.V2AppsReadParams,
|
||||
AppsReadResponse: CodexSchema.V2AppsReadResponse,
|
||||
AuthRecoveryNotification: CodexSchema.V2AuthRecoveryNotification,
|
||||
CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams,
|
||||
CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse,
|
||||
CommandExecOutputDeltaNotification: CodexSchema.V2CommandExecOutputDeltaNotification,
|
||||
@@ -56,6 +57,10 @@ export const v2 = {
|
||||
CodexSchema.V2ExternalAgentConfigImportCompletedNotification,
|
||||
ExternalAgentConfigImportHistoriesReadResponse:
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
|
||||
ExternalAgentConfigImportHistoryRecordParams:
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
|
||||
ExternalAgentConfigImportHistoryRecordResponse:
|
||||
CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
|
||||
ExternalAgentConfigImportParams: CodexSchema.V2ExternalAgentConfigImportParams,
|
||||
ExternalAgentConfigImportProgressNotification:
|
||||
CodexSchema.V2ExternalAgentConfigImportProgressNotification,
|
||||
@@ -112,6 +117,7 @@ export const v2 = {
|
||||
MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse,
|
||||
McpResourceReadParams: CodexSchema.V2McpResourceReadParams,
|
||||
McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse,
|
||||
McpServerEventStreamNotification: CodexSchema.V2McpServerEventStreamNotification,
|
||||
McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification,
|
||||
McpServerOauthLoginParams: CodexSchema.V2McpServerOauthLoginParams,
|
||||
McpServerOauthLoginResponse: CodexSchema.V2McpServerOauthLoginResponse,
|
||||
@@ -127,6 +133,8 @@ export const v2 = {
|
||||
ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification,
|
||||
ModelSafetyBufferingUpdatedNotification: CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
|
||||
ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification,
|
||||
NullableGetAccountRateLimitsParams: CodexSchema.V2NullableGetAccountRateLimitsParams,
|
||||
NullableGetAccountTokenUsageParams: CodexSchema.V2NullableGetAccountTokenUsageParams,
|
||||
PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams,
|
||||
PermissionProfileListResponse: CodexSchema.V2PermissionProfileListResponse,
|
||||
PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification,
|
||||
@@ -138,6 +146,8 @@ export const v2 = {
|
||||
PluginListResponse: CodexSchema.V2PluginListResponse,
|
||||
PluginReadParams: CodexSchema.V2PluginReadParams,
|
||||
PluginReadResponse: CodexSchema.V2PluginReadResponse,
|
||||
PluginReconcileParams: CodexSchema.V2PluginReconcileParams,
|
||||
PluginReconcileResponse: CodexSchema.V2PluginReconcileResponse,
|
||||
PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams,
|
||||
PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse,
|
||||
PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams,
|
||||
@@ -154,6 +164,7 @@ export const v2 = {
|
||||
PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse,
|
||||
ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification,
|
||||
ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification,
|
||||
ProjectChangedNotification: CodexSchema.V2ProjectChangedNotification,
|
||||
RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification,
|
||||
RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification,
|
||||
ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification,
|
||||
@@ -172,6 +183,7 @@ export const v2 = {
|
||||
SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse,
|
||||
SkillsListParams: CodexSchema.V2SkillsListParams,
|
||||
SkillsListResponse: CodexSchema.V2SkillsListResponse,
|
||||
StrictReviewRequiredNotification: CodexSchema.V2StrictReviewRequiredNotification,
|
||||
TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification,
|
||||
ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
|
||||
ThreadApproveGuardianDeniedActionResponse:
|
||||
@@ -179,6 +191,13 @@ export const v2 = {
|
||||
ThreadArchivedNotification: CodexSchema.V2ThreadArchivedNotification,
|
||||
ThreadArchiveParams: CodexSchema.V2ThreadArchiveParams,
|
||||
ThreadArchiveResponse: CodexSchema.V2ThreadArchiveResponse,
|
||||
ThreadAttachmentAddParams: CodexSchema.V2ThreadAttachmentAddParams,
|
||||
ThreadAttachmentAddResponse: CodexSchema.V2ThreadAttachmentAddResponse,
|
||||
ThreadAttachmentListParams: CodexSchema.V2ThreadAttachmentListParams,
|
||||
ThreadAttachmentListResponse: CodexSchema.V2ThreadAttachmentListResponse,
|
||||
ThreadAttachmentRemoveParams: CodexSchema.V2ThreadAttachmentRemoveParams,
|
||||
ThreadAttachmentRemoveResponse: CodexSchema.V2ThreadAttachmentRemoveResponse,
|
||||
ThreadAttachmentUpdatedNotification: CodexSchema.V2ThreadAttachmentUpdatedNotification,
|
||||
ThreadClosedNotification: CodexSchema.V2ThreadClosedNotification,
|
||||
ThreadCompactStartParams: CodexSchema.V2ThreadCompactStartParams,
|
||||
ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse,
|
||||
@@ -197,6 +216,8 @@ export const v2 = {
|
||||
ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification,
|
||||
ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams,
|
||||
ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse,
|
||||
ThreadItemsListParams: CodexSchema.V2ThreadItemsListParams,
|
||||
ThreadItemsListResponse: CodexSchema.V2ThreadItemsListResponse,
|
||||
ThreadListParams: CodexSchema.V2ThreadListParams,
|
||||
ThreadListResponse: CodexSchema.V2ThreadListResponse,
|
||||
ThreadLoadedListParams: CodexSchema.V2ThreadLoadedListParams,
|
||||
@@ -204,11 +225,17 @@ export const v2 = {
|
||||
ThreadMetadataUpdateParams: CodexSchema.V2ThreadMetadataUpdateParams,
|
||||
ThreadMetadataUpdateResponse: CodexSchema.V2ThreadMetadataUpdateResponse,
|
||||
ThreadNameUpdatedNotification: CodexSchema.V2ThreadNameUpdatedNotification,
|
||||
ThreadProjectUpdatedNotification: CodexSchema.V2ThreadProjectUpdatedNotification,
|
||||
ThreadQueueChangedNotification: CodexSchema.V2ThreadQueueChangedNotification,
|
||||
ThreadReadParams: CodexSchema.V2ThreadReadParams,
|
||||
ThreadReadResponse: CodexSchema.V2ThreadReadResponse,
|
||||
ThreadRealtimeClosedNotification: CodexSchema.V2ThreadRealtimeClosedNotification,
|
||||
ThreadRealtimeErrorNotification: CodexSchema.V2ThreadRealtimeErrorNotification,
|
||||
ThreadRealtimeItemAddedNotification: CodexSchema.V2ThreadRealtimeItemAddedNotification,
|
||||
ThreadRealtimeItemCompletedNotification: CodexSchema.V2ThreadRealtimeItemCompletedNotification,
|
||||
ThreadRealtimeItemStartedNotification: CodexSchema.V2ThreadRealtimeItemStartedNotification,
|
||||
ThreadRealtimeItemTranscriptDeltaNotification:
|
||||
CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
|
||||
ThreadRealtimeOutputAudioDeltaNotification:
|
||||
CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
|
||||
ThreadRealtimeSdpNotification: CodexSchema.V2ThreadRealtimeSdpNotification,
|
||||
@@ -218,8 +245,19 @@ export const v2 = {
|
||||
ThreadRealtimeTranscriptDoneNotification: CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
|
||||
ThreadResumeParams: CodexSchema.V2ThreadResumeParams,
|
||||
ThreadResumeResponse: CodexSchema.V2ThreadResumeResponse,
|
||||
ThreadRollbackParams: CodexSchema.V2ThreadRollbackParams,
|
||||
ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse,
|
||||
ThreadRevertedNotification: CodexSchema.V2ThreadRevertedNotification,
|
||||
ThreadRevertParams: CodexSchema.V2ThreadRevertParams,
|
||||
ThreadRevertResponse: CodexSchema.V2ThreadRevertResponse,
|
||||
ThreadSectionCreateParams: CodexSchema.V2ThreadSectionCreateParams,
|
||||
ThreadSectionCreateResponse: CodexSchema.V2ThreadSectionCreateResponse,
|
||||
ThreadSectionDeleteParams: CodexSchema.V2ThreadSectionDeleteParams,
|
||||
ThreadSectionDeleteResponse: CodexSchema.V2ThreadSectionDeleteResponse,
|
||||
ThreadSectionListParams: CodexSchema.V2ThreadSectionListParams,
|
||||
ThreadSectionListResponse: CodexSchema.V2ThreadSectionListResponse,
|
||||
ThreadSectionMoveParams: CodexSchema.V2ThreadSectionMoveParams,
|
||||
ThreadSectionMoveResponse: CodexSchema.V2ThreadSectionMoveResponse,
|
||||
ThreadSectionUpdateParams: CodexSchema.V2ThreadSectionUpdateParams,
|
||||
ThreadSectionUpdateResponse: CodexSchema.V2ThreadSectionUpdateResponse,
|
||||
ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams,
|
||||
ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse,
|
||||
ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification,
|
||||
@@ -230,6 +268,8 @@ export const v2 = {
|
||||
ThreadStartResponse: CodexSchema.V2ThreadStartResponse,
|
||||
ThreadStatusChangedNotification: CodexSchema.V2ThreadStatusChangedNotification,
|
||||
ThreadTokenUsageUpdatedNotification: CodexSchema.V2ThreadTokenUsageUpdatedNotification,
|
||||
ThreadTurnsListParams: CodexSchema.V2ThreadTurnsListParams,
|
||||
ThreadTurnsListResponse: CodexSchema.V2ThreadTurnsListResponse,
|
||||
ThreadUnarchivedNotification: CodexSchema.V2ThreadUnarchivedNotification,
|
||||
ThreadUnarchiveParams: CodexSchema.V2ThreadUnarchiveParams,
|
||||
ThreadUnarchiveResponse: CodexSchema.V2ThreadUnarchiveResponse,
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -95,6 +95,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
|
||||
assert.equal(result.skills.data[0]?.skills.length, 0);
|
||||
assert.deepEqual(yield* Ref.get(userInputRequests), [
|
||||
{
|
||||
isBlocking: true,
|
||||
itemId: "item-approval-1",
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
|
||||
@@ -6,7 +6,6 @@ import * as CodexSchema from "./schema.ts";
|
||||
const isGetAccountResponse = Schema.is(CodexSchema.V2GetAccountResponse);
|
||||
const isThreadReadResponse = Schema.is(CodexSchema.V2ThreadReadResponse);
|
||||
const isThreadResumeResponse = Schema.is(CodexSchema.V2ThreadResumeResponse);
|
||||
const isThreadRollbackResponse = Schema.is(CodexSchema.V2ThreadRollbackResponse);
|
||||
const isThreadForkResponse = Schema.is(CodexSchema.V2ThreadForkResponse);
|
||||
const isTurnCompletedNotification = Schema.is(CodexSchema.V2TurnCompletedNotification);
|
||||
const decodeThreadResumeResponse = Schema.decodeUnknownSync(CodexSchema.V2ThreadResumeResponse);
|
||||
@@ -76,6 +75,7 @@ it("accepts Codex 0.150 multi-agent values", () => {
|
||||
id: "root-thread",
|
||||
modelProvider: "openai",
|
||||
preview: "",
|
||||
projectId: null,
|
||||
sessionId: "session-1",
|
||||
source: "cli",
|
||||
status: { type: "idle" },
|
||||
@@ -112,6 +112,7 @@ it("accepts Codex rate limit errors for thread responses", () => {
|
||||
id: "thread-1",
|
||||
modelProvider: "openai",
|
||||
preview: "",
|
||||
projectId: null,
|
||||
sessionId: "session-1",
|
||||
source: "cli",
|
||||
status: { type: "idle" },
|
||||
@@ -141,7 +142,6 @@ it("accepts Codex rate limit errors for thread responses", () => {
|
||||
}),
|
||||
true,
|
||||
);
|
||||
assert.equal(isThreadRollbackResponse({ thread: failedThread }), true);
|
||||
});
|
||||
|
||||
it("accepts Codex misalignment policy errors for thread responses", () => {
|
||||
@@ -153,6 +153,7 @@ it("accepts Codex misalignment policy errors for thread responses", () => {
|
||||
id: "thread-1",
|
||||
modelProvider: "openai",
|
||||
preview: "",
|
||||
projectId: null,
|
||||
sessionId: "session-1",
|
||||
source: "cli",
|
||||
status: { type: "idle" },
|
||||
@@ -180,7 +181,6 @@ it("accepts Codex misalignment policy errors for thread responses", () => {
|
||||
};
|
||||
assert.equal(isThreadReadResponse({ thread: failedThread }), true);
|
||||
assert.equal(isThreadResumeResponse(resumeLikeResponse), true);
|
||||
assert.equal(isThreadRollbackResponse({ thread: failedThread }), true);
|
||||
assert.equal(isThreadForkResponse(resumeLikeResponse), true);
|
||||
const decodedResume = decodeThreadResumeResponse(resumeLikeResponse);
|
||||
assert.equal(decodedResume.thread.turns[0]?.error?.codexErrorInfo, "misalignmentPolicyViolation");
|
||||
|
||||
@@ -84,6 +84,7 @@ const handleMethod = (message: Record<string, unknown>) => {
|
||||
case "skills/list": {
|
||||
pendingSkillsListRequestId = message.id as number | string;
|
||||
pendingUserInputRequestId = sendRequest("item/tool/requestUserInput", {
|
||||
isBlocking: true,
|
||||
itemId: "item-approval-1",
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
|
||||
Reference in new issue
Block a user