@openclaw/codex 2026.9.3 → 2026.9.4

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 (97) hide show
  1. package/dist/api.js +26 -18
  2. package/dist/{apply-B6el6hdO.js → apply-CvT8tW5i.js} +11 -12
  3. package/dist/{attempt-client-cleanup-D6cR54TV.js → attempt-client-cleanup-DKHzbwt5.js} +8 -204
  4. package/dist/{attempt-context-AO4DSjE0.js → attempt-context-D44yeDII.js} +3 -3
  5. package/dist/{attempt-notifications--H8zXR5-.js → attempt-notifications-C9XufG6l.js} +1 -1
  6. package/dist/{auth-binding-Co2Vfcf_.js → auth-binding-CWlKVccJ.js} +1 -1
  7. package/dist/{auth-cache-key-Kq6oerr6.js → auth-cache-key-7orQae_j.js} +2 -2
  8. package/dist/{binding-connection-QqgcPCgk.js → binding-connection-D3udKbIE.js} +3 -3
  9. package/dist/{bounded-turn-lRpmZHFv.js → bounded-turn-C_Hneydj.js} +12 -12
  10. package/dist/{build-state-6RL6qohz.js → build-state-BCmg9-5p.js} +1 -1
  11. package/dist/{capabilities-BeqLPbtM.js → capabilities-8vx68WLH.js} +1 -1
  12. package/dist/cli-metadata.js +1 -1
  13. package/dist/{client-BEKu4yDx.js → client-B57KWPQx.js} +27 -5
  14. package/dist/{command-dispatch-CisT9Jqq.js → command-dispatch-BpduNGVf.js} +3 -3
  15. package/dist/{command-formatters-DeTfrapr.js → command-formatters-lxlkNZgU.js} +4 -3
  16. package/dist/{command-handlers-BfIsJEuA.js → command-handlers-tiL9iWj7.js} +783 -140
  17. package/dist/{command-rpc-BMqRQOFX.js → command-rpc-CR5EOEZX.js} +26 -19
  18. package/dist/{compact-CGJZ2rlb.js → compact-B_H3AOd7.js} +14 -14
  19. package/dist/{config-JDfTI4VI.js → config-oIORaQ5T.js} +4 -4
  20. package/dist/{config-options-jnIFvwxD.js → config-options-CXMq1T-C.js} +5 -5
  21. package/dist/{config-runtime-BWf6JLWG.js → config-runtime-D0zGNIHu.js} +1 -1
  22. package/dist/{config-utils-C57JiJrU.js → config-utils-DujwEnhg.js} +2 -4
  23. package/dist/{conversation-binding-CxOlHiix.js → conversation-binding-DsB4-O7U.js} +53 -42
  24. package/dist/{conversation-control-CUCrSIQI.js → conversation-control-CtUu1b3m.js} +8 -8
  25. package/dist/doctor-contract-api.js +1 -1
  26. package/dist/{dynamic-tools-D-JBoaLt.js → dynamic-tools-CmN5RAip.js} +76 -15
  27. package/dist/{effective-mcp-catalog-J_5Ep5Um.js → effective-mcp-catalog-Bd73bqA8.js} +3 -3
  28. package/dist/{ephemeral-turn-DSwzP8YY.js → ephemeral-turn-D78_VmzO.js} +5 -5
  29. package/dist/event-projector-items-5VhsECCO.js +200 -0
  30. package/dist/{event-projector-usage-CIyrYYid.js → event-projector-usage-BfXmpOec.js} +1 -1
  31. package/dist/{harness-FR6eQgyO.js → harness-C7rRa7bm.js} +33 -16
  32. package/dist/harness.js +1 -1
  33. package/dist/index.js +39 -84
  34. package/dist/inference-context-Dr_mzvk4.js +94 -0
  35. package/dist/inference-proxy-HGXKUIre.js +311 -0
  36. package/dist/{isolated-completion-DHBefrzg.js → isolated-completion-DWVb5U2J.js} +6 -6
  37. package/dist/{managed-binary-DrjjRRUD.js → managed-binary-D22rNEcR.js} +10 -1
  38. package/dist/media-understanding-provider.js +2 -2
  39. package/dist/migration-provider-api.js +2 -0
  40. package/dist/{model-catalog-B_6M04Wo.js → model-catalog-Dq2n8f_p.js} +6 -6
  41. package/dist/{models-P9k2qAof.js → models-PCKOim-h.js} +3 -3
  42. package/dist/native-subagent-history-DjtPloaU.js +140 -0
  43. package/dist/native-subagent-history-owner-Pcp7JuVF.js +34 -0
  44. package/dist/{native-subagent-monitor-BbCUKRwC.js → native-subagent-monitor-fQ7eIXEf.js} +52 -424
  45. package/dist/native-subagent-task-ids-BzTdT0Uw.js +387 -0
  46. package/dist/{node-cli-sessions-rj0ysJwM.js → node-cli-sessions-DKaOmVUh.js} +1 -1
  47. package/dist/{node-exec-server.runtime-BY_ctYnT.js → node-exec-server.runtime-Cl2vapEi.js} +3 -3
  48. package/dist/{plan-BMJdMOEF.js → plan-7uG-Fp36.js} +288 -52
  49. package/dist/{plugin-activation-BQK-f5sV.js → plugin-activation-BYQculil.js} +24 -19
  50. package/dist/{plugin-app-cache-key-CdSQzWyX.js → plugin-app-cache-key-d0eKxy7b.js} +1 -1
  51. package/dist/{plugin-approval-roundtrip-DeW95wB5.js → plugin-approval-roundtrip-Bz3FT8W5.js} +1 -1
  52. package/dist/{plugin-inventory-CoRCzWW4.js → plugin-inventory-oL4Na1ZG.js} +7 -4
  53. package/dist/{plugin-marketplace-discovery-3akBizzF.js → plugin-marketplace-discovery-P-Vndfqq.js} +18 -15
  54. package/dist/{plugin-metadata-cache-DgNfRAGA.js → plugin-metadata-cache-ClPJpRio.js} +13 -9
  55. package/dist/{protocol-CAAcVIKF.js → protocol-5bh1G-H7.js} +1 -1
  56. package/dist/provider-MQ8PVkuE.js +50 -0
  57. package/dist/{provider-capabilities-W4tfK5Y5.js → provider-capabilities-BvCUL69A.js} +2 -2
  58. package/dist/{rate-limits-Bqnx1N4z.js → rate-limits-CBMmWBr9.js} +1 -1
  59. package/dist/{request-CGvGOpeR.js → request-B7hEkBGq.js} +72 -58
  60. package/dist/rpc-error-ttN_QjEm.js +30 -0
  61. package/dist/{run-attempt-DwKds3DN.js → run-attempt-CvsAAGa0.js} +108 -37
  62. package/dist/{runtime-artifact-T-NwqeSH.js → runtime-artifact-BJ0rXBZ_.js} +1 -1
  63. package/dist/{sandbox-guard-BcT66fWy.js → sandbox-guard-BxgyoM8M.js} +2 -1
  64. package/dist/{session-binding-CKSepwIC.js → session-binding-CI8UuilT.js} +3 -3
  65. package/dist/{session-binding-record-CaZjYwNS.js → session-binding-record-Bcvslnhf.js} +1 -1
  66. package/dist/{session-catalog-adoption-BKLtSrwi.js → session-catalog-adoption-tcZi1IfX.js} +5 -5
  67. package/dist/{session-catalog-archive-D0i2pGj2.js → session-catalog-archive-CwKg8Xz2.js} +6 -6
  68. package/dist/{session-catalog-HaDcp7Sv.js → session-catalog-ct-AH01I.js} +31 -87
  69. package/dist/session-catalog-home-id-CwhLdC03.js +18 -0
  70. package/dist/{session-catalog-node-adoption-BUuDYY8R.js → session-catalog-node-adoption-B1tgDW-m.js} +2 -2
  71. package/dist/{session-catalog-node-continue-CBtc4wkI.js → session-catalog-node-continue-Ci-DXyJP.js} +4 -4
  72. package/dist/{session-catalog-provenance-DkJHo735.js → session-catalog-provenance-D-dIfRAH.js} +2 -30
  73. package/dist/{session-cli-CbgaHh0f.js → session-cli-DNN_jhGc.js} +2 -2
  74. package/dist/{session-history-import-DFN7sWRU.js → session-history-import-DwyijFI6.js} +4 -4
  75. package/dist/session-history-worker-runtime.js +1 -1
  76. package/dist/{session-history.worker-CNEvGaU5.js → session-history.worker-BeK1YOyT.js} +187 -83
  77. package/dist/session-history.worker.js +1 -1
  78. package/dist/{session-initialization-Jo86C60I.js → session-initialization-Ct0_Hzmg.js} +2 -2
  79. package/dist/{session-permission-policy-B22InTp_.js → session-permission-policy-BBmXA8Eg.js} +2 -2
  80. package/dist/{session-retirement-BSNG_mhf.js → session-retirement-B2YfbAAT.js} +5 -5
  81. package/dist/{settled-turn-finalizer-BuLUrZl2.js → settled-turn-finalizer-Dn91stmc.js} +5 -5
  82. package/dist/{shared-client-CVhez2Uo.js → shared-client-CscigXXL.js} +228 -30
  83. package/dist/{side-question-DLbr2vUU.js → side-question-BGMJQf4U.js} +18 -18
  84. package/dist/{source-Da-h6f7e.js → source-CElXU0Oy.js} +12 -12
  85. package/dist/{thread-archive-guard-D1bP04Tf.js → thread-archive-guard-DfpBr-Sz.js} +1 -1
  86. package/dist/{session-catalog-parsing-CdD3JhdM.js → thread-history-page-D0JIp48V.js} +83 -2
  87. package/dist/{thread-lifecycle-D1pzRwHB.js → thread-lifecycle-DXl1-I6b.js} +96 -44
  88. package/dist/{thread-ownership-D6oASVRu.js → thread-ownership-BsDRTsyp.js} +2 -2
  89. package/dist/{thread-policy-D8kI7yAO.js → thread-policy-BuEQfE0g.js} +3 -3
  90. package/dist/{thread-resume-T5cveyxA.js → thread-resume-DsDOZpFg.js} +5 -5
  91. package/dist/{session-catalog-home-id-D7-aLiNt.js → transcript-history-projection-v17wXgdK.js} +66 -18
  92. package/dist/{transcript-mirror-t5TOccct.js → transcript-mirror-C5CKgNy6.js} +1 -1
  93. package/dist/{upstream-session-fork-De-sLJ2r.js → upstream-session-fork-BZerMte_.js} +20 -20
  94. package/dist/{usage-CPPTmBvZ.js → usage-tCk-mg_x.js} +4 -4
  95. package/dist/{web-search-provider.runtime-CSVgQL0w.js → web-search-provider.runtime-B7bGbGWq.js} +3 -3
  96. package/openclaw.plugin.json +1 -0
  97. package/package.json +4 -4
