@openclaw/codex 2026.7.2-beta.1 → 2026.7.2-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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/{app-server-policy-DVcxdse_.js → app-server-policy-Scc-Wevo.js} +1 -1
  3. package/dist/{attempt-notifications-DEv9h7iC.js → attempt-notifications-BFmNhqFl.js} +3 -6
  4. package/dist/cli-metadata.js +1 -1
  5. package/dist/{command-formatters-D6ZlGNmb.js → command-formatters-Dq9InZUK.js} +34 -3
  6. package/dist/{command-handlers-Cpl9fUWv.js → command-handlers-IgqmL_kv.js} +10 -13
  7. package/dist/{compact-FnJmiPNA.js → compact-DCTmg3id.js} +4 -5
  8. package/dist/{computer-use-DVzr8OP1.js → computer-use-CPcU8TjG.js} +4 -4
  9. package/dist/{conversation-control-DtQ-E7mr.js → conversation-control-CGkBlfc5.js} +5 -7
  10. package/dist/doctor-contract-api.js +1 -1
  11. package/dist/{dynamic-tools-BMLoaTeG.js → dynamic-tools-C_1tEs34.js} +608 -330
  12. package/dist/harness.js +9 -5
  13. package/dist/index.js +52 -31
  14. package/dist/{media-understanding-provider-D580L0P8.js → media-understanding-provider-D31dOJwb.js} +11 -12
  15. package/dist/media-understanding-provider.js +1 -1
  16. package/dist/{models-DuKzZA6G.js → models-uh26C8QU.js} +5 -9
  17. package/dist/{notification-correlation-DfaCm0mx.js → notification-correlation-KmfV4EkP.js} +3 -3
  18. package/dist/{plugin-app-cache-key-BKNjHMEs.js → plugin-app-cache-key-Ceb-lm2c.js} +2 -2
  19. package/dist/{rate-limits-Dhp04Rqo.js → rate-limits-DyXaYAxU.js} +7 -6
  20. package/dist/{request-DborTWgw.js → request-B_oQsCXy.js} +54 -8
  21. package/dist/{run-attempt-VPVJoYDP.js → run-attempt-MLzoMe_m.js} +499 -295
  22. package/dist/{config-c48K5HP9.js → session-binding-h1mmCGnl.js} +786 -3
  23. package/dist/{session-catalog-7H112Tr_.js → session-catalog-CEvoXWHA.js} +45 -29
  24. package/dist/{session-cli-B28RhCyp.js → session-cli-XsEuWb_C.js} +1 -1
  25. package/dist/{shared-client-D4mFI9al.js → shared-client-JiAnW6pc.js} +255 -81
  26. package/dist/{side-question-CgJBz52s.js → side-question-DqDvIwSU.js} +15 -13
  27. package/dist/{thread-lifecycle-BgLXzjvV.js → thread-lifecycle-CN_pPtPh.js} +1787 -1579
  28. package/dist/{protocol-validators-dZQ-UTOa.js → transcript-mirror-D9rTxx2P.js} +485 -2
  29. package/dist/usage-D5Rohxoc.js +25 -0
  30. package/dist/{web-search-provider.runtime-Bs-eTn5U.js → web-search-provider.runtime-CKVBn3fP.js} +3 -3
  31. package/npm-shrinkwrap.json +30 -30
  32. package/openclaw.plugin.json +10 -5
  33. package/package.json +6 -6
  34. package/dist/capabilities-42Dfn2TV.js +0 -33
  35. package/dist/prompt-overlay.js +0 -15
  36. package/dist/protocol-BMifTfdW.js +0 -15
  37. package/dist/provider-catalog.js +0 -118
  38. package/dist/provider-discovery.js +0 -34
  39. package/dist/provider.js +0 -307
  40. package/dist/session-binding-BMfX1OX-.js +0 -786
  41. package/dist/transcript-mirror-DhLwFIL4.js +0 -485
