@wirecat/drive-cli 0.71.0 → 0.72.0

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 (258) hide show
  1. package/README.md +150 -71
  2. package/contracts/wirecat.json +77 -8
  3. package/dist/bin/drive.js +2 -2
  4. package/dist/bundle/agent-23OB2NZP.js +46 -0
  5. package/dist/bundle/{all-profiles-3QJG2NAN.js → all-profiles-GXGDVNQJ.js} +67 -25
  6. package/dist/bundle/{anthropic-PSWTEU6G.js → anthropic-H5C4GQHC.js} +9 -9
  7. package/dist/bundle/{app-server-PVTA6ABR.js → app-server-EQ3UK4C7.js} +97 -79
  8. package/dist/bundle/{bun-LU5LP3JI.js → bun-DTJVSRY3.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-PYMKLBRU.js → bun-sqlite-JIFY7MAE.js} +9 -9
  10. package/dist/bundle/chunk-2Q325BBD.js +353 -0
  11. package/dist/bundle/chunk-35FIJGTT.js +52 -0
  12. package/dist/bundle/{chunk-RWDKMU74.js → chunk-3FRQ6V4T.js} +3 -3
  13. package/dist/bundle/chunk-47L262VI.js +340 -0
  14. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  15. package/dist/bundle/{chunk-YVI5SQPY.js → chunk-4HPXWYTE.js} +1 -1
  16. package/dist/bundle/{chunk-QETR5HIZ.js → chunk-4IUNYYYL.js} +4385 -2684
  17. package/dist/bundle/{chunk-I4RWW3UD.js → chunk-4JS32SRX.js} +20 -5
  18. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  19. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  20. package/dist/bundle/{chunk-3N2OFXB5.js → chunk-55FH6IEL.js} +5 -5
  21. package/dist/bundle/{chunk-6TNNT2MQ.js → chunk-5BNMWSU2.js} +483 -176
  22. package/dist/bundle/{chunk-6XFIITOG.js → chunk-5H747A76.js} +5532 -3265
  23. package/dist/bundle/{chunk-MNLL5YLM.js → chunk-5KWCO56H.js} +2 -2
  24. package/dist/bundle/{chunk-GZ2D4KXG.js → chunk-5U3NCE5R.js} +35 -12
  25. package/dist/bundle/{chunk-CJLVYIOP.js → chunk-6CCO3JCM.js} +30 -21
  26. package/dist/bundle/{chunk-26DHFMGZ.js → chunk-6ZW2ZJYC.js} +2 -2
  27. package/dist/bundle/{chunk-COJSWDNU.js → chunk-75DAHQOV.js} +3 -3
  28. package/dist/bundle/{chunk-Q7DOMFJ4.js → chunk-77OBW43F.js} +6 -6
  29. package/dist/bundle/{chunk-FCS26CYQ.js → chunk-7EFM6AW3.js} +4 -4
  30. package/dist/bundle/{chunk-XMMFBPGC.js → chunk-A3S7QM5L.js} +3 -3
  31. package/dist/bundle/{chunk-ASMMG72J.js → chunk-AA4LKC6W.js} +244 -565
  32. package/dist/bundle/chunk-ASTKHB6B.js +3233 -0
  33. package/dist/bundle/{chunk-LXKYKRHD.js → chunk-BM6V7456.js} +8 -227
  34. package/dist/bundle/chunk-BO6EDBYJ.js +50 -0
  35. package/dist/bundle/{chunk-YPFWNVHV.js → chunk-BPA3R4KN.js} +2 -100
  36. package/dist/bundle/chunk-CIFE4KPX.js +2159 -0
  37. package/dist/bundle/chunk-CKB4XZZJ.js +730 -0
  38. package/dist/bundle/{chunk-RJOQH5YY.js → chunk-COJTCEZP.js} +111 -859
  39. package/dist/bundle/{chunk-FJH7DJWK.js → chunk-CWPYDT73.js} +6 -6
  40. package/dist/bundle/{chunk-BKSQBBYG.js → chunk-D4JNCXS7.js} +9 -9
  41. package/dist/bundle/chunk-DCPWZIOV.js +696 -0
  42. package/dist/bundle/{chunk-PRW6SYA3.js → chunk-DHMNCOQI.js} +313 -257
  43. package/dist/bundle/chunk-DOQMH4DC.js +280 -0
  44. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  45. package/dist/bundle/{chunk-YJIGGUPI.js → chunk-DWRUOLBF.js} +4 -4
  46. package/dist/bundle/{chunk-6W763DZN.js → chunk-E3VWZC3K.js} +14 -13
  47. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  48. package/dist/bundle/{chunk-KGYVHPGE.js → chunk-EVG3AA5M.js} +2 -2
  49. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  50. package/dist/bundle/{chunk-Y2NWGNUB.js → chunk-FBEZSA76.js} +5 -5
  51. package/dist/bundle/{chunk-2BVVU7GG.js → chunk-FBQJN74J.js} +1 -1
  52. package/dist/bundle/{chunk-Z56QFOBR.js → chunk-FIZOPJYY.js} +1 -1
  53. package/dist/bundle/chunk-FNAYSZWK.js +783 -0
  54. package/dist/bundle/{chunk-GPQ44Y2R.js → chunk-FRCJHGZM.js} +2 -2
  55. package/dist/bundle/{chunk-35SCQ4VI.js → chunk-FTG5QBSD.js} +41 -33
  56. package/dist/bundle/{chunk-KYKW2W6X.js → chunk-FUDUXIVG.js} +1 -1
  57. package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
  58. package/dist/bundle/{chunk-FT3LN3HP.js → chunk-GIEZYBRC.js} +1 -1
  59. package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
  60. package/dist/bundle/chunk-GU6ICH53.js +108 -0
  61. package/dist/bundle/{chunk-ACUAV6VX.js → chunk-GUMKKRE6.js} +107 -71
  62. package/dist/bundle/{chunk-KGERXYTV.js → chunk-GWCDOYSC.js} +1 -1
  63. package/dist/bundle/{chunk-OJSBWP3F.js → chunk-GXGSC622.js} +69 -7
  64. package/dist/bundle/chunk-HAGXTGJC.js +188 -0
  65. package/dist/bundle/{chunk-XF4EXO2C.js → chunk-IMAWQC5K.js} +6 -6
  66. package/dist/bundle/{chunk-HKY7X6NY.js → chunk-IVGVVSPW.js} +4 -4
  67. package/dist/bundle/{chunk-P7CUM5IB.js → chunk-J4NUHSM7.js} +1 -1
  68. package/dist/bundle/{chunk-MIA7P6FZ.js → chunk-K652FYCO.js} +6 -6
  69. package/dist/bundle/chunk-K6ZWNTXY.js +561 -0
  70. package/dist/bundle/{chunk-COOOO5B3.js → chunk-KF3ZBQJV.js} +4 -4
  71. package/dist/bundle/chunk-KFZCHJRT.js +80 -0
  72. package/dist/bundle/chunk-KLPFDFLI.js +221 -0
  73. package/dist/bundle/{chunk-EOEU3AZN.js → chunk-KP2XMCNT.js} +13 -13
  74. package/dist/bundle/{chunk-FP54WSIR.js → chunk-KWDZ3KVH.js} +4 -4
  75. package/dist/bundle/{chunk-QNRRK3CN.js → chunk-KX4C32WD.js} +2 -2
  76. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  77. package/dist/bundle/{chunk-2LHAVY4U.js → chunk-M2ZWYVWO.js} +1 -1
  78. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  79. package/dist/bundle/{chunk-3EBBLKIT.js → chunk-ML2QIWX2.js} +4 -4
  80. package/dist/bundle/{chunk-ZM63SUHG.js → chunk-MUFF2YTH.js} +2 -2
  81. package/dist/bundle/{chunk-2PUNKUYJ.js → chunk-N24YSLED.js} +9150 -9869
  82. package/dist/bundle/chunk-N4GTCPML.js +7 -0
  83. package/dist/bundle/{chunk-B5KSXHJ7.js → chunk-NBMGDRP4.js} +1 -1
  84. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  85. package/dist/bundle/{chunk-JDV7HNNQ.js → chunk-NNGA4QDR.js} +13 -26
  86. package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
  87. package/dist/bundle/chunk-O7CZZ36M.js +80 -0
  88. package/dist/bundle/{chunk-ICDCAQ6K.js → chunk-OAONP6KI.js} +13 -9
  89. package/dist/bundle/{chunk-WVDCCYS3.js → chunk-OESP4PHB.js} +17 -17
  90. package/dist/bundle/chunk-OHR6IZNH.js +116 -0
  91. package/dist/bundle/{chunk-4QNW4NK6.js → chunk-OLCU7Q2B.js} +1 -1
  92. package/dist/bundle/{chunk-SDKQNOL5.js → chunk-OLDQLEPA.js} +6 -6
  93. package/dist/bundle/{chunk-ZCR3IRZ2.js → chunk-OPIPG6AP.js} +16 -9
  94. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  95. package/dist/bundle/chunk-PRYMT3OG.js +30 -0
  96. package/dist/bundle/chunk-QDUIVMEW.js +36 -0
  97. package/dist/bundle/{chunk-ZZ32DXTH.js → chunk-QKBPCX7Y.js} +1 -1
  98. package/dist/bundle/{chunk-QXC6IEH6.js → chunk-QSLOACDT.js} +201 -423
  99. package/dist/bundle/{chunk-7PDHGZN4.js → chunk-QUZFDU4K.js} +4 -4
  100. package/dist/bundle/{chunk-3UGYFXH6.js → chunk-R32DHS6J.js} +187 -379
  101. package/dist/bundle/{chunk-6SJOTNHF.js → chunk-R57QUYBG.js} +6 -28
  102. package/dist/bundle/{chunk-UTO2GO4P.js → chunk-R64OSDOD.js} +45 -66
  103. package/dist/bundle/{chunk-GBKNJWOZ.js → chunk-RSPBVKOC.js} +8 -8
  104. package/dist/bundle/{chunk-HL52XXZX.js → chunk-SPNPJ3FZ.js} +3 -4
  105. package/dist/bundle/chunk-SQHDSIFL.js +388 -0
  106. package/dist/bundle/{chunk-YPNWIB6H.js → chunk-ST35FIUG.js} +3 -3
  107. package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
  108. package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
  109. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  110. package/dist/bundle/{chunk-X4TIMMKJ.js → chunk-TTPWKTVR.js} +1 -1
  111. package/dist/bundle/{chunk-TAFHYHKA.js → chunk-U7VEJ3CW.js} +45 -27
  112. package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
  113. package/dist/bundle/{chunk-4HWJOU7N.js → chunk-UIQ35CA5.js} +1 -1
  114. package/dist/bundle/{chunk-SAKO3P4H.js → chunk-UJY26HW4.js} +1 -1
  115. package/dist/bundle/{chunk-D5TGYUVU.js → chunk-UWG3PRY7.js} +9 -60
  116. package/dist/bundle/{chunk-JZHBZOJR.js → chunk-VAR3MJU6.js} +3 -3
  117. package/dist/bundle/{chunk-GOWXXYEF.js → chunk-VPQSI5IU.js} +4 -4
  118. package/dist/bundle/{chunk-QFR2PNJN.js → chunk-VQPT3Y7W.js} +12 -12
  119. package/dist/bundle/{chunk-Z3KUSRCF.js → chunk-WMG3H2VK.js} +2 -2
  120. package/dist/bundle/{chunk-4PA4DHYV.js → chunk-X5BGAZC5.js} +6 -6
  121. package/dist/bundle/{chunk-2UUWXPOB.js → chunk-XC6TRWLZ.js} +3 -3
  122. package/dist/bundle/{chunk-OF422U5D.js → chunk-XQZEMRCU.js} +402 -402
  123. package/dist/bundle/{chunk-72C4YOCH.js → chunk-XZ7MO6EU.js} +7 -7
  124. package/dist/bundle/{chunk-SERXSCN3.js → chunk-YAIOEPKU.js} +337 -390
  125. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  126. package/dist/bundle/{chunk-RESDD3Q4.js → chunk-YWOLQEDV.js} +16 -3
  127. package/dist/bundle/{chunk-YMJ6IDGT.js → chunk-ZFDSJ5YJ.js} +38 -8
  128. package/dist/bundle/{chunk-HMS6EEQL.js → chunk-ZFUZEFU6.js} +3 -3
  129. package/dist/bundle/{chunk-TAUBRNC5.js → chunk-ZJKXSMXK.js} +72 -59
  130. package/dist/bundle/{chunk-22QQUKWA.js → chunk-ZKWT6HXT.js} +1 -1
  131. package/dist/bundle/chunk-ZPUY3COZ.js +250 -0
  132. package/dist/bundle/{cli-556DERZL.js → cli-2P5FW2RL.js} +201 -98
  133. package/dist/bundle/command-contract-BMQT2G5X.js +45 -0
  134. package/dist/bundle/{command-server-entry-AYLGNZWD.js → command-server-entry-KP2UDGLA.js} +36 -34
  135. package/dist/bundle/{decode-QU24MWMN.js → decode-K2JZ5D6V.js} +10 -10
  136. package/dist/bundle/{dispatch-4KODNOXV.js → dispatch-KOQZA74A.js} +10 -10
  137. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  138. package/dist/bundle/drive.js +11 -11
  139. package/dist/bundle/{echarts-BXX4OQWC.js → echarts-URO3QGCG.js} +2 -2
  140. package/dist/bundle/{embed-KG27KG3D.js → embed-JLIPWTNN.js} +10 -10
  141. package/dist/bundle/{embedder-IPAVUQUV.js → embedder-LUTDO3HS.js} +15 -15
  142. package/dist/bundle/entry-AVF6LMG7.js +25 -0
  143. package/dist/bundle/{failure-ESL7ETL4.js → failure-GJMQLM7O.js} +4 -4
  144. package/dist/bundle/first-run-VYTIEUDA.js +31 -0
  145. package/dist/bundle/first-screen-QVZPF7KL.js +45 -0
  146. package/dist/bundle/google-VX7IPACN.js +46 -0
  147. package/dist/bundle/{google-api-VCDBSNOW.js → google-api-RFXKRLL4.js} +88 -73
  148. package/dist/bundle/grants-4XWJFVD6.js +133 -0
  149. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  150. package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
  151. package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
  152. package/dist/bundle/{identity-LOWMVGZY.js → identity-FXPB5EMT.js} +7 -6
  153. package/dist/bundle/{instructions-2VECIDXF.js → instructions-IROIUVZI.js} +1 -1
  154. package/dist/bundle/{login-7GBONT7V.js → login-WIY5VQU7.js} +96 -81
  155. package/dist/bundle/{mcp-O6ACR2DX.js → mcp-NJIOKW3E.js} +2 -2
  156. package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
  157. package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
  158. package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
  159. package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
  160. package/dist/bundle/meeting-combined-JUNV35GM.js +28 -0
  161. package/dist/bundle/meeting-model-XY4UNWWK.js +29 -0
  162. package/dist/bundle/{meeting-semantic-G7PFOKU7.js → meeting-semantic-62QNQMOM.js} +10 -10
  163. package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
  164. package/dist/bundle/{node-MPEQSFI3.js → node-IACCI2CW.js} +2 -2
  165. package/dist/bundle/{node-sqlite-OLQMAYB4.js → node-sqlite-WYIRC7C7.js} +10 -10
  166. package/dist/bundle/notes-search-DEDUJKSN.js +70 -0
  167. package/dist/bundle/oauth-HXBXF4VI.js +22 -0
  168. package/dist/bundle/{open-OXTE672W.js → open-H32B6BCT.js} +8 -8
  169. package/dist/bundle/{openai-EB3TPIZY.js → openai-VHMPJJUG.js} +22 -21
  170. package/dist/bundle/{process-F6TKXWWA.js → process-RNHPF5OK.js} +1 -1
  171. package/dist/bundle/{program-4IFDZ7FM.js → program-GYMJ3DDH.js} +275 -1148
  172. package/dist/bundle/{prompt-F5RRHPN2.js → prompt-TOG2CRCE.js} +8 -8
  173. package/dist/bundle/{reasons-UORHJDHK.js → reasons-TLFQ45YX.js} +6 -5
  174. package/dist/bundle/{recognize-DAVNZND3.js → recognize-GYGY45EY.js} +7 -7
  175. package/dist/bundle/remote-6XN2QLI5.js +35 -0
  176. package/dist/bundle/{rerank-CND2GVLZ.js → rerank-HJO3O4TW.js} +11 -11
  177. package/dist/bundle/{serve-ZHSPUIGX.js → serve-XPCNLHCR.js} +19 -19
  178. package/dist/bundle/server-UBJZ66XE.js +97 -0
  179. package/dist/bundle/{server-YMAK4LHC.js → server-WPT3NC5B.js} +89 -70
  180. package/dist/bundle/{services-ZILSFJ6E.js → services-253KKKVU.js} +109 -89
  181. package/dist/bundle/{sqlite-runtime-S5VPMZQH.js → sqlite-runtime-EZASGJXW.js} +9 -9
  182. package/dist/bundle/{start-CR6X25RT.js → start-UHI35JFL.js} +7 -7
  183. package/dist/bundle/{state-YFPHVIIJ.js → state-KJTSPFGK.js} +9 -9
  184. package/dist/bundle/{store-UODRT6X4.js → store-62J2H2A3.js} +36 -25
  185. package/dist/bundle/{store-CL4ZJZRI.js → store-G5B7T7M7.js} +38 -23
  186. package/dist/bundle/store-maintenance-command-C6T4YLVF.js +85 -0
  187. package/dist/bundle/surface-3OT64BHS.js +83 -0
  188. package/dist/bundle/tokens-EHYO6D2X.js +133 -0
  189. package/dist/commands/documents.d.ts.map +1 -1
  190. package/dist/commands/documents.js +11 -1
  191. package/dist/commands/documents.js.map +1 -1
  192. package/dist/commands/remote.d.ts.map +1 -1
  193. package/dist/commands/remote.js +8 -22
  194. package/dist/commands/remote.js.map +1 -1
  195. package/dist/commands/sync.d.ts.map +1 -1
  196. package/dist/commands/sync.js +14 -4
  197. package/dist/commands/sync.js.map +1 -1
  198. package/dist/config.d.ts +5 -0
  199. package/dist/config.d.ts.map +1 -1
  200. package/dist/config.js +5 -0
  201. package/dist/config.js.map +1 -1
  202. package/dist/first-screen.d.ts.map +1 -1
  203. package/dist/first-screen.js +2 -1
  204. package/dist/first-screen.js.map +1 -1
  205. package/dist/generated/manifest.d.ts +2 -1
  206. package/dist/generated/manifest.d.ts.map +1 -1
  207. package/dist/generated/manifest.js +782 -0
  208. package/dist/generated/manifest.js.map +1 -1
  209. package/dist/generated/types.d.ts +262 -58
  210. package/dist/generated/types.d.ts.map +1 -1
  211. package/dist/google.d.ts.map +1 -1
  212. package/dist/google.js +5 -5
  213. package/dist/google.js.map +1 -1
  214. package/dist/model.d.ts +5 -2
  215. package/dist/model.d.ts.map +1 -1
  216. package/dist/model.js.map +1 -1
  217. package/dist/policy-keys.js +1 -1
  218. package/dist/policy-keys.js.map +1 -1
  219. package/dist/program.d.ts.map +1 -1
  220. package/dist/program.js +9 -4
  221. package/dist/program.js.map +1 -1
  222. package/dist/state.d.ts.map +1 -1
  223. package/dist/state.js +6 -1
  224. package/dist/state.js.map +1 -1
  225. package/dist/store.d.ts.map +1 -1
  226. package/dist/store.js +2 -7
  227. package/dist/store.js.map +1 -1
  228. package/dist/supported.d.ts +2 -2
  229. package/dist/supported.d.ts.map +1 -1
  230. package/dist/supported.js +2 -3
  231. package/dist/supported.js.map +1 -1
  232. package/dist/sync.d.ts +2 -1
  233. package/dist/sync.d.ts.map +1 -1
  234. package/dist/sync.js +5 -2
  235. package/dist/sync.js.map +1 -1
  236. package/dist/version.d.ts +1 -1
  237. package/dist/version.js +1 -1
  238. package/package.json +3 -3
  239. package/scenarios/find-decision.md +1 -1
  240. package/skills/drive-cli/SKILL.md +4 -2
  241. package/dist/bundle/chunk-J5Q5FS2N.js +0 -593
  242. package/dist/bundle/chunk-L46C6HQ7.js +0 -729
  243. package/dist/bundle/chunk-UDMNY63V.js +0 -899
  244. package/dist/bundle/chunk-VKE77B3F.js +0 -2
  245. package/dist/bundle/command-contract-VRTOAV6W.js +0 -43
  246. package/dist/bundle/entry-MVXQETWS.js +0 -25
  247. package/dist/bundle/first-run-4UVLW2WR.js +0 -31
  248. package/dist/bundle/first-screen-JAKAIINI.js +0 -41
  249. package/dist/bundle/google-22NXXJX5.js +0 -45
  250. package/dist/bundle/grants-MQMTVCRQ.js +0 -118
  251. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
  252. package/dist/bundle/meeting-combined-LVP4AZKA.js +0 -27
  253. package/dist/bundle/meeting-model-RAY5XDXZ.js +0 -29
  254. package/dist/bundle/oauth-SGH2I2BY.js +0 -22
  255. package/dist/bundle/remote-D5EYYIAU.js +0 -35
  256. package/dist/bundle/server-DUVJWP3Q.js +0 -80
  257. package/dist/bundle/store-maintenance-command-DY5XIBWR.js +0 -72
  258. package/dist/bundle/tokens-AF7QOFOF.js +0 -118
