@qwen-code/qwen-code 0.23.5-preview.0 → 0.24.0-nightly.20260917.f822124af5

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 (498) hide show
  1. package/bundled/goal-draft/SKILL.md +5 -5
  2. package/bundled/qc-helper/docs/configuration/auth.md +1 -0
  3. package/bundled/qc-helper/docs/configuration/model-providers.md +43 -14
  4. package/bundled/qc-helper/docs/configuration/settings.md +2 -1
  5. package/bundled/qc-helper/docs/extension/introduction.md +2 -0
  6. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  7. package/bundled/qc-helper/docs/features/goals.md +11 -11
  8. package/bundled/qc-helper/docs/features/hooks.md +8 -10
  9. package/bundled/qc-helper/docs/features/omni-fixed-policies-preset.json +242 -0
  10. package/bundled/qc-helper/docs/features/omni-media-policies.md +443 -0
  11. package/bundled/qc-helper/docs/overview.md +1 -1
  12. package/bundled/qc-helper/docs/quickstart.md +2 -3
  13. package/bundled/review/SKILL.md +1 -1
  14. package/bundled/workflow-authoring/SKILL.md +22 -7
  15. package/chunks/MaxSizedBox-4VDYUHUI.js +148 -0
  16. package/chunks/{StandaloneSessionPicker-V635V72I.js → StandaloneSessionPicker-SGMGJOH3.js} +115 -91
  17. package/chunks/acp-subagent-executor-EGAATYQA.js +164 -0
  18. package/chunks/{acpAgent-3DPWZTNC.js → acpAgent-2JQ2N2T5.js} +361 -229
  19. package/chunks/{agent-KIHGINKN.js → agent-QWNE3MPD.js} +59 -49
  20. package/chunks/agent-headless-GRSMZK5Z.js +104 -0
  21. package/chunks/{anthropicContentGenerator-4FGOM5LK.js → anthropicContentGenerator-INV24RMG.js} +30 -27
  22. package/chunks/{artifact-tool-MUTNH4NI.js → artifact-tool-3MWM6SN2.js} +11 -7
  23. package/chunks/{askUserQuestion-AKIRLVB5.js → askUserQuestion-YFFBB4K3.js} +6 -4
  24. package/chunks/bridge-R65BJ2YL.js +156 -0
  25. package/chunks/{build-5KWQBWEQ.js → build-5OQN7CDU.js} +1 -1
  26. package/chunks/caption-audio-UXXLI3JZ.js +443 -0
  27. package/chunks/caption-image-B7O4TUFP.js +247 -0
  28. package/chunks/{channel-management-service-RRILWSXX.js → channel-management-service-GRJG5R46.js} +1 -1
  29. package/chunks/channel-settings-store-TBLCDTV2.js +158 -0
  30. package/chunks/{channel-worker-group-3DUJFZJR.js → channel-worker-group-SCSKCSBJ.js} +4 -4
  31. package/chunks/{channel-worker-manager-E5UW2VLA.js → channel-worker-manager-AHCZCKON.js} +4 -4
  32. package/chunks/{channel-worker-supervisor-VN33GSEC.js → channel-worker-supervisor-BGUAVITB.js} +3 -3
  33. package/chunks/{chunk-5NUKK2DT.js → chunk-25FMWESU.js} +47 -8
  34. package/chunks/{chunk-VVI7MK3V.js → chunk-2A6RZKP2.js} +9 -7
  35. package/chunks/{chunk-3WWPEFMX.js → chunk-2FQM443D.js} +82 -4
  36. package/chunks/{chunk-D3KVGQUV.js → chunk-37XDTMFG.js} +4 -4
  37. package/chunks/{chunk-TDKUXSJO.js → chunk-3MW6PPA5.js} +1 -1
  38. package/chunks/{chunk-4LIPOIXS.js → chunk-3NHJLWOD.js} +1 -1
  39. package/chunks/{chunk-AQP3H22J.js → chunk-3ZGIRRAE.js} +1 -1
  40. package/chunks/{chunk-WSJI6ODG.js → chunk-422D2UIO.js} +210 -150
  41. package/chunks/chunk-43QUA4MC.js +135 -0
  42. package/chunks/{chunk-Q2SAQTEJ.js → chunk-4B7U3KQP.js} +1 -1
  43. package/chunks/{chunk-SFL6U7U7.js → chunk-4JFRCIMW.js} +2 -2
  44. package/chunks/{chunk-IVFTLUZD.js → chunk-4SZ2636R.js} +3 -3
  45. package/chunks/{chunk-6OTF7TTE.js → chunk-4VYTH6OF.js} +24 -1
  46. package/chunks/{chunk-7CLLH5TI.js → chunk-4YS7RMCB.js} +6 -4
  47. package/chunks/{chunk-BW2SMO6L.js → chunk-5FHOPPLZ.js} +1 -1
  48. package/chunks/{chunk-QIPLWW6Q.js → chunk-5MYQ66UF.js} +1 -1
  49. package/chunks/{chunk-TXTCM3TC.js → chunk-5VDOVBNG.js} +18 -14
  50. package/chunks/{chunk-L2A5VBDL.js → chunk-67ZCKSV6.js} +9 -9
  51. package/chunks/chunk-6C3D7BKK.js +153 -0
  52. package/chunks/{chunk-DC4ZNGH4.js → chunk-6DB6UHY3.js} +3 -3
  53. package/chunks/{chunk-AXPOOQAW.js → chunk-736AZVPL.js} +2 -2
  54. package/chunks/{chunk-M22WLKLI.js → chunk-77ORAIEF.js} +7 -7
  55. package/chunks/{chunk-BUQN5LTI.js → chunk-7PQ65Z5F.js} +2 -2
  56. package/chunks/{chunk-CXY6BICQ.js → chunk-A5EGR6ZS.js} +204 -120
  57. package/chunks/{chunk-VQDWCQOE.js → chunk-ANKISCKU.js} +1 -0
  58. package/chunks/{chunk-7D4CV7JH.js → chunk-APHDK7GV.js} +116 -4
  59. package/chunks/{chunk-B5TJK7B3.js → chunk-ARKOX7HM.js} +1 -1
  60. package/chunks/{chunk-NXUZFW3G.js → chunk-AUFTA63J.js} +1 -1
  61. package/chunks/{chunk-36SDZ2Q4.js → chunk-B3HGO6BB.js} +7 -5
  62. package/chunks/{chunk-6USYH3EU.js → chunk-B3XJFEEH.js} +5 -3
  63. package/chunks/{chunk-AEWCOE64.js → chunk-B5WYAQ4I.js} +2 -2
  64. package/chunks/{chunk-GSKX53AN.js → chunk-BA6AXQDA.js} +1 -1
  65. package/chunks/{chunk-Y2KJC55Y.js → chunk-BBHLWLIK.js} +4 -4
  66. package/chunks/chunk-BKVPLSEI.js +133 -0
  67. package/chunks/chunk-BQMSZSG6.js +21 -0
  68. package/chunks/{chunk-3LMDSCLU.js → chunk-C4FISGDN.js} +2 -2
  69. package/chunks/{chunk-SFHX5G2S.js → chunk-C4MMZVYX.js} +80 -15
  70. package/chunks/{chunk-4JFLRHNE.js → chunk-C4QWV63F.js} +1 -1
  71. package/chunks/{chunk-XFFRI3WM.js → chunk-CA63HYHU.js} +4 -2
  72. package/chunks/{chunk-FBY32737.js → chunk-CJNWKJFH.js} +4 -4
  73. package/chunks/{chunk-QT6Z2IBF.js → chunk-CYFQLCCG.js} +2 -2
  74. package/chunks/{chunk-X7AYIXC7.js → chunk-DJLCK66M.js} +5 -3
  75. package/chunks/chunk-DJYHML3Y.js +121 -0
  76. package/chunks/{chunk-MO4XID7S.js → chunk-DNDECZXY.js} +3 -3
  77. package/chunks/{chunk-H6L4NEAT.js → chunk-DQCGGSDO.js} +1 -1
  78. package/chunks/{chunk-347O2YZJ.js → chunk-DUWQ5Q6R.js} +115 -67
  79. package/chunks/{chunk-FEDFZBGR.js → chunk-E6A52AP2.js} +28 -17
  80. package/chunks/{chunk-TIGXX4PA.js → chunk-EKBQJ627.js} +2 -2
  81. package/chunks/{chunk-RSWBT7AZ.js → chunk-ERIBG3BX.js} +35 -551
  82. package/chunks/{chunk-PPJSG2PU.js → chunk-EVZT24AF.js} +6 -142
  83. package/chunks/{chunk-YZXSDPOQ.js → chunk-F7L4ZMKS.js} +84 -40
  84. package/chunks/{chunk-HX4WXX3H.js → chunk-FGAWVV4X.js} +101 -75
  85. package/chunks/chunk-FT3O44AZ.js +1635 -0
  86. package/chunks/chunk-FTKXJMQV.js +255 -0
  87. package/chunks/{chunk-5FK4MSHB.js → chunk-FWP5GZRY.js} +6 -4
  88. package/chunks/{chunk-TRZ22SG5.js → chunk-FXPP7VLM.js} +6 -4
  89. package/chunks/{chunk-INN5ORKX.js → chunk-G25IQMCV.js} +1 -1
  90. package/chunks/{chunk-OWUAZXXN.js → chunk-GHG4PQY2.js} +3 -3
  91. package/chunks/{chunk-FASYATAZ.js → chunk-GL5TRVMS.js} +1 -1
  92. package/chunks/{chunk-G45B3INR.js → chunk-GVTAFLWB.js} +2 -2
  93. package/chunks/{chunk-G6UUOCUT.js → chunk-GXNXX7A2.js} +7 -1
  94. package/chunks/{chunk-GI7SLDOI.js → chunk-HUUBCY33.js} +6 -6
  95. package/chunks/chunk-I7MIPRIQ.js +181 -0
  96. package/chunks/{chunk-NQ272MQG.js → chunk-IAKJXTGS.js} +7 -5
  97. package/chunks/{chunk-V4JJAVHQ.js → chunk-ID7XHHY5.js} +2 -2
  98. package/chunks/{chunk-IXO2OCIP.js → chunk-IIHFUREY.js} +12 -8
  99. package/chunks/{chunk-IZ2U57NY.js → chunk-IITTKFWM.js} +4 -2
  100. package/chunks/chunk-IVPSLX4P.js +578 -0
  101. package/chunks/{chunk-BTICBRPL.js → chunk-IWMYX5LB.js} +3 -3
  102. package/chunks/{chunk-UZSB57EV.js → chunk-JR2WFCQG.js} +29 -17
  103. package/chunks/{chunk-GJKP6XOB.js → chunk-JWV5GI77.js} +16 -19
  104. package/chunks/chunk-JYGESWZM.js +149 -0
  105. package/chunks/{chunk-KVC7HZWK.js → chunk-JYTJ5FCM.js} +1 -1
  106. package/chunks/{chunk-SOLRBF7L.js → chunk-JZUSFW64.js} +10 -10
  107. package/chunks/{chunk-CDDP4ONL.js → chunk-K2T5PKFS.js} +60 -134
  108. package/chunks/{chunk-EIBECN2J.js → chunk-K5VVDHDV.js} +5 -5
  109. package/chunks/{chunk-NKTMUPHJ.js → chunk-KDM4KSVG.js} +14 -4
  110. package/chunks/{chunk-3WILPKTJ.js → chunk-KKPIFWTZ.js} +11 -6
  111. package/chunks/{chunk-3HTUE6ZR.js → chunk-KPK6NQVR.js} +4 -4
  112. package/chunks/{chunk-CXONOVBN.js → chunk-KS6F6LZQ.js} +8 -6
  113. package/chunks/{chunk-D7JMO2GP.js → chunk-KSECLXYH.js} +1 -1
  114. package/chunks/chunk-KSEKRQJO.js +253 -0
  115. package/chunks/{chunk-KEM7MWS7.js → chunk-KWZ2DDOC.js} +765 -428
  116. package/chunks/{chunk-U4AASWUQ.js → chunk-L4GF4IK2.js} +3 -3
  117. package/chunks/{chunk-CQPM66MG.js → chunk-L7HFHYGB.js} +4 -4
  118. package/chunks/{chunk-DJXSOEFB.js → chunk-LAE6RY3L.js} +1 -1
  119. package/chunks/{chunk-WNQIJTOP.js → chunk-LDM3JQZF.js} +243 -17
  120. package/chunks/{chunk-KVQ3QL4K.js → chunk-LLTRNLK2.js} +3 -3
  121. package/chunks/{chunk-IKBEIDOH.js → chunk-LVXTBFWP.js} +13 -13
  122. package/chunks/{chunk-AKRSSKUT.js → chunk-LWALWKFU.js} +10 -10
  123. package/chunks/{chunk-WL36KHUQ.js → chunk-LWV4RLBT.js} +11 -9
  124. package/chunks/{chunk-3BZI5GDP.js → chunk-M5YIHMXP.js} +6 -4
  125. package/chunks/{chunk-6WXVEDT2.js → chunk-MC2RYJMU.js} +5 -3
  126. package/chunks/chunk-MNU36NGH.js +233 -0
  127. package/chunks/{chunk-ZMYKNKET.js → chunk-MQWZWHTY.js} +3 -3
  128. package/chunks/{chunk-M4U2LTD2.js → chunk-MS4SXNJ6.js} +1 -1
  129. package/chunks/{chunk-QHSOINX6.js → chunk-MZKXPQWL.js} +2 -2
  130. package/chunks/{chunk-36NRLIR6.js → chunk-NBLWUMYE.js} +13 -11
  131. package/chunks/{chunk-DRAX5YAI.js → chunk-NFC4WTY2.js} +6 -4
  132. package/chunks/chunk-NX6JUO42.js +102 -0
  133. package/chunks/chunk-O345BAI3.js +42 -0
  134. package/chunks/{chunk-YM6KUQ2S.js → chunk-O4A2B6V2.js} +3 -3
  135. package/chunks/chunk-O55EKI4S.js +7668 -0
  136. package/chunks/{chunk-3UGMLA4V.js → chunk-OA5H5PPQ.js} +10 -10
  137. package/chunks/{chunk-DX6JTDMR.js → chunk-OB57Y2WH.js} +1 -1
  138. package/chunks/{chunk-4QPVZA5J.js → chunk-OOSOAFCT.js} +3 -3
  139. package/chunks/{chunk-E2VSBAFA.js → chunk-OXBD7VUE.js} +5 -5
  140. package/chunks/{chunk-M23GFJ5B.js → chunk-OY5GQPMU.js} +1 -1
  141. package/chunks/chunk-PF3RVYRK.js +108 -0
  142. package/chunks/{chunk-XWJFDJZK.js → chunk-PJSZXERN.js} +1 -1
  143. package/chunks/{chunk-GSAOVDTH.js → chunk-POMFSBEC.js} +4 -4
  144. package/chunks/{chunk-EWNKP4V4.js → chunk-PPVM7YLS.js} +1 -1
  145. package/chunks/{chunk-WK6DEH3Q.js → chunk-PQQV3OBW.js} +6 -4
  146. package/chunks/{chunk-ZSTCM3MX.js → chunk-Q5N5NEVT.js} +1 -1
  147. package/chunks/{chunk-HYHSMTRA.js → chunk-QCTWNYL6.js} +4 -4
  148. package/chunks/{chunk-KFFCDLKV.js → chunk-QE36VXWP.js} +1 -1
  149. package/chunks/{chunk-3LLEB5CU.js → chunk-QG73VXTF.js} +2 -2
  150. package/chunks/{chunk-QMENOK5T.js → chunk-QJJN2VJY.js} +10 -8
  151. package/chunks/{chunk-XICCGDWF.js → chunk-QKYAXSNG.js} +2 -2
  152. package/chunks/{chunk-V545KI73.js → chunk-QPTE6BKL.js} +1 -1
  153. package/chunks/{chunk-2GP6BQ2J.js → chunk-RA6PKQVM.js} +2 -2
  154. package/chunks/{chunk-TPY6HW55.js → chunk-RFAX4WKE.js} +13 -7
  155. package/chunks/chunk-RSFNJ6UU.js +1252 -0
  156. package/chunks/{chunk-EDIDYZBT.js → chunk-RVT5L74D.js} +1 -1
  157. package/chunks/{chunk-FCPJXKDG.js → chunk-RXDTMGUH.js} +9 -9
  158. package/chunks/{chunk-P42KMMU6.js → chunk-RZZLNI74.js} +27 -25
  159. package/chunks/{chunk-ZFHKUQZ4.js → chunk-S2R4L34O.js} +12 -5
  160. package/chunks/chunk-S34QJ6IR.js +290 -0
  161. package/chunks/chunk-S5BHLTHK.js +190 -0
  162. package/chunks/{chunk-2XRE4KE4.js → chunk-S7BE3FMA.js} +1 -1
  163. package/chunks/{chunk-7O5PYQ3M.js → chunk-SBP43AO6.js} +1 -1
  164. package/chunks/chunk-SLHYLVRW.js +1377 -0
  165. package/chunks/{chunk-SSWTA7CH.js → chunk-SLV3GU2S.js} +12 -12
  166. package/chunks/chunk-SLVJ55G3.js +11397 -0
  167. package/chunks/{chunk-5VQR2DD7.js → chunk-SQRZJD25.js} +5 -3
  168. package/chunks/{chunk-K4XMAIRX.js → chunk-SRFYBJ4P.js} +14 -14
  169. package/chunks/{chunk-Y4NNIGYO.js → chunk-SSFOFDNL.js} +1 -1
  170. package/chunks/{chunk-NFXXBWSE.js → chunk-SU64336V.js} +2 -2
  171. package/chunks/{chunk-RRI764F7.js → chunk-SWHBXWVS.js} +45 -26
  172. package/chunks/{chunk-BHVF3R6B.js → chunk-TAMBGU42.js} +4 -4
  173. package/chunks/chunk-TFDCK56Y.js +154 -0
  174. package/chunks/{chunk-Q54O3EIA.js → chunk-TNTYSST7.js} +55 -33
  175. package/chunks/{chunk-JRHKM3YQ.js → chunk-TS4JJ7NN.js} +2 -2
  176. package/chunks/{chunk-VEXUA6DX.js → chunk-TWD6EZLA.js} +13 -11
  177. package/chunks/{chunk-WZWTY7SG.js → chunk-TZ4QKMPU.js} +6 -6
  178. package/chunks/{chunk-C4HBZQNH.js → chunk-U3MTHCJF.js} +1 -1
  179. package/chunks/{chunk-VU3XMZ5I.js → chunk-U3VIKF53.js} +3 -3
  180. package/chunks/{chunk-BHG3H6OZ.js → chunk-U4KO33OD.js} +1 -1
  181. package/chunks/{chunk-2C5TR6HN.js → chunk-UANUZBL2.js} +1 -1
  182. package/chunks/{chunk-Y53DG2HA.js → chunk-UIWUFHRJ.js} +1 -1
  183. package/chunks/{chunk-UQGRJTDK.js → chunk-UP3XL4VB.js} +3 -3
  184. package/chunks/{chunk-43Y26NPF.js → chunk-UR27ZXFZ.js} +3 -3
  185. package/chunks/{chunk-LO2UWNO5.js → chunk-UXC6MURF.js} +3 -3
  186. package/chunks/chunk-UXEI7POA.js +273 -0
  187. package/chunks/chunk-V2XJJTAB.js +228 -0
  188. package/chunks/chunk-VDNCKE2O.js +24 -0
  189. package/chunks/{chunk-YQQ2U7AS.js → chunk-VLBL6Q7X.js} +1 -1
  190. package/chunks/{chunk-HNFKYKHH.js → chunk-VNQTV5NC.js} +104 -26
  191. package/chunks/chunk-VPGRGNNH.js +578 -0
  192. package/chunks/{chunk-TKF4JINY.js → chunk-VVQ57VLE.js} +1 -1
  193. package/chunks/{chunk-AUX2FL5T.js → chunk-W2UTVLT2.js} +641 -11
  194. package/chunks/{chunk-SYMXYRM5.js → chunk-W7JWIIRC.js} +1 -1
  195. package/chunks/{chunk-WBSJ6VPZ.js → chunk-WDVSRQIQ.js} +3 -3
  196. package/chunks/{chunk-AZCTY64Z.js → chunk-WEUQIY3Q.js} +1 -1
  197. package/chunks/{chunk-FX6PZBOV.js → chunk-WHBL5HJF.js} +4 -4
  198. package/chunks/chunk-WL2V7PTE.js +78 -0
  199. package/chunks/{chunk-OSG23MR3.js → chunk-X3T5IOX6.js} +2 -2
  200. package/chunks/{chunk-OZEV3R3S.js → chunk-XYAB5R6E.js} +3 -3
  201. package/chunks/chunk-XZA32HII.js +19 -0
  202. package/chunks/{chunk-4FLUQWJ4.js → chunk-Y3Q5OK4D.js} +1 -1
  203. package/chunks/chunk-YDERQ7ZV.js +248 -0
  204. package/chunks/{chunk-QGEISOJ2.js → chunk-YKM7SY3N.js} +3 -3
  205. package/chunks/{chunk-HXUI5D4H.js → chunk-YRNAZIDX.js} +1 -1
  206. package/chunks/{chunk-MFDKHGTD.js → chunk-YRNLF4SV.js} +3 -1
  207. package/chunks/{chunk-3XBUCOWS.js → chunk-YSD6IY6F.js} +2 -2
  208. package/chunks/{chunk-CH2YDT6X.js → chunk-YVYK3JYU.js} +5 -3
  209. package/chunks/{chunk-YL3UJML3.js → chunk-YWDVNBGE.js} +4 -4
  210. package/chunks/{chunk-KAYC5FBN.js → chunk-Z3DLUFMT.js} +1595 -1399
  211. package/chunks/chunk-Z547XC3A.js +44 -0
  212. package/chunks/{chunk-B6RMK4ED.js → chunk-Z5UFM7P6.js} +9 -7
  213. package/chunks/chunk-ZAX2LW35.js +1330 -0
  214. package/chunks/{chunk-C3T6HPNM.js → chunk-ZGADNVME.js} +5 -5
  215. package/chunks/{chunk-M3JGHRMQ.js → chunk-ZJ7KIWG5.js} +1 -1
  216. package/chunks/{chunk-SYROIHU7.js → chunk-ZRQGTRHA.js} +4 -2
  217. package/chunks/{chunk-NCPFOLM2.js → chunk-ZTBP4SFC.js} +78 -18
  218. package/chunks/{chunk-ZAFYHRVY.js → chunk-ZYDMQCQP.js} +4 -274
  219. package/chunks/{chunk-YP2K3WOS.js → chunk-ZYLZNSBW.js} +7 -4
  220. package/chunks/clip-audio-SH4L7AEY.js +255 -0
  221. package/chunks/clip-image-BQRPECIS.js +239 -0
  222. package/chunks/clip-video-JIRMV5IH.js +277 -0
  223. package/chunks/{codex-subagent-executor-AEAIQZDC.js → codex-subagent-executor-BQZZ3Z4E.js} +92 -68
  224. package/chunks/config-3X4AXU45.js +21 -0
  225. package/chunks/config-T5RO4NJV.js +17 -0
  226. package/chunks/config-utils-65HZJG2Y.js +151 -0
  227. package/chunks/contextCommand-P2WZOTZP.js +144 -0
  228. package/chunks/convert-image-D52K2FFB.js +231 -0
  229. package/chunks/{core-runtime-ZI4RTOJQ.js → core-runtime-G7RWUDR5.js} +94 -67
  230. package/chunks/{create-sub-session-MSGNIM37.js → create-sub-session-6EDEANCD.js} +7 -5
  231. package/chunks/{create-sub-session-BBWFQARJ.js → create-sub-session-C6OHZMEI.js} +90 -66
  232. package/chunks/{cron-create-U2JJ5CCF.js → cron-create-GS7ORRO6.js} +8 -5
  233. package/chunks/{cron-delete-7DM4LJWD.js → cron-delete-3GGDNNXD.js} +8 -5
  234. package/chunks/{cron-list-VCUSZK2Y.js → cron-list-EX27DW4H.js} +8 -5
  235. package/chunks/{daemon-INCM4VBX.js → daemon-62G2N3ZH.js} +1 -1
  236. package/chunks/{daemon-git-worktree-guard-KECEMV6A.js → daemon-git-worktree-guard-Y5MRUXHR.js} +90 -66
  237. package/chunks/daemon-status-provider-ORUXPQJO.js +155 -0
  238. package/chunks/daemon-trust-policy-CG35YJC5.js +150 -0
  239. package/chunks/{daemon-trust-policy-monitor-546N5ZVL.js → daemon-trust-policy-monitor-PT2ZJL3A.js} +96 -72
  240. package/chunks/deferred-core-runtime-K74JXKVR.js +153 -0
  241. package/chunks/{display-image-QTHALY6N.js → display-image-L3A755PZ.js} +10 -7
  242. package/chunks/{dist-BNW423XT.js → dist-CXDHIHN4.js} +5 -0
  243. package/chunks/downsample-audio-LPDWX6GF.js +217 -0
  244. package/chunks/downsample-image-A5JEYIV5.js +249 -0
  245. package/chunks/downscale-video-4W5BX5KO.js +249 -0
  246. package/chunks/{earlyInputCapture-BXP7V2P3.js → earlyInputCapture-UJ3KFVZQ.js} +3 -2
  247. package/chunks/{edit-CMSQB7NP.js → edit-VBS2GF24.js} +68 -56
  248. package/chunks/{en-56QLKXS2.js → en-FCK6MBTI.js} +16 -0
  249. package/chunks/{enter-worktree-DA6A4XC5.js → enter-worktree-QK7DR5EF.js} +12 -9
  250. package/chunks/{enterPlanMode-UDPMNESD.js → enterPlanMode-WC33QFGB.js} +62 -51
  251. package/chunks/environment-HN47IXJZ.js +167 -0
  252. package/chunks/errors-JC3V3RJA.js +151 -0
  253. package/chunks/{exec-RPKEY6HP.js → exec-7CFNHYCV.js} +31 -9
  254. package/chunks/{exit-worktree-4H6Z2VQI.js → exit-worktree-62COYIHF.js} +14 -10
  255. package/chunks/exitPlanMode-7R7DYPUV.js +102 -0
  256. package/chunks/extract-audio-GSSZQV6G.js +229 -0
  257. package/chunks/extract-keyframes-Q6DRMQAJ.js +621 -0
  258. package/chunks/{fast-path-F2CYDDZ4.js → fast-path-WN7SASHV.js} +6 -6
  259. package/chunks/{fast-path-settings-N2VGRGDJ.js → fast-path-settings-ASPHHCAG.js} +2 -2
  260. package/chunks/ffmpeg-N4LIIVNR.js +21 -0
  261. package/chunks/{glob-Z2JMJKKN.js → glob-HHM36TVT.js} +63 -51
  262. package/chunks/{goal-tools-HXVVLGCV.js → goal-tools-JTF7S4FP.js} +59 -49
  263. package/chunks/{grep-H2I33VAO.js → grep-JB5DGQ3B.js} +13 -9
  264. package/chunks/handleAutoUpdate-GGFSWLAH.js +147 -0
  265. package/chunks/i18n-NYQWDZWJ.js +164 -0
  266. package/chunks/{image-gen-HIAZCB5T.js → image-gen-LX3C4V3R.js} +16 -11
  267. package/chunks/initializer-6IZ4SNMM.js +151 -0
  268. package/chunks/installationInfo-K4KMCK7Q.js +145 -0
  269. package/chunks/{keychain-token-storage-NQ5XWIPX.js → keychain-token-storage-ZZNRE6D4.js} +3 -2
  270. package/chunks/list-KAWCG4I6.js +154 -0
  271. package/chunks/{list-agents-EWDCEPIW.js → list-agents-HS6HH4DJ.js} +10 -7
  272. package/chunks/{llm-LSUBOJAR.js → llm-UAZU4HC5.js} +162 -135
  273. package/chunks/{llm-content-generator-MLIONRXE.js → llm-content-generator-M3MT4BP3.js} +11 -9
  274. package/chunks/loadedSettingsAdapter-XKUVLEYR.js +152 -0
  275. package/chunks/{loggingContentGenerator-TUPEXFMM.js → loggingContentGenerator-2WW2O46K.js} +74 -63
  276. package/chunks/{loop-wakeup-ZBVRI6VH.js → loop-wakeup-4B7OY3TV.js} +9 -6
  277. package/chunks/{ls-6ZB3BEIR.js → ls-EZ5PSWU2.js} +8 -5
  278. package/chunks/{lsp-M54FQARP.js → lsp-DYFFHKB3.js} +6 -3
  279. package/chunks/{managed-npm-update-WEA5XMFZ.js → managed-npm-update-VRSID5W3.js} +91 -67
  280. package/chunks/mcp-DQEPGE5B.js +148 -0
  281. package/chunks/memory-side-query-DRV7FXK4.js +221 -0
  282. package/chunks/model-call-collection-HXYIVZDO.js +171 -0
  283. package/chunks/model-configuration-5FJL5BJE.js +161 -0
  284. package/chunks/modelConfigUtils-UE3FDHG3.js +140 -0
  285. package/chunks/{monitor-CI7YE7MT.js → monitor-IRKGV3RU.js} +63 -51
  286. package/chunks/nonInteractiveCli-LF5DTTUJ.js +235 -0
  287. package/chunks/nonInteractiveToolExecutor-KGIGCNUC.js +101 -0
  288. package/chunks/{notebook-edit-3WCVRNGL.js → notebook-edit-E2NGGRVT.js} +63 -52
  289. package/chunks/ocr-image-Q4HYJ3U7.js +252 -0
  290. package/chunks/omni-EHZU5MVU.js +147 -0
  291. package/chunks/{openaiContentGenerator-OGILGUZE.js → openaiContentGenerator-VZ4QWOSU.js} +36 -31
  292. package/chunks/{openaiResponsesContentGenerator-NXOXUPFM.js → openaiResponsesContentGenerator-OQFPKE6V.js} +15 -12
  293. package/chunks/pidfile-OQREIPGE.js +151 -0
  294. package/chunks/{processUtils-O4II3RYH.js → processUtils-VFFEEP7L.js} +2 -2
  295. package/chunks/prompt-terminal-ledger-46ELXYOX.js +143 -0
  296. package/chunks/{qwenContentGenerator-I4LRYADV.js → qwenContentGenerator-H3CWSIV5.js} +70 -60
  297. package/chunks/{qwenOAuth2-3J66TOT5.js → qwenOAuth2-GD3UIYUP.js} +9 -8
  298. package/chunks/reactive-degrade-KRTLV22M.js +375 -0
  299. package/chunks/read-file-BSZJVJ4F.js +37 -0
  300. package/chunks/{read-mcp-resource-LPSWXVOD.js → read-mcp-resource-INJIV3UC.js} +8 -4
  301. package/chunks/recall-media-memory-tool-PEE2BWRY.js +198 -0
  302. package/chunks/{record-artifact-L3CFJOMA.js → record-artifact-KKW3AIMJ.js} +6 -4
  303. package/chunks/record-source-OZ7JQFJK.js +24 -0
  304. package/chunks/{report-findings-LY5HQY4K.js → report-findings-OZSLWYAS.js} +7 -5
  305. package/chunks/{request-shutdown-53SNYGVR.js → request-shutdown-NMWMWGNR.js} +12 -9
  306. package/chunks/resumeHistoryUtils-P33LLL4M.js +156 -0
  307. package/chunks/ripGrep-2FWQ6RU3.js +43 -0
  308. package/chunks/{run-qwen-serve-ZVEKGS7Y.js → run-qwen-serve-HMQ2QCS7.js} +85 -73
  309. package/chunks/runtime-5X746HBH.js +188 -0
  310. package/chunks/sandbox-5FENHQ3J.js +170 -0
  311. package/chunks/sandboxConfig-7V6K3L4N.js +138 -0
  312. package/chunks/scheduled-tasks-Z4YOCKQV.js +167 -0
  313. package/chunks/scheduler-64LTQG3P.js +160 -0
  314. package/chunks/{sdk-exporters-http-DR4G663K.js → sdk-exporters-http-SWXTEEVT.js} +3 -2
  315. package/chunks/{sdk-impl-SJR26MQF.js → sdk-impl-FK4JY6LX.js} +5 -4
  316. package/chunks/{send-message-DN76MXDX.js → send-message-SNCXOZA7.js} +16 -13
  317. package/chunks/serve-C56AM3HW.js +156 -0
  318. package/chunks/{server-UHMKPCAZ.js → server-5NPGYNJG.js} +2169 -529
  319. package/chunks/{session-ZLUK7E4P.js → session-JOY4PHTN.js} +152 -128
  320. package/chunks/session-attachments-root-765GPAJU.js +141 -0
  321. package/chunks/{session-pr-refresh-3OMTQWCZ.js → session-pr-refresh-JUKB3A7P.js} +95 -71
  322. package/chunks/{settings-P4DHIIUP.js → settings-P326ULSH.js} +95 -71
  323. package/chunks/{shell-IMFUVQQ5.js → shell-747O3UYW.js} +59 -49
  324. package/chunks/{skill-NB5RJGZW.js → skill-DOHHQC32.js} +22 -17
  325. package/chunks/skill-settings-RI5JR6ZG.js +164 -0
  326. package/chunks/spawnChannel-745P6IB6.js +152 -0
  327. package/chunks/standalone-update-JC4E4UEO.js +156 -0
  328. package/chunks/{start-opentui-ui-JKAIWGF7.js → start-opentui-ui-RC62XZUC.js} +1611 -800
  329. package/chunks/{startInteractiveUI-YRPOT6GH.js → startInteractiveUI-PIBA3ADH.js} +521 -374
  330. package/chunks/storage-VZECDJNX.js +17 -0
  331. package/chunks/{syntheticOutput-EX5L5GYI.js → syntheticOutput-SSXJ2NEY.js} +5 -3
  332. package/chunks/task-create-FD3EJI7F.js +30 -0
  333. package/chunks/{task-list-ZLJSMRFA.js → task-list-GA5GOR74.js} +9 -6
  334. package/chunks/{task-stop-MD7P6QGK.js → task-stop-3MXTDL7H.js} +6 -3
  335. package/chunks/{task-update-3LSYQDRW.js → task-update-YHFYE7L6.js} +16 -13
  336. package/chunks/{team-create-2XTBYRJF.js → team-create-PJYGG3AE.js} +62 -51
  337. package/chunks/{team-delete-RIDINW6I.js → team-delete-V2CROTI6.js} +9 -6
  338. package/chunks/{team-plan-approval-CFNWW7ZQ.js → team-plan-approval-B36IMXRL.js} +61 -50
  339. package/chunks/terminal-image-renderer-7OSAIRLS.js +156 -0
  340. package/chunks/theme-manager-PVMU3VN5.js +140 -0
  341. package/chunks/{todoWrite-XSTG2VT5.js → todoWrite-LT75PK2W.js} +8 -5
  342. package/chunks/tool-result-media-S6D7T7TZ.js +45 -0
  343. package/chunks/{tool-search-ZHTJU2MV.js → tool-search-MNRENFML.js} +43 -21
  344. package/chunks/total-session-admission-XOFLP43R.js +151 -0
  345. package/chunks/transcribe-audio-AJQZPNEV.js +30 -0
  346. package/chunks/trustedFolders-SBORXKH4.js +160 -0
  347. package/chunks/understand-video-segments-5TMRDQUB.js +438 -0
  348. package/chunks/{update-relaunch-LI7GRP36.js → update-relaunch-FVAD6CYB.js} +5 -5
  349. package/chunks/updateCheck-PK4QHA67.js +156 -0
  350. package/chunks/upload-cache-5YULQVZZ.js +17 -0
  351. package/chunks/upload-config-AZ63YJU2.js +25 -0
  352. package/chunks/useAutoAcceptIndicator-SPTOOUWR.js +158 -0
  353. package/chunks/{validateNonInterActiveAuth-YFPCYYNL.js → validateNonInterActiveAuth-XXHRLXWV.js} +144 -120
  354. package/chunks/{version-4MTL4JVU.js → version-AGTZHZNY.js} +1 -1
  355. package/chunks/{web-fetch-O6RG6ISB.js → web-fetch-KMXKLQKY.js} +27 -20
  356. package/chunks/{web-search-JHAXVEMD.js → web-search-OLBQWW2Y.js} +14 -11
  357. package/chunks/{web-shell-static-FFWCUUZS.js → web-shell-static-XSCCMXKQ.js} +3 -3
  358. package/chunks/{workflow-O7L6VDYU.js → workflow-2LC5ZV4Z.js} +214 -73
  359. package/chunks/workspace-providers-status-4IJHDGCM.js +154 -0
  360. package/chunks/{workspace-registration-store-7G4E7YPY.js → workspace-registration-store-M4LBEY5A.js} +1 -1
  361. package/chunks/workspace-registry-D4HQ3TWX.js +160 -0
  362. package/chunks/workspace-runtime-coordinator-ZG3IRRQ6.js +163 -0
  363. package/chunks/workspace-service-7ORHK4P4.js +165 -0
  364. package/chunks/workspace-skills-status-J43O7A5Q.js +151 -0
  365. package/chunks/{workspace-trust-reconciler-XEBW5FUL.js → workspace-trust-reconciler-7ZMDX27O.js} +99 -75
  366. package/chunks/write-file-MWN2PNMG.js +107 -0
  367. package/chunks/{zh-TW-S3YTQ4DS.js → zh-TW-SRB5QSER.js} +16 -0
  368. package/chunks/{zh-F76MZTL3.js → zh-UBQIFP4A.js} +16 -0
  369. package/chunks/{zoom-image-RDPRTP4B.js → zoom-image-H7MLEC2E.js} +18 -13
  370. package/cli.js +14 -14
  371. package/export-transcript-document.js +52 -52
  372. package/locales/en.js +18 -0
  373. package/locales/zh-TW.js +17 -0
  374. package/locales/zh.js +17 -0
  375. package/package.json +3 -3
  376. package/web-shell/assets/{abnfDiagram-VCTEODGH-RxykUDmi.js → abnfDiagram-VCTEODGH-L57MVQ_O.js} +1 -1
  377. package/web-shell/assets/{arc-CZpgGCJC.js → arc-Cdl4BCU9.js} +1 -1
  378. package/web-shell/assets/{architectureDiagram-5GKGNRK7-BHSMzNDT.js → architectureDiagram-5GKGNRK7-wLGfVuoB.js} +1 -1
  379. package/web-shell/assets/{blockDiagram-NRAW4CY4-Bn4mF9SZ.js → blockDiagram-NRAW4CY4-LXdTypiA.js} +1 -1
  380. package/web-shell/assets/{c4Diagram-UCG6FXSJ-CBM-Bj6t.js → c4Diagram-UCG6FXSJ-Ci95CJAD.js} +1 -1
  381. package/web-shell/assets/channel-DwdlDVan.js +1 -0
  382. package/web-shell/assets/{chunk-2Q5K7J3B-D5Fin58O.js → chunk-2Q5K7J3B-CTb0CG3P.js} +1 -1
  383. package/web-shell/assets/{chunk-5VM5RSS4-CY05weF7.js → chunk-5VM5RSS4-BIyA8dbi.js} +1 -1
  384. package/web-shell/assets/{chunk-F27PBJKO-3neZnj5Y.js → chunk-F27PBJKO-BlcPeoaN.js} +1 -1
  385. package/web-shell/assets/{chunk-G27WJ6UU-Cd7EU4BE.js → chunk-G27WJ6UU-KdH5H1ne.js} +1 -1
  386. package/web-shell/assets/{chunk-JWPE2WC7-DwK1mqFw.js → chunk-JWPE2WC7-DEh0r7ty.js} +1 -1
  387. package/web-shell/assets/{chunk-LCL6LL3I-Sl7vY22C.js → chunk-LCL6LL3I-DwD-l0mq.js} +1 -1
  388. package/web-shell/assets/{chunk-POPQ4Y6H-BXNzpbVg.js → chunk-POPQ4Y6H-D_ybAWGG.js} +1 -1
  389. package/web-shell/assets/{chunk-SVP7TREG-DjjButcp.js → chunk-SVP7TREG-Bk6Dq0yA.js} +1 -1
  390. package/web-shell/assets/{chunk-XXDRQBXY-DNOiCjOJ.js → chunk-XXDRQBXY-D4vL2YuW.js} +1 -1
  391. package/web-shell/assets/classDiagram-DTDB5LWJ-CIyD-qft.js +1 -0
  392. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CIyD-qft.js +1 -0
  393. package/web-shell/assets/{cose-bilkent-JH36ORCC-BUnker7a.js → cose-bilkent-JH36ORCC-BditfMcM.js} +1 -1
  394. package/web-shell/assets/{cynefin-OW5HDTMX-DcUgdWE5.js → cynefin-OW5HDTMX-DAlaYMkD.js} +1 -1
  395. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CvDKsZsL.js → cynefinDiagram-5FMLGOSQ-B9jOfS3X.js} +1 -1
  396. package/web-shell/assets/{dagre-3AP2YEHR-jpCmUbr1.js → dagre-3AP2YEHR-DO6EyeMX.js} +1 -1
  397. package/web-shell/assets/{diagram-S7CK7UJ4-DBe_bKE5.js → diagram-S7CK7UJ4-DIwGJ7mC.js} +1 -1
  398. package/web-shell/assets/{diagram-UQ7AKVKN-oXvPpDgs.js → diagram-UQ7AKVKN-DT5RqZBV.js} +1 -1
  399. package/web-shell/assets/{diagram-VSXAHHWV-BD7-_SGh.js → diagram-VSXAHHWV-DJBMayCs.js} +1 -1
  400. package/web-shell/assets/{diagram-VX7I27RA-DOJL0wub.js → diagram-VX7I27RA-BllSiq1w.js} +1 -1
  401. package/web-shell/assets/{diagram-Z3DM3KII-DRIiodDD.js → diagram-Z3DM3KII-Vw1NsAH3.js} +1 -1
  402. package/web-shell/assets/{ebnfDiagram-PWID7BFC-Db31Ulmb.js → ebnfDiagram-PWID7BFC-TY7loKI3.js} +1 -1
  403. package/web-shell/assets/{erDiagram-SSCWMZ5O-CVHhwI2_.js → erDiagram-SSCWMZ5O-BYrxi-FK.js} +1 -1
  404. package/web-shell/assets/{flowDiagram-A5DVABFB-DWOFy1FK.js → flowDiagram-A5DVABFB-BTQ4IRh-.js} +1 -1
  405. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-C0sxQtPd.js → ganttDiagram-EL5Y4UJY-96GXN9_Z.js} +1 -1
  406. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-CNituBYC.js → gitGraphDiagram-WWUBYQGX-BgIxQjuh.js} +1 -1
  407. package/web-shell/assets/{index-B15NlwB8.js → index-BvmsVGIg.js} +472 -465
  408. package/web-shell/assets/{index-BSrS0tQ6.css → index-D0aLpdAG.css} +2 -2
  409. package/web-shell/assets/{index-gm9tLk7h.js → index-SPar5CcF.js} +1 -1
  410. package/web-shell/assets/{infoDiagram-RXCK75RN-CxhJYtIR.js → infoDiagram-RXCK75RN-BlyUMpEA.js} +1 -1
  411. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-By2mchUy.js → ishikawaDiagram-5VMMS53U-94uLMZ3k.js} +1 -1
  412. package/web-shell/assets/{journeyDiagram-EYS64GPL-CVH-OweI.js → journeyDiagram-EYS64GPL-DbnJfG3S.js} +1 -1
  413. package/web-shell/assets/{kanban-definition-3QL26DDD-Cc9dQXLy.js → kanban-definition-3QL26DDD-gjWM2ioU.js} +1 -1
  414. package/web-shell/assets/{layout-C_60ysHw.js → layout-CmDpGoK-.js} +1 -1
  415. package/web-shell/assets/{linear-BvAVfqwu.js → linear-DksWgqn0.js} +1 -1
  416. package/web-shell/assets/{mermaid.core-C3CoBKAc.js → mermaid.core-DCpE5atR.js} +6 -6
  417. package/web-shell/assets/{mindmap-definition-FBJOCRG2-Cuu8Q8LM.js → mindmap-definition-FBJOCRG2-DanEOvck.js} +1 -1
  418. package/web-shell/assets/{pegDiagram-XKGWAZYB-DmAeyDO2.js → pegDiagram-XKGWAZYB-V2ee76OP.js} +1 -1
  419. package/web-shell/assets/{pieDiagram-E7YTZNPT-B7vbB_xv.js → pieDiagram-E7YTZNPT-CYvmbkkp.js} +1 -1
  420. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-BqOBkRR7.js → quadrantDiagram-AXDQQJYC-BRkw6ha0.js} +1 -1
  421. package/web-shell/assets/{railroadDiagram-O6MQD6OU-sI06lZIu.js → railroadDiagram-O6MQD6OU-D_YmVT7T.js} +1 -1
  422. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Bg13d10S.js → requirementDiagram-EFPCY7ZU-DTF9UgWw.js} +1 -1
  423. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-WFOzZHrR.js → sankeyDiagram-P5KCCOFB-znmuOvtK.js} +1 -1
  424. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CCdRbA4E.js → sequenceDiagram-WJ2MYXX4-B8CE9gDr.js} +1 -1
  425. package/web-shell/assets/{sizeCapture-X5ZJPWSS-BH5F3bGg.js → sizeCapture-X5ZJPWSS-BqE_jooQ.js} +1 -1
  426. package/web-shell/assets/{stateDiagram-HBIQ2CUA-NwS2X3QB.js → stateDiagram-HBIQ2CUA-4AmlCOLW.js} +1 -1
  427. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DwExf4Jm.js +1 -0
  428. package/web-shell/assets/{swimlanes-XN3QIQJK-Bm38pM28.js → swimlanes-XN3QIQJK-B40gtZOq.js} +1 -1
  429. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-CXXUsHPj.js +8 -0
  430. package/web-shell/assets/{timeline-definition-24CTP7MA-Do-agLSo.js → timeline-definition-24CTP7MA-B23KIwTc.js} +1 -1
  431. package/web-shell/assets/{vennDiagram-4TSXK5OY-aggLfZzl.js → vennDiagram-4TSXK5OY-eyJpBjg6.js} +1 -1
  432. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-D5JR3mXX.js → wardleyDiagram-VM6X3IG4-BBjaaHeP.js} +1 -1
  433. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DhtLDuXs.js → xychartDiagram-S5SC5T6Z-Cq3Bnvj4.js} +1 -1
  434. package/web-shell/index.html +2 -2
  435. package/chunks/MaxSizedBox-FCF6M53W.js +0 -124
  436. package/chunks/acp-subagent-executor-TND6W2O5.js +0 -140
  437. package/chunks/agent-headless-EJ4QOUSM.js +0 -94
  438. package/chunks/bridge-MUX5YJZT.js +0 -132
  439. package/chunks/channel-settings-store-7CBIRZER.js +0 -134
  440. package/chunks/chunk-FIJODK52.js +0 -154
  441. package/chunks/chunk-OALXNGUA.js +0 -2137
  442. package/chunks/chunk-PF7GAP6K.js +0 -16861
  443. package/chunks/config-utils-KX2YS725.js +0 -127
  444. package/chunks/contextCommand-RV6Y5LNJ.js +0 -120
  445. package/chunks/daemon-status-provider-NULJNAEV.js +0 -131
  446. package/chunks/daemon-trust-policy-S4KWGPV3.js +0 -126
  447. package/chunks/deferred-core-runtime-T23ZT443.js +0 -128
  448. package/chunks/environment-TSQJUTPV.js +0 -143
  449. package/chunks/errors-RIVYJS6T.js +0 -127
  450. package/chunks/exitPlanMode-BYBBFN2T.js +0 -92
  451. package/chunks/handleAutoUpdate-FZP45KOR.js +0 -123
  452. package/chunks/i18n-OTB62AKW.js +0 -140
  453. package/chunks/initializer-4JXZEC4B.js +0 -127
  454. package/chunks/installationInfo-2IJV5QKC.js +0 -121
  455. package/chunks/list-KQSQ4A5G.js +0 -130
  456. package/chunks/loadedSettingsAdapter-TZTTNRHI.js +0 -124
  457. package/chunks/mcp-TFDTUPIA.js +0 -124
  458. package/chunks/model-configuration-ZCAKKIOF.js +0 -137
  459. package/chunks/modelConfigUtils-J3ZPW7ZK.js +0 -116
  460. package/chunks/nonInteractiveCli-GPT3TVOK.js +0 -211
  461. package/chunks/pidfile-GBTBIGHF.js +0 -127
  462. package/chunks/prompt-terminal-ledger-ILIXZI3E.js +0 -119
  463. package/chunks/read-file-G4XKW2CS.js +0 -31
  464. package/chunks/record-source-2GSY5JD5.js +0 -22
  465. package/chunks/resumeHistoryUtils-YPJU4XFE.js +0 -132
  466. package/chunks/ripGrep-AAKMALLM.js +0 -39
  467. package/chunks/runtime-SJCRYNPA.js +0 -164
  468. package/chunks/sandbox-UIXL423Z.js +0 -146
  469. package/chunks/sandboxConfig-CY343YNJ.js +0 -114
  470. package/chunks/scheduled-tasks-5UGBEVNZ.js +0 -143
  471. package/chunks/scheduler-GCZYLZ2P.js +0 -136
  472. package/chunks/serve-2XXQLVK2.js +0 -132
  473. package/chunks/session-attachments-root-DHQM5IEZ.js +0 -117
  474. package/chunks/skill-settings-IXG5CTQO.js +0 -140
  475. package/chunks/spawnChannel-Q3YALTCJ.js +0 -128
  476. package/chunks/standalone-update-H5OJ7MM7.js +0 -132
  477. package/chunks/task-create-75HVPEAH.js +0 -28
  478. package/chunks/terminal-image-renderer-UDPJPGPQ.js +0 -132
  479. package/chunks/theme-manager-SK57EKMO.js +0 -116
  480. package/chunks/total-session-admission-UUZBDQCG.js +0 -127
  481. package/chunks/trustedFolders-4LDBLNTS.js +0 -136
  482. package/chunks/updateCheck-PKSSORPO.js +0 -132
  483. package/chunks/useAutoAcceptIndicator-I32UEQPI.js +0 -134
  484. package/chunks/workspace-providers-status-WRX6CJM4.js +0 -130
  485. package/chunks/workspace-registry-SXIMGT4D.js +0 -136
  486. package/chunks/workspace-runtime-coordinator-7DOEHXYT.js +0 -139
  487. package/chunks/workspace-service-HDXOZMYC.js +0 -141
  488. package/chunks/workspace-skills-status-VN4L37CA.js +0 -127
  489. package/chunks/write-file-LKX4ETIO.js +0 -97
  490. package/web-shell/assets/channel-DFYs_LlK.js +0 -1
  491. package/web-shell/assets/classDiagram-DTDB5LWJ-DnGrKXoM.js +0 -1
  492. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DnGrKXoM.js +0 -1
  493. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-1aU2JZXO.js +0 -1
  494. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dp-u6kQG.js +0 -8
  495. package/chunks/{chunk-XAJZFGD2.js → chunk-PXXYQOZO.js} +8 -8
  496. package/chunks/{chunk-WVURIAEE.js → chunk-SVWWF5TZ.js} +3 -3
  497. package/chunks/{dist-G5UMXIGF.js → dist-I6D6XOWV.js} +1 -1
  498. package/chunks/{dist-UXVNLQHG.js → dist-VIKOMAGG.js} +3 -3
