@openclaw/codex 2026.9.35 → 2026.9.36

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.
Files changed (60) hide show
  1. package/dist/.setup/{account-usage-runtime-BaJamBiM.mjs → account-usage-runtime-BOmEegZv.mjs} +1 -1
  2. package/dist/.setup/{apply-CxwOGLd_.mjs → apply-DhLjXde1.mjs} +4 -4
  3. package/dist/.setup/{attempt-client-cleanup-BVtNsTOE.mjs → attempt-client-cleanup-C9dwStbK.mjs} +4 -4
  4. package/dist/.setup/{attempt-workspace-context-XRsWP165.mjs → attempt-workspace-context-DJrvhJDC.mjs} +1 -1
  5. package/dist/.setup/{auth-cache-key-CskfconU.mjs → auth-cache-key-DWIq3Lzf.mjs} +1 -1
  6. package/dist/.setup/{bounded-turn-DBwLoFDR.mjs → bounded-turn-Csc9Qvpm.mjs} +9 -9
  7. package/dist/.setup/{build-state-B3lvV1Op.mjs → build-state-CmeL24P5.mjs} +1 -1
  8. package/dist/.setup/{client-DcTISXe3.mjs → client-BdNoDUaQ.mjs} +263 -2
  9. package/dist/.setup/{command-dispatch-MOoD3rsD.mjs → command-dispatch-9sYDmuIo.mjs} +1 -1
  10. package/dist/.setup/{command-handlers-Cevt_YwM.mjs → command-handlers-C-uyeN_H.mjs} +11 -11
  11. package/dist/.setup/{command-rpc-kf7Uq4L-.mjs → command-rpc-BHE3OG7z.mjs} +6 -6
  12. package/dist/.setup/{compact-BNKuKa7o.mjs → compact-DsrYq-_j.mjs} +8 -8
  13. package/dist/.setup/{conversation-binding-CKYGEvcX.mjs → conversation-binding-CfIcWNVS.mjs} +9 -9
  14. package/dist/.setup/{conversation-control-CoWUL35l.mjs → conversation-control-BWzVNh-v.mjs} +2 -2
  15. package/dist/.setup/{dynamic-tools-Dr0ye5P3.mjs → dynamic-tools-CAWsGyFZ.mjs} +6 -6
  16. package/dist/.setup/{effective-mcp-catalog-BFJCwjSI.mjs → effective-mcp-catalog-BYzIV1DD.mjs} +2 -2
  17. package/dist/.setup/{ephemeral-turn-Dj3iTfSP.mjs → ephemeral-turn-CIcaAzR4.mjs} +2 -2
  18. package/dist/.setup/{event-projector-assistant-message-DXDX94zH.mjs → event-projector-assistant-message-CDe3ohIy.mjs} +1 -1
  19. package/dist/.setup/{isolated-completion-GB52W-qA.mjs → isolated-completion-DLV0kBu2.mjs} +4 -4
  20. package/dist/.setup/{model-catalog-DxSrOSY0.mjs → model-catalog-CbhJ0pMa.mjs} +5 -5
  21. package/dist/.setup/{models-BwkZaXXj.mjs → models-DXVC1KpU.mjs} +3 -3
  22. package/dist/.setup/{native-subagent-monitor-g-ZDkvCr.mjs → native-subagent-monitor-GOGINNw0.mjs} +2 -2
  23. package/dist/.setup/{plan-Cwp_21m-.mjs → plan-BB5rf7qh.mjs} +2 -2
  24. package/dist/.setup/{plugin-metadata-cache-C-LRxilF.mjs → plugin-metadata-cache-DuaAXtXC.mjs} +4 -4
  25. package/dist/.setup/{provider-DUotqBZ6.mjs → provider-BEDFjTWv.mjs} +4 -4
  26. package/dist/.setup/{provider-capabilities-DBs9l8oL.mjs → provider-capabilities-DcF-V_3D.mjs} +2 -2
  27. package/dist/.setup/{request-CWERwKIL.mjs → request-DZKa6YSy.mjs} +1 -1
  28. package/dist/.setup/{run-attempt-ypT0LYSD.mjs → run-attempt-EMGdmQqt.mjs} +19 -19
  29. package/dist/.setup/{session-catalog-DMagZcW-.mjs → session-catalog-apN5C2Oz.mjs} +9 -9
  30. package/dist/.setup/{session-catalog-events-r59AxcQ4.mjs → session-catalog-events-DHPtqvWu.mjs} +2 -2
  31. package/dist/.setup/{session-catalog-index-CY1lNpxF.mjs → session-catalog-index-JJogsGuf.mjs} +3 -3
  32. package/dist/.setup/{session-catalog-native-projection-CXTe4qQr.mjs → session-catalog-native-projection-C_xvyztm.mjs} +1 -1
  33. package/dist/.setup/{session-catalog-projection-DcDKizZd.mjs → session-catalog-projection-C6PSmTcX.mjs} +1 -1
  34. package/dist/.setup/{session-cli-C3GejWcm.mjs → session-cli-B5RvT_Rs.mjs} +2 -2
  35. package/dist/.setup/{session-retirement-CQCMiDul.mjs → session-retirement-Bdygfnxa.mjs} +5 -5
  36. package/dist/.setup/{settled-turn-finalizer-w92T5Rbb.mjs → settled-turn-finalizer-BzVjkwgJ.mjs} +5 -5
  37. package/dist/.setup/{shared-client-ZXKMsK6f.mjs → shared-client-B__jQti1.mjs} +6 -6
  38. package/dist/.setup/{shared-client-lifecycle-BH_y_i8l.mjs → shared-client-lifecycle-wN_lOZkB.mjs} +1 -1
  39. package/dist/.setup/{side-question-BBZJibHK.mjs → side-question-B25zswMS.mjs} +9 -9
  40. package/dist/.setup/{source-Iusn97ly.mjs → source-DuNxTQoz.mjs} +1 -1
  41. package/dist/.setup/{thread-lifecycle-CzzYMvTL.mjs → thread-lifecycle-Cw5Nsciw.mjs} +8 -8
  42. package/dist/.setup/{thread-ownership-BT_SeSUp.mjs → thread-ownership-Cxb01Uwq.mjs} +3 -3
  43. package/dist/.setup/{thread-policy-MM5YD22L.mjs → thread-policy-BHr4QsDO.mjs} +3 -3
  44. package/dist/.setup/{thread-requests-y_MnVuWC.mjs → thread-requests-D-GTNAnZ.mjs} +4 -4
  45. package/dist/.setup/{thread-resume-B9clyqXE.mjs → thread-resume-BNdEFZpM.mjs} +5 -5
  46. package/dist/.setup/{upstream-session-fork-2ipYynVl.mjs → upstream-session-fork-D8rqW9ad.mjs} +8 -8
  47. package/dist/.setup/{usage-BgB8DOas.mjs → usage-D_W8Be4u.mjs} +1 -1
  48. package/dist/.setup/{usage-limit-error-B1FCZdeH.mjs → usage-limit-error-CpasNGjp.mjs} +1 -1
  49. package/dist/.setup/{web-search-provider.runtime-BWbZnYAL.mjs → web-search-provider.runtime-CyRLuVOO.mjs} +2 -2
  50. package/dist/.source-module-urls/0560e3825cf513bbe9e095a85951c1215dfced0c1e581c5f32b007a3e759636e.json +1 -0
  51. package/dist/.source-module-urls/89af8e902f34481d87fbb497cd5ac223d504b1fa22d95d3038b6d33a3b97c3da.json +1 -0
  52. package/dist/catalog-page.worker.js +338 -1
  53. package/dist/cli-metadata.js +1 -1
  54. package/dist/harness.js +14 -14
  55. package/dist/index.js +18 -18
  56. package/dist/media-understanding-provider.js +2 -2
  57. package/dist/migration-provider-api.js +1 -1
  58. package/package.json +5 -5
  59. package/dist/.setup/client-catalog-response-BcbsrQXY.mjs +0 -285
  60. package/dist/.source-module-urls/78bb81623f5bb4c04c8cbd3fb1e9f10b4529f4811dc3cd99cedf5880f01c9b28.json +0 -1
