@openclaw/codex 2026.7.1-beta.2 → 2026.7.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-server-policy-B7hqD3Xj.js → app-server-policy-BUk0GLMy.js} +5 -5
- package/dist/{attempt-notifications-tqyQ_Tdn.js → attempt-notifications-BGsEIIDI.js} +5 -40
- package/dist/{command-handlers-C9K-KRU-.js → command-handlers-UVniG5Hl.js} +267 -232
- package/dist/command-rpc-BjgEPh19.js +784 -0
- package/dist/compact-CZzbcygx.js +603 -0
- package/dist/{computer-use-CpurU-G9.js → computer-use-DDeySrnb.js} +3 -3
- package/dist/{config-C_whBx3M.js → config-CYEDnLJ2.js} +36 -15
- package/dist/conversation-binding-data-BHRpYbX3.js +121 -0
- package/dist/doctor-contract-api.js +439 -22
- package/dist/harness.js +29 -10
- package/dist/index.js +1117 -19
- package/dist/{media-understanding-provider-BOeoBhEw.js → media-understanding-provider-DgqRvU2_.js} +13 -8
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{models-DpzY1xpp.js → models-DDmO1zwd.js} +2 -2
- package/dist/notification-correlation-Bo7KB3ks.js +35 -0
- package/dist/{plugin-app-cache-key-BrZUG9jj.js → plugin-app-cache-key-o-AHbdaf.js} +8 -4
- package/dist/{protocol-dh-ETiNd.js → protocol-2POPqAY4.js} +2 -1
- package/dist/{protocol-validators-CJiWigAJ.js → protocol-validators-dZQ-UTOa.js} +116 -59
- package/dist/{provider-capabilities-wqedK49Z.js → provider-capabilities-gTCwjfmh.js} +2916 -114
- package/dist/{provider-nmtMDcGH.js → provider-cc_62eQE.js} +19 -10
- package/dist/provider.js +2 -2
- package/dist/{request-BQuSQF29.js → request-BcJyl8KL.js} +2 -2
- package/dist/{run-attempt-DikbXia_.js → run-attempt-8SPLiDlT.js} +907 -3002
- package/dist/{sandbox-guard-pTY2COoC.js → sandbox-guard-DA2TQfZW.js} +3 -3
- package/dist/session-binding-Dc03iwRF.js +595 -0
- package/dist/session-binding-meta-B7aEMU7g.js +6 -0
- package/dist/{shared-client-rR6TDJA3.js → shared-client-4ICy3U6d.js} +892 -103
- package/dist/{side-question-Ca9wqmd0.js → side-question-DkjXvYv7.js} +132 -140
- package/dist/{thread-lifecycle-D6R40plk.js → thread-lifecycle-BskXnNP-.js} +609 -444
- package/dist/{web-search-provider.runtime-B6eZEFmd.js → web-search-provider.runtime-B5F42P7x.js} +3 -3
- package/npm-shrinkwrap.json +34 -34
- package/openclaw.plugin.json +20 -0
- package/package.json +9 -6
- package/dist/client-IcTBKEqA.js +0 -732
- package/dist/client-factory-DfFu9JH_.js +0 -15
- package/dist/compact-CILptrPS.js +0 -278
- package/dist/conversation-binding-DOJtUxOy.js +0 -1570
- package/dist/rate-limit-cache-C7qmZ0Jh.js +0 -26
- package/dist/session-binding-Cm0Gg7Z1.js +0 -339
package/dist/{media-understanding-provider-BOeoBhEw.js → media-understanding-provider-DgqRvU2_.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
2
|
+
import { r as isJsonObject } from "./protocol-2POPqAY4.js";
|
|
3
|
+
import { _ as readCodexNotificationItem } from "./attempt-notifications-BGsEIIDI.js";
|
|
4
|
+
import { d as resolveCodexAppServerRuntimeOptions } from "./config-CYEDnLJ2.js";
|
|
5
|
+
import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-dZQ-UTOa.js";
|
|
6
|
+
import { i as readModelListResult } from "./models-DDmO1zwd.js";
|
|
7
|
+
import { V as mergeCodexThreadConfigs, r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-BskXnNP-.js";
|
|
8
8
|
import { validateJsonSchemaValue } from "openclaw/plugin-sdk/json-schema-runtime";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import path from "node:path";
|
|
@@ -51,7 +51,13 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
|
|
|
51
51
|
const agentDir = params.agentDir?.trim() || void 0;
|
|
52
52
|
const startOptions = workspace.codexHome ? buildPrivateCodexAppServerStartOptions(appServer.start, workspace.codexHome) : appServer.start;
|
|
53
53
|
const ownsClient = !params.options.clientFactory;
|
|
54
|
-
const client = params.options.clientFactory ? await params.options.clientFactory(
|
|
54
|
+
const client = params.options.clientFactory ? await params.options.clientFactory({
|
|
55
|
+
startOptions,
|
|
56
|
+
authProfileId: params.profile,
|
|
57
|
+
agentDir,
|
|
58
|
+
config: params.config,
|
|
59
|
+
timeoutMs
|
|
60
|
+
}) : await import("./shared-client-4ICy3U6d.js").then((n) => n.c).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
|
|
55
61
|
startOptions,
|
|
56
62
|
timeoutMs,
|
|
57
63
|
authProfileId: params.profile,
|
|
@@ -85,7 +91,6 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
|
|
|
85
91
|
environments: [],
|
|
86
92
|
dynamicTools: [],
|
|
87
93
|
experimentalRawEvents: true,
|
|
88
|
-
persistExtendedHistory: false,
|
|
89
94
|
ephemeral: true
|
|
90
95
|
}, {
|
|
91
96
|
timeoutMs,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-
|
|
1
|
+
import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-DgqRvU2_.js";
|
|
2
2
|
export { buildCodexMediaUnderstandingProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { s as readCodexModelListResponse } from "./protocol-validators-
|
|
2
|
+
import { s as readCodexModelListResponse } from "./protocol-validators-dZQ-UTOa.js";
|
|
3
3
|
import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/codex/src/app-server/models.ts
|
|
5
5
|
/**
|
|
@@ -46,7 +46,7 @@ async function listAllCodexAppServerModels(options = {}) {
|
|
|
46
46
|
async function withCodexAppServerModelClient(options, run) {
|
|
47
47
|
const timeoutMs = options.timeoutMs ?? 2500;
|
|
48
48
|
const useSharedClient = options.sharedClient !== false;
|
|
49
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-
|
|
49
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-4ICy3U6d.js").then((n) => n.c);
|
|
50
50
|
const client = useSharedClient ? await getLeasedSharedCodexAppServerClient({
|
|
51
51
|
startOptions: options.startOptions,
|
|
52
52
|
timeoutMs,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { r as isJsonObject } from "./protocol-2POPqAY4.js";
|
|
2
|
+
//#region extensions/codex/src/app-server/notification-correlation.ts
|
|
3
|
+
/**
|
|
4
|
+
* Correlates Codex app-server notifications with the active thread/turn so
|
|
5
|
+
* projectors can ignore global or stale events without losing diagnostics.
|
|
6
|
+
*/
|
|
7
|
+
/** Returns true when a notification payload belongs to the exact active thread and turn. */
|
|
8
|
+
function isCodexNotificationForTurn(value, threadId, turnId) {
|
|
9
|
+
if (!isJsonObject(value)) return false;
|
|
10
|
+
return readCodexNotificationThreadId(value) === threadId && readCodexNotificationTurnId(value) === turnId;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Reads a thread id from canonical top-level or nested thread payloads.
|
|
14
|
+
* The generated v2 schemas require top-level `threadId` on turn/item-scoped
|
|
15
|
+
* notifications and define `Turn` without one, so `turn.threadId` is not a
|
|
16
|
+
* wire shape and is deliberately not read here.
|
|
17
|
+
*/
|
|
18
|
+
function readCodexNotificationThreadId(record) {
|
|
19
|
+
const thread = isJsonObject(record.thread) ? record.thread : void 0;
|
|
20
|
+
return readString(record, "threadId") ?? (thread ? readString(thread, "id") : void 0);
|
|
21
|
+
}
|
|
22
|
+
/** Reads a turn id from either top-level notification params or nested turn payloads. */
|
|
23
|
+
function readCodexNotificationTurnId(record) {
|
|
24
|
+
return readNestedTurnId(record) ?? readString(record, "turnId");
|
|
25
|
+
}
|
|
26
|
+
function readNestedTurnId(record) {
|
|
27
|
+
const turn = record.turn;
|
|
28
|
+
return isJsonObject(turn) ? readString(turn, "id") : void 0;
|
|
29
|
+
}
|
|
30
|
+
function readString(record, key) {
|
|
31
|
+
const value = record[key];
|
|
32
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { readCodexNotificationThreadId as n, readCodexNotificationTurnId as r, isCodexNotificationForTurn as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { h as resolveCodexAppServerHomeDir } from "./shared-client-rR6TDJA3.js";
|
|
1
|
+
import { G as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-BskXnNP-.js";
|
|
2
|
+
import { u as CodexAppServerRpcError, x as resolveCodexAppServerHomeDir } from "./shared-client-4ICy3U6d.js";
|
|
4
3
|
import { createRequire } from "node:module";
|
|
5
4
|
import { createHash } from "node:crypto";
|
|
6
5
|
import { OPENCLAW_VERSION } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -14,12 +13,17 @@ const CODEX_CONTROL_METHODS = {
|
|
|
14
13
|
account: "account/read",
|
|
15
14
|
compact: "thread/compact/start",
|
|
16
15
|
feedback: "feedback/upload",
|
|
16
|
+
forkThread: "thread/fork",
|
|
17
17
|
listMcpServers: "mcpServerStatus/list",
|
|
18
18
|
listSkills: "skills/list",
|
|
19
19
|
listThreads: "thread/list",
|
|
20
|
+
readThread: "thread/read",
|
|
20
21
|
rateLimits: "account/rateLimits/read",
|
|
22
|
+
archiveThread: "thread/archive",
|
|
23
|
+
renameThread: "thread/name/set",
|
|
21
24
|
resumeThread: "thread/resume",
|
|
22
|
-
review: "review/start"
|
|
25
|
+
review: "review/start",
|
|
26
|
+
unarchiveThread: "thread/unarchive"
|
|
23
27
|
};
|
|
24
28
|
/** Formats unsupported control calls differently from ordinary RPC failures. */
|
|
25
29
|
function describeControlFailure(error) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
function flattenCodexDynamicToolFunctions(tools) {
|
|
3
3
|
return (tools ?? []).flatMap((tool) => tool.type === "namespace" ? tool.tools : [tool]);
|
|
4
4
|
}
|
|
5
|
+
const CODEX_INTERACTIVE_THREAD_SOURCE_KINDS = ["cli", "vscode"];
|
|
5
6
|
function isJsonObject(value) {
|
|
6
7
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
7
8
|
}
|
|
@@ -9,4 +10,4 @@ function isRpcResponse(message) {
|
|
|
9
10
|
return "id" in message && !("method" in message);
|
|
10
11
|
}
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { isRpcResponse as i, flattenCodexDynamicToolFunctions as n, isJsonObject as r, CODEX_INTERACTIVE_THREAD_SOURCE_KINDS as t };
|
|
@@ -103,6 +103,7 @@ var ErrorNotification_default = {
|
|
|
103
103
|
{
|
|
104
104
|
"enum": [
|
|
105
105
|
"contextWindowExceeded",
|
|
106
|
+
"sessionBudgetExceeded",
|
|
106
107
|
"usageLimitExceeded",
|
|
107
108
|
"serverOverloaded",
|
|
108
109
|
"cyberPolicy",
|
|
@@ -339,7 +340,6 @@ var ThreadResumeResponse_default = {
|
|
|
339
340
|
}, {
|
|
340
341
|
"enum": [
|
|
341
342
|
"untrusted",
|
|
342
|
-
"on-failure",
|
|
343
343
|
"on-request",
|
|
344
344
|
"never"
|
|
345
345
|
],
|
|
@@ -438,6 +438,7 @@ var ThreadResumeResponse_default = {
|
|
|
438
438
|
{
|
|
439
439
|
"enum": [
|
|
440
440
|
"contextWindowExceeded",
|
|
441
|
+
"sessionBudgetExceeded",
|
|
441
442
|
"usageLimitExceeded",
|
|
442
443
|
"serverOverloaded",
|
|
443
444
|
"cyberPolicy",
|
|
@@ -646,9 +647,12 @@ var ThreadResumeResponse_default = {
|
|
|
646
647
|
"LegacyAppPathString": { "type": "string" },
|
|
647
648
|
"McpToolCallAppContext": {
|
|
648
649
|
"properties": {
|
|
650
|
+
"actionName": { "type": ["string", "null"] },
|
|
651
|
+
"appName": { "type": ["string", "null"] },
|
|
649
652
|
"connectorId": { "type": "string" },
|
|
650
653
|
"linkId": { "type": ["string", "null"] },
|
|
651
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
654
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
655
|
+
"templateId": { "type": ["string", "null"] }
|
|
652
656
|
},
|
|
653
657
|
"required": ["connectorId"],
|
|
654
658
|
"type": "object"
|
|
@@ -728,13 +732,17 @@ var ThreadResumeResponse_default = {
|
|
|
728
732
|
}]
|
|
729
733
|
},
|
|
730
734
|
"MultiAgentMode": {
|
|
731
|
-
"description": "Controls
|
|
732
|
-
"
|
|
733
|
-
"
|
|
734
|
-
"
|
|
735
|
-
"
|
|
736
|
-
|
|
737
|
-
|
|
735
|
+
"description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.",
|
|
736
|
+
"oneOf": [{
|
|
737
|
+
"additionalProperties": false,
|
|
738
|
+
"properties": { "custom": { "type": "string" } },
|
|
739
|
+
"required": ["custom"],
|
|
740
|
+
"title": "CustomMultiAgentMode",
|
|
741
|
+
"type": "object"
|
|
742
|
+
}, {
|
|
743
|
+
"enum": ["explicitRequestOnly", "proactive"],
|
|
744
|
+
"type": "string"
|
|
745
|
+
}]
|
|
738
746
|
},
|
|
739
747
|
"NetworkAccess": {
|
|
740
748
|
"enum": ["restricted", "enabled"],
|
|
@@ -987,6 +995,10 @@ var ThreadResumeResponse_default = {
|
|
|
987
995
|
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
988
996
|
"type": "boolean"
|
|
989
997
|
},
|
|
998
|
+
"extra": {
|
|
999
|
+
"anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
|
|
1000
|
+
"description": "Optional implementation-specific thread data."
|
|
1001
|
+
},
|
|
990
1002
|
"forkedFromId": {
|
|
991
1003
|
"description": "Source thread id when this thread was created by forking another thread.",
|
|
992
1004
|
"type": ["string", "null"]
|
|
@@ -995,7 +1007,15 @@ var ThreadResumeResponse_default = {
|
|
|
995
1007
|
"anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
|
|
996
1008
|
"description": "Optional Git metadata captured when the thread was created."
|
|
997
1009
|
},
|
|
998
|
-
"
|
|
1010
|
+
"historyMode": {
|
|
1011
|
+
"allOf": [{ "$ref": "#/definitions/ThreadHistoryMode" }],
|
|
1012
|
+
"default": "legacy",
|
|
1013
|
+
"description": "Persisted thread history contract selected when this thread was created."
|
|
1014
|
+
},
|
|
1015
|
+
"id": {
|
|
1016
|
+
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
|
1017
|
+
"type": "string"
|
|
1018
|
+
},
|
|
999
1019
|
"modelProvider": {
|
|
1000
1020
|
"description": "Model provider used for this thread (for example, 'openai').",
|
|
1001
1021
|
"type": "string"
|
|
@@ -1068,6 +1088,14 @@ var ThreadResumeResponse_default = {
|
|
|
1068
1088
|
"enum": ["waitingOnApproval", "waitingOnUserInput"],
|
|
1069
1089
|
"type": "string"
|
|
1070
1090
|
},
|
|
1091
|
+
"ThreadExtra": {
|
|
1092
|
+
"description": "Extra app-server data for a thread.",
|
|
1093
|
+
"type": "object"
|
|
1094
|
+
},
|
|
1095
|
+
"ThreadHistoryMode": {
|
|
1096
|
+
"enum": ["legacy", "paginated"],
|
|
1097
|
+
"type": "string"
|
|
1098
|
+
},
|
|
1071
1099
|
"ThreadId": { "type": "string" },
|
|
1072
1100
|
"ThreadItem": { "oneOf": [
|
|
1073
1101
|
{
|
|
@@ -1432,7 +1460,7 @@ var ThreadResumeResponse_default = {
|
|
|
1432
1460
|
{
|
|
1433
1461
|
"properties": {
|
|
1434
1462
|
"id": { "type": "string" },
|
|
1435
|
-
"path": { "$ref": "#/definitions/
|
|
1463
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
1436
1464
|
"type": {
|
|
1437
1465
|
"enum": ["imageView"],
|
|
1438
1466
|
"title": "ImageViewThreadItemType",
|
|
@@ -1606,7 +1634,10 @@ var ThreadResumeResponse_default = {
|
|
|
1606
1634
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
1607
1635
|
"description": "Only populated when the Turn's status is failed."
|
|
1608
1636
|
},
|
|
1609
|
-
"id": {
|
|
1637
|
+
"id": {
|
|
1638
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
1639
|
+
"type": "string"
|
|
1640
|
+
},
|
|
1610
1641
|
"items": {
|
|
1611
1642
|
"description": "Thread items currently included in this turn payload.",
|
|
1612
1643
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -1948,7 +1979,6 @@ var ThreadStartResponse_default = {
|
|
|
1948
1979
|
}, {
|
|
1949
1980
|
"enum": [
|
|
1950
1981
|
"untrusted",
|
|
1951
|
-
"on-failure",
|
|
1952
1982
|
"on-request",
|
|
1953
1983
|
"never"
|
|
1954
1984
|
],
|
|
@@ -2047,6 +2077,7 @@ var ThreadStartResponse_default = {
|
|
|
2047
2077
|
{
|
|
2048
2078
|
"enum": [
|
|
2049
2079
|
"contextWindowExceeded",
|
|
2080
|
+
"sessionBudgetExceeded",
|
|
2050
2081
|
"usageLimitExceeded",
|
|
2051
2082
|
"serverOverloaded",
|
|
2052
2083
|
"cyberPolicy",
|
|
@@ -2255,9 +2286,12 @@ var ThreadStartResponse_default = {
|
|
|
2255
2286
|
"LegacyAppPathString": { "type": "string" },
|
|
2256
2287
|
"McpToolCallAppContext": {
|
|
2257
2288
|
"properties": {
|
|
2289
|
+
"actionName": { "type": ["string", "null"] },
|
|
2290
|
+
"appName": { "type": ["string", "null"] },
|
|
2258
2291
|
"connectorId": { "type": "string" },
|
|
2259
2292
|
"linkId": { "type": ["string", "null"] },
|
|
2260
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
2293
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
2294
|
+
"templateId": { "type": ["string", "null"] }
|
|
2261
2295
|
},
|
|
2262
2296
|
"required": ["connectorId"],
|
|
2263
2297
|
"type": "object"
|
|
@@ -2337,13 +2371,17 @@ var ThreadStartResponse_default = {
|
|
|
2337
2371
|
}]
|
|
2338
2372
|
},
|
|
2339
2373
|
"MultiAgentMode": {
|
|
2340
|
-
"description": "Controls
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2345
|
-
|
|
2346
|
-
|
|
2374
|
+
"description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.",
|
|
2375
|
+
"oneOf": [{
|
|
2376
|
+
"additionalProperties": false,
|
|
2377
|
+
"properties": { "custom": { "type": "string" } },
|
|
2378
|
+
"required": ["custom"],
|
|
2379
|
+
"title": "CustomMultiAgentMode",
|
|
2380
|
+
"type": "object"
|
|
2381
|
+
}, {
|
|
2382
|
+
"enum": ["explicitRequestOnly", "proactive"],
|
|
2383
|
+
"type": "string"
|
|
2384
|
+
}]
|
|
2347
2385
|
},
|
|
2348
2386
|
"NetworkAccess": {
|
|
2349
2387
|
"enum": ["restricted", "enabled"],
|
|
@@ -2596,6 +2634,10 @@ var ThreadStartResponse_default = {
|
|
|
2596
2634
|
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
2597
2635
|
"type": "boolean"
|
|
2598
2636
|
},
|
|
2637
|
+
"extra": {
|
|
2638
|
+
"anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
|
|
2639
|
+
"description": "Optional implementation-specific thread data."
|
|
2640
|
+
},
|
|
2599
2641
|
"forkedFromId": {
|
|
2600
2642
|
"description": "Source thread id when this thread was created by forking another thread.",
|
|
2601
2643
|
"type": ["string", "null"]
|
|
@@ -2604,7 +2646,15 @@ var ThreadStartResponse_default = {
|
|
|
2604
2646
|
"anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
|
|
2605
2647
|
"description": "Optional Git metadata captured when the thread was created."
|
|
2606
2648
|
},
|
|
2607
|
-
"
|
|
2649
|
+
"historyMode": {
|
|
2650
|
+
"allOf": [{ "$ref": "#/definitions/ThreadHistoryMode" }],
|
|
2651
|
+
"default": "legacy",
|
|
2652
|
+
"description": "Persisted thread history contract selected when this thread was created."
|
|
2653
|
+
},
|
|
2654
|
+
"id": {
|
|
2655
|
+
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
|
2656
|
+
"type": "string"
|
|
2657
|
+
},
|
|
2608
2658
|
"modelProvider": {
|
|
2609
2659
|
"description": "Model provider used for this thread (for example, 'openai').",
|
|
2610
2660
|
"type": "string"
|
|
@@ -2677,6 +2727,14 @@ var ThreadStartResponse_default = {
|
|
|
2677
2727
|
"enum": ["waitingOnApproval", "waitingOnUserInput"],
|
|
2678
2728
|
"type": "string"
|
|
2679
2729
|
},
|
|
2730
|
+
"ThreadExtra": {
|
|
2731
|
+
"description": "Extra app-server data for a thread.",
|
|
2732
|
+
"type": "object"
|
|
2733
|
+
},
|
|
2734
|
+
"ThreadHistoryMode": {
|
|
2735
|
+
"enum": ["legacy", "paginated"],
|
|
2736
|
+
"type": "string"
|
|
2737
|
+
},
|
|
2680
2738
|
"ThreadId": { "type": "string" },
|
|
2681
2739
|
"ThreadItem": { "oneOf": [
|
|
2682
2740
|
{
|
|
@@ -3041,7 +3099,7 @@ var ThreadStartResponse_default = {
|
|
|
3041
3099
|
{
|
|
3042
3100
|
"properties": {
|
|
3043
3101
|
"id": { "type": "string" },
|
|
3044
|
-
"path": { "$ref": "#/definitions/
|
|
3102
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
3045
3103
|
"type": {
|
|
3046
3104
|
"enum": ["imageView"],
|
|
3047
3105
|
"title": "ImageViewThreadItemType",
|
|
@@ -3215,7 +3273,10 @@ var ThreadStartResponse_default = {
|
|
|
3215
3273
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
3216
3274
|
"description": "Only populated when the Turn's status is failed."
|
|
3217
3275
|
},
|
|
3218
|
-
"id": {
|
|
3276
|
+
"id": {
|
|
3277
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
3278
|
+
"type": "string"
|
|
3279
|
+
},
|
|
3219
3280
|
"items": {
|
|
3220
3281
|
"description": "Thread items currently included in this turn payload.",
|
|
3221
3282
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -3579,6 +3640,7 @@ var TurnCompletedNotification_default = {
|
|
|
3579
3640
|
{
|
|
3580
3641
|
"enum": [
|
|
3581
3642
|
"contextWindowExceeded",
|
|
3643
|
+
"sessionBudgetExceeded",
|
|
3582
3644
|
"usageLimitExceeded",
|
|
3583
3645
|
"serverOverloaded",
|
|
3584
3646
|
"cyberPolicy",
|
|
@@ -3779,9 +3841,12 @@ var TurnCompletedNotification_default = {
|
|
|
3779
3841
|
"LegacyAppPathString": { "type": "string" },
|
|
3780
3842
|
"McpToolCallAppContext": {
|
|
3781
3843
|
"properties": {
|
|
3844
|
+
"actionName": { "type": ["string", "null"] },
|
|
3845
|
+
"appName": { "type": ["string", "null"] },
|
|
3782
3846
|
"connectorId": { "type": "string" },
|
|
3783
3847
|
"linkId": { "type": ["string", "null"] },
|
|
3784
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
3848
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
3849
|
+
"templateId": { "type": ["string", "null"] }
|
|
3785
3850
|
},
|
|
3786
3851
|
"required": ["connectorId"],
|
|
3787
3852
|
"type": "object"
|
|
@@ -4298,7 +4363,7 @@ var TurnCompletedNotification_default = {
|
|
|
4298
4363
|
{
|
|
4299
4364
|
"properties": {
|
|
4300
4365
|
"id": { "type": "string" },
|
|
4301
|
-
"path": { "$ref": "#/definitions/
|
|
4366
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
4302
4367
|
"type": {
|
|
4303
4368
|
"enum": ["imageView"],
|
|
4304
4369
|
"title": "ImageViewThreadItemType",
|
|
@@ -4423,7 +4488,10 @@ var TurnCompletedNotification_default = {
|
|
|
4423
4488
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
4424
4489
|
"description": "Only populated when the Turn's status is failed."
|
|
4425
4490
|
},
|
|
4426
|
-
"id": {
|
|
4491
|
+
"id": {
|
|
4492
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
4493
|
+
"type": "string"
|
|
4494
|
+
},
|
|
4427
4495
|
"items": {
|
|
4428
4496
|
"description": "Thread items currently included in this turn payload.",
|
|
4429
4497
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -4744,6 +4812,7 @@ var TurnStartResponse_default = {
|
|
|
4744
4812
|
{
|
|
4745
4813
|
"enum": [
|
|
4746
4814
|
"contextWindowExceeded",
|
|
4815
|
+
"sessionBudgetExceeded",
|
|
4747
4816
|
"usageLimitExceeded",
|
|
4748
4817
|
"serverOverloaded",
|
|
4749
4818
|
"cyberPolicy",
|
|
@@ -4944,9 +5013,12 @@ var TurnStartResponse_default = {
|
|
|
4944
5013
|
"LegacyAppPathString": { "type": "string" },
|
|
4945
5014
|
"McpToolCallAppContext": {
|
|
4946
5015
|
"properties": {
|
|
5016
|
+
"actionName": { "type": ["string", "null"] },
|
|
5017
|
+
"appName": { "type": ["string", "null"] },
|
|
4947
5018
|
"connectorId": { "type": "string" },
|
|
4948
5019
|
"linkId": { "type": ["string", "null"] },
|
|
4949
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
5020
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
5021
|
+
"templateId": { "type": ["string", "null"] }
|
|
4950
5022
|
},
|
|
4951
5023
|
"required": ["connectorId"],
|
|
4952
5024
|
"type": "object"
|
|
@@ -5463,7 +5535,7 @@ var TurnStartResponse_default = {
|
|
|
5463
5535
|
{
|
|
5464
5536
|
"properties": {
|
|
5465
5537
|
"id": { "type": "string" },
|
|
5466
|
-
"path": { "$ref": "#/definitions/
|
|
5538
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
5467
5539
|
"type": {
|
|
5468
5540
|
"enum": ["imageView"],
|
|
5469
5541
|
"title": "ImageViewThreadItemType",
|
|
@@ -5588,7 +5660,10 @@ var TurnStartResponse_default = {
|
|
|
5588
5660
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
5589
5661
|
"description": "Only populated when the Turn's status is failed."
|
|
5590
5662
|
},
|
|
5591
|
-
"id": {
|
|
5663
|
+
"id": {
|
|
5664
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
5665
|
+
"type": "string"
|
|
5666
|
+
},
|
|
5592
5667
|
"items": {
|
|
5593
5668
|
"description": "Thread items currently included in this turn payload.",
|
|
5594
5669
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -5817,14 +5892,14 @@ function compileCodexSchema(schema) {
|
|
|
5817
5892
|
errors: (value) => [...validator.Errors(value)]
|
|
5818
5893
|
};
|
|
5819
5894
|
}
|
|
5820
|
-
const schemaMapKeywords = new Set([
|
|
5895
|
+
const schemaMapKeywords = /* @__PURE__ */ new Set([
|
|
5821
5896
|
"$defs",
|
|
5822
5897
|
"definitions",
|
|
5823
5898
|
"dependentSchemas",
|
|
5824
5899
|
"patternProperties",
|
|
5825
5900
|
"properties"
|
|
5826
5901
|
]);
|
|
5827
|
-
const schemaValueKeywords = new Set([
|
|
5902
|
+
const schemaValueKeywords = /* @__PURE__ */ new Set([
|
|
5828
5903
|
"additionalItems",
|
|
5829
5904
|
"additionalProperties",
|
|
5830
5905
|
"contains",
|
|
@@ -5837,7 +5912,7 @@ const schemaValueKeywords = new Set([
|
|
|
5837
5912
|
"unevaluatedItems",
|
|
5838
5913
|
"unevaluatedProperties"
|
|
5839
5914
|
]);
|
|
5840
|
-
const schemaArrayKeywords = new Set([
|
|
5915
|
+
const schemaArrayKeywords = /* @__PURE__ */ new Set([
|
|
5841
5916
|
"allOf",
|
|
5842
5917
|
"anyOf",
|
|
5843
5918
|
"oneOf",
|
|
@@ -5928,19 +6003,23 @@ const validateTurnCompletedNotification = compileCodexSchema(TurnCompletedNotifi
|
|
|
5928
6003
|
const validateTurnStartResponse = compileCodexSchema(TurnStartResponse_default);
|
|
5929
6004
|
/** Asserts and normalizes a Codex thread/start response. */
|
|
5930
6005
|
function assertCodexThreadStartResponse(value) {
|
|
5931
|
-
|
|
6006
|
+
const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
|
|
6007
|
+
return assertCodexShape(validateThreadStartResponse, normalized, "thread/start response");
|
|
5932
6008
|
}
|
|
5933
6009
|
/** Asserts and normalizes a Codex thread/fork response. */
|
|
5934
6010
|
function assertCodexThreadForkResponse(value) {
|
|
5935
|
-
|
|
6011
|
+
const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
|
|
6012
|
+
return assertCodexShape(validateThreadStartResponse, normalized, "thread/fork response");
|
|
5936
6013
|
}
|
|
5937
6014
|
/** Asserts and normalizes a Codex thread/resume response. */
|
|
5938
6015
|
function assertCodexThreadResumeResponse(value) {
|
|
5939
|
-
|
|
6016
|
+
const normalized = normalizeWithDefaults(ThreadResumeResponse_default, value);
|
|
6017
|
+
return assertCodexShape(validateThreadResumeResponse, normalized, "thread/resume response");
|
|
5940
6018
|
}
|
|
5941
6019
|
/** Asserts and normalizes a Codex turn/start response. */
|
|
5942
6020
|
function assertCodexTurnStartResponse(value) {
|
|
5943
|
-
|
|
6021
|
+
const normalized = normalizeWithDefaults(TurnStartResponse_default, normalizeTurnStartResponse(value));
|
|
6022
|
+
return assertCodexShape(validateTurnStartResponse, normalized, "turn/start response");
|
|
5944
6023
|
}
|
|
5945
6024
|
/** Reads Codex dynamic-tool call params, returning undefined for invalid payloads. */
|
|
5946
6025
|
function readCodexDynamicToolCallParams(value) {
|
|
@@ -6009,28 +6088,6 @@ function normalizeThreadItem(value) {
|
|
|
6009
6088
|
default: return value;
|
|
6010
6089
|
}
|
|
6011
6090
|
}
|
|
6012
|
-
function normalizeThreadResponse(value) {
|
|
6013
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("thread" in value)) return value;
|
|
6014
|
-
const thread = value.thread;
|
|
6015
|
-
if (thread && typeof thread === "object" && !Array.isArray(thread)) {
|
|
6016
|
-
const t = thread;
|
|
6017
|
-
if (typeof t.id === "string" && typeof t.sessionId !== "string") return {
|
|
6018
|
-
...value,
|
|
6019
|
-
thread: {
|
|
6020
|
-
...thread,
|
|
6021
|
-
sessionId: t.id
|
|
6022
|
-
}
|
|
6023
|
-
};
|
|
6024
|
-
if (typeof t.sessionId === "string" && typeof t.id !== "string") return {
|
|
6025
|
-
...value,
|
|
6026
|
-
thread: {
|
|
6027
|
-
...thread,
|
|
6028
|
-
id: t.sessionId
|
|
6029
|
-
}
|
|
6030
|
-
};
|
|
6031
|
-
}
|
|
6032
|
-
return value;
|
|
6033
|
-
}
|
|
6034
6091
|
function normalizeTurnStartResponse(value) {
|
|
6035
6092
|
if (!value || typeof value !== "object" || Array.isArray(value) || !("turn" in value)) return value;
|
|
6036
6093
|
return {
|