@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,10 +1,10 @@
1
1
  import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
2
- import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
3
- import { N as mergeCodexThreadConfigs, r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-DtT3-ehU.js";
4
- import { C as readCodexNotificationItem } from "./attempt-notifications-BYnndyFl.js";
5
- import { d as resolveCodexAppServerRuntimeOptions } from "./config-CszD0vP3.js";
6
- import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-B19q5BIX.js";
7
- import { i as readModelListResult } from "./models-CAmfBWRl.js";
2
+ import { r as isJsonObject } from "./protocol-2POPqAY4.js";
3
+ import { _ as readCodexNotificationItem } from "./attempt-notifications-BGsEIIDI.js";
4
+ import { d as resolveCodexAppServerRuntimeOptions } from "./config-CYEDnLJ2.js";
5
+ import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-dZQ-UTOa.js";
6
+ import { i as readModelListResult } from "./models-DDmO1zwd.js";
7
+ import { H as mergeCodexThreadConfigs, r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-qWE88Dn2.js";
8
8
  import { validateJsonSchemaValue } from "openclaw/plugin-sdk/json-schema-runtime";
9
9
  import fs from "node:fs/promises";
10
10
  import path from "node:path";
@@ -51,7 +51,13 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
51
51
  const agentDir = params.agentDir?.trim() || void 0;
52
52
  const startOptions = workspace.codexHome ? buildPrivateCodexAppServerStartOptions(appServer.start, workspace.codexHome) : appServer.start;
53
53
  const ownsClient = !params.options.clientFactory;
54
- const client = params.options.clientFactory ? await params.options.clientFactory(startOptions, params.profile, agentDir, params.config, { timeoutMs }) : await import("./shared-client-Dtx5i7Ez.js").then((n) => n.c).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
54
+ const client = params.options.clientFactory ? await params.options.clientFactory({
55
+ startOptions,
56
+ authProfileId: params.profile,
57
+ agentDir,
58
+ config: params.config,
59
+ timeoutMs
60
+ }) : await import("./shared-client-4ICy3U6d.js").then((n) => n.c).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
55
61
  startOptions,
56
62
  timeoutMs,
57
63
  authProfileId: params.profile,
@@ -85,7 +91,6 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
85
91
  environments: [],
86
92
  dynamicTools: [],
87
93
  experimentalRawEvents: true,
88
- persistExtendedHistory: false,
89
94
  ephemeral: true
90
95
  }, {
91
96
  timeoutMs,
@@ -1,2 +1,2 @@
1
- import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-ZUQHN7gT.js";
1
+ import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-BHOu9-Gg.js";
2
2
  export { buildCodexMediaUnderstandingProvider };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { s as readCodexModelListResponse } from "./protocol-validators-B19q5BIX.js";
2
+ import { s as readCodexModelListResponse } from "./protocol-validators-dZQ-UTOa.js";
3
3
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/codex/src/app-server/models.ts
5
5
  /**
@@ -46,7 +46,7 @@ async function listAllCodexAppServerModels(options = {}) {
46
46
  async function withCodexAppServerModelClient(options, run) {
47
47
  const timeoutMs = options.timeoutMs ?? 2500;
48
48
  const useSharedClient = options.sharedClient !== false;
49
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-Dtx5i7Ez.js").then((n) => n.c);
49
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-4ICy3U6d.js").then((n) => n.c);
50
50
  const client = useSharedClient ? await getLeasedSharedCodexAppServerClient({
51
51
  startOptions: options.startOptions,
52
52
  timeoutMs,
@@ -0,0 +1,35 @@
1
+ import { r as isJsonObject } from "./protocol-2POPqAY4.js";
2
+ //#region extensions/codex/src/app-server/notification-correlation.ts
3
+ /**
4
+ * Correlates Codex app-server notifications with the active thread/turn so
5
+ * projectors can ignore global or stale events without losing diagnostics.
6
+ */
7
+ /** Returns true when a notification payload belongs to the exact active thread and turn. */
8
+ function isCodexNotificationForTurn(value, threadId, turnId) {
9
+ if (!isJsonObject(value)) return false;
10
+ return readCodexNotificationThreadId(value) === threadId && readCodexNotificationTurnId(value) === turnId;
11
+ }
12
+ /**
13
+ * Reads a thread id from canonical top-level or nested thread payloads.
14
+ * The generated v2 schemas require top-level `threadId` on turn/item-scoped
15
+ * notifications and define `Turn` without one, so `turn.threadId` is not a
16
+ * wire shape and is deliberately not read here.
17
+ */
18
+ function readCodexNotificationThreadId(record) {
19
+ const thread = isJsonObject(record.thread) ? record.thread : void 0;
20
+ return readString(record, "threadId") ?? (thread ? readString(thread, "id") : void 0);
21
+ }
22
+ /** Reads a turn id from either top-level notification params or nested turn payloads. */
23
+ function readCodexNotificationTurnId(record) {
24
+ return readNestedTurnId(record) ?? readString(record, "turnId");
25
+ }
26
+ function readNestedTurnId(record) {
27
+ const turn = record.turn;
28
+ return isJsonObject(turn) ? readString(turn, "id") : void 0;
29
+ }
30
+ function readString(record, key) {
31
+ const value = record[key];
32
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
33
+ }
34
+ //#endregion
35
+ export { readCodexNotificationThreadId as n, readCodexNotificationTurnId as r, isCodexNotificationForTurn as t };
@@ -1,7 +1,9 @@
1
- import { L as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-DtT3-ehU.js";
2
- import { n as CodexAppServerRpcError } from "./client-CLrtWgrD.js";
3
- import { h as resolveCodexAppServerHomeDir } from "./shared-client-Dtx5i7Ez.js";
1
+ import { K as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-qWE88Dn2.js";
2
+ import { u as CodexAppServerRpcError, x as resolveCodexAppServerHomeDir } from "./shared-client-4ICy3U6d.js";
3
+ import { createRequire } from "node:module";
4
4
  import { createHash } from "node:crypto";
5
+ import { OPENCLAW_VERSION } from "openclaw/plugin-sdk/agent-harness-runtime";
6
+ import { readPluginPackageVersion } from "openclaw/plugin-sdk/extension-shared";
5
7
  //#region extensions/codex/src/app-server/capabilities.ts
6
8
  /**
7
9
  * Capability helpers for optional Codex app-server control-plane methods.
@@ -11,12 +13,17 @@ const CODEX_CONTROL_METHODS = {
11
13
  account: "account/read",
12
14
  compact: "thread/compact/start",
13
15
  feedback: "feedback/upload",
16
+ forkThread: "thread/fork",
14
17
  listMcpServers: "mcpServerStatus/list",
15
18
  listSkills: "skills/list",
16
19
  listThreads: "thread/list",
20
+ readThread: "thread/read",
17
21
  rateLimits: "account/rateLimits/read",
22
+ archiveThread: "thread/archive",
23
+ renameThread: "thread/name/set",
18
24
  resumeThread: "thread/resume",
19
- review: "review/start"
25
+ review: "review/start",
26
+ unarchiveThread: "thread/unarchive"
20
27
  };
21
28
  /** Formats unsupported control calls differently from ordinary RPC failures. */
22
29
  function describeControlFailure(error) {
@@ -32,6 +39,7 @@ function isUnsupportedControlError(error) {
32
39
  * Builds stable Codex plugin/app inventory cache keys from app-server startup,
33
40
  * auth, account, and version inputs without storing secret material.
34
41
  */
42
+ const CODEX_PLUGIN_VERSION = readPluginPackageVersion({ require: createRequire(import.meta.url) });
35
43
  /** Builds the full app inventory cache key for Codex plugin/app discovery. */
36
44
  function buildCodexPluginAppCacheKey(params) {
37
45
  return buildCodexAppInventoryCacheKey({
@@ -42,7 +50,7 @@ function buildCodexPluginAppCacheKey(params) {
42
50
  envApiKeyFingerprint: params.envApiKeyFingerprint,
43
51
  appServerVersion: params.appServerVersion ?? params.runtimeIdentity?.serverVersion,
44
52
  runtimeIdentity: params.runtimeIdentity
45
- });
53
+ }, OPENCLAW_VERSION, CODEX_PLUGIN_VERSION);
46
54
  }
47
55
  /** Builds a durable thread-binding fingerprint for one initialized app-server runtime. */
48
56
  function buildCodexAppServerRuntimeFingerprint(params) {
@@ -2,6 +2,7 @@
2
2
  function flattenCodexDynamicToolFunctions(tools) {
3
3
  return (tools ?? []).flatMap((tool) => tool.type === "namespace" ? tool.tools : [tool]);
4
4
  }
5
+ const CODEX_INTERACTIVE_THREAD_SOURCE_KINDS = ["cli", "vscode"];
5
6
  function isJsonObject(value) {
6
7
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
7
8
  }
@@ -9,4 +10,4 @@ function isRpcResponse(message) {
9
10
  return "id" in message && !("method" in message);
10
11
  }
11
12
  //#endregion
12
- export { isJsonObject as n, isRpcResponse as r, flattenCodexDynamicToolFunctions as t };
13
+ export { isRpcResponse as i, flattenCodexDynamicToolFunctions as n, isJsonObject as r, CODEX_INTERACTIVE_THREAD_SOURCE_KINDS as t };