@openclaw/codex 2026.7.2-beta.5 → 2026.8.1-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 (59) hide show
  1. package/README.md +2 -0
  2. package/dist/{app-server-policy-BmDgseo_.js → app-server-policy-zcBDc1JU.js} +1 -1
  3. package/dist/attempt-client-cleanup-DMLXUfa8.js +735 -0
  4. package/dist/binding-connection-I5Bo-AsX.js +33 -0
  5. package/dist/{bounded-turn-FEbUXoYT.js → bounded-turn-qgZmzy_4.js} +71 -63
  6. package/dist/{capabilities-BHRSI6Cn.js → capabilities-CybGI1oz.js} +8 -2
  7. package/dist/cli-metadata.js +1 -1
  8. package/dist/{command-formatters-ico4ZFnk.js → command-formatters-B1AEz8ZA.js} +18 -18
  9. package/dist/{command-handlers-CRmnwI2N.js → command-handlers-Db8pu_ds.js} +484 -95
  10. package/dist/{compact-dEN49UH6.js → compact-LspQaGfl.js} +213 -199
  11. package/dist/{conversation-binding-data-BHRpYbX3.js → conversation-binding-data-CW2GuupV.js} +6 -10
  12. package/dist/doctor-contract-api.js +40 -43
  13. package/dist/{dynamic-tools-LIt9ojep.js → dynamic-tools-BVdyWkUD.js} +2984 -1221
  14. package/dist/effective-mcp-catalog-DIIhAtOZ.js +119 -0
  15. package/dist/{event-projector-assistant-message-DTgnPPVF.js → event-projector-assistant-message-BwxV4d6N.js} +11 -23
  16. package/dist/{attempt-notifications-CMR2_fmR.js → event-projector-usage-e5huIQWu.js} +113 -29
  17. package/dist/harness.js +83 -13
  18. package/dist/image-payload-sanitizer-CnfoUPCE.js +65 -0
  19. package/dist/index.js +703 -329
  20. package/dist/isolated-completion-C58NbL40.js +75 -0
  21. package/dist/local-runtime-attribution-B_2mnqhb.js +19 -0
  22. package/dist/media-understanding-provider.js +5 -5
  23. package/dist/{models-BA01NEez.js → models-BFlpn1Ex.js} +12 -17
  24. package/dist/native-subagent-monitor-DyTGmTUx.js +3111 -0
  25. package/dist/{plugin-app-cache-key-DSXX-rXO.js → plugin-app-cache-key-C3H2CVp6.js} +135 -42
  26. package/dist/plugin-marketplace-discovery-CzrGJdCR.js +385 -0
  27. package/dist/{computer-use-BjGylO-E.js → plugin-metadata-cache-CNJPj4_b.js} +211 -113
  28. package/dist/protocol-validators-B4F7L8Rf.js +2346 -0
  29. package/dist/{rate-limits-S_PXs0ul.js → rate-limits-DZXmOL8-.js} +17 -35
  30. package/dist/{request-CXpPennK.js → request-BRl5_UfX.js} +4 -4
  31. package/dist/{run-attempt-C5GTPJOE.js → run-attempt-P8BdxC1I.js} +1996 -5728
  32. package/dist/{runtime-artifact-C2ITXdhM.js → runtime-artifact-BVSPdd6g.js} +91 -40
  33. package/dist/{sandbox-guard-D1Wky__S.js → sandbox-guard-Cmwc9eIk.js} +10 -13
  34. package/dist/{session-binding-DlVQ-Pxs.js → session-binding-DPxIvMgE.js} +305 -271
  35. package/dist/{session-catalog-CP2oCcEb.js → session-catalog-xwNi_SDM.js} +418 -144
  36. package/dist/{session-cli-CqZ0Fp2a.js → session-cli-7hgXZDV7.js} +1 -1
  37. package/dist/session-retirement-DoMMJFKm.js +36 -0
  38. package/dist/{session-upstream-marker-QE-m5QFG.js → session-upstream-marker-CrIFX06J.js} +1 -1
  39. package/dist/{settled-turn-finalizer-CA_2QXIE.js → settled-turn-finalizer-BRWBO4MO.js} +36 -15
  40. package/dist/{shared-client-BVKE40c-.js → shared-client-kIBbGjk4.js} +721 -240
  41. package/dist/{side-question-CO12sHxo.js → side-question-9HAL26l9.js} +102 -53
  42. package/dist/{thread-lifecycle-DRg_FdzC.js → thread-lifecycle-Bu1BTDXr.js} +1355 -660
  43. package/dist/thread-ownership-6kOQHlyC.js +92 -0
  44. package/dist/thread-resume-CPrJNQVM.js +30 -0
  45. package/dist/{transcript-mirror-uKA-A4tB.js → transcript-mirror-B9gGgnJS.js} +202 -182
  46. package/dist/{transport-stdio-DXgGZ7Ib.js → transport-stdio-DIImwDVS.js} +11 -0
  47. package/dist/upstream-prompt-provenance-ClRBije0.js +41 -0
  48. package/dist/{upstream-session-fork-_Vrz4WJr.js → upstream-session-fork-CE-_LdnP.js} +5 -5
  49. package/dist/{usage-UpVbdX5G.js → usage-CHlV0e-o.js} +3 -3
  50. package/dist/{web-search-provider.runtime-CaQMYDbp.js → web-search-provider.runtime-DRw2Vl42.js} +8 -9
  51. package/openclaw.plugin.json +18 -3
  52. package/package.json +6 -7
  53. package/dist/attempt-client-cleanup-Ia52yRWc.js +0 -127
  54. package/dist/conversation-control-DE7d9DOj.js +0 -287
  55. package/dist/event-projector-usage-tvgb1NCX.js +0 -69
  56. package/dist/notification-correlation-Bj_Ak_jI.js +0 -67
  57. package/dist/protocol-validators-Dm4eXZmt.js +0 -6337
  58. package/dist/realtime-voice-api-BPcA1uN9.js +0 -494
  59. package/dist/realtime-voice-api.js +0 -2
