@openclaw/codex 2026.8.1 → 2026.8.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.
Files changed (67) hide show
  1. package/dist/{attempt-client-cleanup-CVPvp9dL.js → .setup/attempt-client-cleanup-FBnDjmtX.mjs} +1 -1
  2. package/dist/{auth-binding-Ds_QVm-X.js → .setup/auth-binding-oyIUSaFi.mjs} +1 -1
  3. package/dist/{binding-connection-CCQFs8lf.js → .setup/binding-connection-BgiXAp29.mjs} +2 -2
  4. package/dist/{bounded-turn-rq5tiSXk.js → .setup/bounded-turn-kWYLbaDH.mjs} +12 -11
  5. package/dist/{capabilities-CGm_94eL.js → .setup/capabilities-oLHKpYRj.mjs} +1 -1
  6. package/dist/{command-formatters-C54Yg3eA.js → .setup/command-formatters-DylXEqck.mjs} +4 -3
  7. package/dist/{command-handlers-BvOAHTrA.js → .setup/command-handlers-PRe4WEmx.mjs} +42 -34
  8. package/dist/{compact-Hd7SAc0N.js → .setup/compact-K2iOmzQp.mjs} +14 -12
  9. package/dist/{config-Cxw3Cl3k.js → .setup/config-ClwHKKTN.mjs} +7 -5
  10. package/dist/{conversation-binding-data-CW2GuupV.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +3 -2
  11. package/dist/{dynamic-tools-BFoUcRdx.js → .setup/dynamic-tools-XNStyzzb.mjs} +105 -108
  12. package/dist/{effective-mcp-catalog-BTJHnDSx.js → .setup/effective-mcp-catalog-BHpifbgx.mjs} +2 -2
  13. package/dist/{event-projector-assistant-message-C5-Ds8mA.js → .setup/event-projector-assistant-message-BCnzlajn.mjs} +1 -1
  14. package/dist/{event-projector-usage-D3PHFFXh.js → .setup/event-projector-usage-h7P0Raok.mjs} +7 -12
  15. package/dist/{harness-DVfUQBlQ.js → .setup/harness-CawBdltH.mjs} +14 -14
  16. package/dist/{isolated-completion-Cbbx_5Ed.js → .setup/isolated-completion-rL3zrcAe.mjs} +4 -4
  17. package/dist/{managed-binary-ZkGodW19.js → .setup/managed-binary-DlGr2kYu.mjs} +1 -1
  18. package/dist/{model-catalog-o6Cgjoss.js → .setup/model-catalog--miA1cod.mjs} +5 -5
  19. package/dist/{models-DgFWSuxA.js → .setup/models-BNPc8Vr2.mjs} +5 -4
  20. package/dist/{native-subagent-monitor-CwFyoylz.js → .setup/native-subagent-monitor-mhFvLcPG.mjs} +25 -105
  21. package/dist/{node-exec-server.runtime-DXrqpw1c.js → .setup/node-exec-server.runtime-BmAZPmrd.mjs} +3 -3
  22. package/dist/{plugin-approval-roundtrip-D80UZiJ_.js → .setup/plugin-approval-roundtrip-Dlq4n0n8.mjs} +2 -1
  23. package/dist/{plugin-marketplace-discovery-mdmScYOj.js → .setup/plugin-marketplace-discovery-KyJdBtCC.mjs} +14 -13
  24. package/dist/{plugin-metadata-cache-CulOABwu.js → .setup/plugin-metadata-cache-RRQ_VJrs.mjs} +6 -6
  25. package/dist/{rate-limits-hFtzt2Up.js → .setup/rate-limits-CQUmEcUk.mjs} +3 -2
  26. package/dist/{request-CCm4LaED.js → .setup/request-fEUi95EK.mjs} +3 -3
  27. package/dist/{run-attempt-BwNQDH2u.js → .setup/run-attempt-BJ6tOQeE.mjs} +138 -187
  28. package/dist/{runtime-artifact-DeBvleJw.js → .setup/runtime-artifact-D0ssVSlz.mjs} +3 -3
  29. package/dist/{session-binding-q2WSTVmC.js → .setup/session-binding-Bd9dh1Er.mjs} +3 -3
  30. package/dist/{session-catalog-C2Tae4rI.js → .setup/session-catalog-eQhJDU41.mjs} +234 -206
  31. package/dist/{session-catalog-home-id-DAKUrm3C.js → .setup/session-catalog-home-id-CjyBDShn.mjs} +3 -3
  32. package/dist/{session-cli-BuDjm5Ou.js → .setup/session-cli-mJePHTAs.mjs} +1 -1
  33. package/dist/.setup/session-history-Cg8PzgeU.mjs +87 -0
  34. package/dist/{session-permission-policy-gLm40Vtq.js → .setup/session-permission-policy-C0bdhR_I.mjs} +1 -1
  35. package/dist/{session-retirement-CdkI0bvb.js → .setup/session-retirement-osjW6zy5.mjs} +4 -4
  36. package/dist/{session-upstream-marker-Bcy33kam.js → .setup/session-upstream-marker-CIgMzZku.mjs} +1 -1
  37. package/dist/.setup/settled-turn-context-OxoGQWJK.mjs +290 -0
  38. package/dist/.setup/settled-turn-finalizer-D9SoKTb-.mjs +104 -0
  39. package/dist/{shared-client-kNkljY-R.js → .setup/shared-client-DG1kAfGq.mjs} +37 -39
  40. package/dist/{side-question-GwD73tX6.js → .setup/side-question-Bi9chAvD.mjs} +25 -17
  41. package/dist/{thread-lifecycle-Ss-uwnC4.js → .setup/thread-lifecycle-Cc6I-gbl.mjs} +273 -232
  42. package/dist/{thread-ownership-CeYBqg_4.js → .setup/thread-ownership-B3vjUi0P.mjs} +2 -2
  43. package/dist/{thread-resume-DF54hagX.js → .setup/thread-resume-OMjvue9F.mjs} +8 -7
  44. package/dist/{transcript-mirror-CkEQIna-.js → .setup/transcript-mirror-DN-ed7Kf.mjs} +14 -7
  45. package/dist/{transport-stdio-C7-s9TLG.js → .setup/transport-stdio-Cu0xKDRo.mjs} +41 -25
  46. package/dist/{upstream-prompt-provenance-CFmsKwr9.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +8 -4
  47. package/dist/{upstream-session-fork-BACGlOFa.js → .setup/upstream-session-fork-DL7QQ1e_.mjs} +14 -20
  48. package/dist/{usage-C2l8Mils.js → .setup/usage-dsPLHd8O.mjs} +3 -3
  49. package/dist/{web-search-provider.runtime-B2XgRdFv.js → .setup/web-search-provider.runtime-BRH3ahFN.mjs} +3 -3
  50. package/dist/api.js +4 -4
  51. package/dist/cli-metadata.js +1 -1
  52. package/dist/doctor-contract-api.js +9 -5
  53. package/dist/harness.js +1 -1
  54. package/dist/index.js +60 -41
  55. package/dist/media-understanding-provider.js +1 -1
  56. package/dist/web-search-contract-api.js +1 -1
  57. package/package.json +6 -6
  58. package/dist/settled-turn-finalizer-B8JJcxCi.js +0 -329
  59. /package/dist/{context-compaction-activity-BOeJf7yo.js → .setup/context-compaction-activity-BOeJf7yo.mjs} +0 -0
  60. /package/dist/{elicitation-input-DMkeki8d.js → .setup/elicitation-input-DMkeki8d.mjs} +0 -0
  61. /package/dist/{image-payload-sanitizer-CnfoUPCE.js → .setup/image-payload-sanitizer-CnfoUPCE.mjs} +0 -0
  62. /package/dist/{launch-args-sXOAg0SX.js → .setup/launch-args-sXOAg0SX.mjs} +0 -0
  63. /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
  64. /package/dist/{protocol-validators-Bg5rpNxk.js → .setup/protocol-validators-Bg5rpNxk.mjs} +0 -0
  65. /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
  66. /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
  67. /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
@@ -77,7 +77,7 @@ function createCodexAppServerAgentHarness(options) {
77
77
  ...sessionCatalogControlFactory && sessionRuntime ? { sessionFork: {
78
78
  upstreamKinds: ["codex-app-server"],
79
79
  fork: async (params) => {
80
- const { forkCodexUpstreamSession } = await import("./upstream-session-fork-BACGlOFa.js");
80
+ const { forkCodexUpstreamSession } = await import("./upstream-session-fork-DL7QQ1e_.mjs");
81
81
  return await forkCodexUpstreamSession(params, {
82
82
  bindingStore: options.bindingStore,
83
83
  controlFactory: sessionCatalogControlFactory,
@@ -88,26 +88,26 @@ function createCodexAppServerAgentHarness(options) {
88
88
  }
89
89
  } } : {},
90
90
  authBinding: { fingerprint: async (params) => {
91
- const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-Ds_QVm-X.js").then((n) => n.t);
91
+ const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-oyIUSaFi.mjs").then((n) => n.t);
92
92
  return fingerprintCodexAppServerAuthBinding(params);
93
93
  } },
94
94
  runtimeArtifact: { validate: async (binding) => {
95
- const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-DeBvleJw.js");
95
+ const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-D0ssVSlz.mjs");
96
96
  return validateCodexAppServerRuntimeArtifact(binding);
97
97
  } },
98
98
  fetchUsageSnapshot: async (ctx) => {
99
- const { fetchCodexAppServerUsageSnapshot } = await import("./usage-C2l8Mils.js");
99
+ const { fetchCodexAppServerUsageSnapshot } = await import("./usage-dsPLHd8O.mjs");
100
100
  return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
101
101
  },
102
102
  loadModelCatalog: async (params) => {
103
- const { createCodexAppServerModelCatalog } = await import("./model-catalog-o6Cgjoss.js");
103
+ const { createCodexAppServerModelCatalog } = await import("./model-catalog--miA1cod.mjs");
104
104
  if (disposed) return [];
105
105
  modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
106
106
  return await modelCatalog.load(params, resolveAttemptPluginConfig(params.config));
107
107
  },
108
108
  readModelCatalogReadiness: (params) => modelCatalog?.read(params, resolveAttemptPluginConfig(params.config)),
109
109
  loadMcpToolCatalog: async (params) => {
110
- const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-BTJHnDSx.js");
110
+ const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-BHpifbgx.mjs");
111
111
  return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
112
112
  },
113
113
  supports: (ctx) => {
@@ -150,7 +150,7 @@ function createCodexAppServerAgentHarness(options) {
150
150
  };
151
151
  },
152
152
  runAttempt: async (params) => {
153
- const { runCodexAppServerAttempt } = await import("./run-attempt-BwNQDH2u.js");
153
+ const { runCodexAppServerAttempt } = await import("./run-attempt-BJ6tOQeE.mjs");
154
154
  return runCodexAppServerAttempt(params, {
155
155
  bindingStore: options.bindingStore,
156
156
  pluginConfig: resolveAttemptPluginConfig(params.config),
@@ -161,7 +161,7 @@ function createCodexAppServerAgentHarness(options) {
161
161
  },
162
162
  runIsolatedCompletionV2: async (params) => {
163
163
  if (params.authorization.owner === "host") return runHostPreparedIsolatedCompletion(params);
164
- const { runCodexIsolatedCompletion } = await import("./isolated-completion-Cbbx_5Ed.js");
164
+ const { runCodexIsolatedCompletion } = await import("./isolated-completion-rL3zrcAe.mjs");
165
165
  return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
166
166
  },
167
167
  runIsolatedCompletion: async (params) => {
@@ -176,11 +176,11 @@ function createCodexAppServerAgentHarness(options) {
176
176
  });
177
177
  },
178
178
  finalizeSettledTurn: async (params) => {
179
- const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-B8JJcxCi.js");
179
+ const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-D9SoKTb-.mjs");
180
180
  return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
181
181
  },
182
182
  runSideQuestion: async (params) => {
183
- const { runCodexAppServerSideQuestion } = await import("./side-question-GwD73tX6.js");
183
+ const { runCodexAppServerSideQuestion } = await import("./side-question-Bi9chAvD.mjs");
184
184
  return runCodexAppServerSideQuestion(params, {
185
185
  bindingStore: options.bindingStore,
186
186
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
@@ -190,20 +190,20 @@ function createCodexAppServerAgentHarness(options) {
190
190
  });
191
191
  },
192
192
  compact: async (params) => {
193
- const { maybeCompactCodexAppServerSession } = await import("./compact-Hd7SAc0N.js");
193
+ const { maybeCompactCodexAppServerSession } = await import("./compact-K2iOmzQp.mjs");
194
194
  return maybeCompactCodexAppServerSession(params, {
195
195
  bindingStore: options.bindingStore,
196
196
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
197
197
  });
198
198
  },
199
199
  withSessionDeletion: async (params, run) => {
200
- const { withCodexAppServerSessionDeletion } = await import("./session-retirement-CdkI0bvb.js");
200
+ const { withCodexAppServerSessionDeletion } = await import("./session-retirement-osjW6zy5.mjs");
201
201
  params.assertCurrent();
202
202
  return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
203
203
  },
204
204
  reset: async (params) => {
205
205
  if (params.sessionId && params.reason !== "deleted") {
206
- const [{ reclaimCurrentCodexSessionGeneration, sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-q2WSTVmC.js").then((n) => n.f), import("./session-retirement-CdkI0bvb.js")]);
206
+ const [{ reclaimCurrentCodexSessionGeneration, sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-Bd9dh1Er.mjs").then((n) => n.f), import("./session-retirement-osjW6zy5.mjs")]);
207
207
  const identity = sessionBindingIdentity({
208
208
  agentId: params.agentId,
209
209
  sessionId: params.sessionId,
@@ -235,7 +235,7 @@ function createCodexAppServerAgentHarness(options) {
235
235
  /** Creates the private native-compaction bridge registered in host-owned capability state. */
236
236
  function createCodexAppServerNativeCompaction(options) {
237
237
  return async (params) => {
238
- const { maybeCompactCodexAppServerSession } = await import("./compact-Hd7SAc0N.js");
238
+ const { maybeCompactCodexAppServerSession } = await import("./compact-K2iOmzQp.mjs");
239
239
  return maybeCompactCodexAppServerSession(params, {
240
240
  bindingStore: options.bindingStore,
241
241
  pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
@@ -1,7 +1,7 @@
1
- import { T as readCodexPluginConfig, r as resolveCodexAppServerHomeScope } from "./config-Cxw3Cl3k.js";
2
- import { Ht as isJsonObject, Lt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-kNkljY-R.js";
3
- import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-rq5tiSXk.js";
4
- import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-C5-Ds8mA.js";
1
+ import { T as readCodexPluginConfig, r as resolveCodexAppServerHomeScope } from "./config-ClwHKKTN.mjs";
2
+ import { Ht as isJsonObject, Lt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-DG1kAfGq.mjs";
3
+ import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-kWYLbaDH.mjs";
4
+ import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BCnzlajn.mjs";
5
5
  //#region extensions/codex/src/app-server/isolated-completion.ts
6
6
  const ISOLATED_PASSIVE_ITEM_TYPES = /* @__PURE__ */ new Set(["agentMessage", "reasoning"]);
7
7
  function assertIsolatedCompletionItems(items, prompt) {
@@ -46,7 +46,7 @@ function resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath(params = {}
46
46
  * Version and package pins for the managed Codex app-server runtime.
47
47
  */
48
48
  /** Exact Codex app-server version shipped by the OpenClaw Codex bridge. */
49
- const CODEX_APP_SERVER_VERSION = "0.151.0";
49
+ const CODEX_APP_SERVER_VERSION = "0.156.1";
50
50
  /** Inclusive runtime compatibility floor for external app-server binaries. */
51
51
  const MIN_SUPPORTED_CODEX_APP_SERVER_VERSION = "0.149.0";
52
52
  /** npm package name for the managed Codex app-server binary. */
@@ -1,8 +1,8 @@
1
- import { r as buildCodexRuntimeModelParams } from "./harness-DVfUQBlQ.js";
2
- import { T as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions } from "./config-Cxw3Cl3k.js";
3
- import { Ht as isJsonObject, r as captureSharedCodexAppServerCatalogLifetime } from "./shared-client-kNkljY-R.js";
4
- import { t as listAllCodexAppServerModels } from "./models-DgFWSuxA.js";
5
- import { o as withCodexAppServerJsonClient } from "./request-CCm4LaED.js";
1
+ import { r as buildCodexRuntimeModelParams } from "./harness-CawBdltH.mjs";
2
+ import { T as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions } from "./config-ClwHKKTN.mjs";
3
+ import { Ht as isJsonObject, r as captureSharedCodexAppServerCatalogLifetime } from "./shared-client-DG1kAfGq.mjs";
4
+ import { t as listAllCodexAppServerModels } from "./models-BNPc8Vr2.mjs";
5
+ import { o as withCodexAppServerJsonClient } from "./request-fEUi95EK.mjs";
6
6
  //#region extensions/codex/src/app-server/model-catalog.ts
7
7
  const DEFAULT_MODEL_DISCOVERY_TIMEOUT_MS = 2500;
8
8
  const INPUT_TYPES = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { n as assertCodexModelListResponse } from "./protocol-validators-Bg5rpNxk.js";
1
+ import { n as assertCodexModelListResponse } from "./protocol-validators-Bg5rpNxk.mjs";
2
2
  import { normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/codex/src/app-server/models.ts
4
4
  /**
@@ -37,8 +37,8 @@ async function withCodexAppServerModelRequest(options, run) {
37
37
  if (options.request) return await run(options.request);
38
38
  const timeoutMs = options.timeoutMs ?? 2500;
39
39
  const useSharedClient = options.sharedClient !== false;
40
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-kNkljY-R.js").then((n) => n.x);
41
- const { requestCodexAppServerClientJson } = await import("./request-CCm4LaED.js").then((n) => n.a);
40
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-DG1kAfGq.mjs").then((n) => n.x);
41
+ const { requestCodexAppServerClientJson } = await import("./request-fEUi95EK.mjs").then((n) => n.a);
42
42
  const client = await (useSharedClient ? getLeasedSharedCodexAppServerClient : createIsolatedCodexAppServerClient)({
43
43
  startOptions: options.startOptions,
44
44
  timeoutMs,
@@ -97,7 +97,8 @@ function readCodexModel(value) {
97
97
  };
98
98
  }
99
99
  function readReasoningEfforts(value) {
100
- return uniqueStrings(value.map((entry) => normalizeOptionalString(entry.reasoningEffort)).filter((entry) => entry !== void 0));
100
+ const efforts = value.map((entry) => normalizeOptionalString(entry.reasoningEffort)).filter((entry) => entry !== void 0);
101
+ return uniqueStrings(efforts);
101
102
  }
102
103
  function normalizeMaxPages(value) {
103
104
  return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : 20;
@@ -1,21 +1,16 @@
1
- import { Ct as retainCodexAppServerLiveThread, Ht as isJsonObject, St as releaseCodexAppServerLiveThread, ht as claimCodexAppServerLiveThread } from "./shared-client-kNkljY-R.js";
2
- import { A as shouldRecordNativeToolTranscript, C as isNonSuccessItemStatus, D as itemStatus, E as itemName, F as readHookOutputEntries, I as readItem, N as normalizeOptionalString$1, O as itemTitle, R as readNonEmptyString, S as isMutatingNativeToolItem, T as itemKind, V as readNullableString$1, b as auditNativeToolTerminalStatus, j as shouldSynthesizeToolProgressForItem, w as isSideEffectingNativeToolItem, z as readNonEmptyStringArray } from "./attempt-client-cleanup-CVPvp9dL.js";
3
- import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-CFmsKwr9.js";
4
- import { n as sanitizeCodexHistoryImagePayloads } from "./image-payload-sanitizer-CnfoUPCE.js";
5
- import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.js";
6
- import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-D80UZiJ_.js";
1
+ import { Ct as retainCodexAppServerLiveThread, Ht as isJsonObject, St as releaseCodexAppServerLiveThread, ht as claimCodexAppServerLiveThread } from "./shared-client-DG1kAfGq.mjs";
2
+ import { A as shouldRecordNativeToolTranscript, C as isNonSuccessItemStatus, D as itemStatus, E as itemName, F as readHookOutputEntries, I as readItem, N as normalizeOptionalString$1, O as itemTitle, R as readNonEmptyString, S as isMutatingNativeToolItem, T as itemKind, V as readNullableString$1, b as auditNativeToolTerminalStatus, j as shouldSynthesizeToolProgressForItem, w as isSideEffectingNativeToolItem, z as readNonEmptyStringArray } from "./attempt-client-cleanup-FBnDjmtX.mjs";
3
+ import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-LphB8slG.mjs";
4
+ import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.mjs";
5
+ import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-Dlq4n0n8.mjs";
6
+ import { n as readCodexMirroredSessionHistoryMessages } from "./session-history-Cg8PzgeU.mjs";
7
7
  import { asFiniteNumber, asNonArrayRecord, normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
8
- import fs from "node:fs/promises";
9
8
  import path from "node:path";
10
9
  import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
11
10
  import { TOOL_PROGRESS_OUTPUT_MAX_CHARS, embeddedAgentLog, emitAgentEvent, formatErrorMessage, formatToolAggregate, formatToolProgressOutput, inferToolMetaFromArgs, runAgentHarnessAfterToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
12
- import { getSessionEntry, parseSqliteSessionFileMarker, resolveTranscriptSessionKeyBySessionId } from "openclaw/plugin-sdk/session-store-runtime";
13
11
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
14
12
  import { redactSensitiveFieldValue, redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
15
13
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
16
- import { readCodexSessionTranscriptEventsBeforeAdmission } from "openclaw/plugin-sdk/codex-session-transcript-runtime";
17
- import { readSessionTranscriptEvents } from "openclaw/plugin-sdk/session-transcript-runtime";
18
- import { buildSessionContext, migrateSessionEntries, parseSessionEntries } from "openclaw/plugin-sdk/agent-sessions";
19
14
  import { createAgentHarnessTaskRuntime, deliverAgentHarnessTaskCompletion, isDurableAgentHarnessCompletionDelivery } from "openclaw/plugin-sdk/agent-harness-task-runtime";
20
15
  //#region extensions/codex/src/app-server/event-projector-tool-output.ts
21
16
  const TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS = 1e4;
@@ -114,7 +109,8 @@ function appendBoundedToolTranscriptText(currentPrefix, delta, originalLength) {
114
109
  };
115
110
  const textBudget = TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS - notice.length;
116
111
  const remaining = Math.max(0, textBudget - currentPrefix.length);
117
- const rawPrefix = truncateUtf16Safe(remaining > 0 ? `${currentPrefix}${truncateUtf16Safe(delta, remaining)}` : currentPrefix, textBudget);
112
+ const prefix = remaining > 0 ? `${currentPrefix}${truncateUtf16Safe(delta, remaining)}` : currentPrefix;
113
+ const rawPrefix = truncateUtf16Safe(prefix, textBudget);
118
114
  return {
119
115
  text: `${rawPrefix}${notice}`,
120
116
  rawPrefix
@@ -127,7 +123,8 @@ function truncateToolTranscriptText(text, originalLength = text.length) {
127
123
  if (originalLength <= 1e4 && text.length <= 1e4) return text;
128
124
  const notice = toolTranscriptTruncationNotice(originalLength);
129
125
  if (notice.length >= 1e4) return notice.slice(1, 10001);
130
- return `${truncateUtf16Safe(text, TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS - notice.length)}${notice}`;
126
+ const textBudget = TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS - notice.length;
127
+ return `${truncateUtf16Safe(text, textBudget)}${notice}`;
131
128
  }
132
129
  function formatToolSummary(toolName, meta) {
133
130
  const trimmedMeta = meta?.trim();
@@ -723,85 +720,6 @@ var CodexToolProgressProjection = class {
723
720
  }
724
721
  };
725
722
  //#endregion
726
- //#region extensions/codex/src/app-server/session-history.ts
727
- /**
728
- * Reads OpenClaw session history for Codex transcript mirroring and sanitizes
729
- * image payloads before replaying messages into the app-server projector.
730
- */
731
- function isMissingFileError(error) {
732
- return Boolean(error && typeof error === "object" && "code" in error && error.code === "ENOENT");
733
- }
734
- /** Returns sanitized session-context messages for a Codex mirrored session file. */
735
- async function readCodexMirroredSessionHistoryMessages(target, admission) {
736
- try {
737
- const entries = await readCodexMirroredSessionEntries(target, admission);
738
- if (entries.length === 0) return [];
739
- const firstEntry = entries[0];
740
- if (firstEntry?.type !== "session") return [];
741
- if (typeof firstEntry.id !== "string") return;
742
- if (firstEntry.id !== target.sessionId) return [];
743
- migrateSessionEntries(entries);
744
- return sanitizeCodexHistoryImagePayloads(buildSessionContext(entries.filter((entry) => {
745
- return entry !== null && typeof entry === "object" && !Array.isArray(entry) && entry.type !== "session";
746
- })).messages, "codex mirrored history");
747
- } catch (error) {
748
- if (isMissingFileError(error)) return [];
749
- return;
750
- }
751
- }
752
- async function readCodexMirroredSessionEntries(target, admission) {
753
- if (target.sessionTarget) {
754
- const { agentId, sessionId, sessionKey, storePath } = target.sessionTarget;
755
- if (!agentId || !sessionId || !sessionKey || !storePath || sessionId !== target.sessionId || target.agentId !== void 0 && agentId !== target.agentId || target.sessionKey !== void 0 && sessionKey !== target.sessionKey) return [];
756
- const transcriptTarget = {
757
- agentId,
758
- sessionId,
759
- sessionKey,
760
- storePath
761
- };
762
- return await (admission ? readCodexSessionTranscriptEventsBeforeAdmission(transcriptTarget, admission) : readSessionTranscriptEvents(transcriptTarget));
763
- }
764
- const sqliteMarker = parseSqliteSessionFileMarker(target.sessionFile);
765
- if (sqliteMarker) {
766
- if (sqliteMarker.sessionId !== target.sessionId || target.agentId !== void 0 && sqliteMarker.agentId !== target.agentId) return [];
767
- const sessionKey = resolveSqliteMarkerSessionKey(target, sqliteMarker);
768
- if (!sessionKey) return [];
769
- const transcriptTarget = {
770
- agentId: sqliteMarker.agentId,
771
- sessionId: sqliteMarker.sessionId,
772
- sessionKey,
773
- storePath: sqliteMarker.storePath
774
- };
775
- return await (admission ? readCodexSessionTranscriptEventsBeforeAdmission(transcriptTarget, admission) : readSessionTranscriptEvents(transcriptTarget));
776
- }
777
- if (admission) {
778
- if (admission.sessionId !== target.sessionId || target.agentId !== void 0 && admission.agentId !== target.agentId || target.sessionKey !== void 0 && admission.sessionKey !== target.sessionKey) return [];
779
- return await readCodexSessionTranscriptEventsBeforeAdmission({
780
- agentId: admission.agentId,
781
- sessionId: admission.sessionId,
782
- sessionKey: admission.sessionKey,
783
- storePath: admission.storePath
784
- }, admission);
785
- }
786
- return parseSessionEntries(await fs.readFile(target.sessionFile, "utf-8"));
787
- }
788
- function resolveSqliteMarkerSessionKey(target, marker) {
789
- const explicitSessionKey = target.sessionKey?.trim();
790
- if (explicitSessionKey) {
791
- const explicitEntry = getSessionEntry({
792
- agentId: marker.agentId,
793
- sessionKey: explicitSessionKey,
794
- storePath: marker.storePath
795
- });
796
- if (explicitEntry) return explicitEntry.sessionId === marker.sessionId ? explicitSessionKey : void 0;
797
- }
798
- return resolveTranscriptSessionKeyBySessionId({
799
- agentId: marker.agentId,
800
- sessionId: marker.sessionId,
801
- storePath: marker.storePath
802
- });
803
- }
804
- //#endregion
805
723
  //#region extensions/codex/src/app-server/event-projector-tool-transcript.ts
806
724
  const ZERO_USAGE = {
807
725
  input: 0,
@@ -2367,19 +2285,21 @@ var Monitor = class {
2367
2285
  if (childState && !childState.terminal) this.emitChildTaskActivity(notification, childState);
2368
2286
  this.captureChildAssistantMessage(notification);
2369
2287
  await this.handleChildTurnCompletion(notification);
2370
- if (notification.method === "thread/status/changed" && threadId && threadStatus) if (threadStatus !== "systemerror") {
2371
- if (childState) this.clearSystemErrorFallback(childState);
2372
- } else {
2373
- if (childState) {
2374
- this.resumeChild(childState, { scheduleRecovery: false });
2375
- this.setRecoveryFallback(childState, systemErrorFallbackCompletion(childState.childThreadId), this.now());
2288
+ if (notification.method === "thread/status/changed" && threadId && threadStatus) {
2289
+ if (threadStatus !== "systemerror") {
2290
+ if (childState) this.clearSystemErrorFallback(childState);
2291
+ } else {
2292
+ if (childState) {
2293
+ this.resumeChild(childState, { scheduleRecovery: false });
2294
+ this.setRecoveryFallback(childState, systemErrorFallbackCompletion(childState.childThreadId), this.now());
2295
+ }
2296
+ this.reconcileChildThread(threadId).catch((error) => {
2297
+ this.logRecoveryFailure(threadId, error);
2298
+ return false;
2299
+ }).then((reconciled) => {
2300
+ if (!reconciled && childState && this.childStates.get(threadId) === childState) this.scheduleRecoveryPoll(childState);
2301
+ });
2376
2302
  }
2377
- this.reconcileChildThread(threadId).catch((error) => {
2378
- this.logRecoveryFailure(threadId, error);
2379
- return false;
2380
- }).then((reconciled) => {
2381
- if (!reconciled && childState && this.childStates.get(threadId) === childState) this.scheduleRecoveryPoll(childState);
2382
- });
2383
2303
  }
2384
2304
  await this.handleCompletionNotification(notification);
2385
2305
  }
@@ -3399,4 +3319,4 @@ function unrefTimer(timer) {
3399
3319
  if (typeof timer === "object" && timer && "unref" in timer) timer.unref();
3400
3320
  }
3401
3321
  //#endregion
3402
- export { readCodexMirroredSessionHistoryMessages as a, inferCodexDynamicToolMeta as c, sanitizeCodexToolArguments as d, sanitizeCodexToolResponse as f, CodexToolTranscriptProjection as i, isCodexCommandBearingToolCall as l, CodexEventProjection as n, CodexToolProgressProjection as o, emitCodexAgentEvent as r, shouldEmitTranscriptToolProgress as s, codexNativeSubagentMonitorRuntime as t, resolveCodexToolProgressDetailMode as u };
3322
+ export { CodexToolProgressProjection as a, isCodexCommandBearingToolCall as c, sanitizeCodexToolResponse as d, CodexToolTranscriptProjection as i, resolveCodexToolProgressDetailMode as l, CodexEventProjection as n, shouldEmitTranscriptToolProgress as o, emitCodexAgentEvent as r, inferCodexDynamicToolMeta as s, codexNativeSubagentMonitorRuntime as t, sanitizeCodexToolArguments as u };
@@ -1,5 +1,5 @@
1
- import { n as resolveManagedCodexAppServerStartOptions, r as resolveManagedCodexNativeCommand, t as isManagedCodexDesktopCommand } from "./managed-binary-ZkGodW19.js";
2
- import { i as closeCodexAppServerTransportAndWait, t as createStdioTransport } from "./transport-stdio-C7-s9TLG.js";
1
+ import { n as resolveManagedCodexAppServerStartOptions, r as resolveManagedCodexNativeCommand, t as isManagedCodexDesktopCommand } from "./managed-binary-DlGr2kYu.mjs";
2
+ import { i as closeCodexAppServerTransportAndWait, t as createStdioTransport } from "./transport-stdio-Cu0xKDRo.mjs";
3
3
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { mkdir } from "node:fs/promises";
5
5
  import path from "node:path";
@@ -8,7 +8,7 @@ import { killProcessTree } from "openclaw/plugin-sdk/process-runtime";
8
8
  import { once } from "node:events";
9
9
  import { sanitizeEnvVars } from "openclaw/plugin-sdk/sandbox";
10
10
  //#region extensions/codex/src/node-exec-server.runtime.ts
11
- const MAX_CODEX_EXEC_SERVER_MESSAGE_BYTES = 64 * 1024 * 1024;
11
+ const MAX_CODEX_EXEC_SERVER_MESSAGE_BYTES = 67108864;
12
12
  const CODEX_EXEC_SERVER_TERMINATION_GRACE_MS = 1e3;
13
13
  const CODEX_EXEC_SERVER_REAP_TIMEOUT_MS = 5e3;
14
14
  const NODE_EXEC_SERVER_PLATFORM_ENVIRONMENT = /^(?:SYSTEMROOT|WINDIR|COMSPEC|PATHEXT|TEMP|TMP|TMPDIR)$/iu;
@@ -1,4 +1,4 @@
1
- import { F as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-kNkljY-R.js";
1
+ import { F as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-DG1kAfGq.mjs";
2
2
  import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
3
3
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
4
4
  //#region extensions/codex/src/app-server/plugin-approval-roundtrip.ts
@@ -23,6 +23,7 @@ function codexApprovalTimeoutText(kind) {
23
23
  async function requestPluginApproval(params) {
24
24
  const timeoutMs = DEFAULT_CODEX_APPROVAL_TIMEOUT_MS;
25
25
  return params.hostCapabilities.requestApproval({
26
+ signal: params.signal,
26
27
  title: truncateCodexApprovalDisplayText(params.title, MAX_PLUGIN_APPROVAL_TITLE_LENGTH),
27
28
  description: truncateCodexApprovalDisplayText(params.description, MAX_PLUGIN_APPROVAL_DESCRIPTION_LENGTH),
28
29
  severity: params.severity,
@@ -1,9 +1,9 @@
1
- import { k as isCodexFastServiceTier } from "./config-Cxw3Cl3k.js";
2
- import { c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-kNkljY-R.js";
3
- import { o as isCodexAppServerNativeAuthProfile, r as bindingStoreKey, s as normalizeCodexAppServerBindingModelProvider } from "./session-binding-q2WSTVmC.js";
4
- import { E as resolveCodexAppServerRequestModelSelection, O as resolveCodexBindingModelProviderFallback } from "./thread-lifecycle-Ss-uwnC4.js";
5
- import { r as formatCodexDisplayText } from "./command-formatters-C54Yg3eA.js";
6
- import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-CCQFs8lf.js";
1
+ import { k as isCodexFastServiceTier } from "./config-ClwHKKTN.mjs";
2
+ import { c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-DG1kAfGq.mjs";
3
+ import { o as isCodexAppServerNativeAuthProfile, r as bindingStoreKey, s as normalizeCodexAppServerBindingModelProvider } from "./session-binding-Bd9dh1Er.mjs";
4
+ import { A as resolveCodexBindingModelProviderFallback, O as resolveCodexAppServerRequestModelSelection } from "./thread-lifecycle-Cc6I-gbl.mjs";
5
+ import { r as formatCodexDisplayText } from "./command-formatters-DylXEqck.mjs";
6
+ import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-BgiXAp29.mjs";
7
7
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
9
9
  import { getSessionEntry, patchSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
@@ -127,15 +127,16 @@ async function setCodexConversationModel(params) {
127
127
  const lookup = buildBindingLookup(params);
128
128
  const binding = await requireThreadBinding(params.bindingStore, params.identity);
129
129
  if (binding.connectionScope === "supervision") throw new ModelSelectionLockedError();
130
+ const modelProvider = resolveConversationControlModelProvider({
131
+ authProfileId: binding.authProfileId,
132
+ bindingModel: binding.model,
133
+ bindingModelProvider: binding.modelProvider,
134
+ currentModel: model,
135
+ ...lookup
136
+ });
130
137
  const modelSelection = resolveCodexAppServerRequestModelSelection({
131
138
  model,
132
- modelProvider: resolveConversationControlModelProvider({
133
- authProfileId: binding.authProfileId,
134
- bindingModel: binding.model,
135
- bindingModelProvider: binding.modelProvider,
136
- currentModel: model,
137
- ...lookup
138
- }),
139
+ modelProvider,
139
140
  authProfileId: binding.authProfileId,
140
141
  ...lookup
141
142
  });
@@ -1,8 +1,8 @@
1
- import { P as resolveCodexAppServerHomeDir, i as resolveCodexAppServerRuntimeOptions, o as resolveCodexComputerUseConfig } from "./config-Cxw3Cl3k.js";
2
- import { At as reconcileCodexComputerUseStartArtifacts, G as isCodexAppServerConnectionClosedError, K as isCodexAppServerIndeterminateRequestCancellationError, O as acquireCodexNativeConfigFence, S as waitForCodexAppServerClientDesktopGenerationDrain, Ut as resolveCodexManagedBundledMarketplacePath, Wt as assertNotSymlink, c as getLeasedSharedCodexAppServerClient, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, p as readCodexAppServerClientProcessIdentity, q as isCodexAppServerIndeterminateTransportError, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-kNkljY-R.js";
3
- import { l as resolveMacOSDesktopCodexBundledMarketplaceCandidates, s as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand } from "./managed-binary-ZkGodW19.js";
4
- import { i as requestCodexAppServerJson } from "./request-CCm4LaED.js";
5
- import { n as describeControlFailure } from "./capabilities-CGm_94eL.js";
1
+ import { P as resolveCodexAppServerHomeDir, i as resolveCodexAppServerRuntimeOptions, o as resolveCodexComputerUseConfig } from "./config-ClwHKKTN.mjs";
2
+ import { At as reconcileCodexComputerUseStartArtifacts, G as isCodexAppServerConnectionClosedError, K as isCodexAppServerIndeterminateRequestCancellationError, O as acquireCodexNativeConfigFence, S as waitForCodexAppServerClientDesktopGenerationDrain, Ut as resolveCodexManagedBundledMarketplacePath, Wt as assertNotSymlink, c as getLeasedSharedCodexAppServerClient, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, p as readCodexAppServerClientProcessIdentity, q as isCodexAppServerIndeterminateTransportError, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-DG1kAfGq.mjs";
3
+ import { l as resolveMacOSDesktopCodexBundledMarketplaceCandidates, s as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand } from "./managed-binary-DlGr2kYu.mjs";
4
+ import { i as requestCodexAppServerJson } from "./request-fEUi95EK.mjs";
5
+ import { n as describeControlFailure } from "./capabilities-oLHKpYRj.mjs";
6
6
  import fs from "node:fs/promises";
7
7
  import path from "node:path";
8
8
  import { existsSync } from "node:fs";
@@ -721,7 +721,7 @@ function resolveComputerUseConfig(params) {
721
721
  }
722
722
  //#endregion
723
723
  //#region extensions/codex/src/app-server/plugin-metadata-cache.ts
724
- const CODEX_PLUGIN_METADATA_CACHE_TTL_MS = 3600 * 1e3;
724
+ const CODEX_PLUGIN_METADATA_CACHE_TTL_MS = 36e5;
725
725
  /** Process-local plugin metadata cache with coalesced loads per query. */
726
726
  var CodexPluginMetadataCache = class {
727
727
  constructor(nowMs = Date.now) {
@@ -1,4 +1,4 @@
1
- import { Ht as isJsonObject } from "./shared-client-kNkljY-R.js";
1
+ import { Ht as isJsonObject } from "./shared-client-DG1kAfGq.mjs";
2
2
  import { asBoolean, asFiniteNumber, normalizeOptionalString, parseStrictFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { MAX_DATE_TIMESTAMP_MS, resolveExpiresAtMsFromEpochSeconds } from "openclaw/plugin-sdk/number-runtime";
4
4
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
@@ -186,8 +186,9 @@ function isRateLimitSnapshot(value) {
186
186
  function readRateLimitWindow(snapshot, key) {
187
187
  const window = snapshot[key];
188
188
  if (!isJsonObject(window)) return;
189
+ const resetsAt = asFiniteNumber(window.resetsAt) ?? asFiniteNumber(window.resets_at);
189
190
  return {
190
- resetsAtMs: resolveExpiresAtMsFromEpochSeconds(asFiniteNumber(window.resetsAt) ?? asFiniteNumber(window.resets_at), { maxMs: MAX_DATE_TIMESTAMP_MS }) ?? 0,
191
+ resetsAtMs: resolveExpiresAtMsFromEpochSeconds(resetsAt, { maxMs: MAX_DATE_TIMESTAMP_MS }) ?? 0,
191
192
  ...readOptionalNumberField(window, "usedPercent", "used_percent"),
192
193
  ...readOptionalNumberField(window, "windowDurationMins", "window_duration_mins", "windowMinutes", "window_minutes")
193
194
  };
@@ -1,6 +1,6 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { C as isCodexRemoteExecPlacementSandbox } from "./config-Cxw3Cl3k.js";
3
- import { Et as withTimeout, c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, y as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-kNkljY-R.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
+ import { C as isCodexRemoteExecPlacementSandbox } from "./config-ClwHKKTN.mjs";
3
+ import { Et as withTimeout, c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, y as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-DG1kAfGq.mjs";
4
4
  import { resolveAgentConfig, tryResolveDefaultAgentId } from "openclaw/plugin-sdk/agent-scope-runtime";
5
5
  import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
6
6
  import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";