@@ -0,0 +1,39 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
8
+ function stringifyPosition(value) {
9
+ if (!value || typeof value !== "object") {
10
+ return "";
11
+ }
12
+ if ("position" in value || "type" in value) {
13
+ return position(value.position);
14
+ }
15
+ if ("start" in value || "end" in value) {
16
+ return position(value);
17
+ }
18
+ if ("line" in value || "column" in value) {
19
+ return point(value);
20
+ }
21
+ return "";
22
+ }
23
+ __name(stringifyPosition, "stringifyPosition");
24
+ function point(point2) {
25
+ return index(point2 && point2.line) + ":" + index(point2 && point2.column);
26
+ }
27
+ __name(point, "point");
28
+ function position(pos) {
29
+ return point(pos && pos.start) + "-" + point(pos && pos.end);
30
+ }
31
+ __name(position, "position");
32
+ function index(value) {
33
+ return value && typeof value === "number" ? value : 1;
34
+ }
35
+ __name(index, "index");
36
+
37
+ export {
38
+ stringifyPosition
39
+ };
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  alive
5
- } from "./chunk-Z56QFOBR.js";
5
+ } from "./chunk-FIZOPJYY.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-CJLVYIOP.js";
9
+ } from "./chunk-6CCO3JCM.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/background/lock.js
15
15
  import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