package/dist/api.js CHANGED
@@ -1,24 +1,22 @@
1
- import { a as resolveCodexAppServerStartOptionsForAgent } from "./config-options-jnIFvwxD.js";
2
- import { n as resolveManagedCodexAppServerStartOptions, r as resolveManagedCodexNativeCommand, t as isManagedCodexDesktopCommand } from "./managed-binary-DrjjRRUD.js";
1
+ import { a as resolveCodexAppServerStartOptionsForAgent } from "./config-options-CXMq1T-C.js";
2
+ import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand } from "./managed-binary-D22rNEcR.js";
3
3
  import { t as CODEX_APP_SERVER_VERSION } from "./version-omm6IPI3.js";
4
- import "./config-JDfTI4VI.js";
5
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
4
+ import "./config-oIORaQ5T.js";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
6
6
  import { listAgentIds, resolveAgentDir } from "openclaw/plugin-sdk/agent-scope-runtime";
7
+ import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
7
8
  import path from "node:path";
8
- import { execFile } from "node:child_process";
9
9
  import { fileURLToPath } from "node:url";
10
- import { promisify } from "node:util";
11
10
  import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
12
11
  import { resolveEffectiveAgentRuntime } from "openclaw/plugin-sdk/command-auth-native";
13
12
  //#region extensions/codex/src/doctor.ts
