@openclaw/codex 2026.9.1-beta.1 → 2026.9.1
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/api.js +5 -6
- package/dist/{attempt-client-cleanup-bfsmcQ6m.js → attempt-client-cleanup-DYHcRQAa.js} +31 -45
- package/dist/attempt-context-DmQUNWwT.js +634 -0
- package/dist/{auth-binding-B4FfbcCg.js → auth-binding-Ds_QVm-X.js} +18 -3
- package/dist/{binding-connection-BMvPX73o.js → binding-connection-E6uDsPlx.js} +2 -2
- package/dist/{bounded-turn-B7iBUcuP.js → bounded-turn-wzJrwKKe.js} +15 -20
- package/dist/{capabilities-BRMh0aIq.js → capabilities-dIjNVCYH.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-DEsIufkt.js → command-formatters-CLHhEB1Q.js} +5 -4
- package/dist/{command-handlers-D_-1_qRp.js → command-handlers-CTGb2csu.js} +124 -101
- package/dist/{compact-BglNFZrQ.js → compact-_t0HQrUS.js} +38 -29
- package/dist/{config-giW8X0QA.js → config-BhmfC1s6.js} +294 -282
- package/dist/{context-compaction-activity-BOeJf7yo.js → context-compaction-activity-CMla5FPJ.js} +4 -1
- package/dist/{conversation-binding-data-CW2GuupV.js → conversation-binding-data-BiodpIzq.js} +2 -1
- package/dist/doctor-contract-api.js +143 -12
- package/dist/{dynamic-tools-Dnlfa--w.js → dynamic-tools-BU9tmlYm.js} +599 -655
- package/dist/{effective-mcp-catalog-CTeGrnfO.js → effective-mcp-catalog-DzYBW4h1.js} +2 -2
- package/dist/{event-projector-assistant-message-C5-Ds8mA.js → event-projector-assistant-message-DHRFXKbS.js} +4 -4
- package/dist/{event-projector-usage-Bk1I90Bg.js → event-projector-usage-C5mcrGjp.js} +15 -148
- package/dist/{harness-Csz0F-DK.js → harness-DXVZ5II5.js} +42 -52
- package/dist/harness.js +1 -1
- package/dist/index.js +458 -404
- package/dist/{isolated-completion-Cv6FqygM.js → isolated-completion-kg9kv4iH.js} +4 -4
- package/dist/launch-args-RXQwn8zV.js +90 -0
- package/dist/{managed-binary-DFYK4DWq.js → managed-binary-4-Vjz5GH.js} +14 -9
- package/dist/media-understanding-provider.js +1 -1
- package/dist/model-catalog-CUM68Hkl.js +101 -0
- package/dist/{models-TS3HBU-q.js → models-sYnEc0gd.js} +25 -28
- package/dist/{native-subagent-monitor-4Mfq2HDs.js → native-subagent-monitor-CnH147jH.js} +55 -115
- package/dist/{node-exec-server.runtime-BpWqJO1V.js → node-exec-server.runtime-CstNHCmC.js} +9 -6
- package/dist/{plugin-approval-roundtrip-bUm777tR.js → plugin-approval-roundtrip-CNe-Xrjx.js} +30 -3
- package/dist/{plugin-marketplace-discovery-B9DvaAG-.js → plugin-marketplace-discovery-CfFlKqDl.js} +15 -14
- package/dist/{plugin-metadata-cache-CTCT3w5L.js → plugin-metadata-cache-BFrPhb2c.js} +6 -6
- package/dist/provider-capabilities-DW5p4k9w.js +101 -0
- package/dist/{rate-limits-C5_D8Gmb.js → rate-limits-CawQJfUS.js} +3 -2
- package/dist/{sandbox-guard-kuWTn9C5.js → request-DYAI5FQE.js} +195 -2
- package/dist/{run-attempt-DYc0QCBF.js → run-attempt-D1hJO4fX.js} +828 -2100
- package/dist/{runtime-artifact-BvyT1uyd.js → runtime-artifact-C3jVimFn.js} +21 -14
- package/dist/{session-binding-Bcynfd-_.js → session-binding-BHuTCRZQ.js} +198 -127
- package/dist/{session-catalog-DaLKVtpH.js → session-catalog-yyvTWFOw.js} +564 -408
- package/dist/{session-cli-DMc4oS2w.js → session-cli-CmFEXMAM.js} +1 -1
- package/dist/session-history-C5J1AKzG.js +87 -0
- package/dist/session-initialization-BeWzjGiR.js +74 -0
- package/dist/{session-permission-policy-BrNH1bjy.js → session-permission-policy-DeWVTCMj.js} +2 -2
- package/dist/session-retirement-BujDjXVF.js +97 -0
- package/dist/{session-upstream-marker-BIkusb95.js → session-upstream-marker-C351-5Qw.js} +19 -4
- package/dist/settled-turn-context-D3SNWtUn.js +268 -0
- package/dist/settled-turn-finalizer-BVJx4yoc.js +104 -0
- package/dist/{shared-client-DKz23hHY.js → shared-client-DxcfF9KX.js} +3480 -679
- package/dist/{side-question-DjA_jsNe.js → side-question-BTZAII4l.js} +108 -70
- package/dist/{thread-lifecycle-L7oEkTlq.js → thread-lifecycle-DAcEJ_Om.js} +2188 -1915
- package/dist/{thread-ownership-DZeuKH1j.js → thread-ownership-zGokd8i1.js} +25 -14
- package/dist/thread-policy-g4KbJPzp.js +54 -0
- package/dist/{plugin-app-cache-key-C1CAdfcP.js → thread-resume-C7pyVKeW.js} +59 -7
- package/dist/{transcript-mirror-DsCMWBca.js → transcript-mirror-DTUxFWa_.js} +79 -17
- package/dist/transport-stdio-CyPldczm.js +726 -0
- package/dist/{upstream-prompt-provenance-CFmsKwr9.js → upstream-prompt-provenance-LphB8slG.js} +8 -4
- package/dist/upstream-session-fork-CYlBIGVt.js +966 -0
- package/dist/{usage-ROIaW3wo.js → usage-Bj-rrzkR.js} +3 -3
- package/dist/{web-search-provider.runtime-ClaNPV7N.js → web-search-provider.runtime-D2FWSK4w.js} +3 -3
- package/openclaw.plugin.json +1 -30
- package/package.json +6 -6
- package/dist/command-rpc-CCeCkf_v.js +0 -90
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/model-catalog-i9rNBthX.js +0 -48
- package/dist/protocol-validators-VeJxxJ0U.js +0 -2421
- package/dist/request-DXXGHko0.js +0 -157
- package/dist/session-catalog-home-id-BNwAJ9D7.js +0 -18
- package/dist/session-retirement-CcNC3YSY.js +0 -36
- package/dist/settled-turn-finalizer-Dc3ApjU4.js +0 -328
- package/dist/thread-resume-BE9qNEW0.js +0 -30
- package/dist/transport-stdio-DhoGy33Z.js +0 -99
- package/dist/upstream-session-fork-DlaHxSLC.js +0 -326
package/dist/api.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { a as resolveCodexAppServerStartOptionsForAgent, i as resolveCodexAppServerRuntimeOptions } from "./config-
|
|
2
|
-
import {
|
|
1
|
+
import { a as resolveCodexAppServerStartOptionsForAgent, i as resolveCodexAppServerRuntimeOptions } from "./config-BhmfC1s6.js";
|
|
2
|
+
import { n as resolveManagedCodexAppServerStartOptions, o as CODEX_APP_SERVER_VERSION, r as resolveManagedCodexNativeCommand, t as isManagedCodexDesktopCommand } from "./managed-binary-4-Vjz5GH.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
5
|
import { listAgentIds as listAgentIds$1, resolveAgentDir as resolveAgentDir$1 } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { resolveEffectiveAgentRuntime } from "openclaw/plugin-sdk/command-auth-native";
|
|
9
|
-
import { getHealthCheck } from "openclaw/plugin-sdk/health";
|
|
10
9
|
//#region extensions/codex/src/doctor.ts
|
|
11
10
|
const CODEX_MANAGED_APP_SERVER_CHECK_ID = "codex/managed-app-server";
|
|
12
11
|
const CODEX_VERSION_TIMEOUT_MS = 5e3;
|
|
13
|
-
const CODEX_VERSION_MAX_BUFFER_BYTES =
|
|
12
|
+
const CODEX_VERSION_MAX_BUFFER_BYTES = 65536;
|
|
14
13
|
function managedCodexFinding(params) {
|
|
15
14
|
return {
|
|
16
15
|
checkId: CODEX_MANAGED_APP_SERVER_CHECK_ID,
|
|
@@ -117,7 +116,7 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
117
116
|
})];
|
|
118
117
|
}
|
|
119
118
|
const detectedVersion = parseCodexVersion(`${output.stdout}\n${output.stderr}`);
|
|
120
|
-
if (detectedVersion !== "0.
|
|
119
|
+
if (detectedVersion !== "0.152.1") return [managedCodexFinding({
|
|
121
120
|
message: detectedVersion ? `Managed Codex app-server version mismatch: expected ${CODEX_APP_SERVER_VERSION}, detected ${detectedVersion}.` : `Managed Codex app-server did not report a parseable version; expected ${CODEX_APP_SERVER_VERSION}.`,
|
|
122
121
|
path: nativeCommand,
|
|
123
122
|
requirement: `the exact OpenClaw-pinned Codex version ${CODEX_APP_SERVER_VERSION}`,
|
|
@@ -128,7 +127,7 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
128
127
|
};
|
|
129
128
|
}
|
|
130
129
|
function registerCodexManagedAppServerDoctorChecks$1(host, deps) {
|
|
131
|
-
if (getHealthCheck("codex/managed-app-server")) return;
|
|
130
|
+
if (host.getHealthCheck("codex/managed-app-server")) return;
|
|
132
131
|
host.registerHealthCheck(createCodexManagedAppServerHealthCheck({
|
|
133
132
|
pluginRoot: host.pluginRoot,
|
|
134
133
|
deps
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as isJsonObject, jt as unsubscribeCodexAppServerLiveThread, q as CodexAppServerRpcError, y as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-DxcfF9KX.js";
|
|
2
2
|
import { asFiniteNumber, normalizeOptionalString, normalizeOptionalString as normalizeOptionalString$1, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
4
4
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -70,6 +70,10 @@ function readItem(value) {
|
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region extensions/codex/src/app-server/event-projector-items.ts
|
|
73
|
+
function matchesCodexSnapshotTurn(item, turnId) {
|
|
74
|
+
const itemTurnId = readItemString(item, "turnId");
|
|
75
|
+
return itemTurnId === void 0 || itemTurnId === turnId;
|
|
76
|
+
}
|
|
73
77
|
function itemKind(item) {
|
|
74
78
|
switch (item.type) {
|
|
75
79
|
case "dynamicToolCall":
|
|
@@ -560,7 +564,7 @@ var ClientTurnRouter = class {
|
|
|
560
564
|
await Promise.race([route.notificationTail, route.ended.promise]);
|
|
561
565
|
}
|
|
562
566
|
async drainNotifications(route) {
|
|
563
|
-
await route.notificationTail;
|
|
567
|
+
await Promise.race([route.notificationTail, route.ended.promise]);
|
|
564
568
|
}
|
|
565
569
|
release(route, error = /* @__PURE__ */ new Error("codex app-server thread route is released")) {
|
|
566
570
|
if (route.released) return;
|
|
@@ -696,12 +700,35 @@ async function interruptCodexTurnAndWaitBestEffort(client, params) {
|
|
|
696
700
|
completion?.cancel();
|
|
697
701
|
}
|
|
698
702
|
}
|
|
703
|
+
/** Stops native terminals on the cancelled thread without retiring peer threads. */
|
|
704
|
+
async function terminateCodexBackgroundTerminals(client, threadId) {
|
|
705
|
+
const options = {
|
|
706
|
+
timeoutMs: CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS,
|
|
707
|
+
signal: AbortSignal.timeout(CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS)
|
|
708
|
+
};
|
|
709
|
+
try {
|
|
710
|
+
const { data } = await client.request("thread/backgroundTerminals/list", { threadId }, options);
|
|
711
|
+
for (const { processId } of data) await client.request("thread/backgroundTerminals/terminate", {
|
|
712
|
+
threadId,
|
|
713
|
+
processId
|
|
714
|
+
}, options);
|
|
715
|
+
if (data.length > 0) {
|
|
716
|
+
if ((await client.request("thread/backgroundTerminals/list", {
|
|
717
|
+
threadId,
|
|
718
|
+
limit: 1
|
|
719
|
+
}, options)).data.length > 0) throw new Error("native background terminals remain running");
|
|
720
|
+
}
|
|
721
|
+
} catch (cause) {
|
|
722
|
+
throw new Error("Codex background-terminal cleanup failed; inspect the thread's running terminals before starting more work.", { cause });
|
|
723
|
+
}
|
|
724
|
+
}
|
|
699
725
|
/** Unsubscribes from a thread while swallowing cleanup-only failures. */
|
|
700
726
|
async function unsubscribeCodexThreadBestEffort(client, params) {
|
|
701
727
|
try {
|
|
702
|
-
await unsubscribeCodexAppServerLiveThread(client, params.threadId, params.timeoutMs);
|
|
728
|
+
await unsubscribeCodexAppServerLiveThread(client, params.threadId, params.timeoutMs, params.assertCurrent);
|
|
703
729
|
return true;
|
|
704
730
|
} catch (error) {
|
|
731
|
+
params.assertCurrent?.();
|
|
705
732
|
embeddedAgentLog.debug("codex app-server thread unsubscribe cleanup failed", {
|
|
706
733
|
threadId: params.threadId,
|
|
707
734
|
error
|
|
@@ -709,46 +736,5 @@ async function unsubscribeCodexThreadBestEffort(client, params) {
|
|
|
709
736
|
return false;
|
|
710
737
|
}
|
|
711
738
|
}
|
|
712
|
-
/**
|
|
713
|
-
* Retires the shared client after a timed-out turn so later runs do not reuse a
|
|
714
|
-
* potentially wedged app-server connection.
|
|
715
|
-
*/
|
|
716
|
-
async function retireCodexAppServerClientAfterTimedOutTurn(client, params) {
|
|
717
|
-
const retiredSharedClient = retireSharedCodexAppServerClientIfCurrent(client, { failActiveLeases: params.suspectPhysicalClient });
|
|
718
|
-
const detachedSharedClient = Boolean(retiredSharedClient);
|
|
719
|
-
if (!(params.suspectPhysicalClient && (retiredSharedClient?.closed ?? false))) {
|
|
720
|
-
await interruptCodexTurnAndWaitBestEffort(client, {
|
|
721
|
-
threadId: params.threadId,
|
|
722
|
-
turnId: params.turnId,
|
|
723
|
-
timeoutMs: CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS
|
|
724
|
-
});
|
|
725
|
-
await unsubscribeCodexThreadBestEffort(client, {
|
|
726
|
-
threadId: params.threadId,
|
|
727
|
-
timeoutMs: CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
let closedClient = retiredSharedClient?.closed ?? false;
|
|
731
|
-
if (!detachedSharedClient) {
|
|
732
|
-
const close = client.close;
|
|
733
|
-
if (typeof close === "function") try {
|
|
734
|
-
close.call(client);
|
|
735
|
-
closedClient = true;
|
|
736
|
-
} catch (error) {
|
|
737
|
-
embeddedAgentLog.debug("codex app-server client close failed during timeout cleanup", {
|
|
738
|
-
threadId: params.threadId,
|
|
739
|
-
turnId: params.turnId,
|
|
740
|
-
error
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
embeddedAgentLog.warn("codex app-server client retired after timed-out turn", {
|
|
745
|
-
threadId: params.threadId,
|
|
746
|
-
turnId: params.turnId,
|
|
747
|
-
reason: params.reason,
|
|
748
|
-
detachedSharedClient,
|
|
749
|
-
closedClient,
|
|
750
|
-
activeSharedClientLeases: retiredSharedClient?.activeLeases ?? 0
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
739
|
//#endregion
|
|
754
|
-
export {
|
|
740
|
+
export { shouldRecordNativeToolTranscript as A, readNonNegativeInteger as B, isSideEffectingNativeToolItem as C, itemTitle as D, itemStatus as E, readHookOutputEntries as F, splitPlanText as H, readItem as I, readItemString as L, extractRawAssistantText as M, normalizeOptionalString$1 as N, matchesCodexSnapshotTurn as O, readCodexErrorNotificationMessage as P, readNonEmptyString as R, isNonSuccessItemStatus as S, itemName as T, readNullableString as V, readCodexNotificationTurnId as _, closeCodexStartupClientBestEffort as a, auditNativeToolUnfinishedStatus as b, isCodexAppServerUnsafeSubscriptionError as c, unsubscribeCodexThreadBestEffort as d, CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS as f, readCodexNotificationThreadId as g, isCodexNotificationForTurn as h, assertCodexThreadResumeSubscription as i, shouldSynthesizeToolProgressForItem as j, shouldClearTerminalPresentationForNativeItem as k, retireUnsafeCodexTurnClientBestEffort as l, CodexProjectionDiagnostics as m, CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS as n, interruptCodexTurnAndWaitBestEffort as o, getCodexAppServerTurnRouter as p, CodexAppServerUnsafeSubscriptionError as r, isCodexAlreadyTerminalInterruptError as s, CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS as t, terminateCodexBackgroundTerminals as u, auditNativeToolName as v, itemKind as w, isMutatingNativeToolItem as x, auditNativeToolTerminalStatus as y, readNonEmptyStringArray as z };
|