fengming 0.3.4 → 0.3.5

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 (2016) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/abort-CjCDVBbH.js +277 -0
  3. package/dist/abort.runtime-DxJ8129J.js +2 -0
  4. package/dist/abort.runtime.js +1 -1
  5. package/dist/accounts-Cyn0sm_v.js +423 -0
  6. package/dist/accounts-DzcLKcN5.js +2 -0
  7. package/dist/acp/control-plane/manager.js +1 -1
  8. package/dist/acp-spawn-4lfz_3K9.js +1286 -0
  9. package/dist/acp-spawn-BCUjuO6L.js +2 -0
  10. package/dist/acp-stateful-target-driver-Bv99uwEA.js +89 -0
  11. package/dist/action-info-CP-p6RHS.js +75 -0
  12. package/dist/active-runtime-registry-DjKe53a5.js +62 -0
  13. package/dist/active-tool-schema-warnings-p7CqUnu1.js +105 -0
  14. package/dist/active-tool-schema-warnings-pGI92yka.js +2 -0
  15. package/dist/agent-B77yluip.js +1825 -0
  16. package/dist/agent-BooUvZnR.js +2 -0
  17. package/dist/agent-bundle-lsp-runtime-3ieSgTgo.js +389 -0
  18. package/dist/agent-bundle-lsp-runtime-CkJ0XJK7.js +2 -0
  19. package/dist/agent-bundle-mcp-materialize-BH-esGZL.js +124 -0
  20. package/dist/agent-bundle-mcp-tools-DkixTTnL.js +3 -0
  21. package/dist/agent-command-BJKcnQy6.js +1435 -0
  22. package/dist/agent-delivery-CEfe_Zzt.js +117 -0
  23. package/dist/agent-harness-runtime-R_Ae6o9C.js +207 -0
  24. package/dist/agent-kWSaRcQt.js +3 -0
  25. package/dist/agent-model-discovery-C49swEgd.js +238 -0
  26. package/dist/agent-model-discovery-DZbixJQs.js +3 -0
  27. package/dist/agent-runner-utils-BChpi9Ec.js +267 -0
  28. package/dist/agent-runner.runtime-3LOdt215.js +3784 -0
  29. package/dist/agent-runner.runtime.js +1 -1
  30. package/dist/agent-runtime-3jsv8b7Y.js +199 -0
  31. package/dist/agent-runtime-label-uoFI4ovH.js +30 -0
  32. package/dist/agent-runtime-metadata-BhFt6kLt.js +53 -0
  33. package/dist/agent-tool-result-middleware-loader-BxYJNC1i.js +55 -0
  34. package/dist/agent-tools-COLEG7aL.js +2506 -0
  35. package/dist/agent-tools.before-tool-call--rMZI5Rd.js +1274 -0
  36. package/dist/agent-tools.before-tool-call-CbX2sfP4.js +2 -0
  37. package/dist/agent-via-gateway-DfKij3De.js +486 -0
  38. package/dist/agent-wait-dedupe-BAUSJotw.js +180 -0
  39. package/dist/agents/agent-bundle-mcp-materialize.js +1 -1
  40. package/dist/agents/auth-profiles.runtime.js +1 -1
  41. package/dist/agents/compaction-planning.worker.js +1 -1
  42. package/dist/agents/embedded-agent-runner/effective-tool-policy.js +1 -1
  43. package/dist/agents/embedded-agent-runner/tool-split.js +1 -1
  44. package/dist/agents/model-catalog.runtime.js +1 -1
  45. package/dist/agents/model-provider-auth.worker.js +3 -3
  46. package/dist/agents/models-config.runtime.js +1 -1
  47. package/dist/agents-CZSNDJWD.js +632 -0
  48. package/dist/agents.command-shared-DgbjfH23.js +16 -0
  49. package/dist/agents.commands.add-DknGM1oz.js +304 -0
  50. package/dist/agents.commands.bind-DDVI0yDe.js +265 -0
  51. package/dist/agents.commands.delete-Dv4RHEhc.js +128 -0
  52. package/dist/agents.commands.identity-BSZbc1QR.js +143 -0
  53. package/dist/agents.commands.list-CA0OTw59.js +235 -0
  54. package/dist/aliases-EY1GbfwT.js +97 -0
  55. package/dist/api-CY0oKcRz.js +3 -0
  56. package/dist/api-DgjY0gIl.js +6 -0
  57. package/dist/api-VyMyAYze.js +2 -0
  58. package/dist/api-key-rotation-DxPKIdmC.js +167 -0
  59. package/dist/app-registration-BBDxCbFo.js +194 -0
  60. package/dist/apply-DMYy7tc3.js +544 -0
  61. package/dist/apply-Dd0n97MD.js +2 -0
  62. package/dist/apply-bHIT1nMp.js +416 -0
  63. package/dist/apply-g8x7Z83S.js +510 -0
  64. package/dist/apply-nnbx9TaB.js +2 -0
  65. package/dist/approval-native-helpers-CjaYvOaZ.js +398 -0
  66. package/dist/artifacts-B55YR-uA.js +368 -0
  67. package/dist/assistant-hJaOgfKl.js +291 -0
  68. package/dist/attachment-normalize-COsastJx.js +213 -0
  69. package/dist/attempt-execution-fDWDWcWe.js +584 -0
  70. package/dist/attempt-execution.helpers-Cze5xPim.js +969 -0
  71. package/dist/attempt-execution.runtime-B1iCG6LN.js +3 -0
  72. package/dist/attempt-execution.runtime.js +1 -1
  73. package/dist/attempt.prompt-helpers-CkBYHBBo.js +543 -0
  74. package/dist/attempt.tool-run-context-DzfRK5pV.js +1240 -0
  75. package/dist/audio-preflight.runtime-rjWd9uyk.js +7 -0
  76. package/dist/audio-preflight.runtime.js +1 -1
  77. package/dist/audit-DgFtNg3U.js +1108 -0
  78. package/dist/audit-L8EC3WhV.js +477 -0
  79. package/dist/audit.nondeep.runtime-D0sQ6bO2.js +1416 -0
  80. package/dist/audit.nondeep.runtime.js +1 -1
  81. package/dist/audit.runtime-CiG82F31.js +7 -0
  82. package/dist/audit.runtime.js +1 -1
  83. package/dist/auth-CzPdsZVM.js +567 -0
  84. package/dist/auth-choice-BNzS9QBI.js +3 -0
  85. package/dist/auth-choice-Cwr5kgcD.js +110 -0
  86. package/dist/auth-choice-DW9qPpMS.js +400 -0
  87. package/dist/auth-choice.apply.api-providers-C68tOdqj.js +34 -0
  88. package/dist/auth-choice.apply.api-providers-DSRK0gYo.js +2 -0
  89. package/dist/auth-choice.plugin-providers.runtime-BJ9VyO1C.js +11 -0
  90. package/dist/auth-choice.plugin-providers.runtime.js +1 -1
  91. package/dist/auth-health-BanKwsTW.js +219 -0
  92. package/dist/auth-list-Dq8obVno.js +115 -0
  93. package/dist/auth-order-VXqoAroP.js +105 -0
  94. package/dist/auth-profiles-6VFEdgC-.js +73 -0
  95. package/dist/auth-profiles-a0M4JYYg.js +14 -0
  96. package/dist/backend-config-COaTdVnN.js +259 -0
  97. package/dist/bash-tools-BMAquSiM.js +3 -0
  98. package/dist/bash-tools-DLiUXfaS.js +3497 -0
  99. package/dist/binding-routing-Bwvdx_7S.js +113 -0
  100. package/dist/binding-targets-Z_d0mK_1.js +121 -0
  101. package/dist/bootstrap-files-CoCV_zqu.js +202 -0
  102. package/dist/bootstrap-files-_T3VoTrV.js +3 -0
  103. package/dist/bridge-server-BIaNurGa.js +113 -0
  104. package/dist/browser-cli-D4wL8NU9.js +230 -0
  105. package/dist/browser-cli-actions-input-z40PGiYI.js +522 -0
  106. package/dist/browser-cli-actions-observe-C4TeyNke.js +81 -0
  107. package/dist/browser-cli-debug-Dv0gH-c8.js +137 -0
  108. package/dist/browser-cli-inspect-BUXeITYc.js +117 -0
  109. package/dist/browser-cli-manage-qMb3Yw5Y.js +446 -0
  110. package/dist/browser-cli-resize-CZWnGwGz.js +32 -0
  111. package/dist/browser-cli-shared-BpinhvE3.js +69 -0
  112. package/dist/browser-cli-state-CBbKqqgP.js +371 -0
  113. package/dist/browser-cli-uI5GGX51.js +2 -0
  114. package/dist/browser-control-auth-CFPJXdN_.js +2 -0
  115. package/dist/browser-profiles-D4ni3t4J.js +2 -0
  116. package/dist/browser-runtime-Dm5D_PLf.js +389 -0
  117. package/dist/browser-tool.schema-Bek02ox5.js +132 -0
  118. package/dist/btw-command-DdrwvCK4.js +18 -0
  119. package/dist/build-DkEeJ9sO.js +261 -0
  120. package/dist/build-info.json +2 -2
  121. package/dist/bundled/boot-md/handler.js +2 -2
  122. package/dist/bundled/session-memory/handler.js +1 -1
  123. package/dist/bundled-channel-config-schema-BeowdkHi.d.ts +3168 -0
  124. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  125. package/dist/capability-cli-DTRuKZJC.js +1809 -0
  126. package/dist/capability-provider-runtime-Cpp-Jq9g.js +346 -0
  127. package/dist/cdp.helpers-GfQkB-B5.js +637 -0
  128. package/dist/channel-BRehZ4Cg.js +2309 -0
  129. package/dist/channel-actions-hdQKe_se.js +46 -0
  130. package/dist/channel-bootstrap.runtime-BzjlNG_j.js +38 -0
  131. package/dist/channel-bootstrap.runtime-CmNNVl40.js +2 -0
  132. package/dist/channel-bootstrap.runtime.js +1 -1
  133. package/dist/channel-core-BLcWqSk-.js +5 -0
  134. package/dist/channel-inbound-pR1B7HTU.js +121 -0
  135. package/dist/channel-message-W0VurpjH.js +12 -0
  136. package/dist/channel-outbound-DO4HI6E_.js +436 -0
  137. package/dist/channel-plugin-resolution-CLA7S5_A.js +2 -0
  138. package/dist/channel-plugin-resolution-DzwVj01h.js +135 -0
  139. package/dist/channel-resolution-DOPyiG4k.js +46 -0
  140. package/dist/channel-selection-kwoWZDQ3.js +171 -0
  141. package/dist/channel-selection.runtime-LiDliif9.js +2 -0
  142. package/dist/channel-selection.runtime.js +1 -1
  143. package/dist/channel.runtime-DDt3PayH.js +697 -0
  144. package/dist/channel.runtime.js +1 -1
  145. package/dist/channels-CKJd4eUz.js +1004 -0
  146. package/dist/channels-cli-DLAPi8pX.js +331 -0
  147. package/dist/chat-6WsYrS9m.js +3 -0
  148. package/dist/chat-DpsCEXAx.js +2940 -0
  149. package/dist/chrome-BWHc9vYG.js +1517 -0
  150. package/dist/chrome-mcp-BGKgR8A_.js +2 -0
  151. package/dist/chrome-mcp-Bg5D5PDc.js +864 -0
  152. package/dist/claude-live-session-BLCZnv-A.js +2 -0
  153. package/dist/claude-live-session-CGnB64D6.js +1338 -0
  154. package/dist/clawbot-cli-ynXzgp8B.js +9 -0
  155. package/dist/cli/daemon-cli.js +3 -3
  156. package/dist/cli/gateway-lifecycle.runtime.js +4 -4
  157. package/dist/cli/run-main.js +12 -12
  158. package/dist/cli-B4Ttnj0P.js +2 -0
  159. package/dist/cli-BjVgdamH.js +2 -0
  160. package/dist/cli-CNqBrHLU.js +293 -0
  161. package/dist/cli-backends.runtime-DoxtCrow.js +7 -0
  162. package/dist/cli-backends.runtime.js +1 -1
  163. package/dist/cli-compaction-BCuLbs75.js +363 -0
  164. package/dist/cli-mthNIkji.js +141 -0
  165. package/dist/cli-registry-loader-B2sNTdgY.js +2 -0
  166. package/dist/cli-registry-loader-Dz9YFrjw.js +193 -0
  167. package/dist/cli-runner-C9t-9-Io.js +597 -0
  168. package/dist/cli-runner-D21qMGk7.js +2 -0
  169. package/dist/cli-runner.runtime-BNqbJFgu.js +3 -0
  170. package/dist/cli-runner.runtime-Dv50IEvH.js +4 -0
  171. package/dist/cli-runner.runtime.js +1 -1
  172. package/dist/cli-session-jBtClYfT.js +119 -0
  173. package/dist/cli-startup-metadata.json +9 -9
  174. package/dist/cli.runtime-CGBzSGAG.js +1276 -0
  175. package/dist/cli.runtime.js +1 -1
  176. package/dist/codex-native-web-search-B3C-srtm.js +20 -0
  177. package/dist/codex-native-web-search-B7xh2Xcb.js +4 -0
  178. package/dist/codex-native-web-search-core-CrwANQg5.js +106 -0
  179. package/dist/command-auth-Dz_pdczs.js +135 -0
  180. package/dist/command-config-resolution-XCA63Yv8.js +25 -0
  181. package/dist/command-config-resolution-xtKMDTG9.js +2 -0
  182. package/dist/command-config-resolution.runtime-xtKMDTG9.js +2 -0
  183. package/dist/command-config-resolution.runtime.js +1 -1
  184. package/dist/command-execution-startup-CasEqEXh.js +90 -0
  185. package/dist/command-primitives-runtime-DC9gtSI3.js +3 -0
  186. package/dist/command-registry-BQnMdca9.js +9 -0
  187. package/dist/command-registry-core-hx2t1jQP.js +114 -0
  188. package/dist/command-registry-rbKA-L_8.js +4 -0
  189. package/dist/command-secret-gateway-7oveYQCx.js +589 -0
  190. package/dist/command-secret-targets-B7M1Us_C.js +2 -0
  191. package/dist/command-status-builders-DrSoZhiI.js +147 -0
  192. package/dist/command-status.runtime-By0071-y.js +90 -0
  193. package/dist/command-status.runtime.js +1 -1
  194. package/dist/commands/status.summary.runtime.js +3 -3
  195. package/dist/commands-B1MnUj5-.js +161 -0
  196. package/dist/commands-compact.runtime-DELj3JaW.js +10 -0
  197. package/dist/commands-compact.runtime.js +1 -1
  198. package/dist/commands-core.runtime-Zw0grrkC.js +2 -0
  199. package/dist/commands-core.runtime.js +1 -1
  200. package/dist/commands-handlers.runtime-BCl_ZHJZ.js +6327 -0
  201. package/dist/commands-handlers.runtime.js +1 -1
  202. package/dist/commands-models-Uurm-0C3.js +448 -0
  203. package/dist/commands-registry-Bo1AeDcq.js +195 -0
  204. package/dist/commands-registry.runtime-C9DBHyhh.js +4 -0
  205. package/dist/commands-registry.runtime.js +1 -1
  206. package/dist/commands-status-BoAXH-wg.js +16 -0
  207. package/dist/commands-status-CNALMTN9.js +3 -0
  208. package/dist/commands-status.runtime-CNALMTN9.js +3 -0
  209. package/dist/commands-status.runtime.js +1 -1
  210. package/dist/commands-subagents-control.runtime-Dl4IuTzV.js +2 -0
  211. package/dist/commands-subagents-control.runtime.js +1 -1
  212. package/dist/commands-system-prompt-BPzpLmUp.js +2 -0
  213. package/dist/commands-system-prompt-DCOZSNh5.js +161 -0
  214. package/dist/commands.runtime-bfCLM0Sg.js +175 -0
  215. package/dist/commands.runtime.js +1 -1
  216. package/dist/commitments/runtime.js +1 -1
  217. package/dist/common-CoOYhmSg.js +286 -0
  218. package/dist/compact-yqaUOESq.js +1165 -0
  219. package/dist/compact.runtime-Y91AFZVE.js +12 -0
  220. package/dist/compact.runtime.js +1 -1
  221. package/dist/compaction-planning-DVnykwzd.js +202 -0
  222. package/dist/completion-cli-BJjq_g_B.js +393 -0
  223. package/dist/config-CsmSEaNn.js +374 -0
  224. package/dist/config-CtNXZ0iy.js +610 -0
  225. package/dist/config-cli-CNpIVdqp.js +1703 -0
  226. package/dist/config-mutation-B-SErGM0.js +5 -0
  227. package/dist/config-mutations-Bu3ahkX8.js +161 -0
  228. package/dist/config-utils-Bv0Nisds.js +141 -0
  229. package/dist/config-validation-DitvTYD8.js +33 -0
  230. package/dist/configure-CdjbRKTg.js +771 -0
  231. package/dist/configure-Cvi-5ml4.js +3 -0
  232. package/dist/configure.commands-BJii4733.js +1253 -0
  233. package/dist/configure.commands-tJzVFJ0o.js +2 -0
  234. package/dist/context-D1N9oPds.js +2 -0
  235. package/dist/context-XMtJ9b3v.js +248 -0
  236. package/dist/context-engine-host-compat-3QznbSaW.js +280 -0
  237. package/dist/context-engine-host-compat-DquSpnKD.js +2 -0
  238. package/dist/context-engine-lifecycle-Bqdhy9JU.js +627 -0
  239. package/dist/control-auth-CMW_9jmY.js +114 -0
  240. package/dist/control-service-D-r3k91q.js +40 -0
  241. package/dist/control-service-uIPYrp9F.js +3 -0
  242. package/dist/control-ui/assets/activity-DgMhyllD.js +124 -0
  243. package/dist/control-ui/assets/agents-CsRhxO2O.js +1030 -0
  244. package/dist/control-ui/assets/channels-Dq8bzpMg.js +120 -0
  245. package/dist/control-ui/assets/cron-Dk5bqYwg.js +1016 -0
  246. package/dist/control-ui/assets/debug-CNIwFEQO.js +97 -0
  247. package/dist/control-ui/assets/index-CV2NsPlu.js +7214 -0
  248. package/dist/control-ui/assets/instances-DLr0iEvT.js +57 -0
  249. package/dist/control-ui/assets/nodes-D3JEksjl.js +444 -0
  250. package/dist/control-ui/assets/sessions-nbXWGlHZ.js +425 -0
  251. package/dist/control-ui/assets/skills-tBOi8OBq.js +362 -0
  252. package/dist/control-ui/assets/workboard-ClTo7wmK.js +402 -0
  253. package/dist/control-ui/index.html +1 -1
  254. package/dist/control-ui/sw.js +1 -1
  255. package/dist/control-ui-AkRMsk9S.js +750 -0
  256. package/dist/conversation-label-generator-DHtcgSBn.js +72 -0
  257. package/dist/conversation-runtime-BEgHW4ta.js +31 -0
  258. package/dist/core-Bslrvfnp.js +284 -0
  259. package/dist/core-api-BOlUb7G8.js +5 -0
  260. package/dist/core-api-CiBoGa2I.js +2 -0
  261. package/dist/crestodian/crestodian.js +1 -1
  262. package/dist/crestodian/rescue-message.js +1 -1
  263. package/dist/crestodian-mXnyuHx9.js +55 -0
  264. package/dist/cron-PbdpyFrD.js +453 -0
  265. package/dist/daemon-install-C-d4dFvn.js +66 -0
  266. package/dist/daemon-install-auth-profiles-store.runtime-CvE2EVVo.js +2 -0
  267. package/dist/daemon-install-auth-profiles-store.runtime.js +1 -1
  268. package/dist/dashboard-Ey5dnvMI.js +263 -0
  269. package/dist/defaults-CsRAv-qE.js +130 -0
  270. package/dist/defaults-DHZBSNHC.js +3 -0
  271. package/dist/defaults.constants-CR4S_tvw.js +76 -0
  272. package/dist/deliver-BkuuFBlm.js +1399 -0
  273. package/dist/deliver-P4upyes7.js +3 -0
  274. package/dist/deliver-runtime-CjnLI_nC.js +2 -0
  275. package/dist/delivery-outbound.runtime-fcJ-M8qj.js +7 -0
  276. package/dist/delivery-outbound.runtime.js +1 -1
  277. package/dist/delivery-queue-BqgHvNlY.js +863 -0
  278. package/dist/delivery-queue-CfsRscJb.js +2 -0
  279. package/dist/delivery-queue-runtime-D0PKG1Bv.js +16 -0
  280. package/dist/delivery-target.runtime-C5e8d0WH.js +45 -0
  281. package/dist/delivery-target.runtime.js +1 -1
  282. package/dist/delivery.runtime-2Ut8xM3P.js +470 -0
  283. package/dist/delivery.runtime.js +1 -1
  284. package/dist/detached-task-runtime-OOZBqRy-.js +86 -0
  285. package/dist/diagnostics-zf6WQ2h7.js +168 -0
  286. package/dist/dialogue-C8IOya-l.js +37 -0
  287. package/dist/direct-dm-wPF-KfNb.js +81 -0
  288. package/dist/directive-handling.defaults-C-1lmFYo.js +22 -0
  289. package/dist/directive-handling.fast-lane-DENPMtYI.js +70 -0
  290. package/dist/directive-handling.impl-C1p5t3qA.js +2 -0
  291. package/dist/directive-handling.impl-DOo2Sa7C.js +823 -0
  292. package/dist/directive-handling.model-selection-6gC-fr_g.js +122 -0
  293. package/dist/directive-handling.persist.runtime-CuhUd2kW.js +274 -0
  294. package/dist/directive-handling.persist.runtime.js +1 -1
  295. package/dist/directives-BIKSyN8C.js +319 -0
  296. package/dist/directory-cli-DZ0PU0Rv.js +239 -0
  297. package/dist/dispatch-DQLImAqt.js +2057 -0
  298. package/dist/dispatch-acp-DzyX7wsq.js +1102 -0
  299. package/dist/dispatch-acp-manager.runtime-CoAfs4O1.js +3 -0
  300. package/dist/dispatch-acp-manager.runtime.js +1 -1
  301. package/dist/dispatch-acp-media.runtime-7uUP_jr9.js +4 -0
  302. package/dist/dispatch-acp-media.runtime.js +1 -1
  303. package/dist/dispatch-acp-transcript.runtime-BUlmV_h0.js +40 -0
  304. package/dist/dispatch-acp-transcript.runtime.js +1 -1
  305. package/dist/dispatch-acp-tts.runtime-ChBnVkNt.js +3 -0
  306. package/dist/dispatch-acp-tts.runtime.js +1 -1
  307. package/dist/dispatch-acp.runtime-DAexFaBu.js +18 -0
  308. package/dist/dispatch-acp.runtime.js +1 -1
  309. package/dist/dispatcher-D3IQEbf9.js +106 -0
  310. package/dist/doctor-BSqEqfb6.js +760 -0
  311. package/dist/doctor-auth-flat-profiles-BIZ4wsYP.js +2 -0
  312. package/dist/doctor-auth-flat-profiles-DXtD5LfC.js +516 -0
  313. package/dist/doctor-auth-legacy-oauth-DwFbRYTP.js +48 -0
  314. package/dist/doctor-auth-oauth-sidecar-6I3FEJbi.js +2 -0
  315. package/dist/doctor-auth-oauth-sidecar-BSC3rnDM.js +177 -0
  316. package/dist/doctor-auth-tVGsUiM6.js +216 -0
  317. package/dist/doctor-bootstrap-size-B0q6bdkO.js +57 -0
  318. package/dist/doctor-claude-cli-Bn79OuBT.js +150 -0
  319. package/dist/doctor-config-flow-CCwocXpV.js +1819 -0
  320. package/dist/doctor-core-checks-D7-1l8jy.js +666 -0
  321. package/dist/doctor-core-checks-eM8FNi8B.js +2 -0
  322. package/dist/doctor-core-checks.runtime-Dc03aeoU.js +278 -0
  323. package/dist/doctor-core-checks.runtime.js +1 -1
  324. package/dist/doctor-gRYfpEbB.js +6 -0
  325. package/dist/doctor-gateway-daemon-flow-KTnHAdeV.js +349 -0
  326. package/dist/doctor-gateway-services-BByDQtjY.js +465 -0
  327. package/dist/doctor-health-CnoM718z.js +65 -0
  328. package/dist/doctor-health-contributions-flVKMQwr.js +874 -0
  329. package/dist/doctor-lint-BBm6gtBa.js +95 -0
  330. package/dist/doctor-memory-search-DjHVDCGo.js +407 -0
  331. package/dist/doctor-state-integrity-Bgw25cz1.js +1257 -0
  332. package/dist/doctor-tool-result-cap-advice-B8wTpiTO.js +27 -0
  333. package/dist/doctor-workspace-status-DcjeJIpT.js +76 -0
  334. package/dist/dreaming-BE4t8DVf.js +523 -0
  335. package/dist/dreaming-command-DWm1lB-Z.js +101 -0
  336. package/dist/dreaming-narrative-8DM-OMrm.js +721 -0
  337. package/dist/dreaming-narrative-CcFfheQI.js +2 -0
  338. package/dist/dreaming-phases-CqOhhTdZ.js +2 -0
  339. package/dist/dreaming-phases-D9eT6Kk0.js +1162 -0
  340. package/dist/drive-D2M5B7-2.js +899 -0
  341. package/dist/echo-transcript-B-wl5MoX.js +52 -0
  342. package/dist/effective-tool-policy-Cx8mC5aA.js +89 -0
  343. package/dist/embedded-agent-BTvtoOe_.js +4 -0
  344. package/dist/embedded-agent-CGmSKuNM.js +4074 -0
  345. package/dist/embedded-agent-helpers-CboIPx57.js +6 -0
  346. package/dist/embedded-agent-helpers-cw0InMDZ.js +1037 -0
  347. package/dist/embedded-agent.runtime-Bfe4bjyF.js +4 -0
  348. package/dist/embedded-agent.runtime.js +1 -1
  349. package/dist/embedded-backend-D-EshN85.js +744 -0
  350. package/dist/embedded-gateway-stub.runtime-Cx9qs0KV.js +12 -0
  351. package/dist/embedded-gateway-stub.runtime.js +1 -1
  352. package/dist/embedding-provider-runtime-DaXfsUPo.js +86 -0
  353. package/dist/embedding-providers-CdU99clu.js +2 -0
  354. package/dist/embeddings-http-BQnlTr-1.js +222 -0
  355. package/dist/engine-qmd-5jbjGywA.js +708 -0
  356. package/dist/engine-storage-CfAgwoDp.js +203 -0
  357. package/dist/entry.js +1 -1
  358. package/dist/errors-C0AUxo3P.js +2 -0
  359. package/dist/exec-approval-forwarder.runtime-BvR47p5Z.js +4 -0
  360. package/dist/exec-approval-forwarder.runtime.js +1 -1
  361. package/dist/exec-approval-session-target-CCqYgaVa.js +177 -0
  362. package/dist/exec-auto-reviewer-BfJaNkNy.js +2 -0
  363. package/dist/exec-auto-reviewer-Dqx7I88Z.js +241 -0
  364. package/dist/execute.runtime-Qb6Z75sG.js +579 -0
  365. package/dist/execute.runtime.js +1 -1
  366. package/dist/extensionAPI.js +2 -2
  367. package/dist/extensions/active-memory/index.js +3 -3
  368. package/dist/extensions/admin-http-rpc/index.js +1 -1
  369. package/dist/extensions/alibaba/index.js +1 -1
  370. package/dist/extensions/alibaba/video-generation-provider.js +1 -1
  371. package/dist/extensions/baichuan/index.js +1 -1
  372. package/dist/extensions/browser/browser-bridge.js +1 -1
  373. package/dist/extensions/browser/browser-cdp.js +1 -1
  374. package/dist/extensions/browser/browser-config.js +5 -5
  375. package/dist/extensions/browser/browser-control-auth.js +2 -2
  376. package/dist/extensions/browser/browser-doctor.js +3 -3
  377. package/dist/extensions/browser/browser-maintenance.js +1 -1
  378. package/dist/extensions/browser/browser-profiles.js +3 -3
  379. package/dist/extensions/browser/browser-runtime-api.js +14 -14
  380. package/dist/extensions/browser/cli-metadata.js +1 -1
  381. package/dist/extensions/browser/index.js +1 -1
  382. package/dist/extensions/browser/plugin-registration.js +1 -1
  383. package/dist/extensions/browser/register.runtime.js +4 -4
  384. package/dist/extensions/browser/runtime-api.js +16 -16
  385. package/dist/extensions/byteplus/index.js +3 -3
  386. package/dist/extensions/byteplus/video-generation-provider.js +1 -1
  387. package/dist/extensions/canvas/index.js +3 -3
  388. package/dist/extensions/canvas/runtime-api.js +2 -2
  389. package/dist/extensions/deepseek/index.js +1 -1
  390. package/dist/extensions/device-pair/api.js +2 -2
  391. package/dist/extensions/device-pair/pair-command-approve.js +1 -1
  392. package/dist/extensions/device-pair/qr-image.js +2 -2
  393. package/dist/extensions/longcat/index.js +1 -1
  394. package/dist/extensions/memory-core/api.js +3 -3
  395. package/dist/extensions/memory-core/cli-metadata.js +1 -1
  396. package/dist/extensions/memory-core/cli.js +2 -2
  397. package/dist/extensions/memory-core/index.js +11 -11
  398. package/dist/extensions/memory-core/manager-runtime.js +1 -1
  399. package/dist/extensions/memory-core/runtime-api.js +6 -6
  400. package/dist/extensions/minimax/image-generation-provider.js +1 -1
  401. package/dist/extensions/minimax/index.js +7 -7
  402. package/dist/extensions/minimax/media-understanding-provider.js +1 -1
  403. package/dist/extensions/minimax/music-generation-provider.js +1 -1
  404. package/dist/extensions/minimax/oauth.js +1 -1
  405. package/dist/extensions/minimax/oauth.runtime.js +1 -1
  406. package/dist/extensions/minimax/provider-registration.js +1 -1
  407. package/dist/extensions/minimax/speech-provider.js +1 -1
  408. package/dist/extensions/minimax/video-generation-provider.js +1 -1
  409. package/dist/extensions/minimax/web-search-provider.js +1 -1
  410. package/dist/extensions/moonshot/index.js +5 -5
  411. package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
  412. package/dist/extensions/moonshot/web-search-provider.js +1 -1
  413. package/dist/extensions/qianfan/index.js +1 -1
  414. package/dist/extensions/qwen/index.js +5 -5
  415. package/dist/extensions/qwen/media-understanding-provider.js +1 -1
  416. package/dist/extensions/qwen/video-generation-provider.js +1 -1
  417. package/dist/extensions/sensenova/index.js +1 -1
  418. package/dist/extensions/skill-workshop/api.js +2 -2
  419. package/dist/extensions/skill-workshop/index.js +4 -4
  420. package/dist/extensions/stepfun/index.js +2 -2
  421. package/dist/extensions/tavily/index.js +1 -1
  422. package/dist/extensions/tavily/web-search-provider.js +1 -1
  423. package/dist/extensions/tencent/index.js +2 -2
  424. package/dist/extensions/tiangong/index.js +1 -1
  425. package/dist/extensions/volcengine/index.js +3 -3
  426. package/dist/extensions/volcengine/speech-provider.js +1 -1
  427. package/dist/extensions/webhooks/api.js +1 -1
  428. package/dist/extensions/webhooks/index.js +1 -1
  429. package/dist/extensions/weixin/index.js +3 -3
  430. package/dist/extensions/workboard/index.js +2 -2
  431. package/dist/extensions/xiaomi/index.js +4 -4
  432. package/dist/extensions/xiaomi/speech-provider.js +1 -1
  433. package/dist/extensions/xingchen/index.js +1 -1
  434. package/dist/extensions/yi/index.js +1 -1
  435. package/dist/extensions/zai/index.js +4 -4
  436. package/dist/extensions/zai/media-understanding-provider.js +1 -1
  437. package/dist/extensions/zhinao/index.js +1 -1
  438. package/dist/external-cli-auth-selection-CM_aOUJw.js +113 -0
  439. package/dist/extra-params-Bm1eLWN9.js +615 -0
  440. package/dist/fallback-notice-state-v1kyWACv.js +15 -0
  441. package/dist/fallbacks-CDllk2g1.js +31 -0
  442. package/dist/fallbacks-shared-DdMKEmAC.js +116 -0
  443. package/dist/fengming-runtime-DSv30J04.js +33 -0
  444. package/dist/fengming-runtime-config-BE-DquuY.js +2 -0
  445. package/dist/fengming-runtime-memory-BE-DquuY.js +2 -0
  446. package/dist/fengming-runtime-session-BE-DquuY.js +2 -0
  447. package/dist/fengming-tools-DHb-ZeDC.js +12221 -0
  448. package/dist/flows-Cz3y10A9.js +189 -0
  449. package/dist/fs-utils-D05rps7O.js +9 -0
  450. package/dist/gateway/protocol/index.d.ts +1 -1
  451. package/dist/gateway-DTi2D7ZS.js +133 -0
  452. package/dist/gateway-cli-DT2fL2fX.js +443 -0
  453. package/dist/gateway-install-token-CJhAycOA.js +136 -0
  454. package/dist/gateway-method-runtime-BuiYTDQk.js +21 -0
  455. package/dist/gateway-runtime-C5_cVlSW.js +23 -0
  456. package/dist/get-reply-Cz-dUrWm.js +5198 -0
  457. package/dist/get-reply-from-config.runtime-BC1HT67i.js +2 -0
  458. package/dist/get-reply-from-config.runtime.js +1 -1
  459. package/dist/github-copilot-token-09lxV3kH.js +2 -0
  460. package/dist/health-CmihbcqN.js +621 -0
  461. package/dist/health-D8L37hBZ.js +111 -0
  462. package/dist/health-DU7I9RrJ.js +3 -0
  463. package/dist/health-state-QZ2E6xGQ.js +106 -0
  464. package/dist/heartbeat-runner-Bz5PMzEI.js +1930 -0
  465. package/dist/heartbeat-runner-DfqqQ_8w.js +5 -0
  466. package/dist/heartbeat-runner.runtime-8BshUhoS.js +3 -0
  467. package/dist/heartbeat-runner.runtime.js +1 -1
  468. package/dist/helpers-Bkq4POdX.js +406 -0
  469. package/dist/hook-helpers-nmDwt3Fa.js +44 -0
  470. package/dist/hooks-9FOcRqfu.js +536 -0
  471. package/dist/hooks-cli-CrQelcwo.js +465 -0
  472. package/dist/http-endpoint-helpers-BD5u6YsT.js +37 -0
  473. package/dist/http-utils-RcKuBJ0I.js +98 -0
  474. package/dist/image-DwNoypK2.js +385 -0
  475. package/dist/image-fallbacks-BUyDnmUX.js +31 -0
  476. package/dist/image-generation-core.auth.runtime-CA8miEMh.js +2 -0
  477. package/dist/image-generation-core.auth.runtime.js +1 -1
  478. package/dist/image-generation-provider-DXMW5EmB.js +152 -0
  479. package/dist/image-runtime-D5QpNNzz.js +9 -0
  480. package/dist/image-tool.helpers-6vGxo1Y0.js +150 -0
  481. package/dist/images-BGWLzQEJ.js +416 -0
  482. package/dist/images-Db4UB3JG.js +2 -0
  483. package/dist/inbound-reply-dispatch-DRF6ZmQg.js +2 -0
  484. package/dist/inbound-reply-dispatch-RAKLqow4.js +147 -0
  485. package/dist/index-DhOQs6M_.d.ts +1497 -0
  486. package/dist/index.js +1 -1
  487. package/dist/infra-runtime-BFrpRc_V.js +32 -0
  488. package/dist/init-sR7bCS9D.js +59 -0
  489. package/dist/install-BzdJbOUx.js +262 -0
  490. package/dist/install.runtime-Zye6pbZ6.js +2 -0
  491. package/dist/internal-DL_vFx8C.js +399 -0
  492. package/dist/isolated-agent-Qif8Llbt.js +2 -0
  493. package/dist/isolated-agent-aqEjxqs-.js +1097 -0
  494. package/dist/kernel-B-i4c2IK.js +979 -0
  495. package/dist/kernel-DYDJ_hLb.js +3 -0
  496. package/dist/kimi-web-search-provider.runtime-95HAkvHY.js +307 -0
  497. package/dist/kimi-web-search-provider.runtime.js +1 -1
  498. package/dist/library-CZVbE5hF.js +45 -0
  499. package/dist/lifecycle-C8M3YLbT.js +2 -0
  500. package/dist/lifecycle-CPDNQnUN.js +570 -0
  501. package/dist/lifecycle-DpuP7n3J.js +355 -0
  502. package/dist/lifecycle.runtime-C8M3YLbT.js +2 -0
  503. package/dist/lifecycle.runtime.js +1 -1
  504. package/dist/link-understanding/apply.runtime.js +3 -3
  505. package/dist/list-B_ALwpPl.js +2 -0
  506. package/dist/list-Bda_GYFy.js +207 -0
  507. package/dist/list.list-command-W9OGfAIU.js +429 -0
  508. package/dist/list.model-row-LV4AaX0H.js +39 -0
  509. package/dist/list.probe-CrZm6BH2.js +451 -0
  510. package/dist/list.probe-Dfdmb8bC.js +2 -0
  511. package/dist/list.provider-catalog-7T1jKk0n.js +211 -0
  512. package/dist/list.provider-catalog-DjGyZVEj.js +2 -0
  513. package/dist/list.registry-load-DkCS8JZQ.js +152 -0
  514. package/dist/list.row-sources-B1vjo_Y9.js +474 -0
  515. package/dist/list.source-plan-C9Sa6zRK.js +81 -0
  516. package/dist/list.status-command-9daSZZDm.js +815 -0
  517. package/dist/live-model-switch-Dy-UFUMS.js +119 -0
  518. package/dist/llm-slug-generator-DEmh5-_1.js +78 -0
  519. package/dist/llm-slug-generator.js +1 -1
  520. package/dist/load-config-CvQpC8k6.js +27 -0
  521. package/dist/load-context-_qSHpZ5S.js +82 -0
  522. package/dist/loader-CntMt07B.js +7008 -0
  523. package/dist/local-dispatch.runtime-BSN_gqNS.js +10 -0
  524. package/dist/local-dispatch.runtime.js +1 -1
  525. package/dist/main-session-restart-recovery-Db7366lt.js +2 -0
  526. package/dist/main-session-restart-recovery-n87NTooQ.js +389 -0
  527. package/dist/managed-image-attachments-BTBBHlKl.js +2 -0
  528. package/dist/managed-image-attachments-C6_V1yX0.js +616 -0
  529. package/dist/manager-CKrWxjV6.js +3737 -0
  530. package/dist/manager-Dvb1FVnx.js +2314 -0
  531. package/dist/mcp/plugin-tools-serve.js +2 -2
  532. package/dist/mcp-http-CSoGXOa_.js +583 -0
  533. package/dist/mcp-http-D4ieDB3W.js +2 -0
  534. package/dist/media-runtime-GeQTQkkK.js +391 -0
  535. package/dist/media-services-CWbIUZDe.js +416 -0
  536. package/dist/media-understanding/apply.runtime.js +1 -1
  537. package/dist/media-understanding-DXc2BD2L.js +87 -0
  538. package/dist/media-understanding-provider-BkdUiVWU.js +70 -0
  539. package/dist/media-understanding-provider-BlgmLViW.js +13 -0
  540. package/dist/media-understanding-provider-C9P2VjkC.js +29 -0
  541. package/dist/media-understanding-provider-CJlbgAvl.js +69 -0
  542. package/dist/memory-CnC2jM1l.js +437 -0
  543. package/dist/memory-core-host-engine-embeddings-Dy9vN-Ce.js +667 -0
  544. package/dist/memory-core-host-engine-foundation-C-pGGQnm.js +15 -0
  545. package/dist/memory-core-host-engine-qmd-DLJDON9w.js +2 -0
  546. package/dist/memory-core-host-engine-storage-Bzf-C8XE.js +2 -0
  547. package/dist/memory-core-host-runtime-cli-_LWA6G3x.js +10 -0
  548. package/dist/memory-core-host-runtime-core-CromkNBr.js +12 -0
  549. package/dist/memory-core-host-runtime-files-DpbviC1b.js +4 -0
  550. package/dist/memory-embedding-provider-runtime-CaVVaYC5.js +36 -0
  551. package/dist/memory-host-core-B5dWHwBF.js +78 -0
  552. package/dist/memory-host-search.runtime-DqlCFac1.js +2 -0
  553. package/dist/memory-host-search.runtime.js +1 -1
  554. package/dist/memory-runtime-BCeeWb1G.js +2 -0
  555. package/dist/memory-runtime-pR9KGin0.js +57 -0
  556. package/dist/memory-search-CpDEEY2Q.js +235 -0
  557. package/dist/message-BeGCG-D8.js +284 -0
  558. package/dist/message-YGMOyqP5.js +2 -0
  559. package/dist/message-action-runner-ByMT3_eb.js +1922 -0
  560. package/dist/message-action-runner-VXmKO_W7.js +2 -0
  561. package/dist/message-handler-MZ0DMbCx.js +1806 -0
  562. package/dist/metadata-registry-loader-BH9D1UOx.js +2 -0
  563. package/dist/metadata-registry-loader-BK1cHCas.js +22 -0
  564. package/dist/migrate-BA6w0hd3.js +2 -0
  565. package/dist/migrate-BGuQC-1W.js +458 -0
  566. package/dist/migration-provider-runtime-BBdDegWG.js +2 -0
  567. package/dist/migration-provider-runtime-C5WUjrQz.js +68 -0
  568. package/dist/minimax-web-search-provider.runtime-suVFk3Zx.js +148 -0
  569. package/dist/minimax-web-search-provider.runtime.js +1 -1
  570. package/dist/model-BJZXR9dq.js +1302 -0
  571. package/dist/model-BL7xlN5h.js +2 -0
  572. package/dist/model-auth-C-6dYVob.js +6 -0
  573. package/dist/model-auth-DJz7R41W.js +705 -0
  574. package/dist/model-auth-label-DKNXktIu.js +67 -0
  575. package/dist/model-catalog-BjiK5rtT.js +3 -0
  576. package/dist/model-catalog-DM1CTjkW.js +434 -0
  577. package/dist/model-catalog-visibility-DEJZG0In.js +76 -0
  578. package/dist/model-config.helpers-BKcUeE_P.js +95 -0
  579. package/dist/model-context-tokens-5y_PQELY.js +572 -0
  580. package/dist/model-fallback-BDdBR053.js +1288 -0
  581. package/dist/model-fallback-auth.runtime-pcWfkIUF.js +5 -0
  582. package/dist/model-fallback-auth.runtime.js +1 -1
  583. package/dist/model-picker-Bpvp4_N4.js +1135 -0
  584. package/dist/model-picker-DWPPtq6d.js +3 -0
  585. package/dist/model-picker-visibility-BtdqVF80.js +22 -0
  586. package/dist/model-picker.runtime-CYlqts2z.js +48 -0
  587. package/dist/model-picker.runtime.js +1 -1
  588. package/dist/model-pricing-cache-BmmncDqL.js +856 -0
  589. package/dist/model-pricing-cache-CEwRyWw2.js +3 -0
  590. package/dist/model-pricing-cache-state-B8Aspp85.js +83 -0
  591. package/dist/model-provider-auth-B3KXoKkE.js +2 -0
  592. package/dist/model-provider-auth-Bo_8T7of.js +375 -0
  593. package/dist/model-runtime-aliases-Br-ZlhrL.js +133 -0
  594. package/dist/model-selection-D5-ERakL.js +254 -0
  595. package/dist/model-selection-DrzgktRu.js +7 -0
  596. package/dist/model-selection-ibwsPgIw.js +352 -0
  597. package/dist/model-selection.runtime-BRkOZejt.js +7 -0
  598. package/dist/model-selection.runtime.js +1 -1
  599. package/dist/models-RPAH3ZBn.js +57 -0
  600. package/dist/models-auth-status-Cwu9OXU8.js +280 -0
  601. package/dist/models-cli-CrYkSUoa.js +257 -0
  602. package/dist/models-config-Ayzj9gDz.js +1189 -0
  603. package/dist/models-config-BFcjB7nN.js +2 -0
  604. package/dist/models-config.providers.secrets-CCRUW7gL.js +2 -0
  605. package/dist/models-config.providers.secrets-DdX_XSRo.js +382 -0
  606. package/dist/models-http-jLFnelH7.js +88 -0
  607. package/dist/monitor-CqWICrjO.js +60 -0
  608. package/dist/monitor-DwccYPfp.js +1024 -0
  609. package/dist/monitor.account-e9EVttpP.js +5382 -0
  610. package/dist/music-generation-provider-Dfc--R-x.js +308 -0
  611. package/dist/native-hook-relay-Cioqiqv8.js +1378 -0
  612. package/dist/native-hook-relay-DRwJIspI.js +19 -0
  613. package/dist/node-cli-CrG3LH9J.js +2806 -0
  614. package/dist/node-command-policy-CkBTEmhl.js +295 -0
  615. package/dist/nodes-BxrWFA09.js +1483 -0
  616. package/dist/nodes-DFPTGZjc.js +3 -0
  617. package/dist/nodes-cli-Czwyt6r1.js +960 -0
  618. package/dist/nodes-pending-B_4QHyB2.js +211 -0
  619. package/dist/nodes-utils-c4k31OaG.js +85 -0
  620. package/dist/oauth-BXncC0JP.js +852 -0
  621. package/dist/oauth-Ba1O2vqP.js +207 -0
  622. package/dist/oauth-CGQkfxbJ.js +746 -0
  623. package/dist/onboard-I5tQlVm6.js +768 -0
  624. package/dist/onboard-channels-BleKfB1D.js +2 -0
  625. package/dist/onboard-channels-jVaUjGYX.js +1534 -0
  626. package/dist/onboard-custom-BR_5oqUr.js +3 -0
  627. package/dist/onboard-custom-Ss0DThuP.js +280 -0
  628. package/dist/onboard-custom-config-B-knjQm7.js +422 -0
  629. package/dist/onboard-search-BsIztGYF.js +412 -0
  630. package/dist/openai-compat-errors-UkLkk8Q9.js +136 -0
  631. package/dist/openai-http-mTQB44gu.js +836 -0
  632. package/dist/openai-transport-stream-CZSs3SIi.js +3427 -0
  633. package/dist/openresponses-http-BA1Shmj-.js +1175 -0
  634. package/dist/operations-DhgPih1F.js +805 -0
  635. package/dist/order-CaXafMPG.js +218 -0
  636. package/dist/outbound-attachment-BAp7DXDc.js +19 -0
  637. package/dist/param-readers-De-m2SoB.js +2 -0
  638. package/dist/payloads-Dg9aAEOC.js +256 -0
  639. package/dist/persistent-bindings.lifecycle-BkLOz501.js +2 -0
  640. package/dist/persistent-bindings.lifecycle-e2MLbBCo.js +85 -0
  641. package/dist/plugin-enabled-CGSENjXc.js +232 -0
  642. package/dist/plugin-install-BI9_bsVT.js +118 -0
  643. package/dist/plugin-install-an4V2iXO.js +2 -0
  644. package/dist/plugin-install-config-policy-C66Nss3D.js +169 -0
  645. package/dist/plugin-registration-DMerQktl.js +97 -0
  646. package/dist/plugin-registry-BZfdCw65.js +3 -0
  647. package/dist/plugin-registry-I1fegSdK.js +2 -0
  648. package/dist/plugin-runtime-B3XMLJka.js +102 -0
  649. package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
  650. package/dist/plugin-sdk/acp-binding-runtime.js +1 -1
  651. package/dist/plugin-sdk/acp-runtime-backend.js +1 -1
  652. package/dist/plugin-sdk/acp-runtime.js +2 -2
  653. package/dist/plugin-sdk/agent-harness-runtime.js +16 -16
  654. package/dist/plugin-sdk/agent-harness-task-runtime.js +4 -4
  655. package/dist/plugin-sdk/agent-harness.js +17 -17
  656. package/dist/plugin-sdk/agent-runtime.js +17 -17
  657. package/dist/plugin-sdk/agent-sessions.js +1 -1
  658. package/dist/plugin-sdk/approval-native-runtime.js +2 -2
  659. package/dist/plugin-sdk/approval-reaction-runtime.js +1 -1
  660. package/dist/plugin-sdk/approval-runtime.js +2 -2
  661. package/dist/plugin-sdk/bundled-channel-config-schema-BsOWCrJT.d.ts +3169 -0
  662. package/dist/plugin-sdk/bundled-channel-config-schema.d.ts +1 -1
  663. package/dist/plugin-sdk/channel-actions.js +2 -2
  664. package/dist/plugin-sdk/channel-config-schema-legacy.d.ts +1 -1
  665. package/dist/plugin-sdk/channel-core.js +2 -2
  666. package/dist/plugin-sdk/channel-envelope.js +1 -1
  667. package/dist/plugin-sdk/channel-inbound-roots.js +1 -1
  668. package/dist/plugin-sdk/channel-inbound.js +4 -4
  669. package/dist/plugin-sdk/channel-location.js +1 -1
  670. package/dist/plugin-sdk/channel-message-runtime.js +5 -5
  671. package/dist/plugin-sdk/channel-message.js +5 -5
  672. package/dist/plugin-sdk/channel-outbound.js +2 -2
  673. package/dist/plugin-sdk/channel-reply-options-runtime.js +1 -1
  674. package/dist/plugin-sdk/command-auth-native.js +2 -2
  675. package/dist/plugin-sdk/command-auth.js +4 -4
  676. package/dist/plugin-sdk/command-primitives-runtime.js +2 -2
  677. package/dist/plugin-sdk/command-status-runtime.js +1 -1
  678. package/dist/plugin-sdk/command-status.js +1 -1
  679. package/dist/plugin-sdk/compat.js +2 -2
  680. package/dist/plugin-sdk/config-mutation.js +2 -2
  681. package/dist/plugin-sdk/config-runtime.js +1 -1
  682. package/dist/plugin-sdk/config-schema.d.ts +2 -2
  683. package/dist/plugin-sdk/conversation-binding-runtime.js +1 -1
  684. package/dist/plugin-sdk/conversation-runtime.js +3 -3
  685. package/dist/plugin-sdk/core.js +3 -3
  686. package/dist/plugin-sdk/delivery-queue-runtime.js +1 -1
  687. package/dist/plugin-sdk/direct-dm.js +1 -1
  688. package/dist/plugin-sdk/discord.d.ts +1 -1
  689. package/dist/plugin-sdk/embedding-providers.js +2 -2
  690. package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
  691. package/dist/plugin-sdk/gateway-runtime.js +2 -2
  692. package/dist/plugin-sdk/health.js +1 -1
  693. package/dist/plugin-sdk/image-generation-core.js +3 -3
  694. package/dist/plugin-sdk/image-generation-runtime.js +1 -1
  695. package/dist/plugin-sdk/image-generation.js +2 -2
  696. package/dist/plugin-sdk/inbound-reply-dispatch.js +3 -3
  697. package/dist/plugin-sdk/index.js +1 -1
  698. package/dist/plugin-sdk/infra-runtime.js +3 -3
  699. package/dist/plugin-sdk/mattermost.js +1 -1
  700. package/dist/plugin-sdk/media-generation-runtime-shared.js +1 -1
  701. package/dist/plugin-sdk/media-generation-runtime.js +1 -1
  702. package/dist/plugin-sdk/media-runtime.js +7 -7
  703. package/dist/plugin-sdk/media-understanding-runtime.js +1 -1
  704. package/dist/plugin-sdk/media-understanding.js +2 -2
  705. package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +4 -4
  706. package/dist/plugin-sdk/memory-core-host-engine-foundation.js +2 -2
  707. package/dist/plugin-sdk/memory-core-host-engine-qmd.js +2 -2
  708. package/dist/plugin-sdk/memory-core-host-engine-storage.js +6 -6
  709. package/dist/plugin-sdk/memory-core-host-runtime-cli.js +2 -2
  710. package/dist/plugin-sdk/memory-core-host-runtime-core.js +3 -3
  711. package/dist/plugin-sdk/memory-core-host-runtime-files.js +4 -4
  712. package/dist/plugin-sdk/memory-core.js +3 -3
  713. package/dist/plugin-sdk/memory-host-core.js +3 -3
  714. package/dist/plugin-sdk/memory-host-files.js +4 -4
  715. package/dist/plugin-sdk/memory-host-search.js +1 -1
  716. package/dist/plugin-sdk/models-provider-runtime.js +1 -1
  717. package/dist/plugin-sdk/music-generation-core.js +1 -1
  718. package/dist/plugin-sdk/native-command-registry.js +1 -1
  719. package/dist/plugin-sdk/outbound-media.js +2 -2
  720. package/dist/plugin-sdk/outbound-runtime.js +3 -3
  721. package/dist/plugin-sdk/param-readers.js +2 -2
  722. package/dist/plugin-sdk/plugin-runtime.js +2 -2
  723. package/dist/plugin-sdk/provider-auth-api-key.js +4 -4
  724. package/dist/plugin-sdk/provider-auth-login.js +1 -1
  725. package/dist/plugin-sdk/provider-auth-runtime.js +2 -2
  726. package/dist/plugin-sdk/provider-auth.js +6 -6
  727. package/dist/plugin-sdk/provider-catalog-runtime.js +2 -2
  728. package/dist/plugin-sdk/provider-entry.js +1 -1
  729. package/dist/plugin-sdk/provider-setup.js +1 -1
  730. package/dist/plugin-sdk/provider-stream-family.js +3 -3
  731. package/dist/plugin-sdk/provider-stream.js +2 -2
  732. package/dist/plugin-sdk/provider-transport-runtime.js +1 -1
  733. package/dist/plugin-sdk/provider-web-fetch.js +2 -2
  734. package/dist/plugin-sdk/provider-web-search.js +4 -4
  735. package/dist/plugin-sdk/realtime-bootstrap-context.js +2 -2
  736. package/dist/plugin-sdk/realtime-transcription.js +1 -1
  737. package/dist/plugin-sdk/realtime-voice.js +2 -2
  738. package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
  739. package/dist/plugin-sdk/reply-runtime.js +6 -6
  740. package/dist/plugin-sdk/runtime-secret-resolution.js +2 -2
  741. package/dist/plugin-sdk/runtime.js +3 -3
  742. package/dist/plugin-sdk/self-hosted-provider-setup.js +1 -1
  743. package/dist/plugin-sdk/simple-completion-runtime.js +1 -1
  744. package/dist/plugin-sdk/speech-core.js +2 -2
  745. package/dist/plugin-sdk/speech.js +1 -1
  746. package/dist/plugin-sdk/tool-plugin.js +1 -1
  747. package/dist/plugin-sdk/transcripts.js +1 -1
  748. package/dist/plugin-sdk/tts-runtime.js +1 -1
  749. package/dist/plugin-sdk/video-generation-core.js +2 -2
  750. package/dist/plugin-sdk/video-generation-runtime.js +1 -1
  751. package/dist/plugin-sdk/web-media.js +3 -3
  752. package/dist/plugin-sdk/zalouser.js +1 -1
  753. package/dist/plugin-service-2XF6Lu_a.js +1249 -0
  754. package/dist/plugins/build-smoke-entry.js +2 -2
  755. package/dist/plugins/loader.js +1 -1
  756. package/dist/plugins/provider-discovery.runtime.js +1 -1
  757. package/dist/plugins/provider-runtime.runtime.js +1 -1
  758. package/dist/plugins/runtime/index.js +19 -19
  759. package/dist/plugins/tools.js +1 -1
  760. package/dist/plugins-authoring-command-CCX6tJwd.js +304 -0
  761. package/dist/plugins-cli-HX8nTV2h.js +63 -0
  762. package/dist/plugins-cli.runtime-BYn4VsLP.js +339 -0
  763. package/dist/plugins-cli.runtime.js +1 -1
  764. package/dist/plugins-command-helpers-ByuW-yNj.js +2 -0
  765. package/dist/plugins-command-helpers-DaaxGnCD.js +164 -0
  766. package/dist/plugins-inspect-command-C9NDk23X.js +248 -0
  767. package/dist/plugins-install-command-B0NfUxeA.js +993 -0
  768. package/dist/plugins-install-command-BmuScfLI.js +2 -0
  769. package/dist/plugins-install-persist-CfwO876P.js +252 -0
  770. package/dist/plugins-list-command-Bx8X908n.js +184 -0
  771. package/dist/plugins-uninstall-command-p6h44-Ft.js +118 -0
  772. package/dist/postinstall-inventory.json +862 -862
  773. package/dist/prepare.runtime-8DdQ4k9k.js +798 -0
  774. package/dist/prepare.runtime.js +1 -1
  775. package/dist/presentation-card-DeAf3jYW.js +164 -0
  776. package/dist/preview-warnings-BF7nlTo8.js +618 -0
  777. package/dist/profiles-DUhMLnqX.js +194 -0
  778. package/dist/program-C7f_U7fr.js +131 -0
  779. package/dist/provider-adapters-CWLwE9KS.js +104 -0
  780. package/dist/provider-api-key-auth-CshQbUPZ.js +117 -0
  781. package/dist/provider-api-key-auth.runtime-B64jPCKn.js +14 -0
  782. package/dist/provider-api-key-auth.runtime.js +1 -1
  783. package/dist/provider-auth-D-I3YLSn.js +281 -0
  784. package/dist/provider-auth-api-key-Bub0Rjak.js +5 -0
  785. package/dist/provider-auth-choice-DpNAEScm.js +311 -0
  786. package/dist/provider-auth-choice-helpers-Bof937LW.js +210 -0
  787. package/dist/provider-auth-choice.runtime-B3spikLY.js +18 -0
  788. package/dist/provider-auth-choice.runtime-vVgz7FKq.js +2 -0
  789. package/dist/provider-auth-choice.runtime.js +1 -1
  790. package/dist/provider-auth-guidance-DcCL0Q2U.js +2 -0
  791. package/dist/provider-auth-guidance-rWRMN4Jn.js +34 -0
  792. package/dist/provider-auth-helpers-Cp8L-Xha.js +177 -0
  793. package/dist/provider-auth-login.runtime-BJUzc4iH.js +156 -0
  794. package/dist/provider-auth-login.runtime.js +1 -1
  795. package/dist/provider-auth-runtime-DmcWtzbb.js +186 -0
  796. package/dist/provider-discovery-JyAJi97k.js +95 -0
  797. package/dist/provider-discovery.runtime-D_0WTYr8.js +290 -0
  798. package/dist/provider-discovery.runtime.js +1 -1
  799. package/dist/provider-dispatcher-C8Jt94Xl.js +22 -0
  800. package/dist/provider-dispatcher.runtime.js +1 -1
  801. package/dist/provider-entry-By0ggZuI.js +134 -0
  802. package/dist/provider-hook-runtime-B8AUbQxf.js +255 -0
  803. package/dist/provider-openai-codex-oauth-C9Mmnt7d.js +2 -0
  804. package/dist/provider-openai-codex-oauth-CH5Jg1vk.js +44 -0
  805. package/dist/provider-registration-C1zvaHQP.js +235 -0
  806. package/dist/provider-registry-B9diJyLv.js +31 -0
  807. package/dist/provider-registry-BXSxmPGA.js +61 -0
  808. package/dist/provider-registry-CoE-sxbq.js +61 -0
  809. package/dist/provider-registry-DLth_GdI.js +61 -0
  810. package/dist/provider-registry-J4LRd5Rg.js +36 -0
  811. package/dist/provider-runtime-B4cw16pt.js +3 -0
  812. package/dist/provider-runtime-DNNbfwOK.js +386 -0
  813. package/dist/provider-runtime.runtime-98mAe_ni.js +26 -0
  814. package/dist/provider-runtime.runtime.js +1 -1
  815. package/dist/provider-self-hosted-setup-Dysv2Kwt.js +373 -0
  816. package/dist/provider-stream-BLaC8bqO.js +1084 -0
  817. package/dist/provider-stream-Caa5YOx2.js +313 -0
  818. package/dist/provider-stream-family-CvvfxLyP.js +2 -0
  819. package/dist/provider-usage-CVNosTP3.js +71 -0
  820. package/dist/provider-usage-D2NudXbO.js +4 -0
  821. package/dist/provider-usage.load-DG6R3lkG.js +357 -0
  822. package/dist/provider-web-search-DmgTaxRU.js +58 -0
  823. package/dist/provider-wizard-Cw-5H3tX.js +125 -0
  824. package/dist/providers.runtime-DF0T9lFz.js +240 -0
  825. package/dist/providers.runtime-oM9Vn1wr.js +2 -0
  826. package/dist/providers.runtime.js +1 -1
  827. package/dist/proxy-BxGnVyJu.js +662 -0
  828. package/dist/public-artifacts-BMP9hZfh.js +7 -0
  829. package/dist/pw-ai-CD52qfYo.js +3064 -0
  830. package/dist/qmd-manager-BYbvU4YC.js +2040 -0
  831. package/dist/qr-cli-Btz2ZdO3.js +2 -0
  832. package/dist/qr-cli-eyTRwMm2.js +371 -0
  833. package/dist/qr-image-BCwiO6tL.js +2 -0
  834. package/dist/queue-CJRoTOBi.js +923 -0
  835. package/dist/read-file-ogB-HjbK.js +183 -0
  836. package/dist/register-service-commands-D_gQ3b6_.js +77 -0
  837. package/dist/register.agent-DXQLn-r0.js +152 -0
  838. package/dist/register.configure-FavQPGce.js +16 -0
  839. package/dist/register.crestodian-Cbfmnl6h.js +24 -0
  840. package/dist/register.maintenance-B8xODEMU.js +85 -0
  841. package/dist/register.message-B8PYgZ-j.js +404 -0
  842. package/dist/register.migrate-CieoN8zZ.js +106 -0
  843. package/dist/register.onboard-BqWDIDKH.js +115 -0
  844. package/dist/register.setup-CgeTBW4T.js +40 -0
  845. package/dist/register.status-health-sessions-C99aHa5h.js +293 -0
  846. package/dist/register.subclis-79SvyMFt.js +31 -0
  847. package/dist/register.subclis-CXrO8_TO.js +3 -0
  848. package/dist/register.subclis-core-GoXV1yMG.js +273 -0
  849. package/dist/rem-harness-laL5luQa.js +649 -0
  850. package/dist/repair-sequencing-DGY2mBg6.js +652 -0
  851. package/dist/reply-media-paths.runtime-BeWVPkgy.js +2 -0
  852. package/dist/reply-media-paths.runtime-rzAV_Kee.js +154 -0
  853. package/dist/reply-media-paths.runtime.js +1 -1
  854. package/dist/reply-payloads-D_JHMviC.js +79 -0
  855. package/dist/reply-payloads-dedupe-B9GGGaL-.js +176 -0
  856. package/dist/reply-payloads-dedupe.runtime--C3jHs9y.js +2 -0
  857. package/dist/reply-payloads-dedupe.runtime.js +1 -1
  858. package/dist/reply-timing-tracker-DPjlETUb.js +205 -0
  859. package/dist/reply-turn-admission-DdfIwcMK.js +2056 -0
  860. package/dist/reply.runtime-BC1HT67i.js +2 -0
  861. package/dist/reply.runtime.js +1 -1
  862. package/dist/reset-preserved-selection-Czd80hug.js +45 -0
  863. package/dist/resolve-COJFlAZT.js +106 -0
  864. package/dist/restart-B9GMMIZt.js +121 -0
  865. package/dist/result-fallback-classifier-By0Z6b8r.js +98 -0
  866. package/dist/root-help-Bp0kGaUZ.js +43 -0
  867. package/dist/route-CgG9Z7OI.js +475 -0
  868. package/dist/route-reply-D9_9oRg1.js +174 -0
  869. package/dist/route-reply.runtime-BwNl3h2m.js +2 -0
  870. package/dist/route-reply.runtime.js +1 -1
  871. package/dist/routes-Cz2NHUV4.js +2 -0
  872. package/dist/routes-DMo6Eacc.js +3701 -0
  873. package/dist/run-SFRSThMI.js +1162 -0
  874. package/dist/run-auth-profile.runtime-BxLM8m_2.js +2 -0
  875. package/dist/run-auth-profile.runtime.js +1 -1
  876. package/dist/run-command-Cd5iN7eN.js +2 -0
  877. package/dist/run-command-ah46O06U.js +23 -0
  878. package/dist/run-context-DGCQJldA.js +66 -0
  879. package/dist/run-context.runtime-CSBHDAd5.js +2 -0
  880. package/dist/run-context.runtime.js +1 -1
  881. package/dist/run-delivery.runtime-C9xoiZ3h.js +762 -0
  882. package/dist/run-delivery.runtime.js +1 -1
  883. package/dist/run-embedded.runtime-D8bz5vfV.js +4 -0
  884. package/dist/run-embedded.runtime.js +1 -1
  885. package/dist/run-execution-cli.runtime-BAa8KPn7.js +4 -0
  886. package/dist/run-execution-cli.runtime.js +1 -1
  887. package/dist/run-executor.runtime-CNnemqSa.js +330 -0
  888. package/dist/run-executor.runtime.js +1 -1
  889. package/dist/run-model-catalog.runtime-Dh7EghXr.js +2 -0
  890. package/dist/run-model-catalog.runtime.js +1 -1
  891. package/dist/run-session-state-cMlTFwT_.js +159 -0
  892. package/dist/run-subagent-registry.runtime-BgQU86-E.js +2 -0
  893. package/dist/run-subagent-registry.runtime.js +1 -1
  894. package/dist/runner-B3YXRJOB.js +704 -0
  895. package/dist/runner.entries-DMTKpRDP.js +1485 -0
  896. package/dist/runtime-BHReFHE2.js +2 -0
  897. package/dist/runtime-BiQZ6Usw.js +615 -0
  898. package/dist/runtime-CAeriu2O.js +10 -0
  899. package/dist/runtime-CAnCRCX3.js +224 -0
  900. package/dist/runtime-CV_2NqSY.js +300 -0
  901. package/dist/runtime-CmpnvXo3.js +245 -0
  902. package/dist/runtime-D2fci1Ey.js +2 -0
  903. package/dist/runtime-DAsYmYeA.js +3 -0
  904. package/dist/runtime-DeA45VKG.js +210 -0
  905. package/dist/runtime-DvkZ8tHI.js +436 -0
  906. package/dist/runtime-DxVUR2Xg.js +2 -0
  907. package/dist/runtime-api-B88le0UE.js +12 -0
  908. package/dist/runtime-channel-AubRWvnH.js +2 -0
  909. package/dist/runtime-channel-DdclSuEu.js +148 -0
  910. package/dist/runtime-config-collectors-DukTj2va.js +525 -0
  911. package/dist/runtime-embedded-agent.runtime-BpLweeFv.js +2 -0
  912. package/dist/runtime-embedded-agent.runtime.js +1 -1
  913. package/dist/runtime-internal-CaoUylZw.js +2 -0
  914. package/dist/runtime-llm.runtime-DlpqGc7S.js +307 -0
  915. package/dist/runtime-llm.runtime.js +1 -1
  916. package/dist/runtime-model-auth.runtime-CLAaWzxY.js +46 -0
  917. package/dist/runtime-model-auth.runtime-DxVvqRTd.js +2 -0
  918. package/dist/runtime-model-auth.runtime.js +1 -1
  919. package/dist/runtime-options-TTtN01-I.js +275 -0
  920. package/dist/runtime-plugin-ClqxJSbp.js +92 -0
  921. package/dist/runtime-plugins-Bq01wLXP.js +32 -0
  922. package/dist/runtime-plugins.runtime-cwCvl1TR.js +2 -0
  923. package/dist/runtime-plugins.runtime.js +1 -1
  924. package/dist/runtime-prepare.runtime-Cz_hV_k5.js +81 -0
  925. package/dist/runtime-prepare.runtime.js +1 -1
  926. package/dist/runtime-provider-QCJq90av.js +24 -0
  927. package/dist/runtime-provider-Wllc3jC6.js +2 -0
  928. package/dist/runtime-registry-loader-BM1mQBJr.js +2 -0
  929. package/dist/runtime-registry-loader-DzhYCt4s.js +117 -0
  930. package/dist/runtime-shared-BfqOW-Vb.js +365 -0
  931. package/dist/runtime-web-channel-plugin-BcVPgD14.js +204 -0
  932. package/dist/runtime-web-tools-fallback.runtime.js +1 -1
  933. package/dist/scan-ldbaD8jq.js +573 -0
  934. package/dist/sdk-security-runtime-Bxhq2O1G.js +86 -0
  935. package/dist/sdk-setup-tools-CsQM9pF0.js +8 -0
  936. package/dist/secrets-cli-DbpIf4-z.js +150 -0
  937. package/dist/security-cli-BK4Xpa6h.js +520 -0
  938. package/dist/selection-BXKik6Ps.js +3 -0
  939. package/dist/selection-D4O3gK3Q.js +18365 -0
  940. package/dist/send-DaoGIay5.js +1222 -0
  941. package/dist/send-DzNjJGJX.js +178 -0
  942. package/dist/send-f5w9krNS.js +711 -0
  943. package/dist/send-media-cOciBxcg.js +2072 -0
  944. package/dist/send-result-DMFwBuOl.js +141 -0
  945. package/dist/server-BoC1mxZ-.js +24 -0
  946. package/dist/server-DZnI6w5k.js +72 -0
  947. package/dist/server-aux-handlers-BwRdYdub.js +1347 -0
  948. package/dist/server-chat-Q95f4ywD.js +827 -0
  949. package/dist/server-close.runtime.js +3 -3
  950. package/dist/server-context-CnXNaarB.js +2 -0
  951. package/dist/server-context-DRBebo7Y.js +955 -0
  952. package/dist/server-cron-C0o0ZvqF.js +3173 -0
  953. package/dist/server-cron-CLeBvurR.js +2 -0
  954. package/dist/server-maintenance-CqHfTnFD.js +152 -0
  955. package/dist/server-methods-BmlBQJMD.js +497 -0
  956. package/dist/server-middleware-DJhnR6jl.js +122 -0
  957. package/dist/server-model-catalog-CoSSk_Gy.js +2 -0
  958. package/dist/server-model-catalog-D32oDTQp.js +73 -0
  959. package/dist/server-node-events-DX9a4etQ.js +597 -0
  960. package/dist/server-plugin-bootstrap-Vco-EpxY.js +71 -0
  961. package/dist/server-plugins-WBX2fZRp.js +435 -0
  962. package/dist/server-reload-handlers-DGJLH8bg.js +719 -0
  963. package/dist/server-restart-sentinel-Bvon7f8K.js +700 -0
  964. package/dist/server-runtime-services-BNcH4vhR.js +3 -0
  965. package/dist/server-runtime-services-BjcQG5y7.js +147 -0
  966. package/dist/server-runtime-subscriptions-W39HeyoT.js +67 -0
  967. package/dist/server-session-events-CO73dMU-.js +244 -0
  968. package/dist/server-session-key-D8V67lDk.js +2 -0
  969. package/dist/server-session-key-v-KYSmRS.js +75 -0
  970. package/dist/server-startup-config-u54lUdWN.js +305 -0
  971. package/dist/server-startup-early-Cy5kArJG.js +87 -0
  972. package/dist/server-startup-memory-DvINFAYn.js +72 -0
  973. package/dist/server-startup-plugins-CerpbOSQ.js +127 -0
  974. package/dist/server-startup-post-attach-COUCwhNa.js +793 -0
  975. package/dist/server-ws-runtime-BfznAnbI.js +374 -0
  976. package/dist/server.impl-dQXccj0z.js +2622 -0
  977. package/dist/session-cost-usage-Bs5yIOBH.js +1600 -0
  978. package/dist/session-kill-http-DVleb3RW.js +121 -0
  979. package/dist/session-log-runtime-OG7J4j9m.js +1258 -0
  980. package/dist/session-override-LIWl5a9T.js +134 -0
  981. package/dist/session-reset-model.runtime-BpnTi4sa.js +144 -0
  982. package/dist/session-reset-model.runtime.js +1 -1
  983. package/dist/session-reset-service-HA07zS8L.js +651 -0
  984. package/dist/session-status.runtime-D6_clH8l.js +2 -0
  985. package/dist/session-status.runtime.js +1 -1
  986. package/dist/session-store-Cj4Rh6qc.js +273 -0
  987. package/dist/session-store.runtime-DSCxACdZ.js +4 -0
  988. package/dist/session-store.runtime.js +1 -1
  989. package/dist/session-subagent-reactivation.runtime-CcwaHAxg.js +2 -0
  990. package/dist/session-subagent-reactivation.runtime.js +1 -1
  991. package/dist/session-tab-registry-C-9uI2Wi.js +551 -0
  992. package/dist/session-utils-BRtPESA4.js +1508 -0
  993. package/dist/sessions-Beltl3Ra.js +1917 -0
  994. package/dist/sessions-DR-X-j8D.js +316 -0
  995. package/dist/sessions-cleanup-CR1CFcJb.js +165 -0
  996. package/dist/sessions-history-http-CjyHWYEv.js +432 -0
  997. package/dist/sessions-patch-peSeltuF.js +401 -0
  998. package/dist/sessions-resolve-D9ULr95s.js +180 -0
  999. package/dist/sessions-table-Da6bua9d.js +161 -0
  1000. package/dist/sessions-uKpnhod0.js +12736 -0
  1001. package/dist/sessions.runtime-C1mVNaU3.js +2 -0
  1002. package/dist/sessions.runtime.js +1 -1
  1003. package/dist/set-DVj21EuB.js +31 -0
  1004. package/dist/set-image-JChDCaAP.js +17 -0
  1005. package/dist/setup-5I-zpID3.js +614 -0
  1006. package/dist/setup-CjtY6cli.js +2 -0
  1007. package/dist/setup-onboard-configure-help-fast-path-C5GcSuXb.js +64 -0
  1008. package/dist/setup.finalize-Bf10PNbl.js +586 -0
  1009. package/dist/setup.gateway-config-EH5Rvwzy.js +281 -0
  1010. package/dist/setup.migration-import-CoeV4Kc1.js +200 -0
  1011. package/dist/setup.migration-import-DFFGw4DI.js +2 -0
  1012. package/dist/setup.post-install-migration-DcQmWTE7.js +128 -0
  1013. package/dist/shared-BFSJZ6B3.js +212 -0
  1014. package/dist/shared-CVM-dYkO.js +5 -0
  1015. package/dist/shared-fvgcmCsj.js +71 -0
  1016. package/dist/simple-completion-runtime-C_TXe4M1.js +2 -0
  1017. package/dist/simple-completion-runtime-DREq-fcF.js +206 -0
  1018. package/dist/simple-completion-transport-DtD1fEvJ.js +83 -0
  1019. package/dist/snapshot-urls-B-wkwDI9.js +317 -0
  1020. package/dist/speech-core-KQg6oKcR.js +119 -0
  1021. package/dist/speech-provider-DfyLYitQ.js +171 -0
  1022. package/dist/speech-provider-oDvTumNW.js +227 -0
  1023. package/dist/speech-provider-yL-TQ3Em.js +233 -0
  1024. package/dist/stale-oauth-profile-shadows-CW11VYMM.js +2 -0
  1025. package/dist/stale-oauth-profile-shadows-DFl6Lyf1.js +186 -0
  1026. package/dist/standalone-runtime-registry-loader-BiponY-y.js +59 -0
  1027. package/dist/startup-context-PVXYM-X3.js +314 -0
  1028. package/dist/status-BA_0z83w.js +249 -0
  1029. package/dist/status-Bc7BGlRt.js +2 -0
  1030. package/dist/status-BwPWg9eQ.js +3 -0
  1031. package/dist/status-CLQ66eml.js +4 -0
  1032. package/dist/status-Ci2gChtY.js +466 -0
  1033. package/dist/status-CmtBWJEE.js +2 -0
  1034. package/dist/status-DdnMnPNs.js +73 -0
  1035. package/dist/status-all-BpTvkYrt.js +573 -0
  1036. package/dist/status-json-CizozZCr.js +15 -0
  1037. package/dist/status-json-command-FzKa2t6O.js +84 -0
  1038. package/dist/status-message-BHbnxwmt.js +495 -0
  1039. package/dist/status-message.runtime-Df5WBBAk.js +6 -0
  1040. package/dist/status-message.runtime.js +1 -1
  1041. package/dist/status-queue.runtime-CXnZV4Bj.js +2 -0
  1042. package/dist/status-queue.runtime.js +1 -1
  1043. package/dist/status-runtime-shared-D3Hz8WZ_.js +289 -0
  1044. package/dist/status-subagents.runtime-PoDdwwaw.js +32 -0
  1045. package/dist/status-subagents.runtime.js +1 -1
  1046. package/dist/status-text-DNxXSCuI.js +301 -0
  1047. package/dist/status.command-C_e9GcMg.js +2 -0
  1048. package/dist/status.command-DjVKDmt_.js +425 -0
  1049. package/dist/status.command.text-runtime-BeHlqL8b.js +15 -0
  1050. package/dist/status.runtime-h--fx9HY.js +2 -0
  1051. package/dist/status.scan-WyR8TeJz.js +72 -0
  1052. package/dist/status.scan-overview-CMzUAQMQ.js +460 -0
  1053. package/dist/status.scan.deps.runtime-1JTrdyHk.js +19 -0
  1054. package/dist/status.scan.deps.runtime.js +1 -1
  1055. package/dist/status.scan.fast-json-D2jw1wKO.js +163 -0
  1056. package/dist/status.scan.fast-json-DbN1KxJT.js +2 -0
  1057. package/dist/status.summary-6ZijZM1g.js +2 -0
  1058. package/dist/status.summary-CiCsChO-.js +276 -0
  1059. package/dist/store-CdBPITcg.js +2302 -0
  1060. package/dist/store-D0l2NCdn.js +3 -0
  1061. package/dist/stored-model-override-HEgnFh6b.js +79 -0
  1062. package/dist/subagent-announce-BUv_kA1W.js +353 -0
  1063. package/dist/subagent-announce-delivery-Ci2Y_p--.js +1369 -0
  1064. package/dist/subagent-control-BM3vNgsQ.js +492 -0
  1065. package/dist/subagent-control.runtime-Df3pVQL9.js +3 -0
  1066. package/dist/subagent-control.runtime.js +1 -1
  1067. package/dist/subagent-hooks-CN2fLez2.js +2 -0
  1068. package/dist/subagent-hooks-CeOmTJBf.js +230 -0
  1069. package/dist/subagent-hooks-api-Cfe4DAT9.js +23 -0
  1070. package/dist/subagent-registry-B9RPAXUs.js +2627 -0
  1071. package/dist/subagent-registry-C7tedtVB.js +3 -0
  1072. package/dist/subagent-registry.runtime.js +2 -2
  1073. package/dist/subagent-session-cleanup-y0ijZ-LQ.js +390 -0
  1074. package/dist/system-DVtrOGbV.js +111 -0
  1075. package/dist/system-prompt-config-BVmrcmmr.js +918 -0
  1076. package/dist/talk-CrdgqTCl.js +2454 -0
  1077. package/dist/target-id-CrUyi-Uq.js +107 -0
  1078. package/dist/targets-KZ2ezPwx.js +267 -0
  1079. package/dist/targets.runtime-iZ8KdQ1C.js +2 -0
  1080. package/dist/targets.runtime.js +1 -1
  1081. package/dist/task-executor-893pMqzn.js +349 -0
  1082. package/dist/task-owner-access-DC7MKz3n.js +74 -0
  1083. package/dist/task-registry-control.runtime.js +2 -2
  1084. package/dist/task-registry-delivery-runtime-YGMOyqP5.js +2 -0
  1085. package/dist/task-registry-uaYJfgXF.js +2362 -0
  1086. package/dist/task-registry.maintenance-Dx0m2NYh.js +2 -0
  1087. package/dist/task-registry.maintenance-gApg-XOt.js +764 -0
  1088. package/dist/task-status-access-CFhD_ieY.js +18 -0
  1089. package/dist/tasks-B_Qoz38D.js +153 -0
  1090. package/dist/tasks-DtV85zJT.js +548 -0
  1091. package/dist/tasks-audit-system-Con3yYnm.js +210 -0
  1092. package/dist/tasks-json-BM3pauZl.js +73 -0
  1093. package/dist/tavily-web-search-provider.runtime-Cmyyc5kX.js +112 -0
  1094. package/dist/tavily-web-search-provider.runtime.js +1 -1
  1095. package/dist/text-report-CKxmVmt5.js +695 -0
  1096. package/dist/text-transforms.runtime-DVwVsBRS.js +113 -0
  1097. package/dist/text-transforms.runtime.js +1 -1
  1098. package/dist/thread-bindings-B6UEVp9q.js +228 -0
  1099. package/dist/tool-KOZc7TIF.js +143 -0
  1100. package/dist/tool-dispatch-Ca4z2GEr.js +155 -0
  1101. package/dist/tool-images-CzDwHeDR.js +247 -0
  1102. package/dist/tool-plugin-BvQBJ2gU.js +93 -0
  1103. package/dist/tool-resolution-Ddxl6tjh.js +153 -0
  1104. package/dist/tool-result-truncation-BSKuIhd5.js +498 -0
  1105. package/dist/tool-schema-nB27q-vb.js +40 -0
  1106. package/dist/tool-schema-projection-COrMarLR.js +215 -0
  1107. package/dist/tool-split-BjPHBFrv.js +323 -0
  1108. package/dist/tools-CV40BWkc.js +901 -0
  1109. package/dist/tools-catalog-5stC7W2V.js +156 -0
  1110. package/dist/tools-effective-BVjqz2FV.js +442 -0
  1111. package/dist/tools-effective-inventory-esPY5jRB.js +379 -0
  1112. package/dist/tools-invoke-Czk_NM9G.js +51 -0
  1113. package/dist/tools-invoke-http-D7PbsODz.js +68 -0
  1114. package/dist/tools-invoke-shared-CzrEn0Dm.js +200 -0
  1115. package/dist/tools-rSjgf61B.js +579 -0
  1116. package/dist/tools.runtime-DiChCSGI.js +5 -0
  1117. package/dist/tools.runtime.js +1 -1
  1118. package/dist/transcript-rewrite-4IQefjvK.js +688 -0
  1119. package/dist/transcripts-tool-BXTS8tE5.js +2 -0
  1120. package/dist/transcripts-tool-CeWGgz5k.js +656 -0
  1121. package/dist/tts-BS8EeM8p.js +2 -0
  1122. package/dist/tts-BlTZjsaE.js +194 -0
  1123. package/dist/tts-runtime-BfRdJDyY.js +1337 -0
  1124. package/dist/tts-vRSvSw-t.js +3 -0
  1125. package/dist/tts.runtime-ChBnVkNt.js +3 -0
  1126. package/dist/tts.runtime-CmVCUbzq.js +2 -0
  1127. package/dist/tts.runtime.js +1 -1
  1128. package/dist/tui-BoQVBgWB.js +4860 -0
  1129. package/dist/tui-DBYK9BeQ.js +2 -0
  1130. package/dist/tui-backend-X0NI7rAv.js +256 -0
  1131. package/dist/tui-cli-BpUtjV38.js +40 -0
  1132. package/dist/typing-policy-CBwyAQh4.js +199 -0
  1133. package/dist/usage-Bl-tgGx-.js +623 -0
  1134. package/dist/usage-Cj_ektBl.js +1113 -0
  1135. package/dist/usage-format-DWO9ckX3.js +394 -0
  1136. package/dist/usage-format-DnCIXsqG.js +2 -0
  1137. package/dist/video-generation-provider-B7ib4AeI.js +297 -0
  1138. package/dist/video-generation-provider-CXQ6fqJx.js +64 -0
  1139. package/dist/video-generation-provider-DXjl05T6.js +325 -0
  1140. package/dist/video-generation-provider-Db8h71jA.js +77 -0
  1141. package/dist/web-fetch/runtime.js +1 -1
  1142. package/dist/web-fetch-providers.runtime-DhPkYjgB.js +41 -0
  1143. package/dist/web-fetch-providers.runtime.js +1 -1
  1144. package/dist/web-guarded-fetch-BdsVyvDS.js +58 -0
  1145. package/dist/web-guarded-fetch-CJR3JCwT.js +2 -0
  1146. package/dist/web-media-BzzQJAwk.js +4 -0
  1147. package/dist/web-media-DViZjNBa.js +2 -0
  1148. package/dist/web-media-inHawfBU.js +651 -0
  1149. package/dist/web-provider-runtime-shared-Cc08Lt9p.js +142 -0
  1150. package/dist/web-search-provider-common-CtbtmUL-.js +252 -0
  1151. package/dist/web-search-providers.runtime-B7x_cRVn.js +41 -0
  1152. package/dist/web-search-providers.runtime.js +1 -1
  1153. package/dist/zod-schema.core-Cuz0lz6m.d.ts +166 -0
  1154. package/package.json +1 -1
  1155. package/dist/abort-CR0u3VsG.js +0 -277
  1156. package/dist/abort.runtime-CXUxanGg.js +0 -2
  1157. package/dist/accounts-BxBaquAf.js +0 -423
  1158. package/dist/accounts-vQjpoqEe.js +0 -2
  1159. package/dist/acp-spawn-2elSoS0E.js +0 -1286
  1160. package/dist/acp-spawn-DtKOHNO1.js +0 -2
  1161. package/dist/acp-stateful-target-driver-BqeA5j0h.js +0 -89
  1162. package/dist/action-info-B8NotHFw.js +0 -75
  1163. package/dist/active-runtime-registry-BO9mpPuB.js +0 -62
  1164. package/dist/active-tool-schema-warnings-C8vGj5FX.js +0 -105
  1165. package/dist/active-tool-schema-warnings-CVeFJuWI.js +0 -2
  1166. package/dist/agent-BgEaDMdp.js +0 -1825
  1167. package/dist/agent-_V5GbziF.js +0 -2
  1168. package/dist/agent-bundle-lsp-runtime-0jBcDEHh.js +0 -389
  1169. package/dist/agent-bundle-lsp-runtime-CQ6dZLs_.js +0 -2
  1170. package/dist/agent-bundle-mcp-materialize-Cu6JqMzC.js +0 -124
  1171. package/dist/agent-bundle-mcp-tools-BGL827cn.js +0 -3
  1172. package/dist/agent-command-CMJdGr16.js +0 -1435
  1173. package/dist/agent-delivery-DMu1MOeq.js +0 -117
  1174. package/dist/agent-harness-runtime-BKSW2E1O.js +0 -207
  1175. package/dist/agent-model-discovery-Cu4YL31r.js +0 -3
  1176. package/dist/agent-model-discovery-DdmVtkZo.js +0 -238
  1177. package/dist/agent-runner-utils-DXNDhwkI.js +0 -267
  1178. package/dist/agent-runner.runtime-Cym4Odfd.js +0 -3784
  1179. package/dist/agent-runtime-BkbhevY3.js +0 -199
  1180. package/dist/agent-runtime-label-DNP06p76.js +0 -30
  1181. package/dist/agent-runtime-metadata-JaTKc7mA.js +0 -53
  1182. package/dist/agent-tool-result-middleware-loader-FbZE0Qpk.js +0 -55
  1183. package/dist/agent-tools-Nwh8BlKX.js +0 -2506
  1184. package/dist/agent-tools.before-tool-call-BwY-FYFl.js +0 -1274
  1185. package/dist/agent-tools.before-tool-call-DwUmYhE3.js +0 -2
  1186. package/dist/agent-u5NDWrw9.js +0 -3
  1187. package/dist/agent-via-gateway-DMtOMwZa.js +0 -486
  1188. package/dist/agent-wait-dedupe-CLuKbI_7.js +0 -180
  1189. package/dist/agents-CiW7UEuB.js +0 -632
  1190. package/dist/agents.command-shared-CXGSQscb.js +0 -16
  1191. package/dist/agents.commands.add-BYBrZDXD.js +0 -304
  1192. package/dist/agents.commands.bind-nfg3AlVc.js +0 -265
  1193. package/dist/agents.commands.delete-pRj6vIrn.js +0 -128
  1194. package/dist/agents.commands.identity-Ci2PnDDl.js +0 -143
  1195. package/dist/agents.commands.list-Crj3BmqB.js +0 -235
  1196. package/dist/aliases-BFspFx3-.js +0 -97
  1197. package/dist/api-BiXhdPle.js +0 -3
  1198. package/dist/api-Cptkjys5.js +0 -6
  1199. package/dist/api-D3vT4ZVi.js +0 -2
  1200. package/dist/api-key-rotation-CQgW8LEx.js +0 -167
  1201. package/dist/app-registration-YW276fZC.js +0 -194
  1202. package/dist/apply-BRxKrOiK.js +0 -510
  1203. package/dist/apply-D0fWCa-U.js +0 -2
  1204. package/dist/apply-DIR8y0ZA.js +0 -2
  1205. package/dist/apply-DNUIV0Lt.js +0 -416
  1206. package/dist/apply-Dux9jI7f.js +0 -544
  1207. package/dist/approval-native-helpers-BMT-5X47.js +0 -398
  1208. package/dist/artifacts-CTrtIv9T.js +0 -368
  1209. package/dist/assistant-ClfI8Kho.js +0 -291
  1210. package/dist/attachment-normalize-DAW86mZY.js +0 -213
  1211. package/dist/attempt-execution-DTi2UfET.js +0 -584
  1212. package/dist/attempt-execution.helpers-DrX0QToi.js +0 -969
  1213. package/dist/attempt-execution.runtime-BCmAxwGy.js +0 -3
  1214. package/dist/attempt.prompt-helpers-BE6kGRtT.js +0 -543
  1215. package/dist/attempt.tool-run-context-J9O2yjbV.js +0 -1240
  1216. package/dist/audio-preflight.runtime-D3GXVYBI.js +0 -7
  1217. package/dist/audit-5T20D-xm.js +0 -1108
  1218. package/dist/audit-CWuV5GlP.js +0 -477
  1219. package/dist/audit.nondeep.runtime-DeYwRDYj.js +0 -1416
  1220. package/dist/audit.runtime-rUlvK4Rb.js +0 -7
  1221. package/dist/auth-DunUSatn.js +0 -567
  1222. package/dist/auth-choice--eBzca8Y.js +0 -3
  1223. package/dist/auth-choice-DJ9jsFUq.js +0 -400
  1224. package/dist/auth-choice-_pLkIdVh.js +0 -110
  1225. package/dist/auth-choice.apply.api-providers-CALcopRP.js +0 -2
  1226. package/dist/auth-choice.apply.api-providers-Dzzm1snk.js +0 -34
  1227. package/dist/auth-choice.plugin-providers.runtime-BHKTeZZc.js +0 -11
  1228. package/dist/auth-health-Cs4OjiF2.js +0 -219
  1229. package/dist/auth-list-bwJ4QDs0.js +0 -115
  1230. package/dist/auth-order-BoHN3Dc_.js +0 -105
  1231. package/dist/auth-profiles-BOLncVgy.js +0 -73
  1232. package/dist/auth-profiles-BiQRkULt.js +0 -14
  1233. package/dist/backend-config-B5yga5ay.js +0 -259
  1234. package/dist/bash-tools-BWvldguc.js +0 -3
  1235. package/dist/bash-tools-DEAAO5np.js +0 -3497
  1236. package/dist/binding-routing-BbtHmU_l.js +0 -113
  1237. package/dist/binding-targets-DSNv3-QA.js +0 -121
  1238. package/dist/bootstrap-files-DD8V2dLe.js +0 -202
  1239. package/dist/bootstrap-files-_6u1uJW2.js +0 -3
  1240. package/dist/bridge-server-v1-XPnAZ.js +0 -113
  1241. package/dist/browser-cli-CnpuO4KR.js +0 -230
  1242. package/dist/browser-cli-DPbIn8SK.js +0 -2
  1243. package/dist/browser-cli-actions-input-DoGR6LI-.js +0 -522
  1244. package/dist/browser-cli-actions-observe-CYMpgmtF.js +0 -81
  1245. package/dist/browser-cli-debug-ChJjSq-h.js +0 -137
  1246. package/dist/browser-cli-inspect-Bbci-WPG.js +0 -117
  1247. package/dist/browser-cli-manage-Bnscjb7b.js +0 -446
  1248. package/dist/browser-cli-resize-D1MJdvZI.js +0 -32
  1249. package/dist/browser-cli-shared-BCQwqz51.js +0 -69
  1250. package/dist/browser-cli-state-BWkPsvUg.js +0 -371
  1251. package/dist/browser-control-auth-CEP_ExeC.js +0 -2
  1252. package/dist/browser-profiles-SvnqnHVN.js +0 -2
  1253. package/dist/browser-runtime-0mRxjFpp.js +0 -389
  1254. package/dist/browser-tool.schema--CLR3nDv.js +0 -132
  1255. package/dist/btw-command-DV6HfrRV.js +0 -18
  1256. package/dist/build-DiRmljCi.js +0 -261
  1257. package/dist/bundled-channel-config-schema-Bte--ZlY.d.ts +0 -3168
  1258. package/dist/capability-cli-ATfwTYFe.js +0 -1809
  1259. package/dist/capability-provider-runtime-l3nnLGvn.js +0 -346
  1260. package/dist/cdp.helpers-IIuc0KGS.js +0 -637
  1261. package/dist/channel-CzTD2ouI.js +0 -2309
  1262. package/dist/channel-actions-B5Yk5Axf.js +0 -46
  1263. package/dist/channel-bootstrap.runtime-C9F-Pq1o.js +0 -38
  1264. package/dist/channel-bootstrap.runtime-TPyY5Ngv.js +0 -2
  1265. package/dist/channel-core-XMZJ-ZGF.js +0 -5
  1266. package/dist/channel-inbound-DvqkKmiH.js +0 -121
  1267. package/dist/channel-message-CnJ4vUyt.js +0 -12
  1268. package/dist/channel-outbound-BhefGAqY.js +0 -436
  1269. package/dist/channel-plugin-resolution-BiaJ8aRa.js +0 -2
  1270. package/dist/channel-plugin-resolution-D_CxkMVc.js +0 -135
  1271. package/dist/channel-resolution-DzI28gIM.js +0 -46
  1272. package/dist/channel-selection-CLFO4-eQ.js +0 -171
  1273. package/dist/channel-selection.runtime-Beb2-bMH.js +0 -2
  1274. package/dist/channel.runtime-By5T5eGw.js +0 -697
  1275. package/dist/channels-BrRY9Mag.js +0 -1004
  1276. package/dist/channels-cli-CF--e2RU.js +0 -331
  1277. package/dist/chat-BTMPilpx.js +0 -2940
  1278. package/dist/chat-DnC7XCWK.js +0 -3
  1279. package/dist/chrome-C3_dN9jE.js +0 -1517
  1280. package/dist/chrome-mcp-5jjDHIgn.js +0 -864
  1281. package/dist/chrome-mcp-DFAa-WzK.js +0 -2
  1282. package/dist/claude-live-session-BUPeOzLE.js +0 -1338
  1283. package/dist/claude-live-session-Bprgmr1-.js +0 -2
  1284. package/dist/clawbot-cli-5UVkLT1Y.js +0 -9
  1285. package/dist/cli-6a6sMEUB.js +0 -2
  1286. package/dist/cli-COCN9B5e.js +0 -2
  1287. package/dist/cli-CpI4dBXy.js +0 -141
  1288. package/dist/cli-YLx-ekdH.js +0 -293
  1289. package/dist/cli-backends.runtime-CsBjr7ag.js +0 -7
  1290. package/dist/cli-compaction-Bh0oMwUa.js +0 -363
  1291. package/dist/cli-registry-loader-DDbaAJgY.js +0 -2
  1292. package/dist/cli-registry-loader-xc2Ah8S4.js +0 -193
  1293. package/dist/cli-runner-BfSrIn-9.js +0 -597
  1294. package/dist/cli-runner-D_FAjNbR.js +0 -2
  1295. package/dist/cli-runner.runtime-BJetQDu1.js +0 -3
  1296. package/dist/cli-runner.runtime-BKJQkc7C.js +0 -4
  1297. package/dist/cli-session-Cy3IeH0g.js +0 -119
  1298. package/dist/cli.runtime-BpOz0s3N.js +0 -1276
  1299. package/dist/codex-native-web-search-BDtKRV3F.js +0 -4
  1300. package/dist/codex-native-web-search-C0TrfoMX.js +0 -20
  1301. package/dist/codex-native-web-search-core-CzlK1GfN.js +0 -106
  1302. package/dist/command-auth-CFnvdYX2.js +0 -135
  1303. package/dist/command-config-resolution-B_86rG8v.js +0 -2
  1304. package/dist/command-config-resolution-BbadcA2M.js +0 -25
  1305. package/dist/command-config-resolution.runtime-B_86rG8v.js +0 -2
  1306. package/dist/command-execution-startup-Rrwwdg_5.js +0 -90
  1307. package/dist/command-primitives-runtime-C9bTt5IV.js +0 -3
  1308. package/dist/command-registry-CbpdQKmu.js +0 -9
  1309. package/dist/command-registry-Dw-XC_Zk.js +0 -4
  1310. package/dist/command-registry-core-rvEDki6p.js +0 -114
  1311. package/dist/command-secret-gateway-BX6BIiFn.js +0 -589
  1312. package/dist/command-secret-targets-DCzlTkb5.js +0 -2
  1313. package/dist/command-status-builders-DIsZN9aY.js +0 -147
  1314. package/dist/command-status.runtime-C2x4yMRd.js +0 -90
  1315. package/dist/commands-FYCxWqIx.js +0 -161
  1316. package/dist/commands-compact.runtime-BTMQfx1k.js +0 -10
  1317. package/dist/commands-core.runtime-CuNLz2wm.js +0 -2
  1318. package/dist/commands-handlers.runtime-DyNuPOmY.js +0 -6327
  1319. package/dist/commands-models-s7BRmLQh.js +0 -448
  1320. package/dist/commands-registry-BxEq-3UJ.js +0 -195
  1321. package/dist/commands-registry.runtime-CbXW33S_.js +0 -4
  1322. package/dist/commands-status-BRJMba4h.js +0 -16
  1323. package/dist/commands-status-DCXEwlSF.js +0 -3
  1324. package/dist/commands-status.runtime-DCXEwlSF.js +0 -3
  1325. package/dist/commands-subagents-control.runtime-CduLQJFD.js +0 -2
  1326. package/dist/commands-system-prompt-B3LD8CDs.js +0 -161
  1327. package/dist/commands-system-prompt-DPsXTqOQ.js +0 -2
  1328. package/dist/commands.runtime-3sVz8Qgo.js +0 -175
  1329. package/dist/common-CZvBLb3w.js +0 -286
  1330. package/dist/compact-DxU_9XEc.js +0 -1165
  1331. package/dist/compact.runtime-CqQTypVl.js +0 -12
  1332. package/dist/compaction-planning-DArTi9SN.js +0 -202
  1333. package/dist/completion-cli-CiKl5HhI.js +0 -393
  1334. package/dist/config--yllOaSC.js +0 -374
  1335. package/dist/config-Yt5UcD91.js +0 -610
  1336. package/dist/config-cli-BeXS3R6k.js +0 -1703
  1337. package/dist/config-mutation-cQeWhUqy.js +0 -5
  1338. package/dist/config-mutations-Cg04LH_S.js +0 -161
  1339. package/dist/config-utils-Dhq_UKMC.js +0 -141
  1340. package/dist/config-validation-BANohTKD.js +0 -33
  1341. package/dist/configure-CWxhlx9G.js +0 -771
  1342. package/dist/configure-Jejkc6dn.js +0 -3
  1343. package/dist/configure.commands-BYy1bz8G.js +0 -2
  1344. package/dist/configure.commands-C3hDvZse.js +0 -1253
  1345. package/dist/context-DptQ59DZ.js +0 -248
  1346. package/dist/context-_ZshNBhD.js +0 -2
  1347. package/dist/context-engine-host-compat-C_eflvRw.js +0 -2
  1348. package/dist/context-engine-host-compat-s15Pu845.js +0 -280
  1349. package/dist/context-engine-lifecycle-COHFLnj4.js +0 -627
  1350. package/dist/control-auth-CQJpLoIb.js +0 -114
  1351. package/dist/control-service-BFSgA0Py.js +0 -40
  1352. package/dist/control-service-D7GZv-GS.js +0 -3
  1353. package/dist/control-ui/assets/activity-CCu43qU8.js +0 -124
  1354. package/dist/control-ui/assets/agents-DCvsB0yO.js +0 -1030
  1355. package/dist/control-ui/assets/channels-CpM2j5xT.js +0 -120
  1356. package/dist/control-ui/assets/cron-CLXNfwYa.js +0 -1016
  1357. package/dist/control-ui/assets/debug-BcJ34lrC.js +0 -97
  1358. package/dist/control-ui/assets/index-CuBn2YpX.js +0 -7214
  1359. package/dist/control-ui/assets/instances-Bu6NM_Hs.js +0 -57
  1360. package/dist/control-ui/assets/nodes-Bd1WzVLK.js +0 -444
  1361. package/dist/control-ui/assets/sessions-C2r8pbt7.js +0 -425
  1362. package/dist/control-ui/assets/skills-DIjn93ee.js +0 -362
  1363. package/dist/control-ui/assets/workboard-CHb0if1l.js +0 -402
  1364. package/dist/control-ui-ChfTPXZo.js +0 -750
  1365. package/dist/conversation-label-generator-CTfnInQF.js +0 -72
  1366. package/dist/conversation-runtime-B7oAN9Tq.js +0 -31
  1367. package/dist/core-api-CBD0dvTQ.js +0 -5
  1368. package/dist/core-api-ClCm_yM8.js +0 -2
  1369. package/dist/core-wuoxL08a.js +0 -284
  1370. package/dist/crestodian--iYeGB8u.js +0 -55
  1371. package/dist/cron-D2SzQyqo.js +0 -453
  1372. package/dist/daemon-install-B6CAkU3V.js +0 -66
  1373. package/dist/daemon-install-auth-profiles-store.runtime-Cpt5LSD6.js +0 -2
  1374. package/dist/dashboard-ChYOQjM2.js +0 -263
  1375. package/dist/defaults-CCopehWw.js +0 -130
  1376. package/dist/defaults-H4kBp17N.js +0 -3
  1377. package/dist/defaults.constants-CjB9HP6f.js +0 -76
  1378. package/dist/deliver-BzPhWO_F.js +0 -3
  1379. package/dist/deliver-DGyKH3Qi.js +0 -1399
  1380. package/dist/deliver-runtime-Ca2kcQoZ.js +0 -2
  1381. package/dist/delivery-outbound.runtime-D7ycPxY-.js +0 -7
  1382. package/dist/delivery-queue-CnLv30ko.js +0 -863
  1383. package/dist/delivery-queue-CuaDjNMh.js +0 -2
  1384. package/dist/delivery-queue-runtime-DO2vqOIJ.js +0 -16
  1385. package/dist/delivery-target.runtime-QcBVk_j8.js +0 -45
  1386. package/dist/delivery.runtime-L09v4tys.js +0 -470
  1387. package/dist/detached-task-runtime-BqU7YXYT.js +0 -86
  1388. package/dist/diagnostics-T-Hk_Qzi.js +0 -168
  1389. package/dist/dialogue-C0VnTMMn.js +0 -37
  1390. package/dist/direct-dm-BWn67tDD.js +0 -81
  1391. package/dist/directive-handling.defaults-DO6Snm4_.js +0 -22
  1392. package/dist/directive-handling.fast-lane-BemYRfPn.js +0 -70
  1393. package/dist/directive-handling.impl-BMVh1pMh.js +0 -823
  1394. package/dist/directive-handling.impl-vr4MsYbt.js +0 -2
  1395. package/dist/directive-handling.model-selection-DegP9exp.js +0 -122
  1396. package/dist/directive-handling.persist.runtime-BUdU6_zm.js +0 -274
  1397. package/dist/directives-1xk_ZcMf.js +0 -319
  1398. package/dist/directory-cli-D83WEjEG.js +0 -239
  1399. package/dist/dispatch-Ck2tvRYH.js +0 -2057
  1400. package/dist/dispatch-acp-GdaHNdvf.js +0 -1102
  1401. package/dist/dispatch-acp-manager.runtime-BGSrJqrW.js +0 -3
  1402. package/dist/dispatch-acp-media.runtime-DQ8dYQh8.js +0 -4
  1403. package/dist/dispatch-acp-transcript.runtime-CsJZGhnu.js +0 -40
  1404. package/dist/dispatch-acp-tts.runtime-Bo-QxKgx.js +0 -3
  1405. package/dist/dispatch-acp.runtime-C_u7sGcQ.js +0 -18
  1406. package/dist/dispatcher-GtuYO6Ni.js +0 -106
  1407. package/dist/doctor-B2qP9g8d.js +0 -760
  1408. package/dist/doctor-D9wCez5t.js +0 -6
  1409. package/dist/doctor-auth-XnseqtS7.js +0 -216
  1410. package/dist/doctor-auth-flat-profiles-B6cL-TiJ.js +0 -516
  1411. package/dist/doctor-auth-flat-profiles-Birb7qIk.js +0 -2
  1412. package/dist/doctor-auth-legacy-oauth-CXO3OtyG.js +0 -48
  1413. package/dist/doctor-auth-oauth-sidecar-BSgQPbcS.js +0 -177
  1414. package/dist/doctor-auth-oauth-sidecar-CzzyNwxc.js +0 -2
  1415. package/dist/doctor-bootstrap-size-BlVcO5D6.js +0 -57
  1416. package/dist/doctor-claude-cli-_MTVnCQ-.js +0 -150
  1417. package/dist/doctor-config-flow-0kxzjUjK.js +0 -1819
  1418. package/dist/doctor-core-checks-C_g9REOd.js +0 -666
  1419. package/dist/doctor-core-checks-CahzmM1L.js +0 -2
  1420. package/dist/doctor-core-checks.runtime-Bi_oTiTZ.js +0 -278
  1421. package/dist/doctor-gateway-daemon-flow-UAIWsI9w.js +0 -349
  1422. package/dist/doctor-gateway-services-BiMEGiw_.js +0 -465
  1423. package/dist/doctor-health-C69GVfMl.js +0 -65
  1424. package/dist/doctor-health-contributions-Bz19QhI4.js +0 -874
  1425. package/dist/doctor-lint-BVW4E6Qf.js +0 -95
  1426. package/dist/doctor-memory-search-D2PWzDCY.js +0 -407
  1427. package/dist/doctor-state-integrity-DuJIszQj.js +0 -1257
  1428. package/dist/doctor-tool-result-cap-advice-Dpn4zNH3.js +0 -27
  1429. package/dist/doctor-workspace-status-nW9TcIWi.js +0 -76
  1430. package/dist/dreaming-CcOWzGN5.js +0 -523
  1431. package/dist/dreaming-command-sxm3FQGb.js +0 -101
  1432. package/dist/dreaming-narrative-BSRwiUPL.js +0 -2
  1433. package/dist/dreaming-narrative-BskwmYdC.js +0 -721
  1434. package/dist/dreaming-phases-BuHjGyPw.js +0 -2
  1435. package/dist/dreaming-phases-ChVT8Ovk.js +0 -1162
  1436. package/dist/drive-C_u5W4ln.js +0 -899
  1437. package/dist/echo-transcript-tnZWH4EO.js +0 -52
  1438. package/dist/effective-tool-policy-CeHdL2D7.js +0 -89
  1439. package/dist/embedded-agent-CGULn3lb.js +0 -4
  1440. package/dist/embedded-agent-DZTa1YiK.js +0 -4074
  1441. package/dist/embedded-agent-helpers-B65K9o55.js +0 -6
  1442. package/dist/embedded-agent-helpers-BPXCvWBb.js +0 -1037
  1443. package/dist/embedded-agent.runtime-TfBgXcUV.js +0 -4
  1444. package/dist/embedded-backend-BAaFwayA.js +0 -744
  1445. package/dist/embedded-gateway-stub.runtime-CNyrjvgT.js +0 -12
  1446. package/dist/embedding-provider-runtime-EnkHdROJ.js +0 -86
  1447. package/dist/embedding-providers-CDkDb0kv.js +0 -2
  1448. package/dist/embeddings-http-ClIu4_mP.js +0 -222
  1449. package/dist/engine-qmd-DZRiT9i4.js +0 -708
  1450. package/dist/engine-storage-BEqlN8TR.js +0 -203
  1451. package/dist/errors-Co8auIlv.js +0 -2
  1452. package/dist/exec-approval-forwarder.runtime-C7QvfWQ6.js +0 -4
  1453. package/dist/exec-approval-session-target-ChuH1nXL.js +0 -177
  1454. package/dist/exec-auto-reviewer-Bm7380HF.js +0 -2
  1455. package/dist/exec-auto-reviewer-BrrdGleK.js +0 -241
  1456. package/dist/execute.runtime-B-8jUqDB.js +0 -579
  1457. package/dist/external-cli-auth-selection-0BxmRUps.js +0 -113
  1458. package/dist/extra-params-BgyvpEpv.js +0 -615
  1459. package/dist/fallback-notice-state-BXk_kRWM.js +0 -15
  1460. package/dist/fallbacks-CPdVRP81.js +0 -31
  1461. package/dist/fallbacks-shared-CSGf1oaf.js +0 -116
  1462. package/dist/fengming-runtime-NUA51sEw.js +0 -33
  1463. package/dist/fengming-runtime-config-CIZ-SHPt.js +0 -2
  1464. package/dist/fengming-runtime-memory-CIZ-SHPt.js +0 -2
  1465. package/dist/fengming-runtime-session-CIZ-SHPt.js +0 -2
  1466. package/dist/fengming-tools-MvRSt0JA.js +0 -12221
  1467. package/dist/flows-BocRit8D.js +0 -189
  1468. package/dist/fs-utils-DSXeBcjj.js +0 -9
  1469. package/dist/gateway-BCrUxrVw.js +0 -133
  1470. package/dist/gateway-cli-B8bXBd_L.js +0 -443
  1471. package/dist/gateway-install-token-pngTMc-f.js +0 -136
  1472. package/dist/gateway-method-runtime-ueZTz7WH.js +0 -21
  1473. package/dist/gateway-runtime-DbsoThML.js +0 -23
  1474. package/dist/get-reply-DUuaxcBz.js +0 -5198
  1475. package/dist/get-reply-from-config.runtime-B4Dgs3Hg.js +0 -2
  1476. package/dist/github-copilot-token-7AfRRF7J.js +0 -2
  1477. package/dist/health-7Yq5zpoZ.js +0 -3
  1478. package/dist/health-DlZqxm2f.js +0 -621
  1479. package/dist/health-DxesUuur.js +0 -111
  1480. package/dist/health-state-BMG8kOby.js +0 -106
  1481. package/dist/heartbeat-runner-Bq7A_Cjm.js +0 -5
  1482. package/dist/heartbeat-runner-DVwbVyft.js +0 -1930
  1483. package/dist/heartbeat-runner.runtime-DQ2NPXMD.js +0 -3
  1484. package/dist/helpers-PCu2RivJ.js +0 -406
  1485. package/dist/hook-helpers-DLEnCRO7.js +0 -44
  1486. package/dist/hooks-Bv-otcl7.js +0 -536
  1487. package/dist/hooks-cli-C5ve0nzF.js +0 -465
  1488. package/dist/http-endpoint-helpers-w2SagsQz.js +0 -37
  1489. package/dist/http-utils-CVvn0ZA-.js +0 -98
  1490. package/dist/image-BeixBis4.js +0 -385
  1491. package/dist/image-fallbacks-CPbmIMn9.js +0 -31
  1492. package/dist/image-generation-core.auth.runtime-Co38iRxQ.js +0 -2
  1493. package/dist/image-generation-provider-BA4Ar91S.js +0 -152
  1494. package/dist/image-runtime-7ZsfioS1.js +0 -9
  1495. package/dist/image-tool.helpers-upjA3ksB.js +0 -150
  1496. package/dist/images-ChLi1Uog.js +0 -2
  1497. package/dist/images-nB0XAnTa.js +0 -416
  1498. package/dist/inbound-reply-dispatch-DglobJ8j.js +0 -2
  1499. package/dist/inbound-reply-dispatch-QKOgNx-m.js +0 -147
  1500. package/dist/index-AZzJCgph.d.ts +0 -1497
  1501. package/dist/infra-runtime-CGD3RE_2.js +0 -32
  1502. package/dist/init-poVZDCAM.js +0 -59
  1503. package/dist/install-Dn9oPGmU.js +0 -262
  1504. package/dist/install.runtime-D5sllsjl.js +0 -2
  1505. package/dist/internal-CnOL_Roa.js +0 -399
  1506. package/dist/isolated-agent-CNw6E3F0.js +0 -1097
  1507. package/dist/isolated-agent-DjkHhEyR.js +0 -2
  1508. package/dist/kernel-B5Y5IQ-A.js +0 -3
  1509. package/dist/kernel-CMuO4VJy.js +0 -979
  1510. package/dist/kimi-web-search-provider.runtime-V4m_MHsk.js +0 -307
  1511. package/dist/library-B-1EZjtY.js +0 -45
  1512. package/dist/lifecycle-B-5gEZ7O.js +0 -570
  1513. package/dist/lifecycle-Bzh5Jo09.js +0 -2
  1514. package/dist/lifecycle-DvbcJYMl.js +0 -355
  1515. package/dist/lifecycle.runtime-Bzh5Jo09.js +0 -2
  1516. package/dist/list-B4xSHRdU.js +0 -2
  1517. package/dist/list-BnhZHpxx.js +0 -207
  1518. package/dist/list.list-command-DAz-Ws_6.js +0 -429
  1519. package/dist/list.model-row-DtdX9KDu.js +0 -39
  1520. package/dist/list.probe-CY6lxq51.js +0 -2
  1521. package/dist/list.probe-DPuE1GOH.js +0 -451
  1522. package/dist/list.provider-catalog-BHc9WXI6.js +0 -211
  1523. package/dist/list.provider-catalog-CFbrroys.js +0 -2
  1524. package/dist/list.registry-load-C1_sr3gb.js +0 -152
  1525. package/dist/list.row-sources-BMtHc9oi.js +0 -474
  1526. package/dist/list.source-plan-Dth72qPP.js +0 -81
  1527. package/dist/list.status-command-BXCnEq8Q.js +0 -815
  1528. package/dist/live-model-switch-Dxav22vq.js +0 -119
  1529. package/dist/llm-slug-generator-6o8RXL11.js +0 -78
  1530. package/dist/load-config-EF3n0Dyo.js +0 -27
  1531. package/dist/load-context-CI_ogQt_.js +0 -82
  1532. package/dist/loader-DtwEzpp-.js +0 -7008
  1533. package/dist/local-dispatch.runtime-21liE3rA.js +0 -10
  1534. package/dist/main-session-restart-recovery-D1g62iJ5.js +0 -2
  1535. package/dist/main-session-restart-recovery-v2I9CEXi.js +0 -389
  1536. package/dist/managed-image-attachments-BEl5qfCT.js +0 -616
  1537. package/dist/managed-image-attachments-D5KqX2Qy.js +0 -2
  1538. package/dist/manager-DZc3xiNq.js +0 -2314
  1539. package/dist/manager-Vf3vLTGe.js +0 -3737
  1540. package/dist/mcp-http-BaJoPKF9.js +0 -583
  1541. package/dist/mcp-http-CpEaJIGJ.js +0 -2
  1542. package/dist/media-runtime-DtP_Ff8m.js +0 -391
  1543. package/dist/media-services-CXYbyIIp.js +0 -416
  1544. package/dist/media-understanding-DvTIsIyr.js +0 -87
  1545. package/dist/media-understanding-provider-DBBAvuwG.js +0 -13
  1546. package/dist/media-understanding-provider-DOf_uZrx.js +0 -70
  1547. package/dist/media-understanding-provider-DdRfNh9h.js +0 -69
  1548. package/dist/media-understanding-provider-mqpQDt8V.js +0 -29
  1549. package/dist/memory-BNk25Hi6.js +0 -437
  1550. package/dist/memory-core-host-engine-embeddings-XsK5xS70.js +0 -667
  1551. package/dist/memory-core-host-engine-foundation-BYkoOLXl.js +0 -15
  1552. package/dist/memory-core-host-engine-qmd-0JuUCKCK.js +0 -2
  1553. package/dist/memory-core-host-engine-storage-MCFGjDwW.js +0 -2
  1554. package/dist/memory-core-host-runtime-cli-fVGH65E8.js +0 -10
  1555. package/dist/memory-core-host-runtime-core-JtXIAdlM.js +0 -12
  1556. package/dist/memory-core-host-runtime-files-BGw_ypoN.js +0 -4
  1557. package/dist/memory-embedding-provider-runtime-3UBzs4sx.js +0 -36
  1558. package/dist/memory-host-core-Y_O5V-mu.js +0 -78
  1559. package/dist/memory-host-search.runtime-B4TzyvmR.js +0 -2
  1560. package/dist/memory-runtime-9kEPAeKV.js +0 -2
  1561. package/dist/memory-runtime-BU4t85uu.js +0 -57
  1562. package/dist/memory-search-CVX--mSz.js +0 -235
  1563. package/dist/message-BVXoNpWP.js +0 -284
  1564. package/dist/message-HaiKqj0A.js +0 -2
  1565. package/dist/message-action-runner-Chwzn02r.js +0 -2
  1566. package/dist/message-action-runner-tEEliptt.js +0 -1922
  1567. package/dist/message-handler-CHDS_NF-.js +0 -1806
  1568. package/dist/metadata-registry-loader-Croa1pgR.js +0 -22
  1569. package/dist/metadata-registry-loader-w0p86vis.js +0 -2
  1570. package/dist/migrate-CPCZJ4H5.js +0 -2
  1571. package/dist/migrate-CUj6m6Cx.js +0 -458
  1572. package/dist/migration-provider-runtime-4r4WGtf2.js +0 -2
  1573. package/dist/migration-provider-runtime-TxrH_mM7.js +0 -68
  1574. package/dist/minimax-web-search-provider.runtime-Dr2GJiWj.js +0 -148
  1575. package/dist/model-BQSouNOa.js +0 -2
  1576. package/dist/model-CAk0bcuO.js +0 -1302
  1577. package/dist/model-auth-BF7w9Fiv.js +0 -705
  1578. package/dist/model-auth-label-r729wcPk.js +0 -67
  1579. package/dist/model-auth-us8b_D5d.js +0 -6
  1580. package/dist/model-catalog-BGykBGxx.js +0 -434
  1581. package/dist/model-catalog-BVXrqFbI.js +0 -3
  1582. package/dist/model-catalog-visibility-Bsup46vy.js +0 -76
  1583. package/dist/model-config.helpers-wzD1EEfE.js +0 -95
  1584. package/dist/model-context-tokens-DrIU9eJc.js +0 -572
  1585. package/dist/model-fallback-GySPjr3J.js +0 -1288
  1586. package/dist/model-fallback-auth.runtime-Dg_Jmguu.js +0 -5
  1587. package/dist/model-picker-BI6jXOjt.js +0 -3
  1588. package/dist/model-picker-DYyJHhfH.js +0 -1135
  1589. package/dist/model-picker-visibility-D_IMZfxd.js +0 -22
  1590. package/dist/model-picker.runtime-B70kQMyc.js +0 -48
  1591. package/dist/model-pricing-cache-CSpUDzSt.js +0 -856
  1592. package/dist/model-pricing-cache-dkPwTUVJ.js +0 -3
  1593. package/dist/model-pricing-cache-state-C6shoEWy.js +0 -83
  1594. package/dist/model-provider-auth-BfZHbTaj.js +0 -2
  1595. package/dist/model-provider-auth-CPCBWvqL.js +0 -375
  1596. package/dist/model-runtime-aliases-DUzusc9_.js +0 -133
  1597. package/dist/model-selection-8UzO5mgF.js +0 -254
  1598. package/dist/model-selection-Cb7azWw1.js +0 -7
  1599. package/dist/model-selection-jDYEo0WI.js +0 -352
  1600. package/dist/model-selection.runtime-D_yHZLbs.js +0 -7
  1601. package/dist/models-BxA2IU3W.js +0 -57
  1602. package/dist/models-auth-status-yG7yyRcv.js +0 -280
  1603. package/dist/models-cli-DUt4uiMH.js +0 -257
  1604. package/dist/models-config-B5bkuh6A.js +0 -1189
  1605. package/dist/models-config-Xj8vG_x2.js +0 -2
  1606. package/dist/models-config.providers.secrets-DNBB440Z.js +0 -2
  1607. package/dist/models-config.providers.secrets-DNIQlBSE.js +0 -382
  1608. package/dist/models-http-DMILRsry.js +0 -88
  1609. package/dist/monitor-2_c2Ttjf.js +0 -1024
  1610. package/dist/monitor-7tD_FE_5.js +0 -60
  1611. package/dist/monitor.account-D0F9tnWD.js +0 -5382
  1612. package/dist/music-generation-provider-3ykPaUwR.js +0 -308
  1613. package/dist/native-hook-relay-BJKHIhWd.js +0 -1378
  1614. package/dist/native-hook-relay-V8Kappw1.js +0 -19
  1615. package/dist/node-cli-BLVyQ93e.js +0 -2806
  1616. package/dist/node-command-policy-B0ezpI_O.js +0 -295
  1617. package/dist/nodes-DnWH_15m.js +0 -3
  1618. package/dist/nodes-RkB4ZmP6.js +0 -1483
  1619. package/dist/nodes-cli-upwPs91b.js +0 -960
  1620. package/dist/nodes-pending--sojaxpI.js +0 -211
  1621. package/dist/nodes-utils-Yks_uDZK.js +0 -85
  1622. package/dist/oauth-CQN2efEy.js +0 -207
  1623. package/dist/oauth-DApi3OI9.js +0 -746
  1624. package/dist/oauth-DkUWBub2.js +0 -852
  1625. package/dist/onboard-CiQSBSrz.js +0 -768
  1626. package/dist/onboard-channels-DaWYXiLv.js +0 -1534
  1627. package/dist/onboard-channels-DnwM2_IL.js +0 -2
  1628. package/dist/onboard-custom-BQPckD0V.js +0 -3
  1629. package/dist/onboard-custom-config-BmbThk2-.js +0 -422
  1630. package/dist/onboard-custom-xInFj1Rs.js +0 -280
  1631. package/dist/onboard-search-DSfmthe5.js +0 -412
  1632. package/dist/openai-compat-errors-VR4SN1MV.js +0 -136
  1633. package/dist/openai-http-DV95ynPi.js +0 -836
  1634. package/dist/openai-transport-stream-BwpzqR-b.js +0 -3427
  1635. package/dist/openresponses-http-DPchx8IC.js +0 -1175
  1636. package/dist/operations-f9R8j-r9.js +0 -805
  1637. package/dist/order-BQx8mNGZ.js +0 -218
  1638. package/dist/outbound-attachment-C4yojK6p.js +0 -19
  1639. package/dist/param-readers-BIXyd5la.js +0 -2
  1640. package/dist/payloads-DrY1bKyF.js +0 -256
  1641. package/dist/persistent-bindings.lifecycle-BiPN7luW.js +0 -85
  1642. package/dist/persistent-bindings.lifecycle-X3wfan2Z.js +0 -2
  1643. package/dist/plugin-enabled-CqsBObeO.js +0 -232
  1644. package/dist/plugin-install-CfB1_kpX.js +0 -118
  1645. package/dist/plugin-install-DzMraXHH.js +0 -2
  1646. package/dist/plugin-install-config-policy-BD_elPNg.js +0 -169
  1647. package/dist/plugin-registration-Dy58ncPf.js +0 -97
  1648. package/dist/plugin-registry-BlmODeop.js +0 -3
  1649. package/dist/plugin-registry-k5OK18l5.js +0 -2
  1650. package/dist/plugin-runtime-B3t53CKr.js +0 -102
  1651. package/dist/plugin-sdk/bundled-channel-config-schema-UtIBjviA.d.ts +0 -3169
  1652. package/dist/plugin-service-sKF4gWFm.js +0 -1249
  1653. package/dist/plugins-authoring-command-I72k2cuv.js +0 -304
  1654. package/dist/plugins-cli-DMQRbPsU.js +0 -63
  1655. package/dist/plugins-cli.runtime-CvDuKFJj.js +0 -339
  1656. package/dist/plugins-command-helpers-C5WMM4bk.js +0 -164
  1657. package/dist/plugins-command-helpers-DDt_pMQ4.js +0 -2
  1658. package/dist/plugins-inspect-command-ka7Hpld3.js +0 -248
  1659. package/dist/plugins-install-command-BHSgof-_.js +0 -2
  1660. package/dist/plugins-install-command-t5caX9q_.js +0 -993
  1661. package/dist/plugins-install-persist-Bah1m3x7.js +0 -252
  1662. package/dist/plugins-list-command-BXLWwXHM.js +0 -184
  1663. package/dist/plugins-uninstall-command-C_3m6CrW.js +0 -118
  1664. package/dist/prepare.runtime-COZaHg5E.js +0 -798
  1665. package/dist/presentation-card-CciJv4ru.js +0 -164
  1666. package/dist/preview-warnings-L4VuEOyB.js +0 -618
  1667. package/dist/profiles-CM2xoUYX.js +0 -194
  1668. package/dist/program-B-4C7bC-.js +0 -131
  1669. package/dist/provider-adapters-Eh8mS2Fd.js +0 -104
  1670. package/dist/provider-api-key-auth-DTh2cbmS.js +0 -117
  1671. package/dist/provider-api-key-auth.runtime-DrTYYfxK.js +0 -14
  1672. package/dist/provider-auth-Bnaijzmv.js +0 -281
  1673. package/dist/provider-auth-api-key-CNP8o5E7.js +0 -5
  1674. package/dist/provider-auth-choice-Devw4sQf.js +0 -311
  1675. package/dist/provider-auth-choice-helpers-DmVudRp6.js +0 -210
  1676. package/dist/provider-auth-choice.runtime-C337IQ3W.js +0 -2
  1677. package/dist/provider-auth-choice.runtime-DqGYalFo.js +0 -18
  1678. package/dist/provider-auth-guidance-Bk4WV6Lg.js +0 -2
  1679. package/dist/provider-auth-guidance-C7NCKuKn.js +0 -34
  1680. package/dist/provider-auth-helpers-r7mC8I5l.js +0 -177
  1681. package/dist/provider-auth-login.runtime-BFJgAAS6.js +0 -156
  1682. package/dist/provider-auth-runtime-BiLPGiMW.js +0 -186
  1683. package/dist/provider-discovery-uxRmAIf_.js +0 -95
  1684. package/dist/provider-discovery.runtime-mwbSivDS.js +0 -290
  1685. package/dist/provider-dispatcher-CtKWj3r-.js +0 -22
  1686. package/dist/provider-entry-DjACqdrB.js +0 -134
  1687. package/dist/provider-hook-runtime-CpJsM7Dk.js +0 -255
  1688. package/dist/provider-openai-codex-oauth-DWGmVUYg.js +0 -2
  1689. package/dist/provider-openai-codex-oauth-ctxd00JW.js +0 -44
  1690. package/dist/provider-registration-l8EX4voM.js +0 -235
  1691. package/dist/provider-registry-BgIQXJle.js +0 -31
  1692. package/dist/provider-registry-CVuzobHN.js +0 -36
  1693. package/dist/provider-registry-DmdDbSQs.js +0 -61
  1694. package/dist/provider-registry-LqtLqheu.js +0 -61
  1695. package/dist/provider-registry-pTYVjODc.js +0 -61
  1696. package/dist/provider-runtime-BQZSuC9l.js +0 -3
  1697. package/dist/provider-runtime-D9Q-7VuO.js +0 -386
  1698. package/dist/provider-runtime.runtime-C6YZ8YI0.js +0 -26
  1699. package/dist/provider-self-hosted-setup-BIAD2ISe.js +0 -373
  1700. package/dist/provider-stream-DScdaoRo.js +0 -313
  1701. package/dist/provider-stream-PE0IxmpZ.js +0 -1084
  1702. package/dist/provider-stream-family-S2fhlydZ.js +0 -2
  1703. package/dist/provider-usage-DVKHMF6l.js +0 -4
  1704. package/dist/provider-usage-EEjx1av0.js +0 -71
  1705. package/dist/provider-usage.load-Cu11xbrw.js +0 -357
  1706. package/dist/provider-web-search-Dbk7MO-1.js +0 -58
  1707. package/dist/provider-wizard-DS2Xb2eu.js +0 -125
  1708. package/dist/providers.runtime-BPhGcupv.js +0 -240
  1709. package/dist/providers.runtime-DoylK-ht.js +0 -2
  1710. package/dist/proxy-BxacG0p3.js +0 -662
  1711. package/dist/public-artifacts-Dq3y7bBv.js +0 -7
  1712. package/dist/pw-ai-DlSSqerW.js +0 -3064
  1713. package/dist/qmd-manager-B_SG-ejE.js +0 -2040
  1714. package/dist/qr-cli-CT-sE_j9.js +0 -2
  1715. package/dist/qr-cli-DPlDCXJQ.js +0 -371
  1716. package/dist/qr-image--VmmvuDB.js +0 -2
  1717. package/dist/queue-Be2Y7PcO.js +0 -923
  1718. package/dist/read-file-hhemkDfq.js +0 -183
  1719. package/dist/register-service-commands-CeVpCQU3.js +0 -77
  1720. package/dist/register.agent-JLsb-giw.js +0 -152
  1721. package/dist/register.configure-CP0Q-ost.js +0 -16
  1722. package/dist/register.crestodian-CBXyXEix.js +0 -24
  1723. package/dist/register.maintenance-DGIPQ2Vo.js +0 -85
  1724. package/dist/register.message-BBQwz0Ld.js +0 -404
  1725. package/dist/register.migrate-CkgNlvLD.js +0 -106
  1726. package/dist/register.onboard-CS9gRK0c.js +0 -115
  1727. package/dist/register.setup-DhqDOer9.js +0 -40
  1728. package/dist/register.status-health-sessions-CiwQN_lw.js +0 -293
  1729. package/dist/register.subclis-86Md7P0P.js +0 -3
  1730. package/dist/register.subclis-CTVI8zvZ.js +0 -31
  1731. package/dist/register.subclis-core-Cy4AnRCu.js +0 -273
  1732. package/dist/rem-harness-vSsq3HiK.js +0 -649
  1733. package/dist/repair-sequencing-SHADYdcA.js +0 -652
  1734. package/dist/reply-media-paths.runtime-Bf5nxPuP.js +0 -154
  1735. package/dist/reply-media-paths.runtime-sLsMpKGO.js +0 -2
  1736. package/dist/reply-payloads-CJ3w8rSA.js +0 -79
  1737. package/dist/reply-payloads-dedupe-DDFXWCVR.js +0 -176
  1738. package/dist/reply-payloads-dedupe.runtime-DbXPzKmG.js +0 -2
  1739. package/dist/reply-timing-tracker-DjVIBsVb.js +0 -205
  1740. package/dist/reply-turn-admission-nEW5QbY5.js +0 -2056
  1741. package/dist/reply.runtime-B4Dgs3Hg.js +0 -2
  1742. package/dist/reset-preserved-selection-CVD1yeVC.js +0 -45
  1743. package/dist/resolve-DidlinMh.js +0 -106
  1744. package/dist/restart-DzTrO95c.js +0 -121
  1745. package/dist/result-fallback-classifier-BqsFUDvP.js +0 -98
  1746. package/dist/root-help-QGs0dCCN.js +0 -43
  1747. package/dist/route-B3R-uzFG.js +0 -475
  1748. package/dist/route-reply-CdfhgIoY.js +0 -174
  1749. package/dist/route-reply.runtime-DwuU2WjH.js +0 -2
  1750. package/dist/routes-ChXmJocl.js +0 -3701
  1751. package/dist/routes-D-ZF4AdA.js +0 -2
  1752. package/dist/run-ClmVDTET.js +0 -1162
  1753. package/dist/run-auth-profile.runtime-CTxrwz0y.js +0 -2
  1754. package/dist/run-command-CqZJQ0Im.js +0 -2
  1755. package/dist/run-command-GClW75NL.js +0 -23
  1756. package/dist/run-context-BOdGeRg5.js +0 -66
  1757. package/dist/run-context.runtime-CwuKVYPj.js +0 -2
  1758. package/dist/run-delivery.runtime-BQ39dm34.js +0 -762
  1759. package/dist/run-embedded.runtime-e1K4Bt1_.js +0 -4
  1760. package/dist/run-execution-cli.runtime-Cjrgt4cV.js +0 -4
  1761. package/dist/run-executor.runtime-C2JE6JGb.js +0 -330
  1762. package/dist/run-model-catalog.runtime-DkrLKopr.js +0 -2
  1763. package/dist/run-session-state-C5YdQs7o.js +0 -159
  1764. package/dist/run-subagent-registry.runtime-Dl_lXi6y.js +0 -2
  1765. package/dist/runner-CNGHdaIg.js +0 -704
  1766. package/dist/runner.entries-dckPkeld.js +0 -1485
  1767. package/dist/runtime-9LxcVCyw.js +0 -615
  1768. package/dist/runtime-BCOtBS5G.js +0 -3
  1769. package/dist/runtime-C-pgjoJr.js +0 -210
  1770. package/dist/runtime-CyF0vJXG.js +0 -10
  1771. package/dist/runtime-D-7lMvGV.js +0 -2
  1772. package/dist/runtime-D17OmF9G.js +0 -224
  1773. package/dist/runtime-D6SweufG.js +0 -245
  1774. package/dist/runtime-DVAM7AFd.js +0 -2
  1775. package/dist/runtime-DX2ClrP-.js +0 -436
  1776. package/dist/runtime-FOOWuiYX.js +0 -300
  1777. package/dist/runtime-api-B0F0JsV1.js +0 -12
  1778. package/dist/runtime-cREKSBYC.js +0 -2
  1779. package/dist/runtime-channel-BmD4hoCR.js +0 -148
  1780. package/dist/runtime-channel-BsebQSPL.js +0 -2
  1781. package/dist/runtime-config-collectors-BjYeQ0Tk.js +0 -525
  1782. package/dist/runtime-embedded-agent.runtime-A4r23Bn8.js +0 -2
  1783. package/dist/runtime-internal-DkV-EMTK.js +0 -2
  1784. package/dist/runtime-llm.runtime-BQKNnuRc.js +0 -307
  1785. package/dist/runtime-model-auth.runtime-BbGqHVM5.js +0 -2
  1786. package/dist/runtime-model-auth.runtime-rtJH4LBB.js +0 -46
  1787. package/dist/runtime-options-B0EGb1Wq.js +0 -275
  1788. package/dist/runtime-plugin-Bdqm44bH.js +0 -92
  1789. package/dist/runtime-plugins-rZk1eAK_.js +0 -32
  1790. package/dist/runtime-plugins.runtime-DApiYzny.js +0 -2
  1791. package/dist/runtime-prepare.runtime-DWxvnbyY.js +0 -81
  1792. package/dist/runtime-provider-B0slPjtk.js +0 -2
  1793. package/dist/runtime-provider-DLgupOKt.js +0 -24
  1794. package/dist/runtime-registry-loader-Cf2HuMjd.js +0 -2
  1795. package/dist/runtime-registry-loader-DLzDrA7e.js +0 -117
  1796. package/dist/runtime-shared-Bg-OiD4u.js +0 -365
  1797. package/dist/runtime-web-channel-plugin-DrMjRaqi.js +0 -204
  1798. package/dist/scan-DA7Oqxuv.js +0 -573
  1799. package/dist/sdk-security-runtime-WjOaCbga.js +0 -86
  1800. package/dist/sdk-setup-tools-DaYT6_jD.js +0 -8
  1801. package/dist/secrets-cli-fJQ0geWO.js +0 -150
  1802. package/dist/security-cli-CJMwGp8U.js +0 -520
  1803. package/dist/selection-BNwLQzqJ.js +0 -3
  1804. package/dist/selection-Cj-l80pO.js +0 -18365
  1805. package/dist/send-DstYcrDW.js +0 -711
  1806. package/dist/send-aTxtLkJm.js +0 -178
  1807. package/dist/send-media-OG5Gd31l.js +0 -2072
  1808. package/dist/send-qwDMMnM6.js +0 -1222
  1809. package/dist/send-result-BWRKr16H.js +0 -141
  1810. package/dist/server-CMtA1S09.js +0 -24
  1811. package/dist/server-DIRaYiiH.js +0 -72
  1812. package/dist/server-aux-handlers-BRO-9-Jf.js +0 -1347
  1813. package/dist/server-chat-0J_ke0ph.js +0 -827
  1814. package/dist/server-context-DWOSX34k.js +0 -2
  1815. package/dist/server-context-R7MFLFdI.js +0 -955
  1816. package/dist/server-cron-2FuFg2j8.js +0 -2
  1817. package/dist/server-cron-ChPAVQtg.js +0 -3173
  1818. package/dist/server-maintenance-ZvS7Id6T.js +0 -152
  1819. package/dist/server-methods-DSbhPK3k.js +0 -497
  1820. package/dist/server-middleware-CYxFU-e5.js +0 -122
  1821. package/dist/server-model-catalog-B22UhmRr.js +0 -73
  1822. package/dist/server-model-catalog-BJIHPP3P.js +0 -2
  1823. package/dist/server-node-events-tNWJnXQM.js +0 -597
  1824. package/dist/server-plugin-bootstrap-Ccu97zi8.js +0 -71
  1825. package/dist/server-plugins-ByXwKPnj.js +0 -435
  1826. package/dist/server-reload-handlers-ConGiT9Q.js +0 -719
  1827. package/dist/server-restart-sentinel-mPHo61LL.js +0 -700
  1828. package/dist/server-runtime-services-BR1icaUW.js +0 -3
  1829. package/dist/server-runtime-services-Bx8n34dj.js +0 -147
  1830. package/dist/server-runtime-subscriptions-CZklTkRG.js +0 -67
  1831. package/dist/server-session-events-DxdiZYM2.js +0 -244
  1832. package/dist/server-session-key-CYvLslFO.js +0 -75
  1833. package/dist/server-session-key-D9GQut81.js +0 -2
  1834. package/dist/server-startup-config-Byb0vR8j.js +0 -305
  1835. package/dist/server-startup-early-a65fHTQS.js +0 -87
  1836. package/dist/server-startup-memory-ClwzC9jX.js +0 -72
  1837. package/dist/server-startup-plugins-CaBj0Nt2.js +0 -127
  1838. package/dist/server-startup-post-attach-B7TcxkmO.js +0 -793
  1839. package/dist/server-ws-runtime-Cxk_CqMr.js +0 -374
  1840. package/dist/server.impl-CQ6dnx43.js +0 -2622
  1841. package/dist/session-cost-usage-GsYDNvka.js +0 -1600
  1842. package/dist/session-kill-http-CKkxZhhd.js +0 -121
  1843. package/dist/session-log-runtime-Bwc2Oijk.js +0 -1258
  1844. package/dist/session-override-CWbKiXiC.js +0 -134
  1845. package/dist/session-reset-model.runtime-CDFMjwWA.js +0 -144
  1846. package/dist/session-reset-service-SE0aK4cw.js +0 -651
  1847. package/dist/session-status.runtime-Df89I7Fk.js +0 -2
  1848. package/dist/session-store-RkvjJPMQ.js +0 -273
  1849. package/dist/session-store.runtime-C7P5asx7.js +0 -4
  1850. package/dist/session-subagent-reactivation.runtime-BhGUZG1Z.js +0 -2
  1851. package/dist/session-tab-registry-9rSuQ0Yz.js +0 -551
  1852. package/dist/session-utils-De8TIM0h.js +0 -1508
  1853. package/dist/sessions-6b9a00Tl.js +0 -1917
  1854. package/dist/sessions-CEPHczjC.js +0 -316
  1855. package/dist/sessions-CEojHc8b.js +0 -12736
  1856. package/dist/sessions-cleanup-BkG7_sq9.js +0 -165
  1857. package/dist/sessions-history-http-BjJEfjJa.js +0 -432
  1858. package/dist/sessions-patch-PwG5sknc.js +0 -401
  1859. package/dist/sessions-resolve-CSIrd_fi.js +0 -180
  1860. package/dist/sessions-table-8CbU7jXa.js +0 -161
  1861. package/dist/sessions.runtime-BYHMD0M7.js +0 -2
  1862. package/dist/set-BJDpe28W.js +0 -31
  1863. package/dist/set-image-CwTFx7PX.js +0 -17
  1864. package/dist/setup-B6LmeIms.js +0 -614
  1865. package/dist/setup-B_zxHfYu.js +0 -2
  1866. package/dist/setup-onboard-configure-help-fast-path-Bck3SKEH.js +0 -64
  1867. package/dist/setup.finalize-CmLYX-Rf.js +0 -586
  1868. package/dist/setup.gateway-config-H_89Msro.js +0 -281
  1869. package/dist/setup.migration-import-DVzyUjX6.js +0 -2
  1870. package/dist/setup.migration-import-DmJpqoqf.js +0 -200
  1871. package/dist/setup.post-install-migration-WPFWKXXg.js +0 -128
  1872. package/dist/shared-CUhu8NTs.js +0 -5
  1873. package/dist/shared-D-BN2JhY.js +0 -71
  1874. package/dist/shared-ES8nDIcn.js +0 -212
  1875. package/dist/simple-completion-runtime-BGZkWvKr.js +0 -206
  1876. package/dist/simple-completion-runtime-CM_IISYW.js +0 -2
  1877. package/dist/simple-completion-transport-Bo0u9dhp.js +0 -83
  1878. package/dist/snapshot-urls-C1KjRQD5.js +0 -317
  1879. package/dist/speech-core-Bas7e4h0.js +0 -119
  1880. package/dist/speech-provider-BonJQv5S.js +0 -227
  1881. package/dist/speech-provider-CwdKQmDv.js +0 -171
  1882. package/dist/speech-provider-DcQRnYhZ.js +0 -233
  1883. package/dist/stale-oauth-profile-shadows-C3aeAWfv.js +0 -186
  1884. package/dist/stale-oauth-profile-shadows-m5rb8dPc.js +0 -2
  1885. package/dist/standalone-runtime-registry-loader-B9n2LBKC.js +0 -59
  1886. package/dist/startup-context-DY7C4riM.js +0 -314
  1887. package/dist/status-6EPKat7p.js +0 -73
  1888. package/dist/status-C6Fa7Dsf.js +0 -2
  1889. package/dist/status-CNnxDQlM.js +0 -4
  1890. package/dist/status-D2Scvbc0.js +0 -3
  1891. package/dist/status-Ducanro3.js +0 -2
  1892. package/dist/status-_XX_6QVA.js +0 -466
  1893. package/dist/status-all-BP1u6vou.js +0 -573
  1894. package/dist/status-json-DPlOJ_ue.js +0 -15
  1895. package/dist/status-json-command-BT7EwVKj.js +0 -84
  1896. package/dist/status-message-Dzr9-MX-.js +0 -495
  1897. package/dist/status-message.runtime-DFezIt1d.js +0 -6
  1898. package/dist/status-prBlcUV5.js +0 -249
  1899. package/dist/status-queue.runtime-C1bmg2rl.js +0 -2
  1900. package/dist/status-runtime-shared-RjKIPEQ0.js +0 -289
  1901. package/dist/status-subagents.runtime-tsCCe4Ny.js +0 -32
  1902. package/dist/status-text-Bkeyg8Bf.js +0 -301
  1903. package/dist/status.command-D06_4ATq.js +0 -425
  1904. package/dist/status.command-dDEZM84a.js +0 -2
  1905. package/dist/status.command.text-runtime-WH9tP7yg.js +0 -15
  1906. package/dist/status.runtime-B76GaBIR.js +0 -2
  1907. package/dist/status.scan-Bc6clx0F.js +0 -72
  1908. package/dist/status.scan-overview-v_-AaFhC.js +0 -460
  1909. package/dist/status.scan.deps.runtime-BkH1HAb4.js +0 -19
  1910. package/dist/status.scan.fast-json-CrlfKKI3.js +0 -2
  1911. package/dist/status.scan.fast-json-D8v6zfP8.js +0 -163
  1912. package/dist/status.summary-DBhvgOPr.js +0 -276
  1913. package/dist/status.summary-hQV0PKFO.js +0 -2
  1914. package/dist/store-BClomp_4.js +0 -3
  1915. package/dist/store-BHqDPtNw.js +0 -2302
  1916. package/dist/stored-model-override-vm4CtQWX.js +0 -79
  1917. package/dist/subagent-announce-D244Q4w2.js +0 -353
  1918. package/dist/subagent-announce-delivery-qKZfF7Bs.js +0 -1369
  1919. package/dist/subagent-control-c87mVGUE.js +0 -492
  1920. package/dist/subagent-control.runtime-DfQtIsDb.js +0 -3
  1921. package/dist/subagent-hooks-B_UW5Len.js +0 -2
  1922. package/dist/subagent-hooks-CYvFWt_r.js +0 -230
  1923. package/dist/subagent-hooks-api-DZgaJf19.js +0 -23
  1924. package/dist/subagent-registry-BlcoCggo.js +0 -2627
  1925. package/dist/subagent-registry-CuObhNeO.js +0 -3
  1926. package/dist/subagent-session-cleanup-hFF8Z34s.js +0 -390
  1927. package/dist/system-CN_Knfqq.js +0 -111
  1928. package/dist/system-prompt-config-BmZlhYK9.js +0 -918
  1929. package/dist/talk-DrjGczYs.js +0 -2454
  1930. package/dist/target-id-BNpbyWkq.js +0 -107
  1931. package/dist/targets-CQcGo6u4.js +0 -267
  1932. package/dist/targets.runtime-DwcxNI-x.js +0 -2
  1933. package/dist/task-executor-CZg-qt4u.js +0 -349
  1934. package/dist/task-owner-access-Duem5jjb.js +0 -74
  1935. package/dist/task-registry-Cw8pc3Ry.js +0 -2362
  1936. package/dist/task-registry-delivery-runtime-HaiKqj0A.js +0 -2
  1937. package/dist/task-registry.maintenance-BLv3wpK9.js +0 -764
  1938. package/dist/task-registry.maintenance-CvlIcxE-.js +0 -2
  1939. package/dist/task-status-access-C5nDJSI4.js +0 -18
  1940. package/dist/tasks-D3CfEAlq.js +0 -548
  1941. package/dist/tasks-WKnE5fvr.js +0 -153
  1942. package/dist/tasks-audit-system-okJjcOjU.js +0 -210
  1943. package/dist/tasks-json-C-iUgWNu.js +0 -73
  1944. package/dist/tavily-web-search-provider.runtime-jpagljrA.js +0 -112
  1945. package/dist/text-report-BTsF3Pv3.js +0 -695
  1946. package/dist/text-transforms.runtime-CgH_pbcQ.js +0 -113
  1947. package/dist/thread-bindings-BWxpUE9U.js +0 -228
  1948. package/dist/tool-DhJbbm91.js +0 -143
  1949. package/dist/tool-dispatch-CpFUfblu.js +0 -155
  1950. package/dist/tool-images-C-tFlXjE.js +0 -247
  1951. package/dist/tool-plugin-3NejWxZW.js +0 -93
  1952. package/dist/tool-resolution-oW8Cbamd.js +0 -153
  1953. package/dist/tool-result-truncation-CWFGf7Eu.js +0 -498
  1954. package/dist/tool-schema-CMtc7PdZ.js +0 -40
  1955. package/dist/tool-schema-projection-DJRPEEvY.js +0 -215
  1956. package/dist/tool-split-E4RdK5jS.js +0 -323
  1957. package/dist/tools-BAl3JiNw.js +0 -901
  1958. package/dist/tools-DC8tCPxR.js +0 -579
  1959. package/dist/tools-catalog-Dzv9zaBD.js +0 -156
  1960. package/dist/tools-effective-CGvzyIL2.js +0 -442
  1961. package/dist/tools-effective-inventory-GI5N5Q9v.js +0 -379
  1962. package/dist/tools-invoke-CU2U0hNH.js +0 -51
  1963. package/dist/tools-invoke-http-8s3FiUy4.js +0 -68
  1964. package/dist/tools-invoke-shared-DIETrEY7.js +0 -200
  1965. package/dist/tools.runtime-Bnm8CI7w.js +0 -5
  1966. package/dist/transcript-rewrite-Buv2ITw4.js +0 -688
  1967. package/dist/transcripts-tool-BCFlLCFd.js +0 -2
  1968. package/dist/transcripts-tool-CWgNd0Uw.js +0 -656
  1969. package/dist/tts-Aguo4zC5.js +0 -3
  1970. package/dist/tts-Bf77cURn.js +0 -2
  1971. package/dist/tts-DnADOKOP.js +0 -194
  1972. package/dist/tts-runtime-MBSH-nOM.js +0 -1337
  1973. package/dist/tts.runtime-B-NR9osE.js +0 -2
  1974. package/dist/tts.runtime-Bo-QxKgx.js +0 -3
  1975. package/dist/tui-B0CdNmCz.js +0 -4860
  1976. package/dist/tui-ByRcXM3Z.js +0 -2
  1977. package/dist/tui-backend-C52BUoZI.js +0 -256
  1978. package/dist/tui-cli-BQHpZ4n0.js +0 -40
  1979. package/dist/typing-policy-XspVOezC.js +0 -199
  1980. package/dist/usage-BOYwzimH.js +0 -1113
  1981. package/dist/usage-BSmLrVWB.js +0 -623
  1982. package/dist/usage-format-CfzICmvv.js +0 -2
  1983. package/dist/usage-format-DPJKCPic.js +0 -394
  1984. package/dist/video-generation-provider-CdCTztQ7.js +0 -77
  1985. package/dist/video-generation-provider-MUUshUzz.js +0 -325
  1986. package/dist/video-generation-provider-XmzzTa6e.js +0 -297
  1987. package/dist/video-generation-provider-weiQUJE5.js +0 -64
  1988. package/dist/web-fetch-providers.runtime-tD9zqAS2.js +0 -41
  1989. package/dist/web-guarded-fetch-CyhQZ1yD.js +0 -2
  1990. package/dist/web-guarded-fetch-DIXHI-yJ.js +0 -58
  1991. package/dist/web-media-BPnTMYE5.js +0 -4
  1992. package/dist/web-media-DV_tCQiQ.js +0 -2
  1993. package/dist/web-media-DYydVGCK.js +0 -651
  1994. package/dist/web-provider-runtime-shared-h3M6Bqyg.js +0 -142
  1995. package/dist/web-search-provider-common-CEYWuDcp.js +0 -252
  1996. package/dist/web-search-providers.runtime-YrayP296.js +0 -41
  1997. package/dist/zod-schema.core-BGLctDlK.d.ts +0 -166
  1998. /package/dist/{acp-runtime-backend-CHZtaM6t.js → acp-runtime-backend-B83JR5Zf.js} +0 -0
  1999. /package/dist/{agent-turn-attachments-BYCRK86s.js → agent-turn-attachments-D5uJijuK.js} +0 -0
  2000. /package/dist/{auth-install-policy-t46tJ8jV.js → auth-install-policy-BIpdwrZ9.js} +0 -0
  2001. /package/dist/{cli-backends-BHXnrVN_.js → cli-backends-79CCRQ2a.js} +0 -0
  2002. /package/dist/{command-secret-targets-DZ0J2Wm3.js → command-secret-targets-BOJlcBil.js} +0 -0
  2003. /package/dist/{commands-DWp49Exc.js → commands-Dw9hwmVt.js} +0 -0
  2004. /package/dist/{commands-reset-hooks-MMq2dvff.js → commands-reset-hooks-epArfNOY.js} +0 -0
  2005. /package/dist/{delegate-Dkj_5OvH.js → delegate-Bw8NQXVr.js} +0 -0
  2006. /package/dist/{jobs-BGELIHcx.js → jobs-BIOTaq7l.js} +0 -0
  2007. /package/dist/{kimi-web-search-provider-4PlMYsPx.js → kimi-web-search-provider-Bzg_DiXO.js} +0 -0
  2008. /package/dist/{memory-host-search-Ds9GiNpf.js → memory-host-search-Dph0Mq-v.js} +0 -0
  2009. /package/dist/{minimax-web-search-provider-d5gTJUNg.js → minimax-web-search-provider-CETxDkkI.js} +0 -0
  2010. /package/dist/{model-selection-cli-CO6BHPiL.js → model-selection-cli-DizUvxeY.js} +0 -0
  2011. /package/dist/{provider-auth-choice-preference-f7Us6TQL.js → provider-auth-choice-preference-uJn1811S.js} +0 -0
  2012. /package/dist/{runtime-wfO9bV5y.js → runtime-BEVbpIgZ.js} +0 -0
  2013. /package/dist/{runtime-web-tools-B6vr1LZs.js → runtime-web-tools-Bf0aEe-F.js} +0 -0
  2014. /package/dist/{runtime-web-tools-fallback.runtime-Crs7KfH5.js → runtime-web-tools-fallback.runtime-DU6rTj6l.js} +0 -0
  2015. /package/dist/{session-subagent-reactivation-H5Rdwkyy.js → session-subagent-reactivation-Bb5SCi9J.js} +0 -0
  2016. /package/dist/{tavily-web-search-provider-DbdIzpMv.js → tavily-web-search-provider-CIEhV60D.js} +0 -0
