@openclaw/codex 2026.5.12-beta.5 → 2026.5.12-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  //#region extensions/codex/src/app-server/client-factory.ts
2
- const defaultCodexAppServerClientFactory = (startOptions, authProfileId, agentDir, config) => import("./shared-client-DSSqFqHM.js").then((n) => n.i).then(({ getSharedCodexAppServerClient }) => getSharedCodexAppServerClient({
2
+ const defaultCodexAppServerClientFactory = (startOptions, authProfileId, agentDir, config) => import("./shared-client-Cr6W-a2G.js").then((n) => n.i).then(({ getSharedCodexAppServerClient }) => getSharedCodexAppServerClient({
3
3
  startOptions,
4
4
  authProfileId,
5
5
  agentDir,
@@ -203,12 +203,28 @@ const CODEX_DYNAMIC_TOOL_SERVER_REQUEST_TIMEOUT_MS = 6e5;
203
203
  const CODEX_APP_SERVER_STDERR_TAIL_MAX = 2e3;
204
204
  var CodexAppServerRpcError = class extends Error {
205
205
  constructor(error, method) {
206
- super(error.message || `${method} failed`);
206
+ super(formatCodexAppServerRpcErrorMessage(error, method));
207
207
  this.name = "CodexAppServerRpcError";
208
208
  this.code = error.code;
209
209
  this.data = error.data;
210
210
  }
211
211
  };
212
+ function formatCodexAppServerRpcErrorMessage(error, method) {
213
+ const message = error.message || `${method} failed`;
214
+ const detail = readCodexAppServerRpcReloginDetail(error.data);
215
+ return detail && !message.includes(detail) ? `${message}: ${detail}` : message;
216
+ }
217
+ function readCodexAppServerRpcReloginDetail(data) {
218
+ const record = isJsonObject(data) ? data : void 0;
219
+ const nested = isJsonObject(record?.error) ? record.error : record;
220
+ if (!nested) return;
221
+ const isRelogin = nested.action === "relogin" || nested.reason === "cloudRequirements" && nested.errorCode === "Auth";
222
+ const detail = typeof nested.detail === "string" ? nested.detail.trim() : "";
223
+ return isRelogin && detail ? detail : void 0;
224
+ }
225
+ function isJsonObject(value) {
226
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
227
+ }
212
228
  function isCodexAppServerConnectionClosedError(error) {
213
229
  if (!(error instanceof Error)) return false;
214
230
  return error.message === "codex app-server client is closed" || error.message.startsWith("codex app-server exited:");
@@ -1,11 +1,11 @@
1
1
  import { i as isCodexFastServiceTier, s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
- import { n as listCodexAppServerModels, t as listAllCodexAppServerModels } from "./models-DqfYggBz.js";
2
+ import { n as listCodexAppServerModels, t as listAllCodexAppServerModels } from "./models-BmLfrDci.js";
3
3
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
4
- import { n as CODEX_CONTROL_METHODS, r as describeControlFailure, t as requestCodexAppServerJson } from "./request-BbINGs00.js";
4
+ import { n as CODEX_CONTROL_METHODS, r as describeControlFailure, t as requestCodexAppServerJson } from "./request-ohCy5ASa.js";
5
5
  import { a as formatComputerUseStatus, c as formatThreads, i as formatCodexStatus, l as readString$1, n as formatAccount, o as formatList, p as summarizeCodexAccountUsage, r as formatCodexDisplayText, s as formatModels, t as buildHelp } from "./command-formatters-Ttwc_kgX.js";
6
- import { i as readCodexAppServerBinding, o as writeCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-CDN-Pf8K.js";
7
- import { a as parseCodexFastModeArg, c as setCodexConversationFastMode, d as steerCodexConversationTurn, f as stopCodexConversationTurn, i as formatPermissionsMode, l as setCodexConversationModel, m as resolveCodexDefaultWorkspaceDir, o as parseCodexPermissionsModeArg, p as readCodexConversationBindingData, r as startCodexConversationThread, s as readCodexConversationActiveTurn, u as setCodexConversationPermissions } from "./conversation-binding-gYFBs_iE.js";
8
- import { n as installCodexComputerUse, r as readCodexComputerUseStatus } from "./computer-use-CxZtHe2d.js";
6
+ import { i as readCodexAppServerBinding, o as writeCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
7
+ import { a as parseCodexFastModeArg, c as setCodexConversationFastMode, d as steerCodexConversationTurn, f as stopCodexConversationTurn, i as formatPermissionsMode, l as setCodexConversationModel, m as resolveCodexDefaultWorkspaceDir, o as parseCodexPermissionsModeArg, p as readCodexConversationBindingData, r as startCodexConversationThread, s as readCodexConversationActiveTurn, u as setCodexConversationPermissions } from "./conversation-binding-CKofEetY.js";
8
+ import { n as installCodexComputerUse, r as readCodexComputerUseStatus } from "./computer-use-Ct3ngNBt.js";
9
9
  import { n as rememberCodexRateLimits } from "./rate-limit-cache-BFi-50LG.js";
10
10
  import crypto from "node:crypto";
11
11
  import { ensureAuthProfileStore, findNormalizedProviderValue, resolveAuthProfileEligibility, resolveAuthProfileOrder, resolveDefaultAgentDir, resolveProfileUnusableUntilForDisplay } from "openclaw/plugin-sdk/agent-runtime";
@@ -1,7 +1,7 @@
1
1
  import { s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
2
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
3
- import { i as readCodexAppServerBinding } from "./session-binding-CDN-Pf8K.js";
4
- import { n as defaultCodexAppServerClientFactory, t as createCodexAppServerClientFactoryTestHooks } from "./client-factory-Bw7M3rdW.js";
3
+ import { i as readCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
4
+ import { n as defaultCodexAppServerClientFactory, t as createCodexAppServerClientFactoryTestHooks } from "./client-factory-DfnbdQv7.js";
5
5
  import { embeddedAgentLog, formatErrorMessage, isActiveHarnessContextEngine, runHarnessContextEngineMaintenance } from "openclaw/plugin-sdk/agent-harness-runtime";
6
6
  //#region extensions/codex/src/app-server/compact.ts
7
7
  const DEFAULT_CODEX_COMPACTION_WAIT_TIMEOUT_MS = 300 * 1e3;
@@ -1,5 +1,5 @@
1
1
  import { c as resolveCodexComputerUseConfig, s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
- import { r as describeControlFailure, t as requestCodexAppServerJson } from "./request-BbINGs00.js";
2
+ import { r as describeControlFailure, t as requestCodexAppServerJson } from "./request-ohCy5ASa.js";
3
3
  import { existsSync } from "node:fs";
4
4
  //#region extensions/codex/src/app-server/computer-use.ts
5
5
  var CodexComputerUseSetupError = class extends Error {
@@ -1,9 +1,9 @@
1
1
  import { i as isCodexFastServiceTier, r as codexSandboxPolicyForTurn, s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
2
2
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
3
- import { n as CODEX_CONTROL_METHODS } from "./request-BbINGs00.js";
3
+ import { n as CODEX_CONTROL_METHODS } from "./request-ohCy5ASa.js";
4
4
  import { r as formatCodexDisplayText } from "./command-formatters-Ttwc_kgX.js";
5
- import { l as resolveCodexAppServerAuthProfileIdForAgent, r as getSharedCodexAppServerClient } from "./shared-client-DSSqFqHM.js";
6
- import { i as readCodexAppServerBinding, n as isCodexAppServerNativeAuthProfile, o as writeCodexAppServerBinding, r as normalizeCodexAppServerBindingModelProvider, t as clearCodexAppServerBinding } from "./session-binding-CDN-Pf8K.js";
5
+ import { l as resolveCodexAppServerAuthProfileIdForAgent, r as getSharedCodexAppServerClient } from "./shared-client-Cr6W-a2G.js";
6
+ import { i as readCodexAppServerBinding, n as isCodexAppServerNativeAuthProfile, o as writeCodexAppServerBinding, r as normalizeCodexAppServerBindingModelProvider, t as clearCodexAppServerBinding } from "./session-binding-CMTXuyoz.js";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
8
8
  import path from "node:path";
9
9
  import { fileURLToPath } from "node:url";
package/dist/harness.js CHANGED
@@ -18,25 +18,25 @@ function createCodexAppServerAgentHarness(options) {
18
18
  };
19
19
  },
20
20
  runAttempt: async (params) => {
21
- const { runCodexAppServerAttempt } = await import("./run-attempt-v84eRX2_.js");
21
+ const { runCodexAppServerAttempt } = await import("./run-attempt-4t06MuNr.js");
22
22
  return runCodexAppServerAttempt(params, { pluginConfig: options?.pluginConfig });
23
23
  },
24
24
  runSideQuestion: async (params) => {
25
- const { runCodexAppServerSideQuestion } = await import("./side-question-BcATx0hX.js");
25
+ const { runCodexAppServerSideQuestion } = await import("./side-question-DV7KYIB8.js");
26
26
  return runCodexAppServerSideQuestion(params, { pluginConfig: options?.pluginConfig });
27
27
  },
28
28
  compact: async (params) => {
29
- const { maybeCompactCodexAppServerSession } = await import("./compact-DfmGNV9J.js");
29
+ const { maybeCompactCodexAppServerSession } = await import("./compact-Bl8jRPk4.js");
30
30
  return maybeCompactCodexAppServerSession(params, { pluginConfig: options?.pluginConfig });
31
31
  },
32
32
  reset: async (params) => {
33
33
  if (params.sessionFile) {
34
- const { clearCodexAppServerBinding } = await import("./session-binding-CDN-Pf8K.js").then((n) => n.a);
34
+ const { clearCodexAppServerBinding } = await import("./session-binding-CMTXuyoz.js").then((n) => n.a);
35
35
  await clearCodexAppServerBinding(params.sessionFile);
36
36
  }
37
37
  },
38
38
  dispose: async () => {
39
- const { clearSharedCodexAppServerClientAndWait } = await import("./shared-client-DSSqFqHM.js").then((n) => n.i);
39
+ const { clearSharedCodexAppServerClientAndWait } = await import("./shared-client-Cr6W-a2G.js").then((n) => n.i);
40
40
  await clearSharedCodexAppServerClientAndWait();
41
41
  }
42
42
  };
package/dist/index.js CHANGED
@@ -2,12 +2,12 @@ import { createCodexAppServerAgentHarness } from "./harness.js";
2
2
  import { o as readCodexPluginConfig, s as resolveCodexAppServerRuntimeOptions, t as CODEX_PLUGINS_MARKETPLACE_NAME } from "./config-0rd3LnKg.js";
3
3
  import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
4
4
  import { buildCodexProvider } from "./provider.js";
5
- import { r as describeControlFailure, t as requestCodexAppServerJson } from "./request-BbINGs00.js";
5
+ import { r as describeControlFailure, t as requestCodexAppServerJson } from "./request-ohCy5ASa.js";
6
6
  import { r as formatCodexDisplayText } from "./command-formatters-Ttwc_kgX.js";
7
- import { l as resolveCodexAppServerAuthProfileIdForAgent, s as resolveCodexAppServerAuthAccountCacheKey, u as resolveCodexAppServerEnvApiKeyCacheKey } from "./shared-client-DSSqFqHM.js";
8
- import { n as handleCodexConversationInboundClaim, t as handleCodexConversationBindingResolved } from "./conversation-binding-gYFBs_iE.js";
7
+ import { l as resolveCodexAppServerAuthProfileIdForAgent, s as resolveCodexAppServerAuthAccountCacheKey, u as resolveCodexAppServerEnvApiKeyCacheKey } from "./shared-client-Cr6W-a2G.js";
8
+ import { n as handleCodexConversationInboundClaim, t as handleCodexConversationBindingResolved } from "./conversation-binding-CKofEetY.js";
9
9
  import { a as defaultCodexAppInventoryCache, n as pluginReadParams, t as ensureCodexPluginActivation } from "./plugin-activation-PXGqUjwY.js";
10
- import { t as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-DjrZp49q.js";
10
+ import { t as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-B7eU8fNZ.js";
11
11
  import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
12
12
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
13
13
  import os from "node:os";
@@ -39,7 +39,7 @@ async function handleCodexCommand(ctx, options = {}) {
39
39
  }
40
40
  }
41
41
  async function loadDefaultCodexSubcommandHandler() {
42
- const { handleCodexSubcommand } = await import("./command-handlers-DGTxF3Ph.js");
42
+ const { handleCodexSubcommand } = await import("./command-handlers-BYf_veEb.js");
43
43
  return handleCodexSubcommand;
44
44
  }
45
45
  //#endregion
@@ -165,7 +165,7 @@ function sourceCodexAppServerStartOptions(codexHome) {
165
165
  return {
166
166
  transport: "stdio",
167
167
  command: "codex",
168
- commandSource: "config",
168
+ commandSource: "managed",
169
169
  args: [
170
170
  "app-server",
171
171
  "--listen",
@@ -1,7 +1,7 @@
1
1
  import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
2
2
  import { s as resolveCodexAppServerRuntimeOptions } from "./config-0rd3LnKg.js";
3
3
  import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-CSY0BFBo.js";
4
- import { i as readModelListResult } from "./models-DqfYggBz.js";
4
+ import { i as readModelListResult } from "./models-BmLfrDci.js";
5
5
  import { t as isJsonObject } from "./protocol-C9UWI98H.js";
6
6
  import { validateJsonSchemaValue } from "openclaw/plugin-sdk/json-schema-runtime";
7
7
  //#region extensions/codex/media-understanding-provider.ts
@@ -62,7 +62,7 @@ async function runBoundedCodexVisionTurn(params) {
62
62
  const appServer = resolveCodexAppServerRuntimeOptions({ pluginConfig: params.options.pluginConfig });
63
63
  const timeoutMs = Math.max(100, params.timeoutMs);
64
64
  const ownsClient = !params.options.clientFactory;
65
- const client = params.options.clientFactory ? await params.options.clientFactory(appServer.start, params.profile) : await import("./shared-client-DSSqFqHM.js").then((n) => n.i).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
65
+ const client = params.options.clientFactory ? await params.options.clientFactory(appServer.start, params.profile) : await import("./shared-client-Cr6W-a2G.js").then((n) => n.i).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
66
66
  startOptions: appServer.start,
67
67
  timeoutMs,
68
68
  authProfileId: params.profile
@@ -39,7 +39,7 @@ async function listAllCodexAppServerModels(options = {}) {
39
39
  async function withCodexAppServerModelClient(options, run) {
40
40
  const timeoutMs = options.timeoutMs ?? 2500;
41
41
  const useSharedClient = options.sharedClient !== false;
42
- const { createIsolatedCodexAppServerClient, getSharedCodexAppServerClient } = await import("./shared-client-DSSqFqHM.js").then((n) => n.i);
42
+ const { createIsolatedCodexAppServerClient, getSharedCodexAppServerClient } = await import("./shared-client-Cr6W-a2G.js").then((n) => n.i);
43
43
  const client = useSharedClient ? await getSharedCodexAppServerClient({
44
44
  startOptions: options.startOptions,
45
45
  timeoutMs,
@@ -1,4 +1,4 @@
1
- import { d as resolveCodexAppServerHomeDir } from "./shared-client-DSSqFqHM.js";
1
+ import { d as resolveCodexAppServerHomeDir } from "./shared-client-Cr6W-a2G.js";
2
2
  import { i as buildCodexAppInventoryCacheKey } from "./plugin-activation-PXGqUjwY.js";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region extensions/codex/src/app-server/plugin-app-cache-key.ts
package/dist/provider.js CHANGED
@@ -123,7 +123,7 @@ async function listModelsBestEffort(params) {
123
123
  }
124
124
  }
125
125
  async function listCodexAppServerModelsLazy(options) {
126
- const { listCodexAppServerModels } = await import("./models-DqfYggBz.js").then((n) => n.r);
126
+ const { listCodexAppServerModels } = await import("./models-BmLfrDci.js").then((n) => n.r);
127
127
  return listCodexAppServerModels(options);
128
128
  }
129
129
  function normalizeTimeoutMs(value) {
@@ -1,5 +1,5 @@
1
- import { n as CodexAppServerRpcError } from "./client-kySkmL1r.js";
2
- import { a as withTimeout, n as createIsolatedCodexAppServerClient, r as getSharedCodexAppServerClient } from "./shared-client-DSSqFqHM.js";
1
+ import { n as CodexAppServerRpcError } from "./client-iRf11BEu.js";
2
+ import { a as withTimeout, n as createIsolatedCodexAppServerClient, r as getSharedCodexAppServerClient } from "./shared-client-Cr6W-a2G.js";
3
3
  //#region extensions/codex/src/app-server/capabilities.ts
4
4
  const CODEX_CONTROL_METHODS = {
5
5
  account: "account/read",