@openclaw/codex 2026.10.1-beta.2 → 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.
Files changed (161) hide show
  1. package/dist/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
  2. package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
  3. package/dist/.setup/{apply-CXTudl9p.mjs → apply-CBMV8LN0.mjs} +40 -51
  4. package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
  5. package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
  6. package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
  7. package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
  8. package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
  9. package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
  10. package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
  11. package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
  12. package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
  13. package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-CzLMy1S9.mjs} +1 -1
  14. package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
  15. package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
  16. package/dist/.setup/{client-C8lgBOoO.mjs → client-y7nO6X9c.mjs} +198 -247
  17. package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
  18. package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
  19. package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
  20. package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
  21. package/dist/.setup/{compact-tUb9AYfH.mjs → compact-CD8xJxXS.mjs} +41 -61
  22. package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CiToXF5C.mjs} +109 -147
  23. package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
  24. package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
  25. package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
  26. package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
  27. package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
  28. package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
  29. package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
  30. package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
  31. package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
  32. package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
  33. package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-GXM3unE4.mjs} +7 -10
  34. package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
  35. package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
  36. package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
  37. package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
  38. package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
  39. package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
  40. package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
  41. package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
  42. package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
  43. package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
  44. package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
  45. package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
  46. package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
  47. package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
  48. package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
  49. package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
  50. package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
  51. package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
  52. package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
  53. package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
  54. package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
  55. package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-B227ST3D.mjs} +6 -6
  56. package/dist/.setup/{models-DSseKSMg.mjs → models-DdRyi93L.mjs} +6 -10
  57. package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
  58. package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
  59. package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
  60. package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
  61. package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
  62. package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
  63. package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
  64. package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
  65. package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
  66. package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
  67. package/dist/.setup/{plan-BJ37d2Og.mjs → plan-C_F3aio0.mjs} +40 -50
  68. package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
  69. package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
  70. package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
  71. package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
  72. package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
  73. package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
  74. package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
  75. package/dist/.setup/{provider-BnwHVD_z.mjs → provider-BJ4xhaGX.mjs} +4 -4
  76. package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
  77. package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
  78. package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
  79. package/dist/.setup/{request-jSbhc1sg.mjs → request-Y8dmbqZ3.mjs} +28 -48
  80. package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
  81. package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -849
  82. package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
  83. package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
  84. package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
  85. package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
  86. package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
  87. package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
  88. package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
  89. package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
  90. package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
  91. package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
  92. package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
  93. package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
  94. package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
  95. package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
  96. package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
  97. package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
  98. package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
  99. package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
  100. package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
  101. package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
  102. package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
  103. package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
  104. package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
  105. package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
  106. package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
  107. package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
  108. package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
  109. package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
  110. package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
  111. package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
  112. package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-IoS3zr17.mjs} +7 -7
  113. package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
  114. package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
  115. package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-ByIwuAC-.mjs} +172 -229
  116. package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-BDUdozFy.mjs} +116 -137
  117. package/dist/.setup/{source-BYu0T780.mjs → source-Bxbqf3S1.mjs} +37 -56
  118. package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
  119. package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
  120. package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
  121. package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
  122. package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
  123. package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
  124. package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
  125. package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
  126. package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
  127. package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
  128. package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
  129. package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
  130. package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
  131. package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
  132. package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-DKDAziUW.mjs} +30 -31
  133. package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
  134. package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
  135. package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-DQA-peQC.mjs} +4 -4
  136. package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
  137. package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
  138. package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
  139. package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
  140. package/dist/api.js +15 -15
  141. package/dist/catalog-page.worker.js +1 -1
  142. package/dist/cli-metadata.js +1 -1
  143. package/dist/doctor-contract-api.js +5 -6
  144. package/dist/harness.js +32 -61
  145. package/dist/index.js +302 -416
  146. package/dist/media-understanding-provider.js +32 -43
  147. package/dist/migration-provider-api.js +1 -1
  148. package/dist/native-session-binding-api.js +1 -1
  149. package/dist/native-tool-policy.js +23 -1
  150. package/dist/provider-discovery.js +1 -1
  151. package/dist/session-history-worker-runtime.js +52 -31
  152. package/dist/session-history.worker.js +1 -1
  153. package/openclaw.plugin.json +20 -3
  154. package/package.json +7 -7
  155. package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
  156. package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +0 -124
  157. package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
  158. package/dist/.setup/shell-dynamic-tools-D3Brj3g9.mjs +0 -85
  159. package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
  160. package/dist/.setup/thread-requests-CL1e8Wmx.mjs +0 -2111
  161. package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
@@ -1,6 +1,6 @@
1
- import { pt as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-qhyYWbew.mjs";
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
- hostCapabilities: params.hostCapabilities,
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 { f as resolveCodexPluginsPolicy } from "./config-parsing-BQq-CHTF.mjs";
2
- import { c as findCodexAppById } from "./plugin-app-cache-key-BW8rd98k.mjs";
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.policy ?? resolveCodexPluginsPolicy(params.pluginConfig);
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 (await params.metadataCache.load({
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
- })).response;
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 (await params.metadataCache.load({
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
- })).response;
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)?.response;
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
- if (marketplace.remoteMarketplaceName && !summary.remotePluginId) {
197
+ const unavailable = (message) => {
205
198
  diagnostics.push({
206
199
  code: "plugin_detail_unavailable",
207
200
  plugin: pluginPolicy,
208
- message: `${pluginPolicy.pluginName} detail unavailable: Codex did not return a remote plugin id.`
201
+ message: `${pluginPolicy.pluginName} detail unavailable: ${message()}`
209
202
  });
210
- return;
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
- diagnostics.push({
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
- return Object.assign(toCodexPluginOwnedAccountApp(info, findCodexAppById(installedApps, info.id)), { name: app.name });
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, installedApp) {
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 { pluginReadParams as a, toCodexPluginOwnedAccountApp as c, marketplaceRef as i, CODEX_PLUGINS_MARKETPLACE_NAME as l, isOpenAiCuratedMarketplaceName as n, readCodexPluginInventory as o, listCodexPluginMetadata as r, resolveRecoverableCodexPluginConfigKeys as s, findCodexMarketplacePluginSummary as t, CODEX_PLUGINS_WORKSPACE_MARKETPLACE_NAME as u };
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 { n as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN } from "./service-tier-normalization-Cei89SW6.mjs";
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
- if (!previous) discovered.set(id, next);
92
- else {
93
- const preferred = !previous.installed && next.installed || !previous.enabled && next.installed && next.enabled ? next : previous;
94
- discovered.set(id, {
95
- ...preferred,
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 {
@@ -16,7 +16,7 @@ var CodexPluginMetadataCache = class {
16
16
  this.entries.delete(entryKey);
17
17
  return;
18
18
  }
19
- return entry.snapshot;
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
- snapshot,
39
+ appCacheKey: params.appCacheKey,
40
+ response,
45
41
  expiresAtMs: this.nowMs() + CODEX_PLUGIN_METADATA_CACHE_TTL_MS
46
42
  });
47
- return snapshot;
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 this.entries) if (entry.snapshot.appCacheKey === appCacheKey) this.entries.delete(entryKey);
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() {