@@ -1,69 +0,0 @@
1
- import { V as isJsonObject } from "./shared-client-BVKE40c-.js";
2
- import { it as readNonNegativeInteger, ot as readNumber } from "./thread-lifecycle-DRg_FdzC.js";
3
- import { normalizeUsage } from "openclaw/plugin-sdk/agent-harness-runtime";
4
- //#region extensions/codex/src/app-server/event-projector-usage.ts
5
- function readTokenCount(record, key) {
6
- const value = readNonNegativeInteger(record, key);
7
- return value !== void 0 && Number.isSafeInteger(value) ? value : void 0;
8
- }
9
- function readCodexThreadTokenUsage(params) {
10
- const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
11
- const last = tokenUsage && isJsonObject(tokenUsage.last) ? tokenUsage.last : void 0;
12
- return last ? normalizeCodexThreadTokenUsage(last) : void 0;
13
- }
14
- function readCodexThreadContextSnapshot(params) {
15
- const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
16
- const last = tokenUsage && isJsonObject(tokenUsage.last) ? tokenUsage.last : void 0;
17
- const modelContextWindow = tokenUsage ? readTokenCount(tokenUsage, "modelContextWindow") : void 0;
18
- const promptTokens = last ? readTokenCount(last, "inputTokens") : void 0;
19
- return {
20
- ...modelContextWindow && modelContextWindow > 0 ? { modelContextWindow } : {},
21
- ...promptTokens !== void 0 ? { promptTokens } : {}
22
- };
23
- }
24
- function projectCodexThreadUsageUpdate(params, currentUsage, applyUsage, emitContext) {
25
- applyUsage(readCodexThreadTokenUsage(params) ?? currentUsage);
26
- const context = readCodexThreadContextSnapshot(params);
27
- if (context.modelContextWindow !== void 0 || context.promptTokens !== void 0) emitContext(context);
28
- }
29
- function normalizeCodexThreadTokenUsage(record) {
30
- const inputTokens = readNumber(record, "inputTokens");
31
- const cacheRead = readNumber(record, "cachedInputTokens");
32
- const usage = normalizeUsage({
33
- input: inputTokens !== void 0 && cacheRead !== void 0 ? Math.max(0, inputTokens - cacheRead) : inputTokens,
34
- output: readNumber(record, "outputTokens"),
35
- cacheRead,
36
- total: readNumber(record, "totalTokens")
37
- });
38
- return usage ? {
39
- ...usage,
40
- contextUsage: { state: "unavailable" }
41
- } : void 0;
42
- }
43
- function normalizeCodexResponseTokenUsage(record) {
44
- const totalTokens = readTokenCount(record, "totalTokens");
45
- const inputTokens = readTokenCount(record, "inputTokens");
46
- const cacheRead = readTokenCount(record, "cachedInputTokens");
47
- const output = readTokenCount(record, "outputTokens");
48
- const reasoningOutput = readTokenCount(record, "reasoningOutputTokens");
49
- const cacheWrite = record.cacheWriteInputTokens === void 0 ? 0 : readTokenCount(record, "cacheWriteInputTokens");
50
- if (totalTokens === void 0 || inputTokens === void 0 || cacheRead === void 0 || cacheWrite === void 0 || output === void 0 || reasoningOutput === void 0 || cacheRead + cacheWrite > inputTokens || totalTokens !== inputTokens + output) return;
51
- const usage = normalizeUsage({
52
- input: inputTokens - cacheRead - cacheWrite,
53
- output,
54
- cacheRead,
55
- cacheWrite,
56
- total: totalTokens
57
- });
58
- if (!usage) return;
59
- return {
60
- ...usage,
61
- contextUsage: {
62
- state: "available",
63
- promptTokens: inputTokens,
64
- totalTokens
65
- }
66
- };
67
- }
68
- //#endregion
69
- export { projectCodexThreadUsageUpdate as n, normalizeCodexResponseTokenUsage as t };
@@ -1,67 +0,0 @@
1
- import { V as isJsonObject } from "./shared-client-BVKE40c-.js";
2
- import { T as readCodexPluginConfig, g as resolveCodexSupervisionAppServerRuntimeOptions, p as resolveCodexAppServerRuntimeOptions } from "./session-binding-DlVQ-Pxs.js";
3
- import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-DSXX-rXO.js";
4
- //#region extensions/codex/src/app-server/binding-connection.ts
5
- /** Requires the native model pair after a supervised pending branch has materialized. */
6
- function requireCodexSupervisionModelSelection(binding) {
7
- const model = binding.model?.trim();
8
- const modelProvider = binding.modelProvider?.trim();
9
- if (binding.connectionScope !== "supervision" || !model || !modelProvider) throw new Error("Codex supervised binding is missing its native model and provider; refusing request selection");
10
- return {
11
- model,
12
- modelProvider
13
- };
14
- }
15
- /** Resolves connection and auth ownership exclusively from the private thread binding. */
16
- function resolveCodexBindingAppServerConnection(params) {
17
- const { binding, authProfileId, ...runtimeParams } = params;
18
- const usesSupervisionConnection = binding?.connectionScope === "supervision";
19
- if (usesSupervisionConnection && readCodexPluginConfig(runtimeParams.pluginConfig).supervision?.enabled !== true) throw new Error("Codex supervision is disabled; refusing to open a native user-home supervised session");
20
- const appServer = (usesSupervisionConnection ? resolveCodexSupervisionAppServerRuntimeOptions : resolveCodexAppServerRuntimeOptions)(runtimeParams);
21
- if (usesSupervisionConnection) {
22
- const persistedFingerprint = binding.pendingSupervisionBranch?.connectionFingerprint ?? binding.appServerRuntimeFingerprint;
23
- const currentFingerprint = buildCodexAppServerConnectionFingerprint(appServer, runtimeParams.agentDir);
24
- if (!persistedFingerprint || persistedFingerprint !== currentFingerprint) throw new Error("Codex supervision connection changed; refusing to operate on its bound native thread");
25
- }
26
- return {
27
- appServer,
28
- usesSupervisionConnection,
29
- requestAuthProfileId: usesSupervisionConnection ? void 0 : authProfileId,
30
- clientAuthProfileId: usesSupervisionConnection ? null : authProfileId
31
- };
32
- }
33
- //#endregion
34
- //#region extensions/codex/src/app-server/notification-correlation.ts
35
- /**
36
- * Correlates Codex app-server notifications with the active thread/turn so
37
- * projectors can ignore global or stale events without losing diagnostics.
38
- */
39
- /** Returns true when a notification payload belongs to the exact active thread and turn. */
40
- function isCodexNotificationForTurn(value, threadId, turnId) {
41
- if (!isJsonObject(value)) return false;
42
- return readCodexNotificationThreadId(value) === threadId && readCodexNotificationTurnId(value) === turnId;
43
- }
44
- /**
45
- * Reads a thread id from canonical top-level or nested thread payloads.
46
- * The generated v2 schemas require top-level `threadId` on turn/item-scoped
47
- * notifications and define `Turn` without one, so `turn.threadId` is not a
48
- * wire shape and is deliberately not read here.
49
- */
50
- function readCodexNotificationThreadId(record) {
51
- const thread = isJsonObject(record.thread) ? record.thread : void 0;
52
- return readString(record, "threadId") ?? (thread ? readString(thread, "id") : void 0);
53
- }
54
- /** Reads a turn id from either top-level notification params or nested turn payloads. */
55
- function readCodexNotificationTurnId(record) {
56
- return readNestedTurnId(record) ?? readString(record, "turnId");
57
- }
58
- function readNestedTurnId(record) {
59
- const turn = record.turn;
60
- return isJsonObject(turn) ? readString(turn, "id") : void 0;
61
- }
62
- function readString(record, key) {
63
- const value = record[key];
64
- return typeof value === "string" && value.trim() ? value.trim() : void 0;
65
- }
66
- //#endregion
67
- export { resolveCodexBindingAppServerConnection as a, requireCodexSupervisionModelSelection as i, readCodexNotificationThreadId as n, readCodexNotificationTurnId as r, isCodexNotificationForTurn as t };