@openclaw/codex 2026.7.2-beta.4 → 2026.7.2-beta.7

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 (40) hide show
  1. package/dist/{app-server-policy-BO3jYBkv.js → app-server-policy-BSaO2JIT.js} +1 -1
  2. package/dist/{attempt-notifications-DdmnBMUp.js → attempt-notifications-AP-a-Q5k.js} +1 -1
  3. package/dist/{bounded-turn-CaQL96kg.js → bounded-turn-D2ZAgZVz.js} +54 -24
  4. package/dist/{capabilities-CLICvTxf.js → capabilities-BFDTVYr4.js} +1 -1
  5. package/dist/cli-metadata.js +1 -1
  6. package/dist/{command-formatters-DgADqnHa.js → command-formatters-C336eRVS.js} +2 -2
  7. package/dist/{command-handlers-l_lVPNlB.js → command-handlers-DAHUSry9.js} +1233 -1222
  8. package/dist/{compact-CC5KhBzX.js → compact-D_uvHurS.js} +8 -8
  9. package/dist/{computer-use-Ip1-QGa-.js → computer-use-CYEc8U3w.js} +123 -115
  10. package/dist/{conversation-control-sNPsbTCP.js → conversation-control-xsIeXbo4.js} +6 -6
  11. package/dist/doctor-contract-api.js +24 -86
  12. package/dist/{dynamic-tools-CQI3UwqY.js → dynamic-tools-D2gYkSBO.js} +482 -91
  13. package/dist/effective-mcp-catalog-Bbd98Inw.js +114 -0
  14. package/dist/{event-projector-usage-D6tE7_qD.js → event-projector-usage-Xp4AlR2k.js} +20 -3
  15. package/dist/harness.js +19 -14
  16. package/dist/index.js +292 -328
  17. package/dist/media-understanding-provider.js +6 -1
  18. package/dist/{models-BNeMlHgg.js → models-BBMKU4jA.js} +2 -2
  19. package/dist/{notification-correlation-BGLixv5_.js → notification-correlation-CU6_AnOb.js} +3 -3
  20. package/dist/{plugin-app-cache-key-CvzvmBRz.js → plugin-app-cache-key-DztPafOA.js} +135 -42
  21. package/dist/{rate-limits-D0IJT-a6.js → rate-limits-CU-gVCCS.js} +1 -1
  22. package/dist/{request-BTccUTD3.js → request-qKh331yu.js} +3 -3
  23. package/dist/{run-attempt--858NXDl.js → run-attempt-CY9WlDLc.js} +1060 -402
  24. package/dist/{runtime-artifact-C2ITXdhM.js → runtime-artifact-CmtG_t1L.js} +90 -24
  25. package/dist/{sandbox-guard-D1Wky__S.js → sandbox-guard-NuhpXmPB.js} +4 -0
  26. package/dist/{session-binding-ZSMX1omP.js → session-binding-BXpo9ymA.js} +1006 -891
  27. package/dist/{session-catalog-DsKaezgR.js → session-catalog-DyOgR4WH.js} +289 -56
  28. package/dist/{session-cli-CYJTfRLG.js → session-cli-2PZaFLRh.js} +2 -2
  29. package/dist/{session-upstream-marker-D7XlI9us.js → session-upstream-marker-B6U7tLw5.js} +1 -1
  30. package/dist/{settled-turn-finalizer-DHltNgtF.js → settled-turn-finalizer-CXY2Z9dT.js} +19 -6
  31. package/dist/{shared-client-wmgNFNYp.js → shared-client-DTbvH-XV.js} +1993 -1720
  32. package/dist/{side-question-BfFZCsJ-.js → side-question-_ulBk1AL.js} +12 -10
  33. package/dist/{thread-lifecycle-cqrOlJkq.js → thread-lifecycle-DF53ogiA.js} +980 -346
  34. package/dist/{transcript-mirror-2p7kl6e4.js → transcript-mirror-DzsdNCf5.js} +80 -41
  35. package/dist/{upstream-session-fork-vPjwkT1i.js → upstream-session-fork-Dy4Xvuoj.js} +3 -3
  36. package/dist/{usage-DM_I3mPT.js → usage-CQ6GhD5-.js} +3 -3
  37. package/dist/{web-search-provider.runtime-Bx6HAc_k.js → web-search-provider.runtime-CCFhg2z5.js} +3 -3
  38. package/package.json +6 -8
  39. package/npm-shrinkwrap.json +0 -202
  40. package/dist/{auth-binding-C1czuHPA.js → auth-binding-B4FfbcCg.js} +1 -1
