@openclaw/codex 2026.5.30-beta.1 → 2026.5.31-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +11 -0
  2. package/dist/{client-B08x7Y93.js → client-BnOmn0y-.js} +14 -6
  3. package/dist/{client-factory-bqIbmRDu.js → client-factory-B8dh39UW.js} +1 -1
  4. package/dist/{command-handlers-VSWuNdgc.js → command-handlers-BsK6kZJi.js} +263 -14
  5. package/dist/{compact-DJruF_vy.js → compact-BXLjhUHX.js} +3 -3
  6. package/dist/{computer-use-Cq-EEnLL.js → computer-use-D-0EFJBJ.js} +3 -4
  7. package/dist/{config--tW89bHH.js → config-AlzuNKCY.js} +14 -5
  8. package/dist/{conversation-binding-DzF_JII7.js → conversation-binding-KUDxop-C.js} +9 -9
  9. package/dist/doctor-contract-api.js +1 -1
  10. package/dist/harness.js +5 -5
  11. package/dist/index.js +14 -11
  12. package/dist/media-understanding-provider.js +8 -9
  13. package/dist/{models-DuyStYTT.js → models-mbjSisZL.js} +2 -2
  14. package/dist/{native-hook-relay-zY7m-pAu.js → native-hook-relay-DCxPRaBN.js} +7 -7
  15. package/dist/{notification-correlation-DR9cQN_M.js → notification-correlation-BykOI_jh.js} +2 -2
  16. package/dist/{protocol-validators-DtjYmUw_.js → protocol-validators-DIt7cXIp.js} +2 -2
  17. package/dist/provider.js +2 -2
  18. package/dist/{request-DGOj3AyX.js → request-DuFgTwRU.js} +3 -3
  19. package/dist/{run-attempt-lD4FLxNV.js → run-attempt-CgaY9r5u.js} +172 -61
  20. package/dist/{session-binding-BGOpicy0.js → session-binding-BXJAV_xy.js} +10 -8
  21. package/dist/{shared-client-2d0XB7wz.js → shared-client-DBlR-rV2.js} +2 -2
  22. package/dist/{side-question-BsyY3v3K.js → side-question-SjBLGANT.js} +9 -9
  23. package/dist/{thread-lifecycle-BR74qMaY.js → thread-lifecycle-Bnlv_Q8u.js} +49 -33
  24. package/npm-shrinkwrap.json +34 -34
  25. package/openclaw.plugin.json +1 -1
  26. package/package.json +8 -7
@@ -1,12 +1,11 @@
1
1
  import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
