@openclaw/codex 2026.9.4 → 2026.9.6
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/account-usage-runtime-Eem_WGqY.mjs +75 -0
- package/dist/{apply-CvT8tW5i.js → .setup/apply-DDOi8uNx.mjs} +24 -30
- package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
- package/dist/{attempt-client-cleanup-DKHzbwt5.js → .setup/attempt-client-cleanup-CEv1cKwF.mjs} +79 -49
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +331 -0
- package/dist/{auth-binding-CWlKVccJ.js → .setup/auth-binding-DhLWa_7K.mjs} +1 -1
- package/dist/{auth-cache-key-7orQae_j.js → .setup/auth-cache-key-B2mpaI9D.mjs} +9 -81
- package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/binding-connection-ThoatDcb.mjs +50 -0
- package/dist/.setup/binding-connection.runtime-yoHrABt-.mjs +48 -0
- package/dist/{bounded-turn-C_Hneydj.js → .setup/bounded-turn-B2HScEgT.mjs} +143 -32
- package/dist/{build-state-BCmg9-5p.js → .setup/build-state-C7EnDVgr.mjs} +1 -1
- package/dist/{capabilities-8vx68WLH.js → .setup/capabilities-CDXOOFdZ.mjs} +1 -1
- package/dist/{client-B57KWPQx.js → .setup/client-Cs08OXVQ.mjs} +705 -512
- package/dist/.setup/client-catalog-response-BMgt_4q4.mjs +285 -0
- package/dist/{command-dispatch-BpduNGVf.js → .setup/command-dispatch-B4JuOsOk.mjs} +8 -4
- package/dist/{command-formatters-lxlkNZgU.js → .setup/command-formatters-Bmqvr9tO.mjs} +8 -4
- package/dist/{command-handlers-tiL9iWj7.js → .setup/command-handlers-DW7Lx9oH.mjs} +137 -186
- package/dist/{command-rpc-CR5EOEZX.js → .setup/command-rpc-DixIj3HW.mjs} +47 -23
- package/dist/{compact-B_H3AOd7.js → .setup/compact-Du5UvtxA.mjs} +29 -51
- package/dist/{config-oIORaQ5T.js → .setup/config-BoTP_mrL.mjs} +5 -4
- package/dist/{config-options-CXMq1T-C.js → .setup/config-options-BvaRs51b.mjs} +50 -446
- package/dist/{protocol-5bh1G-H7.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
- package/dist/{config-runtime-D0zGNIHu.js → .setup/config-runtime-C8Rw1m1m.mjs} +2 -2
- package/dist/.setup/config-security-BEReZ6go.mjs +380 -0
- package/dist/{conversation-binding-DsB4-O7U.js → .setup/conversation-binding-DP-gMrBP.mjs} +29 -38
- package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
- package/dist/{conversation-control-CtUu1b3m.js → .setup/conversation-control-uK9Jomlc.mjs} +32 -67
- package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
- package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
- package/dist/{dynamic-tools-CmN5RAip.js → .setup/dynamic-tools-BDXl-8Cw.mjs} +936 -620
- package/dist/{effective-mcp-catalog-Bd73bqA8.js → .setup/effective-mcp-catalog-CvnvnGIe.mjs} +3 -3
- package/dist/{ephemeral-turn-D78_VmzO.js → .setup/ephemeral-turn-poidXgek.mjs} +9 -7
- package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-BsruvNrH.mjs} +8 -7
- package/dist/{event-projector-items-5VhsECCO.js → .setup/event-projector-items-C6L_5ZiT.mjs} +42 -8
- package/dist/{attempt-notifications-C9XufG6l.js → .setup/event-projector-usage-CnBS8Wa3.mjs} +102 -9
- package/dist/{harness-C7rRa7bm.js → .setup/harness-a_MsE4-_.mjs} +81 -21
- package/dist/{inference-context-Dr_mzvk4.js → .setup/inference-context-D96l9-ew.mjs} +1 -1
- package/dist/.setup/inference-proxy-b-aJMSxm.mjs +601 -0
- package/dist/{isolated-completion-DWVb5U2J.js → .setup/isolated-completion-BIZFhTNG.mjs} +18 -11
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/{managed-binary-D22rNEcR.js → .setup/managed-binary-BnshlFag.mjs} +14 -3
- package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
- package/dist/{model-catalog-Dq2n8f_p.js → .setup/model-catalog-CfXJf9Ay.mjs} +36 -12
- package/dist/{models-PCKOim-h.js → .setup/models-KnqBv0hE.mjs} +3 -3
- package/dist/.setup/native-auth-rWbGbMn3.mjs +57 -0
- package/dist/{native-subagent-history-DjtPloaU.js → .setup/native-subagent-history-0nYYgo0k.mjs} +43 -35
- package/dist/.setup/native-subagent-monitor-D3filLY2.mjs +4859 -0
- package/dist/{native-subagent-task-ids-BzTdT0Uw.js → .setup/native-subagent-task-ids-wb8CKZGN.mjs} +98 -44
- package/dist/{node-cli-sessions-DKaOmVUh.js → .setup/node-cli-sessions-r3avj02l.mjs} +86 -68
- package/dist/.setup/node-exec-server.runtime-BDwWXVpK.mjs +247 -0
- package/dist/{plan-7uG-Fp36.js → .setup/plan-CN3VwfNU.mjs} +133 -119
- package/dist/{plugin-activation-BYQculil.js → .setup/plugin-activation-DT3MNtqj.mjs} +7 -16
- package/dist/{plugin-app-cache-key-d0eKxy7b.js → .setup/plugin-app-cache-key-B2CsSdnV.mjs} +32 -44
- package/dist/{plugin-approval-roundtrip-Bz3FT8W5.js → .setup/plugin-approval-roundtrip-C0MZzCuP.mjs} +1 -1
- package/dist/{plugin-inventory-oL4Na1ZG.js → .setup/plugin-inventory-BoRei8Z4.mjs} +21 -11
- package/dist/{plugin-marketplace-discovery-P-Vndfqq.js → .setup/plugin-marketplace-discovery-CDOi8IFs.mjs} +4 -1
- package/dist/{plugin-metadata-cache-ClPJpRio.js → .setup/plugin-metadata-cache-Ctmo83k_.mjs} +226 -141
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/{provider-MQ8PVkuE.js → .setup/provider-BOsxQHOM.mjs} +9 -5
- package/dist/{provider-capabilities-BvCUL69A.js → .setup/provider-capabilities-BfE88FZ5.mjs} +31 -3
- package/dist/{rate-limits-CBMmWBr9.js → .setup/rate-limits-CMU3DUD0.mjs} +174 -151
- package/dist/{request-B7hEkBGq.js → .setup/request-D2L0zMrq.mjs} +130 -42
- package/dist/{run-attempt-CvsAAGa0.js → .setup/run-attempt-BHu11r7h.mjs} +1628 -966
- package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
- package/dist/{runtime-artifact-BJ0rXBZ_.js → .setup/runtime-artifact-CLZ8udh-.mjs} +29 -45
- package/dist/{sandbox-guard-BxgyoM8M.js → .setup/sandbox-guard-C2sRMOEY.mjs} +3 -3
- package/dist/{session-binding-CI8UuilT.js → .setup/session-binding-Cm0apEbd.mjs} +36 -83
- package/dist/{session-binding-record-Bcvslnhf.js → .setup/session-binding-record-BGoz8wOK.mjs} +202 -5
- package/dist/.setup/session-binding-sidecars-BlB5EvIS.mjs +546 -0
- package/dist/.setup/session-catalog-Pno1xGcl.mjs +2764 -0
- package/dist/{session-catalog-adoption-tcZi1IfX.js → .setup/session-catalog-adoption-BI6UTDZT.mjs} +58 -26
- package/dist/{session-catalog-archive-CwKg8Xz2.js → .setup/session-catalog-archive-lHBqzhaO.mjs} +6 -6
- package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +347 -0
- package/dist/.setup/session-catalog-index-B9_VQIUz.mjs +1170 -0
- package/dist/.setup/session-catalog-index-order-hcdz07yN.mjs +48 -0
- package/dist/.setup/session-catalog-index-state-Dgh8ORJm.mjs +183 -0
- package/dist/{thread-history-page-D0JIp48V.js → .setup/session-catalog-native-projection-DowriLid.mjs} +223 -95
- package/dist/{session-catalog-node-adoption-B1tgDW-m.js → .setup/session-catalog-node-adoption-ITddWx_X.mjs} +25 -13
- package/dist/{session-catalog-node-continue-Ci-DXyJP.js → .setup/session-catalog-node-continue-6g6qi4A9.mjs} +24 -15
- package/dist/.setup/session-catalog-projection-zK_PUsiE.mjs +422 -0
- package/dist/{session-cli-DNN_jhGc.js → .setup/session-cli-irrD-uo7.mjs} +3 -3
- package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-BrqhSCf9.mjs} +19 -19
- package/dist/{session-history-import-DwyijFI6.js → .setup/session-history-import-D-3wAgOP.mjs} +4 -4
- package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
- package/dist/{session-history.worker-BeK1YOyT.js → .setup/session-history.worker-CaCh0xF_.mjs} +10 -24
- package/dist/{session-initialization-Ct0_Hzmg.js → .setup/session-initialization-rcgbZiid.mjs} +2 -2
- package/dist/{session-permission-policy-BBmXA8Eg.js → .setup/session-permission-policy-BI1QK_98.mjs} +2 -2
- package/dist/{session-retirement-B2YfbAAT.js → .setup/session-retirement-BH-S6qkJ.mjs} +26 -7
- package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
- package/dist/{settled-turn-finalizer-Dn91stmc.js → .setup/settled-turn-finalizer-DiAi6Kx6.mjs} +12 -12
- package/dist/{shared-client-CscigXXL.js → .setup/shared-client-DA4VR4Eb.mjs} +332 -221
- package/dist/{side-question-BGMJQf4U.js → .setup/side-question-BJ1wSDcB.mjs} +183 -230
- package/dist/{source-CElXU0Oy.js → .setup/source-CUzJq5WN.mjs} +11 -10
- package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
- package/dist/{thread-archive-guard-DfpBr-Sz.js → .setup/thread-archive-guard-C9frICzX.mjs} +10 -3
- package/dist/.setup/thread-history-page-DoVpnHim.mjs +83 -0
- package/dist/{thread-lifecycle-DXl1-I6b.js → .setup/thread-lifecycle-B3mfz1TG.mjs} +347 -2318
- package/dist/{thread-ownership-BsDRTsyp.js → .setup/thread-ownership-DcTtAcXj.mjs} +6 -4
- package/dist/{thread-policy-BuEQfE0g.js → .setup/thread-policy-DGuQsuFC.mjs} +19 -3
- package/dist/.setup/thread-requests-BLvGkP2R.mjs +2205 -0
- package/dist/{thread-resume-DsDOZpFg.js → .setup/thread-resume-DIBXwOpE.mjs} +8 -5
- package/dist/.setup/timeout-C910MdAB.mjs +80 -0
- package/dist/{transcript-history-projection-v17wXgdK.js → .setup/transcript-history-projection-ZZpkFkJ_.mjs} +96 -61
- package/dist/{transcript-mirror-C5CKgNy6.js → .setup/transcript-mirror-BtHDBp1G.mjs} +224 -195
- package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
- package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-h2VHOskC.mjs} +274 -89
- package/dist/{upstream-session-fork-BZerMte_.js → .setup/upstream-session-fork-BUr4OUbC.mjs} +51 -42
- package/dist/{usage-tCk-mg_x.js → .setup/usage-BML0r-ua.mjs} +5 -4
- package/dist/.setup/usage-limit-error-DUMbefVY.mjs +166 -0
- package/dist/{web-search-provider.runtime-B7bGbGWq.js → .setup/web-search-provider.runtime-CDKlN-Rv.mjs} +4 -3
- package/dist/api.js +23 -12
- package/dist/catalog-page-worker-entrypoint.js +12 -0
- package/dist/catalog-page.worker.js +9 -0
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +8 -528
- package/dist/harness.js +1 -1
- package/dist/index.js +306 -215
- package/dist/media-understanding-provider.js +3 -3
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-tool-policy.js +12 -0
- package/dist/provider-discovery.js +18 -0
- package/dist/session-history-worker-runtime.js +36 -35
- package/dist/session-history.worker.js +2 -2
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +354 -69
- package/package.json +14 -8
- package/dist/attempt-context-D44yeDII.js +0 -636
- package/dist/binding-connection-D3udKbIE.js +0 -60
- package/dist/event-projector-usage-BfXmpOec.js +0 -102
- package/dist/inference-proxy-HGXKUIre.js +0 -311
- package/dist/launch-args-RXQwn8zV.js +0 -90
- package/dist/native-subagent-history-owner-Pcp7JuVF.js +0 -34
- package/dist/native-subagent-monitor-fQ7eIXEf.js +0 -2978
- package/dist/node-exec-server.runtime-Cl2vapEi.js +0 -226
- package/dist/rpc-error-ttN_QjEm.js +0 -30
- package/dist/session-catalog-ct-AH01I.js +0 -1477
- package/dist/session-catalog-home-id-CwhLdC03.js +0 -18
- package/dist/session-catalog-provenance-D-dIfRAH.js +0 -96
- package/dist/timeout-BVw8aaM1.js +0 -33
- package/dist/version-omm6IPI3.js +0 -12
- /package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
- /package/dist/{config-utils-DujwEnhg.js → .setup/config-utils-DujwEnhg.mjs} +0 -0
- /package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
- /package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
- /package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
- /package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
- /package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
- /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- /package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-umd0tgh4.mjs} +0 -0
- /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/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
- /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as resolveCodexAppServerHomeDir, f as resolveCodexAppServerLocalHomeDir, p as resolveCodexAppServerUserHomeDir } from "./config-security-BEReZ6go.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -6,6 +6,22 @@ import { OPENCLAW_VERSION, embeddedAgentLog } from "openclaw/plugin-sdk/agent-ha
|
|
|
6
6
|
import { isFutureDateTimestampMs, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
8
8
|
import { readPluginPackageVersion } from "openclaw/plugin-sdk/extension-shared";
|
|
9
|
+
//#region extensions/codex/src/app-server/app-identity.ts
|
|
10
|
+
/**
|
|
11
|
+
* Apps SDK manifests and installed Codex connections can name the same app
|
|
12
|
+
* with asdk_app_ and legacy connector_ prefixes. Only the shared 128-bit ID
|
|
13
|
+
* establishes equivalence; display names never establish app ownership.
|
|
14
|
+
* Keep the installed ID for native config and calls. This comparison bridge
|
|
15
|
+
* can retire when installed inventories consistently return Apps SDK IDs.
|
|
16
|
+
*/
|
|
17
|
+
function codexAppIdentityKey(id) {
|
|
18
|
+
return id.replace(/^connector_([a-f0-9]{32})$/, "asdk_app_$1");
|
|
19
|
+
}
|
|
20
|
+
/** Resolves a declared app against account-authorized runtime metadata. */
|
|
21
|
+
function findCodexAppById(apps, id) {
|
|
22
|
+
return apps.find((app) => app.id === id) ?? apps.find((app) => codexAppIdentityKey(app.id) === codexAppIdentityKey(id));
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
9
25
|
//#region extensions/codex/src/app-server/app-inventory-cache.ts
|
|
10
26
|
/**
|
|
11
27
|
* Process-local cache for Codex app-server app inventories, keyed by runtime
|
|
@@ -69,7 +85,7 @@ var CodexAppInventoryCache = class {
|
|
|
69
85
|
};
|
|
70
86
|
const entry = this.entries.get(key);
|
|
71
87
|
if (entry) {
|
|
72
|
-
const scope = invalidatedAppIds?.filter(Boolean) ?? [];
|
|
88
|
+
const scope = invalidatedAppIds?.filter(Boolean).map(codexAppIdentityKey) ?? [];
|
|
73
89
|
if (!entry.invalidated) entry.invalidatedAppIds = scope.length ? [...scope].toSorted() : void 0;
|
|
74
90
|
else if (entry.invalidatedAppIds && scope.length) entry.invalidatedAppIds = Array.from(/* @__PURE__ */ new Set([...entry.invalidatedAppIds, ...scope])).toSorted();
|
|
75
91
|
else entry.invalidatedAppIds = void 0;
|
|
@@ -106,7 +122,7 @@ var CodexAppInventoryCache = class {
|
|
|
106
122
|
const promise = this.refreshUncoalesced(params, refreshToken, previousRefresh);
|
|
107
123
|
const currentRefresh = {
|
|
108
124
|
promise,
|
|
109
|
-
targetAppIds: new Set(params.targetAppIds?.filter(Boolean) ?? [])
|
|
125
|
+
targetAppIds: new Set(params.targetAppIds?.filter(Boolean).map(codexAppIdentityKey) ?? [])
|
|
110
126
|
};
|
|
111
127
|
this.inFlight.set(params.key, currentRefresh);
|
|
112
128
|
try {
|
|
@@ -133,7 +149,7 @@ var CodexAppInventoryCache = class {
|
|
|
133
149
|
key: params.key,
|
|
134
150
|
apps: inventory.apps,
|
|
135
151
|
installedApps: inventory.installedApps,
|
|
136
|
-
...params.targetAppIds?.some(Boolean) ? { targetAppIds: Array.from(new Set(params.targetAppIds.filter(Boolean))).toSorted() } : {},
|
|
152
|
+
...params.targetAppIds?.some(Boolean) ? { targetAppIds: Array.from(new Set(params.targetAppIds.filter(Boolean).map(codexAppIdentityKey))).toSorted() } : {},
|
|
137
153
|
fetchedAtMs: nowMs,
|
|
138
154
|
expiresAtMs,
|
|
139
155
|
revision: this.revision
|
|
@@ -191,13 +207,13 @@ function resolvePublishedInventorySnapshot(existing, snapshot, nowMs) {
|
|
|
191
207
|
}
|
|
192
208
|
/** Replaces refreshed target rows in place, deletes vanished ones, appends new ones. */
|
|
193
209
|
function mergeRefreshedRows(existingRows, refreshedRows, refreshedTargetIds) {
|
|
194
|
-
const refreshedById = new Map(refreshedRows.map((row) => [row.id, row]));
|
|
195
|
-
const existingIds = new Set(existingRows.map((row) => row.id));
|
|
210
|
+
const refreshedById = new Map(refreshedRows.map((row) => [codexAppIdentityKey(row.id), row]));
|
|
211
|
+
const existingIds = new Set(existingRows.map((row) => codexAppIdentityKey(row.id)));
|
|
196
212
|
return [...existingRows.flatMap((row) => {
|
|
197
|
-
if (!refreshedTargetIds.has(row.id)) return [row];
|
|
198
|
-
const refreshed = refreshedById.get(row.id);
|
|
213
|
+
if (!refreshedTargetIds.has(codexAppIdentityKey(row.id))) return [row];
|
|
214
|
+
const refreshed = refreshedById.get(codexAppIdentityKey(row.id));
|
|
199
215
|
return refreshed ? [refreshed] : [];
|
|
200
|
-
}), ...refreshedRows.filter((row) => !existingIds.has(row.id))];
|
|
216
|
+
}), ...refreshedRows.filter((row) => !existingIds.has(codexAppIdentityKey(row.id)))];
|
|
201
217
|
}
|
|
202
218
|
/**
|
|
203
219
|
* A refresh retires exactly the invalidation scope it re-read: a complete
|
|
@@ -217,7 +233,7 @@ function resolveRemainingInvalidationScope(existing, snapshot) {
|
|
|
217
233
|
}
|
|
218
234
|
function doesInFlightRefreshCover(existing, params) {
|
|
219
235
|
if (existing.targetAppIds.size === 0) return true;
|
|
220
|
-
const requestedAppIds = new Set(params.targetAppIds?.filter(Boolean) ?? []);
|
|
236
|
+
const requestedAppIds = new Set(params.targetAppIds?.filter(Boolean).map(codexAppIdentityKey) ?? []);
|
|
221
237
|
return requestedAppIds.size > 0 && Array.from(requestedAppIds).every((appId) => existing.targetAppIds.has(appId));
|
|
222
238
|
}
|
|
223
239
|
/** Serializes a refresh failure without leaking large or sensitive error data. */
|
|
@@ -257,8 +273,8 @@ function normalizeRuntimeIdentityForCacheKey(value) {
|
|
|
257
273
|
}
|
|
258
274
|
async function readInstalledApps(request, options) {
|
|
259
275
|
const installed = await request("app/installed", { forceRefresh: options.forceRefresh });
|
|
260
|
-
const targetIds = new Set((options.targetAppIds ?? []).filter(Boolean));
|
|
261
|
-
const apps = targetIds.size === 0 ? installed.apps : installed.apps.filter((app) => targetIds.has(app.id));
|
|
276
|
+
const targetIds = new Set((options.targetAppIds ?? []).filter(Boolean).map(codexAppIdentityKey));
|
|
277
|
+
const apps = targetIds.size === 0 ? installed.apps : installed.apps.filter((app) => targetIds.has(codexAppIdentityKey(app.id)));
|
|
262
278
|
if (apps.length === 0) return {
|
|
263
279
|
apps: [],
|
|
264
280
|
installedApps: []
|
|
@@ -271,23 +287,7 @@ async function readInstalledApps(request, options) {
|
|
|
271
287
|
return {
|
|
272
288
|
apps: apps.flatMap((installedApp) => {
|
|
273
289
|
const metadata = metadataById.get(installedApp.id);
|
|
274
|
-
|
|
275
|
-
return [{
|
|
276
|
-
id: installedApp.id,
|
|
277
|
-
name: metadata.name,
|
|
278
|
-
description: metadata.description ?? null,
|
|
279
|
-
logoUrl: metadata.iconUrl ?? null,
|
|
280
|
-
logoUrlDark: metadata.iconUrlDark ?? null,
|
|
281
|
-
distributionChannel: metadata.distributionChannel ?? null,
|
|
282
|
-
branding: null,
|
|
283
|
-
appMetadata: null,
|
|
284
|
-
labels: null,
|
|
285
|
-
installUrl: metadata.installUrl ?? null,
|
|
286
|
-
isAccessible: true,
|
|
287
|
-
isEnabled: installedApp.enabled,
|
|
288
|
-
pluginDisplayNames: metadata.pluginDisplayNames,
|
|
289
|
-
...metadata.toolSummaries ? { toolSummaries: metadata.toolSummaries } : {}
|
|
290
|
-
}];
|
|
290
|
+
return metadata ? [metadata] : [];
|
|
291
291
|
}),
|
|
292
292
|
installedApps: apps
|
|
293
293
|
};
|
|
@@ -335,14 +335,6 @@ function isSensitiveErrorDataKey(key) {
|
|
|
335
335
|
*/
|
|
336
336
|
const require = createRequire(import.meta.url);
|
|
337
337
|
const CODEX_PLUGIN_VERSION = readPluginPackageVersion({ require });
|
|
338
|
-
let catalogConnectionHomes = /* @__PURE__ */ new Map();
|
|
339
|
-
function catalogConnectionHomeKey(fingerprint, agentDir) {
|
|
340
|
-
return `${agentDir ?? ""}\0${fingerprint}`;
|
|
341
|
-
}
|
|
342
|
-
/** Replaces the lifecycle-owned catalog connection snapshot used by supervised bindings. */
|
|
343
|
-
function replaceCodexCatalogConnectionHomes(homes) {
|
|
344
|
-
catalogConnectionHomes = new Map(homes.map((home) => [catalogConnectionHomeKey(home.fingerprint, home.agentDir), home.codexHome]));
|
|
345
|
-
}
|
|
346
338
|
/** Builds the full app inventory cache key for Codex plugin/app discovery. */
|
|
347
339
|
function buildCodexPluginAppCacheKey(params) {
|
|
348
340
|
return buildCodexAppInventoryCacheKey({
|
|
@@ -379,12 +371,8 @@ function buildCodexAppServerConnectionFingerprint(appServer, agentDir) {
|
|
|
379
371
|
cwd: appServer.start.cwd ?? null
|
|
380
372
|
});
|
|
381
373
|
}
|
|
382
|
-
/** Looks up a snapshotted catalog store without repeating filesystem discovery on a run. */
|
|
383
|
-
function resolveCodexCatalogConnectionHome(fingerprint, agentDir) {
|
|
384
|
-
return catalogConnectionHomes.get(catalogConnectionHomeKey(fingerprint, agentDir));
|
|
385
|
-
}
|
|
386
374
|
function resolveCodexAppServerConnectionHome(start, agentDir) {
|
|
387
|
-
const configured = start.env?.CODEX_HOME?.trim();
|
|
375
|
+
const configured = start.codexHome ?? start.env?.CODEX_HOME?.trim();
|
|
388
376
|
if (configured) return configured;
|
|
389
377
|
if (start.transport === "unix" && (!start.url || start.url === "unix://")) return resolveCodexAppServerUserHomeDir(start.env ?? process.env);
|
|
390
378
|
if (start.transport !== "stdio") return null;
|
|
@@ -403,7 +391,7 @@ function resolveCodexPluginAppCacheEndpoint(appServer) {
|
|
|
403
391
|
}
|
|
404
392
|
/** Resolves the CODEX_HOME value that scopes local app-server inventory. */
|
|
405
393
|
function resolveCodexPluginAppCacheCodexHome(appServer, agentDir) {
|
|
406
|
-
const configuredCodexHome = appServer.start.env?.CODEX_HOME?.trim();
|
|
394
|
+
const configuredCodexHome = appServer.start.codexHome ?? appServer.start.env?.CODEX_HOME?.trim();
|
|
407
395
|
if (configuredCodexHome) return configuredCodexHome;
|
|
408
396
|
return appServer.start.transport === "stdio" && agentDir ? resolveCodexAppServerHomeDir(agentDir) : void 0;
|
|
409
397
|
}
|
|
@@ -424,4 +412,4 @@ function fingerprintCodexPluginAppCacheCredentials(startOptions) {
|
|
|
424
412
|
return `sha256:${hash.digest("hex")}`;
|
|
425
413
|
}
|
|
426
414
|
//#endregion
|
|
427
|
-
export {
|
|
415
|
+
export { defaultCodexAppInventoryCache as a, findCodexAppById as c, CodexAppInventoryCache as i, buildCodexAppServerRuntimeFingerprint as n, serializeCodexAppInventoryError as o, buildCodexPluginAppCacheKey as r, codexAppIdentityKey as s, buildCodexAppServerConnectionFingerprint as t };
|
package/dist/{plugin-approval-roundtrip-Bz3FT8W5.js → .setup/plugin-approval-roundtrip-C0MZzCuP.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { it as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-DA4VR4Eb.mjs";
|
|
2
2
|
import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
3
3
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
4
|
//#region extensions/codex/src/app-server/plugin-approval-roundtrip.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
1
|
+
import { f as resolveCodexPluginsPolicy } from "./config-parsing-CcB9iPoq.mjs";
|
|
2
|
+
import { c as findCodexAppById } from "./plugin-app-cache-key-B2CsSdnV.mjs";
|
|
3
|
+
import "./config-BoTP_mrL.mjs";
|
|
3
4
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
4
5
|
//#region extensions/codex/src/app-server/config-contracts.ts
|
|
5
6
|
const CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated";
|
|
@@ -109,12 +110,20 @@ async function readCodexPluginInventory(params) {
|
|
|
109
110
|
activationRequired: pluginPolicy.enabled && (unavailableByMarketplacePolicy || !summary.installed || !summary.enabled),
|
|
110
111
|
authRequired: apps.some((app) => app.needsAuth || !app.accessible),
|
|
111
112
|
appOwnership,
|
|
112
|
-
ownedAppIds,
|
|
113
|
+
ownedAppIds: Array.from(/* @__PURE__ */ new Set([...ownedAppIds, ...apps.map((app) => app.id)])).toSorted(),
|
|
113
114
|
apps
|
|
114
115
|
});
|
|
115
116
|
}
|
|
117
|
+
const missingKeys = /* @__PURE__ */ new Set();
|
|
118
|
+
for (const diagnostic of diagnostics) if (diagnostic.code === "plugin_missing" || diagnostic.code === "marketplace_missing") {
|
|
119
|
+
if (diagnostic.plugin) missingKeys.add(diagnostic.plugin.configKey);
|
|
120
|
+
embeddedAgentLog.error(diagnostic.message, { code: diagnostic.code });
|
|
121
|
+
}
|
|
116
122
|
return {
|
|
117
|
-
policy
|
|
123
|
+
policy: {
|
|
124
|
+
...policy,
|
|
125
|
+
pluginPolicies: policy.pluginPolicies.filter((plugin) => !missingKeys.has(plugin.configKey))
|
|
126
|
+
},
|
|
118
127
|
records,
|
|
119
128
|
diagnostics,
|
|
120
129
|
...appInventory ? { appInventory } : {}
|
|
@@ -195,7 +204,7 @@ function readCachedAppInventory(params) {
|
|
|
195
204
|
if (!params.appCache || !params.appCacheKey) return;
|
|
196
205
|
const request = async (method, requestParams) => await params.request(method, requestParams);
|
|
197
206
|
return params.appCache.read({
|
|
198
|
-
key: params.appCacheKey,
|
|
207
|
+
key: params.appInventoryCacheKey ?? params.appCacheKey,
|
|
199
208
|
request,
|
|
200
209
|
nowMs: params.nowMs,
|
|
201
210
|
suppressRefresh: params.suppressAppInventoryRefresh
|
|
@@ -237,9 +246,10 @@ function resolveOwnedApps(params) {
|
|
|
237
246
|
});
|
|
238
247
|
return [];
|
|
239
248
|
}
|
|
240
|
-
const
|
|
249
|
+
const appInfos = params.appInventory?.snapshot?.apps ?? [];
|
|
250
|
+
const installedApps = params.appInventory?.snapshot?.installedApps ?? [];
|
|
241
251
|
return detailApps.map((app) => {
|
|
242
|
-
const info =
|
|
252
|
+
const info = findCodexAppById(appInfos, app.id);
|
|
243
253
|
if (!info) return {
|
|
244
254
|
id: app.id,
|
|
245
255
|
name: app.name,
|
|
@@ -248,11 +258,11 @@ function resolveOwnedApps(params) {
|
|
|
248
258
|
needsAuth: true
|
|
249
259
|
};
|
|
250
260
|
return Object.assign({
|
|
251
|
-
id:
|
|
261
|
+
id: info.id,
|
|
252
262
|
name: app.name,
|
|
253
|
-
accessible:
|
|
254
|
-
enabled: info.
|
|
255
|
-
needsAuth:
|
|
263
|
+
accessible: true,
|
|
264
|
+
enabled: findCodexAppById(installedApps, info.id)?.enabled ?? false,
|
|
265
|
+
needsAuth: false
|
|
256
266
|
}, resolveOwnedAppApprovalOverrideKeys(info));
|
|
257
267
|
}).toSorted((left, right) => left.id.localeCompare(right.id));
|
|
258
268
|
}
|
|
@@ -9,6 +9,9 @@ function hasCodexAdminScope(ctx) {
|
|
|
9
9
|
function canMutateCodexHost(ctx) {
|
|
10
10
|
return ctx.senderIsOwner === true || hasCodexAdminScope(ctx);
|
|
11
11
|
}
|
|
12
|
+
function assertCodexHostOwnerCurrent(ctx) {
|
|
13
|
+
if (!hasCodexAdminScope(ctx)) ctx.assertOwnerCurrent?.();
|
|
14
|
+
}
|
|
12
15
|
//#endregion
|
|
13
16
|
//#region extensions/codex/src/plugin-marketplace-discovery.ts
|
|
14
17
|
/** Read-only discovery of Codex-owned local, curated, and remote plugin marketplaces. */
|
|
@@ -134,4 +137,4 @@ function boundedCatalogText(value) {
|
|
|
134
137
|
return sanitized.replace(/\s+/g, " ").trim().slice(0, MAX_PLUGIN_METADATA_LENGTH);
|
|
135
138
|
}
|
|
136
139
|
//#endregion
|
|
137
|
-
export { CODEX_HOST_INSPECTION_AUTH_ERROR as a,
|
|
140
|
+
export { CODEX_HOST_INSPECTION_AUTH_ERROR as a, canMutateCodexHost as c, CODEX_FULL_PERMISSIONS_AUTH_ERROR as i, hasCodexAdminScope as l, filterCodexMarketplacePlugins as n, CODEX_NATIVE_EXECUTION_AUTH_ERROR as o, parseCodexPluginMarketplaceId as r, assertCodexHostOwnerCurrent as s, discoverCodexMarketplacePlugins as t };
|