@@ -1,5 +1,342 @@
1
- import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-BcbsrQXY.mjs";
2
1
  import { serveWorkerTasks } from "openclaw/plugin-sdk/worker-task-server";
2
+ import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
3
+ import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
5
+ import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
6
+ //#region extensions/codex/src/app-server/protocol-json.ts
7
+ function isRpcResponse(message) {
8
+ return message !== null && typeof message === "object" && "id" in message && (typeof message.id === "number" || typeof message.id === "string") && !("method" in message);
9
+ }
10
+ //#endregion
11
+ //#region extensions/codex/src/app-server/protocol.ts
12
+ function isJsonObject(value) {
13
+ return isRecord(value);
14
+ }
15
+ //#endregion
16
+ //#region extensions/codex/src/session-catalog-limits.ts
17
+ /** Preserve UTF-16 code units without retaining an oversized source string. */
18
+ function detachCodexCatalogString(value) {
19
+ return Buffer.from(value, "utf16le").toString("utf16le");
20
+ }
21
+ const MAX_CWD_LENGTH = 4096;
22
+ const MAX_SESSION_PREVIEW_LENGTH = 500;
23
+ const SESSION_PREVIEW_PREFIX_LENGTH = 2048;
24
+ function boundedCatalogString(value, maxLength, overflow = "omit") {
25
+ if (typeof value !== "string") return;
26
+ const normalized = value.trim();
27
+ if (!normalized) return;
28
+ if (normalized.length <= maxLength) return detachCodexCatalogString(normalized);
29
+ return overflow === "truncate" ? detachCodexCatalogString(truncateUtf16Safe(normalized, maxLength)) : void 0;
30
+ }
31
+ function catalogPreview(value, sanitize) {
32
+ if (typeof value !== "string") return;
33
+ return boundedCatalogString(sanitize(value.replace(/\s+/g, " ")), MAX_SESSION_PREVIEW_LENGTH, "truncate");
34
+ }
35
+ /** Select a bounded input only for the canonical terminal sanitizer. */
36
+ function selectCodexCatalogPreviewInput(value) {
37
+ if (value.length <= SESSION_PREVIEW_PREFIX_LENGTH) return value;
38
+ const prefix = value.slice(0, SESSION_PREVIEW_PREFIX_LENGTH).replace(/\s+/g, " ").trim();
39
+ return prefix.length > MAX_SESSION_PREVIEW_LENGTH && !/\p{Cc}/u.test(prefix) ? prefix : value;
40
+ }
41
+ /** Detach the small preview from V8's potentially large sliced-string backing store. */
42
+ function truncateCodexCatalogPreview(value, sanitize) {
43
+ return Buffer.from(catalogPreview(value, sanitize) ?? "", "utf8").toString("utf8");
44
+ }
45
+ //#endregion
46
+ //#region extensions/codex/package.json
47
+ var version = "2026.9.36";
48
+ //#endregion
49
+ //#region extensions/codex/src/build-state.ts
50
+ /**
51
+ * Duplicate module copies share one immutable published version's state.
52
+ * In-process restarts retain old records and callbacks for their old owners.
53
+ * Local rebuilds without a version bump deliberately share the same state.
54
+ */
55
+ function codexBuildSymbol(name) {
56
+ return Symbol.for(`${name}@${version}`);
57
+ }
58
+ function defineCodexBuildState(name, create) {
59
+ const key = codexBuildSymbol(name);
60
+ const globalState = globalThis;
61
+ return () => globalState[key] ??= create();
62
+ }
63
+ //#endregion
64
+ //#region extensions/codex/src/session-catalog-source.ts
65
+ const getSources = defineCodexBuildState("openclaw.codexCatalogSources", () => ({
66
+ clients: /* @__PURE__ */ new WeakMap(),
67
+ values: /* @__PURE__ */ new WeakMap()
68
+ }));
69
+ defineCodexBuildState("openclaw.codexCatalogEphemeralObservers", () => /* @__PURE__ */ new WeakMap());
70
+ function getCodexCatalogSource(value) {
71
+ return value !== null && typeof value === "object" ? getSources().values.get(value) : void 0;
72
+ }
73
+ function setCodexCatalogSource(value, source) {
74
+ if (source) getSources().values.set(value, source);
75
+ return value;
76
+ }
77
+ /** Source attribution survives projection without becoming serialized row data. */
78
+ function copyCodexCatalogSource(from, to) {
79
+ return setCodexCatalogSource(to, getCodexCatalogSource(from));
80
+ }
81
+ const STRING_FIELDS = [
82
+ [
83
+ "name",
84
+ 500,
85
+ "truncate"
86
+ ],
87
+ [
88
+ "cwd",
89
+ MAX_CWD_LENGTH,
90
+ "omit"
91
+ ],
92
+ [
93
+ "modelProvider",
94
+ 500,
95
+ "truncate"
96
+ ],
97
+ [
98
+ "cliVersion",
99
+ 500,
100
+ "truncate"
101
+ ]
102
+ ];
103
+ /** Drop unused native fields before catalog-owned asynchronous work can retain them. */
104
+ function projectCodexCatalogNativeThread(thread, sanitize, cachedPreview) {
105
+ if (!isJsonObject(thread)) throw new Error("Codex catalog response contains an invalid thread");
106
+ const id = boundedCatalogString(thread.id, 256);
107
+ if (!id) throw new Error("Codex catalog response contains an invalid thread id");
108
+ const row = {
109
+ id,
110
+ projectId: boundedCatalogString(thread.projectId, 256, "omit") ?? null
111
+ };
112
+ const sessionId = boundedCatalogString(thread.sessionId, 256, "omit");
113
+ if (sessionId) row.sessionId = sessionId;
114
+ if (thread.ephemeral === true) return copyCodexCatalogSource(thread, {
115
+ ...row,
116
+ ephemeral: true
117
+ });
118
+ for (const [field, limit, overflow] of STRING_FIELDS) {
119
+ const value = thread[field];
120
+ const bounded = boundedCatalogString(value, limit, overflow);
121
+ if (value === null || bounded !== void 0) row[field] = bounded ?? null;
122
+ }
123
+ if (typeof thread.path === "string") {
124
+ if (thread.path.length > 4096) throw new Error("Codex catalog rollout path exceeds its length limit");
125
+ row.path = detachCodexCatalogString(thread.path);
126
+ } else if (thread.path === null) row.path = null;
127
+ if (typeof thread.originator === "string") row.originator = detachCodexCatalogString(thread.originator.slice(0, 500));
128
+ for (const field of [
129
+ "createdAt",
130
+ "updatedAt",
131
+ "recencyAt"
132
+ ]) {
133
+ const value = thread[field];
134
+ if (value === null || typeof value === "number" && Number.isFinite(value)) row[field] = value;
135
+ }
136
+ const rawPreview = thread.preview;
137
+ const preview = reuseCodexCatalogPreview(row, typeof rawPreview === "string" ? Boolean(rawPreview) : void 0, cachedPreview);
138
+ if (preview !== void 0) row.preview = preview;
139
+ else if (typeof rawPreview === "string") row.preview = rawPreview ? truncateCodexCatalogPreview(selectCodexCatalogPreviewInput(rawPreview), sanitize) : "";
140
+ else if (rawPreview === null) row.preview = null;
141
+ const source = typeof thread.source === "string" ? detachCodexCatalogString(thread.source.slice(0, 500)) : void 0;
142
+ if (source === "cli" || source === "vscode" || source === "exec" || source === "appServer" || source === "unknown") row.source = source;
143
+ else if (isJsonObject(thread.source) && typeof thread.source.custom === "string" && thread.source.custom.length <= 500) row.source = { custom: detachCodexCatalogString(thread.source.custom) };
144
+ if (isJsonObject(thread.gitInfo)) {
145
+ const branch = boundedCatalogString(thread.gitInfo.branch, 500, "truncate");
146
+ if (branch !== void 0) row.gitInfo = { branch };
147
+ }
148
+ if (isJsonObject(thread.status)) {
149
+ const type = boundedCatalogString(thread.status.type, 64);
150
+ if (type === "active" || type === "idle" || type === "notLoaded" || type === "systemError") {
151
+ const activeFlags = type === "active" && Array.isArray(thread.status.activeFlags) ? thread.status.activeFlags.slice(0, 16).flatMap((flag) => {
152
+ const bounded = boundedCatalogString(flag, 128, "omit");
153
+ return bounded ? [bounded] : [];
154
+ }) : void 0;
155
+ row.status = type === "active" ? {
156
+ type,
157
+ ...activeFlags ? { activeFlags } : {}
158
+ } : { type };
159
+ }
160
+ }
161
+ return copyCodexCatalogSource(thread, row);
162
+ }
163
+ /** Keep only the admitted prefix before an RPC promise retains its response. */
164
+ function projectCodexCatalogNativeResponse(response, sanitize, cachedPreview, remainingRows = 64) {
165
+ if (!Array.isArray(response.data) || response.data.length > 64) throw new Error("Codex catalog response exceeds its native page limit");
166
+ const limit = Number.isFinite(remainingRows) ? Math.max(0, Math.min(64, Math.floor(remainingRows))) : 0;
167
+ const page = { data: response.data.slice(0, limit).map((thread) => projectCodexCatalogNativeThread(thread, sanitize, cachedPreview)) };
168
+ for (const field of ["nextCursor", "backwardsCursor"]) {
169
+ const value = response[field];
170
+ if (value === null) page[field] = null;
171
+ else if (value !== void 0) {
172
+ if (typeof value !== "string" || value.length > 4096) throw new Error("Codex catalog response contains an invalid cursor");
173
+ page[field] = detachCodexCatalogString(value);
174
+ }
175
+ }
176
+ return page;
177
+ }
178
+ /** Reuse resident text without transferring a cache or an unbounded native preview. */
179
+ function reuseCodexCatalogPreview(thread, rawPreviewNonempty, cachedPreview) {
180
+ const preview = cachedPreview?.({
181
+ id: thread.id,
182
+ path: typeof thread.path === "string" ? thread.path : null,
183
+ updatedAt: typeof thread.updatedAt === "number" ? thread.updatedAt : null,
184
+ recencyAt: typeof thread.recencyAt === "number" ? thread.recencyAt : null
185
+ });
186
+ return preview !== void 0 && preview.length <= 500 && (rawPreviewNonempty === void 0 || rawPreviewNonempty === Boolean(preview)) ? preview : void 0;
187
+ }
188
+ //#endregion
189
+ //#region extensions/codex/src/app-server/client-line-preview.ts
190
+ const CODEX_APP_SERVER_PARSE_LOG_MAX = 500;
191
+ function redactCodexAppServerLinePreview(value) {
192
+ const redacted = value.replace(/\s+/g, " ").trim().replace(/(Bearer\s+)[A-Za-z0-9._~+/-]+/gi, "$1<redacted>").replace(/("(?:api_?key|authorization|token|access_token|refresh_token)"\s*:\s*")([^"]+)(")/gi, "$1<redacted>$3").replace(/\b([a-z0-9_]*(?:api_?key|authorization|access_token|refresh_token|token))(\s*=\s*)(["']?)[^\s"']+(\3)/gi, "$1$2$3<redacted>$4");
193
+ return redacted.length > CODEX_APP_SERVER_PARSE_LOG_MAX ? `${truncateUtf16Safe(redacted, CODEX_APP_SERVER_PARSE_LOG_MAX)}...` : redacted;
194
+ }
195
+ //#endregion
196
+ //#region extensions/codex/src/app-server/client-message-decoder.ts
197
+ const PARSE_BUFFER_MAX = 8388608;
198
+ const PARSE_BUFFER_MAX_LINES = 1e3;
199
+ const UNICODE_ESCAPE_QUAD = /^[\da-fA-F]{4}$/u;
200
+ /** Recovers the raw newlines observed inside native JSON string values. */
201
+ var CodexAppServerMessageDecoder = class {
202
+ constructor(reportError) {
203
+ this.reportError = reportError;
204
+ }
205
+ clear() {
206
+ this.pending = void 0;
207
+ }
208
+ get hasPending() {
209
+ return this.pending !== void 0;
210
+ }
211
+ parse(line) {
212
+ const rawLine = line.endsWith("\r") ? line.slice(0, -1) : line;
213
+ if (this.pending) return this.parseContinuation(rawLine, this.pending);
214
+ const trimmed = rawLine.trim();
215
+ if (!trimmed) return;
216
+ try {
217
+ return JSON.parse(trimmed);
218
+ } catch (error) {
219
+ if (isRecoverableParseFailure(trimmed, error)) {
220
+ const text = rawLine.trimStart();
221
+ this.pending = {
222
+ fragments: [text],
223
+ length: text.length,
224
+ inString: endsInsideJsonString(text)
225
+ };
226
+ } else this.reportError(trimmed, error, 1);
227
+ }
228
+ }
229
+ parseContinuation(line, pending) {
230
+ pending.fragments.push(line);
231
+ pending.length += 2 + line.length;
232
+ const withinBounds = pending.length <= PARSE_BUFFER_MAX && pending.fragments.length <= PARSE_BUFFER_MAX_LINES;
233
+ if (withinBounds && pending.inString && scanJsonString(line, 0) === line.length) return;
234
+ const candidate = pending.fragments.join("\\n");
235
+ this.pending = void 0;
236
+ try {
237
+ return JSON.parse(candidate);
238
+ } catch (error) {
239
+ if (withinBounds && isRecoverableParseFailure(candidate, error)) {
240
+ pending.inString = endsInsideJsonString(candidate);
241
+ this.pending = pending;
242
+ } else this.reportError(candidate, error, pending.fragments.length);
243
+ }
244
+ }
245
+ };
246
+ function isRecoverableParseFailure(value, error) {
247
+ if (!value.startsWith("{") && !value.startsWith("[")) return false;
248
+ const message = coerceErrorMessage(error);
249
+ return message.includes("Unterminated string") || message.includes("Unexpected end of JSON input");
250
+ }
251
+ function endsInsideJsonString(value) {
252
+ for (let index = 0; index < value.length; index++) {
253
+ if (value[index] !== "\"") continue;
254
+ const end = scanJsonString(value, index + 1);
255
+ if (end < 0) return false;
256
+ if (end === value.length) return true;
257
+ index = end;
258
+ }
259
+ return false;
260
+ }
261
+ /** Finds a closing quote; incomplete or invalid escapes require native parsing. */
262
+ function scanJsonString(value, start) {
263
+ for (let index = start; index < value.length; index++) {
264
+ const character = value[index];
265
+ if (character === "\"") return index;
266
+ if (value.charCodeAt(index) < 32) return -1;
267
+ if (character !== "\\") continue;
268
+ const escape = value[++index];
269
+ if (escape === "u") {
270
+ if (!UNICODE_ESCAPE_QUAD.test(value.slice(index + 1, index + 5))) return -1;
271
+ index += 4;
272
+ } else if (!escape || !"\"\\/bfnrt".includes(escape)) return -1;
273
+ }
274
+ return value.length;
275
+ }
276
+ //#endregion
277
+ //#region extensions/codex/src/app-server/client-message-frames.ts
278
+ function codexCatalogResponseRoute(id) {
279
+ return typeof id === "number" && Number.isSafeInteger(id) && id >= 2 ** 52 ? {
280
+ id,
281
+ kind: id % 2 === 1 ? "list" : "thread"
282
+ } : void 0;
283
+ }
284
+ //#endregion
285
+ //#region extensions/codex/src/app-server/client-catalog-response.ts
286
+ /** The worker retains recovery fragments, but never a completed native page. */
287
+ function createCodexCatalogDecoder() {
288
+ let failures = [];
289
+ const decoder = new CodexAppServerMessageDecoder((value, error, fragmentCount) => {
290
+ failures.push({
291
+ value: redactCodexAppServerLinePreview(value),
292
+ error,
293
+ fragmentCount
294
+ });
295
+ });
296
+ return (input) => {
297
+ failures = [];
298
+ const result = projectCodexCatalogMessage(decoder.parse(Buffer.from(input.bytes.buffer, input.bytes.byteOffset, input.bytes.byteLength).toString("utf8")), input);
299
+ result.pending = decoder.hasPending;
300
+ result.failures = failures;
301
+ return result;
302
+ };
303
+ }
304
+ function projectCodexCatalogMessage(parsed, input, cachedPreview) {
305
+ const result = {
306
+ pending: false,
307
+ failures: []
308
+ };
309
+ if (!isJsonObject(parsed)) return result;
310
+ result.message = parsed;
311
+ if (!isRpcResponse(parsed)) return result;
312
+ const message = parsed;
313
+ const route = codexCatalogResponseRoute(message.id);
314
+ if (message.error || !route) return result;
315
+ const remainingRows = input.route === "unresolved" ? input.catalogRows?.has(route.id) ? input.catalogRows.get(route.id) : 0 : input.remainingRows;
316
+ try {
317
+ if (!isJsonObject(message.result)) throw new Error("Codex catalog response contains an invalid result");
318
+ if (route.kind === "list") {
319
+ const raw = message.result;
320
+ message.result = projectCodexCatalogNativeResponse(raw, sanitizeTerminalText, cachedPreview, remainingRows);
321
+ if (!cachedPreview) result.previewStates = Array.isArray(raw.data) ? raw.data.slice(0, Array.isArray(message.result.data) ? message.result.data.length : 0).map((row) => isJsonObject(row) && typeof row.preview === "string" ? Boolean(row.preview) : void 0) : [];
322
+ } else {
323
+ const thread = message.result.thread;
324
+ message.result = { thread: {
325
+ ...projectCodexCatalogNativeThread(thread, sanitizeTerminalText),
326
+ ...isJsonObject(thread) && typeof thread.cwd === "string" ? { cwd: thread.cwd } : {},
327
+ ...isJsonObject(thread) && (thread.historyMode === "paginated" || thread.historyMode === "legacy") ? { historyMode: thread.historyMode } : {}
328
+ } };
329
+ }
330
+ } catch (error) {
331
+ delete result.message;
332
+ result.projectionError = {
333
+ id: route.id,
334
+ error: error instanceof Error ? error : new Error("Codex catalog projection failed", { cause: error })
335
+ };
336
+ }
337
+ return result;
338
+ }
339
+ //#endregion
3
340
  //#region extensions/codex/catalog-page.worker.ts