@@ -0,0 +1,1252 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ isPlainRecord
5
+ } from "./chunk-BQMSZSG6.js";
6
+ import {
7
+ SchemaValidator,
8
+ ToolNames
9
+ } from "./chunk-ERIBG3BX.js";
10
+ import {
11
+ createDebugLogger
12
+ } from "./chunk-ZYDMQCQP.js";
13
+ import {
14
+ init_esbuild_shims
15
+ } from "./chunk-5O2XNYP6.js";
16
+ import {
17
+ __name
18
+ } from "./chunk-J2S4EL5Y.js";
19
+
20
+ // packages/core/src/omni/policy/config.ts
21
+ init_esbuild_shims();
22
+
23
+ // packages/core/src/omni/recovery.ts
24
+ init_esbuild_shims();
25
+ import { createHash } from "node:crypto";
26
+ import { createReadStream } from "node:fs";
27
+ import fs from "node:fs/promises";
28
+ import path from "node:path";
29
+ import { pipeline } from "node:stream/promises";
30
+ var debugLogger = createDebugLogger("omni:recovery");
31
+ var PART_RETENTION_MS = 48 * 36e5;
32
+ var SAMPLE_VERIFY_LIMIT = 3;
33
+ var SAMPLE_VERIFY_MAX_BYTES = 64 * 1024 * 1024;
34
+ var TMP_GRACE_MS = 36e5;
35
+ var STAGING_GRACE_MS = 36e5;
36
+ var QUARANTINE_RETENTION_DAYS = 7;
37
+ var QUARANTINE_MAX_BYTES = 5 * 1024 * 1024 * 1024;
38
+ var recoveryOnce = /* @__PURE__ */ new Map();
39
+ function resetRecoveryLatchForTests() {
40
+ recoveryOnce.clear();
41
+ }
42
+ __name(resetRecoveryLatchForTests, "resetRecoveryLatchForTests");
43
+ async function isRealDirectory(p) {
44
+ try {
45
+ return (await fs.lstat(p)).isDirectory();
46
+ } catch {
47
+ return false;
48
+ }
49
+ }
50
+ __name(isRealDirectory, "isRealDirectory");
51
+ async function sweepDownloads(downloadsDir) {
52
+ if (!await isRealDirectory(downloadsDir)) return;
53
+ let names;
54
+ try {
55
+ names = await fs.readdir(downloadsDir);
56
+ } catch {
57
+ return;
58
+ }
59
+ const cutoff = Date.now() - PART_RETENTION_MS;
60
+ for (const name of names) {
61
+ if (!name.endsWith(".part")) continue;
62
+ const p = path.join(downloadsDir, name);
63
+ try {
64
+ const st = await fs.lstat(p);
65
+ if (!st.isFile()) continue;
66
+ if (st.mtimeMs < cutoff) {
67
+ await fs.rm(p, { force: true });
68
+ debugLogger.debug(`recovery: removed expired download ${name}`);
69
+ }
70
+ } catch {
71
+ }
72
+ }
73
+ }
74
+ __name(sweepDownloads, "sweepDownloads");
75
+ async function sweepStaging(stagingDir) {
76
+ if (!await isRealDirectory(stagingDir)) return;
77
+ let names;
78
+ try {
79
+ names = await fs.readdir(stagingDir);
80
+ } catch {
81
+ return;
82
+ }
83
+ for (const name of names) {
84
+ const p = path.join(stagingDir, name);
85
+ try {
86
+ const st = await fs.lstat(p);
87
+ if (!st.isSymbolicLink() && Date.now() - st.mtimeMs < STAGING_GRACE_MS) {
88
+ continue;
89
+ }
90
+ await fs.rm(p, { recursive: true, force: true });
91
+ debugLogger.debug(`recovery: removed uncommitted staging ${name}`);
92
+ } catch {
93
+ }
94
+ }
95
+ }
96
+ __name(sweepStaging, "sweepStaging");
97
+ async function directorySizeBytes(dir) {
98
+ let total = 0;
99
+ let names;
100
+ try {
101
+ names = await fs.readdir(dir);
102
+ } catch {
103
+ return total;
104
+ }
105
+ for (const name of names) {
106
+ const p = path.join(dir, name);
107
+ try {
108
+ const st = await fs.lstat(p);
109
+ if (st.isFile()) {
110
+ total += st.size;
111
+ } else if (st.isDirectory()) {
112
+ total += await directorySizeBytes(p);
113
+ }
114
+ } catch {
115
+ }
116
+ }
117
+ return total;
118
+ }
119
+ __name(directorySizeBytes, "directorySizeBytes");
120
+ async function sweepQuarantine(quarantineDir, retentionMs, maxBytes) {
121
+ if (!await isRealDirectory(quarantineDir)) return;
122
+ let names;
123
+ try {
124
+ names = await fs.readdir(quarantineDir);
125
+ } catch {
126
+ return;
127
+ }
128
+ const entries = [];
129
+ const cutoff = Date.now() - retentionMs;
130
+ for (const name of names) {
131
+ const p = path.join(quarantineDir, name);
132
+ if (!await isRealDirectory(p)) continue;
133
+ try {
134
+ const st = await fs.lstat(p);
135
+ if (st.mtimeMs < cutoff) {
136
+ await fs.rm(p, { recursive: true, force: true });
137
+ debugLogger.debug(`recovery: removed expired quarantine ${name}`);
138
+ continue;
139
+ }
140
+ entries.push({
141
+ name,
142
+ mtimeMs: st.mtimeMs,
143
+ sizeBytes: await directorySizeBytes(p)
144
+ });
145
+ } catch {
146
+ }
147
+ }
148
+ let total = entries.reduce((sum, e) => sum + e.sizeBytes, 0);
149
+ if (total <= maxBytes) return;
150
+ entries.sort((a, b) => a.mtimeMs - b.mtimeMs);
151
+ for (const entry of entries) {
152
+ if (total <= maxBytes) break;
153
+ try {
154
+ await fs.rm(path.join(quarantineDir, entry.name), {
155
+ recursive: true,
156
+ force: true
157
+ });
158
+ total -= entry.sizeBytes;
159
+ debugLogger.debug(
160
+ `recovery: removed quarantine ${entry.name} (over size budget)`
161
+ );
162
+ } catch {
163
+ }
164
+ }
165
+ }
166
+ __name(sweepQuarantine, "sweepQuarantine");
167
+ async function sweepTmpFiles(objectsDir) {
168
+ if (!await isRealDirectory(objectsDir)) return;
169
+ let shards;
170
+ try {
171
+ shards = await fs.readdir(objectsDir);
172
+ } catch {
173
+ return;
174
+ }
175
+ for (const shard of shards) {
176
+ const shardDir = path.join(objectsDir, shard);
177
+ if (!await isRealDirectory(shardDir)) continue;
178
+ let names;
179
+ try {
180
+ names = await fs.readdir(shardDir);
181
+ } catch {
182
+ continue;
183
+ }
184
+ for (const name of names) {
185
+ if (!name.startsWith(".tmp-")) continue;
186
+ const p = path.join(shardDir, name);
187
+ try {
188
+ const st = await fs.lstat(p);
189
+ if (Date.now() - st.mtimeMs < TMP_GRACE_MS) continue;
190
+ await fs.rm(p, { force: true });
191
+ debugLogger.debug(`recovery: removed orphan temp ${shard}/${name}`);
192
+ } catch {
193
+ }
194
+ }
195
+ }
196
+ }
197
+ __name(sweepTmpFiles, "sweepTmpFiles");
198
+ async function sampleVerifyObjects(objectsDir, uploadCache, degradationCache, limit, maxBytes) {
199
+ const candidates = [];
200
+ if (!await isRealDirectory(objectsDir)) return;
201
+ let shards;
202
+ try {
203
+ shards = await fs.readdir(objectsDir);
204
+ } catch {
205
+ return;
206
+ }
207
+ for (const shard of shards) {
208
+ if (!await isRealDirectory(path.join(objectsDir, shard))) continue;
209
+ let names = [];
210
+ try {
211
+ names = await fs.readdir(path.join(objectsDir, shard));
212
+ } catch {
213
+ continue;
214
+ }
215
+ for (const name of names) {
216
+ if (!name.startsWith(".")) candidates.push(path.join(shard, name));
217
+ }
218
+ }
219
+ if (candidates.length === 0 || limit <= 0) return;
220
+ candidates.sort();
221
+ const n = candidates.length;
222
+ const stride = Math.max(1, Math.floor(n / limit));
223
+ const seed = Math.floor(Date.now() / 864e5) % n;
224
+ const picked = /* @__PURE__ */ new Set();
225
+ for (let k = 0; k < limit && picked.size < n; k++) {
226
+ picked.add((seed + k * stride) % n);
227
+ }
228
+ for (const i of picked) {
229
+ const rel = candidates[i];
230
+ const full = path.join(objectsDir, rel);
231
+ const expected = path.basename(rel).split(".")[0];
232
+ try {
233
+ const st = await fs.lstat(full);
234
+ if (!st.isFile()) continue;
235
+ if (st.size > maxBytes) continue;
236
+ const hash = createHash("sha256");
237
+ await pipeline(createReadStream(full), hash);
238
+ if (hash.digest("hex") !== expected) {
239
+ await fs.rm(full, { force: true });
240
+ await uploadCache?.removeBySha256(expected);
241
+ await degradationCache?.removeByOriginalSha256(expected);
242
+ await degradationCache?.removeByDegradedSha256(expected);
243
+ debugLogger.debug(
244
+ `recovery: removed corrupt object ${rel} (hash mismatch)`
245
+ );
246
+ }
247
+ } catch {
248
+ }
249
+ }
250
+ }
251
+ __name(sampleVerifyObjects, "sampleVerifyObjects");
252
+ function runStartupRecoveryOnce(store, uploadCache, options) {
253
+ let root;
254
+ try {
255
+ root = store.getOmniRootDir();
256
+ } catch (err) {
257
+ debugLogger.debug(
258
+ `recovery scan failed (ignored): ${err instanceof Error ? err.message : err}`
259
+ );
260
+ return Promise.resolve();
261
+ }
262
+ let scan = recoveryOnce.get(root);
263
+ if (!scan) {
264
+ scan = (async () => {
265
+ if (!await isRealDirectory(root)) return;
266
+ await sweepStaging(path.join(root, "staging"));
267
+ await sweepDownloads(path.join(root, "downloads"));
268
+ await sweepQuarantine(
269
+ path.join(root, "quarantine"),
270
+ (options?.quarantineRetentionDays ?? QUARANTINE_RETENTION_DAYS) * 864e5,
271
+ options?.quarantineMaxBytes ?? QUARANTINE_MAX_BYTES
272
+ );
273
+ if (!await isRealDirectory(path.join(root, "objects"))) return;
274
+ await sweepTmpFiles(store.getObjectsDir());
275
+ await sampleVerifyObjects(
276
+ store.getObjectsDir(),
277
+ uploadCache,
278
+ options?.degradationCache,
279
+ options?.sampleVerifyLimit ?? SAMPLE_VERIFY_LIMIT,
280
+ options?.sampleVerifyMaxBytes ?? SAMPLE_VERIFY_MAX_BYTES
281
+ );
282
+ })().catch((err) => {
283
+ debugLogger.debug(
284
+ `recovery scan failed (ignored): ${err instanceof Error ? err.message : err}`
285
+ );
286
+ });
287
+ recoveryOnce.set(root, scan);
288
+ }
289
+ return scan;
290
+ }
291
+ __name(runStartupRecoveryOnce, "runStartupRecoveryOnce");
292
+
293
+ // packages/core/src/omni/policy/conditions.ts
294
+ init_esbuild_shims();
295
+ var RESOURCE_CONDITION_FIELDS = [
296
+ "sizeBytes",
297
+ "durationMs",
298
+ "width",
299
+ "height",
300
+ "maxWidth",
301
+ "maxHeight",
302
+ "frameRate",
303
+ "frameCount",
304
+ "bitRate",
305
+ "sampleRateHz",
306
+ "channels",
307
+ "estimatedTokenCount"
308
+ ];
309
+ var REQUEST_CONDITION_FIELDS = ["totalEstimatedMediaTokens"];
310
+ var SESSION_CONDITION_FIELDS = [
311
+ "contextWindowTokens",
312
+ "promptTokenCount",
313
+ "reservedOutputTokens",
314
+ "availableContextTokens"
315
+ ];
316
+ var MEMORY_CONDITION_FIELDS = [
317
+ "hasTranscript",
318
+ "hasOcr",
319
+ "hasCaption",
320
+ "hasSummary",
321
+ "hasKeyframes",
322
+ "hasClip"
323
+ ];
324
+ var MATCH = { outcome: "match" };
325
+ var NO_MATCH = { outcome: "no_match" };
326
+ function unavailable(missingFields) {
327
+ return { outcome: "unavailable", missingFields: [...new Set(missingFields)] };
328
+ }
329
+ __name(unavailable, "unavailable");
330
+ function isPlainObject(v) {
331
+ return typeof v === "object" && v !== null && !Array.isArray(v);
332
+ }
333
+ __name(isPlainObject, "isPlainObject");
334
+ var COMPARISON_OPERATORS = [
335
+ ">",
336
+ ">=",
337
+ "<",
338
+ "<=",
339
+ "==",
340
+ "!="
341
+ ];
342
+ function isComparisonOperator(v) {
343
+ return COMPARISON_OPERATORS.includes(v);
344
+ }
345
+ __name(isComparisonOperator, "isComparisonOperator");
346
+ var KNOWN_FIELDS = /* @__PURE__ */ new Set([
347
+ ...RESOURCE_CONDITION_FIELDS.map((f) => `resource.${f}`),
348
+ ...REQUEST_CONDITION_FIELDS.map((f) => `request.${f}`),
349
+ ...SESSION_CONDITION_FIELDS.map((f) => `session.${f}`),
350
+ ...MEMORY_CONDITION_FIELDS.map((f) => `memory.${f}`)
351
+ ]);
352
+ function conditionUsesNamespace(condition, namespace) {
353
+ const node = condition;
354
+ if (!Array.isArray(node)) return false;
355
+ const prefix = `${namespace}.`;
356
+ for (const operand of node) {
357
+ if (!Array.isArray(operand)) continue;
358
+ if (operand.length === 2 && operand[0] === "field" && typeof operand[1] === "string") {
359
+ if (operand[1].startsWith(prefix)) return true;
360
+ continue;
361
+ }
362
+ if (conditionUsesNamespace(operand, namespace)) {
363
+ return true;
364
+ }
365
+ }
366
+ return false;
367
+ }
368
+ __name(conditionUsesNamespace, "conditionUsesNamespace");
369
+ function resolveOperand(operand, context) {
370
+ if (Array.isArray(operand)) {
371
+ if (operand.length !== 2 || operand[0] !== "field" || typeof operand[1] !== "string") {
372
+ return { ok: false, missing: "<malformed operand>" };
373
+ }
374
+ const field = operand[1];
375
+ if (!KNOWN_FIELDS.has(field)) {
376
+ return { ok: false, missing: field };
377
+ }
378
+ const [namespace, name] = field.split(".");
379
+ const value = context[namespace]?.[name];
380
+ if (typeof value !== "number" || Number.isNaN(value)) {
381
+ return { ok: false, missing: field };
382
+ }
383
+ return { ok: true, value, describe: field };
384
+ }
385
+ if (typeof operand === "number" || typeof operand === "string" || typeof operand === "boolean") {
386
+ return { ok: true, value: operand, describe: "value" };
387
+ }
388
+ return { ok: false, missing: "<malformed operand>" };
389
+ }
390
+ __name(resolveOperand, "resolveOperand");
391
+ function evaluateComparison(operator, leftRaw, rightRaw, context) {
392
+ const left = resolveOperand(leftRaw, context);
393
+ const right = resolveOperand(rightRaw, context);
394
+ if (!left.ok || !right.ok) {
395
+ const missing = [];
396
+ if (!left.ok) missing.push(left.missing);
397
+ if (!right.ok) missing.push(right.missing);
398
+ return unavailable(missing);
399
+ }
400
+ if (operator === "==" || operator === "!=") {
401
+ const equal = left.value === right.value;
402
+ return equal === (operator === "==") ? MATCH : NO_MATCH;
403
+ }
404
+ if (typeof left.value !== "number" || typeof right.value !== "number" || !Number.isFinite(left.value) || !Number.isFinite(right.value)) {
405
+ const missing = [];
406
+ if (typeof left.value !== "number" || !Number.isFinite(left.value)) {
407
+ missing.push(`${left.describe} (not orderable)`);
408
+ }
409
+ if (typeof right.value !== "number" || !Number.isFinite(right.value)) {
410
+ missing.push(`${right.describe} (not orderable)`);
411
+ }
412
+ return unavailable(missing);
413
+ }
414
+ switch (operator) {
415
+ case ">":
416
+ return left.value > right.value ? MATCH : NO_MATCH;
417
+ case ">=":
418
+ return left.value >= right.value ? MATCH : NO_MATCH;
419
+ case "<":
420
+ return left.value < right.value ? MATCH : NO_MATCH;
421
+ case "<=":
422
+ return left.value <= right.value ? MATCH : NO_MATCH;
423
+ default: {
424
+ const exhaustive = operator;
425
+ return unavailable([`unknown operator ${String(exhaustive)}`]);
426
+ }
427
+ }
428
+ }
429
+ __name(evaluateComparison, "evaluateComparison");
430
+ function evaluateFixedPolicyCondition(condition, context) {
431
+ const node = condition;
432
+ if (!Array.isArray(node) || node.length === 0) {
433
+ return unavailable(["<malformed condition>"]);
434
+ }
435
+ const head = node[0];
436
+ if (head === "all" || head === "any") {
437
+ const isAll = head === "all";
438
+ const missing = [];
439
+ let sawUnavailable = false;
440
+ for (let i = 1; i < node.length; i++) {
441
+ const result = evaluateFixedPolicyCondition(
442
+ node[i],
443
+ context
444
+ );
445
+ if (result.outcome === "unavailable") {
446
+ sawUnavailable = true;
447
+ missing.push(...result.missingFields);
448
+ continue;
449
+ }
450
+ if (isAll && result.outcome === "no_match") return NO_MATCH;
451
+ if (!isAll && result.outcome === "match") return MATCH;
452
+ }
453
+ if (sawUnavailable) return unavailable(missing);
454
+ return isAll ? MATCH : NO_MATCH;
455
+ }
456
+ if (head === "!") {
457
+ if (node.length !== 2) {
458
+ return unavailable(["<malformed condition>"]);
459
+ }
460
+ const result = evaluateFixedPolicyCondition(
461
+ node[1],
462
+ context
463
+ );
464
+ if (result.outcome === "unavailable") return result;
465
+ return result.outcome === "match" ? NO_MATCH : MATCH;
466
+ }
467
+ if (isComparisonOperator(head) && node.length === 3) {
468
+ return evaluateComparison(head, node[1], node[2], context);
469
+ }
470
+ return unavailable(["<malformed condition>"]);
471
+ }
472
+ __name(evaluateFixedPolicyCondition, "evaluateFixedPolicyCondition");
473
+ function validateOperand(raw, operator, where, errors) {
474
+ if (Array.isArray(raw)) {
475
+ if (raw.length !== 2 || raw[0] !== "field") {
476
+ errors.push(
477
+ `${where}: field reference must be ["field", "<namespace.field>"]`
478
+ );
479
+ return;
480
+ }
481
+ if (typeof raw[1] !== "string" || !KNOWN_FIELDS.has(raw[1])) {
482
+ errors.push(`${where}: unknown field ${JSON.stringify(raw[1])}`);
483
+ }
484
+ return;
485
+ }
486
+ if (typeof raw !== "number" && typeof raw !== "string" && typeof raw !== "boolean") {
487
+ errors.push(`${where}: literal must be a number, string, or boolean`);
488
+ return;
489
+ }
490
+ if (operator !== "==" && operator !== "!=") {
491
+ if (typeof raw !== "number" || !Number.isFinite(raw)) {
492
+ errors.push(
493
+ `${where}: operator "${operator}" requires a finite numeric literal`
494
+ );
495
+ }
496
+ }
497
+ }
498
+ __name(validateOperand, "validateOperand");
499
+ function validateFixedPolicyCondition(raw, where = "when") {
500
+ const errors = [];
501
+ if (isPlainObject(raw)) {
502
+ errors.push(
503
+ `${where}: condition must be an expression array like [">", ["field", "resource.width"], 3000] or ["all", <expr>, ...] (the {left, operator, right} object form is no longer supported)`
504
+ );
505
+ return errors;
506
+ }
507
+ if (!Array.isArray(raw) || raw.length === 0 || typeof raw[0] !== "string") {
508
+ errors.push(
509
+ `${where}: condition must be an expression array [operator, ...operands]`
510
+ );
511
+ return errors;
512
+ }
513
+ const head = raw[0];
514
+ if (head === "all" || head === "any") {
515
+ if (raw.length < 2) {
516
+ errors.push(
517
+ `${where}: "${head}" requires at least one operand condition`
518
+ );
519
+ return errors;
520
+ }
521
+ for (let i = 1; i < raw.length; i++) {
522
+ errors.push(...validateFixedPolicyCondition(raw[i], `${where}[${i}]`));
523
+ }
524
+ return errors;
525
+ }
526
+ if (head === "!") {
527
+ if (raw.length !== 2) {
528
+ errors.push(`${where}: "!" takes exactly one operand condition`);
529
+ return errors;
530
+ }
531
+ errors.push(...validateFixedPolicyCondition(raw[1], `${where}[1]`));
532
+ return errors;
533
+ }
534
+ if (!isComparisonOperator(head)) {
535
+ errors.push(
536
+ `${where}[0]: unknown operator ${JSON.stringify(head)} (expected one of ${COMPARISON_OPERATORS.join(", ")}, all, any, !)`
537
+ );
538
+ return errors;
539
+ }
540
+ if (raw.length !== 3) {
541
+ errors.push(`${where}: comparison "${head}" takes exactly two operands`);
542
+ return errors;
543
+ }
544
+ validateOperand(raw[1], head, `${where}[1]`, errors);
545
+ validateOperand(raw[2], head, `${where}[2]`, errors);
546
+ return errors;
547
+ }
548
+ __name(validateFixedPolicyCondition, "validateFixedPolicyCondition");
549
+
550
+ // packages/core/src/omni/policy/config.ts
551
+ var OmniPolicyConfigError = class extends Error {
552
+ static {
553
+ __name(this, "OmniPolicyConfigError");
554
+ }
555
+ constructor(message) {
556
+ super(message);
557
+ this.name = "OmniPolicyConfigError";
558
+ }
559
+ };
560
+ var DEFAULT_OMNI_PROCESSING_LIMITS = {
561
+ maxConcurrentResources: 1,
562
+ reservedOutputTokens: 8192,
563
+ maxLineageDepth: 8,
564
+ maxPolicyRunsPerRoot: 64,
565
+ maxArtifactsPerRoot: 256,
566
+ maxDerivedBytesPerRoot: 1024 * 1024 * 1024,
567
+ maxTransportPasses: 3
568
+ };
569
+ var GIB = 1024 * 1024 * 1024;
570
+ var MAX_UPLOAD_FILE_BYTES_CEILING = GIB;
571
+ var MAX_URL_TTL_HOURS = 48;
572
+ var POLICY_ENTRY_KEYS = /* @__PURE__ */ new Set([
573
+ "priority",
574
+ "mediaTypes",
575
+ "origins",
576
+ "when",
577
+ "onConditionUnavailable",
578
+ "toolName",
579
+ "arguments",
580
+ "maxRunsPerLineage",
581
+ "onFailure",
582
+ "output",
583
+ "description"
584
+ ]);
585
+ var MAX_POLICY_DESCRIPTION_CHARS = 600;
586
+ var OUTPUT_KEYS = /* @__PURE__ */ new Set(["reprocessMedia", "source", "artifacts"]);
587
+ var ARTIFACT_SELECTOR_KINDS = /* @__PURE__ */ new Set(["image", "video", "audio", "file"]);
588
+ var MODALITIES = ["image", "video", "audio"];
589
+ var ORIGINS = ["user", "tool", "policy"];
590
+ var RESERVED_ARGUMENT_KEYS = ["inputPath", "outputDir", "resourceId"];
591
+ var POLICY_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
592
+ function systemDefaultTransportGuardPolicies() {
593
+ return {
594
+ "image-downsample": {
595
+ mediaTypes: ["image"],
596
+ toolName: ToolNames.OMNI_DOWNSAMPLE_IMAGE
597
+ },
598
+ "video-downscale": {
599
+ mediaTypes: ["video"],
600
+ toolName: ToolNames.OMNI_DOWNSCALE_VIDEO
601
+ },
602
+ "audio-downsample": {
603
+ mediaTypes: ["audio"],
604
+ toolName: ToolNames.OMNI_DOWNSAMPLE_AUDIO
605
+ }
606
+ };
607
+ }
608
+ __name(systemDefaultTransportGuardPolicies, "systemDefaultTransportGuardPolicies");
609
+ function fail(message) {
610
+ throw new OmniPolicyConfigError(message);
611
+ }
612
+ __name(fail, "fail");
613
+ function rejectUnknownKeys(record, where, known) {
614
+ for (const key of Object.keys(record)) {
615
+ if (!known.includes(key)) {
616
+ fail(`${where}: unknown key "${key}"`);
617
+ }
618
+ }
619
+ }
620
+ __name(rejectUnknownKeys, "rejectUnknownKeys");
621
+ function requirePositiveInteger(value, where, { allowZero = false } = {}) {
622
+ if (typeof value !== "number" || !Number.isInteger(value) || (allowZero ? value < 0 : value <= 0)) {
623
+ fail(
624
+ `${where}: must be ${allowZero ? "a non-negative" : "a positive"} integer (got ${JSON.stringify(value)})`
625
+ );
626
+ }
627
+ return value;
628
+ }
629
+ __name(requirePositiveInteger, "requirePositiveInteger");
630
+ function mergePolicyMaps(defaults, raw, where, { allowTombstones }) {
631
+ const merged = Object.assign(
632
+ /* @__PURE__ */ Object.create(null),
633
+ defaults
634
+ );
635
+ if (raw === void 0) {
636
+ return merged;
637
+ }
638
+ if (!isPlainRecord(raw)) {
639
+ fail(`${where}: must be an object map of policy id \u2192 policy`);
640
+ }
641
+ for (const [id, entry] of Object.entries(raw)) {
642
+ if (entry === null) {
643
+ if (!allowTombstones) {
644
+ fail(
645
+ `${where}.${id}: transport guard policies cannot be removed (the guard is mandatory); override the entry instead`
646
+ );
647
+ }
648
+ delete merged[id];
649
+ continue;
650
+ }
651
+ if (!isPlainRecord(entry)) {
652
+ fail(`${where}.${id}: must be an object (or null to remove a default)`);
653
+ }
654
+ merged[id] = entry;
655
+ }
656
+ return merged;
657
+ }
658
+ __name(mergePolicyMaps, "mergePolicyMaps");
659
+ function normalizePolicy(id, entry, stage, where, tools) {
660
+ if (!POLICY_ID_PATTERN.test(id)) {
661
+ fail(
662
+ `${where}.${id}: policy id must match ${POLICY_ID_PATTERN} (letters, digits, ".", "_", "-")`
663
+ );
664
+ }
665
+ for (const key of Object.keys(entry)) {
666
+ if (!POLICY_ENTRY_KEYS.has(key)) {
667
+ fail(`${where}.${id}: unknown key "${key}"`);
668
+ }
669
+ }
670
+ let description;
671
+ if (entry["description"] !== void 0) {
672
+ if (typeof entry["description"] !== "string") {
673
+ fail(`${where}.${id}.description: must be a string`);
674
+ }
675
+ const trimmed = entry["description"].trim();
676
+ if (trimmed.length > MAX_POLICY_DESCRIPTION_CHARS) {
677
+ fail(
678
+ `${where}.${id}.description: must be \u2264 ${MAX_POLICY_DESCRIPTION_CHARS} characters (got ${trimmed.length})`
679
+ );
680
+ }
681
+ if (trimmed.length > 0) description = trimmed;
682
+ }
683
+ const priority = entry["priority"] === void 0 ? 0 : typeof entry["priority"] === "number" && Number.isFinite(entry["priority"]) ? entry["priority"] : fail(`${where}.${id}.priority: must be a finite number`);
684
+ const rawMediaTypes = entry["mediaTypes"];
685
+ if (!Array.isArray(rawMediaTypes) || rawMediaTypes.length === 0) {
686
+ fail(`${where}.${id}.mediaTypes: must be a non-empty array`);
687
+ }
688
+ for (const m of rawMediaTypes) {
689
+ if (!MODALITIES.includes(m)) {
690
+ fail(
691
+ `${where}.${id}.mediaTypes: unknown modality ${JSON.stringify(m)} (expected ${MODALITIES.join(", ")})`
692
+ );
693
+ }
694
+ }
695
+ const mediaTypes = [...new Set(rawMediaTypes)];
696
+ const rawOrigins = entry["origins"] ?? ["user", "tool"];
697
+ if (!Array.isArray(rawOrigins) || rawOrigins.length === 0) {
698
+ fail(`${where}.${id}.origins: must be a non-empty array`);
699
+ }
700
+ for (const o of rawOrigins) {
701
+ if (!ORIGINS.includes(o)) {
702
+ fail(
703
+ `${where}.${id}.origins: unknown origin ${JSON.stringify(o)} (expected ${ORIGINS.join(", ")})`
704
+ );
705
+ }
706
+ }
707
+ const origins = [...new Set(rawOrigins)];
708
+ const onConditionUnavailable = entry["onConditionUnavailable"] ?? "skip";
709
+ if (onConditionUnavailable === "abortTurn") {
710
+ fail(
711
+ `${where}.${id}.onConditionUnavailable: "abortTurn" is not yet supported (design reserves it for a later stage); use "skip" or "run"`
712
+ );
713
+ }
714
+ if (onConditionUnavailable !== "skip" && onConditionUnavailable !== "run") {
715
+ fail(
716
+ `${where}.${id}.onConditionUnavailable: must be "skip" or "run" (got ${JSON.stringify(onConditionUnavailable)})`
717
+ );
718
+ }
719
+ const onFailure = entry["onFailure"] ?? "continue";
720
+ if (onFailure !== "continue" && onFailure !== "abort") {
721
+ fail(
722
+ `${where}.${id}.onFailure: must be "continue" or "abort" (got ${JSON.stringify(onFailure)})`
723
+ );
724
+ }
725
+ const maxRunsPerLineage = entry["maxRunsPerLineage"] === void 0 ? 1 : requirePositiveInteger(
726
+ entry["maxRunsPerLineage"],
727
+ `${where}.${id}.maxRunsPerLineage`
728
+ );
729
+ const rawOutput = entry["output"] ?? {};
730
+ if (!isPlainRecord(rawOutput)) {
731
+ fail(`${where}.${id}.output: must be an object`);
732
+ }
733
+ for (const key of Object.keys(rawOutput)) {
734
+ if (!OUTPUT_KEYS.has(key)) {
735
+ fail(`${where}.${id}.output: unknown key "${key}"`);
736
+ }
737
+ }
738
+ const reprocessMedia = rawOutput["reprocessMedia"] ?? false;
739
+ if (typeof reprocessMedia !== "boolean") {
740
+ fail(`${where}.${id}.output.reprocessMedia: must be a boolean`);
741
+ }
742
+ const source = rawOutput["source"] ?? "omit";
743
+ if (source !== "keep" && source !== "omit") {
744
+ fail(
745
+ `${where}.${id}.output.source: must be "keep" or "omit" (got ${JSON.stringify(source)})`
746
+ );
747
+ }
748
+ if (stage === "transport_guard" && source !== "omit") {
749
+ fail(
750
+ `${where}.${id}.output.source: transport guard policies must use "omit" (the over-limit source cannot stay in the delivery set)`
751
+ );
752
+ }
753
+ const rawArtifacts = rawOutput["artifacts"];
754
+ let artifacts;
755
+ if (rawArtifacts === void 0) {
756
+ artifacts = { "*": "include" };
757
+ } else {
758
+ if (!isPlainRecord(rawArtifacts)) {
759
+ fail(`${where}.${id}.output.artifacts: must be an object`);
760
+ }
761
+ artifacts = {};
762
+ for (const [selector, action] of Object.entries(rawArtifacts)) {
763
+ const at = `${where}.${id}.output.artifacts["${selector}"]`;
764
+ if (action !== "include" && action !== "retain") {
765
+ fail(
766
+ `${at}: must be "include" or "retain" (got ${JSON.stringify(action)})`
767
+ );
768
+ }
769
+ if (selector === "*") {
770
+ } else if (selector.startsWith("kind:")) {
771
+ const kind = selector.slice("kind:".length);
772
+ if (!ARTIFACT_SELECTOR_KINDS.has(kind)) {
773
+ fail(
774
+ `${at}: unknown artifact kind "${kind}" (expected one of ${[...ARTIFACT_SELECTOR_KINDS].join(", ")})`
775
+ );
776
+ }
777
+ } else if (selector.startsWith("role:")) {
778
+ const role = selector.slice("role:".length);
779
+ if (!POLICY_ID_PATTERN.test(role)) {
780
+ fail(`${at}: invalid role token ${JSON.stringify(role)}`);
781
+ }
782
+ } else {
783
+ fail(
784
+ `${at}: unknown selector (expected "*", "kind:<kind>", or "role:<role>")`
785
+ );
786
+ }
787
+ artifacts[selector] = action;
788
+ }
789
+ }
790
+ let when;
791
+ if (entry["when"] !== void 0) {
792
+ if (stage === "transport_guard") {
793
+ fail(
794
+ `${where}.${id}.when: transport guard policies must not declare "when" (they run exactly when transport limits are exceeded)`
795
+ );
796
+ }
797
+ const errors = validateFixedPolicyCondition(
798
+ entry["when"],
799
+ `${where}.${id}.when`
800
+ );
801
+ if (errors.length > 0) {
802
+ fail(errors.join("; "));
803
+ }
804
+ when = entry["when"];
805
+ }
806
+ const toolName = entry["toolName"];
807
+ if (typeof toolName !== "string" || toolName.length === 0) {
808
+ fail(`${where}.${id}.toolName: must be a non-empty string`);
809
+ }
810
+ const tool = tools.getTool(toolName);
811
+ if (!tool) {
812
+ fail(
813
+ `${where}.${id}.toolName: tool "${toolName}" is not registered (unknown name, or excluded by tool filtering)`
814
+ );
815
+ }
816
+ const descriptor = tool.mediaPolicyDescriptor;
817
+ if (!descriptor || descriptor.kind !== "media_policy") {
818
+ fail(
819
+ `${where}.${id}.toolName: tool "${toolName}" is not a media policy tool (no media_policy descriptor)`
820
+ );
821
+ }
822
+ if (!descriptor.outputs.some((o) => o.required)) {
823
+ fail(
824
+ `${where}.${id}.toolName: tool "${toolName}" declares no required output; a fixed policy cannot rely on it producing anything`
825
+ );
826
+ }
827
+ const hasLossyMedia = descriptor.outputs.some(
828
+ (o) => o.kind === "media" && o.lossy
829
+ );
830
+ const hasDisclosure = descriptor.outputs.some(
831
+ (o) => o.kind === "text" && o.role === "disclosure"
832
+ );
833
+ if (hasLossyMedia && !hasDisclosure) {
834
+ fail(
835
+ `${where}.${id}.toolName: tool "${toolName}" declares a lossy media output but no disclosure text output`
836
+ );
837
+ }
838
+ for (const m of mediaTypes) {
839
+ if (!descriptor.inputMediaTypes.includes(m)) {
840
+ fail(
841
+ `${where}.${id}.mediaTypes: tool "${toolName}" does not accept "${m}" input (accepts ${descriptor.inputMediaTypes.join(", ")})`
842
+ );
843
+ }
844
+ }
845
+ {
846
+ const producibleKinds = /* @__PURE__ */ new Set();
847
+ const producibleRoleSpecs = /* @__PURE__ */ new Map();
848
+ for (const o of descriptor.outputs) {
849
+ if (o.kind === "media") {
850
+ for (const mimeType of o.mimeTypes ?? []) {
851
+ producibleKinds.add(mimeType.split("/")[0]);
852
+ }
853
+ if (o.role && !producibleRoleSpecs.has(o.role)) {
854
+ producibleRoleSpecs.set(o.role, o);
855
+ }
856
+ } else if (o.kind === "file") {
857
+ producibleKinds.add("file");
858
+ if (o.role && !producibleRoleSpecs.has(o.role)) {
859
+ producibleRoleSpecs.set(o.role, o);
860
+ }
861
+ }
862
+ }
863
+ for (const selector of Object.keys(artifacts)) {
864
+ const at = `${where}.${id}.output.artifacts["${selector}"]`;
865
+ if (selector === "*") continue;
866
+ if (selector.startsWith("kind:")) {
867
+ const kind = selector.slice("kind:".length);
868
+ if (!producibleKinds.has(kind)) {
869
+ fail(
870
+ `${at}: tool "${toolName}" declares no output of kind "${kind}"`
871
+ );
872
+ }
873
+ continue;
874
+ }
875
+ const role = selector.slice("role:".length);
876
+ const spec = producibleRoleSpecs.get(role);
877
+ if (!spec) {
878
+ fail(
879
+ `${at}: tool "${toolName}" declares no artifact output with role "${role}"`
880
+ );
881
+ }
882
+ if (role === "transcript" && (spec.kind !== "file" || spec.mimeTypes?.length !== 1 || spec.mimeTypes[0] !== "text/plain")) {
883
+ fail(
884
+ `${at}: a transcript selector must point at a bounded UTF-8 text/plain file output, but tool "${toolName}" declares role "transcript" differently`
885
+ );
886
+ }
887
+ }
888
+ }
889
+ const args = entry["arguments"] ?? {};
890
+ if (!isPlainRecord(args)) {
891
+ fail(`${where}.${id}.arguments: must be an object`);
892
+ }
893
+ for (const reserved of RESERVED_ARGUMENT_KEYS) {
894
+ if (Object.prototype.hasOwnProperty.call(args, reserved)) {
895
+ fail(
896
+ `${where}.${id}.arguments: "${reserved}" is injected by the orchestrator per invocation and must not be configured`
897
+ );
898
+ }
899
+ }
900
+ if (descriptor.settingsSchema) {
901
+ const schemaError = SchemaValidator.validate(
902
+ descriptor.settingsSchema,
903
+ args
904
+ );
905
+ if (schemaError) {
906
+ fail(`${where}.${id}.arguments: ${schemaError}`);
907
+ }
908
+ }
909
+ return {
910
+ id,
911
+ priority,
912
+ mediaTypes,
913
+ origins,
914
+ when,
915
+ onConditionUnavailable,
916
+ toolName,
917
+ arguments: args,
918
+ maxRunsPerLineage,
919
+ onFailure,
920
+ output: { reprocessMedia, source, artifacts },
921
+ stage,
922
+ ...description !== void 0 ? { description } : {}
923
+ };
924
+ }
925
+ __name(normalizePolicy, "normalizePolicy");
926
+ function normalizeLimits(raw) {
927
+ if (raw === void 0) {
928
+ return { ...DEFAULT_OMNI_PROCESSING_LIMITS };
929
+ }
930
+ if (!isPlainRecord(raw)) {
931
+ fail("omni.processing.limits: must be an object");
932
+ }
933
+ const limits = { ...DEFAULT_OMNI_PROCESSING_LIMITS };
934
+ for (const [key, value] of Object.entries(raw)) {
935
+ if (!Object.prototype.hasOwnProperty.call(limits, key)) {
936
+ fail(`omni.processing.limits: unknown key "${key}"`);
937
+ }
938
+ limits[key] = requirePositiveInteger(value, `omni.processing.limits.${key}`, {
939
+ // Reserving zero output tokens is odd but not incoherent.
940
+ allowZero: key === "reservedOutputTokens"
941
+ });
942
+ }
943
+ return limits;
944
+ }
945
+ __name(normalizeLimits, "normalizeLimits");
946
+ function lowerBoundOf(s) {
947
+ let bound;
948
+ if (typeof s["minimum"] === "number") {
949
+ bound = { value: s["minimum"], exclusive: false };
950
+ }
951
+ if (typeof s["exclusiveMinimum"] === "number") {
952
+ const b = { value: s["exclusiveMinimum"], exclusive: true };
953
+ if (!bound || b.value >= bound.value) bound = b;
954
+ }
955
+ return bound;
956
+ }
957
+ __name(lowerBoundOf, "lowerBoundOf");
958
+ function upperBoundOf(s) {
959
+ let bound;
960
+ if (typeof s["maximum"] === "number") {
961
+ bound = { value: s["maximum"], exclusive: false };
962
+ }
963
+ if (typeof s["exclusiveMaximum"] === "number") {
964
+ const b = { value: s["exclusiveMaximum"], exclusive: true };
965
+ if (!bound || b.value <= bound.value) bound = b;
966
+ }
967
+ return bound;
968
+ }
969
+ __name(upperBoundOf, "upperBoundOf");
970
+ function findProjectionLoosening(native, override) {
971
+ const merged = { ...native, ...override };
972
+ if (typeof native["type"] === "string" && merged["type"] !== native["type"]) {
973
+ if (!(native["type"] === "number" && merged["type"] === "integer")) {
974
+ return `"type" changes the native type (${JSON.stringify(merged["type"])} vs native "${native["type"]}")`;
975
+ }
976
+ }
977
+ if (Array.isArray(native["enum"])) {
978
+ if (!Array.isArray(merged["enum"])) {
979
+ return '"enum" replaces the native enum with a non-array';
980
+ }
981
+ const allowed = new Set(native["enum"].map((v) => JSON.stringify(v)));
982
+ const added = merged["enum"].filter((v) => !allowed.has(JSON.stringify(v)));
983
+ if (added.length > 0) {
984
+ return `"enum" adds values the native enum does not allow (${added.map((v) => JSON.stringify(v)).join(", ")})`;
985
+ }
986
+ }
987
+ const nativeLower = lowerBoundOf(native);
988
+ if (nativeLower) {
989
+ const mergedLower = lowerBoundOf(merged);
990
+ if (!mergedLower || mergedLower.value < nativeLower.value || mergedLower.value === nativeLower.value && nativeLower.exclusive && !mergedLower.exclusive) {
991
+ return `the lower bound loosens the native one (${mergedLower?.value ?? "none"} vs native ${nativeLower.value})`;
992
+ }
993
+ }
994
+ const nativeUpper = upperBoundOf(native);
995
+ if (nativeUpper) {
996
+ const mergedUpper = upperBoundOf(merged);
997
+ if (!mergedUpper || mergedUpper.value > nativeUpper.value || mergedUpper.value === nativeUpper.value && nativeUpper.exclusive && !mergedUpper.exclusive) {
998
+ return `the upper bound loosens the native one (${mergedUpper?.value ?? "none"} vs native ${nativeUpper.value})`;
999
+ }
1000
+ }
1001
+ for (const key of ["minLength", "minItems"]) {
1002
+ const n = native[key];
1003
+ if (typeof n !== "number") continue;
1004
+ const m = merged[key];
1005
+ if (typeof m !== "number" || m < n) {
1006
+ return `"${key}" loosens the native constraint (${JSON.stringify(m)} vs native ${n})`;
1007
+ }
1008
+ }
1009
+ for (const key of ["maxLength", "maxItems"]) {
1010
+ const n = native[key];
1011
+ if (typeof n !== "number") continue;
1012
+ const m = merged[key];
1013
+ if (typeof m !== "number" || m > n) {
1014
+ return `"${key}" loosens the native constraint (${JSON.stringify(m)} vs native ${n})`;
1015
+ }
1016
+ }
1017
+ return void 0;
1018
+ }
1019
+ __name(findProjectionLoosening, "findProjectionLoosening");
1020
+ function validatePolicyTools(policyTools, tools) {
1021
+ if (policyTools === void 0) return;
1022
+ if (!isPlainRecord(policyTools)) {
1023
+ fail("omni.processing.policyTools: must be an object map");
1024
+ }
1025
+ for (const [toolName, entry] of Object.entries(policyTools)) {
1026
+ const where = `omni.processing.policyTools.${toolName}`;
1027
+ if (entry === null) continue;
1028
+ if (!isPlainRecord(entry)) {
1029
+ fail(`${where}: must be an object`);
1030
+ }
1031
+ const tool = tools.getTool(toolName);
1032
+ if (!tool?.mediaPolicyDescriptor) {
1033
+ fail(`${where}: "${toolName}" is not a registered media policy tool`);
1034
+ }
1035
+ const descriptor = tool.mediaPolicyDescriptor;
1036
+ rejectUnknownKeys(entry, where, ["settings", "runtime", "modelAccess"]);
1037
+ if (entry["settings"] !== void 0) {
1038
+ if (!isPlainRecord(entry["settings"])) {
1039
+ fail(`${where}.settings: must be an object`);
1040
+ }
1041
+ if (descriptor.settingsSchema) {
1042
+ const error = SchemaValidator.validate(
1043
+ descriptor.settingsSchema,
1044
+ entry["settings"]
1045
+ );
1046
+ if (error) {
1047
+ fail(`${where}.settings: ${error}`);
1048
+ }
1049
+ }
1050
+ }
1051
+ if (entry["runtime"] !== void 0) {
1052
+ if (!isPlainRecord(entry["runtime"])) {
1053
+ fail(`${where}.runtime: must be an object`);
1054
+ }
1055
+ rejectUnknownKeys(entry["runtime"], `${where}.runtime`, ["timeoutMs"]);
1056
+ const timeoutMs = entry["runtime"]["timeoutMs"];
1057
+ if (timeoutMs !== void 0) {
1058
+ requirePositiveInteger(timeoutMs, `${where}.runtime.timeoutMs`);
1059
+ if (timeoutMs >= STAGING_GRACE_MS) {
1060
+ fail(
1061
+ `${where}.runtime.timeoutMs: must be below the staging sweep grace window (${STAGING_GRACE_MS}ms) so a live invocation's staging directory is never reclaimed mid-run`
1062
+ );
1063
+ }
1064
+ }
1065
+ }
1066
+ const modelAccess = entry["modelAccess"];
1067
+ if (modelAccess === void 0) continue;
1068
+ if (!isPlainRecord(modelAccess)) {
1069
+ fail(`${where}.modelAccess: must be an object`);
1070
+ }
1071
+ rejectUnknownKeys(modelAccess, `${where}.modelAccess`, [
1072
+ "enabled",
1073
+ "description",
1074
+ "defaultArguments",
1075
+ "lockedArguments",
1076
+ "parameterSchema",
1077
+ "output"
1078
+ ]);
1079
+ const defaults = modelAccess["defaultArguments"];
1080
+ const locked = modelAccess["lockedArguments"];
1081
+ if (defaults !== void 0 && !isPlainRecord(defaults)) {
1082
+ fail(`${where}.modelAccess.defaultArguments: must be an object`);
1083
+ }
1084
+ if (locked !== void 0 && !isPlainRecord(locked)) {
1085
+ fail(`${where}.modelAccess.lockedArguments: must be an object`);
1086
+ }
1087
+ if (isPlainRecord(defaults) && isPlainRecord(locked)) {
1088
+ const conflicts = Object.keys(defaults).filter(
1089
+ (k) => Object.prototype.hasOwnProperty.call(locked, k)
1090
+ );
1091
+ if (conflicts.length > 0) {
1092
+ fail(
1093
+ `${where}.modelAccess: ${conflicts.map((k) => `"${k}"`).join(", ")} present in both defaultArguments and lockedArguments`
1094
+ );
1095
+ }
1096
+ }
1097
+ const nativeSchema = tool.parameterSchema;
1098
+ const nativeProperties = isPlainRecord(nativeSchema) && isPlainRecord(nativeSchema["properties"]) ? nativeSchema["properties"] : void 0;
1099
+ if (nativeProperties !== void 0) {
1100
+ for (const [label, record] of [
1101
+ ["defaultArguments", defaults],
1102
+ ["lockedArguments", locked]
1103
+ ]) {
1104
+ if (!isPlainRecord(record)) continue;
1105
+ const error = SchemaValidator.validate(
1106
+ {
1107
+ type: "object",
1108
+ properties: nativeProperties,
1109
+ additionalProperties: false
1110
+ },
1111
+ record
1112
+ );
1113
+ if (error) {
1114
+ fail(`${where}.modelAccess.${label}: ${error}`);
1115
+ }
1116
+ }
1117
+ }
1118
+ const projection = modelAccess["parameterSchema"];
1119
+ if (projection !== void 0) {
1120
+ if (!isPlainRecord(projection)) {
1121
+ fail(`${where}.modelAccess.parameterSchema: must be an object`);
1122
+ }
1123
+ const projectionProps = isPlainRecord(projection["properties"]) ? Object.keys(projection["properties"]) : [];
1124
+ const nativeProps = nativeProperties !== void 0 ? new Set(Object.keys(nativeProperties)) : /* @__PURE__ */ new Set();
1125
+ const introduced = projectionProps.filter((p) => !nativeProps.has(p));
1126
+ if (introduced.length > 0) {
1127
+ fail(
1128
+ `${where}.modelAccess.parameterSchema: ${introduced.map((p) => `"${p}"`).join(", ")} not present in the tool's native schema (projection may only narrow)`
1129
+ );
1130
+ }
1131
+ if (isPlainRecord(projection["properties"]) && nativeProperties !== void 0) {
1132
+ for (const [prop, override] of Object.entries(
1133
+ projection["properties"]
1134
+ )) {
1135
+ const native = nativeProperties[prop];
1136
+ if (!isPlainRecord(override) || !isPlainRecord(native)) continue;
1137
+ const loosening = findProjectionLoosening(native, override);
1138
+ if (loosening !== void 0) {
1139
+ fail(
1140
+ `${where}.modelAccess.parameterSchema.properties.${prop}: ${loosening} (projection may only narrow)`
1141
+ );
1142
+ }
1143
+ }
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ __name(validatePolicyTools, "validatePolicyTools");
1149
+ function normalizeOmniProcessingConfig(raw, tools) {
1150
+ if (raw.maxUploadFileBytes !== void 0) {
1151
+ const bytes = requirePositiveInteger(
1152
+ raw.maxUploadFileBytes,
1153
+ "omni.processing.transportGuard.maxUploadFileBytes"
1154
+ );
1155
+ if (bytes > MAX_UPLOAD_FILE_BYTES_CEILING) {
1156
+ fail(
1157
+ `omni.processing.transportGuard.maxUploadFileBytes: ${bytes} exceeds the DashScope per-file upload cap (${MAX_UPLOAD_FILE_BYTES_CEILING})`
1158
+ );
1159
+ }
1160
+ }
1161
+ if (raw.maxEstimatedTokens !== void 0) {
1162
+ const tokens = raw.maxEstimatedTokens;
1163
+ if (typeof tokens !== "number" || !Number.isFinite(tokens) || tokens < 0) {
1164
+ fail(
1165
+ `omni.processing.transportGuard.maxEstimatedTokens: must be a finite number >= 0, where 0 disables the token guard (got ${JSON.stringify(tokens)})`
1166
+ );
1167
+ }
1168
+ }
1169
+ if (raw.urlTtlHours !== void 0) {
1170
+ const ttl = raw.urlTtlHours;
1171
+ if (typeof ttl !== "number" || !Number.isFinite(ttl) || ttl < 0 || ttl > MAX_URL_TTL_HOURS) {
1172
+ fail(
1173
+ `omni.delivery.upload.urlTtlHours: must be a number between 0 and ${MAX_URL_TTL_HOURS} (got ${JSON.stringify(ttl)})`
1174
+ );
1175
+ }
1176
+ }
1177
+ const limits = normalizeLimits(raw.limits);
1178
+ validatePolicyTools(raw.policyTools, tools);
1179
+ const fixedMap = mergePolicyMaps(
1180
+ {},
1181
+ raw.fixedPolicies,
1182
+ "omni.processing.fixedPolicies",
1183
+ { allowTombstones: true }
1184
+ );
1185
+ const guardMap = mergePolicyMaps(
1186
+ systemDefaultTransportGuardPolicies(),
1187
+ raw.transportGuardPolicies,
1188
+ "omni.processing.transportGuard.policies",
1189
+ { allowTombstones: false }
1190
+ );
1191
+ const fixedPolicies = Object.entries(fixedMap).map(
1192
+ ([id, entry]) => normalizePolicy(
1193
+ id,
1194
+ entry,
1195
+ "preprocessing",
1196
+ "omni.processing.fixedPolicies",
1197
+ tools
1198
+ )
1199
+ );
1200
+ const transportGuardPolicies = Object.entries(guardMap).map(
1201
+ ([id, entry]) => normalizePolicy(
1202
+ id,
1203
+ entry,
1204
+ "transport_guard",
1205
+ "omni.processing.transportGuard.policies",
1206
+ tools
1207
+ )
1208
+ );
1209
+ if (transportGuardPolicies.length === 0) {
1210
+ fail(
1211
+ "omni.processing.transportGuard.policies: must not be empty (the transport guard is mandatory)"
1212
+ );
1213
+ }
1214
+ const covered = new Set(
1215
+ transportGuardPolicies.flatMap((policy) => policy.mediaTypes)
1216
+ );
1217
+ const uncovered = MODALITIES.filter((m) => !covered.has(m));
1218
+ if (uncovered.length > 0) {
1219
+ fail(
1220
+ `omni.processing.transportGuard.policies: no guard policy covers ${uncovered.join(", ")} \u2014 the merged set must cover image, video, and audio`
1221
+ );
1222
+ }
1223
+ for (const [where, set] of [
1224
+ ["omni.processing.fixedPolicies", fixedPolicies],
1225
+ ["omni.processing.transportGuard.policies", transportGuardPolicies]
1226
+ ]) {
1227
+ const inert = set.filter((p) => p.output.reprocessMedia);
1228
+ if (inert.length > 0 && !set.some((p) => p.origins.includes("policy"))) {
1229
+ fail(
1230
+ `${where}: ${inert.map((p) => `"${p.id}"`).join(", ")} sets output.reprocessMedia, but no policy in this set accepts origin "policy" \u2014 derivatives would re-enter matching and never match. Add "policy" to some policy's origins or drop reprocessMedia.`
1231
+ );
1232
+ }
1233
+ }
1234
+ return { fixedPolicies, transportGuardPolicies, limits };
1235
+ }
1236
+ __name(normalizeOmniProcessingConfig, "normalizeOmniProcessingConfig");
1237
+
1238
+ export {
1239
+ conditionUsesNamespace,
1240
+ evaluateFixedPolicyCondition,
1241
+ resetRecoveryLatchForTests,
1242
+ runStartupRecoveryOnce,
1243
+ OmniPolicyConfigError,
1244
+ DEFAULT_OMNI_PROCESSING_LIMITS,
1245
+ systemDefaultTransportGuardPolicies,
1246
+ normalizeOmniProcessingConfig
1247
+ };
1248
+ /**
1249
+ * @license
1250
+ * Copyright 2025 Google LLC
1251
+ * SPDX-License-Identifier: Apache-2.0
1252
+ */