@openclaw/codex 2026.9.2 → 2026.9.3
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/README.md +2 -0
- package/dist/api.js +14 -19
- package/dist/apply-B6el6hdO.js +357 -0
- package/dist/{attempt-client-cleanup-Bp1ZOnk2.js → attempt-client-cleanup-D6cR54TV.js} +39 -19
- package/dist/{attempt-context-CSazkWns.js → attempt-context-AO4DSjE0.js} +8 -6
- package/dist/{event-projector-usage-ZqEVbAEY.js → attempt-notifications--H8zXR5-.js} +3 -106
- package/dist/auth-cache-key-Kq6oerr6.js +498 -0
- package/dist/auth-profile-CwzO4_RG.js +43 -0
- package/dist/auth-profile-selection-DFu9e167.js +45 -0
- package/dist/binding-connection-QqgcPCgk.js +60 -0
- package/dist/{bounded-turn-DxGJRYbY.js → bounded-turn-lRpmZHFv.js} +25 -122
- package/dist/build-state-6RL6qohz.js +19 -0
- package/dist/{capabilities-B1mgvpP8.js → capabilities-BeqLPbtM.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/client-BEKu4yDx.js +3983 -0
- package/dist/command-dispatch-CisT9Jqq.js +21 -0
- package/dist/{command-formatters-DSbGMXA0.js → command-formatters-DeTfrapr.js} +2 -2
- package/dist/{command-handlers-DOJvGv6-.js → command-handlers-BfIsJEuA.js} +31 -21
- package/dist/command-rpc-BMqRQOFX.js +226 -0
- package/dist/{compact-Y_xBqrHN.js → compact-CGJZ2rlb.js} +19 -14
- package/dist/config-JDfTI4VI.js +106 -0
- package/dist/{config-CyapYSji.js → config-options-jnIFvwxD.js} +204 -592
- package/dist/config-runtime-BWf6JLWG.js +11 -0
- package/dist/conversation-binding-CxOlHiix.js +889 -0
- package/dist/{plugin-marketplace-discovery-B7gHXJ3d.js → conversation-control-CUCrSIQI.js} +10 -142
- package/dist/doctor-contract-api.js +5 -5
- package/dist/{dynamic-tools-BwpvTxaX.js → dynamic-tools-D-JBoaLt.js} +66 -70
- package/dist/{effective-mcp-catalog-CY9Jn4bA.js → effective-mcp-catalog-J_5Ep5Um.js} +3 -3
- package/dist/{elicitation-input-DMkeki8d.js → elicitation-input-DPoK8F7w.js} +8 -22
- package/dist/ephemeral-turn-DSwzP8YY.js +101 -0
- package/dist/{event-projector-assistant-message-B9kp6iGC.js → event-projector-assistant-message-BmBM4qBV.js} +12 -25
- package/dist/event-projector-usage-CIyrYYid.js +102 -0
- package/dist/{harness-Czh2Sdoc.js → harness-FR6eQgyO.js} +31 -24
- package/dist/harness.js +1 -1
- package/dist/history-rejection-B4nOXNXF.js +13 -0
- package/dist/incognito-session-uhrBF6wJ.js +15 -0
- package/dist/index.js +411 -2875
- package/dist/{isolated-completion-CRh-51AK.js → isolated-completion-DHBefrzg.js} +7 -4
- package/dist/launch-args-RXQwn8zV.js +90 -0
- package/dist/{managed-binary-DcpnJF9x.js → managed-binary-DrjjRRUD.js} +4 -103
- package/dist/managed-thread-store-D1t5jh3G.js +66 -0
- package/dist/media-understanding-provider.js +4 -1
- package/dist/{model-catalog-DT5vo6qo.js → model-catalog-B_6M04Wo.js} +6 -5
- package/dist/{models-CcrgSMQR.js → models-P9k2qAof.js} +3 -3
- package/dist/native-execution-policy-umd0tgh4.js +128 -0
- package/dist/{native-subagent-monitor-B3bvQGcg.js → native-subagent-monitor-BbCUKRwC.js} +69 -42
- package/dist/node-cli-sessions-rj0ysJwM.js +527 -0
- package/dist/{node-exec-server.runtime-nfbUOtUB.js → node-exec-server.runtime-BY_ctYnT.js} +53 -22
- package/dist/plan-BMJdMOEF.js +711 -0
- package/dist/plugin-activation-BQK-f5sV.js +133 -0
- package/dist/{thread-resume-BLgqkUc1.js → plugin-app-cache-key-CdSQzWyX.js} +4 -52
- package/dist/{plugin-approval-roundtrip-aQVdyL5g.js → plugin-approval-roundtrip-DeW95wB5.js} +1 -1
- package/dist/plugin-inventory-CoRCzWW4.js +325 -0
- package/dist/plugin-marketplace-discovery-3akBizzF.js +134 -0
- package/dist/{plugin-metadata-cache-BwCLTY_U.js → plugin-metadata-cache-DgNfRAGA.js} +13 -9
- package/dist/protocol-CAAcVIKF.js +275 -0
- package/dist/{provider-capabilities-BpG9Ltc5.js → provider-capabilities-W4tfK5Y5.js} +2 -2
- package/dist/{rate-limits-Fx_l4eNa.js → rate-limits-Bqnx1N4z.js} +1 -1
- package/dist/request-CGvGOpeR.js +198 -0
- package/dist/{run-attempt-BzthFQSM.js → run-attempt-DwKds3DN.js} +589 -373
- package/dist/{runtime-artifact-Bh_gf6-t.js → runtime-artifact-T-NwqeSH.js} +27 -27
- package/dist/sandbox-guard-BcT66fWy.js +165 -0
- package/dist/{session-binding-4Ki04sW-.js → session-binding-CKSepwIC.js} +29 -47
- package/dist/{session-binding-record-CyaXZvTe.js → session-binding-record-CaZjYwNS.js} +11 -25
- package/dist/session-catalog-HaDcp7Sv.js +1533 -0
- package/dist/session-catalog-adoption-BKLtSrwi.js +251 -0
- package/dist/session-catalog-archive-D0i2pGj2.js +56 -0
- package/dist/session-catalog-home-id-D7-aLiNt.js +190 -0
- package/dist/session-catalog-node-adoption-BUuDYY8R.js +182 -0
- package/dist/session-catalog-node-continue-CBtc4wkI.js +238 -0
- package/dist/session-catalog-parsing-CdD3JhdM.js +280 -0
- package/dist/session-catalog-provenance-DkJHo735.js +124 -0
- package/dist/{session-cli-BjLhpmS1.js → session-cli-CbgaHh0f.js} +3 -2
- package/dist/{session-history-DWmMqiqW.js → session-history-Cz-tOOYj.js} +6 -3
- package/dist/{session-upstream-marker-DReTpGz6.js → session-history-import-DFN7sWRU.js} +5 -50
- package/dist/{session-history-read-LHldwvyh.js → session-history-read-cxPUxyVV.js} +21 -7
- package/dist/session-history-worker-runtime.js +18 -6
- package/dist/{session-history.worker-zZVcx0ME.js → session-history.worker-CNEvGaU5.js} +58 -51
- package/dist/session-history.worker.js +1 -1
- package/dist/{session-initialization-BCFVnLL4.js → session-initialization-Jo86C60I.js} +2 -2
- package/dist/{session-permission-policy-BaueHmSj.js → session-permission-policy-B22InTp_.js} +4 -7
- package/dist/{session-retirement-DNdmYdFc.js → session-retirement-BSNG_mhf.js} +6 -5
- package/dist/session-upstream-marker-D15C9NHp.js +46 -0
- package/dist/{settled-turn-context-BOM3Y1pl.js → settled-turn-context-Du6gdUDd.js} +9 -9
- package/dist/{settled-turn-finalizer-BI-b1sry.js → settled-turn-finalizer-BuLUrZl2.js} +7 -6
- package/dist/shared-client-CVhez2Uo.js +2911 -0
- package/dist/{side-question-B6DWAw1A.js → side-question-DLbr2vUU.js} +64 -169
- package/dist/source-Da-h6f7e.js +518 -0
- package/dist/thread-archive-guard-D1bP04Tf.js +53 -0
- package/dist/{thread-lifecycle-DPK30jad.js → thread-lifecycle-D1pzRwHB.js} +112 -616
- package/dist/{thread-ownership-CbucAmmp.js → thread-ownership-D6oASVRu.js} +13 -15
- package/dist/thread-policy-D8kI7yAO.js +54 -0
- package/dist/thread-resume-T5cveyxA.js +52 -0
- package/dist/timeout-BVw8aaM1.js +33 -0
- package/dist/{transcript-mirror-attestation-Byl34PC-.js → transcript-mirror-attestation-DibE0krH.js} +17 -4
- package/dist/{transcript-mirror-_njEB84z.js → transcript-mirror-t5TOccct.js} +50 -260
- package/dist/{transport-stdio-CzTngV0j.js → transport-stdio-BGjHoYLr.js} +73 -43
- package/dist/{upstream-session-fork-1fwbNKzQ.js → upstream-session-fork-De-sLJ2r.js} +26 -18
- package/dist/{usage-i9fv5-4m.js → usage-CPPTmBvZ.js} +4 -3
- package/dist/version-omm6IPI3.js +12 -0
- package/dist/{web-search-provider.runtime-DKQn67A7.js → web-search-provider.runtime-CSVgQL0w.js} +3 -3
- package/openclaw.plugin.json +22 -1
- package/package.json +4 -4
- package/dist/request-C8H22rPi.js +0 -475
- package/dist/session-catalog-B47uwekb.js +0 -3272
- package/dist/shared-client-CKhX2kFt.js +0 -7505
- package/dist/thread-policy-CTalhWFy.js +0 -105
- package/dist/{auth-binding-Ds_QVm-X.js → auth-binding-Co2Vfcf_.js} +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as normalizeCodexAppServerArgs } from "./launch-args-RXQwn8zV.js";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { readFile, readdir } from "node:fs/promises";
|
|
5
4
|
import { materializeWindowsSpawnProgram, resolveWindowsSpawnProgram } from "openclaw/plugin-sdk/windows-spawn";
|
|
6
|
-
import {
|
|
5
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
7
6
|
import { once } from "node:events";
|
|
7
|
+
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { setImmediate } from "node:timers/promises";
|
|
9
9
|
import { finished } from "node:stream/promises";
|
|
10
10
|
//#region extensions/codex/src/app-server/transport-process-snapshot.ts
|
|
11
|
+
/** A zombie leader can still own running threads, reported by the ps-style l flag. */
|
|
12
|
+
function isDeadProcessState(state) {
|
|
13
|
+
return state.startsWith("Z") && !state.includes("l");
|
|
14
|
+
}
|
|
11
15
|
const PROCESS_COLUMNS = "pid=,ppid=,pgid=,stat=,lstart=";
|
|
12
16
|
const MAX_PROCESS_CONTAINMENT_MS$1 = 2e3;
|
|
13
17
|
const PROCESS_INSPECTION_MAX_BYTES = 8388608;
|
|
@@ -178,13 +182,17 @@ async function readLinuxProcesses(selected, deadline) {
|
|
|
178
182
|
const pgid = Number(fields[2]);
|
|
179
183
|
const startTicks = fields[19];
|
|
180
184
|
if (commEnd < 0 || ![ppid, pgid].every(Number.isSafeInteger) || selected !== void 0 && (pgid <= 0 || ppid < 0) || !/^\d+$/.test(startTicks ?? "")) throw new ProcessInspectionError("unavailable");
|
|
181
|
-
if (pgid > 0)
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
if (pgid > 0) {
|
|
186
|
+
const threads = Number(fields[17]);
|
|
187
|
+
if (!/^[1-9]\d*$/.test(fields[17] ?? "") || !Number.isSafeInteger(threads)) throw new ProcessInspectionError("unavailable");
|
|
188
|
+
rows.push({
|
|
189
|
+
pid: Number(entry),
|
|
190
|
+
ppid,
|
|
191
|
+
pgid,
|
|
192
|
+
state: `${fields[0]}${threads > 1 ? "l" : ""}`,
|
|
193
|
+
startedAt: `${bootId}:${startTicks}`
|
|
194
|
+
});
|
|
195
|
+
}
|
|
188
196
|
}
|
|
189
197
|
if (Date.now() >= deadline) throw new ProcessInspectionError("deadline");
|
|
190
198
|
return rows;
|
|
@@ -197,14 +205,10 @@ async function readLinuxProcesses(selected, deadline) {
|
|
|
197
205
|
const MAX_CONTAINED_PROCESSES = 512;
|
|
198
206
|
const MAX_PROCESS_CONTAINMENT_MS = 2e3;
|
|
199
207
|
const MAX_PROCESS_QUIESCE_PASSES = 16;
|
|
200
|
-
|
|
201
|
-
const contained = await containDescendants(child);
|
|
202
|
-
return contained === "exited" ? contained : contained?.resume;
|
|
203
|
-
}
|
|
204
|
-
/** A durable spawn fact, never a command-line match, selects the orphan root. */
|
|
208
|
+
/** Discharges the registered root obligation, including an already-obsolete PID. */
|
|
205
209
|
async function terminateCodexAppServerOrphan(expected) {
|
|
206
210
|
const deadline = Date.now() + MAX_PROCESS_CONTAINMENT_MS;
|
|
207
|
-
const result = await
|
|
211
|
+
const result = await terminateCodexAppServerDescendants({
|
|
208
212
|
pid: expected.pid,
|
|
209
213
|
kill: (signal) => signalProcess(expected.pid, signal ?? "SIGTERM")
|
|
210
214
|
}, expected, deadline);
|
|
@@ -219,7 +223,7 @@ async function terminateCodexAppServerOrphan(expected) {
|
|
|
219
223
|
const snapshot = await readCodexAppServerProcessSnapshot(deadline).catch(() => void 0);
|
|
220
224
|
if (!snapshot?.some((row) => row.pid === process.pid)) return false;
|
|
221
225
|
const current = snapshot.find((row) => row.pid === expected.pid);
|
|
222
|
-
if (!current || !hasSameIdentity(current, expected) || current.state
|
|
226
|
+
if (!current || !hasSameIdentity(current, expected) || isDeadProcessState(current.state)) {
|
|
223
227
|
gone = true;
|
|
224
228
|
return true;
|
|
225
229
|
}
|
|
@@ -233,15 +237,15 @@ async function terminateCodexAppServerOrphan(expected) {
|
|
|
233
237
|
if (contained && !gone) await signalSameRoot(contained.root, "SIGCONT", Date.now() + MAX_PROCESS_CONTAINMENT_MS);
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
|
-
async function
|
|
240
|
+
async function terminateCodexAppServerDescendants(child, expected, deadline = Date.now() + MAX_PROCESS_CONTAINMENT_MS) {
|
|
237
241
|
const rootPid = child.pid;
|
|
238
242
|
if (hasExited(child)) return "exited";
|
|
239
243
|
if (process.platform === "win32" || !rootPid || !child.kill) return;
|
|
240
244
|
const snapshot = await readCodexAppServerProcessSnapshot(deadline).catch(() => void 0);
|
|
241
245
|
if (!snapshot || Date.now() >= deadline) return;
|
|
242
246
|
const root = snapshot.find((row) => row.pid === rootPid);
|
|
243
|
-
if (!expected && (!root || root.state
|
|
244
|
-
if (!root || !(expected ? isSameLiveProcess(root, expected) : root.ppid === process.pid) || root.state
|
|
247
|
+
if (!expected && (!root || isDeadProcessState(root.state))) return "exited";
|
|
248
|
+
if (!root || !(expected ? isSameLiveProcess(root, expected) : root.ppid === process.pid) || isDeadProcessState(root.state)) return;
|
|
245
249
|
const initialDescendants = collectDescendants(snapshot, [rootPid]);
|
|
246
250
|
if (initialDescendants.length > MAX_CONTAINED_PROCESSES) return;
|
|
247
251
|
const stoppedDescendants = /* @__PURE__ */ new Map();
|
|
@@ -252,10 +256,25 @@ async function containDescendants(child, expected, deadline = Date.now() + MAX_P
|
|
|
252
256
|
if (!descendants) return;
|
|
253
257
|
for (const descendant of descendants.toReversed()) {
|
|
254
258
|
if (Date.now() >= deadline) return;
|
|
255
|
-
if (!descendant.state
|
|
259
|
+
if (!isDeadProcessState(descendant.state)) {
|
|
256
260
|
if (!await signalSameProcess(descendant, "SIGKILL", deadline) || Date.now() >= deadline) return;
|
|
257
261
|
}
|
|
258
262
|
}
|
|
263
|
+
const remaining = new Map(descendants.map((row) => [row.pid, row]));
|
|
264
|
+
while (remaining.size > 0) {
|
|
265
|
+
const terminationSnapshot = await readCodexAppServerProcessSnapshot(deadline, [root.pid, ...remaining.keys()]).catch(() => void 0);
|
|
266
|
+
if (!terminationSnapshot || Date.now() >= deadline) return;
|
|
267
|
+
const currentRoot = terminationSnapshot.find((row) => row.pid === root.pid);
|
|
268
|
+
if (!currentRoot || !isSameLiveRoot(currentRoot, root, true)) return;
|
|
269
|
+
const currentByPid = new Map(terminationSnapshot.map((row) => [row.pid, row]));
|
|
270
|
+
for (const [pid, retained] of remaining) {
|
|
271
|
+
const current = currentByPid.get(pid);
|
|
272
|
+
if (!current || !hasSameIdentity(current, retained) || isDeadProcessState(current.state)) remaining.delete(pid);
|
|
273
|
+
}
|
|
274
|
+
if (remaining.size > 0) await new Promise((resolve) => {
|
|
275
|
+
setTimeout(resolve, 20);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
259
278
|
resumeRootOnUnwind = false;
|
|
260
279
|
let resumed = false;
|
|
261
280
|
return {
|
|
@@ -355,7 +374,7 @@ function collectDescendants(snapshot, rootPids) {
|
|
|
355
374
|
return descendants;
|
|
356
375
|
}
|
|
357
376
|
function isStoppedState(state) {
|
|
358
|
-
return state.startsWith("T") || state.startsWith("t") || state
|
|
377
|
+
return state.startsWith("T") || state.startsWith("t") || isDeadProcessState(state);
|
|
359
378
|
}
|
|
360
379
|
function isQuiescedState(state) {
|
|
361
380
|
return isStoppedState(state) || isUninterruptibleState(state);
|
|
@@ -364,7 +383,7 @@ function isUninterruptibleState(state) {
|
|
|
364
383
|
return state.startsWith("D") || state.startsWith("U");
|
|
365
384
|
}
|
|
366
385
|
function isSameLiveProcess(current, expected) {
|
|
367
|
-
return current.pgid === expected.pgid && !current.state
|
|
386
|
+
return current.pgid === expected.pgid && !isDeadProcessState(current.state) && hasSameIdentity(current, expected);
|
|
368
387
|
}
|
|
369
388
|
function isSameLiveRoot(current, expected, requireStopped = false) {
|
|
370
389
|
return current.ppid === expected.ppid && (!requireStopped || isQuiescedState(current.state)) && isSameLiveProcess(current, expected);
|
|
@@ -437,9 +456,9 @@ async function reapRegisteredCodexAppServerOrphans() {
|
|
|
437
456
|
const registration = registrationSchema.parse(entry.value);
|
|
438
457
|
const snapshot = await readCodexAppServerProcessSnapshot(deadline, [registration.parent.pid, registration.child.pid]);
|
|
439
458
|
const parent = snapshot.find((row) => row.pid === registration.parent.pid);
|
|
440
|
-
if (parent?.startedAt === registration.parent.startedAt && !parent.state
|
|
459
|
+
if (parent?.startedAt === registration.parent.startedAt && !isDeadProcessState(parent.state)) continue;
|
|
441
460
|
const child = snapshot.find((row) => row.pid === registration.child.pid);
|
|
442
|
-
if (registration.child.commandFingerprint !== void 0 && child?.startedAt === registration.child.startedAt && !child.state
|
|
461
|
+
if (registration.child.commandFingerprint !== void 0 && child?.startedAt === registration.child.startedAt && !isDeadProcessState(child.state)) {
|
|
443
462
|
let command;
|
|
444
463
|
try {
|
|
445
464
|
command = await readCodexAppServerProcessCommand(child, deadline);
|
|
@@ -520,38 +539,43 @@ function closeCodexAppServerTransport(child, options = {}) {
|
|
|
520
539
|
function beginCodexAppServerTransportClose(child, options) {
|
|
521
540
|
const current = CODEX_APP_SERVER_TRANSPORT_CLOSES.get(child);
|
|
522
541
|
if (current) return current;
|
|
542
|
+
let forced = false;
|
|
543
|
+
const forceKill = () => {
|
|
544
|
+
forced = true;
|
|
545
|
+
signalCodexAppServerTransport(child, "SIGKILL");
|
|
546
|
+
};
|
|
523
547
|
const closure = {
|
|
524
548
|
closing: (async () => {
|
|
525
|
-
if (hasCodexAppServerTransportExited(child)) return
|
|
549
|
+
if (hasCodexAppServerTransportExited(child)) return "natural";
|
|
526
550
|
if (process.platform === "win32" || !child.pid || !child.kill) {
|
|
527
|
-
finishCodexAppServerTransportClose(child, options);
|
|
528
|
-
return
|
|
551
|
+
finishCodexAppServerTransportClose(child, options, forceKill);
|
|
552
|
+
return "uncertain";
|
|
529
553
|
}
|
|
530
|
-
let
|
|
554
|
+
let contained;
|
|
531
555
|
try {
|
|
532
|
-
|
|
533
|
-
if (contained === "exited") return true;
|
|
534
|
-
resumeRoot = contained;
|
|
556
|
+
contained = await terminateCodexAppServerDescendants(child);
|
|
535
557
|
} catch {
|
|
536
|
-
|
|
558
|
+
contained = void 0;
|
|
537
559
|
}
|
|
560
|
+
if (contained === "exited") return "natural";
|
|
538
561
|
try {
|
|
539
|
-
finishCodexAppServerTransportClose(child, options,
|
|
562
|
+
finishCodexAppServerTransportClose(child, options, forceKill, contained?.resume);
|
|
540
563
|
} catch {
|
|
541
|
-
|
|
564
|
+
forceKill();
|
|
542
565
|
}
|
|
543
|
-
return
|
|
566
|
+
return contained ? "contained" : "uncertain";
|
|
544
567
|
})(),
|
|
545
|
-
naturalExit: false
|
|
568
|
+
naturalExit: false,
|
|
569
|
+
wasForced: () => forced
|
|
546
570
|
};
|
|
547
571
|
CODEX_APP_SERVER_TRANSPORT_CLOSES.set(child, closure);
|
|
548
572
|
return closure;
|
|
549
573
|
}
|
|
550
|
-
function finishCodexAppServerTransportClose(child, options, resumeRoot) {
|
|
574
|
+
function finishCodexAppServerTransportClose(child, options, killTransport, resumeRoot) {
|
|
551
575
|
const forceKillDelayMs = options.forceKillDelayMs ?? 1e3;
|
|
552
576
|
const forceKill = setTimeout(() => {
|
|
553
577
|
if (hasCodexAppServerTransportExited(child)) return;
|
|
554
|
-
|
|
578
|
+
killTransport();
|
|
555
579
|
}, Math.max(1, forceKillDelayMs));
|
|
556
580
|
forceKill.unref?.();
|
|
557
581
|
child.once("exit", () => {
|
|
@@ -572,18 +596,24 @@ function finishCodexAppServerTransportClose(child, options, resumeRoot) {
|
|
|
572
596
|
child.stderr.unref?.();
|
|
573
597
|
child.stdin.unref?.();
|
|
574
598
|
}
|
|
575
|
-
/**
|
|
599
|
+
/** Reports physical settlement separately from confirmed process cleanup. */
|
|
576
600
|
async function closeCodexAppServerTransportAndWait(child, options = {}) {
|
|
577
601
|
const drained = options.drainStdio ? Promise.all([child.stdout, child.stderr].map((stream) => finished(stream, { cleanup: true }))).then(() => true, () => false) : void 0;
|
|
578
602
|
const closure = beginCodexAppServerTransportClose(child, options);
|
|
579
|
-
const
|
|
603
|
+
const containment = await closure.closing;
|
|
580
604
|
const settled = await waitForCodexAppServerTransportExit(child, options.exitTimeoutMs ?? 2e3, drained);
|
|
581
|
-
closure.naturalExit =
|
|
605
|
+
closure.naturalExit = containment === "natural" && settled;
|
|
582
606
|
if (options.drainStdio) {
|
|
583
607
|
child.stdout.destroy?.();
|
|
584
608
|
child.stderr.destroy?.();
|
|
585
609
|
}
|
|
586
|
-
return settled
|
|
610
|
+
return settled ? {
|
|
611
|
+
exited: true,
|
|
612
|
+
cleanup: containment === "contained" && !closure.wasForced() && child.signalCode == null ? "closed" : "uncertain"
|
|
613
|
+
} : {
|
|
614
|
+
exited: false,
|
|
615
|
+
cleanup: "uncertain"
|
|
616
|
+
};
|
|
587
617
|
}
|
|
588
618
|
function hasCodexAppServerTransportExited(child) {
|
|
589
619
|
return child.exitCode !== null && child.exitCode !== void 0 ? true : child.signalCode !== null && child.signalCode !== void 0;
|
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import { l as sessionBindingIdentity } from "./session-binding-record-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { o as withCodexAppServerThreadMutation } from "./thread-ownership-CbucAmmp.js";
|
|
8
|
-
import { i as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-CTalhWFy.js";
|
|
9
|
-
import { l as projectCodexUserItemText } from "./transcript-mirror-_njEB84z.js";
|
|
10
|
-
import { l as resolveCodexNativeExecutionPolicy, t as CodexAppServerScopedRequestRejectedError } from "./request-C8H22rPi.js";
|
|
1
|
+
import { l as sessionBindingIdentity } from "./session-binding-record-CaZjYwNS.js";
|
|
2
|
+
import { f as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-jnIFvwxD.js";
|
|
3
|
+
import { a as flattenCodexDynamicToolFunctions, o as isJsonObject, x as readCodexPluginConfig } from "./protocol-CAAcVIKF.js";
|
|
4
|
+
import { _ as assertCodexThreadAcceptsDirectInput, v as assertCodexThreadForkResponse } from "./client-BEKu4yDx.js";
|
|
5
|
+
import { n as withCodexAppServerThreadMutation } from "./incognito-session-uhrBF6wJ.js";
|
|
6
|
+
import { n as readCodexSessionMeta } from "./session-catalog-provenance-DkJHo735.js";
|
|
11
7
|
import { i as readUpstreamUserText, r as readMirrorIdentity } from "./upstream-prompt-provenance-LphB8slG.js";
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { a as projectCodexUserItemText } from "./session-catalog-home-id-D7-aLiNt.js";
|
|
9
|
+
import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.js";
|
|
10
|
+
import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-CdSQzWyX.js";
|
|
11
|
+
import { t as CodexAppServerScopedRequestRejectedError } from "./request-CGvGOpeR.js";
|
|
12
|
+
import { n as resolveOpenClawExecPolicyForCodexAppServer } from "./config-JDfTI4VI.js";
|
|
13
|
+
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
|
|
14
|
+
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-DibE0krH.js";
|
|
15
|
+
import { L as hasCodexAppServerLiveThread, N as claimCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-CVhez2Uo.js";
|
|
16
|
+
import { C as buildDeveloperInstructions, Dt as shouldBuildCodexPluginThreadConfig, F as assertCodexNativeHookRelayAllowed, I as buildCodexNativeHookRelayConfig, J as parseCodexNativeToolCatalog, Q as codexDynamicToolsFingerprint, R as buildCodexNativeHookRelayId, S as resolveCodexWebSearchPlan, Tt as mergeCodexThreadConfigs, V as resolveCodexNativeHookRelayEvents, W as checkCodexThreadAppAvailability, X as resolveCodexNativeSkillIsolation, Y as applyCodexNativeSkillIsolation, et as fingerprintJsonObject, tt as fingerprintUserMcpServersConfigPatch, xt as buildCodexPluginThreadConfig, y as buildCodexThreadConfiguration } from "./thread-lifecycle-D1pzRwHB.js";
|
|
17
|
+
import "./session-binding-CKSepwIC.js";
|
|
18
|
+
import { i as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-D8kI7yAO.js";
|
|
19
|
+
import "./thread-ownership-D6oASVRu.js";
|
|
20
|
+
import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-umd0tgh4.js";
|
|
21
|
+
import { l as isCodexDynamicToolExcluded, n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-W4tfK5Y5.js";
|
|
22
|
+
import { o as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-context-AO4DSjE0.js";
|
|
23
|
+
import { n as prepareCodexSessionInitialization } from "./session-initialization-Jo86C60I.js";
|
|
24
|
+
import { createImportedCodexSession } from "./session-history-import-DFN7sWRU.js";
|
|
17
25
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
26
|
import { randomUUID } from "node:crypto";
|
|
19
|
-
import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
20
|
-
import { lstat } from "node:fs/promises";
|
|
21
27
|
import path from "node:path";
|
|
22
|
-
import {
|
|
28
|
+
import { lstat } from "node:fs/promises";
|
|
23
29
|
import { constants, createZstdDecompress } from "node:zlib";
|
|
24
30
|
import { root } from "openclaw/plugin-sdk/file-access-runtime";
|
|
25
31
|
import { isDeepStrictEqual } from "node:util";
|
|
26
32
|
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
33
|
+
import { loadCodexBundleMcpThreadConfig } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
27
34
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
35
|
+
import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
28
36
|
import { buildCodexUserMcpServersThreadConfigPatchForRuntime, resolveCodexMcpToolOverridesForAgent } from "openclaw/plugin-sdk/codex-mcp-projection";
|
|
29
37
|
import { buildNativeHookRelayCommandPlan } from "openclaw/plugin-sdk/native-hook-relay-runtime";
|
|
30
38
|
import { appendSessionTranscriptMessagesByIdentity, readVisibleSessionTranscriptMessageEntries } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as readCodexAppServerUsage } from "./request-
|
|
3
|
-
import
|
|
1
|
+
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-Bqnx1N4z.js";
|
|
2
|
+
import { n as readCodexAppServerUsage } from "./request-CGvGOpeR.js";
|
|
3
|
+
import "./config-JDfTI4VI.js";
|
|
4
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
|
|
4
5
|
import { CODEX_APP_SERVER_AUTH_MARKER } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
6
|
//#region extensions/codex/src/app-server/usage.ts
|
|
6
7
|
/** Handles the synthetic usage credential for a Codex-backed OpenAI route. */
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region extensions/codex/src/app-server/version.ts
|
|
2
|
+
/**
|
|
3
|
+
* Version and package pins for the managed Codex app-server runtime.
|
|
4
|
+
*/
|
|
5
|
+
/** Exact Codex app-server version shipped by the OpenClaw Codex bridge. */
|
|
6
|
+
const CODEX_APP_SERVER_VERSION = "0.153.4";
|
|
7
|
+
/** Inclusive runtime compatibility floor for external app-server binaries. */
|
|
8
|
+
const MIN_SUPPORTED_CODEX_APP_SERVER_VERSION = "0.149.0";
|
|
9
|
+
/** npm package name for the managed Codex app-server binary. */
|
|
10
|
+
const MANAGED_CODEX_APP_SERVER_PACKAGE = "@openai/codex";
|
|
11
|
+
//#endregion
|
|
12
|
+
export { MANAGED_CODEX_APP_SERVER_PACKAGE as n, MIN_SUPPORTED_CODEX_APP_SERVER_VERSION as r, CODEX_APP_SERVER_VERSION as t };
|
package/dist/{web-search-provider.runtime-DKQn67A7.js → web-search-provider.runtime-CSVgQL0w.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { x as buildCodexNativeWebSearchThreadConfig } from "./thread-lifecycle-
|
|
3
|
-
import {
|
|
1
|
+
import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
|
|
2
|
+
import { x as buildCodexNativeWebSearchThreadConfig } from "./thread-lifecycle-D1pzRwHB.js";
|
|
3
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-lRpmZHFv.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { readStringParam, resolveSearchTimeoutSeconds, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
|
|
6
6
|
//#region extensions/codex/src/web-search-provider.runtime.ts
|
package/openclaw.plugin.json
CHANGED
|
@@ -19,7 +19,14 @@
|
|
|
19
19
|
],
|
|
20
20
|
"doctorContract": {
|
|
21
21
|
"configRepair": true,
|
|
22
|
-
"stateMigrations":
|
|
22
|
+
"stateMigrations": [
|
|
23
|
+
{ "id": "codex-app-server-sidecars-to-plugin-state" },
|
|
24
|
+
{
|
|
25
|
+
"id": "codex-app-server-orphaned-session-bindings",
|
|
26
|
+
"doctorOnly": true,
|
|
27
|
+
"phase": "after-session-repair"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
23
30
|
},
|
|
24
31
|
"doctorHealthChecks": true,
|
|
25
32
|
"sessionRouteStateOwners": [
|
|
@@ -81,6 +88,20 @@
|
|
|
81
88
|
"cliCommand": "plugins"
|
|
82
89
|
}
|
|
83
90
|
],
|
|
91
|
+
"setup": {
|
|
92
|
+
"nativeSessionCatalog": {
|
|
93
|
+
"label": "Codex",
|
|
94
|
+
"legacyDefaultEnabled": true,
|
|
95
|
+
"description": "Existing native Codex conversations on this Gateway and eligible paired nodes.",
|
|
96
|
+
"nodeCommands": [
|
|
97
|
+
"codex.appServer.threads.list.v1",
|
|
98
|
+
"codex.appServer.thread.turns.list.v1",
|
|
99
|
+
"codex.sessionCatalog.transcript.read.v1",
|
|
100
|
+
"codex.terminal.resume.v1",
|
|
101
|
+
"codex.cli.sessions.list"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
84
105
|
"configSchema": {
|
|
85
106
|
"type": "object",
|
|
86
107
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/codex",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"description": "OpenClaw Codex app-server harness and native session supervision plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
"compat": {
|
|
39
|
-
"pluginApi": ">=2026.9.
|
|
39
|
+
"pluginApi": ">=2026.9.3"
|
|
40
40
|
},
|
|
41
41
|
"build": {
|
|
42
|
-
"openclawVersion": "2026.9.
|
|
42
|
+
"openclawVersion": "2026.9.3"
|
|
43
43
|
},
|
|
44
44
|
"release": {
|
|
45
45
|
"publishToClawHub": true,
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"README.md"
|
|
60
60
|
],
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"openclaw": ">=2026.9.
|
|
62
|
+
"openclaw": ">=2026.9.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"openclaw": {
|