@wirecat/drive-cli 0.69.0 → 0.71.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 (228) hide show
  1. package/README.md +3 -2
  2. package/contracts/wirecat.json +14 -13
  3. package/dist/age.d.ts +0 -36
  4. package/dist/age.d.ts.map +1 -1
  5. package/dist/age.js +0 -22
  6. package/dist/age.js.map +1 -1
  7. package/dist/bin/drive.js +2 -2
  8. package/dist/bundle/{all-profiles-B4A737YW.js → all-profiles-3QJG2NAN.js} +13 -13
  9. package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-PSWTEU6G.js} +8 -8
  10. package/dist/bundle/{app-server-OWEW7DY5.js → app-server-PVTA6ABR.js} +66 -58
  11. package/dist/bundle/{bun-V5QLYBZU.js → bun-LU5LP3JI.js} +2 -2
  12. package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-PYMKLBRU.js} +9 -9
  13. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-22QQUKWA.js} +1 -1
  14. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-26DHFMGZ.js} +2 -2
  15. package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-2BVVU7GG.js} +1 -1
  16. package/dist/bundle/{chunk-7JKECODO.js → chunk-2LHAVY4U.js} +1 -11
  17. package/dist/bundle/{chunk-HEBZCKMU.js → chunk-2PUNKUYJ.js} +4389 -4709
  18. package/dist/bundle/chunk-2UUWXPOB.js +31 -0
  19. package/dist/bundle/{chunk-KUQDBWPU.js → chunk-35SCQ4VI.js} +31 -32
  20. package/dist/bundle/{chunk-O6PD7RZY.js → chunk-3EBBLKIT.js} +4 -4
  21. package/dist/bundle/{chunk-PV3AWPHR.js → chunk-3N2OFXB5.js} +5 -5
  22. package/dist/bundle/{chunk-SY2HLH5R.js → chunk-3UGYFXH6.js} +82 -25
  23. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4HWJOU7N.js} +1 -1
  24. package/dist/bundle/{chunk-6D44YQ5X.js → chunk-4PA4DHYV.js} +6 -6
  25. package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
  26. package/dist/bundle/{chunk-GK6KXBL6.js → chunk-6SJOTNHF.js} +4 -4
  27. package/dist/bundle/{chunk-NVDR72GP.js → chunk-6TNNT2MQ.js} +250 -174
  28. package/dist/bundle/{chunk-4YECZ6CN.js → chunk-6W763DZN.js} +12 -12
  29. package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-6XFIITOG.js} +1024 -598
  30. package/dist/bundle/{chunk-AD7VI3XU.js → chunk-72C4YOCH.js} +7 -7
  31. package/dist/bundle/{chunk-6EL5AVXX.js → chunk-7PDHGZN4.js} +4 -4
  32. package/dist/bundle/{chunk-22SH77TG.js → chunk-ACUAV6VX.js} +64 -64
  33. package/dist/bundle/{chunk-BBJVV4E2.js → chunk-ASMMG72J.js} +68 -38
  34. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-B5KSXHJ7.js} +1 -1
  35. package/dist/bundle/{chunk-BVVXYZSU.js → chunk-BKSQBBYG.js} +9 -9
  36. package/dist/bundle/{chunk-5SJZDEIO.js → chunk-CJLVYIOP.js} +21 -21
  37. package/dist/bundle/chunk-COJSWDNU.js +170 -0
  38. package/dist/bundle/{chunk-GTDCP5OG.js → chunk-COOOO5B3.js} +4 -4
  39. package/dist/bundle/{chunk-LUZRVBQR.js → chunk-D5TGYUVU.js} +6 -6
  40. package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-EOEU3AZN.js} +6 -6
  41. package/dist/bundle/{chunk-CU6RATZH.js → chunk-FCS26CYQ.js} +4 -4
  42. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-FJH7DJWK.js} +4 -4
  43. package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FP54WSIR.js} +4 -4
  44. package/dist/bundle/{chunk-3URYKAJP.js → chunk-FT3LN3HP.js} +1 -1
  45. package/dist/bundle/{chunk-CDSB7WVG.js → chunk-GBKNJWOZ.js} +8 -8
  46. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GOWXXYEF.js} +2 -2
  47. package/dist/bundle/{chunk-PB6NWKH3.js → chunk-GPQ44Y2R.js} +2 -2
  48. package/dist/bundle/{chunk-E7URRFBB.js → chunk-GZ2D4KXG.js} +10 -15
  49. package/dist/bundle/{chunk-376ZGVUZ.js → chunk-HKY7X6NY.js} +4 -4
  50. package/dist/bundle/{chunk-6XNTELM5.js → chunk-HL52XXZX.js} +1 -1
  51. package/dist/bundle/{chunk-533XOW74.js → chunk-HMS6EEQL.js} +3 -3
  52. package/dist/bundle/{chunk-F5UUJU6R.js → chunk-I4RWW3UD.js} +49 -4
  53. package/dist/bundle/{chunk-TZ75K6R7.js → chunk-ICDCAQ6K.js} +8 -8
  54. package/dist/bundle/{chunk-WOUIHZRI.js → chunk-J5Q5FS2N.js} +18 -75
  55. package/dist/bundle/{chunk-EL2E3ABX.js → chunk-JDV7HNNQ.js} +13 -13
  56. package/dist/bundle/{chunk-ZUG67442.js → chunk-JZHBZOJR.js} +3 -3
  57. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-KGERXYTV.js} +1 -1
  58. package/dist/bundle/{chunk-5TK2YQCO.js → chunk-KGYVHPGE.js} +2 -2
  59. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
  60. package/dist/bundle/{chunk-RLGQMMYE.js → chunk-L46C6HQ7.js} +35 -13
  61. package/dist/bundle/chunk-LXKYKRHD.js +387 -0
  62. package/dist/bundle/{chunk-N4ACIIQB.js → chunk-MIA7P6FZ.js} +2 -2
  63. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-MNLL5YLM.js} +2 -2
  64. package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-OF422U5D.js} +21 -16
  65. package/dist/bundle/{chunk-JRFKCYMW.js → chunk-OJSBWP3F.js} +23 -6
  66. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-P7CUM5IB.js} +1 -1
  67. package/dist/bundle/{chunk-I55XYREN.js → chunk-PRW6SYA3.js} +1094 -2526
  68. package/dist/bundle/chunk-Q7DOMFJ4.js +259 -0
  69. package/dist/bundle/{chunk-3RLRJHAI.js → chunk-QETR5HIZ.js} +12081 -12607
  70. package/dist/bundle/{chunk-QJGFQRTL.js → chunk-QFR2PNJN.js} +12 -12
  71. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-QNRRK3CN.js} +2 -2
  72. package/dist/bundle/{chunk-5B5NOAIA.js → chunk-QXC6IEH6.js} +45 -45
  73. package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-RESDD3Q4.js} +3 -3
  74. package/dist/bundle/chunk-RJOQH5YY.js +1979 -0
  75. package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-RWDKMU74.js} +3 -3
  76. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-SAKO3P4H.js} +1 -1
  77. package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-SDKQNOL5.js} +6 -6
  78. package/dist/bundle/{chunk-25FT44S3.js → chunk-SERXSCN3.js} +287 -569
  79. package/dist/bundle/{chunk-2DS2TDGW.js → chunk-TAFHYHKA.js} +20 -118
  80. package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-TAUBRNC5.js} +53 -53
  81. package/dist/bundle/{chunk-2VFAXC6O.js → chunk-UDMNY63V.js} +22 -19
  82. package/dist/bundle/{chunk-EWUQIUTB.js → chunk-UTO2GO4P.js} +5 -5
  83. package/dist/bundle/{chunk-V4FMN5A6.js → chunk-WVDCCYS3.js} +17 -17
  84. package/dist/bundle/chunk-X4TIMMKJ.js +16 -0
  85. package/dist/bundle/chunk-XF4EXO2C.js +335 -0
  86. package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-XMMFBPGC.js} +2 -2
  87. package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-Y2NWGNUB.js} +5 -5
  88. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
  89. package/dist/bundle/{chunk-L342KHIZ.js → chunk-YMJ6IDGT.js} +6 -6
  90. package/dist/bundle/{chunk-WNMPIRRF.js → chunk-YPFWNVHV.js} +3 -3
  91. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-YPNWIB6H.js} +3 -3
  92. package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
  93. package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-Z3KUSRCF.js} +2 -2
  94. package/dist/bundle/{chunk-WQOGHND4.js → chunk-Z56QFOBR.js} +1 -1
  95. package/dist/bundle/chunk-ZCR3IRZ2.js +823 -0
  96. package/dist/bundle/{chunk-SYUXKV2E.js → chunk-ZM63SUHG.js} +2 -2
  97. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
  98. package/dist/bundle/{cli-BS4L3HAP.js → cli-556DERZL.js} +88 -69
  99. package/dist/bundle/command-contract-VRTOAV6W.js +43 -0
  100. package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-AYLGNZWD.js} +33 -30
  101. package/dist/bundle/decode-QU24MWMN.js +299 -0
  102. package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-4KODNOXV.js} +9 -9
  103. package/dist/bundle/drive.js +11 -11
  104. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-BXX4OQWC.js} +2 -2
  105. package/dist/bundle/{embed-YNZW5X6M.js → embed-KG27KG3D.js} +9 -9
  106. package/dist/bundle/{embedder-LRC2PKTS.js → embedder-IPAVUQUV.js} +12 -12
  107. package/dist/bundle/entry-MVXQETWS.js +25 -0
  108. package/dist/bundle/{failure-X6PSLVSO.js → failure-ESL7ETL4.js} +4 -4
  109. package/dist/bundle/first-run-4UVLW2WR.js +31 -0
  110. package/dist/bundle/first-screen-JAKAIINI.js +41 -0
  111. package/dist/bundle/google-22NXXJX5.js +45 -0
  112. package/dist/bundle/{google-api-7JDZDCWE.js → google-api-VCDBSNOW.js} +70 -62
  113. package/dist/bundle/grants-MQMTVCRQ.js +118 -0
  114. package/dist/bundle/{identity-E43WKN5F.js → identity-LOWMVGZY.js} +6 -6
  115. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-2VECIDXF.js} +1 -1
  116. package/dist/bundle/{login-RBDJPQAG.js → login-7GBONT7V.js} +78 -70
  117. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
  118. package/dist/bundle/meeting-combined-LVP4AZKA.js +27 -0
  119. package/dist/bundle/meeting-model-RAY5XDXZ.js +29 -0
  120. package/dist/bundle/meeting-semantic-G7PFOKU7.js +25 -0
  121. package/dist/bundle/{node-IEVT2FSJ.js → node-MPEQSFI3.js} +2 -2
  122. package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-OLQMAYB4.js} +10 -10
  123. package/dist/bundle/oauth-SGH2I2BY.js +22 -0
  124. package/dist/bundle/{open-TZ5H7NYM.js → open-OXTE672W.js} +8 -8
  125. package/dist/bundle/{openai-XF2KB7W2.js → openai-EB3TPIZY.js} +32 -30
  126. package/dist/bundle/{process-6Q23D3TO.js → process-F6TKXWWA.js} +1 -1
  127. package/dist/bundle/{program-D5XWOHV5.js → program-4IFDZ7FM.js} +1356 -1338
  128. package/dist/bundle/{prompt-KUC5D4GX.js → prompt-F5RRHPN2.js} +8 -8
  129. package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-UORHJDHK.js} +5 -5
  130. package/dist/bundle/{recognize-DPFW7HO3.js → recognize-DAVNZND3.js} +7 -7
  131. package/dist/bundle/{remote-MODTSUNH.js → remote-D5EYYIAU.js} +13 -13
  132. package/dist/bundle/{rerank-JK7SERLE.js → rerank-CND2GVLZ.js} +10 -10
  133. package/dist/bundle/{serve-BV2WHZLW.js → serve-ZHSPUIGX.js} +12 -12
  134. package/dist/bundle/server-DUVJWP3Q.js +80 -0
  135. package/dist/bundle/{server-N3WPEU7Z.js → server-YMAK4LHC.js} +54 -46
  136. package/dist/bundle/{services-SV6CFUCS.js → services-ZILSFJ6E.js} +79 -54
  137. package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-S5VPMZQH.js} +9 -9
  138. package/dist/bundle/{start-C6EXYXAL.js → start-CR6X25RT.js} +7 -7
  139. package/dist/bundle/{state-RAZIREVG.js → state-YFPHVIIJ.js} +9 -9
  140. package/dist/bundle/{store-DQKJKX2G.js → store-CL4ZJZRI.js} +23 -19
  141. package/dist/bundle/{store-2DLGLYS6.js → store-UODRT6X4.js} +31 -26
  142. package/dist/bundle/store-maintenance-command-DY5XIBWR.js +72 -0
  143. package/dist/bundle/tokens-AF7QOFOF.js +118 -0
  144. package/dist/catalog.d.ts +0 -28
  145. package/dist/catalog.d.ts.map +1 -1
  146. package/dist/catalog.js +0 -82
  147. package/dist/catalog.js.map +1 -1
  148. package/dist/commands/catalog.d.ts +3 -8
  149. package/dist/commands/catalog.d.ts.map +1 -1
  150. package/dist/commands/catalog.js +36 -109
  151. package/dist/commands/catalog.js.map +1 -1
  152. package/dist/commands/context.d.ts +3 -0
  153. package/dist/commands/context.d.ts.map +1 -1
  154. package/dist/commands/context.js +20 -0
  155. package/dist/commands/context.js.map +1 -1
  156. package/dist/commands/documents.d.ts.map +1 -1
  157. package/dist/commands/documents.js +30 -72
  158. package/dist/commands/documents.js.map +1 -1
  159. package/dist/commands/folders.d.ts +1 -1
  160. package/dist/commands/folders.d.ts.map +1 -1
  161. package/dist/commands/folders.js +45 -48
  162. package/dist/commands/folders.js.map +1 -1
  163. package/dist/commands/knowledge.d.ts +4 -21
  164. package/dist/commands/knowledge.d.ts.map +1 -1
  165. package/dist/commands/knowledge.js +3 -241
  166. package/dist/commands/knowledge.js.map +1 -1
  167. package/dist/commands/mirrors.d.ts +2 -2
  168. package/dist/commands/mirrors.d.ts.map +1 -1
  169. package/dist/commands/mirrors.js +46 -202
  170. package/dist/commands/mirrors.js.map +1 -1
  171. package/dist/commands/search.d.ts +1 -3
  172. package/dist/commands/search.d.ts.map +1 -1
  173. package/dist/commands/search.js +20 -42
  174. package/dist/commands/search.js.map +1 -1
  175. package/dist/commands/sync.d.ts.map +1 -1
  176. package/dist/commands/sync.js +36 -53
  177. package/dist/commands/sync.js.map +1 -1
  178. package/dist/config.d.ts.map +1 -1
  179. package/dist/config.js +2 -1
  180. package/dist/config.js.map +1 -1
  181. package/dist/contract-overrides.d.ts +0 -2
  182. package/dist/contract-overrides.d.ts.map +1 -1
  183. package/dist/contract-overrides.js +0 -317
  184. package/dist/contract-overrides.js.map +1 -1
  185. package/dist/knowledge.d.ts +1 -1
  186. package/dist/knowledge.d.ts.map +1 -1
  187. package/dist/knowledge.js +4 -3
  188. package/dist/knowledge.js.map +1 -1
  189. package/dist/list-queries.d.ts +0 -31
  190. package/dist/list-queries.d.ts.map +1 -1
  191. package/dist/list-queries.js +0 -36
  192. package/dist/list-queries.js.map +1 -1
  193. package/dist/program.d.ts.map +1 -1
  194. package/dist/program.js +2 -3
  195. package/dist/program.js.map +1 -1
  196. package/dist/provider-json.d.ts.map +1 -1
  197. package/dist/provider-json.js +5 -5
  198. package/dist/provider-json.js.map +1 -1
  199. package/dist/reasons.d.ts.map +1 -1
  200. package/dist/reasons.js +0 -10
  201. package/dist/reasons.js.map +1 -1
  202. package/dist/sync.d.ts.map +1 -1
  203. package/dist/sync.js +1 -2
  204. package/dist/sync.js.map +1 -1
  205. package/dist/transcripts.d.ts +0 -6
  206. package/dist/transcripts.d.ts.map +1 -1
  207. package/dist/transcripts.js +0 -13
  208. package/dist/transcripts.js.map +1 -1
  209. package/dist/version.d.ts +1 -1
  210. package/dist/version.js +1 -1
  211. package/package.json +3 -3
  212. package/dist/bundle/command-contract-HYURWSD6.js +0 -40
  213. package/dist/bundle/decode-E2NM5SSM.js +0 -165
  214. package/dist/bundle/entry-2IMSWRJU.js +0 -25
  215. package/dist/bundle/first-run-7CPHQDM5.js +0 -30
  216. package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
  217. package/dist/bundle/google-WDKDBDD4.js +0 -45
  218. package/dist/bundle/grants-AU25GWKF.js +0 -110
  219. package/dist/bundle/oauth-3JGSN47Z.js +0 -22
  220. package/dist/bundle/server-6YDI4Y36.js +0 -72
  221. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
  222. package/dist/bundle/tokens-LY3WML55.js +0 -110
  223. package/dist/knowledge-query.d.ts +0 -77
  224. package/dist/knowledge-query.d.ts.map +0 -1
  225. package/dist/knowledge-query.js +0 -104
  226. package/dist/knowledge-query.js.map +0 -1
  227. package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
  228. package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