2
- import "./client-factory-bqIbmRDu.js";
3
- import { l as resolveCodexAppServerRuntimeOptions } from "./config--tW89bHH.js";
4
- import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-DtjYmUw_.js";
5
- import { i as readModelListResult } from "./models-DuyStYTT.js";
6
- import { l as isJsonObject } from "./client-B08x7Y93.js";
7
- import { r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-BR74qMaY.js";
2
+ import { d as resolveCodexAppServerRuntimeOptions } from "./config-AlzuNKCY.js";
3
+ import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-DIt7cXIp.js";
4
+ import { i as readModelListResult } from "./models-mbjSisZL.js";
5
+ import { l as isJsonObject } from "./client-BnOmn0y-.js";
6
+ import { r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-Bnlv_Q8u.js";
8
7
  import { validateJsonSchemaValue } from "openclaw/plugin-sdk/json-schema-runtime";
9
- import "openclaw/plugin-sdk/media-understanding";
8
+ import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
10
9
  //#region extensions/codex/media-understanding-provider.ts
11
10
  const DEFAULT_CODEX_IMAGE_MODEL = FALLBACK_CODEX_MODELS.find((model) => model.inputModalities.includes("image"))?.id ?? FALLBACK_CODEX_MODELS[0]?.id;
12
11
  const DEFAULT_CODEX_IMAGE_PROMPT = "Describe the image.";
@@ -63,9 +62,9 @@ async function describeCodexImages(req, options) {
63
62
  }
64
63
  async function runBoundedCodexVisionTurn(params) {
65
64
  const appServer = resolveCodexAppServerRuntimeOptions({ pluginConfig: params.options.pluginConfig });
66
- const timeoutMs = Math.max(100, params.timeoutMs);
65
+ const timeoutMs = resolveTimerTimeoutMs(params.timeoutMs, 100, 100);
67
66
  const ownsClient = !params.options.clientFactory;
68
- const client = params.options.clientFactory ? await params.options.clientFactory(appServer.start, params.profile) : await import("./shared-client-2d0XB7wz.js").then((n) => n.s).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
67
+ const client = params.options.clientFactory ? await params.options.clientFactory(appServer.start, params.profile) : await import("./shared-client-DBlR-rV2.js").then((n) => n.s).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
69
68
  startOptions: appServer.start,
70
69
  timeoutMs,
71
70
  authProfileId: params.profile
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { s as readCodexModelListResponse } from "./protocol-validators-DtjYmUw_.js";
2
+ import { s as readCodexModelListResponse } from "./protocol-validators-DIt7cXIp.js";
3
3
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/codex/src/app-server/models.ts
5
5
  var models_exports = /* @__PURE__ */ __exportAll({
@@ -40,7 +40,7 @@ async function listAllCodexAppServerModels(options = {}) {
40
40
  async function withCodexAppServerModelClient(options, run) {
41
41
  const timeoutMs = options.timeoutMs ?? 2500;
42
42
  const useSharedClient = options.sharedClient !== false;
43
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-2d0XB7wz.js").then((n) => n.s);
43
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-DBlR-rV2.js").then((n) => n.s);
44
44
  const client = useSharedClient ? await getLeasedSharedCodexAppServerClient({
45
45
  startOptions: options.startOptions,
46
46
  timeoutMs,
@@ -1,11 +1,11 @@
1
- import { l as isJsonObject } from "./client-B08x7Y93.js";
2
- import { S as invalidInlineImageText, w as sanitizeInlineImageDataUrl } from "./thread-lifecycle-BR74qMaY.js";
3
- import { s as formatCodexDisplayText } from "./notification-correlation-DR9cQN_M.js";
1
+ import { l as isJsonObject } from "./client-BnOmn0y-.js";
2
+ import { S as invalidInlineImageText, w as sanitizeInlineImageDataUrl } from "./thread-lifecycle-Bnlv_Q8u.js";
3
+ import { s as formatCodexDisplayText } from "./notification-correlation-BykOI_jh.js";
4
+ import { addTimerTimeoutGraceMs, finiteSecondsToTimerSafeMilliseconds, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
4
5
  import { createHash } from "node:crypto";
5
6
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
6
7
  import { asOptionalRecord, isRecord, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
7
8
  import { HEARTBEAT_RESPONSE_TOOL_NAME, buildAgentHookContextChannelFields, callGatewayTool, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, embeddedAgentLog, extractToolResultMediaArtifact, filterToolResultMediaUrls, formatApprovalDisplayPath, hasNativeHookRelayInvocation, invokeNativeHookRelay, isMessagingTool, isMessagingToolSendAction, isToolWrappedWithBeforeToolCallHook, normalizeHeartbeatToolResponse, projectRuntimeToolInputSchema, registerNativeHookRelay, resolveNativeHookRelayDeferredToolApproval, runAgentHarnessAfterToolCallHook, runBeforeToolCallHook, setBeforeToolCallDiagnosticsEnabled, wrapToolWithBeforeToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
8
- import { addTimerTimeoutGraceMs, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
9
9
  import { emitTrustedDiagnosticEvent } from "openclaw/plugin-sdk/diagnostic-runtime";
10
10
  const CODEX_TURN_COMPLETION_IDLE_TIMEOUT_MS = 6e4;
11
11
  const CODEX_TURN_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS = 1e4;
@@ -1790,7 +1790,7 @@ function formatDisplayJsonValue(value, depth = MAX_DISPLAY_VALUE_DEPTH) {
1790
1790
  let count = 0;
1791
1791
  let truncated = false;
1792
1792
  for (const key in value) {
1793
- if (!Object.prototype.hasOwnProperty.call(value, key)) continue;
1793
+ if (!Object.hasOwn(value, key)) continue;
1794
1794
  if (count >= MAX_DISPLAY_VALUE_OBJECT_KEYS) {
1795
1795
  truncated = true;
1796
1796
  break;
@@ -2025,8 +2025,8 @@ function scheduleCodexNativeHookRelayUnregister(params) {
2025
2025
  timeout.unref();
2026
2026
  }
2027
2027
  function resolveCodexNativeHookRelayUnregisterGraceMs(hookTimeoutSec) {
2028
- const hookTimeoutMs = typeof hookTimeoutSec === "number" && Number.isFinite(hookTimeoutSec) && hookTimeoutSec > 0 ? Math.ceil(hookTimeoutSec) * 1e3 : 0;
2029
- return Math.max(CODEX_NATIVE_HOOK_RELAY_UNREGISTER_GRACE_MS, hookTimeoutMs + CODEX_NATIVE_HOOK_RELAY_UNREGISTER_EXTRA_GRACE_MS);
2028
+ const hookTimeoutMs = typeof hookTimeoutSec === "number" && Number.isFinite(hookTimeoutSec) && hookTimeoutSec > 0 ? finiteSecondsToTimerSafeMilliseconds(Math.ceil(hookTimeoutSec)) ?? 0 : 0;
2029
+ return Math.max(CODEX_NATIVE_HOOK_RELAY_UNREGISTER_GRACE_MS, addTimerTimeoutGraceMs(hookTimeoutMs, CODEX_NATIVE_HOOK_RELAY_UNREGISTER_EXTRA_GRACE_MS) ?? 0);
2030
2030
  }
2031
2031
  function createCodexNativeHookRelay(params) {
2032
2032
  if (params.options?.enabled === false) return;
@@ -1,6 +1,6 @@
1
- import { l as isJsonObject } from "./client-B08x7Y93.js";
2
- import { asFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { l as isJsonObject } from "./client-BnOmn0y-.js";
3
2
  import { MAX_DATE_TIMESTAMP_MS, resolveExpiresAtMsFromEpochSeconds } from "openclaw/plugin-sdk/number-runtime";
3
+ import { asFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/codex/src/app-server/rate-limits.ts
5
5
  const CODEX_LIMIT_ID = "codex";
6
6
  const LIMIT_WINDOW_KEYS = ["primary", "secondary"];
@@ -5553,7 +5553,7 @@ function normalizeJsonSchemaNode(schema) {
5553
5553
  }));
5554
5554
  }
5555
5555
  function readDefault(schema) {
5556
- if (!isRecord(schema) || !Object.prototype.hasOwnProperty.call(schema, "default")) return;
5556
+ if (!isRecord(schema) || !Object.hasOwn(schema, "default")) return;
5557
5557
  return structuredClone(schema.default);
5558
5558
  }
5559
5559
  function decodePointerSegment(segment) {
@@ -5595,7 +5595,7 @@ function applySchemaDefaults(schema, value, root = schema, resolvingRefs = /* @_
5595
5595
  if (defaultedValue !== void 0 && defaultedValue !== currentValue) nextValue[key] = defaultedValue;
5596
5596
  }
5597
5597
  if (isRecord(schema.additionalProperties)) for (const key of Object.keys(nextValue)) {
5598
- if (Object.prototype.hasOwnProperty.call(schema.properties, key)) continue;
5598
+ if (Object.hasOwn(schema.properties, key)) continue;
5599
5599
  nextValue[key] = applySchemaDefaults(schema.additionalProperties, nextValue[key], root, resolvingRefs);
5600
5600
  }
5601
5601
  }
package/dist/provider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CODEX_APP_SERVER_AUTH_MARKER, CODEX_BASE_URL, CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS, buildCodexModelDefinition, buildCodexProviderConfig } from "./provider-catalog.js";
2
- import { c as readCodexPluginConfig, l as resolveCodexAppServerRuntimeOptions } from "./config--tW89bHH.js";
2
+ import { d as resolveCodexAppServerRuntimeOptions, u as readCodexPluginConfig } from "./config-AlzuNKCY.js";
3
3
  import { resolveCodexSystemPromptContribution } from "./prompt-overlay.js";
4
4
  import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
5
5
  import { normalizeModelCompat } from "openclaw/plugin-sdk/provider-model-shared";
@@ -123,7 +123,7 @@ async function listModelsBestEffort(params) {
123
123
  }
124
124
  }
125
125
  async function listCodexAppServerModelsLazy(options) {
126
- const { listCodexAppServerModels } = await import("./models-DuyStYTT.js").then((n) => n.r);
126
+ const { listCodexAppServerModels } = await import("./models-mbjSisZL.js").then((n) => n.r);
127
127
  return listCodexAppServerModels(options);
128
128
  }
129
129
  function normalizeTimeoutMs(value) {
@@ -1,6 +1,6 @@
1
- import { n as CodexAppServerRpcError } from "./client-B08x7Y93.js";
2
- import { b as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-BR74qMaY.js";
3
- import { a as releaseLeasedSharedCodexAppServerClient, c as withTimeout, i as getLeasedSharedCodexAppServerClient, m as resolveCodexAppServerHomeDir, r as createIsolatedCodexAppServerClient } from "./shared-client-2d0XB7wz.js";
1
+ import { n as CodexAppServerRpcError } from "./client-BnOmn0y-.js";
2
+ import { b as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-Bnlv_Q8u.js";
3
+ import { a as releaseLeasedSharedCodexAppServerClient, c as withTimeout, i as getLeasedSharedCodexAppServerClient, m as resolveCodexAppServerHomeDir, r as createIsolatedCodexAppServerClient } from "./shared-client-DBlR-rV2.js";
4
4
  import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-DMCJlzmz.js";
5
5
  import { createHash } from "node:crypto";
6
6
  //#region extensions/codex/src/app-server/capabilities.ts