14
13
  const CODEX_MANAGED_APP_SERVER_CHECK_ID = "codex/managed-app-server";
15
14
  const CODEX_VERSION_TIMEOUT_MS = 5e3;
16
15
  const CODEX_VERSION_MAX_BUFFER_BYTES = 65536;
17
- const execFileAsync = promisify(execFile);
18
16
  function managedCodexFinding(params) {
19
17
  return {
20
18
  checkId: CODEX_MANAGED_APP_SERVER_CHECK_ID,
21
- severity: "error",
19
+ severity: params.severity ?? "error",
22
20
  source: "codex",
23
21
  message: params.message,
24
22
  ...params.path ? { path: params.path } : {},
@@ -32,21 +30,26 @@ function readErrorMessage(error) {
32
30
  function parseCodexVersion(output) {
33
31
  return /(?:^|\s)(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)(?:\s|$)/u.exec(output)?.[1];
34
32
  }
35
- function runVersionCommand(command) {
36
- return execFileAsync(command, ["--version"], {
37
- encoding: "utf8",
38
- maxBuffer: CODEX_VERSION_MAX_BUFFER_BYTES,
39
- timeout: CODEX_VERSION_TIMEOUT_MS,
33
+ async function runVersionCommand(command, env) {
34
+ const result = await runUtf8CommandWithTimeout([command, "--version"], {
35
+ baseEnv: env,
36
+ input: "",
37
+ timeoutMs: CODEX_VERSION_TIMEOUT_MS,
38
+ maxOutputBytes: CODEX_VERSION_MAX_BUFFER_BYTES,
39
+ outputCapture: "head",
40
+ terminateOnOutputLimit: true,
41
+ killProcessTree: true,
40
42
  killSignal: "SIGKILL",
41
- windowsHide: true
43
+ killGraceMs: 0
42
44
  });
45
+ if (result.termination !== "exit" || result.code !== 0 || result.outputLimitExceeded) throw new Error(result.outputLimitExceeded ? "Version output exceeded its capture limit" : result.termination === "timeout" ? `Version probe timed out after ${CODEX_VERSION_TIMEOUT_MS} ms` : `Version probe failed (${result.signal ?? result.code ?? result.termination})`);
46
+ return result;
43
47
  }
44
48
  function createCodexManagedAppServerHealthCheck(params) {
45
49
  const resolveStartOptions = params.deps?.resolveStartOptions ?? resolveManagedCodexAppServerStartOptions;
46
50
  const resolveAgentStartOptions = params.deps?.resolveAgentStartOptions ?? resolveCodexAppServerStartOptionsForAgent;
47
51
  const isDesktopCommand = params.deps?.isDesktopCommand ?? isManagedCodexDesktopCommand;
48
52
  const resolveNativeCommand = params.deps?.resolveNativeCommand ?? resolveManagedCodexNativeCommand;
49
- const executeVersion = params.deps?.runVersionCommand ?? runVersionCommand;
50
53
  return {
51
54
  id: CODEX_MANAGED_APP_SERVER_CHECK_ID,
52
55
  kind: "plugin",
@@ -61,6 +64,9 @@ function createCodexManagedAppServerHealthCheck(params) {
61
64
  }).start;
62
65
  if (start.transport !== "stdio" || start.commandSource !== "managed") return [];
63
66
  const env = ctx.env ?? process.env;
67
+ const isFinalization = ctx.mode === "fix" && env.OPENCLAW_UPDATE_POST_CORE === "1";
68
+ const versionFailureSeverity = isFinalization ? "warning" : "error";
69
+ const versionFailureHint = isFinalization ? "Codex readiness will be rechecked by its plugin after restart; inspect the Codex plugin if the warning persists." : void 0;
64
70
  let resolved;
65
71
  for (const agentId of listAgentIds(ctx.cfg)) {
66
72
  const model = resolveDefaultModelForAgent({
@@ -101,21 +107,23 @@ function createCodexManagedAppServerHealthCheck(params) {
101
107
  })];
102
108
  let output;
103
109
  try {
104
- output = await executeVersion(nativeCommand);
110
+ output = await (params.deps?.runVersionCommand ? params.deps.runVersionCommand(nativeCommand) : runVersionCommand(nativeCommand, env));
105
111
  } catch (error) {
106
112
  return [managedCodexFinding({
107
113
  message: `Managed Codex app-server version check failed: ${readErrorMessage(error)}`,
114
+ severity: versionFailureSeverity,
108
115
  path: nativeCommand,
109
116
  requirement: `Codex ${CODEX_APP_SERVER_VERSION} must report its version within ${CODEX_VERSION_TIMEOUT_MS} ms`,
110
- fixHint: "Repair or reinstall the staged OpenClaw package, then rerun the candidate check before cutover."
117
+ fixHint: versionFailureHint ?? "Repair or reinstall the staged OpenClaw package, then rerun the candidate check before cutover."
111
118
  })];
112
119
  }
113
120
  const detectedVersion = parseCodexVersion(`${output.stdout}\n${output.stderr}`);
114
121
  if (detectedVersion !== "0.153.4") return [managedCodexFinding({
122
+ severity: versionFailureSeverity,
115
123
  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}.`,
116
124
  path: nativeCommand,
117
125
  requirement: `the exact OpenClaw-pinned Codex version ${CODEX_APP_SERVER_VERSION}`,
118
- fixHint: "Reinstall the staged OpenClaw package so its managed @openai/codex dependency matches the pinned version, then rerun the candidate check."
126
+ fixHint: versionFailureHint ?? "Reinstall the staged OpenClaw package so its managed @openai/codex dependency matches the pinned version, then rerun the candidate check."
119
127
  })];
120
128
  return [];
121
129
  }
@@ -1,14 +1,14 @@
1
- import { m as CODEX_PLUGINS_MARKETPLACE_NAME } from "./config-utils-C57JiJrU.js";
2
- import { x as readCodexPluginConfig } from "./protocol-CAAcVIKF.js";
3
- import { s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-Kq6oerr6.js";
4
- import { r as buildCodexPluginAppCacheKey, s as defaultCodexAppInventoryCache } from "./plugin-app-cache-key-CdSQzWyX.js";
5
- import { i as requestCodexAppServerJson } from "./request-CGvGOpeR.js";
6
- import "./config-JDfTI4VI.js";
7
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
1
+ import { c as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-oL4Na1ZG.js";
2
+ import { x as readCodexPluginConfig } from "./protocol-5bh1G-H7.js";
3
+ import { s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-7orQae_j.js";
4
+ import { r as buildCodexPluginAppCacheKey, s as defaultCodexAppInventoryCache } from "./plugin-app-cache-key-d0eKxy7b.js";
5
+ import { i as requestCodexAppServerJson } from "./request-B7hEkBGq.js";
6
+ import "./config-oIORaQ5T.js";
7
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
8
8
  import { i as resolveCodexAppServerAuthProfileIdForAgent } from "./auth-profile-CwzO4_RG.js";
9
- import { X as resolveCodexAppServerAuthAccountCacheKey, c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-CVhez2Uo.js";
10
- import { t as ensureCodexPluginActivation } from "./plugin-activation-BQK-f5sV.js";
11
- import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as applyCodexAuthItems, readCodexPluginMigrationConfigEntry, t as resolveCodexMigrationTargets } from "./plan-BMJdMOEF.js";
9
+ import { c as getLeasedSharedCodexAppServerClient, et as resolveCodexAppServerAuthAccountCacheKey, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-CscigXXL.js";
10
+ import { t as ensureCodexPluginActivation } from "./plugin-activation-BYQculil.js";
11
+ import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as applyCodexAuthItems, r as resolveCodexConfigPatchMode, readCodexPluginMigrationConfigEntry, t as resolveCodexMigrationTargets } from "./plan-7uG-Fp36.js";
12
12
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
14
14
  import path from "node:path";
@@ -53,7 +53,6 @@ function sanitizeAppsNeedingAuth(apps) {
53
53
  //#region extensions/codex/src/migration/apply.ts
54
54
  const CODEX_PLUGIN_AUTH_REQUIRED_REASON = "auth_required";
55
55
  const CODEX_PLUGIN_NOT_SELECTED_REASON = "not selected for migration";
56
- const CODEX_CONFIG_PATCH_MODE_RETURN = "return";
57
56
  const CODEX_PLUGIN_LOAD_WARNING = "Some Codex plugins could not be migrated. Run `openclaw migrate codex` after onboarding.";
58
57
  const TARGET_CODEX_MARKETPLACE_DISCOVERY_POLL_MS = 250;
59
58
  const TARGET_CODEX_MARKETPLACE_DISCOVERY_TIMEOUT_MS = 3e4;
@@ -66,7 +65,7 @@ var CodexPluginConfigConflictError = class extends Error {
66
65
  }
67
66
  };
68
67
  function shouldReturnCodexPluginConfigPatch(ctx) {
69
- return ctx.providerOptions?.configPatchMode === CODEX_CONFIG_PATCH_MODE_RETURN;
68
+ return resolveCodexConfigPatchMode(ctx) === "return";
70
69
  }
71
70
  function prepareTargetCodexAppServer(ctx) {
72
71
  const appServer = resolveTargetCodexAppServer(ctx);
@@ -1,211 +1,15 @@
1
- import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
2
- import "./client-BEKu4yDx.js";
3
- import { m as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-Kq6oerr6.js";
4
- import { r as CodexAppServerRpcError } from "./session-catalog-provenance-DkJHo735.js";
5
- import { G as unsubscribeCodexAppServerLiveThread } from "./shared-client-CVhez2Uo.js";
6
- import { asFiniteNumber, normalizeOptionalString, normalizeOptionalString as normalizeOptionalString$1, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
2
+ import "./client-B57KWPQx.js";
3
+ import { m as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-7orQae_j.js";
4
+ import { t as CodexAppServerRpcError } from "./rpc-error-ttN_QjEm.js";
5
+ import { h as unknownItemStatus } from "./event-projector-items-5VhsECCO.js";
6
+ import { Y as unsubscribeCodexAppServerLiveThread } from "./shared-client-CscigXXL.js";
7
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
8
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
8
9
  import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
9
10
  import { AsyncResource } from "node:async_hooks";
10
11
  import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
11
12
  import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
12
- //#region extensions/codex/src/app-server/event-projector-values.ts
13
- const BIO_POLICY_SAFETY_ACCESS_BLOCK_PREFIX = "This content was flagged for possible biological risk.";
14
- /** Project only Codex's explicit refusal contracts; other policy errors retain their own paths. */
15
- function readCodexProviderRefusal(message, codexErrorInfo) {
16
- if (!message) return;
17
- if (codexErrorInfo === "cyberPolicy") return {
18
- category: "cyber",
19
- message
20
- };
21
- if (codexErrorInfo === "misalignmentPolicyViolation") return {
22
- category: "misalignment",
23
- message
24
- };
25
- return message.startsWith(BIO_POLICY_SAFETY_ACCESS_BLOCK_PREFIX) ? {
26
- category: "bio",
27
- message
28
- } : void 0;
29
- }
30
- function readNonEmptyString(record, key) {
31
- return normalizeOptionalString$1(record[key]);
32
- }
33
- function readNonEmptyStringArray(record, key) {
34
- const value = record[key];
35
- if (!Array.isArray(value)) return [];
36
- const entries = [];
37
- for (const entry of value) {
38
- const normalized = normalizeOptionalString$1(entry);
39
- if (normalized) entries.push(normalized);
40
- }
41
- return entries;
42
- }
43
- function readNullableString(record, key) {
44
- const value = record[key];
45
- if (value === null) return null;
46
- return typeof value === "string" ? value : void 0;
47
- }
48
- function readNonNegativeInteger(record, key) {
49
- const value = asFiniteNumber(record[key]);
50
- return value !== void 0 && Number.isInteger(value) && value >= 0 ? value : void 0;
51
- }
52
- function readCodexErrorNotificationMessage(record) {
53
- const error = record.error;
54
- return isJsonObject(error) ? readStringField(error, "message") : void 0;
55
- }
56
- function readHookOutputEntries(value) {
57
- if (!Array.isArray(value)) return [];
58
- return value.flatMap((entry) => {
59
- if (!isJsonObject(entry)) return [];
60
- const text = readStringField(entry, "text");
61
- if (!text) return [];
62
- const kind = readStringField(entry, "kind");
63
- return [{
64
- ...kind ? { kind } : {},
65
- text
66
- }];
67
- });
68
- }
69
- function splitPlanText(text) {
70
- return text.split(/\r?\n/).map((line) => line.trim().replace(/^[-*]\s+/, "")).filter((line) => line.length > 0);
71
- }
72
- function extractRawAssistantText(item) {
73
- const parts = (Array.isArray(item.content) ? item.content : []).flatMap((entry) => {
74
- if (!isJsonObject(entry)) return [];
75
- const type = readStringField(entry, "type");
76
- if (type !== "output_text" && type !== "text") return [];
77
- const value = readStringField(entry, "text");
78
- return value === void 0 ? [] : [value];
79
- });
80
- return parts.length > 0 ? parts.join("").trim() : void 0;
81
- }
82
- function readItemString(item, key) {
83
- const value = item[key];
84
- return typeof value === "string" ? value : void 0;
85
- }
86
- function readItem(value) {
87
- if (!isJsonObject(value)) return;
88
- const type = typeof value.type === "string" ? value.type : void 0;
89
- const id = typeof value.id === "string" ? value.id : void 0;
90
- if (!type || !id) return;
91
- return value;
92
- }
93
- //#endregion
94
- //#region extensions/codex/src/app-server/event-projector-items.ts
95
- function matchesCodexSnapshotTurn(item, turnId) {
96
- const itemTurnId = readItemString(item, "turnId");
97
- return itemTurnId === void 0 || itemTurnId === turnId;
98
- }
99
- function itemKind(item) {
100
- switch (item.type) {
101
- case "dynamicToolCall":
102
- case "mcpToolCall": return "tool";
103
- case "commandExecution": return "command";
104
- case "fileChange": return "patch";
105
- case "webSearch": return "search";
106
- case "reasoning":
107
- case "contextCompaction": return "analysis";
108
- default: return;
109
- }
110
- }
111
- function itemTitle(item) {
112
- switch (item.type) {
113
- case "commandExecution": return "Command";
114
- case "fileChange": return "File change";
115
- case "mcpToolCall": return "MCP tool";
116
- case "dynamicToolCall": return "Tool";
117
- case "webSearch": return "Web search";
118
- case "contextCompaction": return "Context compaction";
119
- case "reasoning": return "Reasoning";
120
- default: return item.type;
121
- }
122
- }
123
- function itemStatus(item) {
124
- const status = readItemString(item, "status");
125
- if (status === "failed" || status === "error") return "failed";
126
- if (status === "declined") return "blocked";
127
- if (status === "inProgress" || status === "in_progress" || status === "running") return "running";
128
- return "completed";
129
- }
130
- function unknownItemStatus(item) {
131
- const status = readItemString(item, "status");
132
- switch (status) {
133
- case void 0:
134
- case "completed":
135
- case "failed":
136
- case "error":
137
- case "declined":
138
- case "inProgress":
139
- case "in_progress":
140
- case "running": return;
141
- default: return status;
142
- }
143
- }
144
- function auditNativeToolTerminalStatus(item) {
145
- if (item.type === "imageView" || item.type === "sleep") return "completed";
146
- const status = readItemString(item, "status");
147
- if (status === "completed") return "completed";
148
- if (status === "failed" || status === "error") return "failed";
149
- if (status === "declined") return "blocked";
150
- return "unknown";
151
- }
152
- function auditNativeToolUnfinishedStatus(item) {
153
- return item.type === "webSearch" || item.type === "imageGeneration" ? "unknown" : "failed";
154
- }
155
- function isNonSuccessItemStatus(status) {
156
- return status === "failed" || status === "blocked";
157
- }
158
- function itemName(item) {
159
- if (item.type === "dynamicToolCall" && typeof item.tool === "string") return item.tool;
160
- if (item.type === "mcpToolCall" && typeof item.tool === "string") {
161
- const server = typeof item.server === "string" ? item.server : void 0;
162
- return server ? `${server}.${item.tool}` : item.tool;
163
- }
164
- if (item.type === "commandExecution") return "bash";
165
- if (item.type === "fileChange") return "apply_patch";
166
- if (item.type === "webSearch") return "web_search";
167
- }
168
- function auditNativeToolName(item) {
169
- if (item.type === "dynamicToolCall") return;
170
- const progressName = itemName(item);
171
- if (progressName) return progressName;
172
- if (item.type === "collabAgentToolCall") return typeof item.tool === "string" && item.tool.trim() ? `collab.${item.tool.trim()}` : "collab_agent";
173
- if (item.type === "imageGeneration") return "image_generation";
174
- if (item.type === "imageView") return "image_view";
175
- if (item.type === "sleep") return "sleep";
176
- }
177
- function isSideEffectingNativeToolItem(item) {
178
- return itemStatus(item) !== "blocked" && (isMutatingNativeToolItem(item) || item.type === "mcpToolCall");
179
- }
180
- function shouldSynthesizeToolProgressForItem(item) {
181
- switch (item.type) {
182
- case "commandExecution":
183
- case "fileChange":
184
- case "webSearch":
185
- case "mcpToolCall": return true;
186
- default: return false;
187
- }
188
- }
189
- function shouldRecordNativeToolTranscript(item) {
190
- return shouldSynthesizeToolProgressForItem(item);
191
- }
192
- function isMutatingNativeToolItem(item) {
193
- if (item.type === "commandExecution") return true;
194
- return item.type === "fileChange" || item.type === "collabAgentToolCall" || item.type === "imageGeneration";
195
- }
196
- function shouldClearTerminalPresentationForNativeItem(item) {
197
- switch (item.type) {
198
- case "collabAgentToolCall":
199
- case "commandExecution":
200
- case "fileChange":
201
- case "imageGeneration":
202
- case "imageView":
203
- case "mcpToolCall":
204
- case "webSearch": return true;
205
- default: return false;
206
- }
207
- }
208
- //#endregion
209
13
  //#region extensions/codex/src/app-server/notification-correlation.ts
210
14
  /**
211
15
  * Correlates Codex app-server notifications with the active thread/turn so
@@ -801,4 +605,4 @@ async function unsubscribeCodexThreadBestEffort(client, params) {
801
605
  }
802
606
  }
803
607
  //#endregion
804
- export { shouldRecordNativeToolTranscript as A, readNonEmptyStringArray as B, isSideEffectingNativeToolItem as C, itemTitle as D, itemStatus as E, readCodexProviderRefusal as F, readNullableString as H, readHookOutputEntries as I, readItem as L, extractRawAssistantText as M, normalizeOptionalString$1 as N, matchesCodexSnapshotTurn as O, readCodexErrorNotificationMessage as P, readItemString as R, isNonSuccessItemStatus as S, itemName as T, splitPlanText as U, readNonNegativeInteger as V, readCodexNotificationTurnId as _, closeCodexStartupClientBestEffort as a, auditNativeToolUnfinishedStatus as b, isCodexNoActiveTurnInterruptError 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, isCodexAppServerUnsafeSubscriptionError 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, readNonEmptyString as z };
608
+ export { readCodexNotificationTurnId as _, closeCodexStartupClientBestEffort as a, isCodexNoActiveTurnInterruptError as c, unsubscribeCodexThreadBestEffort as d, CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS as f, readCodexNotificationThreadId as g, isCodexNotificationForTurn as h, assertCodexThreadResumeSubscription as i, retireUnsafeCodexTurnClientBestEffort as l, CodexProjectionDiagnostics as m, CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS as n, interruptCodexTurnAndWaitBestEffort as o, getCodexAppServerTurnRouter as p, CodexAppServerUnsafeSubscriptionError as r, isCodexAppServerUnsafeSubscriptionError as s, CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS as t, terminateCodexBackgroundTerminals as u };
@@ -1,6 +1,6 @@
1
- import { a as flattenCodexDynamicToolFunctions, o as isJsonObject } from "./protocol-CAAcVIKF.js";
1
+ import { a as flattenCodexDynamicToolFunctions, o as isJsonObject } from "./protocol-5bh1G-H7.js";
2
2
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-Cz-tOOYj.js";
3
- import { Z as areCodexDynamicToolFingerprintsCompatible, at as isMessageOnlyCodexSourceReply, dt as isContextEngineBindingCompatible } from "./thread-lifecycle-D1pzRwHB.js";
3
+ import { Q as areCodexDynamicToolFingerprintsCompatible, ft as isContextEngineBindingCompatible, ot as isMessageOnlyCodexSourceReply } from "./thread-lifecycle-DXl1-I6b.js";
4
4
  import { readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { createHash } from "node:crypto";
6
6
  import path from "node:path";
@@ -442,7 +442,7 @@ function renderCodexWorkspaceBootstrapPromptContext(contextFiles) {
442
442
  const files = contextFiles;
443
443
  if (files.length === 0) return;
444
444
  const lines = [
445
- "OpenClaw loaded these user-editable workspace files for the current turn. Codex loads project-local AGENTS.md natively. When execution uses another folder, OpenClaw supplies the agent workspace AGENTS.md as thread-level developer instructions. SOUL.md, IDENTITY.md, and USER.md remain turn-scoped collaboration instructions. Those files are not repeated here.",
445
+ "OpenClaw loaded these user-editable workspace files for the current turn. Codex loads project-local AGENTS.md natively. When execution uses another folder, OpenClaw supplies the agent workspace AGENTS.md as thread-level developer instructions. SOUL.md, IDENTITY.md, and USER.md are prepared separately from user input and are not repeated here.",
446
446
  "",
447
447
  "# Project Context",
448
448
  "",
@@ -1,4 +1,4 @@
1
- import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
1
+ import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
2
2
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/codex/src/app-server/attempt-notifications.ts
4
4
  const CODEX_TURN_ABORT_MARKER_START = "<turn_aborted>";
@@ -74,4 +74,4 @@ async function fingerprintCodexAppServerAuthBinding(params) {
74
74
  return (await prepareCodexAppServerAuthBinding(params))?.fingerprint;
75
75
  }
76
76
  //#endregion
77
- export { prepareCodexAppServerAuthBinding as n, auth_binding_exports as t };
77
+ export { fingerprintCodexAppServerAuthBinding as n, prepareCodexAppServerAuthBinding as r, auth_binding_exports as t };
@@ -1,5 +1,5 @@
1
- import { n as defineCodexBuildState } from "./build-state-6RL6qohz.js";
2
- import { s as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-DrjjRRUD.js";
1
+ import { n as defineCodexBuildState } from "./build-state-BCmg9-5p.js";
2
+ import { c as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-D22rNEcR.js";
3
3
  import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-BGjHoYLr.js";
4
4
  import { createHash } from "node:crypto";
5
5
  import fs, { constants, existsSync, watch } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { x as readCodexPluginConfig } from "./protocol-CAAcVIKF.js";
3
- import { a as resolveCodexCatalogConnectionHome, t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-CdSQzWyX.js";
4
- import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
2
+ import { x as readCodexPluginConfig } from "./protocol-5bh1G-H7.js";
3
+ import { a as resolveCodexCatalogConnectionHome, t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-d0eKxy7b.js";
4
+ import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
5
5
  import { AgentHarnessPreflightError } from "openclaw/plugin-sdk/agent-harness-registration";
6
6
  //#region extensions/codex/src/app-server/binding-connection.ts
7
7
  var binding_connection_exports = /* @__PURE__ */ __exportAll({
@@ -1,12 +1,12 @@
1
1
  import { r as readCodexAppServerConfigOptions } from "./launch-args-RXQwn8zV.js";
2
- import { C as readCodexErrorNotification, E as createCodexElicitationResponse, b as assertCodexThreadStartResponse, x as assertCodexTurnStartResponse } from "./client-BEKu4yDx.js";
3
- import "./config-JDfTI4VI.js";
4
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
5
- import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-CVhez2Uo.js";
6
- import { a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-D6cR54TV.js";
7
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-DSwzP8YY.js";
8
- import { r as readModelListResult } from "./models-P9k2qAof.js";
9
- import { G as attestCodexRestrictedToolSurfaceMcpServersDisabled, Tt as mergeCodexThreadConfigs, _ as buildCodexRingZeroThreadConfigPatch, b as readCodexInheritedMcpServerNames, g as assertCodexManagedRequirementsDoNotOverrideToolPolicy, v as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-D1pzRwHB.js";
2
+ import { C as readCodexErrorNotification, E as createCodexElicitationResponse, b as assertCodexThreadStartResponse, x as assertCodexTurnStartResponse } from "./client-B57KWPQx.js";
3
+ import "./config-oIORaQ5T.js";
4
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
5
+ import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-CscigXXL.js";
6
+ import { a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-DKHzbwt5.js";
7
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-D78_VmzO.js";
8
+ import { r as readModelListResult } from "./models-PCKOim-h.js";
9
+ import { Et as mergeCodexThreadConfigs, K as attestCodexRestrictedToolSurfaceMcpServersDisabled, _ as assertCodexManagedRequirementsDoNotOverrideToolPolicy, v as buildCodexRingZeroThreadConfigPatch, x as readCodexInheritedMcpServerNames, y as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-DXl1-I6b.js";
10
10
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
11
11
  import path from "node:path";
12
12
  import fs from "node:fs/promises";
@@ -62,8 +62,8 @@ async function runBoundedCodexAppServerTurn(params) {
62
62
  async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, workspace, selectionAttempt = 0, timing) {
63
63
  const totalTimeoutMs = timing?.timeoutMs ?? resolveTimerTimeoutMs(params.timeoutMs, 100, 100);
64
64
  const timeoutError = new CodexBoundedTurnTimeoutError(params.taskLabel, totalTimeoutMs);
65
- const deadline = timing?.deadline ?? Date.now() + totalTimeoutMs;
66
- const timeoutMs = deadline - Date.now();
65
+ const deadline = timing?.deadline ?? performance.now() + totalTimeoutMs;
66
+ const timeoutMs = deadline - performance.now();
67
67
  if (timeoutMs <= 0) throw timeoutError;
68
68
  params.assertCurrent?.();
69
69
  const agentDir = params.agentDir?.trim() || void 0;
@@ -79,7 +79,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
79
79
  assertCurrent: params.assertCurrent,
80
80
  ...params.signal ? { abandonSignal: params.signal } : {}
81
81
  };
82
- const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-CVhez2Uo.js").then((n) => n.y).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
82
+ const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-CscigXXL.js").then((n) => n.y).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
83
83
  ...clientOptions,
84
84
  authProfileStore: params.authProfileStore
85
85
  }));
@@ -102,7 +102,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
102
102
  const abortFromCaller = () => abortRun(params.signal?.reason ?? "aborted");
103
103
  if (params.signal?.aborted) abortFromCaller();
104
104
  else params.signal?.addEventListener("abort", abortFromCaller, { once: true });
105
- const remainingRunMs = deadline - Date.now();
105
+ const remainingRunMs = deadline - performance.now();
106
106
  if (remainingRunMs <= 0) abortRun(timeoutError);
107
107
  const timeout = setTimeout(() => abortRun(timeoutError), Math.max(1, remainingRunMs));
108
108
  timeout.unref?.();
@@ -1,5 +1,5 @@
1
1
  //#region extensions/codex/package.json
2
- var version = "2026.9.3";
2
+ var version = "2026.9.4";
3
3
  //#endregion
4
4
  //#region extensions/codex/src/build-state.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { r as CodexAppServerRpcError } from "./session-catalog-provenance-DkJHo735.js";
1
+ import { t as CodexAppServerRpcError } from "./rpc-error-ttN_QjEm.js";
2
2
  //#region extensions/codex/src/app-server/capabilities.ts
3
3
  /**
4
4
  * Capability helpers for optional Codex app-server control-plane methods.
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
2
2
  //#region extensions/codex/cli-metadata.ts
3
3
  function registerCodexCliMetadata(api) {
4
4
  api.registerCli(async ({ program }) => {
5
- const { registerCodexSessionCli } = await import("./session-cli-CbgaHh0f.js");
5
+ const { registerCodexSessionCli } = await import("./session-cli-DNN_jhGc.js");
6
6
  registerCodexSessionCli(program);
7
7
  }, { descriptors: [{
8
8
  name: "codex",
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { l as resolveCodexAppServerUserHomeDir, o as isJsonObject } from "./protocol-CAAcVIKF.js";
2
+ import { l as resolveCodexAppServerUserHomeDir, o as isJsonObject } from "./protocol-5bh1G-H7.js";
3
3
  import { r as MIN_SUPPORTED_CODEX_APP_SERVER_VERSION, t as CODEX_APP_SERVER_VERSION } from "./version-omm6IPI3.js";
4
4
  import { a as hasCodexAppServerNaturalExit, i as closeCodexAppServerTransportAndWait, r as closeCodexAppServerTransport, t as createStdioTransport } from "./transport-stdio-BGjHoYLr.js";
5
- import { r as CodexAppServerRpcError } from "./session-catalog-provenance-DkJHo735.js";
6
- import "./config-JDfTI4VI.js";
7
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-BWf6JLWG.js";
5
+ import { t as CodexAppServerRpcError } from "./rpc-error-ttN_QjEm.js";
6
+ import "./config-oIORaQ5T.js";
7
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
8
8
  import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { addTimerTimeoutGraceMs, parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
@@ -3333,13 +3333,16 @@ var CodexAppServerClient = class CodexAppServerClient {
3333
3333
  this.transportExited = false;
3334
3334
  this.nativeExecutionObserved = false;
3335
3335
  this.stderrTail = "";
3336
+ this.privateTransportSecrets = /* @__PURE__ */ new Set();
3337
+ this.privateStderrPending = "";
3336
3338
  this.child = child;
3337
3339
  this.lines = createInterface({ input: child.stdout });
3338
3340
  this.lines.on("line", (line) => this.handleLine(line));
3339
3341
  this.lines.on("error", (error) => this.closeWithError(toStringifiedError(error)));
3340
3342
  child.stdout.on("error", (error) => this.closeWithError(toStringifiedError(error)));
3341
3343
  child.stderr.setEncoding("utf8");
3342
- child.stderr.on("data", (text) => {
3344
+ child.stderr.on("data", (chunk) => {
3345
+ const text = this.redactPrivateStderr(chunk);
3343
3346
  this.stderrTail = appendBoundedTail(this.stderrTail, text, CODEX_APP_SERVER_STDERR_TAIL_MAX);
3344
3347
  const trimmed = text.trim();
3345
3348
  if (trimmed) embeddedAgentLog.debug(`codex app-server stderr: ${trimmed}`);
@@ -3685,6 +3688,25 @@ var CodexAppServerClient = class CodexAppServerClient {
3685
3688
  }
3686
3689
  });
3687
3690
  }
3691
+ /** Protect private loopback route capabilities before native diagnostics can mention them. */
3692
+ protectPrivateTransportSecret(secret) {
3693
+ if (!/^[A-Za-z0-9_-]{43}$/.test(secret) || this.privateTransportSecrets.size >= 8) {
3694
+ if (!this.privateTransportSecrets.has(secret)) throw new Error("Invalid private Codex transport capability");
3695
+ }
3696
+ this.privateTransportSecrets.add(secret);
3697
+ }
3698
+ redactPrivateText(text) {
3699
+ let redacted = text;
3700
+ for (const secret of this.privateTransportSecrets) redacted = redacted.replaceAll(secret, "[REDACTED]");
3701
+ return redacted;
3702
+ }
3703
+ redactPrivateStderr(chunk) {
3704
+ const text = this.redactPrivateText(this.privateStderrPending + chunk);
3705
+ let held = 0;
3706
+ for (const secret of this.privateTransportSecrets) for (let length = 1; length < secret.length; length++) if (text.endsWith(secret.slice(0, length))) held = Math.max(held, length);
3707
+ this.privateStderrPending = held ? text.slice(-held) : "";
3708
+ return held ? text.slice(0, -held) : text;
3709
+ }
3688
3710
  handleLine(line) {
3689
3711
  const rawLine = line.endsWith("\r") ? line.slice(0, -1) : line;
3690
3712
  if (this.pendingParse) {
@@ -1,5 +1,5 @@
1
- import { a as formatCodexDisplayText } from "./command-formatters-DeTfrapr.js";
2
- import { n as describeControlFailure } from "./capabilities-BeqLPbtM.js";
1
+ import { o as formatCodexDisplayText } from "./command-formatters-lxlkNZgU.js";
2
+ import { n as describeControlFailure } from "./capabilities-8vx68WLH.js";
3
3
  //#region extensions/codex/src/command-dispatch.ts
4
4
  /** Dispatches a `/codex` command to the lazily loaded handler. */
5
5
  async function handleCodexCommand(ctx, options) {
@@ -14,7 +14,7 @@ async function handleCodexCommand(ctx, options) {
14
14
  }
15
15
  }
16
16
  async function loadDefaultCodexSubcommandHandler() {
17
- const { handleCodexSubcommand } = await import("./command-handlers-BfIsJEuA.js");
17
+ const { handleCodexSubcommand } = await import("./command-handlers-tiL9iWj7.js");
18
18
  return handleCodexSubcommand;
19
19
  }
20
20
  //#endregion
@@ -1,5 +1,5 @@
1
- import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
2
- import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-Bqnx1N4z.js";
1
+ import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
2
+ import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-CBMmWBr9.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/codex/src/command-formatters.ts
5
5
  /**
@@ -198,6 +198,7 @@ function buildHelp() {
198
198
  "- /codex diagnostics [note]",
199
199
  "- /codex computer-use [status|install]",
200
200
  "- /codex account",
201
+ "- /codex plugins refresh refresh hosted inventory for the current Codex account/runtime",
201
202
  "- /codex mcp",
202
203
  "- /codex skills",
203
204
  "- /codex plugins [list|enable|disable]"
@@ -279,4 +280,4 @@ function extractArray(value) {
279
280
  return [];
280
281
  }
281
282
  //#endregion
282
- export { formatCodexDisplayText as a, formatComputerUseStatus as c, formatSkills as d, formatThreads as f, formatAccount as i, formatList as l, buildHelp as n, formatCodexStatus as o, escapeCodexChatText as r, formatCodexTextForDisplay as s, CODEX_RESUME_SAFE_THREAD_ID_PATTERN as t, formatModels as u };
283
+ export { formatCodexAccountLine as a, formatCodexTextForDisplay as c, formatModels as d, formatSkills as f, formatAccount as i, formatComputerUseStatus as l, buildHelp as n, formatCodexDisplayText as o, formatThreads as p, escapeCodexChatText as r, formatCodexStatus as s, CODEX_RESUME_SAFE_THREAD_ID_PATTERN as t, formatList as u };