@openclaw/codex 2026.7.2-beta.5 → 2026.8.1-beta.2
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/{app-server-policy-BmDgseo_.js → app-server-policy-zcBDc1JU.js} +1 -1
- package/dist/attempt-client-cleanup-DMLXUfa8.js +735 -0
- package/dist/binding-connection-I5Bo-AsX.js +33 -0
- package/dist/{bounded-turn-FEbUXoYT.js → bounded-turn-qgZmzy_4.js} +71 -63
- package/dist/{capabilities-BHRSI6Cn.js → capabilities-CybGI1oz.js} +8 -2
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-ico4ZFnk.js → command-formatters-B1AEz8ZA.js} +18 -18
- package/dist/{command-handlers-CRmnwI2N.js → command-handlers-Db8pu_ds.js} +484 -95
- package/dist/{compact-dEN49UH6.js → compact-LspQaGfl.js} +213 -199
- package/dist/{conversation-binding-data-BHRpYbX3.js → conversation-binding-data-CW2GuupV.js} +6 -10
- package/dist/doctor-contract-api.js +40 -43
- package/dist/{dynamic-tools-LIt9ojep.js → dynamic-tools-BVdyWkUD.js} +2984 -1221
- package/dist/effective-mcp-catalog-DIIhAtOZ.js +119 -0
- package/dist/{event-projector-assistant-message-DTgnPPVF.js → event-projector-assistant-message-BwxV4d6N.js} +11 -23
- package/dist/{attempt-notifications-CMR2_fmR.js → event-projector-usage-e5huIQWu.js} +113 -29
- package/dist/harness.js +83 -13
- package/dist/image-payload-sanitizer-CnfoUPCE.js +65 -0
- package/dist/index.js +703 -329
- package/dist/isolated-completion-C58NbL40.js +75 -0
- package/dist/local-runtime-attribution-B_2mnqhb.js +19 -0
- package/dist/media-understanding-provider.js +5 -5
- package/dist/{models-BA01NEez.js → models-BFlpn1Ex.js} +12 -17
- package/dist/native-subagent-monitor-DyTGmTUx.js +3111 -0
- package/dist/{plugin-app-cache-key-DSXX-rXO.js → plugin-app-cache-key-C3H2CVp6.js} +135 -42
- package/dist/plugin-marketplace-discovery-CzrGJdCR.js +385 -0
- package/dist/{computer-use-BjGylO-E.js → plugin-metadata-cache-CNJPj4_b.js} +211 -113
- package/dist/protocol-validators-B4F7L8Rf.js +2346 -0
- package/dist/{rate-limits-S_PXs0ul.js → rate-limits-DZXmOL8-.js} +17 -35
- package/dist/{request-CXpPennK.js → request-BRl5_UfX.js} +4 -4
- package/dist/{run-attempt-C5GTPJOE.js → run-attempt-P8BdxC1I.js} +1996 -5728
- package/dist/{runtime-artifact-C2ITXdhM.js → runtime-artifact-BVSPdd6g.js} +91 -40
- package/dist/{sandbox-guard-D1Wky__S.js → sandbox-guard-Cmwc9eIk.js} +10 -13
- package/dist/{session-binding-DlVQ-Pxs.js → session-binding-DPxIvMgE.js} +305 -271
- package/dist/{session-catalog-CP2oCcEb.js → session-catalog-xwNi_SDM.js} +418 -144
- package/dist/{session-cli-CqZ0Fp2a.js → session-cli-7hgXZDV7.js} +1 -1
- package/dist/session-retirement-DoMMJFKm.js +36 -0
- package/dist/{session-upstream-marker-QE-m5QFG.js → session-upstream-marker-CrIFX06J.js} +1 -1
- package/dist/{settled-turn-finalizer-CA_2QXIE.js → settled-turn-finalizer-BRWBO4MO.js} +36 -15
- package/dist/{shared-client-BVKE40c-.js → shared-client-kIBbGjk4.js} +721 -240
- package/dist/{side-question-CO12sHxo.js → side-question-9HAL26l9.js} +102 -53
- package/dist/{thread-lifecycle-DRg_FdzC.js → thread-lifecycle-Bu1BTDXr.js} +1355 -660
- package/dist/thread-ownership-6kOQHlyC.js +92 -0
- package/dist/thread-resume-CPrJNQVM.js +30 -0
- package/dist/{transcript-mirror-uKA-A4tB.js → transcript-mirror-B9gGgnJS.js} +202 -182
- package/dist/{transport-stdio-DXgGZ7Ib.js → transport-stdio-DIImwDVS.js} +11 -0
- package/dist/upstream-prompt-provenance-ClRBije0.js +41 -0
- package/dist/{upstream-session-fork-_Vrz4WJr.js → upstream-session-fork-CE-_LdnP.js} +5 -5
- package/dist/{usage-UpVbdX5G.js → usage-CHlV0e-o.js} +3 -3
- package/dist/{web-search-provider.runtime-CaQMYDbp.js → web-search-provider.runtime-DRw2Vl42.js} +8 -9
- package/openclaw.plugin.json +18 -3
- package/package.json +6 -7
- package/dist/attempt-client-cleanup-Ia52yRWc.js +0 -127
- package/dist/conversation-control-DE7d9DOj.js +0 -287
- package/dist/event-projector-usage-tvgb1NCX.js +0 -69
- package/dist/notification-correlation-Bj_Ak_jI.js +0 -67
- package/dist/protocol-validators-Dm4eXZmt.js +0 -6337
- package/dist/realtime-voice-api-BPcA1uN9.js +0 -494
- package/dist/realtime-voice-api.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-
|
|
1
|
+
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-DIImwDVS.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -17,16 +17,31 @@ const MAX_ARTIFACT_FILES = 8192;
|
|
|
17
17
|
const MAX_ARTIFACT_TOTAL_BYTES = 1024n * 1024n * 1024n;
|
|
18
18
|
const READ_CHUNK_BYTES = 64 * 1024;
|
|
19
19
|
const CODE_MODE_HOST_PATH_ENV = "CODEX_CODE_MODE_HOST_PATH";
|
|
20
|
-
const
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
20
|
+
const SAFE_NODE_OPTIONS_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
21
|
+
"--enable-network-family-autoselection",
|
|
22
|
+
"--network-family-autoselection",
|
|
23
|
+
"--no-deprecation",
|
|
24
|
+
"--no-network-family-autoselection",
|
|
25
|
+
"--no-warnings",
|
|
26
|
+
"--pending-deprecation",
|
|
27
|
+
"--throw-deprecation",
|
|
28
|
+
"--trace-deprecation",
|
|
29
|
+
"--trace-warnings",
|
|
30
|
+
"--use-bundled-ca",
|
|
31
|
+
"--use-env-proxy",
|
|
32
|
+
"--use-openssl-ca",
|
|
33
|
+
"--use-system-ca"
|
|
34
|
+
]);
|
|
35
|
+
const SAFE_NODE_OPTIONS_NUMERIC_FLAGS = /* @__PURE__ */ new Set([
|
|
36
|
+
"--max-old-space-size",
|
|
37
|
+
"--max-semi-space-size",
|
|
38
|
+
"--network-family-autoselection-attempt-timeout",
|
|
39
|
+
"--stack-trace-limit"
|
|
40
|
+
]);
|
|
41
|
+
const SAFE_NODE_OPTIONS_DNS_RESULT_ORDERS = /* @__PURE__ */ new Set([
|
|
42
|
+
"ipv4first",
|
|
43
|
+
"ipv6first",
|
|
44
|
+
"verbatim"
|
|
30
45
|
]);
|
|
31
46
|
const ARTIFACT_BINDINGS_SYMBOL = Symbol.for("openclaw.codexAppServerRuntimeArtifactBindings");
|
|
32
47
|
function getRuntimeArtifactBindings() {
|
|
@@ -112,44 +127,80 @@ function pathIsWithin(rootPath, candidatePath) {
|
|
|
112
127
|
const relative = path.relative(rootPath, candidatePath);
|
|
113
128
|
return relative === "" || !path.isAbsolute(relative) && !relative.startsWith(`..${path.sep}`) && relative !== "..";
|
|
114
129
|
}
|
|
115
|
-
function
|
|
130
|
+
function assertSafeNodeOptions(env) {
|
|
116
131
|
for (const [rawKey, value] of Object.entries(env)) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
121
|
-
|
|
132
|
+
if (rawKey.toUpperCase() !== "NODE_OPTIONS" || !value?.trim()) continue;
|
|
133
|
+
const result = attestNodeOptions(value);
|
|
134
|
+
if (result.ok) continue;
|
|
135
|
+
if (result.option) throw new Error(`Codex runtime artifact cannot attest NODE_OPTIONS option ${result.option}`);
|
|
136
|
+
throw new Error("Codex runtime artifact cannot safely parse NODE_OPTIONS");
|
|
122
137
|
}
|
|
123
138
|
}
|
|
124
|
-
function
|
|
125
|
-
const tokens =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
function parseNodeOptions(value) {
|
|
140
|
+
const tokens = [];
|
|
141
|
+
let inQuotes = false;
|
|
142
|
+
let startsNewToken = true;
|
|
143
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
144
|
+
let character = value[index];
|
|
145
|
+
if (character === "\\" && inQuotes) {
|
|
146
|
+
index += 1;
|
|
147
|
+
if (index >= value.length) return;
|
|
148
|
+
character = value[index];
|
|
149
|
+
} else if (character === " " && !inQuotes) {
|
|
150
|
+
startsNewToken = true;
|
|
151
|
+
continue;
|
|
152
|
+
} else if (character === "\"") {
|
|
153
|
+
inQuotes = !inQuotes;
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (startsNewToken) {
|
|
157
|
+
tokens.push(character);
|
|
158
|
+
startsNewToken = false;
|
|
159
|
+
} else tokens[tokens.length - 1] += character;
|
|
160
|
+
}
|
|
161
|
+
return inQuotes ? void 0 : tokens;
|
|
162
|
+
}
|
|
163
|
+
function normalizedNodeOptionName(token) {
|
|
164
|
+
const equalsIndex = token.indexOf("=");
|
|
165
|
+
const name = (equalsIndex === -1 ? token : token.slice(0, equalsIndex)).replaceAll("_", "-");
|
|
166
|
+
return /^--[a-z][a-z0-9-]{0,63}$/u.test(name) ? name : void 0;
|
|
167
|
+
}
|
|
168
|
+
function attestNodeOptions(value) {
|
|
169
|
+
const tokens = parseNodeOptions(value);
|
|
170
|
+
if (!tokens || tokens.length === 0) return { ok: false };
|
|
141
171
|
for (let index = 0; index < tokens.length; index += 1) {
|
|
142
172
|
const token = tokens[index];
|
|
143
|
-
if (booleanFlags.has(token)) continue;
|
|
144
173
|
const equalsIndex = token.indexOf("=");
|
|
145
|
-
const flag =
|
|
174
|
+
const flag = normalizedNodeOptionName(token);
|
|
175
|
+
if (!flag) return { ok: false };
|
|
146
176
|
const inlineValue = equalsIndex === -1 ? void 0 : token.slice(equalsIndex + 1);
|
|
177
|
+
if (SAFE_NODE_OPTIONS_BOOLEAN_FLAGS.has(flag)) {
|
|
178
|
+
if (inlineValue === void 0) continue;
|
|
179
|
+
return {
|
|
180
|
+
ok: false,
|
|
181
|
+
option: flag
|
|
182
|
+
};
|
|
183
|
+
}
|
|
147
184
|
if (flag === "--disable-warning" && inlineValue && /^[A-Za-z][A-Za-z0-9_.:-]{0,63}$/u.test(inlineValue)) continue;
|
|
148
|
-
if (
|
|
185
|
+
if (flag === "--dns-result-order") {
|
|
186
|
+
const order = inlineValue ?? tokens[++index];
|
|
187
|
+
if (order && SAFE_NODE_OPTIONS_DNS_RESULT_ORDERS.has(order)) continue;
|
|
188
|
+
return {
|
|
189
|
+
ok: false,
|
|
190
|
+
option: flag
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (!SAFE_NODE_OPTIONS_NUMERIC_FLAGS.has(flag)) return {
|
|
194
|
+
ok: false,
|
|
195
|
+
option: flag
|
|
196
|
+
};
|
|
149
197
|
const numericValue = inlineValue ?? tokens[++index];
|
|
150
|
-
if (!numericValue || !/^\d+$/u.test(numericValue)) return
|
|
198
|
+
if (!numericValue || !/^\d+$/u.test(numericValue)) return {
|
|
199
|
+
ok: false,
|
|
200
|
+
option: flag
|
|
201
|
+
};
|
|
151
202
|
}
|
|
152
|
-
return
|
|
203
|
+
return { ok: true };
|
|
153
204
|
}
|
|
154
205
|
async function hashSelectedArtifactFiles(descriptor, signal) {
|
|
155
206
|
throwIfAborted(signal);
|
|
@@ -311,7 +362,7 @@ async function captureFilesystemDescriptor(params) {
|
|
|
311
362
|
throwIfAborted(params.signal);
|
|
312
363
|
if (params.startOptions.transport !== "stdio") throw new Error("Verified Codex inference requires a local stdio runtime artifact; WebSocket attestation is unsupported");
|
|
313
364
|
const env = resolveCodexAppServerSpawnEnv(params.startOptions);
|
|
314
|
-
|
|
365
|
+
assertSafeNodeOptions(env);
|
|
315
366
|
const spawnCwd = path.resolve(params.startOptions.cwd ?? process.cwd());
|
|
316
367
|
const commandPath = await resolveCommandPath(params.startOptions.command, env, spawnCwd);
|
|
317
368
|
const commandRealPath = await fs.realpath(commandPath);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { C as isCodexRemoteExecPlacementSandbox } from "./session-binding-DPxIvMgE.js";
|
|
2
|
+
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
|
1
3
|
import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
|
|
2
4
|
import { resolveSandboxRuntimeStatus } from "openclaw/plugin-sdk/sandbox";
|
|
3
5
|
//#region extensions/codex/src/app-server/native-execution-policy.ts
|
|
4
|
-
const DEFAULT_AGENT_ID = "main";
|
|
5
|
-
const VALID_AGENT_ID_PATTERN = /^[a-z0-9][a-z0-9_-]{0,63}$/i;
|
|
6
|
-
const INVALID_AGENT_ID_CHARS_PATTERN = /[^a-z0-9_-]+/g;
|
|
7
|
-
const LEADING_DASH_PATTERN = /^-+/;
|
|
8
|
-
const TRAILING_DASH_PATTERN = /-+$/;
|
|
9
6
|
/** Projects node execution ownership into the runtime tool factory options. */
|
|
10
7
|
function resolveCodexNodeExecToolOverrides(policy) {
|
|
11
8
|
if (policy.effectiveExecHost !== "node") return;
|
|
@@ -109,14 +106,7 @@ function resolveDefaultPolicyAgentId(agents) {
|
|
|
109
106
|
}
|
|
110
107
|
function normalizeAgentIdOrDefault(value) {
|
|
111
108
|
const normalized = normalizeAgentId(value);
|
|
112
|
-
return normalized ===
|
|
113
|
-
}
|
|
114
|
-
function normalizeAgentId(value) {
|
|
115
|
-
const trimmed = (value ?? "").trim();
|
|
116
|
-
if (!trimmed) return DEFAULT_AGENT_ID;
|
|
117
|
-
const normalized = trimmed.toLowerCase();
|
|
118
|
-
if (VALID_AGENT_ID_PATTERN.test(trimmed)) return normalized;
|
|
119
|
-
return normalized.replace(INVALID_AGENT_ID_CHARS_PATTERN, "-").replace(LEADING_DASH_PATTERN, "").replace(TRAILING_DASH_PATTERN, "").slice(0, 64) || DEFAULT_AGENT_ID;
|
|
109
|
+
return normalized === "main" && !(value ?? "").trim() ? void 0 : normalized;
|
|
120
110
|
}
|
|
121
111
|
function normalizeExecTarget(value) {
|
|
122
112
|
const normalized = value?.trim().toLowerCase();
|
|
@@ -142,7 +132,10 @@ function readRuntimeSessionEntryBestEffort(params) {
|
|
|
142
132
|
const DIRECT_METHOD_POLICIES = /* @__PURE__ */ new Map([
|
|
143
133
|
["account/rateLimits/read", "allowed-control-plane"],
|
|
144
134
|
["account/read", "allowed-control-plane"],
|
|
135
|
+
["app/installed", "allowed-control-plane"],
|
|
145
136
|
["app/list", "allowed-control-plane"],
|
|
137
|
+
["app/read", "allowed-control-plane"],
|
|
138
|
+
["config/batchWrite", "allowed-control-plane"],
|
|
146
139
|
["config/mcpServer/reload", "allowed-control-plane"],
|
|
147
140
|
["config/read", "allowed-control-plane"],
|
|
148
141
|
["config/value/write", "allowed-control-plane"],
|
|
@@ -155,6 +148,7 @@ const DIRECT_METHOD_POLICIES = /* @__PURE__ */ new Map([
|
|
|
155
148
|
["mcpServerStatus/list", "allowed-control-plane"],
|
|
156
149
|
["model/list", "allowed-control-plane"],
|
|
157
150
|
["plugin/install", "allowed-control-plane"],
|
|
151
|
+
["plugin/installed", "allowed-control-plane"],
|
|
158
152
|
["plugin/list", "allowed-control-plane"],
|
|
159
153
|
["plugin/read", "allowed-control-plane"],
|
|
160
154
|
["skills/list", "allowed-control-plane"],
|
|
@@ -219,6 +213,7 @@ function resolveCodexAppServerDirectSandboxBypassBlock(params) {
|
|
|
219
213
|
const sandboxBlock = resolveCodexNativeSandboxBlock({
|
|
220
214
|
config: params.config,
|
|
221
215
|
sessionKey,
|
|
216
|
+
sandbox: params.sandbox,
|
|
222
217
|
surface: `app-server method \`${params.method}\``
|
|
223
218
|
});
|
|
224
219
|
if (!sandboxBlock) return;
|
|
@@ -231,8 +226,10 @@ function resolveCodexNativeExecutionBlock(params) {
|
|
|
231
226
|
}
|
|
232
227
|
/** Returns a block message when native Codex execution cannot honor active sandboxing. */
|
|
233
228
|
function resolveCodexNativeSandboxBlock(params) {
|
|
229
|
+
if (params.sandboxEnvironmentSelected) return;
|
|
234
230
|
const sessionKey = params.sessionKey?.trim() || params.sessionId?.trim();
|
|
235
231
|
if (!sessionKey) return;
|
|
232
|
+
if (isCodexRemoteExecPlacementSandbox(params.sandbox) || params.sandbox?.enabled === true) return formatCodexNativeSandboxBlock({ surface: params.surface });
|
|
236
233
|
if (!resolveSandboxRuntimeStatus({
|
|
237
234
|
cfg: params.config,
|
|
238
235
|
sessionKey
|