@@ -53,6 +53,17 @@ var releaseLock = /* @__PURE__ */ __name((path, pid = process.pid) => {
53
53
  if (readLock(path)?.pid === pid)
54
54
  rmSync(path, { force: true });
55
55
  }, "releaseLock");
56
+ var currentPath = /* @__PURE__ */ __name((lock) => lock.replace(/\.lock$/, ".current"), "currentPath");
57
+ var markCurrent = /* @__PURE__ */ __name((lock, at = /* @__PURE__ */ new Date()) => writeSecurely(currentPath(lock), `${JSON.stringify({ at: at.toISOString() })}
58
+ `, 384), "markCurrent");
59
+ var readCurrent = /* @__PURE__ */ __name((lock) => {
60
+ try {
61
+ const { at } = JSON.parse(readFileSync(currentPath(lock), "utf8"));
62
+ return typeof at === "string" ? at : void 0;
63
+ } catch {
64
+ return void 0;
65
+ }
66
+ }, "readCurrent");
56
67
  var servingProfiles = /* @__PURE__ */ __name((app, env) => {
57
68
  const dir = dirname(lockPath(app, "default", env));
58
69
  if (!existsSync(dir))
@@ -69,5 +80,7 @@ export {
69
80
  holdLock,
70
81
  takeLock,
71
82
  releaseLock,
83
+ markCurrent,
84
+ readCurrent,
72
85
  servingProfiles
73
86
  };
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-4QNW4NK6.js";
6
+ } from "./chunk-OLCU7Q2B.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
11
+ // node_modules/.pnpm/@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
12
12
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
13
13
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
14
14
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
20
20
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
21
21
  }, "hostCovered");
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
24
24
  var HOST_FETCH_TIMEOUT_MS = 3e4;
