@openclaw/codex 2026.6.11 → 2026.7.1-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 (42) hide show
  1. package/dist/{app-server-policy-BPTiVNsW.js → app-server-policy-C968Kgin.js} +5 -5
  2. package/dist/{attempt-notifications-BYnndyFl.js → attempt-notifications-BGsEIIDI.js} +29 -40
  3. package/dist/{command-handlers-DEPTJYk0.js → command-handlers-Dv-pzAmg.js} +278 -237
  4. package/dist/command-rpc-eLM_mtC7.js +784 -0
  5. package/dist/compact-4mVBriKT.js +603 -0
  6. package/dist/{computer-use-ClrJwoFp.js → computer-use-Bmaz333N.js} +3 -3
  7. package/dist/{config-CszD0vP3.js → config-CYEDnLJ2.js} +44 -18
  8. package/dist/conversation-binding-data-BHRpYbX3.js +121 -0
  9. package/dist/doctor-contract-api.js +590 -22
  10. package/dist/harness.js +29 -10
  11. package/dist/index.js +1134 -35
  12. package/dist/{media-understanding-provider-ZUQHN7gT.js → media-understanding-provider-BHOu9-Gg.js} +13 -8
  13. package/dist/media-understanding-provider.js +1 -1
  14. package/dist/{models-CAmfBWRl.js → models-DDmO1zwd.js} +2 -2
  15. package/dist/notification-correlation-Bo7KB3ks.js +35 -0
  16. package/dist/{plugin-app-cache-key-C9ILt7bl.js → plugin-app-cache-key-BrhVdeEf.js} +13 -5
  17. package/dist/{protocol-dh-ETiNd.js → protocol-2POPqAY4.js} +2 -1
  18. package/dist/{protocol-validators-B19q5BIX.js → protocol-validators-dZQ-UTOa.js} +205 -56
  19. package/dist/provider-capabilities-DzI8fgEu.js +6172 -0
  20. package/dist/provider-catalog.js +4 -2
  21. package/dist/{provider-B-OHpbD3.js → provider-zjPfx5Fs.js} +94 -23
  22. package/dist/provider.js +2 -2
  23. package/dist/{request-Dcd452Nk.js → request-BcJyl8KL.js} +2 -2
  24. package/dist/{run-attempt-CXxtFC9d.js → run-attempt-DNSNk_G8.js} +1250 -2992
  25. package/dist/{sandbox-guard-3tnjhjFb.js → sandbox-guard-DA2TQfZW.js} +5 -3
  26. package/dist/session-binding-C1ZXdP-x.js +627 -0
  27. package/dist/session-binding-meta-B7aEMU7g.js +6 -0
  28. package/dist/shared-client-4ICy3U6d.js +1853 -0
  29. package/dist/{side-question-C-DhgJOd.js → side-question-CMOpEhvY.js} +134 -142
  30. package/dist/{thread-lifecycle-DtT3-ehU.js → thread-lifecycle-qWE88Dn2.js} +803 -481
  31. package/dist/{web-search-provider.runtime-CkwxrXQj.js → web-search-provider.runtime-BSlriav6.js} +3 -3
  32. package/npm-shrinkwrap.json +34 -34
  33. package/openclaw.plugin.json +23 -3
  34. package/package.json +9 -6
  35. package/dist/client-CLrtWgrD.js +0 -729
  36. package/dist/client-factory-Bm6HsGob.js +0 -18
  37. package/dist/compact-aQJ0ZKhe.js +0 -278
  38. package/dist/conversation-binding-t0XMLz-j.js +0 -1557
  39. package/dist/provider-capabilities-D7hnTO76.js +0 -3201
  40. package/dist/rate-limit-cache-C7qmZ0Jh.js +0 -26
  41. package/dist/session-binding-HOuPt-E0.js +0 -338
  42. package/dist/shared-client-Dtx5i7Ez.js +0 -1013
@@ -1,6 +1,6 @@
1
- import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-CszD0vP3.js";
3
- import { a as hasCodexRateLimitSnapshots, c as summarizeCodexAccountRateLimits, u as summarizeCodexRateLimits } from "./provider-B-OHpbD3.js";
1
+ import { r as isJsonObject } from "./protocol-2POPqAY4.js";
2
+ import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-CYEDnLJ2.js";
3
+ import { f as summarizeCodexAccountRateLimits, l as hasCodexRateLimitSnapshots, m as summarizeCodexRateLimits } from "./provider-zjPfx5Fs.js";
4
4
  //#region extensions/codex/src/command-formatters.ts
5
5
  /** Formats the combined `/codex status` probe result. */
