@openclaw/codex 2026.7.2-beta.7 → 2026.7.33
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.
- package/README.md +3 -27
- package/dist/{command-formatters-C336eRVS.js → .setup/app-server-policy-C_qTMEMy.mjs} +51 -9
- package/dist/{attempt-notifications-AP-a-Q5k.js → .setup/attempt-notifications-F8krwWL4.mjs} +6 -3
- package/dist/{command-handlers-DAHUSry9.js → .setup/command-handlers-DSRFfor4.mjs} +1156 -1319
- package/dist/.setup/command-rpc-BvYsfQ7G.mjs +786 -0
- package/dist/{compact-D_uvHurS.js → .setup/compact-BNgh7I4t.mjs} +10 -40
- package/dist/.setup/computer-use-C3QkmSO3.mjs +377 -0
- package/dist/.setup/config-CYEDnLJ2.mjs +1138 -0
- package/dist/{conversation-binding-data-BHRpYbX3.js → .setup/conversation-binding-data-CrRxtDBu.mjs} +1 -1
- package/dist/{bounded-turn-D2ZAgZVz.js → .setup/media-understanding-provider-EbJCyDqe.mjs} +203 -109
- package/dist/{models-BBMKU4jA.js → .setup/models-C_aZk03A.mjs} +11 -6
- package/dist/.setup/notification-correlation-iYs4WieS.mjs +35 -0
- package/dist/.setup/plugin-app-cache-key-DR8jV9oS.mjs +99 -0
- package/dist/.setup/protocol-2POPqAY4.mjs +13 -0
- package/dist/{transcript-mirror-DzsdNCf5.js → .setup/protocol-validators-dZQ-UTOa.mjs} +112 -922
- package/dist/{rate-limits-CU-gVCCS.js → .setup/provider-DGxDs6g8.mjs} +269 -13
- package/dist/{dynamic-tools-D2gYkSBO.js → .setup/provider-capabilities-DS2N_zc1.mjs} +5632 -3953
- package/dist/.setup/request-DFR0JyoV.mjs +36 -0
- package/dist/.setup/run-attempt-C7xEKFVB.mjs +8180 -0
- package/dist/{sandbox-guard-NuhpXmPB.js → .setup/sandbox-guard-DA2TQfZW.mjs} +1 -14
- package/dist/.setup/session-binding-DuihlMJc.mjs +628 -0
- package/dist/.setup/shared-client-B2KmLPRw.mjs +1854 -0
- package/dist/{side-question-_ulBk1AL.js → .setup/side-question-Cv6JXWCS.mjs} +84 -159
- package/dist/.setup/thread-lifecycle-u6CZdOOH.mjs +2593 -0
- package/dist/{web-search-provider.runtime-CCFhg2z5.js → .setup/web-search-provider.runtime-Ce2zOHxW.mjs} +3 -3
- package/dist/doctor-contract-api.js +122 -88
- package/dist/harness.js +20 -89
- package/dist/index.js +436 -1615
- package/dist/media-understanding-provider.js +1 -173
- package/dist/prompt-overlay.js +15 -0
- package/dist/provider-catalog.js +79 -0
- package/dist/provider-discovery.js +34 -0
- package/dist/provider.js +2 -0
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +178 -221
- package/package.json +8 -9
- package/dist/app-server-policy-BSaO2JIT.js +0 -49
- package/dist/auth-binding-B4FfbcCg.js +0 -62
- package/dist/capabilities-BFDTVYr4.js +0 -36
- package/dist/cli-metadata.js +0 -20
- package/dist/computer-use-CYEc8U3w.js +0 -693
- package/dist/conversation-control-xsIeXbo4.js +0 -287
- package/dist/effective-mcp-catalog-Bbd98Inw.js +0 -114
- package/dist/event-projector-assistant-message-DTgnPPVF.js +0 -101
- package/dist/event-projector-usage-Xp4AlR2k.js +0 -86
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/notification-correlation-CU6_AnOb.js +0 -67
- package/dist/plugin-app-cache-key-DztPafOA.js +0 -408
- package/dist/request-qKh331yu.js +0 -157
- package/dist/run-attempt-CY9WlDLc.js +0 -12413
- package/dist/runtime-artifact-CmtG_t1L.js +0 -554
- package/dist/session-binding-BXpo9ymA.js +0 -2214
- package/dist/session-catalog-DyOgR4WH.js +0 -2668
- package/dist/session-cli-2PZaFLRh.js +0 -175
- package/dist/session-upstream-marker-B6U7tLw5.js +0 -82
- package/dist/settled-turn-finalizer-CXY2Z9dT.js +0 -316
- package/dist/shared-client-DTbvH-XV.js +0 -3069
- package/dist/thread-lifecycle-DF53ogiA.js +0 -3987
- package/dist/transport-stdio-DXgGZ7Ib.js +0 -88
- package/dist/upstream-session-fork-Dy4Xvuoj.js +0 -320
- package/dist/usage-CQ6GhD5-.js +0 -25
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { K as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-u6CZdOOH.mjs";
|
|
2
|
+
import { u as CodexAppServerRpcError, x as resolveCodexAppServerHomeDir } from "./shared-client-B2KmLPRw.mjs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
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";
|
|
7
|
+
//#region extensions/codex/src/app-server/capabilities.ts
|
|
8
|
+
/**
|
|
9
|
+
* Capability helpers for optional Codex app-server control-plane methods.
|
|
10
|
+
*/
|
|
11
|
+
/** Known app-server methods used by OpenClaw control surfaces. */
|
|
12
|
+
const CODEX_CONTROL_METHODS = {
|
|
13
|
+
account: "account/read",
|
|
14
|
+
compact: "thread/compact/start",
|
|
15
|
+
feedback: "feedback/upload",
|
|
16
|
+
forkThread: "thread/fork",
|
|
17
|
+
listMcpServers: "mcpServerStatus/list",
|
|
18
|
+
listSkills: "skills/list",
|
|
19
|
+
listThreads: "thread/list",
|
|
20
|
+
readThread: "thread/read",
|
|
21
|
+
rateLimits: "account/rateLimits/read",
|
|
22
|
+
archiveThread: "thread/archive",
|
|
23
|
+
renameThread: "thread/name/set",
|
|
24
|
+
resumeThread: "thread/resume",
|
|
25
|
+
review: "review/start",
|
|
26
|
+
unarchiveThread: "thread/unarchive"
|
|
27
|
+
};
|
|
28
|
+
/** Formats unsupported control calls differently from ordinary RPC failures. */
|
|
29
|
+
function describeControlFailure(error) {
|
|
30
|
+
if (isUnsupportedControlError(error)) return "unsupported by this Codex app-server";
|
|
31
|
+
return error instanceof Error ? error.message : String(error);
|
|
32
|
+
}
|
|
33
|
+
function isUnsupportedControlError(error) {
|
|
34
|
+
return error instanceof CodexAppServerRpcError && error.code === -32601;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region extensions/codex/src/app-server/plugin-app-cache-key.ts
|
|
38
|
+
/**
|
|
39
|
+
* Builds stable Codex plugin/app inventory cache keys from app-server startup,
|
|
40
|
+
* auth, account, and version inputs without storing secret material.
|
|
41
|
+
*/
|
|
42
|
+
const require = createRequire(import.meta.url);
|
|
43
|
+
const CODEX_PLUGIN_VERSION = readPluginPackageVersion({ require });
|
|
44
|
+
/** Builds the full app inventory cache key for Codex plugin/app discovery. */
|
|
45
|
+
function buildCodexPluginAppCacheKey(params) {
|
|
46
|
+
return buildCodexAppInventoryCacheKey({
|
|
47
|
+
codexHome: params.runtimeIdentity?.codexHome ?? resolveCodexPluginAppCacheCodexHome(params.appServer, params.agentDir),
|
|
48
|
+
endpoint: resolveCodexPluginAppCacheEndpoint(params.appServer),
|
|
49
|
+
authProfileId: params.authProfileId,
|
|
50
|
+
accountId: params.accountId,
|
|
51
|
+
envApiKeyFingerprint: params.envApiKeyFingerprint,
|
|
52
|
+
appServerVersion: params.appServerVersion ?? params.runtimeIdentity?.serverVersion,
|
|
53
|
+
runtimeIdentity: params.runtimeIdentity
|
|
54
|
+
}, OPENCLAW_VERSION, CODEX_PLUGIN_VERSION);
|
|
55
|
+
}
|
|
56
|
+
/** Builds a durable thread-binding fingerprint for one initialized app-server runtime. */
|
|
57
|
+
function buildCodexAppServerRuntimeFingerprint(params) {
|
|
58
|
+
return JSON.stringify({
|
|
59
|
+
endpoint: resolveCodexPluginAppCacheEndpoint(params.appServer),
|
|
60
|
+
connectionClass: params.appServer.connectionClass,
|
|
61
|
+
remoteWorkspaceRoot: params.appServer.remoteWorkspaceRoot ?? null,
|
|
62
|
+
appServerVersion: params.appServerVersion ?? params.runtimeIdentity?.serverVersion ?? null,
|
|
63
|
+
runtimeIdentity: params.runtimeIdentity ?? null
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** Serializes app-server endpoint identity, including credential fingerprints. */
|
|
67
|
+
function resolveCodexPluginAppCacheEndpoint(appServer) {
|
|
68
|
+
return JSON.stringify({
|
|
69
|
+
transport: appServer.start.transport,
|
|
70
|
+
command: appServer.start.command,
|
|
71
|
+
args: appServer.start.args,
|
|
72
|
+
url: appServer.start.url ?? null,
|
|
73
|
+
credentialFingerprint: fingerprintCodexPluginAppCacheCredentials(appServer.start)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** Resolves the CODEX_HOME value that scopes local app-server inventory. */
|
|
77
|
+
function resolveCodexPluginAppCacheCodexHome(appServer, agentDir) {
|
|
78
|
+
const configuredCodexHome = appServer.start.env?.CODEX_HOME?.trim();
|
|
79
|
+
if (configuredCodexHome) return configuredCodexHome;
|
|
80
|
+
return appServer.start.transport === "stdio" && agentDir ? resolveCodexAppServerHomeDir(agentDir) : void 0;
|
|
81
|
+
}
|
|
82
|
+
function fingerprintCodexPluginAppCacheCredentials(startOptions) {
|
|
83
|
+
const authToken = startOptions.authToken ?? "";
|
|
84
|
+
const headers = Object.entries(startOptions.headers).map(([key, value]) => [key.toLowerCase(), value]).toSorted(([left], [right]) => left.localeCompare(right));
|
|
85
|
+
if (!authToken && headers.length === 0) return null;
|
|
86
|
+
const hash = createHash("sha256");
|
|
87
|
+
hash.update("openclaw:codex:plugin-app-cache-credentials:v1");
|
|
88
|
+
hash.update("\0");
|
|
89
|
+
hash.update(authToken);
|
|
90
|
+
for (const [key, value] of headers) {
|
|
91
|
+
hash.update("\0");
|
|
92
|
+
hash.update(key);
|
|
93
|
+
hash.update("\0");
|
|
94
|
+
hash.update(value);
|
|
95
|
+
}
|
|
96
|
+
return `sha256:${hash.digest("hex")}`;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { describeControlFailure as i, buildCodexPluginAppCacheKey as n, CODEX_CONTROL_METHODS as r, buildCodexAppServerRuntimeFingerprint as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region extensions/codex/src/app-server/protocol.ts
|
|
2
|
+
function flattenCodexDynamicToolFunctions(tools) {
|
|
3
|
+
return (tools ?? []).flatMap((tool) => tool.type === "namespace" ? tool.tools : [tool]);
|
|
4
|
+
}
|
|
5
|
+
const CODEX_INTERACTIVE_THREAD_SOURCE_KINDS = ["cli", "vscode"];
|
|
6
|
+
function isJsonObject(value) {
|
|
7
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
8
|
+
}
|
|
9
|
+
function isRpcResponse(message) {
|
|
10
|
+
return "id" in message && !("method" in message);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { isRpcResponse as i, flattenCodexDynamicToolFunctions as n, isJsonObject as r, CODEX_INTERACTIVE_THREAD_SOURCE_KINDS as t };
|