@@ -28,6 +28,32 @@ const RUNTIME_INJECTION_ENV_KEYS = /* @__PURE__ */ new Set([
28
28
  "DYLD_INSERT_LIBRARIES",
29
29
  "DYLD_LIBRARY_PATH"
30
30
  ]);
31
+ const SAFE_NODE_OPTIONS_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
32
+ "--enable-network-family-autoselection",
33
+ "--network-family-autoselection",
34
+ "--no-deprecation",
35
+ "--no-network-family-autoselection",
36
+ "--no-warnings",
37
+ "--pending-deprecation",
38
+ "--throw-deprecation",
39
+ "--trace-deprecation",
40
+ "--trace-warnings",
41
+ "--use-bundled-ca",
42
+ "--use-env-proxy",
43
+ "--use-openssl-ca",
44
+ "--use-system-ca"
45
+ ]);
46
+ const SAFE_NODE_OPTIONS_NUMERIC_FLAGS = /* @__PURE__ */ new Set([
47
+ "--max-old-space-size",
48
+ "--max-semi-space-size",
49
+ "--network-family-autoselection-attempt-timeout",
50
+ "--stack-trace-limit"
51
+ ]);
52
+ const SAFE_NODE_OPTIONS_DNS_RESULT_ORDERS = /* @__PURE__ */ new Set([
53
+ "ipv4first",
54
+ "ipv6first",
55
+ "verbatim"
56
+ ]);
31
57
  const ARTIFACT_BINDINGS_SYMBOL = Symbol.for("openclaw.codexAppServerRuntimeArtifactBindings");