@@ -0,0 +1,2302 @@
1
+ import { c as normalizeOptionalString } from "./string-coerce-DKw2K5wM.js";
2
+ import { a as asFiniteNumber } from "./number-coercion-D1aDmIZp.js";
3
+ import { _ as resolveOAuthDir, v as resolveOAuthPath, y as resolveStateDir } from "./paths-9MqJt9oL.js";
4
+ import { o as isRecord } from "./record-coerce-Btbek4uV.js";
5
+ import "./errors-5ePGD43N.js";
6
+ import { _ as uniqueStrings, d as normalizeTrimmedStringList } from "./string-normalization-B8G0vlWE.js";
7
+ import { p as resolveUserPath } from "./utils-v5zGdVpj.js";
8
+ import { d as normalizeSecretInputString, o as coerceSecretRef } from "./types.secrets-Z7uJY7vF.js";
9
+ import { t as createSubsystemLogger } from "./subsystem-46gngkCY.js";
10
+ import { r as normalizeProviderId } from "./provider-id-DhcncFyL.js";
11
+ import { n as saveJsonFile, t as loadJsonFile } from "./json-file-BiVAisvv.js";
12
+ import { o as withFileLock } from "./file-lock-DPo8H2Zw.js";
13
+ import "./file-lock-DXTqiArI.js";
14
+ import { a as replaceRuntimeAuthProfileStoreSnapshots$1, i as hasRuntimeAuthProfileStoreSnapshot, n as getRuntimeAuthProfileStoreSnapshot$1, o as setRuntimeAuthProfileStoreSnapshot, s as cloneAuthProfileStore, t as clearRuntimeAuthProfileStoreSnapshots$1 } from "./runtime-snapshots-DTqkdIBi.js";
15
+ import { a as resolveLegacyAuthStorePath, r as resolveAuthStorePath, t as resolveAuthStatePath } from "./path-resolve-B_O9-YWZ.js";
16
+ import { a as MINIMAX_CLI_PROFILE_ID, c as OPENAI_CODEX_DEFAULT_PROFILE_ID, i as EXTERNAL_CLI_SYNC_TTL_MS, l as log$1, n as CLAUDE_CLI_PROFILE_ID, t as AUTH_STORE_LOCK_OPTIONS } from "./constants-BbB78Bsv.js";
17
+ import { x as resolveExternalAuthProfilesWithPlugins } from "./provider-runtime-DNNbfwOK.js";
18
+ import { t as ensureAuthStoreFile } from "./paths-DC2neYUC.js";
19
+ import { t as asBoolean } from "./boolean-CZag3-H2.js";
20
+ import { n as readCachedAuthProfileStore, r as writeCachedAuthProfileStore, t as clearLoadedAuthStoreCache } from "./store-cache-CoRGyiyD.js";
21
+ import "./source-check-VEWV_wE3.js";
22
+ import fs from "node:fs";
23
+ import path from "node:path";
24
+ import os from "node:os";
25
+ import * as childProcess from "node:child_process";
26
+ import { execSync } from "node:child_process";
27
+ import { createCipheriv, createDecipheriv, createHash, hash } from "node:crypto";
28
+ import { isDeepStrictEqual } from "node:util";
29
+ //#region src/agents/cli-credentials.ts
30
+ const log = createSubsystemLogger("agents/auth-profiles");
31
+ const CLAUDE_CLI_CREDENTIALS_RELATIVE_PATH = ".claude/.credentials.json";
32
+ const CODEX_CLI_AUTH_FILENAME = "auth.json";
33
+ const MINIMAX_CLI_CREDENTIALS_RELATIVE_PATH = ".minimax/oauth_creds.json";
34
+ const GEMINI_CLI_CREDENTIALS_RELATIVE_PATH = ".gemini/oauth_creds.json";
35
+ const CLAUDE_CLI_KEYCHAIN_SERVICE = "Claude Code-credentials";
36
+ let claudeCliCache = null;
37
+ let codexCliCache = null;
38
+ let minimaxCliCache = null;
39
+ let geminiCliCache = null;
40
+ function resolveClaudeCliCredentialsPath(homeDir) {
41
+ const baseDir = homeDir ?? resolveUserPath("~");
42
+ return path.join(baseDir, CLAUDE_CLI_CREDENTIALS_RELATIVE_PATH);
43
+ }
44
+ function parseClaudeCliOauthCredential(claudeOauth) {
45
+ if (!claudeOauth || typeof claudeOauth !== "object") return null;
46
+ const accessToken = claudeOauth.accessToken;
47
+ const refreshToken = claudeOauth.refreshToken;
48
+ const expiresAt = claudeOauth.expiresAt;
49
+ if (typeof accessToken !== "string" || !accessToken) return null;
50
+ if (typeof expiresAt !== "number" || !Number.isFinite(expiresAt) || expiresAt <= 0) return null;
51
+ if (typeof refreshToken === "string" && refreshToken) return {
52
+ type: "oauth",
53
+ provider: "anthropic",
54
+ access: accessToken,
55
+ refresh: refreshToken,
56
+ expires: expiresAt
57
+ };
58
+ return {
59
+ type: "token",
60
+ provider: "anthropic",
61
+ token: accessToken,
62
+ expires: expiresAt
63
+ };
64
+ }
65
+ function resolveCodexHomePath(codexHome) {
66
+ const configured = codexHome ?? process.env.CODEX_HOME;
67
+ const home = configured ? resolveUserPath(configured) : resolveUserPath("~/.codex");
68
+ try {
69
+ return fs.realpathSync.native(home);
70
+ } catch {
71
+ return home;
72
+ }
73
+ }
74
+ function resolveMiniMaxCliCredentialsPath(homeDir) {
75
+ const baseDir = homeDir ?? resolveUserPath("~");
76
+ return path.join(baseDir, MINIMAX_CLI_CREDENTIALS_RELATIVE_PATH);
77
+ }
78
+ function resolveGeminiCliCredentialsPath(homeDir) {
79
+ const baseDir = homeDir ?? resolveUserPath("~");
80
+ return path.join(baseDir, GEMINI_CLI_CREDENTIALS_RELATIVE_PATH);
81
+ }
82
+ function readFileMtimeMs(filePath) {
83
+ try {
84
+ return fs.statSync(filePath).mtimeMs;
85
+ } catch {
86
+ return null;
87
+ }
88
+ }
89
+ function readCachedCliCredential(options) {
90
+ const { ttlMs, cache, cacheKey, read, setCache, readSourceFingerprint } = options;
91
+ if (ttlMs <= 0) return read();
92
+ const now = Date.now();
93
+ const sourceFingerprint = readSourceFingerprint?.();
94
+ if (cache && cache.cacheKey === cacheKey && cache.sourceFingerprint === sourceFingerprint && now - cache.readAt < ttlMs) return cache.value;
95
+ const value = read();
96
+ const cachedSourceFingerprint = readSourceFingerprint?.();
97
+ if (!readSourceFingerprint || cachedSourceFingerprint === sourceFingerprint) setCache({
98
+ value,
99
+ readAt: now,
100
+ cacheKey,
101
+ sourceFingerprint: cachedSourceFingerprint
102
+ });
103
+ else setCache(null);
104
+ return value;
105
+ }
106
+ function computeCodexKeychainAccount(codexHome) {
107
+ return `cli|${createHash("sha256").update(codexHome).digest("hex").slice(0, 16)}`;
108
+ }
109
+ function resolveCodexKeychainParams(options) {
110
+ return {
111
+ platform: options?.platform ?? process.platform,
112
+ execSyncImpl: options?.execSync ?? execSync,
113
+ codexHome: resolveCodexHomePath(options?.codexHome)
114
+ };
115
+ }
116
+ function decodeJwtExpiryMs(token) {
117
+ const parts = token.split(".");
118
+ if (parts.length < 2) return null;
119
+ try {
120
+ const payloadRaw = Buffer.from(parts[1], "base64url").toString("utf8");
121
+ const payload = JSON.parse(payloadRaw);
122
+ return typeof payload.exp === "number" && Number.isFinite(payload.exp) && payload.exp > 0 ? payload.exp * 1e3 : null;
123
+ } catch {
124
+ return null;
125
+ }
126
+ }
127
+ function decodeJwtIdentityClaims(token) {
128
+ const parts = token.split(".");
129
+ if (parts.length < 2) return {};
130
+ try {
131
+ const payloadRaw = Buffer.from(parts[1], "base64url").toString("utf8");
132
+ const payload = JSON.parse(payloadRaw);
133
+ return {
134
+ sub: typeof payload.sub === "string" && payload.sub ? payload.sub : void 0,
135
+ email: typeof payload.email === "string" && payload.email ? payload.email : void 0
136
+ };
137
+ } catch {
138
+ return {};
139
+ }
140
+ }
141
+ function readCodexKeychainAuthRecord(options) {
142
+ const { platform, execSyncImpl, codexHome } = resolveCodexKeychainParams(options);
143
+ if (platform !== "darwin" || options?.allowKeychainPrompt === false) return null;
144
+ const account = computeCodexKeychainAccount(codexHome);
145
+ try {
146
+ const secret = execSyncImpl(`security find-generic-password -s "Codex Auth" -a "${account}" -w`, {
147
+ encoding: "utf8",
148
+ timeout: 5e3,
149
+ stdio: [
150
+ "pipe",
151
+ "pipe",
152
+ "pipe"
153
+ ]
154
+ }).trim();
155
+ return JSON.parse(secret);
156
+ } catch {
157
+ return null;
158
+ }
159
+ }
160
+ function readCodexKeychainCredentials(options) {
161
+ const parsed = readCodexKeychainAuthRecord(options);
162
+ if (!parsed) return null;
163
+ const tokens = parsed.tokens;
164
+ try {
165
+ const accessToken = tokens?.access_token;
166
+ const refreshToken = tokens?.refresh_token;
167
+ if (typeof accessToken !== "string" || !accessToken) return null;
168
+ if (typeof refreshToken !== "string" || !refreshToken) return null;
169
+ const lastRefreshRaw = parsed.last_refresh;
170
+ const lastRefresh = typeof lastRefreshRaw === "string" || typeof lastRefreshRaw === "number" ? new Date(lastRefreshRaw).getTime() : Date.now();
171
+ const fallbackExpiry = Number.isFinite(lastRefresh) ? lastRefresh + 3600 * 1e3 : Date.now() + 3600 * 1e3;
172
+ const expires = decodeJwtExpiryMs(accessToken) ?? fallbackExpiry;
173
+ const accountId = typeof tokens?.account_id === "string" ? tokens.account_id : void 0;
174
+ const idToken = typeof tokens?.id_token === "string" ? tokens.id_token : void 0;
175
+ log.info("read codex credentials from keychain", {
176
+ source: "keychain",
177
+ expires: new Date(expires).toISOString()
178
+ });
179
+ return {
180
+ type: "oauth",
181
+ provider: "openai-codex",
182
+ access: accessToken,
183
+ refresh: refreshToken,
184
+ expires,
185
+ accountId,
186
+ idToken
187
+ };
188
+ } catch {
189
+ return null;
190
+ }
191
+ }
192
+ function readPortalCliOauthCredentials(credPath, provider) {
193
+ const raw = loadJsonFile(credPath);
194
+ if (!raw || typeof raw !== "object") return null;
195
+ const data = raw;
196
+ const accessToken = data.access_token;
197
+ const refreshToken = data.refresh_token;
198
+ const expiresAt = data.expiry_date;
199
+ if (typeof accessToken !== "string" || !accessToken) return null;
200
+ if (typeof refreshToken !== "string" || !refreshToken) return null;
201
+ if (typeof expiresAt !== "number" || !Number.isFinite(expiresAt)) return null;
202
+ return {
203
+ type: "oauth",
204
+ provider,
205
+ access: accessToken,
206
+ refresh: refreshToken,
207
+ expires: expiresAt
208
+ };
209
+ }
210
+ function readMiniMaxCliCredentials(options) {
211
+ return readPortalCliOauthCredentials(resolveMiniMaxCliCredentialsPath(options?.homeDir), "minimax-portal");
212
+ }
213
+ function readGeminiCliCredentials(options) {
214
+ const raw = loadJsonFile(resolveGeminiCliCredentialsPath(options?.homeDir));
215
+ if (!raw || typeof raw !== "object") return null;
216
+ const data = raw;
217
+ const accessToken = data.access_token;
218
+ const refreshToken = data.refresh_token;
219
+ const expiresAt = data.expiry_date;
220
+ if (typeof accessToken !== "string" || !accessToken) return null;
221
+ if (typeof refreshToken !== "string" || !refreshToken) return null;
222
+ if (typeof expiresAt !== "number" || !Number.isFinite(expiresAt)) return null;
223
+ const idTokenRaw = data.id_token;
224
+ const identity = typeof idTokenRaw === "string" && idTokenRaw ? decodeJwtIdentityClaims(idTokenRaw) : {};
225
+ return {
226
+ type: "oauth",
227
+ provider: "google-gemini-cli",
228
+ access: accessToken,
229
+ refresh: refreshToken,
230
+ expires: expiresAt,
231
+ ...identity.email ? { email: identity.email } : {},
232
+ ...identity.sub ? { accountId: identity.sub } : {}
233
+ };
234
+ }
235
+ function readClaudeCliKeychainCredentials(execSyncImpl = execSync) {
236
+ try {
237
+ const result = execSyncImpl(`security find-generic-password -s "${CLAUDE_CLI_KEYCHAIN_SERVICE}" -w`, {
238
+ encoding: "utf8",
239
+ timeout: 5e3,
240
+ stdio: [
241
+ "pipe",
242
+ "pipe",
243
+ "pipe"
244
+ ]
245
+ });
246
+ return parseClaudeCliOauthCredential(JSON.parse(result.trim())?.claudeAiOauth);
247
+ } catch {
248
+ return null;
249
+ }
250
+ }
251
+ function readClaudeCliCredentials(options) {
252
+ if ((options?.platform ?? process.platform) === "darwin" && options?.allowKeychainPrompt !== false) {
253
+ const keychainCreds = readClaudeCliKeychainCredentials(options?.execSync);
254
+ if (keychainCreds) {
255
+ log.info("read anthropic credentials from claude cli keychain", { type: keychainCreds.type });
256
+ return keychainCreds;
257
+ }
258
+ }
259
+ const raw = loadJsonFile(resolveClaudeCliCredentialsPath(options?.homeDir));
260
+ if (!raw || typeof raw !== "object") return null;
261
+ return parseClaudeCliOauthCredential(raw.claudeAiOauth);
262
+ }
263
+ /** @deprecated Anthropic provider-owned CLI credential helper; do not use from third-party plugins. */
264
+ function readClaudeCliCredentialsCached(options) {
265
+ const platform = options?.platform ?? process.platform;
266
+ const ttlMs = options?.ttlMs ?? 0;
267
+ const credentialsPath = resolveClaudeCliCredentialsPath(options?.homeDir);
268
+ const keychainIntent = platform === "darwin" && options?.allowKeychainPrompt !== false ? "keychain" : "file";
269
+ return readCachedCliCredential({
270
+ ttlMs,
271
+ cache: claudeCliCache,
272
+ cacheKey: `${credentialsPath}:${keychainIntent}`,
273
+ read: () => readClaudeCliCredentials({
274
+ allowKeychainPrompt: options?.allowKeychainPrompt,
275
+ platform,
276
+ homeDir: options?.homeDir,
277
+ execSync: options?.execSync
278
+ }),
279
+ setCache: (next) => {
280
+ claudeCliCache = next;
281
+ }
282
+ });
283
+ }
284
+ function readCodexCliCredentials(options) {
285
+ const keychain = readCodexKeychainCredentials({
286
+ codexHome: options?.codexHome,
287
+ allowKeychainPrompt: options?.allowKeychainPrompt,
288
+ platform: options?.platform,
289
+ execSync: options?.execSync
290
+ });
291
+ if (keychain) return keychain;
292
+ const authPath = path.join(resolveCodexHomePath(options?.codexHome), CODEX_CLI_AUTH_FILENAME);
293
+ const raw = loadJsonFile(authPath);
294
+ if (!raw || typeof raw !== "object") return null;
295
+ const tokens = raw.tokens;
296
+ if (!tokens || typeof tokens !== "object") return null;
297
+ const accessToken = tokens.access_token;
298
+ const refreshToken = tokens.refresh_token;
299
+ if (typeof accessToken !== "string" || !accessToken) return null;
300
+ if (typeof refreshToken !== "string" || !refreshToken) return null;
301
+ let fallbackExpiry;
302
+ try {
303
+ fallbackExpiry = fs.statSync(authPath).mtimeMs + 3600 * 1e3;
304
+ } catch {
305
+ fallbackExpiry = Date.now() + 3600 * 1e3;
306
+ }
307
+ return {
308
+ type: "oauth",
309
+ provider: "openai-codex",
310
+ access: accessToken,
311
+ refresh: refreshToken,
312
+ expires: decodeJwtExpiryMs(accessToken) ?? fallbackExpiry,
313
+ accountId: typeof tokens.account_id === "string" ? tokens.account_id : void 0,
314
+ idToken: typeof tokens.id_token === "string" ? tokens.id_token : void 0
315
+ };
316
+ }
317
+ function readCodexCliCredentialsCached(options) {
318
+ const platform = options?.platform ?? process.platform;
319
+ const ttlMs = options?.ttlMs ?? 0;
320
+ const authPath = path.join(resolveCodexHomePath(options?.codexHome), CODEX_CLI_AUTH_FILENAME);
321
+ const keychainIntent = platform === "darwin" && options?.allowKeychainPrompt !== false ? "keychain" : "file";
322
+ return readCachedCliCredential({
323
+ ttlMs,
324
+ cache: codexCliCache,
325
+ cacheKey: `${platform}|${authPath}:${keychainIntent}`,
326
+ read: () => readCodexCliCredentials({
327
+ codexHome: options?.codexHome,
328
+ allowKeychainPrompt: options?.allowKeychainPrompt,
329
+ platform: options?.platform,
330
+ execSync: options?.execSync
331
+ }),
332
+ setCache: (next) => {
333
+ codexCliCache = next;
334
+ },
335
+ readSourceFingerprint: () => readFileMtimeMs(authPath)
336
+ });
337
+ }
338
+ function readMiniMaxCliCredentialsCached(options) {
339
+ const credPath = resolveMiniMaxCliCredentialsPath(options?.homeDir);
340
+ return readCachedCliCredential({
341
+ ttlMs: options?.ttlMs ?? 0,
342
+ cache: minimaxCliCache,
343
+ cacheKey: credPath,
344
+ read: () => readMiniMaxCliCredentials({ homeDir: options?.homeDir }),
345
+ setCache: (next) => {
346
+ minimaxCliCache = next;
347
+ },
348
+ readSourceFingerprint: () => readFileMtimeMs(credPath)
349
+ });
350
+ }
351
+ function readGeminiCliCredentialsCached(options) {
352
+ const credPath = resolveGeminiCliCredentialsPath(options?.homeDir);
353
+ return readCachedCliCredential({
354
+ ttlMs: options?.ttlMs ?? 0,
355
+ cache: geminiCliCache,
356
+ cacheKey: credPath,
357
+ read: () => readGeminiCliCredentials({ homeDir: options?.homeDir }),
358
+ setCache: (next) => {
359
+ geminiCliCache = next;
360
+ },
361
+ readSourceFingerprint: () => readFileMtimeMs(credPath)
362
+ });
363
+ }
364
+ //#endregion
365
+ //#region src/agents/auth-profiles/credential-state.ts
366
+ const DEFAULT_OAUTH_REFRESH_MARGIN_MS = 300 * 1e3;
367
+ function resolveTokenExpiryState(expires, now = Date.now(), opts) {
368
+ if (expires === void 0) return "missing";
369
+ if (typeof expires !== "number") return "invalid_expires";
370
+ if (!Number.isFinite(expires) || expires <= 0 || expires > 864e13) return "invalid_expires";
371
+ const remainingMs = expires - now;
372
+ if (remainingMs <= 0) return "expired";
373
+ const expiringWithinMs = Math.max(0, opts?.expiringWithinMs ?? 0);
374
+ if (expiringWithinMs > 0 && remainingMs <= expiringWithinMs) return "expiring";
375
+ return "valid";
376
+ }
377
+ function hasUsableOAuthCredential$1(credential, opts) {
378
+ if (!credential || credential.type !== "oauth") return false;
379
+ if (typeof credential.access !== "string" || credential.access.trim().length === 0) return false;
380
+ const now = opts?.now ?? Date.now();
381
+ const refreshMarginMs = Math.max(0, opts?.refreshMarginMs ?? 3e5);
382
+ return resolveTokenExpiryState(credential.expires, now, { expiringWithinMs: refreshMarginMs }) === "valid";
383
+ }
384
+ function hasConfiguredSecretRef(value) {
385
+ return coerceSecretRef(value) !== null;
386
+ }
387
+ function hasConfiguredSecretString(value) {
388
+ return normalizeSecretInputString(value) !== void 0;
389
+ }
390
+ function evaluateStoredCredentialEligibility(params) {
391
+ const now = params.now ?? Date.now();
392
+ const credential = params.credential;
393
+ if (credential.type === "api_key") {
394
+ const hasKey = hasConfiguredSecretString(credential.key);
395
+ const hasKeyRef = hasConfiguredSecretRef(credential.keyRef);
396
+ if (!hasKey && !hasKeyRef) return {
397
+ eligible: false,
398
+ reasonCode: "missing_credential"
399
+ };
400
+ return {
401
+ eligible: true,
402
+ reasonCode: "ok"
403
+ };
404
+ }
405
+ if (credential.type === "token") {
406
+ const hasToken = hasConfiguredSecretString(credential.token);
407
+ const hasTokenRef = hasConfiguredSecretRef(credential.tokenRef);
408
+ if (!hasToken && !hasTokenRef) return {
409
+ eligible: false,
410
+ reasonCode: "missing_credential"
411
+ };
412
+ const expiryState = resolveTokenExpiryState(credential.expires, now);
413
+ if (expiryState === "invalid_expires") return {
414
+ eligible: false,
415
+ reasonCode: "invalid_expires"
416
+ };
417
+ if (expiryState === "expired") return {
418
+ eligible: false,
419
+ reasonCode: "expired"
420
+ };
421
+ return {
422
+ eligible: true,
423
+ reasonCode: "ok"
424
+ };
425
+ }
426
+ if (normalizeSecretInputString(credential.access) === void 0 && normalizeSecretInputString(credential.refresh) === void 0) return {
427
+ eligible: false,
428
+ reasonCode: "missing_credential"
429
+ };
430
+ return {
431
+ eligible: true,
432
+ reasonCode: "ok"
433
+ };
434
+ }
435
+ //#endregion
436
+ //#region src/agents/auth-profiles/oauth-shared.ts
437
+ function areOAuthCredentialsEquivalent(a, b) {
438
+ if (!a || a.type !== "oauth") return false;
439
+ return a.provider === b.provider && a.access === b.access && a.refresh === b.refresh && a.expires === b.expires && a.email === b.email && a.enterpriseUrl === b.enterpriseUrl && a.projectId === b.projectId && a.accountId === b.accountId && a.idToken === b.idToken;
440
+ }
441
+ function hasNewerStoredOAuthCredential(existing, incoming) {
442
+ return Boolean(existing && existing.provider === incoming.provider && Number.isFinite(existing.expires) && (!Number.isFinite(incoming.expires) || existing.expires > incoming.expires));
443
+ }
444
+ function shouldReplaceStoredOAuthCredential(existing, incoming) {
445
+ if (!existing || existing.type !== "oauth") return true;
446
+ if (areOAuthCredentialsEquivalent(existing, incoming)) return false;
447
+ return !hasNewerStoredOAuthCredential(existing, incoming);
448
+ }
449
+ function hasUsableOAuthCredential(credential, now = Date.now()) {
450
+ return hasUsableOAuthCredential$1(credential, { now });
451
+ }
452
+ function normalizeAuthIdentityToken$1(value) {
453
+ const trimmed = value?.trim();
454
+ return trimmed ? trimmed : void 0;
455
+ }
456
+ function normalizeAuthEmailToken$1(value) {
457
+ return normalizeAuthIdentityToken$1(value)?.toLowerCase();
458
+ }
459
+ function hasOAuthIdentity(credential) {
460
+ return normalizeAuthIdentityToken$1(credential.accountId) !== void 0 || normalizeAuthEmailToken$1(credential.email) !== void 0;
461
+ }
462
+ function hasMatchingOAuthIdentity(existing, incoming) {
463
+ const existingAccountId = normalizeAuthIdentityToken$1(existing.accountId);
464
+ const incomingAccountId = normalizeAuthIdentityToken$1(incoming.accountId);
465
+ if (existingAccountId !== void 0 && incomingAccountId !== void 0) return existingAccountId === incomingAccountId;
466
+ const existingEmail = normalizeAuthEmailToken$1(existing.email);
467
+ const incomingEmail = normalizeAuthEmailToken$1(incoming.email);
468
+ if (existingEmail !== void 0 && incomingEmail !== void 0) return existingEmail === incomingEmail;
469
+ return false;
470
+ }
471
+ function isSafeToAdoptBootstrapOAuthIdentity(existing, incoming) {
472
+ if (!existing || existing.type !== "oauth") return true;
473
+ if (existing.provider !== incoming.provider) return false;
474
+ if (areOAuthCredentialsEquivalent(existing, incoming)) return true;
475
+ if (!hasOAuthIdentity(existing)) return true;
476
+ return hasMatchingOAuthIdentity(existing, incoming);
477
+ }
478
+ function isSafeToAdoptMainStoreOAuthIdentity(existing, incoming) {
479
+ if (!existing || existing.type !== "oauth") return false;
480
+ if (existing.provider !== incoming.provider) return false;
481
+ if (areOAuthCredentialsEquivalent(existing, incoming)) return true;
482
+ if (!hasOAuthIdentity(existing)) return true;
483
+ return hasMatchingOAuthIdentity(existing, incoming);
484
+ }
485
+ function shouldBootstrapFromExternalCliCredential(params) {
486
+ const now = params.now ?? Date.now();
487
+ if (hasUsableOAuthCredential(params.existing, now)) return false;
488
+ return hasUsableOAuthCredential(params.imported, now);
489
+ }
490
+ function overlayRuntimeExternalOAuthProfiles(store, profiles, options) {
491
+ const externalProfiles = Array.from(profiles);
492
+ const next = cloneAuthProfileStore(store);
493
+ for (const profile of externalProfiles) next.profiles[profile.profileId] = profile.credential;
494
+ const runtimeOnlyProfileIds = new Set(externalProfiles.filter((profile) => profile.persistence !== "persisted").map((profile) => profile.profileId));
495
+ for (const profileId of store.runtimeExternalProfileIds ?? []) if (next.profiles[profileId]) runtimeOnlyProfileIds.add(profileId);
496
+ next.runtimeExternalProfileIds = runtimeOnlyProfileIds.size > 0 || options?.runtimeExternalProfileIdsAuthoritative === true ? [...runtimeOnlyProfileIds].toSorted() : void 0;
497
+ next.runtimeExternalProfileIdsAuthoritative = options?.runtimeExternalProfileIdsAuthoritative === true ? true : void 0;
498
+ return next;
499
+ }
500
+ function shouldPersistRuntimeExternalOAuthProfile(params) {
501
+ for (const profile of params.profiles) {
502
+ if (profile.profileId !== params.profileId) continue;
503
+ if (profile.persistence === "persisted") return true;
504
+ return !areOAuthCredentialsEquivalent(profile.credential, params.credential);
505
+ }
506
+ return true;
507
+ }
508
+ //#endregion
509
+ //#region src/agents/auth-profiles/external-cli-sync.ts
510
+ function normalizeAuthIdentityToken(value) {
511
+ const trimmed = value?.trim();
512
+ return trimmed ? trimmed : void 0;
513
+ }
514
+ function normalizeAuthEmailToken(value) {
515
+ return normalizeAuthIdentityToken(value)?.toLowerCase();
516
+ }
517
+ function isSafeToUseExternalCliCredential(existing, imported) {
518
+ if (!existing) return true;
519
+ if (existing.provider !== imported.provider) return false;
520
+ const existingAccountId = normalizeAuthIdentityToken(existing.accountId);
521
+ const importedAccountId = normalizeAuthIdentityToken(imported.accountId);
522
+ const existingEmail = normalizeAuthEmailToken(existing.email);
523
+ const importedEmail = normalizeAuthEmailToken(imported.email);
524
+ if (existingAccountId !== void 0 && importedAccountId !== void 0) return existingAccountId === importedAccountId;
525
+ if (existingEmail !== void 0 && importedEmail !== void 0) return existingEmail === importedEmail;
526
+ if (existingAccountId !== void 0 || existingEmail !== void 0) return false;
527
+ return true;
528
+ }
529
+ const EXTERNAL_CLI_SYNC_PROVIDERS = [
530
+ {
531
+ profileId: OPENAI_CODEX_DEFAULT_PROFILE_ID,
532
+ profileAliases: ["openai-codex:default"],
533
+ provider: "openai",
534
+ aliases: [
535
+ "openai-codex",
536
+ "codex",
537
+ "codex-cli",
538
+ "codex-app-server"
539
+ ],
540
+ readCredentials: (options) => readCodexCliCredentialsCached({
541
+ ttlMs: EXTERNAL_CLI_SYNC_TTL_MS,
542
+ allowKeychainPrompt: options?.allowKeychainPrompt
543
+ }),
544
+ bootstrapOnly: true
545
+ },
546
+ {
547
+ profileId: CLAUDE_CLI_PROFILE_ID,
548
+ provider: "claude-cli",
549
+ readCredentials: (options) => {
550
+ const credential = readClaudeCliCredentialsCached({
551
+ ttlMs: EXTERNAL_CLI_SYNC_TTL_MS,
552
+ allowKeychainPrompt: options?.allowKeychainPrompt
553
+ });
554
+ if (credential?.type !== "oauth") return null;
555
+ return {
556
+ ...credential,
557
+ provider: "claude-cli"
558
+ };
559
+ }
560
+ },
561
+ {
562
+ profileId: MINIMAX_CLI_PROFILE_ID,
563
+ provider: "minimax-portal",
564
+ aliases: ["minimax", "minimax-cli"],
565
+ readCredentials: () => readMiniMaxCliCredentialsCached({ ttlMs: EXTERNAL_CLI_SYNC_TTL_MS })
566
+ }
567
+ ];
568
+ function resolveExternalCliSyncProvider(params) {
569
+ const provider = EXTERNAL_CLI_SYNC_PROVIDERS.find((entry) => externalCliProfileIdMatches(entry, params.profileId));
570
+ if (!provider) return null;
571
+ if (params.credential && !listExternalCliProviderIds(provider).includes(params.credential.provider)) return null;
572
+ return provider;
573
+ }
574
+ function listExternalCliProfileIds(providerConfig) {
575
+ return [providerConfig.profileId, ...providerConfig.profileAliases ?? []];
576
+ }
577
+ function listExternalCliProviderIds(providerConfig) {
578
+ return [providerConfig.provider, ...providerConfig.aliases ?? []];
579
+ }
580
+ function normalizeExternalCliCredentialProvider(credential, provider) {
581
+ return credential ? {
582
+ ...credential,
583
+ provider
584
+ } : null;
585
+ }
586
+ function getAuthProfileProviderPrefix(profileId) {
587
+ return profileId.split(":", 1)[0]?.trim() ?? "";
588
+ }
589
+ function externalCliProfileIdMatches(providerConfig, profileId, options) {
590
+ if (listExternalCliProfileIds(providerConfig).includes(profileId)) return true;
591
+ if (!options?.allowLegacyNamespace || providerConfig.profileId !== "openai:default") return false;
592
+ return normalizeProviderId(getAuthProfileProviderPrefix(profileId)) === "openai-codex";
593
+ }
594
+ function hasInlineOAuthTokenMaterial$1(credential) {
595
+ return [
596
+ credential.access,
597
+ credential.refresh,
598
+ credential.idToken
599
+ ].some((value) => typeof value === "string" && value.trim().length > 0);
600
+ }
601
+ function readExternalCliBootstrapCredential(params) {
602
+ const provider = resolveExternalCliSyncProvider(params);
603
+ if (!provider) return null;
604
+ if (provider.bootstrapOnly && !params.allowInlineOAuthTokenMaterial && hasInlineOAuthTokenMaterial$1(params.credential)) return null;
605
+ return normalizeExternalCliCredentialProvider(provider.readCredentials({ allowKeychainPrompt: params.allowKeychainPrompt }), params.credential.provider);
606
+ }
607
+ const readManagedExternalCliCredential = readExternalCliBootstrapCredential;
608
+ function readExternalCliFallbackCredential(params) {
609
+ const provider = resolveExternalCliSyncProvider(params) ?? EXTERNAL_CLI_SYNC_PROVIDERS.find((entry) => listExternalCliProviderIds(entry).includes(params.credential.provider));
610
+ if (!provider) return null;
611
+ return normalizeExternalCliCredentialProvider(provider.readCredentials({ allowKeychainPrompt: params.allowKeychainPrompt }), params.credential.provider);
612
+ }
613
+ function normalizeProviderScope(values) {
614
+ if (values === void 0) return;
615
+ const out = /* @__PURE__ */ new Set();
616
+ for (const value of values) {
617
+ const raw = value.trim();
618
+ if (!raw) continue;
619
+ out.add(raw.toLowerCase());
620
+ const normalized = normalizeProviderId(raw);
621
+ if (normalized) out.add(normalized);
622
+ }
623
+ return out;
624
+ }
625
+ function isExternalCliProviderInScope(params) {
626
+ const { providerConfig, options, store } = params;
627
+ const providerScope = normalizeProviderScope(options?.providerIds);
628
+ if (providerScope === void 0 && options?.profileIds === void 0) return Object.entries(store.profiles).some(([profileId, existing]) => {
629
+ return externalCliProfileIdMatches(providerConfig, profileId) && existing?.type === "oauth" && listExternalCliProviderIds(providerConfig).includes(existing.provider);
630
+ });
631
+ if (Array.from(options?.profileIds ?? []).some((profileId) => externalCliProfileIdMatches(providerConfig, profileId.trim(), { allowLegacyNamespace: true }))) return true;
632
+ if (!providerScope || providerScope.size === 0) return false;
633
+ return listExternalCliProviderIds(providerConfig).some((alias) => {
634
+ const raw = alias.trim().toLowerCase();
635
+ const normalized = normalizeProviderId(alias);
636
+ return providerScope.has(raw) || (normalized ? providerScope.has(normalized) : false);
637
+ });
638
+ }
639
+ function listScopedExternalCliProfileIds(params) {
640
+ const { options, providerConfig, store } = params;
641
+ const requestedProfileIds = Array.from(options?.profileIds ?? []).map((value) => value.trim()).filter((value) => value.length > 0);
642
+ if (requestedProfileIds.length > 0) return requestedProfileIds.filter((profileId) => externalCliProfileIdMatches(providerConfig, profileId, { allowLegacyNamespace: true }));
643
+ const existingProfileIds = Object.keys(store.profiles).filter((profileId) => externalCliProfileIdMatches(providerConfig, profileId));
644
+ if (existingProfileIds.length > 0) return existingProfileIds;
645
+ return options?.providerIds ? [providerConfig.profileId] : [];
646
+ }
647
+ function resolveExternalCliAuthProfiles(store, options) {
648
+ const profiles = [];
649
+ const now = Date.now();
650
+ for (const providerConfig of EXTERNAL_CLI_SYNC_PROVIDERS) {
651
+ if (!isExternalCliProviderInScope({
652
+ providerConfig,
653
+ store,
654
+ options
655
+ })) continue;
656
+ const scopedProfileIds = listScopedExternalCliProfileIds({
657
+ providerConfig,
658
+ store,
659
+ options
660
+ });
661
+ for (const profileId of scopedProfileIds) {
662
+ const existing = store.profiles[profileId];
663
+ const existingOAuth = existing?.type === "oauth" && listExternalCliProviderIds(providerConfig).includes(existing.provider) ? existing : void 0;
664
+ if (existing && !existingOAuth) {
665
+ log$1.debug("kept explicit local auth over external cli bootstrap", {
666
+ profileId,
667
+ provider: providerConfig.provider,
668
+ localType: existing.type,
669
+ localProvider: existing.provider
670
+ });
671
+ continue;
672
+ }
673
+ if (providerConfig.bootstrapOnly && existingOAuth && hasInlineOAuthTokenMaterial$1(existingOAuth)) {
674
+ log$1.debug("kept local oauth over external cli bootstrap-only provider", {
675
+ profileId,
676
+ provider: providerConfig.provider
677
+ });
678
+ continue;
679
+ }
680
+ if (existingOAuth && !providerConfig.bootstrapOnly && hasUsableOAuthCredential(existingOAuth, now)) continue;
681
+ const creds = normalizeExternalCliCredentialProvider(providerConfig.readCredentials({ allowKeychainPrompt: options?.allowKeychainPrompt }), existingOAuth?.provider ?? providerConfig.provider);
682
+ if (!creds) continue;
683
+ if (existingOAuth && !isSafeToUseExternalCliCredential(existingOAuth, creds)) {
684
+ log$1.warn("refused external cli oauth bootstrap: identity mismatch", {
685
+ profileId,
686
+ provider: providerConfig.provider
687
+ });
688
+ continue;
689
+ }
690
+ if (existingOAuth && !isSafeToAdoptBootstrapOAuthIdentity(existingOAuth, creds) && !areOAuthCredentialsEquivalent(existingOAuth, creds)) {
691
+ log$1.warn("refused external cli oauth bootstrap: identity mismatch or missing binding", {
692
+ profileId,
693
+ provider: providerConfig.provider
694
+ });
695
+ continue;
696
+ }
697
+ if (!shouldBootstrapFromExternalCliCredential({
698
+ existing: existingOAuth,
699
+ imported: creds,
700
+ now
701
+ })) {
702
+ if (existingOAuth) log$1.debug("kept usable local oauth over external cli bootstrap", {
703
+ profileId,
704
+ provider: providerConfig.provider,
705
+ localExpires: existingOAuth.expires,
706
+ externalExpires: creds.expires
707
+ });
708
+ continue;
709
+ }
710
+ log$1.debug("used external cli oauth bootstrap because local oauth was missing or unusable", {
711
+ profileId,
712
+ provider: providerConfig.provider,
713
+ localExpires: existingOAuth?.expires,
714
+ externalExpires: creds.expires
715
+ });
716
+ profiles.push({
717
+ profileId,
718
+ credential: creds,
719
+ persistence: providerConfig.bootstrapOnly ? "runtime-only" : "persisted"
720
+ });
721
+ }
722
+ }
723
+ return profiles;
724
+ }
725
+ function normalizeExternalAuthProfile(profile) {
726
+ if (!profile?.profileId || !profile.credential) return null;
727
+ return {
728
+ ...profile,
729
+ persistence: profile.persistence ?? "runtime-only"
730
+ };
731
+ }
732
+ function resolveExternalAuthProfileMap(params) {
733
+ const env = params.env ?? process.env;
734
+ const profiles = resolveExternalAuthProfilesWithPlugins({
735
+ env,
736
+ config: params.externalCli?.config,
737
+ context: {
738
+ config: params.externalCli?.config,
739
+ agentDir: params.agentDir,
740
+ workspaceDir: void 0,
741
+ env,
742
+ store: params.store
743
+ }
744
+ });
745
+ const resolved = /* @__PURE__ */ new Map();
746
+ const cliProfiles = resolveExternalCliAuthProfiles?.(params.store, {
747
+ allowKeychainPrompt: params.externalCli?.allowKeychainPrompt,
748
+ providerIds: params.externalCli?.externalCliProviderIds,
749
+ profileIds: params.externalCli?.externalCliProfileIds
750
+ }) ?? [];
751
+ for (const profile of cliProfiles) resolved.set(profile.profileId, {
752
+ profileId: profile.profileId,
753
+ credential: profile.credential,
754
+ persistence: profile.persistence ?? "runtime-only"
755
+ });
756
+ for (const rawProfile of profiles) {
757
+ const profile = normalizeExternalAuthProfile(rawProfile);
758
+ if (!profile) continue;
759
+ resolved.set(profile.profileId, profile);
760
+ }
761
+ return resolved;
762
+ }
763
+ function listRuntimeExternalAuthProfiles(params) {
764
+ return Array.from(resolveExternalAuthProfileMap({
765
+ store: params.store,
766
+ agentDir: params.agentDir,
767
+ env: params.env,
768
+ externalCli: params.externalCli
769
+ }).values());
770
+ }
771
+ function hasPersistableExternalCliSyncCandidate(store, params) {
772
+ if (params?.externalCliProviderIds || params?.externalCliProfileIds) return true;
773
+ for (const profileId of [CLAUDE_CLI_PROFILE_ID, MINIMAX_CLI_PROFILE_ID]) if (store.profiles[profileId]?.type === "oauth") return true;
774
+ return false;
775
+ }
776
+ function hasScopedExternalCliOverlay$1(params) {
777
+ return Boolean(params?.externalCliProviderIds || params?.externalCliProfileIds);
778
+ }
779
+ function overlayExternalAuthProfiles(store, params) {
780
+ return overlayRuntimeExternalOAuthProfiles(store, listRuntimeExternalAuthProfiles({
781
+ store,
782
+ agentDir: params?.agentDir,
783
+ env: params?.env,
784
+ externalCli: params
785
+ }), { runtimeExternalProfileIdsAuthoritative: !hasScopedExternalCliOverlay$1(params) });
786
+ }
787
+ function syncPersistedExternalCliAuthProfiles(store, params) {
788
+ if (!hasPersistableExternalCliSyncCandidate(store, params)) return store;
789
+ const persistedProfiles = (resolveExternalCliAuthProfiles?.(store, {
790
+ allowKeychainPrompt: params?.allowKeychainPrompt,
791
+ providerIds: params?.externalCliProviderIds,
792
+ profileIds: params?.externalCliProfileIds
793
+ }) ?? []).filter((profile) => profile.persistence === "persisted");
794
+ if (persistedProfiles.length === 0) return store;
795
+ let next;
796
+ for (const profile of persistedProfiles) {
797
+ const existing = (next ?? store).profiles[profile.profileId];
798
+ if (existing?.type === "oauth" && areOAuthCredentialsEquivalent(existing, profile.credential)) continue;
799
+ next ??= cloneAuthProfileStore(store);
800
+ next.profiles[profile.profileId] = profile.credential;
801
+ }
802
+ return next ?? store;
803
+ }
804
+ //#endregion
805
+ //#region src/agents/auth-profiles/legacy-oauth-sidecar.ts
806
+ const LEGACY_OAUTH_REF_SOURCE = "fengming-credentials";
807
+ const LEGACY_OAUTH_REF_PROVIDER$1 = "openai-codex";
808
+ const LEGACY_OAUTH_SECRET_DIRNAME = "auth-profiles";
809
+ const LEGACY_OAUTH_SECRET_VERSION = 1;
810
+ const LEGACY_OAUTH_SECRET_ALGORITHM = "aes-256-gcm";
811
+ const LEGACY_OAUTH_SECRET_KEY_ENV = "FENGMING_AUTH_PROFILE_SECRET_KEY";
812
+ const LEGACY_OAUTH_SECRET_KEYCHAIN_SERVICE = "FengMing Auth Profile Secrets";
813
+ const LEGACY_OAUTH_SECRET_KEYCHAIN_ACCOUNT = "oauth-profile-master-key";
814
+ const LEGACY_OAUTH_SECRET_KEY_FILE_NAME = "auth-profile-secret-key";
815
+ function readNonEmptyString(value) {
816
+ return typeof value === "string" && value.trim() ? value : void 0;
817
+ }
818
+ function isLegacyOAuthRef(value) {
819
+ if (!isRecord(value)) return false;
820
+ return value.source === LEGACY_OAUTH_REF_SOURCE && value.provider === LEGACY_OAUTH_REF_PROVIDER$1 && typeof value.id === "string" && /^[a-f0-9]{32}$/.test(value.id);
821
+ }
822
+ function resolveLegacyOAuthSidecarPath(ref, env = process.env) {
823
+ return path.join(resolveOAuthDir(env), LEGACY_OAUTH_SECRET_DIRNAME, `${ref.id}.json`);
824
+ }
825
+ function normalizeLegacyOAuthSecretMaterial(raw) {
826
+ if (!isRecord(raw)) return null;
827
+ const material = {
828
+ ...readNonEmptyString(raw.access) ? { access: readNonEmptyString(raw.access) } : {},
829
+ ...readNonEmptyString(raw.refresh) ? { refresh: readNonEmptyString(raw.refresh) } : {},
830
+ ...readNonEmptyString(raw.idToken) ? { idToken: readNonEmptyString(raw.idToken) } : {}
831
+ };
832
+ return Object.keys(material).length > 0 ? material : null;
833
+ }
834
+ function coerceLegacyOAuthEncryptedPayload(raw) {
835
+ if (!isRecord(raw)) return null;
836
+ return raw.algorithm === LEGACY_OAUTH_SECRET_ALGORITHM && typeof raw.iv === "string" && typeof raw.tag === "string" && typeof raw.ciphertext === "string" ? {
837
+ algorithm: raw.algorithm,
838
+ iv: raw.iv,
839
+ tag: raw.tag,
840
+ ciphertext: raw.ciphertext
841
+ } : null;
842
+ }
843
+ function isLegacyOAuthSidecarPayload(raw) {
844
+ if (!isRecord(raw)) return false;
845
+ if (raw.version !== LEGACY_OAUTH_SECRET_VERSION || readNonEmptyString(raw.profileId) === void 0 || raw.provider !== LEGACY_OAUTH_REF_PROVIDER$1) return false;
846
+ return coerceLegacyOAuthEncryptedPayload(raw.encrypted) !== null || normalizeLegacyOAuthSecretMaterial(raw) !== null;
847
+ }
848
+ function buildLegacyOAuthSecretAad(params) {
849
+ return Buffer.from(`${params.ref.id}\0${params.profileId}\0${params.provider}`, "utf8");
850
+ }
851
+ function buildLegacyOAuthSecretKey(seed) {
852
+ return hash("sha256", `fengming:auth-profile-oauth:${seed}`, "buffer");
853
+ }
854
+ function encryptLegacyOAuthMaterialForTest(params) {
855
+ const iv = Buffer.from("0102030405060708090a0b0c", "hex");
856
+ const cipher = createCipheriv(LEGACY_OAUTH_SECRET_ALGORITHM, buildLegacyOAuthSecretKey(params.seed), iv);
857
+ cipher.setAAD(buildLegacyOAuthSecretAad({
858
+ ref: params.ref,
859
+ profileId: params.profileId,
860
+ provider: params.provider
861
+ }));
862
+ const ciphertext = Buffer.concat([cipher.update(JSON.stringify(params.material), "utf8"), cipher.final()]);
863
+ return {
864
+ algorithm: LEGACY_OAUTH_SECRET_ALGORITHM,
865
+ iv: iv.toString("base64url"),
866
+ tag: cipher.getAuthTag().toString("base64url"),
867
+ ciphertext: ciphertext.toString("base64url")
868
+ };
869
+ }
870
+ function isPathInsideOrEqual(parentDir, candidatePath) {
871
+ const relative = path.relative(path.resolve(parentDir), path.resolve(candidatePath));
872
+ return relative === "" || !!relative && !relative.startsWith("..") && !path.isAbsolute(relative);
873
+ }
874
+ function uniquePaths(paths) {
875
+ return uniqueStrings(paths.filter((entry) => Boolean(entry)));
876
+ }
877
+ function resolveLegacyOAuthSecretKeyFileCandidates(env) {
878
+ if (process.platform === "win32") {
879
+ const home = env.USERPROFILE?.trim() || os.homedir();
880
+ const root = env.APPDATA?.trim() || (home ? path.join(home, "AppData", "Roaming") : void 0);
881
+ return uniquePaths([root ? path.join(root, "FengMing", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0, home ? path.join(home, ".fengming-auth-profile-secrets", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0]);
882
+ }
883
+ if (process.platform === "darwin") {
884
+ const home = env.HOME?.trim() || os.homedir();
885
+ return uniquePaths([home ? path.join(home, "Library", "Application Support", "FengMing", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0, home ? path.join(home, ".fengming-auth-profile-secrets", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0]);
886
+ }
887
+ const home = env.HOME?.trim() || os.homedir();
888
+ const root = env.XDG_CONFIG_HOME?.trim() || (home ? path.join(home, ".config") : void 0);
889
+ return uniquePaths([root ? path.join(root, "fengming", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0, home ? path.join(home, ".fengming-auth-profile-secrets", LEGACY_OAUTH_SECRET_KEY_FILE_NAME) : void 0]);
890
+ }
891
+ function resolveLegacyOAuthSecretKeyFilePath(env) {
892
+ const stateDir = resolveStateDir(env);
893
+ return resolveLegacyOAuthSecretKeyFileCandidates(env).find((candidate) => !isPathInsideOrEqual(stateDir, candidate));
894
+ }
895
+ function readLegacyOAuthSecretKeyFile(env) {
896
+ const keyPath = resolveLegacyOAuthSecretKeyFilePath(env);
897
+ if (!keyPath) return;
898
+ try {
899
+ return fs.readFileSync(keyPath, "utf8").trim() || void 0;
900
+ } catch {
901
+ return;
902
+ }
903
+ }
904
+ function readLegacyMacOAuthSecretKeychainKey(params) {
905
+ if (process.platform !== "darwin" || params.allowKeychainPrompt === false || params.env.VITEST === "true" || params.env.VITEST_WORKER_ID !== void 0) return;
906
+ try {
907
+ return childProcess.execFileSync("security", [
908
+ "find-generic-password",
909
+ "-s",
910
+ LEGACY_OAUTH_SECRET_KEYCHAIN_SERVICE,
911
+ "-a",
912
+ LEGACY_OAUTH_SECRET_KEYCHAIN_ACCOUNT,
913
+ "-w"
914
+ ], {
915
+ encoding: "utf8",
916
+ timeout: 5e3,
917
+ stdio: [
918
+ "pipe",
919
+ "pipe",
920
+ "pipe"
921
+ ]
922
+ }).trim();
923
+ } catch {
924
+ return;
925
+ }
926
+ }
927
+ function resolveLegacyOAuthSecretKeySeeds(env) {
928
+ const seeds = [];
929
+ const addSeed = (value) => {
930
+ const trimmed = value?.trim();
931
+ if (trimmed && !seeds.includes(trimmed)) seeds.push(trimmed);
932
+ };
933
+ addSeed(env[LEGACY_OAUTH_SECRET_KEY_ENV]);
934
+ if (env.NODE_ENV === "test" && env.VITEST === "true") addSeed("fengming-test-oauth-profile-secret-key");
935
+ addSeed(readLegacyOAuthSecretKeyFile(env));
936
+ return seeds;
937
+ }
938
+ function decryptLegacyOAuthSecretMaterialWithSeed(params, seed) {
939
+ try {
940
+ const decipher = createDecipheriv(LEGACY_OAUTH_SECRET_ALGORITHM, buildLegacyOAuthSecretKey(seed), Buffer.from(params.encrypted.iv, "base64url"));
941
+ decipher.setAAD(buildLegacyOAuthSecretAad({
942
+ ref: params.ref,
943
+ profileId: params.profileId,
944
+ provider: params.provider
945
+ }));
946
+ decipher.setAuthTag(Buffer.from(params.encrypted.tag, "base64url"));
947
+ const plaintext = Buffer.concat([decipher.update(Buffer.from(params.encrypted.ciphertext, "base64url")), decipher.final()]).toString("utf8");
948
+ return normalizeLegacyOAuthSecretMaterial(JSON.parse(plaintext));
949
+ } catch {
950
+ return null;
951
+ }
952
+ }
953
+ function decryptLegacyOAuthSecretMaterial(params) {
954
+ const seeds = resolveLegacyOAuthSecretKeySeeds(params.env);
955
+ for (const seed of seeds) {
956
+ const material = decryptLegacyOAuthSecretMaterialWithSeed(params, seed);
957
+ if (material) return material;
958
+ }
959
+ const keychainSeed = readLegacyMacOAuthSecretKeychainKey({
960
+ allowKeychainPrompt: params.allowKeychainPrompt,
961
+ env: params.env
962
+ });
963
+ if (keychainSeed && !seeds.includes(keychainSeed)) return decryptLegacyOAuthSecretMaterialWithSeed(params, keychainSeed);
964
+ if (process.platform === "darwin" && params.allowKeychainPrompt === false && params.env.VITEST !== "true" && params.env.VITEST_WORKER_ID === void 0) emitKeychainOnlyMigrationHintOnce(params.profileId);
965
+ return null;
966
+ }
967
+ let keychainOnlyMigrationHintEmitted = false;
968
+ function emitKeychainOnlyMigrationHintOnce(profileId) {
969
+ if (keychainOnlyMigrationHintEmitted) return;
970
+ keychainOnlyMigrationHintEmitted = true;
971
+ log$1.warn("Legacy Codex OAuth credentials are stored only in macOS Keychain on this host. Headless paths cannot prompt for Keychain access; run `fengming doctor --fix` from an interactive terminal to migrate them back to inline auth-profiles.json credentials.", { profileId });
972
+ }
973
+ function loadLegacyOAuthSidecarMaterial(params) {
974
+ const env = params.env ?? process.env;
975
+ const raw = loadJsonFile(resolveLegacyOAuthSidecarPath(params.ref, env));
976
+ if (!isRecord(raw)) return null;
977
+ if (raw.version !== LEGACY_OAUTH_SECRET_VERSION || raw.profileId !== params.profileId || raw.provider !== params.provider) return null;
978
+ const encrypted = coerceLegacyOAuthEncryptedPayload(raw.encrypted);
979
+ if (encrypted) return decryptLegacyOAuthSecretMaterial({
980
+ ref: params.ref,
981
+ profileId: params.profileId,
982
+ provider: params.provider,
983
+ encrypted,
984
+ env,
985
+ allowKeychainPrompt: params.allowKeychainPrompt
986
+ });
987
+ return normalizeLegacyOAuthSecretMaterial(raw);
988
+ }
989
+ const legacyOAuthSidecarTestUtils = {
990
+ buildLegacyOAuthSecretAad,
991
+ buildLegacyOAuthSecretKey,
992
+ encryptLegacyOAuthMaterial: encryptLegacyOAuthMaterialForTest
993
+ };
994
+ //#endregion
995
+ //#region src/agents/auth-profiles/state.ts
996
+ const AUTH_FAILURE_REASONS = new Set([
997
+ "auth",
998
+ "auth_permanent",
999
+ "format",
1000
+ "overloaded",
1001
+ "rate_limit",
1002
+ "billing",
1003
+ "timeout",
1004
+ "model_not_found",
1005
+ "session_expired",
1006
+ "empty_response",
1007
+ "no_error_details",
1008
+ "unclassified",
1009
+ "unknown"
1010
+ ]);
1011
+ const AUTH_BLOCKED_REASONS = new Set(["subscription_limit"]);
1012
+ const AUTH_BLOCKED_SOURCES = new Set(["codex_rate_limits", "wham"]);
1013
+ function normalizeFiniteNumber(value) {
1014
+ return asFiniteNumber(value);
1015
+ }
1016
+ function normalizeEnumValue(value, allowed) {
1017
+ if (typeof value !== "string") return;
1018
+ return allowed.has(value) ? value : void 0;
1019
+ }
1020
+ function normalizeFailureCounts(raw) {
1021
+ if (!isRecord(raw)) return;
1022
+ const normalized = {};
1023
+ for (const [reason, count] of Object.entries(raw)) {
1024
+ if (!AUTH_FAILURE_REASONS.has(reason)) continue;
1025
+ if (typeof count !== "number" || !Number.isFinite(count) || count <= 0) continue;
1026
+ normalized[reason] = Math.trunc(count);
1027
+ }
1028
+ return Object.keys(normalized).length > 0 ? normalized : void 0;
1029
+ }
1030
+ function normalizeAuthProfileOrder(raw) {
1031
+ if (!isRecord(raw)) return;
1032
+ const normalized = Object.entries(raw).reduce((acc, [provider, value]) => {
1033
+ if (!Array.isArray(value)) return acc;
1034
+ const providerKey = normalizeProviderId(provider);
1035
+ if (!providerKey) return acc;
1036
+ const list = normalizeTrimmedStringList(value);
1037
+ if (list.length > 0) acc[providerKey] = list;
1038
+ return acc;
1039
+ }, {});
1040
+ return Object.keys(normalized).length > 0 ? normalized : void 0;
1041
+ }
1042
+ function normalizeLastGood(raw) {
1043
+ if (!isRecord(raw)) return;
1044
+ const normalized = {};
1045
+ for (const [provider, profileId] of Object.entries(raw)) {
1046
+ const providerKey = normalizeProviderId(provider);
1047
+ const normalizedProfileId = normalizeOptionalString(profileId);
1048
+ if (!providerKey || !normalizedProfileId) continue;
1049
+ normalized[providerKey] = normalizedProfileId;
1050
+ }
1051
+ return Object.keys(normalized).length > 0 ? normalized : void 0;
1052
+ }
1053
+ function normalizeUsageStatsEntry(raw) {
1054
+ if (!isRecord(raw)) return;
1055
+ const stats = {
1056
+ lastUsed: normalizeFiniteNumber(raw.lastUsed),
1057
+ blockedUntil: normalizeFiniteNumber(raw.blockedUntil),
1058
+ blockedReason: normalizeEnumValue(raw.blockedReason, AUTH_BLOCKED_REASONS),
1059
+ blockedSource: normalizeEnumValue(raw.blockedSource, AUTH_BLOCKED_SOURCES),
1060
+ blockedModel: normalizeOptionalString(raw.blockedModel),
1061
+ cooldownUntil: normalizeFiniteNumber(raw.cooldownUntil),
1062
+ cooldownReason: normalizeEnumValue(raw.cooldownReason, AUTH_FAILURE_REASONS),
1063
+ cooldownModel: normalizeOptionalString(raw.cooldownModel),
1064
+ disabledUntil: normalizeFiniteNumber(raw.disabledUntil),
1065
+ disabledReason: normalizeEnumValue(raw.disabledReason, AUTH_FAILURE_REASONS),
1066
+ errorCount: normalizeFiniteNumber(raw.errorCount),
1067
+ failureCounts: normalizeFailureCounts(raw.failureCounts),
1068
+ lastFailureAt: normalizeFiniteNumber(raw.lastFailureAt)
1069
+ };
1070
+ for (const key of Object.keys(stats)) if (stats[key] === void 0) delete stats[key];
1071
+ return Object.keys(stats).length > 0 ? stats : void 0;
1072
+ }
1073
+ function normalizeUsageStats(raw) {
1074
+ if (!isRecord(raw)) return;
1075
+ const normalized = {};
1076
+ for (const [profileId, value] of Object.entries(raw)) {
1077
+ const normalizedProfileId = normalizeOptionalString(profileId);
1078
+ const stats = normalizeUsageStatsEntry(value);
1079
+ if (!normalizedProfileId || !stats) continue;
1080
+ normalized[normalizedProfileId] = stats;
1081
+ }
1082
+ return Object.keys(normalized).length > 0 ? normalized : void 0;
1083
+ }
1084
+ function coerceAuthProfileState(raw) {
1085
+ if (!isRecord(raw)) return {};
1086
+ return {
1087
+ order: normalizeAuthProfileOrder(raw.order),
1088
+ lastGood: normalizeLastGood(raw.lastGood),
1089
+ usageStats: normalizeUsageStats(raw.usageStats)
1090
+ };
1091
+ }
1092
+ function mergeAuthProfileState(base, override) {
1093
+ const mergeRecord = (left, right) => {
1094
+ if (!left && !right) return;
1095
+ if (!left) return { ...right };
1096
+ if (!right) return { ...left };
1097
+ return {
1098
+ ...left,
1099
+ ...right
1100
+ };
1101
+ };
1102
+ return {
1103
+ order: mergeRecord(base.order, override.order),
1104
+ lastGood: mergeRecord(base.lastGood, override.lastGood),
1105
+ usageStats: mergeRecord(base.usageStats, override.usageStats)
1106
+ };
1107
+ }
1108
+ function loadPersistedAuthProfileState(agentDir) {
1109
+ return coerceAuthProfileState(loadJsonFile(resolveAuthStatePath(agentDir)));
1110
+ }
1111
+ function buildPersistedAuthProfileState(store) {
1112
+ const state = coerceAuthProfileState(store);
1113
+ if (!state.order && !state.lastGood && !state.usageStats) return null;
1114
+ return {
1115
+ version: 1,
1116
+ ...state.order ? { order: state.order } : {},
1117
+ ...state.lastGood ? { lastGood: state.lastGood } : {},
1118
+ ...state.usageStats ? { usageStats: state.usageStats } : {}
1119
+ };
1120
+ }
1121
+ function savePersistedAuthProfileState(store, agentDir) {
1122
+ const payload = buildPersistedAuthProfileState(store);
1123
+ const statePath = resolveAuthStatePath(agentDir);
1124
+ if (!payload) {
1125
+ try {
1126
+ fs.unlinkSync(statePath);
1127
+ } catch (error) {
1128
+ if (error?.code !== "ENOENT") throw error;
1129
+ }
1130
+ return null;
1131
+ }
1132
+ saveJsonFile(statePath, payload);
1133
+ return payload;
1134
+ }
1135
+ //#endregion
1136
+ //#region src/agents/auth-profiles/persisted.ts
1137
+ const AUTH_PROFILE_TYPES = new Set([
1138
+ "api_key",
1139
+ "oauth",
1140
+ "token"
1141
+ ]);
1142
+ const LEGACY_OAUTH_REF_PROVIDER = "openai-codex";
1143
+ const runtimeLegacyOAuthSidecarCredentials = /* @__PURE__ */ new WeakSet();
1144
+ const runtimeLegacyOAuthSidecarMaterialFingerprints = /* @__PURE__ */ new Map();
1145
+ function normalizeOptionalCredentialString(value) {
1146
+ if (typeof value !== "string") return;
1147
+ return value.trim() ? value : void 0;
1148
+ }
1149
+ function hasInlineOAuthTokenMaterial(credential) {
1150
+ return [
1151
+ credential.access,
1152
+ credential.refresh,
1153
+ credential.idToken
1154
+ ].some((value) => typeof value === "string" && value.trim().length > 0);
1155
+ }
1156
+ function buildRuntimeLegacyOAuthSidecarFingerprintKey(params) {
1157
+ return `${params.storeKey ?? ""}\0${params.profileId}`;
1158
+ }
1159
+ function buildLegacyOAuthSecretMaterialFingerprint(material) {
1160
+ return createHash("sha256").update(JSON.stringify([
1161
+ material.access ?? null,
1162
+ material.refresh ?? null,
1163
+ material.idToken ?? null
1164
+ ])).digest("hex");
1165
+ }
1166
+ function normalizeExpiryField(value) {
1167
+ if (value === void 0) return;
1168
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
1169
+ }
1170
+ function normalizeCredentialMetadata(value) {
1171
+ if (!isRecord(value)) return;
1172
+ const metadata = {};
1173
+ for (const [key, entry] of Object.entries(value)) if (typeof entry === "string") metadata[key] = entry;
1174
+ return Object.keys(metadata).length > 0 ? metadata : void 0;
1175
+ }
1176
+ function normalizeSecretBackedField(params) {
1177
+ const value = params.entry[params.valueField];
1178
+ if (value == null || typeof value === "string") return;
1179
+ const ref = coerceSecretRef(value);
1180
+ if (ref && !coerceSecretRef(params.entry[params.refField])) params.entry[params.refField] = ref;
1181
+ delete params.entry[params.valueField];
1182
+ }
1183
+ function normalizeCommonCredentialFields(entry) {
1184
+ const normalized = { provider: typeof entry.provider === "string" ? normalizeProviderId(entry.provider) : "" };
1185
+ const copyToAgents = asBoolean(entry.copyToAgents);
1186
+ if (copyToAgents !== void 0) normalized.copyToAgents = copyToAgents;
1187
+ const email = normalizeOptionalCredentialString(entry.email);
1188
+ if (email !== void 0) normalized.email = email;
1189
+ const displayName = normalizeOptionalCredentialString(entry.displayName);
1190
+ if (displayName !== void 0) normalized.displayName = displayName;
1191
+ return normalized;
1192
+ }
1193
+ function normalizeRawCredentialEntry(raw) {
1194
+ const entry = { ...raw };
1195
+ if (!("type" in entry) && typeof entry["mode"] === "string") entry["type"] = entry["mode"];
1196
+ if (!("key" in entry) && typeof entry["apiKey"] === "string") entry["key"] = entry["apiKey"];
1197
+ normalizeSecretBackedField({
1198
+ entry,
1199
+ valueField: "key",
1200
+ refField: "keyRef"
1201
+ });
1202
+ normalizeSecretBackedField({
1203
+ entry,
1204
+ valueField: "token",
1205
+ refField: "tokenRef"
1206
+ });
1207
+ if (entry.type === "api_key") {
1208
+ const normalized = {
1209
+ type: "api_key",
1210
+ ...normalizeCommonCredentialFields(entry)
1211
+ };
1212
+ const key = normalizeOptionalCredentialString(entry.key);
1213
+ const keyRef = coerceSecretRef(entry.keyRef);
1214
+ const metadata = normalizeCredentialMetadata(entry.metadata);
1215
+ if (key !== void 0) normalized.key = key;
1216
+ if (keyRef) normalized.keyRef = keyRef;
1217
+ if (metadata) normalized.metadata = metadata;
1218
+ return normalized;
1219
+ }
1220
+ if (entry.type === "token") {
1221
+ const normalized = {
1222
+ type: "token",
1223
+ ...normalizeCommonCredentialFields(entry)
1224
+ };
1225
+ const token = normalizeOptionalCredentialString(entry.token);
1226
+ const tokenRef = coerceSecretRef(entry.tokenRef);
1227
+ const expires = normalizeExpiryField(entry.expires);
1228
+ if (token !== void 0) normalized.token = token;
1229
+ if (tokenRef) normalized.tokenRef = tokenRef;
1230
+ if (expires !== void 0) normalized.expires = expires;
1231
+ return normalized;
1232
+ }
1233
+ if (entry.type === "oauth") {
1234
+ const normalized = {
1235
+ type: "oauth",
1236
+ ...normalizeCommonCredentialFields(entry)
1237
+ };
1238
+ for (const field of [
1239
+ "access",
1240
+ "refresh",
1241
+ "idToken",
1242
+ "clientId",
1243
+ "enterpriseUrl",
1244
+ "projectId",
1245
+ "accountId",
1246
+ "chatgptPlanType"
1247
+ ]) {
1248
+ const value = normalizeOptionalCredentialString(entry[field]);
1249
+ if (value !== void 0) normalized[field] = value;
1250
+ }
1251
+ const expires = normalizeExpiryField(entry.expires);
1252
+ if (expires !== void 0) normalized.expires = expires;
1253
+ return normalized;
1254
+ }
1255
+ return entry;
1256
+ }
1257
+ function parseCredentialEntry(raw, fallbackProvider) {
1258
+ if (!isRecord(raw)) return {
1259
+ ok: false,
1260
+ reason: "non_object"
1261
+ };
1262
+ const typed = normalizeRawCredentialEntry(raw);
1263
+ if (!AUTH_PROFILE_TYPES.has(typed.type)) return {
1264
+ ok: false,
1265
+ reason: "invalid_type"
1266
+ };
1267
+ const provider = typed.provider ?? fallbackProvider;
1268
+ const normalizedProvider = typeof provider === "string" ? normalizeProviderId(provider) : "";
1269
+ if (!normalizedProvider) return {
1270
+ ok: false,
1271
+ reason: "missing_provider"
1272
+ };
1273
+ return {
1274
+ ok: true,
1275
+ credential: {
1276
+ ...typed,
1277
+ provider: normalizedProvider
1278
+ }
1279
+ };
1280
+ }
1281
+ function warnRejectedCredentialEntries(source, rejected) {
1282
+ if (rejected.length === 0) return;
1283
+ const reasons = rejected.reduce((acc, current) => {
1284
+ acc[current.reason] = (acc[current.reason] ?? 0) + 1;
1285
+ return acc;
1286
+ }, {});
1287
+ log$1.warn("ignored invalid auth profile entries during store load", {
1288
+ source,
1289
+ dropped: rejected.length,
1290
+ reasons,
1291
+ ...reasons.invalid_type ? { validTypes: [...AUTH_PROFILE_TYPES] } : {},
1292
+ keys: rejected.slice(0, 10).map((entry) => entry.key)
1293
+ });
1294
+ }
1295
+ function resolveLegacyOAuthSidecarCredential(params) {
1296
+ if (params.credential.type !== "oauth" || normalizeProviderId(params.credential.provider) !== LEGACY_OAUTH_REF_PROVIDER || hasInlineOAuthTokenMaterial(params.credential) || !isRecord(params.raw) || !isLegacyOAuthRef(params.raw.oauthRef)) return params.credential;
1297
+ const material = loadLegacyOAuthSidecarMaterial({
1298
+ ref: params.raw.oauthRef,
1299
+ profileId: params.profileId,
1300
+ provider: params.credential.provider,
1301
+ allowKeychainPrompt: params.options?.allowKeychainPrompt
1302
+ });
1303
+ if (!material) return params.credential;
1304
+ const credential = {
1305
+ ...params.credential,
1306
+ ...material.access ? { access: material.access } : {},
1307
+ ...material.refresh ? { refresh: material.refresh } : {},
1308
+ ...material.idToken ? { idToken: material.idToken } : {}
1309
+ };
1310
+ runtimeLegacyOAuthSidecarCredentials.add(credential);
1311
+ runtimeLegacyOAuthSidecarMaterialFingerprints.set(buildRuntimeLegacyOAuthSidecarFingerprintKey({
1312
+ storeKey: params.storeKey,
1313
+ profileId: params.profileId
1314
+ }), buildLegacyOAuthSecretMaterialFingerprint(credential));
1315
+ return credential;
1316
+ }
1317
+ function isRuntimeLegacyOAuthSidecarCredential(credential) {
1318
+ return credential?.type === "oauth" && runtimeLegacyOAuthSidecarCredentials.has(credential);
1319
+ }
1320
+ function matchesRuntimeLegacyOAuthSidecarMaterial(params) {
1321
+ if (params.credential?.type !== "oauth") return false;
1322
+ if (runtimeLegacyOAuthSidecarCredentials.has(params.credential)) return true;
1323
+ const fingerprint = runtimeLegacyOAuthSidecarMaterialFingerprints.get(buildRuntimeLegacyOAuthSidecarFingerprintKey({
1324
+ storeKey: params.authPath,
1325
+ profileId: params.profileId
1326
+ }));
1327
+ return fingerprint !== void 0 && fingerprint === buildLegacyOAuthSecretMaterialFingerprint(params.credential);
1328
+ }
1329
+ function coerceLegacyAuthStore(raw) {
1330
+ if (!isRecord(raw)) return null;
1331
+ const record = raw;
1332
+ if ("profiles" in record) return null;
1333
+ const entries = {};
1334
+ const rejected = [];
1335
+ for (const [key, value] of Object.entries(record)) {
1336
+ const parsed = parseCredentialEntry(value, key);
1337
+ if (!parsed.ok) {
1338
+ rejected.push({
1339
+ key,
1340
+ reason: parsed.reason
1341
+ });
1342
+ continue;
1343
+ }
1344
+ entries[key] = parsed.credential;
1345
+ }
1346
+ warnRejectedCredentialEntries("auth.json", rejected);
1347
+ return Object.keys(entries).length > 0 ? entries : null;
1348
+ }
1349
+ function coercePersistedAuthProfileStore(raw, options, storeKey) {
1350
+ if (!isRecord(raw)) return null;
1351
+ const record = raw;
1352
+ if (!isRecord(record.profiles)) return null;
1353
+ const profiles = record.profiles;
1354
+ const normalized = {};
1355
+ const rejected = [];
1356
+ for (const [key, value] of Object.entries(profiles)) {
1357
+ const parsed = parseCredentialEntry(value);
1358
+ if (!parsed.ok) {
1359
+ rejected.push({
1360
+ key,
1361
+ reason: parsed.reason
1362
+ });
1363
+ continue;
1364
+ }
1365
+ normalized[key] = options?.resolveLegacyOAuthSidecars === true ? resolveLegacyOAuthSidecarCredential({
1366
+ profileId: key,
1367
+ raw: value,
1368
+ credential: parsed.credential,
1369
+ storeKey,
1370
+ options
1371
+ }) : parsed.credential;
1372
+ }
1373
+ warnRejectedCredentialEntries("auth-profiles.json", rejected);
1374
+ const version = Number(record.version ?? 1);
1375
+ return {
1376
+ version: Number.isFinite(version) && version > 0 ? version : 1,
1377
+ profiles: normalized,
1378
+ ...coerceAuthProfileState(record)
1379
+ };
1380
+ }
1381
+ function mergeRecord(base, override) {
1382
+ if (!base && !override) return;
1383
+ if (!base) return { ...override };
1384
+ if (!override) return { ...base };
1385
+ return {
1386
+ ...base,
1387
+ ...override
1388
+ };
1389
+ }
1390
+ function dedupeMergedProfileOrder(profileIds) {
1391
+ return uniqueStrings(profileIds);
1392
+ }
1393
+ function hasComparableOAuthIdentityConflict(existing, candidate) {
1394
+ const existingAccountId = normalizeAuthIdentityToken$1(existing.accountId);
1395
+ const candidateAccountId = normalizeAuthIdentityToken$1(candidate.accountId);
1396
+ if (existingAccountId !== void 0 && candidateAccountId !== void 0 && existingAccountId !== candidateAccountId) return true;
1397
+ const existingEmail = normalizeAuthEmailToken$1(existing.email);
1398
+ const candidateEmail = normalizeAuthEmailToken$1(candidate.email);
1399
+ return existingEmail !== void 0 && candidateEmail !== void 0 && existingEmail !== candidateEmail;
1400
+ }
1401
+ function isLegacyDefaultOAuthProfile(profileId, credential) {
1402
+ return profileId === `${normalizeProviderId(credential.provider)}:default`;
1403
+ }
1404
+ function isNewerUsableOAuthCredential(existing, candidate) {
1405
+ if (!hasUsableOAuthCredential(candidate)) return false;
1406
+ if (!hasUsableOAuthCredential(existing)) return true;
1407
+ return Number.isFinite(candidate.expires) && (!Number.isFinite(existing.expires) || candidate.expires > existing.expires);
1408
+ }
1409
+ const AUTH_INVALIDATION_REASONS = new Set([
1410
+ "auth",
1411
+ "auth_permanent",
1412
+ "session_expired"
1413
+ ]);
1414
+ function hasAuthInvalidationSignal(stats) {
1415
+ if (!stats) return false;
1416
+ if (stats.cooldownReason && AUTH_INVALIDATION_REASONS.has(stats.cooldownReason) || stats.disabledReason && AUTH_INVALIDATION_REASONS.has(stats.disabledReason)) return true;
1417
+ return Object.entries(stats.failureCounts ?? {}).some(([reason, count]) => AUTH_INVALIDATION_REASONS.has(reason) && typeof count === "number" && count > 0);
1418
+ }
1419
+ function isProfileReferencedByAuthState(store, profileId) {
1420
+ if (Object.values(store.order ?? {}).some((profileIds) => profileIds.includes(profileId))) return true;
1421
+ return Object.values(store.lastGood ?? {}).some((value) => value === profileId);
1422
+ }
1423
+ function resolveProviderAuthStateValue(values, providerKey) {
1424
+ if (!values) return;
1425
+ for (const [key, value] of Object.entries(values)) if (normalizeProviderId(key) === providerKey) return value;
1426
+ }
1427
+ function findMainStoreOAuthReplacementForInvalidatedProfile(params) {
1428
+ const providerKey = normalizeProviderId(params.credential.provider);
1429
+ if (providerKey !== "openai-codex" || !isProfileReferencedByAuthState(params.override, params.profileId) || !hasAuthInvalidationSignal(params.override.usageStats?.[params.profileId])) return;
1430
+ const candidates = Object.entries(params.base.profiles).flatMap(([profileId, credential]) => {
1431
+ if (profileId === params.profileId || credential.type !== "oauth" || normalizeProviderId(credential.provider) !== providerKey || !hasUsableOAuthCredential(credential)) return [];
1432
+ return [[profileId, credential]];
1433
+ }).toSorted(([leftId, leftCredential], [rightId, rightCredential]) => {
1434
+ const leftExpires = Number.isFinite(leftCredential.expires) ? leftCredential.expires : 0;
1435
+ const rightExpires = Number.isFinite(rightCredential.expires) ? rightCredential.expires : 0;
1436
+ if (rightExpires !== leftExpires) return rightExpires - leftExpires;
1437
+ return leftId.localeCompare(rightId);
1438
+ });
1439
+ if (candidates.length === 0) return;
1440
+ const candidateIds = new Set(candidates.map(([profileId]) => profileId));
1441
+ const orderedProfileId = resolveProviderAuthStateValue(params.base.order, providerKey)?.find((profileId) => candidateIds.has(profileId));
1442
+ if (orderedProfileId) return orderedProfileId;
1443
+ const lastGoodProfileId = resolveProviderAuthStateValue(params.base.lastGood, providerKey);
1444
+ if (lastGoodProfileId && candidateIds.has(lastGoodProfileId)) return lastGoodProfileId;
1445
+ return candidates.length === 1 ? candidates[0]?.[0] : void 0;
1446
+ }
1447
+ function findMainStoreOAuthReplacement(params) {
1448
+ const providerKey = normalizeProviderId(params.legacyCredential.provider);
1449
+ const candidates = Object.entries(params.base.profiles).flatMap(([profileId, credential]) => {
1450
+ if (profileId === params.legacyProfileId || credential.type !== "oauth" || normalizeProviderId(credential.provider) !== providerKey) return [];
1451
+ return [[profileId, credential]];
1452
+ }).filter(([, credential]) => isNewerUsableOAuthCredential(params.legacyCredential, credential)).toSorted(([leftId, leftCredential], [rightId, rightCredential]) => {
1453
+ const leftExpires = Number.isFinite(leftCredential.expires) ? leftCredential.expires : 0;
1454
+ const rightExpires = Number.isFinite(rightCredential.expires) ? rightCredential.expires : 0;
1455
+ if (rightExpires !== leftExpires) return rightExpires - leftExpires;
1456
+ return leftId.localeCompare(rightId);
1457
+ });
1458
+ const exactIdentityCandidates = candidates.filter(([, credential]) => isSafeToAdoptMainStoreOAuthIdentity(params.legacyCredential, credential));
1459
+ if (exactIdentityCandidates.length > 0) {
1460
+ if (!hasOAuthIdentity(params.legacyCredential) && exactIdentityCandidates.length > 1) return;
1461
+ return exactIdentityCandidates[0]?.[0];
1462
+ }
1463
+ if (hasUsableOAuthCredential(params.legacyCredential)) return;
1464
+ const fallbackCandidates = candidates.filter(([, credential]) => !hasComparableOAuthIdentityConflict(params.legacyCredential, credential));
1465
+ if (fallbackCandidates.length !== 1) return;
1466
+ return fallbackCandidates[0]?.[0];
1467
+ }
1468
+ function replaceMergedProfileReferences(params) {
1469
+ const { store, base, replacements } = params;
1470
+ if (replacements.size === 0) return store;
1471
+ const profiles = { ...store.profiles };
1472
+ for (const [legacyProfileId, replacementProfileId] of replacements) {
1473
+ const baseCredential = base.profiles[legacyProfileId];
1474
+ if (baseCredential) profiles[legacyProfileId] = baseCredential;
1475
+ else delete profiles[legacyProfileId];
1476
+ const replacementBaseCredential = base.profiles[replacementProfileId];
1477
+ const replacementCredential = profiles[replacementProfileId];
1478
+ if (replacementBaseCredential && (!replacementCredential || replacementCredential.type === "oauth" && replacementBaseCredential.type === "oauth" && isNewerUsableOAuthCredential(replacementCredential, replacementBaseCredential))) profiles[replacementProfileId] = replacementBaseCredential;
1479
+ }
1480
+ const order = store.order ? Object.fromEntries(Object.entries(store.order).map(([provider, profileIds]) => [provider, dedupeMergedProfileOrder(profileIds.map((profileId) => replacements.get(profileId) ?? profileId))])) : void 0;
1481
+ const lastGood = store.lastGood ? Object.fromEntries(Object.entries(store.lastGood).map(([provider, profileId]) => [provider, replacements.get(profileId) ?? profileId])) : void 0;
1482
+ const usageStats = store.usageStats ? { ...store.usageStats } : void 0;
1483
+ if (usageStats) for (const legacyProfileId of replacements.keys()) {
1484
+ const baseStats = base.usageStats?.[legacyProfileId];
1485
+ if (baseStats) usageStats[legacyProfileId] = baseStats;
1486
+ else delete usageStats[legacyProfileId];
1487
+ }
1488
+ return {
1489
+ ...store,
1490
+ profiles,
1491
+ ...order && Object.keys(order).length > 0 ? { order } : { order: void 0 },
1492
+ ...lastGood && Object.keys(lastGood).length > 0 ? { lastGood } : { lastGood: void 0 },
1493
+ ...usageStats && Object.keys(usageStats).length > 0 ? { usageStats } : { usageStats: void 0 }
1494
+ };
1495
+ }
1496
+ function reconcileMainStoreOAuthProfileDrift(params) {
1497
+ const replacements = /* @__PURE__ */ new Map();
1498
+ for (const [profileId, credential] of Object.entries(params.override.profiles)) {
1499
+ if (credential.type !== "oauth") continue;
1500
+ const replacementProfileId = isLegacyDefaultOAuthProfile(profileId, credential) ? findMainStoreOAuthReplacement({
1501
+ base: params.base,
1502
+ legacyProfileId: profileId,
1503
+ legacyCredential: credential
1504
+ }) : findMainStoreOAuthReplacementForInvalidatedProfile({
1505
+ base: params.base,
1506
+ override: params.override,
1507
+ profileId,
1508
+ credential
1509
+ });
1510
+ if (replacementProfileId) replacements.set(profileId, replacementProfileId);
1511
+ }
1512
+ return replaceMergedProfileReferences({
1513
+ store: params.merged,
1514
+ base: params.base,
1515
+ replacements
1516
+ });
1517
+ }
1518
+ function mergeAuthProfileStores(base, override, options) {
1519
+ if (Object.keys(override.profiles).length === 0 && !override.order && !override.lastGood && !override.usageStats && override.runtimeExternalProfileIds === void 0 && override.runtimeExternalProfileIdsAuthoritative !== true) return base;
1520
+ const overrideProfileIds = new Set(Object.keys(override.profiles));
1521
+ const overrideRuntimeExternalProfileIds = new Set(override.runtimeExternalProfileIds ?? []);
1522
+ const removedRuntimeExternalProfileIds = new Set(override.runtimeExternalProfileIdsAuthoritative === true && options?.preserveBaseRuntimeExternalProfiles !== true ? (base.runtimeExternalProfileIds ?? []).filter((profileId) => !overrideRuntimeExternalProfileIds.has(profileId) && !overrideProfileIds.has(profileId)) : []);
1523
+ const profiles = {
1524
+ ...base.profiles,
1525
+ ...override.profiles
1526
+ };
1527
+ for (const profileId of removedRuntimeExternalProfileIds) delete profiles[profileId];
1528
+ const mergedOrder = mergeRecord(base.order, override.order);
1529
+ const order = mergedOrder ? Object.fromEntries(Object.entries(mergedOrder).map(([provider, profileIds]) => [provider, profileIds.filter((profileId) => profiles[profileId])]).filter(([, profileIds]) => profileIds.length > 0)) : void 0;
1530
+ const mergedLastGood = mergeRecord(base.lastGood, override.lastGood);
1531
+ const lastGood = mergedLastGood ? Object.fromEntries(Object.entries(mergedLastGood).filter(([, profileId]) => profiles[profileId])) : void 0;
1532
+ const mergedUsageStats = mergeRecord(base.usageStats, override.usageStats);
1533
+ const usageStats = mergedUsageStats ? Object.fromEntries(Object.entries(mergedUsageStats).filter(([profileId]) => profiles[profileId])) : void 0;
1534
+ const merged = {
1535
+ version: Math.max(base.version, override.version ?? base.version),
1536
+ profiles,
1537
+ order,
1538
+ lastGood,
1539
+ usageStats
1540
+ };
1541
+ const runtimeExternalProfileIds = [...override.runtimeExternalProfileIdsAuthoritative === true && options?.preserveBaseRuntimeExternalProfiles !== true ? [] : (base.runtimeExternalProfileIds ?? []).filter((profileId) => !overrideProfileIds.has(profileId)), ...override.runtimeExternalProfileIds ?? []].filter((profileId) => merged.profiles[profileId]).toSorted();
1542
+ const runtimeExternalProfileIdsAuthoritative = base.runtimeExternalProfileIdsAuthoritative === true || override.runtimeExternalProfileIdsAuthoritative === true;
1543
+ const runtimeExternalProfileMetadata = runtimeExternalProfileIds.length > 0 || runtimeExternalProfileIdsAuthoritative ? {
1544
+ runtimeExternalProfileIds: [...new Set(runtimeExternalProfileIds)],
1545
+ ...runtimeExternalProfileIdsAuthoritative ? { runtimeExternalProfileIdsAuthoritative: true } : {}
1546
+ } : {};
1547
+ return reconcileMainStoreOAuthProfileDrift({
1548
+ base,
1549
+ override,
1550
+ merged: {
1551
+ ...merged,
1552
+ ...runtimeExternalProfileMetadata
1553
+ }
1554
+ });
1555
+ }
1556
+ function buildPersistedAuthProfileSecretsStore(store, shouldPersistProfile, options) {
1557
+ return preserveLegacyOAuthRefsForDoctorMigration({
1558
+ version: 1,
1559
+ profiles: Object.fromEntries(Object.entries(store.profiles).flatMap(([profileId, credential]) => {
1560
+ if (shouldPersistProfile && !shouldPersistProfile({
1561
+ profileId,
1562
+ credential
1563
+ })) return [];
1564
+ if (credential.type === "api_key" && credential.keyRef && credential.key !== void 0) {
1565
+ const sanitized = { ...credential };
1566
+ delete sanitized.key;
1567
+ return [[profileId, sanitized]];
1568
+ }
1569
+ if (credential.type === "token" && credential.tokenRef && credential.token !== void 0) {
1570
+ const sanitized = { ...credential };
1571
+ delete sanitized.token;
1572
+ return [[profileId, sanitized]];
1573
+ }
1574
+ return [[profileId, credential]];
1575
+ }))
1576
+ }, options);
1577
+ }
1578
+ function preserveLegacyOAuthRefsForDoctorMigration(payload, options) {
1579
+ const existingRaw = options?.existingRaw;
1580
+ if (!isRecord(existingRaw) || !isRecord(existingRaw.profiles)) return payload;
1581
+ let profiles;
1582
+ for (const [profileId, rawProfile] of Object.entries(existingRaw.profiles)) {
1583
+ if (!isRecord(rawProfile) || !isLegacyOAuthRef(rawProfile.oauthRef)) continue;
1584
+ const credential = payload.profiles[profileId];
1585
+ if (credential?.type !== "oauth" || normalizeProviderId(credential.provider) !== LEGACY_OAUTH_REF_PROVIDER) continue;
1586
+ if (hasInlineOAuthTokenMaterial(credential)) {
1587
+ if (!(options?.runtimeLegacyOAuthSidecarProfileIds?.has(profileId) === true) && !isUnchangedLegacyOAuthSidecarMaterial({
1588
+ profileId,
1589
+ rawProfile,
1590
+ credential
1591
+ })) continue;
1592
+ }
1593
+ profiles ??= { ...payload.profiles };
1594
+ const sanitized = { ...credential };
1595
+ delete sanitized.access;
1596
+ delete sanitized.refresh;
1597
+ delete sanitized.idToken;
1598
+ profiles[profileId] = {
1599
+ ...sanitized,
1600
+ oauthRef: rawProfile.oauthRef
1601
+ };
1602
+ }
1603
+ return profiles ? {
1604
+ ...payload,
1605
+ profiles
1606
+ } : payload;
1607
+ }
1608
+ function isUnchangedLegacyOAuthSidecarMaterial(params) {
1609
+ if (!isLegacyOAuthRef(params.rawProfile.oauthRef)) return false;
1610
+ const material = loadLegacyOAuthSidecarMaterial({
1611
+ ref: params.rawProfile.oauthRef,
1612
+ profileId: params.profileId,
1613
+ provider: params.credential.provider,
1614
+ allowKeychainPrompt: false
1615
+ });
1616
+ if (!material) return false;
1617
+ return isSameLegacyOAuthSecretMaterial(params.credential, material);
1618
+ }
1619
+ function isSameLegacyOAuthSecretMaterial(credential, material) {
1620
+ return [
1621
+ "access",
1622
+ "refresh",
1623
+ "idToken"
1624
+ ].every((field) => (credential[field] ?? void 0) === (material[field] ?? void 0));
1625
+ }
1626
+ function applyLegacyAuthStore(store, legacy) {
1627
+ for (const [provider, cred] of Object.entries(legacy)) {
1628
+ const profileId = `${provider}:default`;
1629
+ const credentialProvider = cred.provider ?? provider;
1630
+ if (cred.type === "api_key") {
1631
+ store.profiles[profileId] = {
1632
+ type: "api_key",
1633
+ provider: credentialProvider,
1634
+ key: cred.key,
1635
+ ...cred.email ? { email: cred.email } : {}
1636
+ };
1637
+ continue;
1638
+ }
1639
+ if (cred.type === "token") {
1640
+ store.profiles[profileId] = {
1641
+ type: "token",
1642
+ provider: credentialProvider,
1643
+ token: cred.token,
1644
+ ...typeof cred.expires === "number" ? { expires: cred.expires } : {},
1645
+ ...cred.email ? { email: cred.email } : {}
1646
+ };
1647
+ continue;
1648
+ }
1649
+ store.profiles[profileId] = {
1650
+ type: "oauth",
1651
+ provider: credentialProvider,
1652
+ access: cred.access,
1653
+ refresh: cred.refresh,
1654
+ expires: cred.expires,
1655
+ ...cred.enterpriseUrl ? { enterpriseUrl: cred.enterpriseUrl } : {},
1656
+ ...cred.projectId ? { projectId: cred.projectId } : {},
1657
+ ...cred.accountId ? { accountId: cred.accountId } : {},
1658
+ ...cred.email ? { email: cred.email } : {}
1659
+ };
1660
+ }
1661
+ }
1662
+ function mergeOAuthFileIntoStore(store) {
1663
+ const oauthRaw = loadJsonFile(resolveOAuthPath());
1664
+ if (!oauthRaw || typeof oauthRaw !== "object") return false;
1665
+ const oauthEntries = oauthRaw;
1666
+ let mutated = false;
1667
+ for (const [provider, creds] of Object.entries(oauthEntries)) {
1668
+ if (!creds || typeof creds !== "object") continue;
1669
+ const profileId = `${provider}:default`;
1670
+ if (store.profiles[profileId]) continue;
1671
+ store.profiles[profileId] = {
1672
+ type: "oauth",
1673
+ provider,
1674
+ ...creds
1675
+ };
1676
+ mutated = true;
1677
+ }
1678
+ return mutated;
1679
+ }
1680
+ function loadPersistedAuthProfileStore(agentDir, options) {
1681
+ const authPath = resolveAuthStorePath(agentDir);
1682
+ const raw = loadJsonFile(authPath);
1683
+ const store = coercePersistedAuthProfileStore(raw, options, authPath);
1684
+ if (!store) return null;
1685
+ return {
1686
+ ...store,
1687
+ ...mergeAuthProfileState(coerceAuthProfileState(raw), loadPersistedAuthProfileState(agentDir))
1688
+ };
1689
+ }
1690
+ function loadLegacyAuthProfileStore(agentDir) {
1691
+ return coerceLegacyAuthStore(loadJsonFile(resolveLegacyAuthStorePath(agentDir)));
1692
+ }
1693
+ //#endregion
1694
+ //#region src/agents/auth-profiles/store.ts
1695
+ function resolvePersistedLoadOptions(options) {
1696
+ return {
1697
+ resolveLegacyOAuthSidecars: options?.resolveLegacyOAuthSidecars ?? true,
1698
+ ...options?.allowKeychainPrompt !== void 0 ? { allowKeychainPrompt: options.allowKeychainPrompt } : {}
1699
+ };
1700
+ }
1701
+ function isInheritedMainOAuthCredential(params) {
1702
+ if (!params.agentDir || params.credential.type !== "oauth") return false;
1703
+ if (resolveAuthStorePath(params.agentDir) === resolveAuthStorePath()) return false;
1704
+ if (loadPersistedAuthProfileStore(params.agentDir)?.profiles[params.profileId]) return false;
1705
+ const mainCredential = loadPersistedAuthProfileStore()?.profiles[params.profileId];
1706
+ return mainCredential?.type === "oauth" && (isDeepStrictEqual(mainCredential, params.credential) || shouldUseMainOwnerForLocalOAuthCredential({
1707
+ local: params.credential,
1708
+ main: mainCredential
1709
+ }));
1710
+ }
1711
+ function shouldUseMainOwnerForLocalOAuthCredential(params) {
1712
+ if (params.local.type !== "oauth" || params.main?.type !== "oauth") return false;
1713
+ if (!isSafeToAdoptMainStoreOAuthIdentity(params.local, params.main)) return false;
1714
+ if (isDeepStrictEqual(params.local, params.main)) return true;
1715
+ return Number.isFinite(params.main.expires) && (!Number.isFinite(params.local.expires) || params.main.expires >= params.local.expires);
1716
+ }
1717
+ function resolveRuntimeAuthProfileStore(agentDir, options) {
1718
+ const mainKey = resolveAuthStorePath(void 0);
1719
+ const requestedKey = resolveAuthStorePath(agentDir);
1720
+ const mainStore = getRuntimeAuthProfileStoreSnapshot$1(void 0);
1721
+ const requestedStore = getRuntimeAuthProfileStoreSnapshot$1(agentDir);
1722
+ if (!agentDir || requestedKey === mainKey) {
1723
+ if (!mainStore) return null;
1724
+ return mainStore;
1725
+ }
1726
+ if (mainStore && requestedStore) return mergeAuthProfileStores(mainStore, requestedStore, { preserveBaseRuntimeExternalProfiles: true });
1727
+ if (requestedStore) return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, {
1728
+ readOnly: true,
1729
+ syncExternalCli: false,
1730
+ ...resolvePersistedLoadOptions(options)
1731
+ }), requestedStore, { preserveBaseRuntimeExternalProfiles: true });
1732
+ if (mainStore) return mainStore;
1733
+ return null;
1734
+ }
1735
+ function readAuthStoreMtimeMs(authPath) {
1736
+ try {
1737
+ return fs.statSync(authPath).mtimeMs;
1738
+ } catch {
1739
+ return null;
1740
+ }
1741
+ }
1742
+ function readSyncLockSnapshot(lockPath) {
1743
+ try {
1744
+ const stat = fs.lstatSync(lockPath);
1745
+ const raw = fs.readFileSync(lockPath, "utf8");
1746
+ let payload = null;
1747
+ try {
1748
+ const parsed = JSON.parse(raw);
1749
+ payload = parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
1750
+ } catch {
1751
+ payload = null;
1752
+ }
1753
+ return {
1754
+ raw,
1755
+ stat,
1756
+ payload
1757
+ };
1758
+ } catch {
1759
+ return null;
1760
+ }
1761
+ }
1762
+ function syncLockSnapshotMatches(lockPath, snapshot) {
1763
+ try {
1764
+ const stat = fs.lstatSync(lockPath);
1765
+ return stat.dev === snapshot.stat.dev && stat.ino === snapshot.stat.ino && fs.readFileSync(lockPath, "utf8") === snapshot.raw;
1766
+ } catch {
1767
+ return false;
1768
+ }
1769
+ }
1770
+ function acquireAuthStoreLockSync(authPath) {
1771
+ const lockPath = `${authPath}.lock`;
1772
+ fs.mkdirSync(path.dirname(authPath), { recursive: true });
1773
+ try {
1774
+ const fd = fs.openSync(lockPath, "wx");
1775
+ const raw = `${JSON.stringify({
1776
+ pid: process.pid,
1777
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
1778
+ }, null, 2)}\n`;
1779
+ try {
1780
+ fs.writeFileSync(fd, raw, "utf8");
1781
+ } finally {
1782
+ fs.closeSync(fd);
1783
+ }
1784
+ const snapshot = readSyncLockSnapshot(lockPath);
1785
+ return () => {
1786
+ if (snapshot && syncLockSnapshotMatches(lockPath, snapshot)) fs.rmSync(lockPath, { force: true });
1787
+ };
1788
+ } catch (err) {
1789
+ if (err?.code === "EEXIST") return null;
1790
+ throw err;
1791
+ }
1792
+ }
1793
+ function resolveExternalCliOverlayOptions(options) {
1794
+ const discovery = options?.externalCli;
1795
+ if (!discovery) return {
1796
+ ...options?.allowKeychainPrompt !== void 0 ? { allowKeychainPrompt: options.allowKeychainPrompt } : {},
1797
+ ...options?.config ? { config: options.config } : {},
1798
+ ...options?.externalCliProviderIds ? { externalCliProviderIds: options.externalCliProviderIds } : {},
1799
+ ...options?.externalCliProfileIds ? { externalCliProfileIds: options.externalCliProfileIds } : {}
1800
+ };
1801
+ if (discovery.mode === "none") {
1802
+ const config = discovery.config ?? options?.config;
1803
+ return {
1804
+ allowKeychainPrompt: false,
1805
+ ...config ? { config } : {},
1806
+ externalCliProviderIds: [],
1807
+ externalCliProfileIds: []
1808
+ };
1809
+ }
1810
+ if (discovery.mode === "existing") {
1811
+ const allowKeychainPrompt = discovery.allowKeychainPrompt ?? options?.allowKeychainPrompt;
1812
+ const config = discovery.config ?? options?.config;
1813
+ return {
1814
+ ...allowKeychainPrompt !== void 0 ? { allowKeychainPrompt } : {},
1815
+ ...config ? { config } : {}
1816
+ };
1817
+ }
1818
+ const allowKeychainPrompt = discovery.allowKeychainPrompt ?? options?.allowKeychainPrompt;
1819
+ const config = discovery.config ?? options?.config;
1820
+ return {
1821
+ ...allowKeychainPrompt !== void 0 ? { allowKeychainPrompt } : {},
1822
+ ...config ? { config } : {},
1823
+ ...discovery.providerIds ? { externalCliProviderIds: discovery.providerIds } : {},
1824
+ ...discovery.profileIds ? { externalCliProfileIds: discovery.profileIds } : {}
1825
+ };
1826
+ }
1827
+ function hasScopedExternalCliOverlay(options) {
1828
+ return options.externalCliProviderIds !== void 0 || options.externalCliProfileIds !== void 0;
1829
+ }
1830
+ function maybeSyncPersistedExternalCliAuthProfiles(params) {
1831
+ if (params.options?.readOnly === true || params.options?.syncExternalCli === false || process.env.FENGMING_AUTH_STORE_READONLY === "1") return {
1832
+ store: params.store,
1833
+ cacheable: true
1834
+ };
1835
+ const synced = syncPersistedExternalCliAuthProfiles(params.store, {
1836
+ agentDir: params.agentDir,
1837
+ ...resolveExternalCliOverlayOptions(params.options)
1838
+ });
1839
+ if (synced === params.store) return {
1840
+ store: params.store,
1841
+ cacheable: true
1842
+ };
1843
+ const changedProfiles = Object.entries(synced.profiles).filter(([profileId, credential]) => {
1844
+ const previous = params.store.profiles[profileId];
1845
+ return !isDeepStrictEqual(previous, credential);
1846
+ });
1847
+ if (changedProfiles.length === 0) return {
1848
+ store: synced,
1849
+ cacheable: true
1850
+ };
1851
+ const authPath = resolveAuthStorePath(params.agentDir);
1852
+ const release = acquireAuthStoreLockSync(authPath);
1853
+ if (!release) {
1854
+ log$1.warn("skipped persisted external cli auth sync because auth store is locked", { authPath });
1855
+ return {
1856
+ store: params.store,
1857
+ cacheable: false
1858
+ };
1859
+ }
1860
+ try {
1861
+ const latestStore = loadPersistedAuthProfileStore(params.agentDir, resolvePersistedLoadOptions(params.options)) ?? {
1862
+ version: 1,
1863
+ profiles: {}
1864
+ };
1865
+ let changed = false;
1866
+ for (const [profileId, credential] of changedProfiles) {
1867
+ const previous = params.store.profiles[profileId];
1868
+ const latest = latestStore.profiles[profileId];
1869
+ if (!isDeepStrictEqual(latest, previous)) {
1870
+ log$1.debug("skipped persisted external cli auth sync for concurrently changed profile", { profileId });
1871
+ continue;
1872
+ }
1873
+ latestStore.profiles[profileId] = credential;
1874
+ changed = true;
1875
+ }
1876
+ if (changed) {
1877
+ saveAuthProfileStore(latestStore, params.agentDir, { filterExternalAuthProfiles: false });
1878
+ return {
1879
+ store: latestStore,
1880
+ cacheable: true
1881
+ };
1882
+ }
1883
+ return {
1884
+ store: latestStore,
1885
+ cacheable: true
1886
+ };
1887
+ } finally {
1888
+ release();
1889
+ }
1890
+ }
1891
+ function shouldKeepProfileInLocalStore(params) {
1892
+ if (params.credential.type !== "oauth") return true;
1893
+ if (isInheritedMainOAuthCredential({
1894
+ agentDir: params.agentDir,
1895
+ profileId: params.profileId,
1896
+ credential: params.credential
1897
+ })) return false;
1898
+ if (params.options?.filterExternalAuthProfiles === false) return true;
1899
+ if (params.store.runtimeExternalProfileIds?.includes(params.profileId)) {
1900
+ if (loadPersistedAuthProfileStore(params.agentDir)?.profiles[params.profileId]) return shouldPersistRuntimeExternalOAuthProfile({
1901
+ profileId: params.profileId,
1902
+ credential: params.credential,
1903
+ profiles: params.externalProfiles()
1904
+ });
1905
+ const runtimeCredential = getRuntimeAuthProfileStoreSnapshot(params.agentDir)?.profiles[params.profileId];
1906
+ if (!runtimeCredential || isDeepStrictEqual(runtimeCredential, params.credential)) return false;
1907
+ }
1908
+ return shouldPersistRuntimeExternalOAuthProfile({
1909
+ profileId: params.profileId,
1910
+ credential: params.credential,
1911
+ profiles: params.externalProfiles()
1912
+ });
1913
+ }
1914
+ function pruneAuthProfileStoreReferences(store, keptProfileIds) {
1915
+ store.order = store.order ? Object.fromEntries(Object.entries(store.order).map(([provider, profileIds]) => [provider, profileIds.filter((profileId) => keptProfileIds.has(profileId))]).filter(([, profileIds]) => profileIds.length > 0)) : void 0;
1916
+ store.lastGood = store.lastGood ? Object.fromEntries(Object.entries(store.lastGood).filter(([, profileId]) => keptProfileIds.has(profileId))) : void 0;
1917
+ store.usageStats = store.usageStats ? Object.fromEntries(Object.entries(store.usageStats).filter(([profileId]) => keptProfileIds.has(profileId))) : void 0;
1918
+ store.runtimeExternalProfileIds = store.runtimeExternalProfileIds?.filter((profileId) => keptProfileIds.has(profileId)).toSorted();
1919
+ if (store.runtimeExternalProfileIds?.length === 0 && store.runtimeExternalProfileIdsAuthoritative !== true) store.runtimeExternalProfileIds = void 0;
1920
+ if (store.runtimeExternalProfileIdsAuthoritative === true) store.runtimeExternalProfileIds ??= [];
1921
+ }
1922
+ function buildLocalAuthProfileStoreForSave(params) {
1923
+ const localStore = cloneAuthProfileStore(params.store);
1924
+ let externalProfiles;
1925
+ const getExternalProfiles = () => externalProfiles ??= listRuntimeExternalAuthProfiles({
1926
+ store: params.store,
1927
+ agentDir: params.agentDir
1928
+ });
1929
+ localStore.profiles = Object.fromEntries(Object.entries(localStore.profiles).filter(([profileId, credential]) => shouldKeepProfileInLocalStore({
1930
+ store: params.store,
1931
+ profileId,
1932
+ credential,
1933
+ agentDir: params.agentDir,
1934
+ options: params.options,
1935
+ externalProfiles: getExternalProfiles
1936
+ })));
1937
+ pruneAuthProfileStoreReferences(localStore, new Set(Object.keys(localStore.profiles)));
1938
+ if (params.options?.filterExternalAuthProfiles !== false) {
1939
+ localStore.runtimeExternalProfileIds = void 0;
1940
+ localStore.runtimeExternalProfileIdsAuthoritative = void 0;
1941
+ }
1942
+ return localStore;
1943
+ }
1944
+ function buildAuthProfileStoreWithoutExternalProfiles(params) {
1945
+ const runtimeExternalProfileIds = new Set(params.store.runtimeExternalProfileIds ?? []);
1946
+ const localStore = cloneAuthProfileStore(params.store);
1947
+ if (runtimeExternalProfileIds.size === 0) {
1948
+ localStore.runtimeExternalProfileIds = void 0;
1949
+ localStore.runtimeExternalProfileIdsAuthoritative = void 0;
1950
+ return localStore;
1951
+ }
1952
+ for (const profileId of runtimeExternalProfileIds) delete localStore.profiles[profileId];
1953
+ pruneAuthProfileStoreReferences(localStore, new Set(Object.keys(localStore.profiles)));
1954
+ localStore.runtimeExternalProfileIds = void 0;
1955
+ localStore.runtimeExternalProfileIdsAuthoritative = void 0;
1956
+ return mergeAuthProfileStores(loadAuthProfileStoreWithoutExternalProfiles(params.agentDir, params.options), localStore);
1957
+ }
1958
+ function buildRuntimeAuthProfileStoreForSave(params) {
1959
+ return buildLocalAuthProfileStoreForSave({
1960
+ ...params,
1961
+ options: {
1962
+ ...params.options,
1963
+ filterExternalAuthProfiles: false
1964
+ }
1965
+ });
1966
+ }
1967
+ function setRuntimeExternalProfileMetadata(params) {
1968
+ const profileIds = [...params.profileIds].toSorted();
1969
+ params.store.runtimeExternalProfileIds = profileIds.length > 0 || params.authoritative ? profileIds : void 0;
1970
+ params.store.runtimeExternalProfileIdsAuthoritative = params.authoritative ? true : void 0;
1971
+ }
1972
+ function mergeRuntimeExternalProfileReferences(params) {
1973
+ const runtimeExternalProfileIds = new Set(params.existing.runtimeExternalProfileIds ?? []);
1974
+ if (params.next.runtimeExternalProfileIdsAuthoritative === true) return params.next;
1975
+ if (runtimeExternalProfileIds.size === 0) return params.next;
1976
+ const merged = cloneAuthProfileStore(params.next);
1977
+ const mergedRuntimeExternalProfileIds = new Set(merged.runtimeExternalProfileIds ?? []);
1978
+ const backfilledRuntimeExternalProfileIds = /* @__PURE__ */ new Set();
1979
+ for (const profileId of runtimeExternalProfileIds) {
1980
+ const existingCredential = params.existing.profiles[profileId];
1981
+ const nextCredential = merged.profiles[profileId];
1982
+ if (nextCredential) {
1983
+ if (mergedRuntimeExternalProfileIds.has(profileId) || existingCredential && isDeepStrictEqual(nextCredential, existingCredential)) mergedRuntimeExternalProfileIds.add(profileId);
1984
+ continue;
1985
+ }
1986
+ if (!existingCredential) continue;
1987
+ merged.profiles[profileId] = existingCredential;
1988
+ mergedRuntimeExternalProfileIds.add(profileId);
1989
+ backfilledRuntimeExternalProfileIds.add(profileId);
1990
+ if (params.existing.usageStats?.[profileId]) merged.usageStats = {
1991
+ ...merged.usageStats,
1992
+ [profileId]: params.existing.usageStats[profileId]
1993
+ };
1994
+ }
1995
+ for (const [provider, profileIds] of Object.entries(params.existing.order ?? {})) {
1996
+ const externalProfileIds = profileIds.filter((profileId) => backfilledRuntimeExternalProfileIds.has(profileId));
1997
+ if (externalProfileIds.length === 0) continue;
1998
+ if (merged.order?.[provider]) continue;
1999
+ const existingOrder = merged.order?.[provider] ?? [];
2000
+ merged.order = {
2001
+ ...merged.order,
2002
+ [provider]: [...externalProfileIds, ...existingOrder.filter((profileId) => !externalProfileIds.includes(profileId))]
2003
+ };
2004
+ }
2005
+ for (const [provider, profileId] of Object.entries(params.existing.lastGood ?? {})) {
2006
+ if (!backfilledRuntimeExternalProfileIds.has(profileId) || merged.lastGood?.[provider]) continue;
2007
+ merged.lastGood = {
2008
+ ...merged.lastGood,
2009
+ [provider]: profileId
2010
+ };
2011
+ }
2012
+ setRuntimeExternalProfileMetadata({
2013
+ store: merged,
2014
+ profileIds: mergedRuntimeExternalProfileIds,
2015
+ authoritative: params.existing.runtimeExternalProfileIdsAuthoritative === true
2016
+ });
2017
+ return merged;
2018
+ }
2019
+ function mergeRuntimeExternalProfileState(params) {
2020
+ const existingRuntimeProfileIds = new Set(params.existing.runtimeExternalProfileIds ?? []);
2021
+ if (existingRuntimeProfileIds.size === 0) return params.next;
2022
+ const merged = cloneAuthProfileStore(params.next);
2023
+ const mergedRuntimeProfileIds = new Set(merged.runtimeExternalProfileIds ?? []);
2024
+ const activeRuntimeProfileIds = /* @__PURE__ */ new Set();
2025
+ const nextRuntimeProfileIdsAuthoritative = params.next.runtimeExternalProfileIdsAuthoritative === true;
2026
+ for (const profileId of existingRuntimeProfileIds) {
2027
+ if (nextRuntimeProfileIdsAuthoritative && !mergedRuntimeProfileIds.has(profileId)) continue;
2028
+ const existingCredential = params.existing.profiles[profileId];
2029
+ if (!existingCredential) continue;
2030
+ const nextCredential = merged.profiles[profileId];
2031
+ if (nextCredential) {
2032
+ if (mergedRuntimeProfileIds.has(profileId) || isDeepStrictEqual(nextCredential, existingCredential)) {
2033
+ mergedRuntimeProfileIds.add(profileId);
2034
+ activeRuntimeProfileIds.add(profileId);
2035
+ }
2036
+ continue;
2037
+ }
2038
+ merged.profiles[profileId] = existingCredential;
2039
+ mergedRuntimeProfileIds.add(profileId);
2040
+ activeRuntimeProfileIds.add(profileId);
2041
+ }
2042
+ if (activeRuntimeProfileIds.size === 0) return params.next;
2043
+ for (const profileId of activeRuntimeProfileIds) if (params.existing.usageStats?.[profileId]) merged.usageStats = {
2044
+ ...merged.usageStats,
2045
+ [profileId]: params.existing.usageStats[profileId]
2046
+ };
2047
+ for (const [provider, profileIds] of Object.entries(params.existing.order ?? {})) {
2048
+ const externalProfileIds = profileIds.filter((profileId) => activeRuntimeProfileIds.has(profileId));
2049
+ if (externalProfileIds.length === 0 || merged.order?.[provider]) continue;
2050
+ merged.order = {
2051
+ ...merged.order,
2052
+ [provider]: externalProfileIds
2053
+ };
2054
+ }
2055
+ for (const [provider, profileId] of Object.entries(params.existing.lastGood ?? {})) {
2056
+ if (!activeRuntimeProfileIds.has(profileId) || merged.lastGood?.[provider]) continue;
2057
+ merged.lastGood = {
2058
+ ...merged.lastGood,
2059
+ [provider]: profileId
2060
+ };
2061
+ }
2062
+ setRuntimeExternalProfileMetadata({
2063
+ store: merged,
2064
+ profileIds: mergedRuntimeProfileIds,
2065
+ authoritative: params.existing.runtimeExternalProfileIdsAuthoritative === true
2066
+ });
2067
+ return merged;
2068
+ }
2069
+ async function updateAuthProfileStoreWithLock(params) {
2070
+ const authPath = resolveAuthStorePath(params.agentDir);
2071
+ ensureAuthStoreFile(authPath);
2072
+ try {
2073
+ return await withFileLock(authPath, AUTH_STORE_LOCK_OPTIONS, async () => {
2074
+ const store = loadAuthProfileStoreForAgent(params.agentDir, { syncExternalCli: false });
2075
+ if (params.updater(store)) saveAuthProfileStore(store, params.agentDir, params.saveOptions);
2076
+ return store;
2077
+ });
2078
+ } catch {
2079
+ return null;
2080
+ }
2081
+ }
2082
+ function loadAuthProfileStore() {
2083
+ const asStore = loadPersistedAuthProfileStore();
2084
+ if (asStore) return overlayExternalAuthProfiles(asStore);
2085
+ const legacy = loadLegacyAuthProfileStore();
2086
+ if (legacy) {
2087
+ const store = {
2088
+ version: 1,
2089
+ profiles: {}
2090
+ };
2091
+ applyLegacyAuthStore(store, legacy);
2092
+ return overlayExternalAuthProfiles(store);
2093
+ }
2094
+ return overlayExternalAuthProfiles({
2095
+ version: 1,
2096
+ profiles: {}
2097
+ });
2098
+ }
2099
+ function loadAuthProfileStoreForAgent(agentDir, options) {
2100
+ const readOnly = options?.readOnly === true;
2101
+ const authPath = resolveAuthStorePath(agentDir);
2102
+ const statePath = resolveAuthStatePath(agentDir);
2103
+ const authMtimeMs = readAuthStoreMtimeMs(authPath);
2104
+ const stateMtimeMs = readAuthStoreMtimeMs(statePath);
2105
+ if (!readOnly) {
2106
+ const cached = readCachedAuthProfileStore({
2107
+ authPath,
2108
+ authMtimeMs,
2109
+ stateMtimeMs
2110
+ });
2111
+ if (cached) return cached;
2112
+ }
2113
+ const asStore = loadPersistedAuthProfileStore(agentDir, resolvePersistedLoadOptions(options));
2114
+ if (asStore) {
2115
+ const synced = maybeSyncPersistedExternalCliAuthProfiles({
2116
+ store: asStore,
2117
+ agentDir,
2118
+ options
2119
+ });
2120
+ if (!readOnly && synced.cacheable) writeCachedAuthProfileStore({
2121
+ authPath,
2122
+ authMtimeMs: readAuthStoreMtimeMs(authPath),
2123
+ stateMtimeMs: readAuthStoreMtimeMs(statePath),
2124
+ store: synced.store
2125
+ });
2126
+ return synced.store;
2127
+ }
2128
+ const legacy = loadLegacyAuthProfileStore(agentDir);
2129
+ const store = {
2130
+ version: 1,
2131
+ profiles: {}
2132
+ };
2133
+ if (legacy) applyLegacyAuthStore(store, legacy);
2134
+ const mergedOAuth = mergeOAuthFileIntoStore(store);
2135
+ const forceReadOnly = process.env.FENGMING_AUTH_STORE_READONLY === "1";
2136
+ const shouldWrite = !readOnly && !forceReadOnly && (legacy !== null || mergedOAuth);
2137
+ if (shouldWrite) saveAuthProfileStore(store, agentDir);
2138
+ if (shouldWrite && legacy !== null) {
2139
+ const legacyPath = resolveLegacyAuthStorePath(agentDir);
2140
+ try {
2141
+ fs.unlinkSync(legacyPath);
2142
+ } catch (err) {
2143
+ if (err?.code !== "ENOENT") log$1.warn("failed to delete legacy auth.json after migration", {
2144
+ err,
2145
+ legacyPath
2146
+ });
2147
+ }
2148
+ }
2149
+ const synced = maybeSyncPersistedExternalCliAuthProfiles({
2150
+ store,
2151
+ agentDir,
2152
+ options
2153
+ });
2154
+ if (!readOnly && synced.cacheable) writeCachedAuthProfileStore({
2155
+ authPath,
2156
+ authMtimeMs: readAuthStoreMtimeMs(authPath),
2157
+ stateMtimeMs: readAuthStoreMtimeMs(statePath),
2158
+ store: synced.store
2159
+ });
2160
+ return synced.store;
2161
+ }
2162
+ function loadAuthProfileStoreForRuntime(agentDir, options) {
2163
+ const store = loadAuthProfileStoreForAgent(agentDir, options);
2164
+ const authPath = resolveAuthStorePath(agentDir);
2165
+ const mainAuthPath = resolveAuthStorePath();
2166
+ const externalCli = resolveExternalCliOverlayOptions(options);
2167
+ if (!agentDir || authPath === mainAuthPath) return overlayExternalAuthProfiles(store, {
2168
+ agentDir,
2169
+ ...externalCli
2170
+ });
2171
+ return overlayExternalAuthProfiles(mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, options), store, { preserveBaseRuntimeExternalProfiles: true }), {
2172
+ agentDir,
2173
+ ...externalCli
2174
+ });
2175
+ }
2176
+ function loadAuthProfileStoreForSecretsRuntime(agentDir, options) {
2177
+ return loadAuthProfileStoreForRuntime(agentDir, {
2178
+ ...options,
2179
+ readOnly: true,
2180
+ allowKeychainPrompt: false,
2181
+ resolveLegacyOAuthSidecars: true
2182
+ });
2183
+ }
2184
+ function loadAuthProfileStoreWithoutExternalProfiles(agentDir, loadOptions) {
2185
+ const options = {
2186
+ readOnly: true,
2187
+ allowKeychainPrompt: loadOptions?.allowKeychainPrompt ?? false,
2188
+ resolveLegacyOAuthSidecars: loadOptions?.resolveLegacyOAuthSidecars ?? true
2189
+ };
2190
+ const store = loadAuthProfileStoreForAgent(agentDir, options);
2191
+ const authPath = resolveAuthStorePath(agentDir);
2192
+ const mainAuthPath = resolveAuthStorePath();
2193
+ if (!agentDir || authPath === mainAuthPath) return store;
2194
+ return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, options), store, { preserveBaseRuntimeExternalProfiles: true });
2195
+ }
2196
+ function ensureAuthProfileStore(agentDir, options) {
2197
+ const externalCli = resolveExternalCliOverlayOptions(options);
2198
+ const runtimeStore = resolveRuntimeAuthProfileStore(agentDir, options);
2199
+ const store = overlayExternalAuthProfiles(ensureAuthProfileStoreWithoutExternalProfiles(agentDir, options), {
2200
+ agentDir,
2201
+ ...externalCli
2202
+ });
2203
+ if (!runtimeStore || hasScopedExternalCliOverlay(externalCli)) return store;
2204
+ return mergeRuntimeExternalProfileState({
2205
+ next: store,
2206
+ existing: runtimeStore
2207
+ });
2208
+ }
2209
+ function ensureAuthProfileStoreWithoutExternalProfiles(agentDir, options) {
2210
+ const effectiveOptions = {
2211
+ ...options,
2212
+ resolveLegacyOAuthSidecars: options?.resolveLegacyOAuthSidecars ?? true
2213
+ };
2214
+ const runtimeStore = resolveRuntimeAuthProfileStore(agentDir, effectiveOptions);
2215
+ if (runtimeStore) return buildAuthProfileStoreWithoutExternalProfiles({
2216
+ store: runtimeStore,
2217
+ agentDir,
2218
+ options: effectiveOptions
2219
+ });
2220
+ const store = loadAuthProfileStoreForAgent(agentDir, effectiveOptions);
2221
+ const authPath = resolveAuthStorePath(agentDir);
2222
+ const mainAuthPath = resolveAuthStorePath();
2223
+ if (!agentDir || authPath === mainAuthPath) return store;
2224
+ return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, effectiveOptions), store, { preserveBaseRuntimeExternalProfiles: true });
2225
+ }
2226
+ function findPersistedAuthProfileCredential(params) {
2227
+ const requestedProfile = loadPersistedAuthProfileStore(params.agentDir)?.profiles[params.profileId];
2228
+ if (requestedProfile || !params.agentDir) return requestedProfile;
2229
+ if (resolveAuthStorePath(params.agentDir) === resolveAuthStorePath()) return requestedProfile;
2230
+ return loadPersistedAuthProfileStore()?.profiles[params.profileId];
2231
+ }
2232
+ function resolvePersistedAuthProfileOwnerAgentDir(params) {
2233
+ if (!params.agentDir) return;
2234
+ const requestedStore = loadPersistedAuthProfileStore(params.agentDir);
2235
+ if (resolveAuthStorePath(params.agentDir) === resolveAuthStorePath()) return;
2236
+ const mainStore = loadPersistedAuthProfileStore();
2237
+ const requestedProfile = requestedStore?.profiles[params.profileId];
2238
+ if (requestedProfile) return shouldUseMainOwnerForLocalOAuthCredential({
2239
+ local: requestedProfile,
2240
+ main: mainStore?.profiles[params.profileId]
2241
+ }) ? void 0 : params.agentDir;
2242
+ return mainStore?.profiles[params.profileId] ? void 0 : params.agentDir;
2243
+ }
2244
+ function ensureAuthProfileStoreForLocalUpdate(agentDir) {
2245
+ const store = loadAuthProfileStoreForAgent(agentDir, { syncExternalCli: false });
2246
+ const authPath = resolveAuthStorePath(agentDir);
2247
+ const mainAuthPath = resolveAuthStorePath();
2248
+ if (!agentDir || authPath === mainAuthPath) return store;
2249
+ return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, {
2250
+ readOnly: true,
2251
+ syncExternalCli: false
2252
+ }), store, { preserveBaseRuntimeExternalProfiles: true });
2253
+ }
2254
+ function getRuntimeAuthProfileStoreSnapshot(agentDir) {
2255
+ return getRuntimeAuthProfileStoreSnapshot$1(agentDir);
2256
+ }
2257
+ function replaceRuntimeAuthProfileStoreSnapshots(entries) {
2258
+ replaceRuntimeAuthProfileStoreSnapshots$1(entries);
2259
+ }
2260
+ function clearRuntimeAuthProfileStoreSnapshots() {
2261
+ clearRuntimeAuthProfileStoreSnapshots$1();
2262
+ clearLoadedAuthStoreCache();
2263
+ }
2264
+ function saveAuthProfileStore(store, agentDir, options) {
2265
+ const authPath = resolveAuthStorePath(agentDir);
2266
+ const statePath = resolveAuthStatePath(agentDir);
2267
+ const runtimeLegacyOAuthSidecarProfileIds = new Set(Object.entries(store.profiles).filter(([profileId, credential]) => isRuntimeLegacyOAuthSidecarCredential(credential) || matchesRuntimeLegacyOAuthSidecarMaterial({
2268
+ authPath,
2269
+ profileId,
2270
+ credential
2271
+ })).map(([profileId]) => profileId));
2272
+ const localStore = buildLocalAuthProfileStoreForSave({
2273
+ store,
2274
+ agentDir,
2275
+ options
2276
+ });
2277
+ saveJsonFile(authPath, buildPersistedAuthProfileSecretsStore(localStore, void 0, {
2278
+ existingRaw: loadJsonFile(authPath),
2279
+ runtimeLegacyOAuthSidecarProfileIds
2280
+ }));
2281
+ savePersistedAuthProfileState(localStore, agentDir);
2282
+ writeCachedAuthProfileStore({
2283
+ authPath,
2284
+ authMtimeMs: readAuthStoreMtimeMs(authPath),
2285
+ stateMtimeMs: readAuthStoreMtimeMs(statePath),
2286
+ store: localStore
2287
+ });
2288
+ if (hasRuntimeAuthProfileStoreSnapshot(agentDir)) {
2289
+ const existingRuntimeStore = getRuntimeAuthProfileStoreSnapshot(agentDir);
2290
+ const nextRuntimeStore = buildRuntimeAuthProfileStoreForSave({
2291
+ store,
2292
+ agentDir,
2293
+ options
2294
+ });
2295
+ setRuntimeAuthProfileStoreSnapshot(existingRuntimeStore ? mergeRuntimeExternalProfileReferences({
2296
+ next: nextRuntimeStore,
2297
+ existing: existingRuntimeStore
2298
+ }) : nextRuntimeStore, agentDir);
2299
+ }
2300
+ }
2301
+ //#endregion
2302
+ export { shouldBootstrapFromExternalCliCredential as A, readExternalCliFallbackCredential as C, hasUsableOAuthCredential as D, hasMatchingOAuthIdentity as E, resolveTokenExpiryState as F, readClaudeCliCredentialsCached as I, readCodexCliCredentialsCached as L, DEFAULT_OAUTH_REFRESH_MARGIN_MS as M, evaluateStoredCredentialEligibility as N, isSafeToAdoptBootstrapOAuthIdentity as O, hasUsableOAuthCredential$1 as P, readGeminiCliCredentialsCached as R, resolveLegacyOAuthSidecarPath as S, areOAuthCredentialsEquivalent as T, loadPersistedAuthProfileStore as _, findPersistedAuthProfileCredential as a, legacyOAuthSidecarTestUtils as b, loadAuthProfileStoreForRuntime as c, replaceRuntimeAuthProfileStoreSnapshots as d, resolvePersistedAuthProfileOwnerAgentDir as f, coercePersistedAuthProfileStore as g, buildPersistedAuthProfileSecretsStore as h, ensureAuthProfileStoreWithoutExternalProfiles as i, shouldReplaceStoredOAuthCredential as j, isSafeToAdoptMainStoreOAuthIdentity as k, loadAuthProfileStoreForSecretsRuntime as l, updateAuthProfileStoreWithLock as m, ensureAuthProfileStore as n, getRuntimeAuthProfileStoreSnapshot as o, saveAuthProfileStore as p, ensureAuthProfileStoreForLocalUpdate as r, loadAuthProfileStore as s, clearRuntimeAuthProfileStoreSnapshots as t, loadAuthProfileStoreWithoutExternalProfiles as u, isLegacyOAuthRef as v, readManagedExternalCliCredential as w, loadLegacyOAuthSidecarMaterial as x, isLegacyOAuthSidecarPayload as y };