@openclaw/codex 2026.7.1-beta.1 → 2026.7.1-beta.4
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-xi0ZmBGO.js → app-server-policy-BUk0GLMy.js} +5 -5
- package/dist/{attempt-notifications-l9LElGOU.js → attempt-notifications-BGsEIIDI.js} +5 -40
- package/dist/{command-handlers-vZy8xX5X.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-FPGG-mtX.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 +1119 -28
- package/dist/{media-understanding-provider-C5yYzx_6.js → media-understanding-provider-DgqRvU2_.js} +13 -8
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{models-Ccy1_7nN.js → models-DDmO1zwd.js} +2 -2
- package/dist/notification-correlation-Bo7KB3ks.js +35 -0
- package/dist/{plugin-app-cache-key-CDioyur-.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-CB4mtyrs.js → protocol-validators-dZQ-UTOa.js} +117 -62
- package/dist/{provider-capabilities-CE5k8cmO.js → provider-capabilities-gTCwjfmh.js} +2920 -114
- package/dist/{provider-DosqwRb6.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-O3Zs32KI.js → run-attempt-8SPLiDlT.js} +1016 -2877
- 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-DDVgFmpv.js → side-question-DkjXvYv7.js} +132 -140
- package/dist/{thread-lifecycle-DeSMZSXr.js → thread-lifecycle-BskXnNP-.js} +609 -444
- package/dist/{web-search-provider.runtime-Q89rQhsL.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-CwjdQQ4j.js +0 -18
- package/dist/compact-BzB9AqN1.js +0 -278
- package/dist/conversation-binding-CEE2UyYb.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-C5yYzx_6.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 };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
2
|
import { Compile } from "typebox/compile";
|
|
2
3
|
//#region extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json
|
|
3
4
|
var DynamicToolCallParams_default = {
|
|
@@ -102,6 +103,7 @@ var ErrorNotification_default = {
|
|
|
102
103
|
{
|
|
103
104
|
"enum": [
|
|
104
105
|
"contextWindowExceeded",
|
|
106
|
+
"sessionBudgetExceeded",
|
|
105
107
|
"usageLimitExceeded",
|
|
106
108
|
"serverOverloaded",
|
|
107
109
|
"cyberPolicy",
|
|
@@ -338,7 +340,6 @@ var ThreadResumeResponse_default = {
|
|
|
338
340
|
}, {
|
|
339
341
|
"enum": [
|
|
340
342
|
"untrusted",
|
|
341
|
-
"on-failure",
|
|
342
343
|
"on-request",
|
|
343
344
|
"never"
|
|
344
345
|
],
|
|
@@ -437,6 +438,7 @@ var ThreadResumeResponse_default = {
|
|
|
437
438
|
{
|
|
438
439
|
"enum": [
|
|
439
440
|
"contextWindowExceeded",
|
|
441
|
+
"sessionBudgetExceeded",
|
|
440
442
|
"usageLimitExceeded",
|
|
441
443
|
"serverOverloaded",
|
|
442
444
|
"cyberPolicy",
|
|
@@ -645,9 +647,12 @@ var ThreadResumeResponse_default = {
|
|
|
645
647
|
"LegacyAppPathString": { "type": "string" },
|
|
646
648
|
"McpToolCallAppContext": {
|
|
647
649
|
"properties": {
|
|
650
|
+
"actionName": { "type": ["string", "null"] },
|
|
651
|
+
"appName": { "type": ["string", "null"] },
|
|
648
652
|
"connectorId": { "type": "string" },
|
|
649
653
|
"linkId": { "type": ["string", "null"] },
|
|
650
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
654
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
655
|
+
"templateId": { "type": ["string", "null"] }
|
|
651
656
|
},
|
|
652
657
|
"required": ["connectorId"],
|
|
653
658
|
"type": "object"
|
|
@@ -727,13 +732,17 @@ var ThreadResumeResponse_default = {
|
|
|
727
732
|
}]
|
|
728
733
|
},
|
|
729
734
|
"MultiAgentMode": {
|
|
730
|
-
"description": "Controls
|
|
731
|
-
"
|
|
732
|
-
"
|
|
733
|
-
"
|
|
734
|
-
"
|
|
735
|
-
|
|
736
|
-
|
|
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
|
+
}]
|
|
737
746
|
},
|
|
738
747
|
"NetworkAccess": {
|
|
739
748
|
"enum": ["restricted", "enabled"],
|
|
@@ -986,6 +995,10 @@ var ThreadResumeResponse_default = {
|
|
|
986
995
|
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
987
996
|
"type": "boolean"
|
|
988
997
|
},
|
|
998
|
+
"extra": {
|
|
999
|
+
"anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
|
|
1000
|
+
"description": "Optional implementation-specific thread data."
|
|
1001
|
+
},
|
|
989
1002
|
"forkedFromId": {
|
|
990
1003
|
"description": "Source thread id when this thread was created by forking another thread.",
|
|
991
1004
|
"type": ["string", "null"]
|
|
@@ -994,7 +1007,15 @@ var ThreadResumeResponse_default = {
|
|
|
994
1007
|
"anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
|
|
995
1008
|
"description": "Optional Git metadata captured when the thread was created."
|
|
996
1009
|
},
|
|
997
|
-
"
|
|
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
|
+
},
|
|
998
1019
|
"modelProvider": {
|
|
999
1020
|
"description": "Model provider used for this thread (for example, 'openai').",
|
|
1000
1021
|
"type": "string"
|
|
@@ -1067,6 +1088,14 @@ var ThreadResumeResponse_default = {
|
|
|
1067
1088
|
"enum": ["waitingOnApproval", "waitingOnUserInput"],
|
|
1068
1089
|
"type": "string"
|
|
1069
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
|
+
},
|
|
1070
1099
|
"ThreadId": { "type": "string" },
|
|
1071
1100
|
"ThreadItem": { "oneOf": [
|
|
1072
1101
|
{
|
|
@@ -1431,7 +1460,7 @@ var ThreadResumeResponse_default = {
|
|
|
1431
1460
|
{
|
|
1432
1461
|
"properties": {
|
|
1433
1462
|
"id": { "type": "string" },
|
|
1434
|
-
"path": { "$ref": "#/definitions/
|
|
1463
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
1435
1464
|
"type": {
|
|
1436
1465
|
"enum": ["imageView"],
|
|
1437
1466
|
"title": "ImageViewThreadItemType",
|
|
@@ -1605,7 +1634,10 @@ var ThreadResumeResponse_default = {
|
|
|
1605
1634
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
1606
1635
|
"description": "Only populated when the Turn's status is failed."
|
|
1607
1636
|
},
|
|
1608
|
-
"id": {
|
|
1637
|
+
"id": {
|
|
1638
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
1639
|
+
"type": "string"
|
|
1640
|
+
},
|
|
1609
1641
|
"items": {
|
|
1610
1642
|
"description": "Thread items currently included in this turn payload.",
|
|
1611
1643
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -1947,7 +1979,6 @@ var ThreadStartResponse_default = {
|
|
|
1947
1979
|
}, {
|
|
1948
1980
|
"enum": [
|
|
1949
1981
|
"untrusted",
|
|
1950
|
-
"on-failure",
|
|
1951
1982
|
"on-request",
|
|
1952
1983
|
"never"
|
|
1953
1984
|
],
|
|
@@ -2046,6 +2077,7 @@ var ThreadStartResponse_default = {
|
|
|
2046
2077
|
{
|
|
2047
2078
|
"enum": [
|
|
2048
2079
|
"contextWindowExceeded",
|
|
2080
|
+
"sessionBudgetExceeded",
|
|
2049
2081
|
"usageLimitExceeded",
|
|
2050
2082
|
"serverOverloaded",
|
|
2051
2083
|
"cyberPolicy",
|
|
@@ -2254,9 +2286,12 @@ var ThreadStartResponse_default = {
|
|
|
2254
2286
|
"LegacyAppPathString": { "type": "string" },
|
|
2255
2287
|
"McpToolCallAppContext": {
|
|
2256
2288
|
"properties": {
|
|
2289
|
+
"actionName": { "type": ["string", "null"] },
|
|
2290
|
+
"appName": { "type": ["string", "null"] },
|
|
2257
2291
|
"connectorId": { "type": "string" },
|
|
2258
2292
|
"linkId": { "type": ["string", "null"] },
|
|
2259
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
2293
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
2294
|
+
"templateId": { "type": ["string", "null"] }
|
|
2260
2295
|
},
|
|
2261
2296
|
"required": ["connectorId"],
|
|
2262
2297
|
"type": "object"
|
|
@@ -2336,13 +2371,17 @@ var ThreadStartResponse_default = {
|
|
|
2336
2371
|
}]
|
|
2337
2372
|
},
|
|
2338
2373
|
"MultiAgentMode": {
|
|
2339
|
-
"description": "Controls
|
|
2340
|
-
"
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
|
|
2345
|
-
|
|
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
|
+
}]
|
|
2346
2385
|
},
|
|
2347
2386
|
"NetworkAccess": {
|
|
2348
2387
|
"enum": ["restricted", "enabled"],
|
|
@@ -2595,6 +2634,10 @@ var ThreadStartResponse_default = {
|
|
|
2595
2634
|
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
2596
2635
|
"type": "boolean"
|
|
2597
2636
|
},
|
|
2637
|
+
"extra": {
|
|
2638
|
+
"anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
|
|
2639
|
+
"description": "Optional implementation-specific thread data."
|
|
2640
|
+
},
|
|
2598
2641
|
"forkedFromId": {
|
|
2599
2642
|
"description": "Source thread id when this thread was created by forking another thread.",
|
|
2600
2643
|
"type": ["string", "null"]
|
|
@@ -2603,7 +2646,15 @@ var ThreadStartResponse_default = {
|
|
|
2603
2646
|
"anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
|
|
2604
2647
|
"description": "Optional Git metadata captured when the thread was created."
|
|
2605
2648
|
},
|
|
2606
|
-
"
|
|
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
|
+
},
|
|
2607
2658
|
"modelProvider": {
|
|
2608
2659
|
"description": "Model provider used for this thread (for example, 'openai').",
|
|
2609
2660
|
"type": "string"
|
|
@@ -2676,6 +2727,14 @@ var ThreadStartResponse_default = {
|
|
|
2676
2727
|
"enum": ["waitingOnApproval", "waitingOnUserInput"],
|
|
2677
2728
|
"type": "string"
|
|
2678
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
|
+
},
|
|
2679
2738
|
"ThreadId": { "type": "string" },
|
|
2680
2739
|
"ThreadItem": { "oneOf": [
|
|
2681
2740
|
{
|
|
@@ -3040,7 +3099,7 @@ var ThreadStartResponse_default = {
|
|
|
3040
3099
|
{
|
|
3041
3100
|
"properties": {
|
|
3042
3101
|
"id": { "type": "string" },
|
|
3043
|
-
"path": { "$ref": "#/definitions/
|
|
3102
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
3044
3103
|
"type": {
|
|
3045
3104
|
"enum": ["imageView"],
|
|
3046
3105
|
"title": "ImageViewThreadItemType",
|
|
@@ -3214,7 +3273,10 @@ var ThreadStartResponse_default = {
|
|
|
3214
3273
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
3215
3274
|
"description": "Only populated when the Turn's status is failed."
|
|
3216
3275
|
},
|
|
3217
|
-
"id": {
|
|
3276
|
+
"id": {
|
|
3277
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
3278
|
+
"type": "string"
|
|
3279
|
+
},
|
|
3218
3280
|
"items": {
|
|
3219
3281
|
"description": "Thread items currently included in this turn payload.",
|
|
3220
3282
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -3578,6 +3640,7 @@ var TurnCompletedNotification_default = {
|
|
|
3578
3640
|
{
|
|
3579
3641
|
"enum": [
|
|
3580
3642
|
"contextWindowExceeded",
|
|
3643
|
+
"sessionBudgetExceeded",
|
|
3581
3644
|
"usageLimitExceeded",
|
|
3582
3645
|
"serverOverloaded",
|
|
3583
3646
|
"cyberPolicy",
|
|
@@ -3778,9 +3841,12 @@ var TurnCompletedNotification_default = {
|
|
|
3778
3841
|
"LegacyAppPathString": { "type": "string" },
|
|
3779
3842
|
"McpToolCallAppContext": {
|
|
3780
3843
|
"properties": {
|
|
3844
|
+
"actionName": { "type": ["string", "null"] },
|
|
3845
|
+
"appName": { "type": ["string", "null"] },
|
|
3781
3846
|
"connectorId": { "type": "string" },
|
|
3782
3847
|
"linkId": { "type": ["string", "null"] },
|
|
3783
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
3848
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
3849
|
+
"templateId": { "type": ["string", "null"] }
|
|
3784
3850
|
},
|
|
3785
3851
|
"required": ["connectorId"],
|
|
3786
3852
|
"type": "object"
|
|
@@ -4297,7 +4363,7 @@ var TurnCompletedNotification_default = {
|
|
|
4297
4363
|
{
|
|
4298
4364
|
"properties": {
|
|
4299
4365
|
"id": { "type": "string" },
|
|
4300
|
-
"path": { "$ref": "#/definitions/
|
|
4366
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
4301
4367
|
"type": {
|
|
4302
4368
|
"enum": ["imageView"],
|
|
4303
4369
|
"title": "ImageViewThreadItemType",
|
|
@@ -4422,7 +4488,10 @@ var TurnCompletedNotification_default = {
|
|
|
4422
4488
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
4423
4489
|
"description": "Only populated when the Turn's status is failed."
|
|
4424
4490
|
},
|
|
4425
|
-
"id": {
|
|
4491
|
+
"id": {
|
|
4492
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
4493
|
+
"type": "string"
|
|
4494
|
+
},
|
|
4426
4495
|
"items": {
|
|
4427
4496
|
"description": "Thread items currently included in this turn payload.",
|
|
4428
4497
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -4743,6 +4812,7 @@ var TurnStartResponse_default = {
|
|
|
4743
4812
|
{
|
|
4744
4813
|
"enum": [
|
|
4745
4814
|
"contextWindowExceeded",
|
|
4815
|
+
"sessionBudgetExceeded",
|
|
4746
4816
|
"usageLimitExceeded",
|
|
4747
4817
|
"serverOverloaded",
|
|
4748
4818
|
"cyberPolicy",
|
|
@@ -4943,9 +5013,12 @@ var TurnStartResponse_default = {
|
|
|
4943
5013
|
"LegacyAppPathString": { "type": "string" },
|
|
4944
5014
|
"McpToolCallAppContext": {
|
|
4945
5015
|
"properties": {
|
|
5016
|
+
"actionName": { "type": ["string", "null"] },
|
|
5017
|
+
"appName": { "type": ["string", "null"] },
|
|
4946
5018
|
"connectorId": { "type": "string" },
|
|
4947
5019
|
"linkId": { "type": ["string", "null"] },
|
|
4948
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
5020
|
+
"resourceUri": { "type": ["string", "null"] },
|
|
5021
|
+
"templateId": { "type": ["string", "null"] }
|
|
4949
5022
|
},
|
|
4950
5023
|
"required": ["connectorId"],
|
|
4951
5024
|
"type": "object"
|
|
@@ -5462,7 +5535,7 @@ var TurnStartResponse_default = {
|
|
|
5462
5535
|
{
|
|
5463
5536
|
"properties": {
|
|
5464
5537
|
"id": { "type": "string" },
|
|
5465
|
-
"path": { "$ref": "#/definitions/
|
|
5538
|
+
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
5466
5539
|
"type": {
|
|
5467
5540
|
"enum": ["imageView"],
|
|
5468
5541
|
"title": "ImageViewThreadItemType",
|
|
@@ -5587,7 +5660,10 @@ var TurnStartResponse_default = {
|
|
|
5587
5660
|
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
5588
5661
|
"description": "Only populated when the Turn's status is failed."
|
|
5589
5662
|
},
|
|
5590
|
-
"id": {
|
|
5663
|
+
"id": {
|
|
5664
|
+
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
5665
|
+
"type": "string"
|
|
5666
|
+
},
|
|
5591
5667
|
"items": {
|
|
5592
5668
|
"description": "Thread items currently included in this turn payload.",
|
|
5593
5669
|
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
@@ -5816,17 +5892,14 @@ function compileCodexSchema(schema) {
|
|
|
5816
5892
|
errors: (value) => [...validator.Errors(value)]
|
|
5817
5893
|
};
|
|
5818
5894
|
}
|
|
5819
|
-
|
|
5820
|
-
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
5821
|
-
}
|
|
5822
|
-
const schemaMapKeywords = new Set([
|
|
5895
|
+
const schemaMapKeywords = /* @__PURE__ */ new Set([
|
|
5823
5896
|
"$defs",
|
|
5824
5897
|
"definitions",
|
|
5825
5898
|
"dependentSchemas",
|
|
5826
5899
|
"patternProperties",
|
|
5827
5900
|
"properties"
|
|
5828
5901
|
]);
|
|
5829
|
-
const schemaValueKeywords = new Set([
|
|
5902
|
+
const schemaValueKeywords = /* @__PURE__ */ new Set([
|
|
5830
5903
|
"additionalItems",
|
|
5831
5904
|
"additionalProperties",
|
|
5832
5905
|
"contains",
|
|
@@ -5839,7 +5912,7 @@ const schemaValueKeywords = new Set([
|
|
|
5839
5912
|
"unevaluatedItems",
|
|
5840
5913
|
"unevaluatedProperties"
|
|
5841
5914
|
]);
|
|
5842
|
-
const schemaArrayKeywords = new Set([
|
|
5915
|
+
const schemaArrayKeywords = /* @__PURE__ */ new Set([
|
|
5843
5916
|
"allOf",
|
|
5844
5917
|
"anyOf",
|
|
5845
5918
|
"oneOf",
|
|
@@ -5930,19 +6003,23 @@ const validateTurnCompletedNotification = compileCodexSchema(TurnCompletedNotifi
|
|
|
5930
6003
|
const validateTurnStartResponse = compileCodexSchema(TurnStartResponse_default);
|
|
5931
6004
|
/** Asserts and normalizes a Codex thread/start response. */
|
|
5932
6005
|
function assertCodexThreadStartResponse(value) {
|
|
5933
|
-
|
|
6006
|
+
const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
|
|
6007
|
+
return assertCodexShape(validateThreadStartResponse, normalized, "thread/start response");
|
|
5934
6008
|
}
|
|
5935
6009
|
/** Asserts and normalizes a Codex thread/fork response. */
|
|
5936
6010
|
function assertCodexThreadForkResponse(value) {
|
|
5937
|
-
|
|
6011
|
+
const normalized = normalizeWithDefaults(ThreadStartResponse_default, value);
|
|
6012
|
+
return assertCodexShape(validateThreadStartResponse, normalized, "thread/fork response");
|
|
5938
6013
|
}
|
|
5939
6014
|
/** Asserts and normalizes a Codex thread/resume response. */
|
|
5940
6015
|
function assertCodexThreadResumeResponse(value) {
|
|
5941
|
-
|
|
6016
|
+
const normalized = normalizeWithDefaults(ThreadResumeResponse_default, value);
|
|
6017
|
+
return assertCodexShape(validateThreadResumeResponse, normalized, "thread/resume response");
|
|
5942
6018
|
}
|
|
5943
6019
|
/** Asserts and normalizes a Codex turn/start response. */
|
|
5944
6020
|
function assertCodexTurnStartResponse(value) {
|
|
5945
|
-
|
|
6021
|
+
const normalized = normalizeWithDefaults(TurnStartResponse_default, normalizeTurnStartResponse(value));
|
|
6022
|
+
return assertCodexShape(validateTurnStartResponse, normalized, "turn/start response");
|
|
5946
6023
|
}
|
|
5947
6024
|
/** Reads Codex dynamic-tool call params, returning undefined for invalid payloads. */
|
|
5948
6025
|
function readCodexDynamicToolCallParams(value) {
|
|
@@ -6011,28 +6088,6 @@ function normalizeThreadItem(value) {
|
|
|
6011
6088
|
default: return value;
|
|
6012
6089
|
}
|
|
6013
6090
|
}
|
|
6014
|
-
function normalizeThreadResponse(value) {
|
|
6015
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("thread" in value)) return value;
|
|
6016
|
-
const thread = value.thread;
|
|
6017
|
-
if (thread && typeof thread === "object" && !Array.isArray(thread)) {
|
|
6018
|
-
const t = thread;
|
|
6019
|
-
if (typeof t.id === "string" && typeof t.sessionId !== "string") return {
|
|
6020
|
-
...value,
|
|
6021
|
-
thread: {
|
|
6022
|
-
...thread,
|
|
6023
|
-
sessionId: t.id
|
|
6024
|
-
}
|
|
6025
|
-
};
|
|
6026
|
-
if (typeof t.sessionId === "string" && typeof t.id !== "string") return {
|
|
6027
|
-
...value,
|
|
6028
|
-
thread: {
|
|
6029
|
-
...thread,
|
|
6030
|
-
id: t.sessionId
|
|
6031
|
-
}
|
|
6032
|
-
};
|
|
6033
|
-
}
|
|
6034
|
-
return value;
|
|
6035
|
-
}
|
|
6036
6091
|
function normalizeTurnStartResponse(value) {
|
|
6037
6092
|
if (!value || typeof value !== "object" || Array.isArray(value) || !("turn" in value)) return value;
|
|
6038
6093
|
return {
|