25
25
  var REDIRECTS = 5;
26
26
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -55,11 +55,32 @@ var checked = /* @__PURE__ */ __name((url, hosts) => {
55
55
  throw undeclared(url);
56
56
  return url;
57
57
  }, "checked");
58
+ var ENCODED_SLASH = /%2f|%5c/i;
59
+ var scopeOf = /* @__PURE__ */ __name((scope) => {
60
+ if (scope === void 0)
61
+ return void 0;
62
+ if (!URL.canParse(scope))
63
+ throw new CliError("configuration_error", `credentialScope ${scope} is not a URL`);
64
+ const { origin, pathname } = new URL(scope);
65
+ const prefix = pathname.endsWith("/") ? pathname : `${pathname}/`;
66
+ return (url) => url.origin === origin && (url.pathname === pathname || url.pathname.startsWith(prefix)) && !ENCODED_SLASH.test(url.pathname);
67
+ }, "scopeOf");
68
+ var signedHeaders = /* @__PURE__ */ __name((headers) => CREDENTIAL_HEADERS.some((name) => headers.has(name)), "signedHeaders");
69
+ var NOT_SENT = /* @__PURE__ */ new Set(["EAI_AGAIN", "ENOTFOUND", "ECONNREFUSED"]);
70
+ var neverSent = /* @__PURE__ */ __name((error) => {
71
+ for (let at = error, depth = 0; at instanceof Error && depth < 4; at = at.cause, depth++) {
72
+ const code = at.code;
73
+ if (typeof code === "string" && NOT_SENT.has(code))
74
+ return true;
75
+ }
76
+ return false;
77
+ }, "neverSent");
58
78
  var hostFetch = /* @__PURE__ */ __name((options) => {
59
79
  const problems = hostProblems(options.hosts);
60
80
  if (problems.length > 0)
61
81
  throw new CliError("configuration_error", problems.join("; "));
62
82
  const { hosts, fetch: send = globalThis.fetch, timeoutMs = HOST_FETCH_TIMEOUT_MS, redirects = REDIRECTS } = options;
83
+ const inScope = scopeOf(options.credentialScope);
63
84
  return async (input, init = {}) => {
64
85
  const request = input instanceof Request ? input : void 0;
65
86
  let url = checked(new URL(request?.url ?? String(input)), hosts);
@@ -70,8 +91,14 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
70
91
  let method = (init.method ?? request?.method ?? "GET").toUpperCase();
71
92
  let body = init.body ?? request?.body ?? void 0;
72
93
  const headers = new Headers(init.headers ?? request?.headers);
94
+ if (inScope && signedHeaders(headers) && !inScope(url))
95
+ throw new CliError("configuration_error", `the sign-in goes only under ${options.credentialScope}, not ${url.origin}${url.pathname}`, {
96
+ sent: false
97
+ });
98
+ let answered = false;
73
99
  try {
74
100
  let response = await send(input, { ...init, signal, ...follow ? { redirect: "manual" } : {} });
101
+ answered = true;
75
102
  for (let hop = 0; follow && REDIRECT_STATUSES.has(response.status); hop += 1) {
76
103
  const location = response.headers.get("location");
77
104
  if (!location)
@@ -88,7 +115,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
88
115
  headers.delete("content-length");
89
116
  } else if (body instanceof ReadableStream)
90
117
  throw new CliError("invalid_response", `${url.hostname} redirected a streamed body, which cannot be sent again`);
91
- if (next.origin !== url.origin)
118
+ if (inScope ? !inScope(next) : next.origin !== url.origin)
92
119
  for (const name of CREDENTIAL_HEADERS)
93
120
  headers.delete(name);
94
121
  url = next;
@@ -103,12 +130,15 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
103
130
  throw isCliError(caller.reason) ? caller.reason : new CliError("cancelled", "request cancelled");
104
131
  if (timeout.signal.aborted)
105
132
  throw new CliError("timeout", `${url.hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
106
- throw new CliError("network_error", `${url.hostname} could not be reached`, { retryable: true });
133
+ throw new CliError("network_error", `${url.hostname} could not be reached`, {
134
+ retryable: true,
135
+ ...!answered && neverSent(error) ? { sent: false } : {}
136
+ });
107
137
  }
108
138
  };
109
139
  }, "hostFetch");
110
140
 
111
- // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
141
+ // node_modules/.pnpm/@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
112
142
  var interrupted = /* @__PURE__ */ __name((signal) => isCliError(signal.reason) ? signal.reason : new CliError(signal.reason instanceof Error && signal.reason.name === "TimeoutError" ? "timeout" : "cancelled", "HTTP response read was interrupted"), "interrupted");
113
143
  var checked2 = /* @__PURE__ */ __name((signal) => {
114
144
  if (signal?.aborted)
@@ -193,7 +223,7 @@ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
193
223
  }
194
224
  }, "readJsonResponse");
195
225
 
196
- // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
226
+ // node_modules/.pnpm/@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
197
227
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
198
228
  if (!header)
199
229
  return void 0;
@@ -234,7 +264,7 @@ var statusToCode = /* @__PURE__ */ __name((status) => {
234
264
  return "provider_error";
235
265
  }, "statusToCode");
236
266
 
237
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/models/endpoint.js
267
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/models/endpoint.js
238
268
  var endpoint = /* @__PURE__ */ __name((value) => {
239
269
  try {
240
270
  const url = new URL(value);
@@ -5,7 +5,7 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-RJOQH5YY.js";
8
+ } from "./chunk-FNAYSZWK.js";
9
9
  import {
10
10
  array,
11
11
  nullable,
@@ -16,9 +16,9 @@ import {
16
16
  strictObject,
17
17
  string,
18
18
  unknown
19
- } from "./chunk-OJSBWP3F.js";
19
+ } from "./chunk-GXGSC622.js";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/entities/note.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/entities/note.js
22
22
  var link = {
23
23
  target_text: nullable(text),
24
24
  kind: text,
@@ -12,7 +12,25 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-35SCQ4VI.js";
15
+ } from "./chunk-FTG5QBSD.js";
16
+ import {
17
+ skillResources
18
+ } from "./chunk-SQHDSIFL.js";
19
+ import {
20
+ StdioServerTransport,
21
+ answeredWire,
22
+ serveStdio
23
+ } from "./chunk-BPA3R4KN.js";
24
+ import {
25
+ mcpHttpMarker
26
+ } from "./chunk-IVGVVSPW.js";
27
+ import {
28
+ runCommandForAgent,
29
+ toolsFromCommands
30
+ } from "./chunk-AA4LKC6W.js";
31
+ import {
32
+ instructions
33
+ } from "./chunk-ZKWT6HXT.js";
16
34
  import {
17
35
  BinaryResource,
18
36
  Picture,
@@ -27,60 +45,56 @@ import {
27
45
  outcomeOf,
28
46
  outputOf,
29
47
  registerCommands,
30
- runCommandForAgent,
31
48
  surfaceCommands,
32
49
  tierOf,
33
50
  tool,
34
- toolKey,
35
- toolsFromCommands
36
- } from "./chunk-ASMMG72J.js";
51
+ toolKey
52
+ } from "./chunk-K6ZWNTXY.js";
37
53
  import {
38
- agentJson,
39
- skillResource
40
- } from "./chunk-3UGYFXH6.js";
54
+ agentJson
55
+ } from "./chunk-R32DHS6J.js";
41
56
  import {
42
- StdioServerTransport,
43
- answeredWire,
44
57
  callerOf,
45
- callingAgent,
46
- serveStdio
47
- } from "./chunk-YPFWNVHV.js";
48
- import {
49
- instructions
50
- } from "./chunk-22QQUKWA.js";
58
+ callingAgent
59
+ } from "./chunk-GU6ICH53.js";
51
60
  import {
52
61
  McpServer,
53
62
  ResourceTemplate
54
- } from "./chunk-5D4AEUVA.js";
55
- import {
56
- mcpHttpMarker
57
- } from "./chunk-HKY7X6NY.js";
63
+ } from "./chunk-PL5P7UKW.js";
58
64
  import {
59
65
  connectedFor
60
- } from "./chunk-TAFHYHKA.js";
66
+ } from "./chunk-U7VEJ3CW.js";
61
67
  import {
62
- lackedNeed,
63
68
  wholeList
64
- } from "./chunk-L46C6HQ7.js";
69
+ } from "./chunk-2Q325BBD.js";
70
+ import {
71
+ lackedNeed
72
+ } from "./chunk-KFZCHJRT.js";
65
73
  import {
66
- capability,
67
- dateWindow,
68
74
  guardFor,
69
- servicesFor,
70
- storedDeps
71
- } from "./chunk-2PUNKUYJ.js";
75
+ servicesFor
76
+ } from "./chunk-N24YSLED.js";
72
77
  import {
73
78
  imageSize
74
- } from "./chunk-QXC6IEH6.js";
79
+ } from "./chunk-QSLOACDT.js";
80
+ import {
81
+ dateWindow
82
+ } from "./chunk-CKB4XZZJ.js";
83
+ import {
84
+ storedDeps
85
+ } from "./chunk-CIFE4KPX.js";
86
+ import {
87
+ capability
88
+ } from "./chunk-PRYMT3OG.js";
75
89
  import {
76
90
  warmEmbedders
77
- } from "./chunk-UTO2GO4P.js";
91
+ } from "./chunk-R64OSDOD.js";
78
92
  import {
79
93
  stdinFieldOf
80
- } from "./chunk-P7CUM5IB.js";
94
+ } from "./chunk-J4NUHSM7.js";
81
95
  import {
82
96
  findCommand
83
- } from "./chunk-7PDHGZN4.js";
97
+ } from "./chunk-QUZFDU4K.js";
84
98
  import {
85
99
  DEFAULT_OUTPUT_BYTES,
86
100
  changesAuthorityAt,
@@ -97,35 +111,35 @@ import {
97
111
  rootOf2 as rootOf,
98
112
  sealed,
99
113
  snakeKeys
100
- } from "./chunk-SERXSCN3.js";
114
+ } from "./chunk-YAIOEPKU.js";
101
115
  import {
102
116
  withCaller
103
- } from "./chunk-72C4YOCH.js";
117
+ } from "./chunk-XZ7MO6EU.js";
104
118
  import {
105
119
  readOnlyLockOf
106
- } from "./chunk-MNLL5YLM.js";
120
+ } from "./chunk-5KWCO56H.js";
107
121
  import {
108
122
  openStore
109
- } from "./chunk-QETR5HIZ.js";
123
+ } from "./chunk-4IUNYYYL.js";
110
124
  import {
111
125
  pdfPreviewLimits
112
- } from "./chunk-JZHBZOJR.js";
126
+ } from "./chunk-VAR3MJU6.js";
113
127
  import {
114
128
  typedCommand
115
- } from "./chunk-RJOQH5YY.js";
129
+ } from "./chunk-COJTCEZP.js";
116
130
  import {
117
131
  isCliFailure
118
- } from "./chunk-26DHFMGZ.js";
132
+ } from "./chunk-6ZW2ZJYC.js";
119
133
  import {
120
134
  timezoneOf
121
- } from "./chunk-OF422U5D.js";
135
+ } from "./chunk-XQZEMRCU.js";
122
136
  import {
123
137
  errorObjectOf,
124
138
  mcpErrorResult
125
- } from "./chunk-3N2OFXB5.js";
139
+ } from "./chunk-55FH6IEL.js";
126
140
  import {
127
141
  visibleControls
128
- } from "./chunk-KYKW2W6X.js";
142
+ } from "./chunk-FUDUXIVG.js";
129
143
  import {
130
144
  description,
131
145
  integer,
@@ -140,18 +154,18 @@ import {
140
154
  regex,
141
155
  strictObject,
142
156
  string
143
- } from "./chunk-OJSBWP3F.js";
157
+ } from "./chunk-GXGSC622.js";
144
158
  import {
145
159
  CliError
146
- } from "./chunk-4QNW4NK6.js";
160
+ } from "./chunk-OLCU7Q2B.js";
147
161
  import {
148
162
  __name
149
163
  } from "./chunk-ZVVMGPBJ.js";
150
164
 
151
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/server.js
165
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/server.js
152
166
  import { randomUUID } from "node:crypto";
153
167
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
168
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
155
169
  var agentLog = /* @__PURE__ */ __name((open) => {
156
170
  let held;
157
171
  return {
@@ -170,7 +184,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
170
184
  };
171
185
  }, "agentLog");
172
186
 
173
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/resources.js
187
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/resources.js
174
188
  var LISTED = 100;
175
189
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
176
190
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -208,7 +222,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
208
222
  });
209
223
  }, "registerResources");
210
224
 
211
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/session.js
225
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/session.js
212
226
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
213
227
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
214
228
  var MessengerSession = class {
@@ -283,7 +297,7 @@ var MessengerSession = class {
283
297
  }
284
298
  };
285
299
 
286
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
300
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
287
301
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
288
302
  const _command = messenger.app.command;
289
303
  return {
@@ -337,7 +351,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
337
351
  };
338
352
  }, "attachmentsTools");
339
353
 
340
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
354
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
341
355
  var PHOTO_LIMIT = 512 * 1024;
342
356
  var IMAGE_TYPES = [
343
357
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -393,7 +407,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
393
407
  return new Uint8Array(Buffer.concat(chunks));
394
408
  }, "readUpTo");
395
409
 
396
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
410
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
397
411
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
398
412
  stats_charts: tool({
399
413
  title: "A chart from a chat's statistics",
@@ -430,14 +444,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
430
444
  })
431
445
  }), "statsTools");
432
446
 
433
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/tools.js
447
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/tools.js
434
448
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
435
449
  ...messagesPhotoTools(messenger),
436
450
  ...attachmentsTools(messenger),
437
451
  ...statsTools(messenger)
438
452
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
439
453
 
440
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/server.js
454
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/server.js
441
455
  var PER_RUN = /* @__PURE__ */ new Set([
442
456
  "streams",
443
457
  "stdin",
@@ -555,7 +569,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
555
569
  ...messenger.diagnose ? { [messenger.provider]: await messenger.diagnose(command, context) } : {}
556
570
  }), "local")
557
571
  });
558
- const skill = messenger.skill ? skillResource(app, messenger.skill) : void 0;
572
+ const skills = messenger.skill ? skillResources(app, messenger.skill) : [];
573
+ const skill = skills[0];
559
574
  const log = agentLog(() => openStore({ env: context.env, command: app.command, version: app.version }));
560
575
  const audit = /* @__PURE__ */ __name(async (call, caller) => {
561
576
  if (!recalledAccount(app, provider, settings.profile, context.env))
@@ -725,10 +740,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
725
740
  });
726
741
  }, "assertRead")
727
742
  });
728
- if (skill) {
729
- const { uri, name: resource, title, description: description2, mimeType, read } = skill;
730
- server.registerResource(resource, uri, { title, description: description2, mimeType }, read);
731
- }
743
+ for (const { uri, name: name2, title, description: description2, mimeType, read } of skills)
744
+ server.registerResource(name2, uri, { title, description: description2, mimeType }, read);
732
745
  return server;
733
746
  }, "build");
734
747
  return { session, embedders, build, log, offered: [...commands.map((one) => one.command), ...pictured] };
@@ -754,7 +767,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
754
767
  }, "serveOverStdio");
755
768
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
756
769
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
757
- const { serveOverHttp } = await import("./serve-ZHSPUIGX.js");
770
+ const { serveOverHttp } = await import("./serve-XPCNLHCR.js");
758
771
  const appName = messenger.app.command;
759
772
  const appEnvPrefix = messenger.app.envPrefix;
760
773
  const listening = await serveOverHttp(build, {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");