@openclaw/codex 2026.5.24-beta.2 → 2026.5.26-beta.1

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 (27) hide show
  1. package/dist/{client-1sSy4p3z.js → client-BVK_jmHW.js} +10 -3
  2. package/dist/{client-factory-Bk6i4FnW.js → client-factory-CaOpX89B.js} +1 -1
  3. package/dist/{command-handlers-CcTABuem.js → command-handlers-D4C2y46B.js} +10 -23
  4. package/dist/compact-CRI0BEc_.js +155 -0
  5. package/dist/{computer-use-Hdq1WgTA.js → computer-use-CDDlIBhY.js} +2 -2
  6. package/dist/{config-DDMrwfJl.js → config-0-UN67Qg.js} +8 -4
  7. package/dist/{node-cli-sessions-9CAqnIaA.js → conversation-binding-BnnjOmgs.js} +426 -434
  8. package/dist/{dynamic-tools-Bq717oJR.js → dynamic-tools-BG9ICyU4.js} +20 -11
  9. package/dist/harness.js +5 -5
  10. package/dist/index.js +452 -18
  11. package/dist/media-understanding-provider.js +8 -6
  12. package/dist/{models-DtGLkqMP.js → models-ASKu9eOY.js} +4 -4
  13. package/dist/{notification-correlation-qKY_sgga.js → notification-correlation-YINts3PA.js} +26 -11
  14. package/dist/{protocol-validators-_gKDcd0x.js → protocol-validators-CSuFMLvY.js} +138 -29
  15. package/dist/provider.js +3 -3
  16. package/dist/{request-D93E78SA.js → request-DmBkYLPy.js} +3 -3
  17. package/dist/{run-attempt-CT1N__qp.js → run-attempt-CFBsGx1T.js} +488 -280
  18. package/dist/{session-binding-Bw_mfIW2.js → session-binding-UFjjws4k.js} +1 -1
  19. package/dist/{shared-client-CFCUGEVs.js → shared-client-Fou5nAyt.js} +66 -11
  20. package/dist/{side-question-CYFMTA1O.js → side-question-fq_T2d_x.js} +17 -12
  21. package/dist/test-api.js +3 -3
  22. package/dist/{thread-lifecycle-DGoaguJh.js → thread-lifecycle-BapIT9Qs.js} +113 -28
  23. package/dist/{vision-tools-DOnxzH2y.js → vision-tools-B30YCKRK.js} +16 -4
  24. package/npm-shrinkwrap.json +222 -305
  25. package/package.json +8 -8
  26. package/dist/compact-DnTgL6UT.js +0 -475
  27. package/dist/protocol-oeJQu4rs.js +0 -9
