@openclaw/codex 2026.10.1 → 2026.10.5-beta.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.
- package/dist/.setup/{account-usage-runtime-B7Vg4rmy.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
- package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
- package/dist/.setup/{apply-BzlIkqSz.mjs → apply-CBMV8LN0.mjs} +40 -51
- package/dist/.setup/{attempt-client-cleanup-HXQxfMc1.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
- package/dist/.setup/{attempt-workspace-context-BmCutoyg.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
- package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
- package/dist/.setup/{auth-cache-key-BCCQHWdc.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
- package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
- package/dist/.setup/{bounded-turn-Cv4uIEzz.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
- package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
- package/dist/.setup/{build-state-BwxNfFEB.mjs → build-state-CzLMy1S9.mjs} +1 -1
- package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
- package/dist/.setup/{client-catalog-response-BNFDYAKh.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
- package/dist/.setup/{client-BIRVBXXb.mjs → client-y7nO6X9c.mjs} +198 -247
- package/dist/.setup/{command-dispatch-D3_ypl-R.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
- package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
- package/dist/.setup/{command-handlers-KPit4G0p.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
- package/dist/.setup/{command-rpc-CmQDOxY9.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
- package/dist/.setup/{compact-CLLteFIY.mjs → compact-CD8xJxXS.mjs} +41 -61
- package/dist/.setup/{computer-use-BVxocZZc.mjs → computer-use-CiToXF5C.mjs} +109 -147
- package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
- package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
- package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
- package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
- package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
- package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
- package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
- package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
- package/dist/.setup/{conversation-binding-DJ_288rC.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
- package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
- package/dist/.setup/{conversation-control-CuiZ_pDL.mjs → conversation-control-GXM3unE4.mjs} +7 -10
- package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
- package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
- package/dist/.setup/{dynamic-tool-build-DgWZMfAQ.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
- package/dist/.setup/{dynamic-tools-Ct6GKAFr.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
- package/dist/.setup/{effective-mcp-catalog-DmCSc8TS.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
- package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
- package/dist/.setup/{ephemeral-turn-_cBMKCFb.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
- package/dist/.setup/{event-projector-assistant-message-C3Tpt370.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
- package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
- package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
- package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
- package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
- package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
- package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
- package/dist/.setup/{isolated-completion-CjrQEeke.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
- package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
- package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
- package/dist/.setup/{mcp-app-session-preparation-D0yRoreX.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
- package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
- package/dist/.setup/{model-catalog--G4arndd.mjs → model-catalog-B227ST3D.mjs} +6 -6
- package/dist/.setup/{models-BYbLQPnj.mjs → models-DdRyi93L.mjs} +6 -10
- package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
- package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
- package/dist/.setup/{native-mcp-app-5i5eRCwO.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
- package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
- package/dist/.setup/{native-subagent-monitor-B2C8D_N0.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
- package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
- package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
- package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
- package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
- package/dist/.setup/{plan-B5bDIEuQ.mjs → plan-C_F3aio0.mjs} +40 -50
- package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
- package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
- package/dist/.setup/{plugin-approval-roundtrip-C_SGp5YW.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
- package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
- package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
- package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
- package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
- package/dist/.setup/{provider-BoIby-eX.mjs → provider-BJ4xhaGX.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-B4yq6UgQ.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
- package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
- package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
- package/dist/.setup/{request-DD3u22uv.mjs → request-Y8dmbqZ3.mjs} +28 -48
- package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
- package/dist/.setup/{run-attempt-DOVF5OON.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -859
- package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
- package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
- package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
- package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
- package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
- package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
- package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
- package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
- package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
- package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
- package/dist/.setup/{session-catalog-events-DRaivXvC.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
- package/dist/.setup/{session-catalog-index-qwmgqC4t.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
- package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
- package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
- package/dist/.setup/{session-catalog-native-projection-z9Q608QW.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
- package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
- package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
- package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
- package/dist/.setup/{session-catalog-projection-Cl0Nc7c6.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
- package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
- package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
- package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
- package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
- package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
- package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
- package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
- package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
- package/dist/.setup/{session-retirement-Bt3b0fpe.mjs → session-retirement-IoS3zr17.mjs} +7 -7
- package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-e_24O6HA.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
- package/dist/.setup/{shared-client-DeenOD8U.mjs → shared-client-ByIwuAC-.mjs} +172 -229
- package/dist/.setup/{side-question-BZHn_1Jm.mjs → side-question-BDUdozFy.mjs} +116 -137
- package/dist/.setup/{source-0ClinBHI.mjs → source-Bxbqf3S1.mjs} +37 -56
- package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
- package/dist/.setup/{thread-lifecycle-CoqYpbpk.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
- package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
- package/dist/.setup/{thread-ownership-CSDZ6mHd.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
- package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
- package/dist/.setup/{thread-policy-DCC9lQjC.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
- package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
- package/dist/.setup/{thread-resume--WOKWxZd.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
- package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
- package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
- package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
- package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
- package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
- package/dist/.setup/{turn-router-BWhX_SBh.mjs → turn-router-DKDAziUW.mjs} +30 -31
- package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
- package/dist/.setup/{upstream-session-fork-BQvofnk7.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
- package/dist/.setup/{usage-BEHcVwcZ.mjs → usage-DQA-peQC.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-D1p3nE6n.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
- package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
- package/dist/.setup/{web-search-provider.runtime-CV9oiB-v.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
- package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
- package/dist/api.js +15 -15
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -6
- package/dist/harness.js +32 -61
- package/dist/index.js +302 -416
- package/dist/media-understanding-provider.js +32 -43
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +1 -1
- package/dist/native-tool-policy.js +23 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +52 -31
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +20 -3
- package/package.json +7 -7
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
- package/dist/.setup/plugin-thread-config-deadline-CsScGgrk.mjs +0 -124
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
- package/dist/.setup/shell-dynamic-tools-BqGszXcq.mjs +0 -85
- package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
- package/dist/.setup/thread-requests-Dwg2b4Xl.mjs +0 -2111
- package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { pt as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-
|
|
2
|
-
import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
1
|
+
import { pt as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-ByIwuAC-.mjs";
|
|
3
2
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
|
+
import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { racePromiseWithAbortSignal } from "openclaw/plugin-sdk/time-runtime";
|
|
5
5
|
//#region extensions/codex/src/app-server/plugin-approval-roundtrip.ts
|
|
6
6
|
const DEFAULT_CODEX_APPROVAL_TIMEOUT_MS = 12e4;
|
|
@@ -64,7 +64,6 @@ async function waitForPluginApprovalDecision(params) {
|
|
|
64
64
|
});
|
|
65
65
|
return await racePromiseWithAbortSignal(waitPromise, params.signal, ({ reason }) => toErrorObject(reason, "Non-Error rejection"));
|
|
66
66
|
}
|
|
67
|
-
/** Converts a gateway exec approval decision into the app-server approval outcome enum. */
|
|
68
67
|
function mapExecDecisionToOutcome(decision) {
|
|
69
68
|
switch (decision) {
|
|
70
69
|
case "allow-once": return "approved-once";
|
|
@@ -83,9 +82,8 @@ async function requestPluginApprovalOutcome(params) {
|
|
|
83
82
|
const approvalId = requestResult?.id;
|
|
84
83
|
if (!approvalId) return "unavailable";
|
|
85
84
|
const approvalResult = approvalRequestExplicitlyUnavailable(requestResult) ? void 0 : await waitForPluginApprovalDecision({
|
|
86
|
-
|
|
87
|
-
approvalId
|
|
88
|
-
signal: params.signal
|
|
85
|
+
...params,
|
|
86
|
+
approvalId
|
|
89
87
|
});
|
|
90
88
|
if (params.signal?.aborted) return "cancelled";
|
|
91
89
|
if (approvalResult?.terminalReason === "timeout") return "timed-out";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./config-0Gxk3_eq.mjs";
|
|
1
|
+
import { c as findCodexAppById } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
2
|
+
import "./config-C1YVVLEA.mjs";
|
|
4
3
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
5
4
|
//#region extensions/codex/src/app-server/config-contracts.ts
|
|
6
5
|
const CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated";
|
|
@@ -9,21 +8,17 @@ const CODEX_PLUGINS_WORKSPACE_MARKETPLACE_NAME = "workspace-directory";
|
|
|
9
8
|
//#region extensions/codex/src/app-server/plugin-inventory.ts
|
|
10
9
|
const CODEX_PLUGINS_REMOTE_MARKETPLACE_NAME = `${CODEX_PLUGINS_MARKETPLACE_NAME}-remote`;
|
|
11
10
|
const CODEX_PLUGINS_API_MARKETPLACE_NAME = "openai-api-curated";
|
|
11
|
+
/** Adapts plugin discovery requests to the two app inventory methods and optional thread. */
|
|
12
|
+
function createCodexAppInventoryRequest(params) {
|
|
13
|
+
return async (method, requestParams) => await params.request(method, params.threadId ? {
|
|
14
|
+
...requestParams,
|
|
15
|
+
threadId: params.threadId
|
|
16
|
+
} : requestParams);
|
|
17
|
+
}
|
|
12
18
|
async function readCodexPluginInventory(params) {
|
|
13
|
-
const policy = params
|
|
14
|
-
if (!policy.enabled) return {
|
|
15
|
-
policy,
|
|
16
|
-
records: [],
|
|
17
|
-
diagnostics: [{
|
|
18
|
-
code: "disabled",
|
|
19
|
-
message: "Native Codex plugin support is disabled."
|
|
20
|
-
}]
|
|
21
|
-
};
|
|
19
|
+
const { policy } = params;
|
|
22
20
|
const appInventory = readCachedAppInventory(params);
|
|
23
|
-
const installedPlugins = await readInstalledCodexPluginMetadata(
|
|
24
|
-
...params,
|
|
25
|
-
policy
|
|
26
|
-
});
|
|
21
|
+
const installedPlugins = await readInstalledCodexPluginMetadata(params);
|
|
27
22
|
const pluginCatalogs = /* @__PURE__ */ new Map();
|
|
28
23
|
const diagnostics = [];
|
|
29
24
|
const records = [];
|
|
@@ -98,7 +93,6 @@ async function readCodexPluginInventory(params) {
|
|
|
98
93
|
summary,
|
|
99
94
|
...detail ? { detail } : {},
|
|
100
95
|
activationRequired: pluginPolicy.enabled && (unavailableByMarketplacePolicy || !summary.installed || !summary.enabled),
|
|
101
|
-
authRequired: apps.some((app) => app.needsAuth || !app.accessible),
|
|
102
96
|
appOwnership,
|
|
103
97
|
ownedAppIds: Array.from(/* @__PURE__ */ new Set([...ownedAppIds, ...apps.map((app) => app.id)])).toSorted(),
|
|
104
98
|
apps
|
|
@@ -150,19 +144,19 @@ async function listCodexPluginMetadata(params, marketplaceName, options = {}) {
|
|
|
150
144
|
...options.forceRefetch ? { forceRefetch: true } : {}
|
|
151
145
|
};
|
|
152
146
|
if (!params.metadataCache || !params.appCacheKey) return await params.request("plugin/list", requestParams);
|
|
153
|
-
return
|
|
147
|
+
return await params.metadataCache.load({
|
|
154
148
|
appCacheKey: params.appCacheKey,
|
|
155
149
|
queryKind: "curated-global",
|
|
156
150
|
requestParams,
|
|
157
151
|
catalogScope: pluginMetadataCatalogScope(marketplaceName),
|
|
158
152
|
request: async (method, listedParams) => await params.request(method, listedParams),
|
|
159
153
|
cacheable: (response) => response.marketplaces.some((marketplace) => marketplaceMatchesConfiguredName(marketplace, marketplaceName))
|
|
160
|
-
})
|
|
154
|
+
});
|
|
161
155
|
}
|
|
162
156
|
async function readInstalledCodexPluginMetadata(params) {
|
|
163
157
|
const requestParams = params.configCwd ? { cwds: [params.configCwd] } : {};
|
|
164
158
|
if (!params.metadataCache || !params.appCacheKey) return await params.request("plugin/installed", requestParams);
|
|
165
|
-
return
|
|
159
|
+
return await params.metadataCache.load({
|
|
166
160
|
appCacheKey: params.appCacheKey,
|
|
167
161
|
queryKind: "installed",
|
|
168
162
|
requestParams,
|
|
@@ -171,12 +165,12 @@ async function readInstalledCodexPluginMetadata(params) {
|
|
|
171
165
|
if (!pluginPolicy.enabled && !params.policy.allowAllPlugins) return true;
|
|
172
166
|
return Boolean(findConfiguredMarketplacePlugin(response, pluginPolicy));
|
|
173
167
|
})
|
|
174
|
-
})
|
|
168
|
+
});
|
|
175
169
|
}
|
|
176
170
|
function isSettledMissingPluginPolicy(params) {
|
|
177
171
|
const queryKind = params.pluginPolicy.marketplaceName === "workspace-directory" ? "installed" : "curated-global";
|
|
178
172
|
const requestParams = queryKind === "installed" ? params.configCwd ? { cwds: [params.configCwd] } : {} : buildPluginCatalogRequestParams(params, params.pluginPolicy.marketplaceName);
|
|
179
|
-
const listed = params.metadataCache.read(params.appCacheKey, queryKind, requestParams, queryKind === "curated-global" ? pluginMetadataCatalogScope(params.pluginPolicy.marketplaceName) : void 0)
|
|
173
|
+
const listed = params.metadataCache.read(params.appCacheKey, queryKind, requestParams, queryKind === "curated-global" ? pluginMetadataCatalogScope(params.pluginPolicy.marketplaceName) : void 0);
|
|
180
174
|
if (!listed) return false;
|
|
181
175
|
return !findConfiguredMarketplacePlugin(listed, params.pluginPolicy);
|
|
182
176
|
}
|
|
@@ -192,32 +186,26 @@ function buildPluginCatalogRequestParams(params, marketplaceName) {
|
|
|
192
186
|
}
|
|
193
187
|
function readCachedAppInventory(params) {
|
|
194
188
|
if (!params.appCache || !params.appCacheKey) return;
|
|
195
|
-
const request = async (method, requestParams) => await params.request(method, requestParams);
|
|
196
189
|
return params.appCache.read({
|
|
197
190
|
key: params.appInventoryCacheKey ?? params.appCacheKey,
|
|
198
|
-
request,
|
|
191
|
+
request: createCodexAppInventoryRequest(params),
|
|
199
192
|
nowMs: params.nowMs,
|
|
200
193
|
suppressRefresh: params.suppressAppInventoryRefresh
|
|
201
194
|
});
|
|
202
195
|
}
|
|
203
196
|
async function readPluginDetail(params, marketplace, pluginPolicy, summary, diagnostics) {
|
|
204
|
-
|
|
197
|
+
const unavailable = (message) => {
|
|
205
198
|
diagnostics.push({
|
|
206
199
|
code: "plugin_detail_unavailable",
|
|
207
200
|
plugin: pluginPolicy,
|
|
208
|
-
message: `${pluginPolicy.pluginName} detail unavailable:
|
|
201
|
+
message: `${pluginPolicy.pluginName} detail unavailable: ${message()}`
|
|
209
202
|
});
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
};
|
|
204
|
+
if (marketplace.remoteMarketplaceName && !summary.remotePluginId) return unavailable(() => "Codex did not return a remote plugin id.");
|
|
212
205
|
try {
|
|
213
206
|
return (await params.request("plugin/read", pluginReadParams(marketplace, marketplace.remoteMarketplaceName && summary.remotePluginId ? summary.remotePluginId : pluginPolicy.pluginName))).plugin;
|
|
214
207
|
} catch (error) {
|
|
215
|
-
|
|
216
|
-
code: "plugin_detail_unavailable",
|
|
217
|
-
plugin: pluginPolicy,
|
|
218
|
-
message: `${pluginPolicy.pluginName} detail unavailable: ${error instanceof Error ? error.message : String(error)}`
|
|
219
|
-
});
|
|
220
|
-
return;
|
|
208
|
+
return unavailable(() => error instanceof Error ? error.message : String(error));
|
|
221
209
|
}
|
|
222
210
|
}
|
|
223
211
|
function resolveOwnedApps(params) {
|
|
@@ -232,26 +220,23 @@ function resolveOwnedApps(params) {
|
|
|
232
220
|
return [];
|
|
233
221
|
}
|
|
234
222
|
const appInfos = params.appInventory?.snapshot?.apps ?? [];
|
|
235
|
-
const installedApps = params.appInventory?.snapshot?.installedApps ?? [];
|
|
236
223
|
return detailApps.map((app) => {
|
|
237
224
|
const info = findCodexAppById(appInfos, app.id);
|
|
238
225
|
if (!info) return {
|
|
239
226
|
id: app.id,
|
|
240
227
|
name: app.name,
|
|
241
|
-
accessible: false
|
|
242
|
-
enabled: false,
|
|
243
|
-
needsAuth: true
|
|
228
|
+
accessible: false
|
|
244
229
|
};
|
|
245
|
-
|
|
230
|
+
const ownedApp = toCodexPluginOwnedAccountApp(info);
|
|
231
|
+
ownedApp.name = app.name;
|
|
232
|
+
return ownedApp;
|
|
246
233
|
}).toSorted((left, right) => left.id.localeCompare(right.id));
|
|
247
234
|
}
|
|
248
|
-
function toCodexPluginOwnedAccountApp(app
|
|
235
|
+
function toCodexPluginOwnedAccountApp(app) {
|
|
249
236
|
return {
|
|
250
237
|
id: app.id,
|
|
251
238
|
name: app.name,
|
|
252
239
|
accessible: true,
|
|
253
|
-
enabled: installedApp?.enabled ?? false,
|
|
254
|
-
needsAuth: false,
|
|
255
240
|
...resolveOwnedAppApprovalOverrideKeys(app)
|
|
256
241
|
};
|
|
257
242
|
}
|
|
@@ -313,4 +298,4 @@ function isOpenAiCuratedMarketplaceName(marketplaceName) {
|
|
|
313
298
|
return marketplaceName === "openai-curated" || marketplaceName === CODEX_PLUGINS_REMOTE_MARKETPLACE_NAME || marketplaceName === CODEX_PLUGINS_API_MARKETPLACE_NAME;
|
|
314
299
|
}
|
|
315
300
|
//#endregion
|
|
316
|
-
export {
|
|
301
|
+
export { marketplaceRef as a, resolveRecoverableCodexPluginConfigKeys as c, CODEX_PLUGINS_WORKSPACE_MARKETPLACE_NAME as d, listCodexPluginMetadata as i, toCodexPluginOwnedAccountApp as l, findCodexMarketplacePluginSummary as n, pluginReadParams as o, isOpenAiCuratedMarketplaceName as r, readCodexPluginInventory as s, createCodexAppInventoryRequest as t, CODEX_PLUGINS_MARKETPLACE_NAME as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN } from "./config-contracts.shared-D85SGEuq.mjs";
|
|
2
2
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/codex/src/plugin-marketplace-discovery.ts
|
|
4
4
|
/** Read-only discovery of Codex-owned local, curated, and remote plugin marketplaces. */
|
|
@@ -88,16 +88,13 @@ async function discoverCodexMarketplacePlugins(params) {
|
|
|
88
88
|
warnings.push(`Multiple discovered plugins share ${id}; installation requires a unique identity.`);
|
|
89
89
|
continue;
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
available: previous.available && next.available,
|
|
97
|
-
...preferred.remotePluginId ? { mustShowInstallationInterstitial: previous.mustShowInstallationInterstitial === true || next.mustShowInstallationInterstitial === true ? true : previous.mustShowInstallationInterstitial === false && next.mustShowInstallationInterstitial === false ? false : null } : {},
|
|
98
|
-
...previous.installPolicy === "NOT_AVAILABLE" || next.installPolicy === "NOT_AVAILABLE" ? { installPolicy: "NOT_AVAILABLE" } : {}
|
|
99
|
-
});
|
|
91
|
+
const preferred = !previous || !previous.installed && next.installed || !previous.enabled && next.installed && next.enabled ? next : previous;
|
|
92
|
+
if (previous) {
|
|
93
|
+
preferred.available = previous.available && next.available;
|
|
94
|
+
if (preferred.remotePluginId) preferred.mustShowInstallationInterstitial = previous.mustShowInstallationInterstitial === true || next.mustShowInstallationInterstitial === true ? true : previous.mustShowInstallationInterstitial === false && next.mustShowInstallationInterstitial === false ? false : null;
|
|
95
|
+
if (previous.installPolicy === "NOT_AVAILABLE" || next.installPolicy === "NOT_AVAILABLE") preferred.installPolicy = "NOT_AVAILABLE";
|
|
100
96
|
}
|
|
97
|
+
discovered.set(id, preferred);
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
return {
|
package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs}
RENAMED
|
@@ -16,7 +16,7 @@ var CodexPluginMetadataCache = class {
|
|
|
16
16
|
this.entries.delete(entryKey);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
return entry.
|
|
19
|
+
return entry.response;
|
|
20
20
|
}
|
|
21
21
|
/** Returns a fresh snapshot or coalesces one catalog or installed-plugin request. */
|
|
22
22
|
async load(params) {
|
|
@@ -35,16 +35,12 @@ var CodexPluginMetadataCache = class {
|
|
|
35
35
|
const promise = (async () => {
|
|
36
36
|
const method = params.queryKind === "installed" ? "plugin/installed" : "plugin/list";
|
|
37
37
|
const response = await params.request(method, params.requestParams);
|
|
38
|
-
const snapshot = {
|
|
39
|
-
appCacheKey: params.appCacheKey,
|
|
40
|
-
queryKind: params.queryKind,
|
|
41
|
-
response
|
|
42
|
-
};
|
|
43
38
|
if (generation === (this.generations.get(params.appCacheKey) ?? 0) && clearGeneration === this.clearGeneration && response.marketplaceLoadErrors.length === 0 && (params.cacheable?.(response) ?? true)) this.entries.set(entryKey, {
|
|
44
|
-
|
|
39
|
+
appCacheKey: params.appCacheKey,
|
|
40
|
+
response,
|
|
45
41
|
expiresAtMs: this.nowMs() + CODEX_PLUGIN_METADATA_CACHE_TTL_MS
|
|
46
42
|
});
|
|
47
|
-
return
|
|
43
|
+
return response;
|
|
48
44
|
})();
|
|
49
45
|
this.inFlight.set(entryKey, {
|
|
50
46
|
appCacheKey: params.appCacheKey,
|
|
@@ -58,8 +54,7 @@ var CodexPluginMetadataCache = class {
|
|
|
58
54
|
}
|
|
59
55
|
invalidate(appCacheKey) {
|
|
60
56
|
this.generations.set(appCacheKey, (this.generations.get(appCacheKey) ?? 0) + 1);
|
|
61
|
-
for (const [entryKey, entry] of
|
|
62
|
-
for (const [entryKey, pending] of this.inFlight) if (pending.appCacheKey === appCacheKey) this.inFlight.delete(entryKey);
|
|
57
|
+
for (const cache of [this.entries, this.inFlight]) for (const [entryKey, entry] of cache) if (entry.appCacheKey === appCacheKey) cache.delete(entryKey);
|
|
63
58
|
}
|
|
64
59
|
/** Clears snapshots and prevents late in-flight loads from repopulating them. */
|
|
65
60
|
clear() {
|