@openclaw/codex 2026.7.2-beta.5 → 2026.7.33
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 +3 -27
- package/dist/{command-formatters-ico4ZFnk.js → .setup/app-server-policy-C_qTMEMy.mjs} +51 -9
- package/dist/{attempt-notifications-CMR2_fmR.js → .setup/attempt-notifications-F8krwWL4.mjs} +6 -3
- package/dist/{command-handlers-CRmnwI2N.js → .setup/command-handlers-DSRFfor4.mjs} +1156 -1319
- package/dist/.setup/command-rpc-BvYsfQ7G.mjs +786 -0
- package/dist/{compact-dEN49UH6.js → .setup/compact-BNgh7I4t.mjs} +10 -40
- package/dist/.setup/computer-use-C3QkmSO3.mjs +377 -0
- package/dist/.setup/config-CYEDnLJ2.mjs +1138 -0
- package/dist/{conversation-binding-data-BHRpYbX3.js → .setup/conversation-binding-data-CrRxtDBu.mjs} +1 -1
- package/dist/{bounded-turn-FEbUXoYT.js → .setup/media-understanding-provider-EbJCyDqe.mjs} +193 -92
- package/dist/{models-BA01NEez.js → .setup/models-C_aZk03A.mjs} +11 -6
- package/dist/.setup/notification-correlation-iYs4WieS.mjs +35 -0
- package/dist/.setup/plugin-app-cache-key-DR8jV9oS.mjs +99 -0
- package/dist/.setup/protocol-2POPqAY4.mjs +13 -0
- package/dist/{protocol-validators-Dm4eXZmt.js → .setup/protocol-validators-dZQ-UTOa.mjs} +111 -334
- package/dist/{rate-limits-S_PXs0ul.js → .setup/provider-DGxDs6g8.mjs} +269 -13
- package/dist/{dynamic-tools-LIt9ojep.js → .setup/provider-capabilities-DS2N_zc1.mjs} +5465 -3399
- package/dist/.setup/request-DFR0JyoV.mjs +36 -0
- package/dist/.setup/run-attempt-C7xEKFVB.mjs +8180 -0
- package/dist/{sandbox-guard-D1Wky__S.js → .setup/sandbox-guard-DA2TQfZW.mjs} +1 -10
- package/dist/.setup/session-binding-DuihlMJc.mjs +628 -0
- package/dist/.setup/shared-client-B2KmLPRw.mjs +1854 -0
- package/dist/{side-question-CO12sHxo.js → .setup/side-question-Cv6JXWCS.mjs} +84 -159
- package/dist/{thread-lifecycle-DRg_FdzC.js → .setup/thread-lifecycle-u6CZdOOH.mjs} +1159 -1799
- package/dist/{web-search-provider.runtime-CaQMYDbp.js → .setup/web-search-provider.runtime-Ce2zOHxW.mjs} +3 -3
- package/dist/doctor-contract-api.js +122 -88
- package/dist/harness.js +20 -85
- package/dist/index.js +381 -1537
- package/dist/media-understanding-provider.js +1 -173
- package/dist/prompt-overlay.js +15 -0
- package/dist/provider-catalog.js +79 -0
- package/dist/provider-discovery.js +34 -0
- package/dist/provider.js +2 -0
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +178 -221
- package/package.json +8 -10
- package/dist/app-server-policy-BmDgseo_.js +0 -49
- package/dist/attempt-client-cleanup-Ia52yRWc.js +0 -127
- package/dist/auth-binding-B4FfbcCg.js +0 -62
- package/dist/capabilities-BHRSI6Cn.js +0 -36
- package/dist/cli-metadata.js +0 -20
- package/dist/computer-use-BjGylO-E.js +0 -695
- package/dist/conversation-control-DE7d9DOj.js +0 -287
- package/dist/event-projector-assistant-message-DTgnPPVF.js +0 -101
- package/dist/event-projector-usage-tvgb1NCX.js +0 -69
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/notification-correlation-Bj_Ak_jI.js +0 -67
- package/dist/plugin-app-cache-key-DSXX-rXO.js +0 -315
- package/dist/realtime-voice-api-BPcA1uN9.js +0 -494
- package/dist/realtime-voice-api.js +0 -2
- package/dist/request-CXpPennK.js +0 -157
- package/dist/run-attempt-C5GTPJOE.js +0 -11935
- package/dist/runtime-artifact-C2ITXdhM.js +0 -488
- package/dist/session-binding-DlVQ-Pxs.js +0 -2161
- package/dist/session-catalog-CP2oCcEb.js +0 -2444
- package/dist/session-cli-CqZ0Fp2a.js +0 -175
- package/dist/session-upstream-marker-QE-m5QFG.js +0 -82
- package/dist/settled-turn-finalizer-CA_2QXIE.js +0 -303
- package/dist/shared-client-BVKE40c-.js +0 -2952
- package/dist/transcript-mirror-uKA-A4tB.js +0 -550
- package/dist/transport-stdio-DXgGZ7Ib.js +0 -88
- package/dist/upstream-session-fork-_Vrz4WJr.js +0 -320
- package/dist/usage-UpVbdX5G.js +0 -25
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
# OpenClaw Codex
|
|
2
2
|
|
|
3
|
-
Official OpenClaw plugin for OpenAI Codex app-server integration. It exposes the Codex-managed GPT model catalog
|
|
3
|
+
Official OpenClaw provider and harness plugin for OpenAI Codex app-server integration. It exposes the Codex-managed GPT model catalog and the Codex runtime surfaces used by OpenClaw agents.
|
|
4
4
|
|
|
5
5
|
Install from OpenClaw:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
openclaw
|
|
8
|
+
openclaw plugin add @openclaw/codex
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Use this plugin when you want OpenClaw to run Codex-backed model turns, media understanding, and prompt overlays through the Codex app-server harness
|
|
12
|
-
|
|
13
|
-
Guided onboarding attempts to install and enable supervision after it detects a native Codex installation and the selected inference backend passes its live check; Codex does not need to be the primary backend. Supervision activates when that opportunistic plugin setup succeeds. App Server availability is checked when supervision connects. An explicit Codex plugin disable, plugin-policy block, or `supervision.enabled: false` prevents opportunistic enablement. Manual setups enable `plugins.entries.codex.config.supervision.enabled`. Without explicit App Server connection settings, supervision uses a managed user-home stdio connection; explicit `appServer` settings are honored.
|
|
14
|
-
|
|
15
|
-
The Gateway-backed operator CLI is:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
openclaw codex sessions [--search <text>] [--host <id>] [--limit <count>] [--cursor <cursor>] [--json] [--url <url>] [--token <token>] [--timeout <ms>] [--expect-final]
|
|
19
|
-
openclaw codex continue <thread-id> [--json] [--url <url>] [--token <token>] [--timeout <ms>] [--expect-final]
|
|
20
|
-
openclaw codex archive <thread-id> --confirm-no-other-runner [--json] [--url <url>] [--token <token>] [--timeout <ms>] [--expect-final]
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
The catalog never includes archived threads and has no archived or include-archived option. Rows appear in the normal Control UI sessions sidebar and open in the normal Chat pane. Transcript history requires a recent Codex App Server with `thread/turns/list` and is fetched 20 full-item turns at a time through opaque cursors; OpenClaw does not fall back to an unbounded `thread/read`, and rejects a serialized transcript page above 20 MiB before transport. `--limit` defaults to 50 sessions per host, `--cursor` requires `--host`, and the sessions Gateway timeout defaults to 75,000 ms so cold paired-node catalogs can complete. Continue and archive retain the shared 30,000 ms default. All operator surfaces require `operator.write`. Paired-node rows can be listed and read; continue and archive operate only on the Gateway-local host, and archive requires the no-other-runner confirmation. Catalog registration does not require `supervision.enabled`; that setting gates agent-facing supervision tools.
|
|
24
|
-
|
|
25
|
-
A supervised OpenClaw Chat cannot be deleted while its model-selection lock protects the native binding. Before native archive, OpenClaw checks the exact target and every non-archived spawned descendant reported by Codex; any active OpenClaw binding blocks the operation. Descendant pagination errors, cycles, and safety-limit exhaustion also fail closed. Codex still does not expose a conditional archive operation or cross-process runner lease, so the confirmation covers unknown native clients and the race between the status read and archive request.
|
|
26
|
-
|
|
27
|
-
Disabling or uninstalling the plugin leaves supervised Chats locked and unavailable rather than rerouting them. Reinstall or re-enable the same plugin and restart the Gateway to resume those Chats.
|
|
28
|
-
|
|
29
|
-
These shell commands differ from the in-chat `/codex` runtime commands. In particular, `/codex sessions --host <node>` lists Codex CLI session files on one node, `/codex threads` uses the current conversation's App Server connection, and `/codex resume` or `/codex bind` changes that conversation's binding. There is no `/codex archive` runtime command.
|
|
30
|
-
|
|
31
|
-
For a supervised branch, Codex App Server selects the snapshot fork's model and provider from its current native configuration. OpenClaw starts the canonical harness thread with exactly that returned pair. Codex persists the canonical thread's native selection, and later resumes preserve it because OpenClaw omits model and provider overrides. OpenClaw cannot substitute its outer runtime, model, or fallback. The returned initial pair can differ from the source's last recorded model.
|
|
32
|
-
|
|
33
|
-
The visible-history mirror keeps at most 200 user or assistant messages, 512 KiB total, and 64 KiB per message. Image inputs become `[Image attachment]`; image data and local paths are not copied.
|
|
34
|
-
|
|
35
|
-
See the [Codex harness](https://docs.openclaw.ai/plugins/codex-harness) and [Codex supervision](https://docs.openclaw.ai/plugins/codex-supervision) guides.
|
|
11
|
+
Use this plugin when you want OpenClaw to run Codex-backed model turns, media understanding, and prompt overlays through the Codex app-server harness.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as isJsonObject } from "./protocol-2POPqAY4.mjs";
|
|
2
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-CYEDnLJ2.mjs";
|
|
3
|
+
import { f as summarizeCodexAccountRateLimits, l as hasCodexRateLimitSnapshots, m as summarizeCodexRateLimits } from "./provider-DGxDs6g8.mjs";
|
|
3
4
|
//#region extensions/codex/src/command-formatters.ts
|
|
4
5
|
/** Formats the combined `/codex status` probe result. */
|
|
5
6
|
function formatCodexStatus(probes) {
|
|
@@ -64,14 +65,9 @@ function formatAuthRowStatus(row) {
|
|
|
64
65
|
function formatComputerUseStatus(status) {
|
|
65
66
|
const lines = [`Computer Use: ${status.ready ? "ready" : status.enabled ? "not ready" : "disabled"}`];
|
|
66
67
|
lines.push(`Plugin: ${formatCodexDisplayText(status.pluginName)} (${computerUsePluginState(status)})`);
|
|
67
|
-
lines.push(`Installation: ${formatCodexDisplayText(status.installation.status)} (${status.installation.ok ? "ok" : "not ok"})`);
|
|
68
68
|
lines.push(`MCP server: ${formatCodexDisplayText(status.mcpServerName)}${status.mcpServerAvailable ? ` (${status.tools.length} tools)` : " (unavailable)"}`);
|
|
69
|
-
lines.push(`Exposure: ${formatCodexDisplayText(status.exposure.status)} (${status.exposure.ok ? "ok" : "not ok"})`);
|
|
70
|
-
lines.push(`Live test: ${formatCodexDisplayText(status.liveTest.status)} (${status.liveTest.attempted ? `${status.liveTest.attempts} attempt${status.liveTest.attempts === 1 ? "" : "s"}, ${status.liveTest.timeoutMs}ms` : "not run"})`);
|
|
71
|
-
if (status.liveTest.retried || status.liveTest.repaired) lines.push(`Live test recovery: retried=${status.liveTest.retried ? "yes" : "no"}, repaired=${status.liveTest.repaired ? "yes" : "no"}`);
|
|
72
69
|
if (status.marketplaceName) lines.push(`Marketplace: ${formatCodexDisplayText(status.marketplaceName)}`);
|
|
73
70
|
if (status.tools.length > 0) lines.push(`Tools: ${status.tools.slice(0, 8).map(formatCodexDisplayText).join(", ")}`);
|
|
74
|
-
for (const warning of status.warnings) lines.push(`Warning: ${formatCodexDisplayText(warning)}`);
|
|
75
71
|
lines.push(formatCodexDisplayText(status.message));
|
|
76
72
|
return lines.join("\n");
|
|
77
73
|
}
|
|
@@ -175,7 +171,6 @@ function buildHelp() {
|
|
|
175
171
|
"- /codex status",
|
|
176
172
|
"- /codex models",
|
|
177
173
|
"- /codex threads [filter]",
|
|
178
|
-
"- /codex goal [status|set <objective>|pause|resume|block|complete|clear]",
|
|
179
174
|
"- /codex sessions --host <node> [filter]",
|
|
180
175
|
"- /codex resume <thread-id>",
|
|
181
176
|
"- /codex resume <session-id> --host <node> --bind here",
|
|
@@ -278,4 +273,51 @@ function readString(record, key) {
|
|
|
278
273
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
279
274
|
}
|
|
280
275
|
//#endregion
|
|
281
|
-
|
|
276
|
+
//#region extensions/codex/src/app-server/app-server-policy.ts
|
|
277
|
+
/**
|
|
278
|
+
* Policy promotion for Codex app-server runs that can safely use OpenClaw tool
|
|
279
|
+
* approvals.
|
|
280
|
+
*/
|
|
281
|
+
/**
|
|
282
|
+
* Promotes implicit `never` approval policy to `untrusted` only when runtime
|
|
283
|
+
* requirements allow OpenClaw to handle tool approvals.
|
|
284
|
+
*/
|
|
285
|
+
function resolveCodexAppServerForOpenClawToolPolicy(params) {
|
|
286
|
+
if (!params.shouldPromote || !params.canUseUntrustedApprovalPolicy || params.appServer.approvalPolicy !== "never") return params.appServer;
|
|
287
|
+
const explicitMode = params.execPolicy?.mode === "full" || params.pluginConfig.appServer?.mode !== void 0 || isCodexAppServerPolicyMode(params.env.OPENCLAW_CODEX_APP_SERVER_MODE);
|
|
288
|
+
const explicitApprovalPolicy = params.pluginConfig.appServer?.approvalPolicy !== void 0 || isConfiguredCodexAppServerApprovalPolicy(params.env.OPENCLAW_CODEX_APP_SERVER_APPROVAL_POLICY) || params.appServer.approvalPolicySource === "requirements";
|
|
289
|
+
if (explicitMode || explicitApprovalPolicy) return params.appServer;
|
|
290
|
+
return {
|
|
291
|
+
...params.appServer,
|
|
292
|
+
approvalPolicy: "untrusted"
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function resolveCodexAppServerForModelProvider(params) {
|
|
296
|
+
const explicitProvider = normalizeModelBackedReviewerProvider(params.provider);
|
|
297
|
+
if (!isCodexModelBackedApprovalsReviewer(params.appServer.approvalsReviewer) || canUseCodexModelBackedApprovalsReviewerForModel({
|
|
298
|
+
modelProvider: explicitProvider,
|
|
299
|
+
model: params.model,
|
|
300
|
+
config: params.config,
|
|
301
|
+
env: params.env,
|
|
302
|
+
agentDir: params.agentDir,
|
|
303
|
+
codexConfigToml: params.codexConfigToml
|
|
304
|
+
})) return params.appServer;
|
|
305
|
+
return {
|
|
306
|
+
...params.appServer,
|
|
307
|
+
approvalsReviewer: "user"
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function isCodexAppServerPolicyMode(value) {
|
|
311
|
+
return value === "guardian" || value === "yolo";
|
|
312
|
+
}
|
|
313
|
+
function isConfiguredCodexAppServerApprovalPolicy(value) {
|
|
314
|
+
return value === "never" || value === "on-request" || value === "on-failure" || value === "untrusted";
|
|
315
|
+
}
|
|
316
|
+
function isCodexModelBackedApprovalsReviewer(value) {
|
|
317
|
+
return value === "auto_review" || value === "guardian_subagent";
|
|
318
|
+
}
|
|
319
|
+
function normalizeModelBackedReviewerProvider(provider) {
|
|
320
|
+
return provider?.trim().toLowerCase() || void 0;
|
|
321
|
+
}
|
|
322
|
+
//#endregion
|
|
323
|
+
export { formatCodexDisplayText as a, formatList as c, formatThreads as d, readString as f, formatAccount as i, formatModels as l, resolveCodexAppServerForOpenClawToolPolicy as n, formatCodexStatus as o, buildHelp as r, formatComputerUseStatus as s, resolveCodexAppServerForModelProvider as t, formatSkills as u };
|
package/dist/{attempt-notifications-CMR2_fmR.js → .setup/attempt-notifications-F8krwWL4.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as isJsonObject } from "./protocol-2POPqAY4.mjs";
|
|
2
2
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
3
|
//#region extensions/codex/src/app-server/attempt-notifications.ts
|
|
4
4
|
/**
|
|
@@ -6,6 +6,8 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
const CODEX_TURN_ABORT_MARKER_START = "<turn_aborted>";
|
|
8
8
|
const CODEX_TURN_ABORT_MARKER_END = "</turn_aborted>";
|
|
9
|
+
const CODEX_INTERRUPTED_USER_GUIDANCE = "The user interrupted the previous turn on purpose. Any running unified exec processes may still be running in the background. If any tools/commands were aborted, they may have partially executed.";
|
|
10
|
+
const CODEX_INTERRUPTED_DEVELOPER_GUIDANCE = "The previous turn was interrupted on purpose. Any running unified exec processes may still be running in the background. If any tools/commands were aborted, they may have partially executed.";
|
|
9
11
|
/** Builds compact activity metadata for watchdog and diagnostic updates. */
|
|
10
12
|
function describeNotificationActivity(notification) {
|
|
11
13
|
if (!isJsonObject(notification.params)) return { lastNotificationMethod: notification.method };
|
|
@@ -180,11 +182,12 @@ function isCodexTurnAbortMarkerNotification(notification, options = {}) {
|
|
|
180
182
|
if (notification.method !== "rawResponseItem/completed" || !isJsonObject(notification.params)) return false;
|
|
181
183
|
const item = notification.params.item;
|
|
182
184
|
const role = isJsonObject(item) ? readString(item, "role") : void 0;
|
|
183
|
-
if (!isJsonObject(item) ||
|
|
185
|
+
if (!isJsonObject(item) || role !== "user" && role !== "developer") return false;
|
|
184
186
|
const text = extractRawResponseItemText(item).trim();
|
|
185
187
|
const currentPromptTexts = [options.currentPromptText, ...options.currentPromptTexts ?? []].filter(isNonEmptyString).map((prompt) => prompt.trim());
|
|
186
188
|
if (role === "user" && currentPromptTexts.includes(text)) return false;
|
|
187
|
-
|
|
189
|
+
const markerBody = readCodexTurnAbortMarkerBody(text);
|
|
190
|
+
return markerBody === CODEX_INTERRUPTED_USER_GUIDANCE || markerBody === CODEX_INTERRUPTED_DEVELOPER_GUIDANCE;
|
|
188
191
|
}
|
|
189
192
|
function readCodexTurnAbortMarkerBody(text) {
|
|
190
193
|
if (!text.startsWith(CODEX_TURN_ABORT_MARKER_START) || !text.endsWith(CODEX_TURN_ABORT_MARKER_END)) return;
|