@@ -1,4 +1,5 @@
1
- import { S as invalidInlineImageText, w as sanitizeInlineImageDataUrl } from "./thread-lifecycle-DGoaguJh.js";
1
+ import { E as sanitizeInlineImageDataUrl, w as invalidInlineImageText } from "./thread-lifecycle-BapIT9Qs.js";
2
+ import { asOptionalRecord, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
2
3
  import { HEARTBEAT_RESPONSE_TOOL_NAME, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, extractToolResultMediaArtifact, filterToolResultMediaUrls, isMessagingTool, isMessagingToolSendAction, isToolWrappedWithBeforeToolCallHook, normalizeHeartbeatToolResponse, runAgentHarnessAfterToolCallHook, setBeforeToolCallDiagnosticsEnabled, wrapToolWithBeforeToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
3
4
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
4
5
  //#region extensions/codex/src/app-server/dynamic-tool-profile.ts
@@ -154,6 +155,7 @@ function createCodexDynamicToolBridge(params) {
154
155
  success: !resultIsError
155
156
  }, terminalType);
156
157
  withDynamicToolTermination(response, rawResult.terminate === true || result.terminate === true || isToolResultYield(rawResult) || isToolResultYield(result));
158
+ withDynamicToolAsyncStarted(response, isAsyncStartedToolResult(rawResult) || isAsyncStartedToolResult(result));
157
159
  return withSideEffectEvidence(response, terminalType !== "blocked");
158
160
  } catch (error) {
159
161
  collectToolTelemetry({
@@ -217,14 +219,14 @@ function resolveCodexDynamicToolResultMaxChars(ctx) {
217
219
  }) ?? DEFAULT_CODEX_DYNAMIC_TOOL_RESULT_MAX_CHARS;
218
220
  }
219
221
  function resolveAgentContextLimitValue(params) {
220
- const agents = readRecord(params.config?.agents);
221
- const defaultValue = readPositiveInteger(readRecord(readRecord(agents?.defaults)?.contextLimits)?.[params.key]);
222
+ const agents = asOptionalRecord(params.config?.agents);
223
+ const defaultValue = readPositiveInteger(asOptionalRecord(asOptionalRecord(agents?.defaults)?.contextLimits)?.[params.key]);
222
224
  if (!params.agentId) return defaultValue;
223
225
  const list = agents?.list;
224
226
  if (!Array.isArray(list)) return defaultValue;
225
227
  const normalizedAgentId = normalizeAgentId(params.agentId);
226
- return readPositiveInteger(readRecord(readRecord(list.find((entry) => {
227
- const entryId = readRecord(entry)?.id;
228
+ return readPositiveInteger(asOptionalRecord(asOptionalRecord(list.find((entry) => {
229
+ const entryId = asOptionalRecord(entry)?.id;
228
230
  return typeof entryId === "string" && normalizeAgentId(entryId) === normalizedAgentId;
229
231
  }))?.contextLimits)?.[params.key]) ?? defaultValue;
230
232
  }
@@ -306,12 +308,6 @@ function extractInternalSourceReplyPayload(details) {
306
308
  };
307
309
  return text || mediaUrls.length > 0 || payload.presentation || payload.interactive ? payload : void 0;
308
310
  }
309
- function isRecord(value) {
310
- return value !== null && typeof value === "object" && !Array.isArray(value);
311
- }
312
- function readRecord(value) {
313
- return isRecord(value) ? value : void 0;
314
- }
315
311
  function readPositiveInteger(value) {
316
312
  if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return;
317
313
  return Math.floor(value);
@@ -330,6 +326,10 @@ function isToolResultYield(result) {
330
326
  if (!isRecord(details) || typeof details.status !== "string") return false;
331
327
  return details.status.trim().toLowerCase() === "yielded";
332
328
  }
329
+ function isAsyncStartedToolResult(result) {
330
+ const details = result.details;
331
+ return isRecord(details) && details.async === true && details.status === "started";
332
+ }
333
333
  function inferToolResultDiagnosticTerminalType(result, isError) {
334
334
  const details = result.details;
335
335
  if (isRecord(details) && typeof details.status === "string") {
@@ -363,6 +363,15 @@ function withDynamicToolTermination(response, terminate) {
363
363
  });
364
364
  return response;
365
365
  }
366
+ function withDynamicToolAsyncStarted(response, asyncStarted) {
367
+ if (!asyncStarted) return response;
368
+ Object.defineProperty(response, "asyncStarted", {
369
+ configurable: true,
370
+ enumerable: false,
371
+ value: true
372
+ });
373
+ return response;
374
+ }
366
375
  function normalizeToolResultMaxChars(maxChars) {
367
376
  return typeof maxChars === "number" && Number.isFinite(maxChars) && maxChars > 0 ? Math.floor(maxChars) : DEFAULT_CODEX_DYNAMIC_TOOL_RESULT_MAX_CHARS;
368
377
  }
package/dist/harness.js CHANGED
@@ -28,31 +28,31 @@ function createCodexAppServerAgentHarness(options) {
28
28
  };
29
29
  },
30
30
  runAttempt: async (params) => {
31
- const { runCodexAppServerAttempt } = await import("./run-attempt-CT1N__qp.js");
31
+ const { runCodexAppServerAttempt } = await import("./run-attempt-CFBsGx1T.js");
32
32
  return runCodexAppServerAttempt(params, {
33
33
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
34
34
  nativeHookRelay: { enabled: true }
35
35
  });
36
36
  },
37
37
  runSideQuestion: async (params) => {
38
- const { runCodexAppServerSideQuestion } = await import("./side-question-CYFMTA1O.js");
38
+ const { runCodexAppServerSideQuestion } = await import("./side-question-fq_T2d_x.js");
39
39
  return runCodexAppServerSideQuestion(params, {
40
40
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
41
41
  nativeHookRelay: { enabled: true }
42
42
  });
43
43
  },
44
44
  compact: async (params) => {
45
- const { maybeCompactCodexAppServerSession } = await import("./compact-DnTgL6UT.js");
45
+ const { maybeCompactCodexAppServerSession } = await import("./compact-CRI0BEc_.js");
46
46
  return maybeCompactCodexAppServerSession(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
47
47
  },
48
48
  reset: async (params) => {
49
49
  if (params.sessionFile) {
50
- const { clearCodexAppServerBinding } = await import("./session-binding-Bw_mfIW2.js").then((n) => n.a);
50
+ const { clearCodexAppServerBinding } = await import("./session-binding-UFjjws4k.js").then((n) => n.a);
51
51
  await clearCodexAppServerBinding(params.sessionFile);
52
52
  }
53
53
  },
54
54
  dispose: async () => {
55
- const { clearSharedCodexAppServerClientAndWait } = await import("./shared-client-CFCUGEVs.js").then((n) => n.a);
55
+ const { clearSharedCodexAppServerClientAndWait } = await import("./shared-client-Fou5nAyt.js").then((n) => n.a);
56
56
  await clearSharedCodexAppServerClientAndWait();
57
57
  }
58
58
  };