@@ -2,10 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  refuseLacking
5
- } from "./chunk-RLGQMMYE.js";
5
+ } from "./chunk-L46C6HQ7.js";
6
6
  import {
7
+ servingProfiles
8
+ } from "./chunk-RESDD3Q4.js";
9
+ import {
10
+ DEFAULT_PACE,
7
11
  FloodMemory,
8
12
  OFFLINE,
13
+ Pacer,
9
14
  RecipientList,
10
15
  capability,
11
16
  ceilingRefusal,
@@ -13,15 +18,13 @@ import {
13
18
  floodPathFor,
14
19
  guardFor,
15
20
  holdEnd,
21
+ pacePathFor,
16
22
  profilesOnAccount,
17
23
  recipientsPathFor,
18
24
  servicesFor,
19
25
  throughWrapper,
20
- withFileLockAsync
21
- } from "./chunk-HEBZCKMU.js";
22
- import {
23
- servingProfiles
24
- } from "./chunk-T6X6EZ5N.js";
26
+ waitForTurn
27
+ } from "./chunk-2PUNKUYJ.js";
25
28
  import {
26
29
  AUTHORITY_KEY,
27
30
  CEILING_KEY,
@@ -45,10 +48,10 @@ import {
45
48
  rememberAccount,
46
49
  rootOf2 as rootOf,
47
50
  skipFlagFor
48
- } from "./chunk-25FT44S3.js";
51
+ } from "./chunk-SERXSCN3.js";
49
52
  import {
50
53
  providerErrorKey
51
- } from "./chunk-AD7VI3XU.js";
54
+ } from "./chunk-72C4YOCH.js";
52
55
  import {
53
56
  chatReferenceOf,
54
57
  ensureAccount,
@@ -56,21 +59,18 @@ import {
56
59
  isId,
57
60
  openStore,
58
61
  pickPerson
59
- } from "./chunk-3RLRJHAI.js";
62
+ } from "./chunk-QETR5HIZ.js";
60
63
  import {
61
64
  isCliFailure
62
- } from "./chunk-3YKAFLXY.js";
63
- import {
64
- resolvePaths
65
- } from "./chunk-5SJZDEIO.js";
65
+ } from "./chunk-26DHFMGZ.js";
66
66
  import {
67
67
  CliError
68
- } from "./chunk-EA2OB75T.js";
68
+ } from "./chunk-4QNW4NK6.js";
69
69
  import {
70
70
  __name
71
71
  } from "./chunk-ZVVMGPBJ.js";
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
73
+ // 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/cli/messenger/ask.js
74
74
  import { openSync } from "node:fs";