6
6
  function formatCodexStatus(probes) {
@@ -285,7 +285,7 @@ function readString(record, key) {
285
285
  function resolveCodexAppServerForOpenClawToolPolicy(params) {
286
286
  if (!params.shouldPromote || !params.canUseUntrustedApprovalPolicy || params.appServer.approvalPolicy !== "never") return params.appServer;
287
287
  const explicitMode = params.execPolicy?.mode === "full" || params.pluginConfig.appServer?.mode !== void 0 || isCodexAppServerPolicyMode(params.env.OPENCLAW_CODEX_APP_SERVER_MODE);
288
- const explicitApprovalPolicy = params.pluginConfig.appServer?.approvalPolicy !== void 0 || isCodexAppServerApprovalPolicy(params.env.OPENCLAW_CODEX_APP_SERVER_APPROVAL_POLICY) || params.appServer.approvalPolicySource === "requirements";
288
+ const explicitApprovalPolicy = params.pluginConfig.appServer?.approvalPolicy !== void 0 || isConfiguredCodexAppServerApprovalPolicy(params.env.OPENCLAW_CODEX_APP_SERVER_APPROVAL_POLICY) || params.appServer.approvalPolicySource === "requirements";
289
289
  if (explicitMode || explicitApprovalPolicy) return params.appServer;
290
290
  return {
291
291
  ...params.appServer,
@@ -310,7 +310,7 @@ function resolveCodexAppServerForModelProvider(params) {
310
310
  function isCodexAppServerPolicyMode(value) {
311
311
  return value === "guardian" || value === "yolo";
312
312
  }
313
- function isCodexAppServerApprovalPolicy(value) {
313
+ function isConfiguredCodexAppServerApprovalPolicy(value) {
314
314
  return value === "never" || value === "on-request" || value === "on-failure" || value === "untrusted";
315
315
  }
316
316
  function isCodexModelBackedApprovalsReviewer(value) {
@@ -1,6 +1,5 @@
1
- import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { B as isCodexNotificationForTurn } from "./thread-lifecycle-DtT3-ehU.js";
3
- import { asBoolean } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { r as isJsonObject } from "./protocol-2POPqAY4.js";
2
+ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
4
3
  //#region extensions/codex/src/app-server/attempt-notifications.ts
5
4
  /**
6
5
  * Predicates and readers for Codex app-server notification envelopes.
@@ -34,6 +33,30 @@ function updateActiveTurnItemIds(notification, activeItemIds) {
34
33
  }
35
34
  activeItemIds.delete(itemId);
36
35
  }
36
+ function updateActiveCompletionBlockerItemIds(notification, activeItemIds) {
37
+ if (notification.method !== "item/started" && notification.method !== "item/completed") return;
38
+ const itemId = readNotificationItemId(notification);
39
+ if (!itemId) return;
40
+ if (notification.method === "item/completed") {
41
+ activeItemIds.delete(itemId);
42
+ return;
43
+ }
44
+ const item = readCodexNotificationItem(notification.params);
45
+ if (item && isCompletionBlockingItem(item)) activeItemIds.add(itemId);
46
+ }
47
+ function isCompletionBlockingItem(item) {
48
+ switch (item.type) {
49
+ case "collabAgentToolCall":
50
+ case "commandExecution":
51
+ case "dynamicToolCall":
52
+ case "fileChange":
53
+ case "imageGeneration":
54
+ case "imageView":
55
+ case "mcpToolCall":
56
+ case "webSearch": return true;
57
+ default: return false;
58
+ }
59
+ }
37
60
  function isCompletedAssistantNotification(notification) {
38
61
  if (!isJsonObject(notification.params)) return false;
39
62
  if (notification.method !== "item/completed") return false;
@@ -117,10 +140,6 @@ function isNativeToolProgressNotification(notification) {
117
140
  default: return false;
118
141
  }
119
142
  }
120
- /** Returns true for raw native response stream delta events. */
121
- function isNativeResponseStreamDeltaNotification(notification) {
122
- return notification.method.startsWith("response.") && notification.method.endsWith(".delta");
123
- }
124
143
  /** Returns true for file-change patch update notifications. */
125
144
  function isFileChangePatchUpdatedNotification(notification) {
126
145
  return notification.method === "item/fileChange/patchUpdated" && isJsonObject(notification.params);
@@ -145,38 +164,11 @@ function readRawAssistantTextPreview(item) {
145
164
  return contentText ? [contentText] : [];
146
165
  }).join("\n").trim();
147
166
  if (!text) return;
148
- return text.length > 240 ? `${text.slice(0, 237)}...` : text;
149
- }
150
- /** Returns true when notification params correlate to a specific thread/turn. */
151
- function isTurnNotification(value, threadId, turnId) {
152
- return isCodexNotificationForTurn(value, threadId, turnId);
153
- }
154
- /** Returns true when a correlated notification belongs to another active run. */
155
- function isCodexNotificationOutsideActiveRun(correlation) {
156
- if (!Boolean(correlation.threadId || correlation.nestedTurnThreadId)) return false;
157
- if (!correlation.matchesActiveThread) return true;
158
- return Boolean(correlation.turnId || correlation.nestedTurnId) && correlation.matchesActiveTurn === false;
159
- }
160
- /** Checks request params that must contain the current thread and turn ids. */
161
- function isCurrentThreadTurnRequestParams(value, threadId, turnId) {
162
- if (!isJsonObject(value)) return false;
163
- return readString(value, "threadId") === threadId && readString(value, "turnId") === turnId;
164
- }
165
- /** Checks approval request params, accepting `conversationId` as thread id. */
166
- function isCurrentApprovalTurnRequestParams(value, threadId, turnId) {
167
- if (!isJsonObject(value)) return false;
168
- return (readString(value, "threadId") ?? readString(value, "conversationId")) === threadId && readString(value, "turnId") === turnId;
169
- }
170
- /** Checks request params where `turnId` may be omitted or null for the thread. */
171
- function isCurrentThreadOptionalTurnRequestParams(value, threadId, turnId) {
172
- if (!isJsonObject(value) || readString(value, "threadId") !== threadId) return false;
173
- const requestTurnId = value.turnId;
174
- return requestTurnId === null || requestTurnId === void 0 || requestTurnId === turnId;
167
+ return text.length > 240 ? `${truncateUtf16Safe(text, 237)}...` : text;
175
168
  }
176
169
  /** Returns true for app-server error notifications that will retry. */
177
170
  function isRetryableErrorNotification(value) {
178
- if (!isJsonObject(value)) return false;
179
- return readBoolean(value, "willRetry") === true || readBoolean(value, "will_retry") === true;
171
+ return isJsonObject(value) && value.willRetry === true;
180
172
  }
181
173
  /** Returns true for terminal app-server thread status strings. */
182
174
  function isTerminalTurnStatus(status) {
@@ -216,9 +208,6 @@ function readString(record, key) {
216
208
  const value = record[key];
217
209
  return typeof value === "string" ? value : void 0;
218
210
  }
219
- function readBoolean(record, key) {
220
- return asBoolean(record[key]);
221
- }
222
211
  /** Reads a typed Codex item from notification params when id/type are present. */
223
212
  function readCodexNotificationItem(params) {
224
213
  if (!isJsonObject(params) || !isJsonObject(params.item)) return;
@@ -255,4 +244,4 @@ function isNonEmptyString(value) {
255
244
  return typeof value === "string" && value.length > 0;
256
245
  }
257
246
  //#endregion
258
- export { readCodexNotificationItem as C, updateActiveTurnItemIds as D, shouldDisarmAssistantCompletionIdleWatch as E, isTurnNotification as S, readRawResponseToolCallId as T, isRawToolOutputCompletionNotification as _, isCodexNotificationOutsideActiveRun as a, isRetryableErrorNotification as b, isCurrentThreadOptionalTurnRequestParams as c, isNativeResponseStreamDeltaNotification as d, isNativeToolProgressNotification as f, isRawReasoningCompletionNotification as g, isRawFunctionToolOutputCompletionNotification as h, isAssistantCompletionReleaseNotification as i, isCurrentThreadTurnRequestParams as l, isRawAssistantProgressNotification as m, describeNotificationActivity as n, isCodexTurnAbortMarkerNotification as o, isPendingOpenClawDynamicToolCompletionNotification as p, isAssistantCommentaryCompletionNotification as r, isCurrentApprovalTurnRequestParams as s, codexExecutionToolName as t, isFileChangePatchUpdatedNotification as u, isReasoningItemCompletionNotification as v, readNotificationItemId as w, isTerminalTurnStatus as x, isReasoningProgressNotification as y };
247
+ export { updateActiveTurnItemIds as S, readCodexNotificationItem as _, isCodexTurnAbortMarkerNotification as a, shouldDisarmAssistantCompletionIdleWatch as b, isPendingOpenClawDynamicToolCompletionNotification as c, isRawReasoningCompletionNotification as d, isRawToolOutputCompletionNotification as f, isTerminalTurnStatus as g, isRetryableErrorNotification as h, isAssistantCompletionReleaseNotification as i, isRawAssistantProgressNotification as l, isReasoningProgressNotification as m, describeNotificationActivity as n, isFileChangePatchUpdatedNotification as o, isReasoningItemCompletionNotification as p, isAssistantCommentaryCompletionNotification as r, isNativeToolProgressNotification as s, codexExecutionToolName as t, isRawFunctionToolOutputCompletionNotification as u, readNotificationItemId as v, updateActiveCompletionBlockerItemIds as x, readRawResponseToolCallId as y };