@@ -1,14 +1,11 @@
1
- import { i as isJsonObject, t as CODEX_INTERACTIVE_THREAD_SOURCE_KINDS } from "./protocol-BMifTfdW.js";
2
- import { f as resolveCodexAppServerRuntimeOptions, v as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-c48K5HP9.js";
3
- import { n as listCodexAppServerModels } from "./models-DuKzZA6G.js";
4
- import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BKNjHMEs.js";
5
- import { O as CodexAppServerRpcError, a as getLeasedSharedCodexAppServerClient, c as releaseLeasedSharedCodexAppServerClient } from "./shared-client-D4mFI9al.js";
6
- import { c as sessionBindingIdentity, s as reclaimCurrentCodexSessionGeneration } from "./session-binding-BMfX1OX-.js";
7
- import { r as importCodexThreadHistoryToTranscript } from "./transcript-mirror-DhLwFIL4.js";
8
- import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-42Dfn2TV.js";
9
- import { r as formatCodexDisplayText } from "./command-formatters-D6ZlGNmb.js";
1
+ import { J as CODEX_INTERACTIVE_THREAD_SOURCE_KINDS, R as CodexAppServerRpcError, Z as isJsonObject, a as getLeasedSharedCodexAppServerClient, c as releaseLeasedSharedCodexAppServerClient, q as CODEX_INTERACTIVE_CUSTOM_THREAD_SOURCES } from "./shared-client-JiAnW6pc.js";
2
+ import { E as resolveCodexSupervisionAppServerRuntimeOptions, b as resolveCodexAppServerRuntimeOptions, c as sessionBindingIdentity, s as reclaimCurrentCodexSessionGeneration } from "./session-binding-h1mmCGnl.js";
3
+ import { r as importCodexThreadHistoryToTranscript } from "./transcript-mirror-D9rTxx2P.js";
4
+ import { n as listCodexAppServerModels } from "./models-uh26C8QU.js";
5
+ import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Ceb-lm2c.js";
6
+ import { d as CODEX_CONTROL_METHODS, f as describeControlFailure, r as formatCodexDisplayText } from "./command-formatters-Dq9InZUK.js";
10
7
  import { n as createCodexCliNodeConversationBindingData } from "./conversation-binding-data-BHRpYbX3.js";
11
- import { n as requestCodexAppServerJson, t as requestCodexAppServerClientJson } from "./request-DborTWgw.js";
8
+ import { n as requestCodexAppServerClientJson, r as requestCodexAppServerJson } from "./request-B_oQsCXy.js";
12
9
  import fs from "node:fs/promises";
13
10
  import path from "node:path";
14
11
  import { timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
@@ -24,7 +21,7 @@ import { spawn } from "node:child_process";
24
21
  import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
25
22
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
26
23
  import process$1 from "node:process";
27
- import { decodeNodePtyResumeParams, resolveExecutableFromPathEnv, runNodePtyCommand } from "openclaw/plugin-sdk/node-host";
24
+ import { decodeNodePtyResumeParams, resolveNodeHostExecutable, runNodePtyCommand } from "openclaw/plugin-sdk/node-host";
28
25
  //#region extensions/codex/src/node-cli-sessions.ts
29
26
  const CODEX_CLI_SESSIONS_LIST_COMMAND = "codex.cli.sessions.list";
30
27
  const CODEX_CLI_SESSION_RESUME_COMMAND = "codex.cli.session.resume";
@@ -644,12 +641,16 @@ function boundedCatalogString(value, maxLength, overflow = "omit") {
644
641
  if (normalized.length <= maxLength) return normalized;
645
642
  return overflow === "truncate" ? truncateUtf16Safe(normalized, maxLength) : void 0;
646
643
  }
644
+ function normalizeInteractiveThreadSource(source) {
645
+ if (CODEX_INTERACTIVE_THREAD_SOURCE_KINDS.some((kind) => kind === source) || CODEX_INTERACTIVE_CUSTOM_THREAD_SOURCES.some((kind) => kind === source)) return source;
646
+ if (isRecord(source) && CODEX_INTERACTIVE_CUSTOM_THREAD_SOURCES.some((kind) => kind === source.custom)) return source.custom;
647
+ }
647
648
  function isInteractiveThreadSource(source) {
648
- return CODEX_INTERACTIVE_THREAD_SOURCE_KINDS.some((kind) => kind === source);
649
+ return normalizeInteractiveThreadSource(source) !== void 0;
649
650
  }
650
651
  function toCatalogSession(thread, archived) {
651
- const source = thread.source;
652
- if (!isInteractiveThreadSource(source)) return;
652
+ const source = normalizeInteractiveThreadSource(thread.source);
653
+ if (!source) return;
653
654
  const record = thread;
654
655
  const threadId = boundedCatalogString(thread.id, 256);
655
656
  if (!threadId) return;
@@ -1159,7 +1160,7 @@ async function resolveNodeCodexRecord(params) {
1159
1160
  }
1160
1161
  function requireContinuableNodeRecord(record) {
1161
1162
  if (record.archived) throw new CatalogParamsError("Codex session is archived on the paired node");
1162
- if (!isInteractiveThreadSource(record.source)) throw new CatalogParamsError("Codex session is not a non-archived interactive CLI or VS Code session");
1163
+ if (!isInteractiveThreadSource(record.source)) throw new CatalogParamsError("Codex session is not a non-archived interactive Codex session");
1163
1164
  if (record.status === "idle" || record.status === "notLoaded") return;
1164
1165
  if (record.status === "active") throw new CatalogParamsError("Codex session is active on the paired node; wait for it to finish before continuing");
1165
1166
  throw new CatalogParamsError("Codex session cannot be continued in its current state");
@@ -1268,8 +1269,15 @@ async function continueNodeCodexSession(params) {
1268
1269
  //#endregion
1269
1270
  //#region extensions/codex/src/session-catalog-terminal.ts
1270
1271
  const CODEX_TERMINAL_RESUME_COMMAND = "codex.terminal.resume.v1";
1271
- function resolveLocalCodexTerminalExecutable(pathEnv = process.env.PATH ?? "") {
1272
- return resolveExecutableFromPathEnv("codex", pathEnv);
1272
+ function resolveLocalCodexTerminalExecutable(env = process.env) {
1273
+ return resolveLocalCodexTerminalResolution(env)?.executable;
1274
+ }
1275
+ function resolveLocalCodexTerminalResolution(env = process.env) {
1276
+ return resolveNodeHostExecutable("codex", {
1277
+ env,
1278
+ pathEnv: env.PATH ?? env.Path ?? "",
1279
+ strategy: "fallback"
1280
+ });
1273
1281
  }
1274
1282
  function codexNodeTerminalCapability(node) {
1275
1283
  const commands = node.invocableCommands ?? node.commands;
@@ -1285,11 +1293,11 @@ async function requireCatalogEligibleThread(control, threadId) {
1285
1293
  });
1286
1294
  const candidate = page.sessions.find((session) => session.threadId === threadId);
1287
1295
  if (candidate) {
1288
- if (candidate.source === "cli" || candidate.source === "vscode") return candidate;
1289
- throw new CatalogParamsError("Codex session is not a non-archived interactive CLI or VS Code session");
1296
+ if (isInteractiveThreadSource(candidate.source)) return candidate;
1297
+ throw new CatalogParamsError("Codex session is not a non-archived interactive Codex session");
1290
1298
  }
1291
1299
  const nextCursor = page.nextCursor?.trim();
1292
- if (!nextCursor) throw new CatalogParamsError("Codex session is not a non-archived interactive CLI or VS Code session");
1300
+ if (!nextCursor) throw new CatalogParamsError("Codex session is not a non-archived interactive Codex session");
1293
1301
  if (seenCursors.has(nextCursor)) throw new CatalogParamsError("Codex session eligibility could not be verified");
1294
1302
  seenCursors.add(nextCursor);
1295
1303
  cursor = nextCursor;
@@ -1302,7 +1310,11 @@ function createCodexTerminalNodeHostCommand(control) {
1302
1310
  cap: CODEX_APP_SERVER_THREADS_CAPABILITY,
1303
1311
  dangerous: false,
1304
1312
  duplex: true,
1305
- isAvailable: ({ env }) => Boolean(resolveExecutableFromPathEnv("codex", env.PATH ?? "")),
1313
+ isAvailable: ({ env }) => Boolean(resolveNodeHostExecutable("codex", {
1314
+ env,
1315
+ pathEnv: env.PATH ?? env.Path ?? "",
1316
+ strategy: "direct"
1317
+ })),
1306
1318
  handle: async (paramsJSON, io) => {
1307
1319
  if (!io) throw new Error("Codex terminal command requires duplex transport");
1308
1320
  const resume = decodeNodePtyResumeParams(paramsJSON, (value) => {
@@ -1310,10 +1322,14 @@ function createCodexTerminalNodeHostCommand(control) {
1310
1322
  return value;
1311
1323
  });
1312
1324
  const record = await requireCatalogEligibleThread(control, resume.threadId);
1313
- const file = resolveExecutableFromPathEnv("codex", process.env.PATH ?? "");
1314
- if (!file) throw new Error("Codex CLI is unavailable");
1325
+ const resolution = resolveNodeHostExecutable("codex", {
1326
+ env: process.env,
1327
+ pathEnv: process.env.PATH ?? process.env.Path ?? "",
1328
+ strategy: "direct"
1329
+ });
1330
+ if (!resolution) throw new Error("Codex CLI is unavailable");
1315
1331
  return JSON.stringify(await runNodePtyCommand({
1316
- file,
1332
+ file: resolution.executable,
1317
1333
  args: ["resume", resume.threadId],
1318
1334
  cwd: record.cwd,
1319
1335
  cols: resume.cols,
@@ -1347,22 +1363,23 @@ async function resolveNodeCatalogEligibleThread(params) {
1347
1363
  seenCursors.add(nextCursor);
1348
1364
  cursor = nextCursor;
1349
1365
  }
1350
- throw new CatalogParamsError("Codex session is not a non-archived interactive CLI or VS Code session");
1366
+ throw new CatalogParamsError("Codex session is not a non-archived interactive Codex session");
1351
1367
  }
1352
1368
  async function openCodexCatalogTerminal(params) {
1353
1369
  const title = `codex resume ${params.threadId.slice(0, 8)}…`;
1354
1370
  if (params.hostId === "gateway:local") {
1355
1371
  const record = await requireCatalogEligibleThread(params.control, params.threadId);
1356
- const executable = resolveLocalCodexTerminalExecutable();
1357
- if (!executable) throw new CatalogParamsError("Codex CLI is unavailable");
1372
+ const resolution = resolveLocalCodexTerminalResolution();
1373
+ if (!resolution) throw new CatalogParamsError("Codex CLI is unavailable");
1358
1374
  return {
1359
1375
  kind: "local",
1360
1376
  argv: [
1361
- executable,
1377
+ resolution.executable,
1362
1378
  "resume",
1363
1379
  params.threadId
1364
1380
  ],
1365
1381
  ...record.cwd ? { cwd: record.cwd } : {},
1382
+ ...resolution.pathEnv ? { pathEnv: resolution.pathEnv } : {},
1366
1383
  title
1367
1384
  };
1368
1385
  }
@@ -1617,7 +1634,6 @@ function createCodexSessionCatalogControlFromRequests(params) {
1617
1634
  modelProviders: [],
1618
1635
  sortKey: "recency_at",
1619
1636
  sortDirection: "desc",
1620
- sourceKinds: [...CODEX_INTERACTIVE_THREAD_SOURCE_KINDS],
1621
1637
  ...cwd ? { cwd } : {},
1622
1638
  ...cursor ? { cursor } : {}
1623
1639
  }, remainingTimeoutMs);
@@ -1,4 +1,4 @@
1
- import { a as CODEX_LOCAL_SESSION_HOST_ID } from "./session-catalog-7H112Tr_.js";
1
+ import { a as CODEX_LOCAL_SESSION_HOST_ID } from "./session-catalog-CEvoXWHA.js";
2
2
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
3
3
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { addGatewayClientOptions, callGatewayFromCli } from "openclaw/plugin-sdk/gateway-runtime";