75
75
  import { createInterface } from "node:readline";
76
76
  import { ReadStream } from "node:tty";
@@ -125,7 +125,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
125
125
  throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
126
126
  }, "terminalAsker");
127
127
 
128
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
128
+ // 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/cli/permission-keys.js
129
129
  var HOUSEKEEPING = /* @__PURE__ */ new Set([
130
130
  "help",
131
131
  "guide",
@@ -205,7 +205,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
205
205
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
206
206
  }, "refuseUnknownPermissionKeys");
207
207
 
208
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
208
+ // 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/cli/messenger/stored.js
209
209
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
210
210
  var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
211
211
  let warned = false;
@@ -781,102 +781,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
781
781
  }
782
782
  }, "keep");
783
783
 
784
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/sends/pace.js
785
- import { readFileSync, renameSync, writeFileSync } from "node:fs";
786
- import { join } from "node:path";
787
- var DEFAULT_PACE = { perMinute: 60, burst: 20 };
788
- var pacePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "pace", `${profile}.json`), "pacePathFor");
789
- var Pacer = class {
790
- static {
791
- __name(this, "Pacer");
792
- }
793
- path;
794
- rate;
795
- now;
796
- constructor(path, rate, now = Date.now) {
797
- this.path = path;
798
- this.rate = rate;
799
- this.now = now;
800
- }
801
- get interval() {
802
- return this.rate.perMinute > 0 ? 6e4 / this.rate.perMinute : 0;
803
- }
804
- /** When this call may go; reserved at once, so the next caller in any process lines up behind it. */
805
- async reserve() {
806
- if (this.interval === 0)
807
- return this.now();
808
- return withFileLockAsync(this.path, "the request pace", () => {
809
- const now = this.now();
810
- const tat = Math.max(this.read(now), now);
811
- this.write(tat + this.interval, now);
812
- return Math.max(now, tat - this.rate.burst * this.interval);
813
- });
814
- }
815
- /** The messenger asked every caller to wait: nothing goes before `now + waitMs`, in any process. */
816
- async holdFor(waitMs) {
817
- if (this.interval === 0)
818
- return;
819
- await withFileLockAsync(this.path, "the request pace", () => {
820
- const now = this.now();
821
- const hold = now + waitMs + this.rate.burst * this.interval;
822
- this.write(Math.max(this.read(now), hold), now);
823
- });
824
- }
825
- /** The owner's `flood clear`: every process may go again at once. */
826
- async reset() {
827
- await withFileLockAsync(this.path, "the request pace", () => this.write(0, this.now()));
828
- }
829
- read(now) {
830
- try {
831
- const file = JSON.parse(readFileSync(this.path, "utf8"));
832
- const tat = Number(file.tat);
833
- if (!Number.isFinite(tat))
834
- return 0;
835
- const at = Number(file.at);
836
- return Number.isFinite(at) && at > now ? now + Math.max(0, tat - at) : tat;
837
- } catch {
838
- return 0;
839
- }
840
- }
841
- write(tat, at) {
842
- const temporary = `${this.path}.${process.pid}.tmp`;
843
- writeFileSync(temporary, JSON.stringify({ tat, at }), { mode: 384 });
844
- renameSync(temporary, this.path);
845
- }
846
- };
847
- var ANNOUNCE_WAIT_MS = 5e3;
848
- var LONGEST_PACE_WAIT_MS = 5 * 6e4;
849
- var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
850
- const { name, operation, warn } = options;
851
- const now = options.now ?? Date.now;
852
- let at = now();
853
- try {
854
- at = await pacer.reserve();
855
- } catch (error) {
856
- warn?.(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
857
- event: "warning",
858
- code: "wait_not_remembered",
859
- operation
860
- });
861
- }
862
- const waitMs = at - now();
863
- if (waitMs <= 0)
864
- return;
865
- if (waitMs > (options.longestWaitMs ?? LONGEST_PACE_WAIT_MS))
866
- throw new CliError("rate_limited", `this profile's next request to ${name} has to wait ${Math.ceil(waitMs / 1e3)} s more \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at).toISOString(), remembered: true });
867
- if (waitMs >= ANNOUNCE_WAIT_MS) {
868
- const seconds = Math.ceil(waitMs / 1e3);
869
- warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
870
- event: "warning",
871
- code: "pace_wait",
872
- operation,
873
- counts: { seconds }
874
- });
875
- }
876
- await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
877
- }, "waitForTurn");
878
-
879
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
784
+ // 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/cli/messenger/flooded.js
880
785
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
881
786
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
882
787
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -973,7 +878,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
973
878
  });
974
879
  }, "flooded");
975
880
 
976
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
881
+ // 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/cli/messenger/observed.js
977
882
  var observed = /* @__PURE__ */ __name((messenger, events) => {
978
883
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
979
884
  const write = currentOperation();
@@ -1072,7 +977,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
1072
977
  counts[part] = (counts[part] ?? 0) + items.length;
1073
978
  }, "byPart");
1074
979
 
1075
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
980
+ // 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/cli/messenger/context.js
1076
981
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
1077
982
  let opened;
1078
983
  return {
@@ -1475,9 +1380,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
1475
1380
  export {
1476
1381
  answerOf,
1477
1382
  terminalAsker,
1478
- DEFAULT_PACE,
1479
- pacePathFor,
1480
- Pacer,
1481
1383
  commandPathKey,
1482
1384
  commandPermissions,
1483
1385
  knownPermissionKeys,
@@ -1,5 +1,18 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CHART_KINDS,
5
+ CHART_SIZE,
6
+ chartAnswer,
7
+ chartPng,
8
+ chartRenderer,
9
+ chatChart,
10
+ keepRefreshedRefs,
11
+ mcpUrlOf,
12
+ refuseWriteBeforeConnecting,
13
+ registerPrompts,
14
+ syncsFirst
15
+ } from "./chunk-35SCQ4VI.js";
3
16
  import {
4
17
  BinaryResource,
5
18
  Picture,
@@ -20,67 +33,54 @@ import {
20
33
  tool,
21
34
  toolKey,
22
35
  toolsFromCommands
23
- } from "./chunk-BBJVV4E2.js";
24
- import {
25
- CHART_KINDS,
26
- CHART_SIZE,
27
- chartAnswer,
28
- chartPng,
29
- chartRenderer,
30
- chatChart,
31
- keepRefreshedRefs,
32
- mcpUrlOf,
33
- refuseWriteBeforeConnecting,
34
- registerPrompts,
35
- syncsFirst
36
- } from "./chunk-KUQDBWPU.js";
36
+ } from "./chunk-ASMMG72J.js";
37
37
  import {
38
38
  agentJson,
39
39
  skillResource
40
- } from "./chunk-SY2HLH5R.js";
41
- import {
42
- instructions
43
- } from "./chunk-CAQ5GW3A.js";
40
+ } from "./chunk-3UGYFXH6.js";
44
41
  import {
45
42
  StdioServerTransport,
46
43
  answeredWire,
47
44
  callerOf,
48
45
  callingAgent,
49
46
  serveStdio
50
- } from "./chunk-WNMPIRRF.js";
47
+ } from "./chunk-YPFWNVHV.js";
48
+ import {
49
+ instructions
50
+ } from "./chunk-22QQUKWA.js";
51
51
  import {
52
52
  McpServer,
53
53
  ResourceTemplate
54
54
  } from "./chunk-5D4AEUVA.js";
55
+ import {
56
+ mcpHttpMarker
57
+ } from "./chunk-HKY7X6NY.js";
55
58
  import {
56
59
  connectedFor
57
- } from "./chunk-2DS2TDGW.js";
60
+ } from "./chunk-TAFHYHKA.js";
58
61
  import {
59
62
  lackedNeed,
60
63
  wholeList
61
- } from "./chunk-RLGQMMYE.js";
64
+ } from "./chunk-L46C6HQ7.js";
62
65
  import {
63
66
  capability,
64
67
  dateWindow,
65
68
  guardFor,
66
69
  servicesFor,
67
70
  storedDeps
68
- } from "./chunk-HEBZCKMU.js";
71
+ } from "./chunk-2PUNKUYJ.js";
69
72
  import {
70
73
  imageSize
71
- } from "./chunk-5B5NOAIA.js";
72
- import {
73
- mcpHttpMarker
74
- } from "./chunk-376ZGVUZ.js";
74
+ } from "./chunk-QXC6IEH6.js";
75
75
  import {
76
76
  warmEmbedders
77
- } from "./chunk-EWUQIUTB.js";
77
+ } from "./chunk-UTO2GO4P.js";
78
78
  import {
79
79
  stdinFieldOf
80
- } from "./chunk-MHXZ62CU.js";
80
+ } from "./chunk-P7CUM5IB.js";
81
81
  import {
82
82
  findCommand
83
- } from "./chunk-6EL5AVXX.js";
83
+ } from "./chunk-7PDHGZN4.js";
84
84
  import {
85
85
  DEFAULT_OUTPUT_BYTES,
86
86
  changesAuthorityAt,
@@ -97,35 +97,35 @@ import {
97
97
  rootOf2 as rootOf,
98
98
  sealed,
99
99
  snakeKeys
100
- } from "./chunk-25FT44S3.js";
100
+ } from "./chunk-SERXSCN3.js";
101
101
  import {
102
102
  withCaller
103
- } from "./chunk-AD7VI3XU.js";
103
+ } from "./chunk-72C4YOCH.js";
104
104
  import {
105
105
  readOnlyLockOf
106
- } from "./chunk-ZBYKCVSV.js";
106
+ } from "./chunk-MNLL5YLM.js";
107
107
  import {
108
108
  openStore
109
- } from "./chunk-3RLRJHAI.js";
109
+ } from "./chunk-QETR5HIZ.js";
110
110
  import {
111
111
  pdfPreviewLimits
112
- } from "./chunk-ZUG67442.js";
112
+ } from "./chunk-JZHBZOJR.js";
113
113
  import {
114
114
  typedCommand
115
- } from "./chunk-I55XYREN.js";
116
- import {
117
- timezoneOf
118
- } from "./chunk-UPCEHSIZ.js";
115
+ } from "./chunk-RJOQH5YY.js";
119
116
  import {
120
117
  isCliFailure
121
- } from "./chunk-3YKAFLXY.js";
118
+ } from "./chunk-26DHFMGZ.js";
119
+ import {
120
+ timezoneOf
121
+ } from "./chunk-OF422U5D.js";
122
122
  import {
123
123
  errorObjectOf,
124
124
  mcpErrorResult
125
- } from "./chunk-PV3AWPHR.js";
125
+ } from "./chunk-3N2OFXB5.js";
126
126
  import {
127
127
  visibleControls
128
- } from "./chunk-HCZYJMBP.js";
128
+ } from "./chunk-KYKW2W6X.js";
129
129
  import {
130
130
  description,
131
131
  integer,
@@ -140,18 +140,18 @@ import {
140
140
  regex,
141
141
  strictObject,
142
142
  string
143
- } from "./chunk-JRFKCYMW.js";
143
+ } from "./chunk-OJSBWP3F.js";
144
144
  import {
145
145
  CliError
146
- } from "./chunk-EA2OB75T.js";
146
+ } from "./chunk-4QNW4NK6.js";
147
147
  import {
148
148
  __name
149
149
  } from "./chunk-ZVVMGPBJ.js";
150
150
 
151
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
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
152
152
  import { randomUUID } from "node:crypto";
153
153
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
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
155
155
  var agentLog = /* @__PURE__ */ __name((open) => {
156
156
  let held;
157
157
  return {
@@ -170,7 +170,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
170
170
  };
171
171
  }, "agentLog");
172
172
 
173
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/resources.js
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
174
174
  var LISTED = 100;
175
175
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
176
176
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -208,7 +208,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
208
208
  });
209
209
  }, "registerResources");
210
210
 
211
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/session.js
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
212
212
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
213
213
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
214
214
  var MessengerSession = class {
@@ -283,7 +283,7 @@ var MessengerSession = class {
283
283
  }
284
284
  };
285
285
 
286
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
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
287
287
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
288
288
  const _command = messenger.app.command;
289
289
  return {
@@ -337,7 +337,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
337
337
  };
338
338
  }, "attachmentsTools");
339
339
 
340
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
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
341
341
  var PHOTO_LIMIT = 512 * 1024;
342
342
  var IMAGE_TYPES = [
343
343
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -393,7 +393,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
393
393
  return new Uint8Array(Buffer.concat(chunks));
394
394
  }, "readUpTo");
395
395
 
396
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
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
397
397
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
398
398
  stats_charts: tool({
399
399
  title: "A chart from a chat's statistics",
@@ -430,14 +430,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
430
430
  })
431
431
  }), "statsTools");
432
432
 
433
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools.js
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
434
434
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
435
435
  ...messagesPhotoTools(messenger),
436
436
  ...attachmentsTools(messenger),
437
437
  ...statsTools(messenger)
438
438
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
439
439
 
440
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
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
441
441
  var PER_RUN = /* @__PURE__ */ new Set([
442
442
  "streams",
443
443
  "stdin",
@@ -754,7 +754,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
754
754
  }, "serveOverStdio");
755
755
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
756
756
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
757
- const { serveOverHttp } = await import("./serve-BV2WHZLW.js");
757
+ const { serveOverHttp } = await import("./serve-ZHSPUIGX.js");
758
758
  const appName = messenger.app.command;
759
759
  const appEnvPrefix = messenger.app.envPrefix;
760
760
  const listening = await serveOverHttp(build, {
@@ -3,35 +3,35 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  activeProfile,
5
5
  paths
6
- } from "./chunk-WOUIHZRI.js";
6
+ } from "./chunk-J5Q5FS2N.js";
7
7
  import {
8
8
  READ_SCOPE,
9
9
  WRITE_SCOPE
10
10
  } from "./chunk-NYECVHFH.js";
11
- import {
12
- googleError
13
- } from "./chunk-Y2QVNVHK.js";
14
11
  import {
15
12
  providerRequest
16
- } from "./chunk-IQ2QU2X6.js";
13
+ } from "./chunk-6XFIITOG.js";
14
+ import {
15
+ googleError
16
+ } from "./chunk-2BVVU7GG.js";
17
17
  import {
18
18
  withTimeLimit
19
- } from "./chunk-5B5NOAIA.js";
19
+ } from "./chunk-QXC6IEH6.js";
20
20
  import {
21
21
  acquireLock
22
- } from "./chunk-EL2E3ABX.js";
22
+ } from "./chunk-JDV7HNNQ.js";
23
23
  import {
24
24
  hostFetch
25
- } from "./chunk-L342KHIZ.js";
25
+ } from "./chunk-YMJ6IDGT.js";
26
26
  import {
27
27
  DESKTOP
28
- } from "./chunk-SYUXKV2E.js";
28
+ } from "./chunk-ZM63SUHG.js";
29
29
  import {
30
30
  Credentials,
31
31
  isMovedRun,
32
32
  keyringService,
33
33
  systemKeyring
34
- } from "./chunk-5SJZDEIO.js";
34
+ } from "./chunk-CJLVYIOP.js";
35
35
  import {
36
36
  minLength,
37
37
  nullable,
@@ -41,16 +41,16 @@ import {
41
41
  pipe,
42
42
  safeParse,
43
43
  string
44
- } from "./chunk-JRFKCYMW.js";
44
+ } from "./chunk-OJSBWP3F.js";
45
45
  import {
46
46
  CliError,
47
47
  isCliError
48
- } from "./chunk-EA2OB75T.js";
48
+ } from "./chunk-4QNW4NK6.js";
49
49
  import {
50
50
  __name
51
51
  } from "./chunk-ZVVMGPBJ.js";
52
52
 
53
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
53
+ // 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/oauth/authorize.js
54
54
  import { createHash, randomBytes } from "node:crypto";
55
55
  import { createServer } from "node:http";
56
56
  var DEFAULT_TIMEOUT_MS = 3e5;
@@ -186,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
186
186
  }
187
187
  }, "authorize");
188
188
 
189
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
189
+ // 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/oauth/keeper.js
190
190
  import { createHash as createHash2 } from "node:crypto";
191
191
  import { join } from "node:path";
192
192
  import { setTimeout as delay } from "node:timers/promises";
193
193
 
194
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/requests.js
194
+ // 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/oauth/requests.js
195
195
  var REQUEST_LIMIT_MS = 3e4;
196
196
  var TOKEN_LOG_EVENT = "oauth.token";
197
197
  var object2 = /* @__PURE__ */ __name((value) => {
@@ -324,7 +324,7 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
324
324
  });
325
325
  }, "revokeToken");
326
326
 
327
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
327
+ // 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/oauth/keeper.js
328
328
  var inFlight = /* @__PURE__ */ new Map();
329
329
  var refreshedInMemory = /* @__PURE__ */ new Map();
330
330
  var tokenKeeper = /* @__PURE__ */ __name((options) => {
@@ -435,6 +435,8 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
435
435
  if (fresh(current.tokens) || current.tokens.refreshToken !== seen.tokens.refreshToken)
436
436
  return current.tokens;
437
437
  }
438
+ if (storage.moved && storage.rotating)
439
+ throw new CliError("authentication_error", `the sign-in to ${provider.name} needs a refresh, which a run with moved folders never makes: the provider rotates its refresh token, and the owner's own sign-in would keep a dead one; run this in the normal run, or sign in again there`, { reason: "oauth.moved-rotating" });
438
440
  const client = clientOf(current);
439
441
  const refreshed = await exchange({ grant_type: "refresh_token", refresh_token: current.tokens.refreshToken }, context(client, current.tokens));
440
442
  if (storage.moved && refreshed.refreshToken === current.tokens.refreshToken)
@@ -486,7 +488,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
486
488
  };