4
341
  const decode = createCodexCatalogDecoder();
5
342
  serveWorkerTasks((input) => {
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
2
  //#region extensions/codex/cli-metadata.ts
3
3
  function registerCodexCliMetadata(api) {
4
4
  api.registerCli(async ({ program }) => {
5
- const { registerCodexSessionCli } = await import("./.setup/session-cli-C3GejWcm.mjs");
5
+ const { registerCodexSessionCli } = await import("./.setup/session-cli-B5RvT_Rs.mjs");
6
6
  registerCodexSessionCli(program);
7
7
  }, { descriptors: [{
8
8
  name: "codex",
package/dist/harness.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "./native-tool-policy.js";
2
2
  import { n as readCodexRuntimeModelId } from "./.setup/model-runtime-BdqzOMkU.mjs";
3
3
  import { v as sessionBindingIdentity } from "./.setup/session-binding-record-CUKpUKVm.mjs";
4
- import { t as codexBuildSymbol } from "./.setup/build-state-B3lvV1Op.mjs";
4
+ import { t as codexBuildSymbol } from "./.setup/build-state-CmeL24P5.mjs";
5
5
  import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
6
6
  //#region extensions/codex/harness.ts
7
7
  const DEFAULT_CODEX_HARNESS_PROVIDER_IDS = /* @__PURE__ */ new Set(["codex", "openai"]);
@@ -108,7 +108,7 @@ function createCodexAppServerAgentHarness(options) {
108
108
  executionEnvironment: "host-only",
109
109
  upstreamKinds: ["codex-app-server"],
110
110
  fork: async (params) => {
111
- const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-2ipYynVl.mjs");
111
+ const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-D8rqW9ad.mjs");
112
112
  return await forkCodexUpstreamSession(params, {
113
113
  bindingStore: options.bindingStore,
114
114
  controlFactory: sessionCatalogControlFactory,
@@ -130,18 +130,18 @@ function createCodexAppServerAgentHarness(options) {
130
130
  return validateCodexAppServerRuntimeArtifact(binding, void 0, resolveCodexAppServerRuntimeOptions({ pluginConfig: resolveAttemptPluginConfig(options.resolveConfig?.()) }).start);
131
131
  } },
132
132
  fetchUsageSnapshot: async (ctx) => {
133
- const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-BgB8DOas.mjs");
133
+ const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-D_W8Be4u.mjs");
134
134
  return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
135
135
  },
136
136
  loadModelCatalog: async (params) => {
137
- const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-DxSrOSY0.mjs");
137
+ const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-CbhJ0pMa.mjs");
138
138
  if (disposed) return { entries: [] };
139
139
  modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
140
140
  return { entries: await modelCatalog.load(params, resolveAttemptPluginConfig(params.config)) };
141
141
  },
142
142
  readModelCatalogReadiness: (params) => modelCatalog?.read(params, resolveAttemptPluginConfig(params.config)),
143
143
  loadMcpToolCatalog: async (params) => {
144
- const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-BFJCwjSI.mjs");
144
+ const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-BYzIV1DD.mjs");
145
145
  return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
146
146
  },
147
147
  supports: (ctx) => {
@@ -184,7 +184,7 @@ function createCodexAppServerAgentHarness(options) {
184
184
  };
185
185
  },
186
186
  runAttempt: async (params) => {
187
- const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-ypT0LYSD.mjs");
187
+ const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-EMGdmQqt.mjs");
188
188
  const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-XV0nNRZu.mjs");
189
189
  const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-RNpGpTyP.mjs");
190
190
  const pluginConfig = resolveAttemptPluginConfig(params.config);
@@ -250,7 +250,7 @@ function createCodexAppServerAgentHarness(options) {
250
250
  const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
251
251
  return runHostPreparedIsolatedCompletion(params);
252
252
  }
253
- const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-GB52W-qA.mjs");
253
+ const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-DLV0kBu2.mjs");
254
254
  return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
255
255
  },
256
256
  runIsolatedCompletion: async (params) => {
@@ -266,11 +266,11 @@ function createCodexAppServerAgentHarness(options) {
266
266
  });
267
267
  },
268
268
  finalizeSettledTurn: async (params) => {
269
- const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-w92T5Rbb.mjs");
269
+ const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-BzVjkwgJ.mjs");
270
270
  return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
271
271
  },
272
272
  runSideQuestion: async (params) => {
273
- const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-BBZJibHK.mjs");
273
+ const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-B25zswMS.mjs");
274
274
  return runCodexAppServerSideQuestion(params, {
275
275
  bindingStore: options.bindingStore,
276
276
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
@@ -281,25 +281,25 @@ function createCodexAppServerAgentHarness(options) {
281
281
  },
282
282
  compact: async (params) => {
283
283
  const admittedParams = requireCodexCompactionCapabilities(params);
284
- const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BNKuKa7o.mjs");
284
+ const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-DsrYq-_j.mjs");
285
285
  return maybeCompactCodexAppServerSession(admittedParams, {
286
286
  bindingStore: options.bindingStore,
287
287
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
288
288
  });
289
289
  },
290
290
  withSessionDeletion: async (params, run) => {
291
- const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-CQCMiDul.mjs");
291
+ const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-Bdygfnxa.mjs");
292
292
  params.assertCurrent();
293
293
  return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
294
294
  },
295
295
  withSessionContextReset: async (params, run) => {
296
- const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-CQCMiDul.mjs");
296
+ const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-Bdygfnxa.mjs");
297
297
  params.assertCurrent();
298
298
  return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
299
299
  },
300
300
  reset: async (params) => {
301
301
  if (params.sessionId && params.reason !== "deleted") {
302
- const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Fn7Ekzuv.mjs").then((n) => n.s), import("./.setup/session-retirement-CQCMiDul.mjs")]);
302
+ const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Fn7Ekzuv.mjs").then((n) => n.s), import("./.setup/session-retirement-Bdygfnxa.mjs")]);
303
303
  const identity = sessionBindingIdentity({
304
304
  agentId: params.agentId,
305
305
  sessionId: params.sessionId,
@@ -332,7 +332,7 @@ function createCodexAppServerAgentHarness(options) {
332
332
  function createCodexAppServerNativeCompaction(options) {
333
333
  return async (params) => {
334
334
  const admittedParams = requireCodexCompactionCapabilities(params);
335
- const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BNKuKa7o.mjs");
335
+ const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-DsrYq-_j.mjs");
336
336
  return maybeCompactCodexAppServerSession(admittedParams, {
337
337
  bindingStore: options.bindingStore,
338
338
  pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { registerCodexCliMetadata } from "./cli-metadata.js";
2
2
  import { j as CODEX_INTERACTIVE_THREAD_SOURCE_KINDS } from "./.setup/session-catalog-parsing-CnEH565l.mjs";
3
3
  import { i as isJsonObject } from "./.setup/protocol-CANUwXJ3.mjs";
4
4
  import { f as readCurrentCodexAppServerBinding, h as readCurrentNativePendingAssignments, m as readCurrentCodexNativeSubagentSubmissions, n as assertCodexBindingMayBeReplaced, p as readCurrentCodexAppServerBindings, v as sessionBindingIdentity } from "./.setup/session-binding-record-CUKpUKVm.mjs";
5
- import { n as defineCodexBuildState } from "./.setup/build-state-B3lvV1Op.mjs";
5
+ import { n as defineCodexBuildState } from "./.setup/build-state-CmeL24P5.mjs";
6
6
  import { createCodexAppServerAgentHarness, createCodexAppServerNativeCompaction } from "./harness.js";
7
7
  import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
8
8
  import codexProviderDiscovery from "./provider-discovery.js";
@@ -11,10 +11,10 @@ import { t as assertCodexAppServerConnectionSecurity } from "./.setup/config-sec
11
11
  import { d as readCodexPluginConfig } from "./.setup/config-parsing-b088LyhT.mjs";
12
12
  import { r as createCodexAppServerConfig, t as codexAppServerStartOptionsKey } from "./.setup/config-options-CzyWLTJt.mjs";
13
13
  import { o as setManagedCodexPluginRoot } from "./.setup/managed-binary-Ckgvm_4V.mjs";
14
- import { l as createCodexDesktopGenerationService, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./.setup/auth-cache-key-CskfconU.mjs";
14
+ import { l as createCodexDesktopGenerationService, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./.setup/auth-cache-key-DWIq3Lzf.mjs";
15
15
  import { n as CODEX_MANAGED_THREAD_NAMESPACE, r as createCodexManagedThreadStore, t as CODEX_MANAGED_THREAD_MAX_ENTRIES } from "./.setup/managed-thread-store-BMqgThVL.mjs";
16
16
  import { n as CODEX_APP_SERVER_BINDING_NAMESPACE, t as CODEX_APP_SERVER_BINDING_MAX_ENTRIES } from "./.setup/session-binding-meta-B7aEMU7g.mjs";
17
- import { p as retireSharedCodexAppServerClientsBeforeDesktopGeneration } from "./.setup/shared-client-lifecycle-BH_y_i8l.mjs";
17
+ import { p as retireSharedCodexAppServerClientsBeforeDesktopGeneration } from "./.setup/shared-client-lifecycle-wN_lOZkB.mjs";
18
18
  import { s as createCodexAppServerProcessReaperService } from "./.setup/transport-stdio-DU8dIOCj.mjs";
19
19
  import { n as codexNativeProfileRecoveryService } from "./.setup/auth-profile-health-oHizqgye.mjs";
20
20
  import { n as withCodexConversationThreadActivity } from "./.setup/thread-ownership-queue-Dp24d7-F.mjs";
@@ -22,14 +22,14 @@ import { c as canMutateCodexHost, n as filterCodexMarketplacePlugins, o as CODEX
22
22
  import { o as formatCodexDisplayText } from "./.setup/command-formatters-R3ckE3Co.mjs";
23
23
  import { a as readCodexConversationBindingDataRecord, i as readCodexConversationBindingData, o as resolveCodexDefaultWorkspaceDir } from "./.setup/conversation-binding-data-DlsG-dQu.mjs";
24
24
  import { t as isIncognitoSessionKey } from "./.setup/incognito-session-C5ve_-63.mjs";
25
- import { t as buildCodexMigrationProvider } from "./.setup/provider-DUotqBZ6.mjs";
25
+ import { t as buildCodexMigrationProvider } from "./.setup/provider-BEDFjTWv.mjs";
26
26
  import { t as CODEX_CONTROL_METHODS } from "./.setup/capabilities-B3WEZl4e.mjs";
27
27
  import { t as assertCodexArchiveDescendantsUnowned } from "./.setup/thread-archive-guard-C9frICzX.mjs";
28
28
  import { a as createCodexCliSessionNodeInvokePolicies, c as resolveCodexCliSessionForBindingOnNode, i as createCodexCliSessionNodeHostCommands, l as resumeCodexCliSessionOnNode, s as listCodexCliSessionsOnNode } from "./.setup/node-cli-sessions-BwhIYgCZ.mjs";
29
29
  import { t as CODEX_CATALOG_MAX_ROWS } from "./.setup/session-catalog-limits-bz5ZvjtY.mjs";
30
30
  import { t as CODEX_CATALOG_STATE_NAMESPACE } from "./.setup/session-catalog-index-state-DhLoAnfy.mjs";
31
- import { i as createCodexSessionCatalogNodeHostCommands, n as createCodexSessionCatalogNodeInvokePolicies, r as createCodexSessionCatalogControl, t as codexSessionCatalogRuntime } from "./.setup/session-catalog-DMagZcW-.mjs";
32
- import { i as requestCodexAppServerJson } from "./.setup/request-CWERwKIL.mjs";
31
+ import { i as createCodexSessionCatalogNodeHostCommands, n as createCodexSessionCatalogNodeInvokePolicies, r as createCodexSessionCatalogControl, t as codexSessionCatalogRuntime } from "./.setup/session-catalog-apN5C2Oz.mjs";
32
+ import { i as requestCodexAppServerJson } from "./.setup/request-DZKa6YSy.mjs";
33
33
  import { t as createCodexWebSearchProviderBase } from "./.setup/web-search-provider.shared-BrZmlqyR.mjs";
34
34
  import { normalizePluginsConfig, resolveEffectiveEnableState, resolveLivePluginConfigObject, resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
35
35
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
@@ -46,7 +46,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
46
46
  //#region extensions/codex/src/account-usage.ts
47
47
  function registerCodexAccountUsage(api) {
48
48
  api.registerGatewayMethod("codex.accountUsage", async (options) => {
49
- const { handleCodexAccountUsage } = await import("./.setup/account-usage-runtime-BaJamBiM.mjs");
49
+ const { handleCodexAccountUsage } = await import("./.setup/account-usage-runtime-BOmEegZv.mjs");
50
50
  await handleCodexAccountUsage(options);
51
51
  }, { scope: "operator.admin" });
52
52
  }
@@ -74,8 +74,8 @@ function createCodexAppServerConnectionHealthService(options) {
74
74
  return;
75
75
  }
76
76
  if (runtime.start.transport !== "websocket") return;
77
- const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./.setup/shared-client-ZXKMsK6f.mjs").then((n) => n.v);
78
- const { isUnsupportedCodexAppServerVersionError } = await import("./.setup/client-DcTISXe3.mjs").then((n) => n.n);
77
+ const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./.setup/shared-client-B__jQti1.mjs").then((n) => n.v);
78
+ const { isUnsupportedCodexAppServerVersionError } = await import("./.setup/client-BdNoDUaQ.mjs").then((n) => n.n);
79
79
  if (signal.aborted) return;
80
80
  let leasedClient;
81
81
  try {
@@ -226,7 +226,7 @@ function createCodexCommand(options) {
226
226
  ...ctx,
227
227
  gatewayClientScopes: ctx.gatewayClientScopes?.slice()
228
228
  };
229
- const { handleCodexCommand } = await import("./.setup/command-dispatch-MOoD3rsD.mjs");
229
+ const { handleCodexCommand } = await import("./.setup/command-dispatch-9sYDmuIo.mjs");
230
230
  return handleCodexCommand(commandContext, options);
231
231
  }
232
232
  };
@@ -304,7 +304,7 @@ async function handleCodexConversationInboundClaim(event, ctx, options) {
304
304
  });
305
305
  if (nativeExecutionBlock) return { reply: { text: nativeExecutionBlock } };
306
306
  const { getSessionBindingService } = await import("openclaw/plugin-sdk/conversation-binding-runtime");
307
- const { runBoundTurnWithMissingThreadRecovery } = await import("./.setup/conversation-binding-CKYGEvcX.mjs");
307
+ const { runBoundTurnWithMissingThreadRecovery } = await import("./.setup/conversation-binding-CfIcWNVS.mjs");
308
308
  const current = options.bindingStore.read(identity);
309
309
  if (!isCurrentPublicBinding(publicBinding, getSessionBindingService()) || expected && (!current || current.threadId !== expected.threadId || current.conversationStartId !== expected.conversationStartId) || !expected && current && data.start?.id && current.conversationStartId !== data.start.id) return { reply: { text: "This Codex conversation was detached or changed before its message could run." } };
310
310
  return await runBoundTurnWithMissingThreadRecovery({
@@ -338,7 +338,7 @@ async function handleCodexConversationBindingResolved(event, options) {
338
338
  const binding = options.bindingStore.read(identity);
339
339
  assertCodexBindingMayBeReplaced(binding, "clearing a denied conversation binding");
340
340
  if (binding && (!data.start?.id || binding.conversationStartId === data.start.id)) await withCodexConversationThreadActivity(identity.bindingId, async () => {
341
- const { retireCodexConversationThreadBinding } = await import("./.setup/thread-ownership-BT_SeSUp.mjs").then((n) => n.o);
341
+ const { retireCodexConversationThreadBinding } = await import("./.setup/thread-ownership-Cxb01Uwq.mjs").then((n) => n.o);
342
342
  return retireCodexConversationThreadBinding({
343
343
  bindingStore: options.bindingStore,
344
344
  identity,
@@ -394,7 +394,7 @@ function createCodexPluginsTool(options) {
394
394
  if (runtimeConfig() !== config || !isDeepStrictEqual(options.getPluginConfig(), pluginConfig) || !isDeepStrictEqual(codexBindingConnectionSelection(readBinding()), selection)) throw new Error("Codex plugin discovery ownership changed; retry the request.");
395
395
  };
396
396
  const workspaceDir = binding?.cwd?.trim() || options.context.workspaceDir?.trim() || resolveCodexDefaultWorkspaceDir(pluginConfig);
397
- const request = options.request ?? (await import("./.setup/command-rpc-kf7Uq4L-.mjs").then((n) => n.n)).codexControlRequest;
397
+ const request = options.request ?? (await import("./.setup/command-rpc-BHE3OG7z.mjs").then((n) => n.n)).codexControlRequest;
398
398
  const connection = await resolveCodexBindingAppServerConnection({
399
399
  binding,
400
400
  pluginConfig,
@@ -576,7 +576,7 @@ function createCodexThreadsTool(options) {
576
576
  const mayReadRawTranscripts = supervision?.enabled !== true || supervision.allowRawTranscripts === true;
577
577
  if ((action === "fork" || action === "rename" || action === "archive" || action === "unarchive") && supervision?.enabled === true && supervision.allowWriteControls !== true) throw new Error("Codex native thread mutations are disabled for this codex plugin supervision config.");
578
578
  const run = async (archiveAdmission) => {
579
- const request = options.request ?? (await import("./.setup/command-rpc-kf7Uq4L-.mjs").then((n) => n.n)).codexControlRequest;
579
+ const request = options.request ?? (await import("./.setup/command-rpc-BHE3OG7z.mjs").then((n) => n.n)).codexControlRequest;
580
580
  const { isModelSelectionLocked, ModelSelectionLockedError } = await import("openclaw/plugin-sdk/model-session-runtime");
581
581
  const { codexBindingConnectionSelection, resolveCodexBindingAppServerConnection } = await import("./.setup/binding-connection-DRPlnIgg.mjs").then((n) => n.n);
582
582
  const { resolveCodexSupervisionAppServerRuntimeOptions } = await import("./.setup/config-runtime-DDhvIeUC.mjs").then((n) => n.t);
@@ -708,8 +708,8 @@ function createCodexThreadsTool(options) {
708
708
  const usesSupervisionConnection = binding?.connectionScope === "supervision" || admissionPlugin.appServer?.homeScope !== "user" && supervision?.enabled === true;
709
709
  if (attach && usesSupervisionConnection) throw new Error("Supervised Codex forks must stay detached; set attach=false.");
710
710
  const forkOptions = await requestOptions();
711
- const { retainCodexAppServerBindingSubscription, rollbackCodexAppServerBindingSubscription } = await import("./.setup/thread-ownership-BT_SeSUp.mjs").then((n) => n.o);
712
- const { closeCodexStartupClientBestEffort } = await import("./.setup/attempt-client-cleanup-BVtNsTOE.mjs").then((n) => n.a);
711
+ const { retainCodexAppServerBindingSubscription, rollbackCodexAppServerBindingSubscription } = await import("./.setup/thread-ownership-Cxb01Uwq.mjs").then((n) => n.o);
712
+ const { closeCodexStartupClientBestEffort } = await import("./.setup/attempt-client-cleanup-C9dwStbK.mjs").then((n) => n.a);
713
713
  if (attach) {
714
714
  assertCodexBindingMayBeReplaced(binding, "attaching a different native fork");
715
715
  assertThreadIdle(await request(admissionConfig, CODEX_CONTROL_METHODS.readThread, {
@@ -1669,7 +1669,7 @@ function createCodexSupervisionTools(options) {
1669
1669
  }
1670
1670
  //#endregion
1671
1671
  //#region extensions/codex/src/web-search-provider.ts
1672
- const loadCodexWebSearchRuntime = createLazyRuntimeModule(() => import("./.setup/web-search-provider.runtime-BWbZnYAL.mjs"));
1672
+ const loadCodexWebSearchRuntime = createLazyRuntimeModule(() => import("./.setup/web-search-provider.runtime-CyRLuVOO.mjs"));
1673
1673
  const CodexWebSearchSchema = {
1674
1674
  type: "object",
1675
1675
  properties: { query: {
@@ -1935,7 +1935,7 @@ var codex_default = definePluginEntry({
1935
1935
  if (endedSessionKey && nextSessionKey && nextSessionKey !== endedSessionKey) return;
1936
1936
  if (event.nextSessionId?.trim() === event.sessionId.trim()) return;
1937
1937
  const config = resolveCurrentConfig();
1938
- const [{ sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Fn7Ekzuv.mjs").then((n) => n.s), import("./.setup/session-retirement-CQCMiDul.mjs")]);
1938
+ const [{ sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Fn7Ekzuv.mjs").then((n) => n.s), import("./.setup/session-retirement-Bdygfnxa.mjs")]);
1939
1939
  await retireCodexAppServerSessionGeneration({
1940
1940
  bindingStore,
1941
1941
  identity: sessionBindingIdentity({
@@ -33,7 +33,7 @@ async function describeCodexImages(req, options) {
33
33
  const model = req.model.trim();
34
34
  if (!model) throw new Error("Codex image understanding requires model id.");
35
35
  req.signal?.throwIfAborted();
36
- const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-DBwLoFDR.mjs");
36
+ const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-Csc9Qvpm.mjs");
37
37
  req.signal?.throwIfAborted();
38
38
  const { text } = await runBoundedCodexAppServerTurn({
39
39
  config: req.cfg,
@@ -73,7 +73,7 @@ async function extractCodexStructured(req, options) {
73
73
  if (req.input.length === 0) throw new Error("Codex structured extraction requires at least one input.");
74
74
  if (!req.input.some((entry) => entry.type === "image")) throw new Error("Codex structured extraction requires at least one image input.");
75
75
  req.signal?.throwIfAborted();
76
- const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-DBwLoFDR.mjs");
76
+ const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-Csc9Qvpm.mjs");
77
77
  req.signal?.throwIfAborted();
78
78
  const { text } = await runBoundedCodexAppServerTurn({
79
79
  config: req.cfg,
@@ -1 +1 @@
1
- export { t as buildMigrationProvider } from "./.setup/provider-DUotqBZ6.mjs";
1
+ export { t as buildMigrationProvider } from "./.setup/provider-BEDFjTWv.mjs";