32
58
  function getRuntimeArtifactBindings() {
33
59
  const globalState = globalThis;
@@ -116,40 +142,80 @@ function assertNoRuntimeInjectionEnvironment(env) {
116
142
  for (const [rawKey, value] of Object.entries(env)) {
117
143
  const key = rawKey.toUpperCase();
118
144
  if (!value?.trim()) continue;
119
- if (key === "NODE_OPTIONS" && isSafeNodeOptions(value)) continue;
120
- if (key === "NODE_OPTIONS") throw new Error(`Codex runtime artifact cannot attest injected runtime environment: ${key}`);
145
+ if (key === "NODE_OPTIONS") {
146
+ const result = attestNodeOptions(value);
147
+ if (result.ok) continue;
148
+ if (result.option) throw new Error(`Codex runtime artifact cannot attest NODE_OPTIONS option ${result.option}`);
149
+ throw new Error("Codex runtime artifact cannot safely parse NODE_OPTIONS");
150
+ }
121
151
  if (RUNTIME_INJECTION_ENV_KEYS.has(key) || key.startsWith("DYLD_")) throw new Error(`Codex runtime artifact cannot attest injected runtime environment: ${key}`);
122
152
  }
123
153
  }
124
- function isSafeNodeOptions(value) {
125
- const tokens = value.trim().split(/\s+/u);
126
- const valueFlags = /* @__PURE__ */ new Set([
127
- "--max-old-space-size",
128
- "--max_old_space_size",
129
- "--max-semi-space-size",
130
- "--max_semi_space_size",
131
- "--stack-trace-limit"
132
- ]);
133
- const booleanFlags = /* @__PURE__ */ new Set([
134
- "--no-deprecation",
135
- "--no-warnings",
136
- "--pending-deprecation",
137
- "--throw-deprecation",
138
- "--trace-deprecation",
139
- "--trace-warnings"
140
- ]);
154
+ function parseNodeOptions(value) {
155
+ const tokens = [];
156
+ let inQuotes = false;
157
+ let startsNewToken = true;
158
+ for (let index = 0; index < value.length; index += 1) {
159
+ let character = value[index];
160
+ if (character === "\\" && inQuotes) {
161
+ index += 1;
162
+ if (index >= value.length) return;
163
+ character = value[index];
164
+ } else if (character === " " && !inQuotes) {
165
+ startsNewToken = true;
166
+ continue;
167
+ } else if (character === "\"") {
168
+ inQuotes = !inQuotes;
169
+ continue;
170
+ }
171
+ if (startsNewToken) {
172
+ tokens.push(character);
173
+ startsNewToken = false;
174
+ } else tokens[tokens.length - 1] += character;
175
+ }
176
+ return inQuotes ? void 0 : tokens;
177
+ }
178
+ function normalizedNodeOptionName(token) {
179
+ const equalsIndex = token.indexOf("=");
180
+ const name = (equalsIndex === -1 ? token : token.slice(0, equalsIndex)).replaceAll("_", "-");
181
+ return /^--[a-z][a-z0-9-]{0,63}$/u.test(name) ? name : void 0;
182
+ }
183
+ function attestNodeOptions(value) {
184
+ const tokens = parseNodeOptions(value);
185
+ if (!tokens || tokens.length === 0) return { ok: false };
141
186
  for (let index = 0; index < tokens.length; index += 1) {
142
187
  const token = tokens[index];
143
- if (booleanFlags.has(token)) continue;
144
188
  const equalsIndex = token.indexOf("=");
145
- const flag = equalsIndex === -1 ? token : token.slice(0, equalsIndex);
189
+ const flag = normalizedNodeOptionName(token);
190
+ if (!flag) return { ok: false };
146
191
  const inlineValue = equalsIndex === -1 ? void 0 : token.slice(equalsIndex + 1);
192
+ if (SAFE_NODE_OPTIONS_BOOLEAN_FLAGS.has(flag)) {
193
+ if (inlineValue === void 0) continue;
194
+ return {
195
+ ok: false,
196
+ option: flag
197
+ };
198
+ }
147
199
  if (flag === "--disable-warning" && inlineValue && /^[A-Za-z][A-Za-z0-9_.:-]{0,63}$/u.test(inlineValue)) continue;
148
- if (!valueFlags.has(flag)) return false;
200
+ if (flag === "--dns-result-order") {
201
+ const order = inlineValue ?? tokens[++index];
202
+ if (order && SAFE_NODE_OPTIONS_DNS_RESULT_ORDERS.has(order)) continue;
203
+ return {
204
+ ok: false,
205
+ option: flag
206
+ };
207
+ }
208
+ if (!SAFE_NODE_OPTIONS_NUMERIC_FLAGS.has(flag)) return {
209
+ ok: false,
210
+ option: flag
211
+ };
149
212
  const numericValue = inlineValue ?? tokens[++index];
150
- if (!numericValue || !/^\d+$/u.test(numericValue)) return false;
213
+ if (!numericValue || !/^\d+$/u.test(numericValue)) return {
214
+ ok: false,
215
+ option: flag
216
+ };
151
217
  }
152
- return tokens.length > 0;
218
+ return { ok: true };
153
219
  }
154
220
  async function hashSelectedArtifactFiles(descriptor, signal) {
155
221
  throwIfAborted(signal);
@@ -142,7 +142,10 @@ function readRuntimeSessionEntryBestEffort(params) {
142
142
  const DIRECT_METHOD_POLICIES = /* @__PURE__ */ new Map([
143
143
  ["account/rateLimits/read", "allowed-control-plane"],
144
144
  ["account/read", "allowed-control-plane"],
145
+ ["app/installed", "allowed-control-plane"],
145
146
  ["app/list", "allowed-control-plane"],
147
+ ["app/read", "allowed-control-plane"],
148
+ ["config/batchWrite", "allowed-control-plane"],
146
149
  ["config/mcpServer/reload", "allowed-control-plane"],
147
150
  ["config/read", "allowed-control-plane"],
148
151
  ["config/value/write", "allowed-control-plane"],
@@ -155,6 +158,7 @@ const DIRECT_METHOD_POLICIES = /* @__PURE__ */ new Map([
155
158
  ["mcpServerStatus/list", "allowed-control-plane"],
156
159
  ["model/list", "allowed-control-plane"],
157
160
  ["plugin/install", "allowed-control-plane"],
161
+ ["plugin/installed", "allowed-control-plane"],
158
162
  ["plugin/list", "allowed-control-plane"],
159
163
  ["plugin/read", "allowed-control-plane"],
160
164
  ["skills/list", "allowed-control-plane"],