487
489
  }, "tokenKeeper");
488
490
 
489
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/provider.js
491
+ // 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/oauth/provider.js
490
492
  var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
491
493
  id: "google",
492
494
  name: "Google",
@@ -503,7 +505,7 @@ var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
503
505
  }
504
506
  }), "googleProvider");
505
507
 
506
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/storage.js
508
+ // 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/oauth/storage.js
507
509
  var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
508
510
  var parse = /* @__PURE__ */ __name((raw) => {
509
511
  let value;
@@ -661,6 +663,7 @@ var credentialStorage = /* @__PURE__ */ __name((options) => {
661
663
  return {
662
664
  key: `${service}\0${account}`,
663
665
  moved,
666
+ ...codec.rotating ? { rotating: true } : {},
664
667
  probe: /* @__PURE__ */ __name(() => {
665
668
  raw(account);
666
669
  }, "probe"),
@@ -668,7 +671,7 @@ var credentialStorage = /* @__PURE__ */ __name((options) => {
668
671
  const value = current();
669
672
  return value === void 0 ? void 0 : codec.decode(value);
670
673
  }, "read"),
671
- write: /* @__PURE__ */ __name((input, writeOptions) => save(codec.encode({ ...input, previous: raw(account) }), writeOptions), "write"),
674
+ write: /* @__PURE__ */ __name((input, writeOptions) => save(codec.encode({ ...input, previous: raw(account), ...writeOptions?.signIn ? { signIn: true } : {} }), writeOptions), "write"),
672
675
  remove: /* @__PURE__ */ __name(() => {
673
676
  try {
674
677
  return credentials2.remove(account);
@@ -8,23 +8,23 @@ import {
8
8
  installFiles,
9
9
  megabytes,
10
10
  sharedModelsDirectory
11
- } from "./chunk-GTDCP5OG.js";
11
+ } from "./chunk-COOOO5B3.js";
12
12
  import {
13
13
  importFrom
14
14
  } from "./chunk-Y5E2WNWB.js";
15
15
  import {
16
16
  CliError
17
- } from "./chunk-EA2OB75T.js";
17
+ } from "./chunk-4QNW4NK6.js";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-ZVVMGPBJ.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
22
+ // 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/embeddings/embed.js
23
23
  import { readFileSync as readFileSync2 } from "node:fs";
24
24
  import { availableParallelism } from "node:os";
25
25
  import { basename, join as join2 } from "node:path";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
27
+ // 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/embeddings/onnx-runtime.js
28
28
  import { createHash } from "node:crypto";
29
29
  import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
30
30
  import { join } from "node:path";
@@ -207,7 +207,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
207
207
  return { ort, session: await ort.InferenceSession.create(bytes, options) };
208
208
  }, "openSession");
209
209
 
210
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
210
+ // 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/embeddings/embed.js
211
211
  var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
212
212
  var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
213
213
  var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");