@wirecat/drive-cli 0.65.0 → 0.67.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 (233) hide show
  1. package/contracts/wirecat.json +2899 -0
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/browse.d.ts +1 -1
  5. package/dist/browse.d.ts.map +1 -1
  6. package/dist/browse.js +1 -1
  7. package/dist/bundle/{all-profiles-PD7GJHFA.js → all-profiles-DVZUVAPQ.js} +14 -14
  8. package/dist/bundle/{anthropic-PJKFON5H.js → anthropic-Y45C45O2.js} +20 -13
  9. package/dist/bundle/{app-server-6ELQA6FJ.js → app-server-GTXUOUGD.js} +67 -56
  10. package/dist/bundle/{bun-P54TGES2.js → bun-QVJV76QJ.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-TND5ZRJH.js → bun-sqlite-CC7PIAMH.js} +9 -9
  12. package/dist/bundle/{chunk-Y5PKRITX.js → chunk-2MEVCMBW.js} +5 -5
  13. package/dist/bundle/{chunk-ZILALBYQ.js → chunk-2PIA45FC.js} +7 -5
  14. package/dist/bundle/{chunk-SIWXYB4E.js → chunk-2Y3YBDZX.js} +3123 -2851
  15. package/dist/bundle/{chunk-54V4H6PM.js → chunk-3RG6LL25.js} +12 -12
  16. package/dist/bundle/{chunk-UTNRBOEN.js → chunk-4G7WQNG7.js} +3 -2
  17. package/dist/bundle/{chunk-OWMZUWCM.js → chunk-4VH7M2OD.js} +6 -14
  18. package/dist/bundle/{chunk-EM7NL5ES.js → chunk-5DMPGTNR.js} +3 -3
  19. package/dist/bundle/{chunk-W2XY6C5S.js → chunk-5TK2YQCO.js} +2 -2
  20. package/dist/bundle/{chunk-NQ5XMSLA.js → chunk-5TSILGTO.js} +21668 -28647
  21. package/dist/bundle/{chunk-FBHSWQU7.js → chunk-6ERQE4FS.js} +319 -102
  22. package/dist/bundle/{chunk-4AOINPN2.js → chunk-7AZCAUST.js} +8 -2
  23. package/dist/bundle/{chunk-DA63E2UM.js → chunk-7J2IP3WL.js} +18 -15
  24. package/dist/bundle/{chunk-JPPPLKAO.js → chunk-7JKECODO.js} +1 -2
  25. package/dist/bundle/{chunk-SEQWBZYH.js → chunk-AAZPDWRD.js} +1 -1
  26. package/dist/bundle/{chunk-CWLL63JD.js → chunk-ABJQ6IDU.js} +17 -17
  27. package/dist/bundle/{chunk-PHOL2DZM.js → chunk-AJ3DFPRT.js} +63 -5
  28. package/dist/bundle/{chunk-4EDWLR22.js → chunk-AZKFZ7J7.js} +1 -1
  29. package/dist/bundle/{chunk-IMHW7VIV.js → chunk-BHSLMJF7.js} +5 -5
  30. package/dist/bundle/{chunk-EHU6EYGO.js → chunk-C72WYRXD.js} +12 -12
  31. package/dist/bundle/chunk-CWDC6QJM.js +72 -0
  32. package/dist/bundle/{chunk-TTP4NOP3.js → chunk-D4MVEOU2.js} +4 -4
  33. package/dist/bundle/{chunk-ZR2EJPMQ.js → chunk-DAFKV6DJ.js} +226 -18
  34. package/dist/bundle/{chunk-RNHGQ35R.js → chunk-E3XA56TS.js} +1 -1
  35. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-EA2OB75T.js} +1 -1
  36. package/dist/bundle/{chunk-7TAP7Y2E.js → chunk-ETAFFY3J.js} +196 -112
  37. package/dist/bundle/{chunk-D6Z43SOG.js → chunk-EXWOOST5.js} +402 -362
  38. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  39. package/dist/bundle/{chunk-HP3NT6JJ.js → chunk-FOMQ4MG3.js} +3 -3
  40. package/dist/bundle/{chunk-VMAMRFFC.js → chunk-FS2PG2PE.js} +117 -44
  41. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-HCZYJMBP.js} +1 -1
  42. package/dist/bundle/{chunk-OFJXHEFT.js → chunk-HJF2QGOX.js} +93 -31
  43. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-IJCUAKR5.js} +4 -4
  44. package/dist/bundle/{chunk-O6K2E7OA.js → chunk-IRULPE5M.js} +1522 -1107
  45. package/dist/bundle/{chunk-EU5MD24W.js → chunk-JCNEPYQZ.js} +13 -13
  46. package/dist/bundle/{chunk-VDZY3L7U.js → chunk-JEMBW6IO.js} +1 -1
  47. package/dist/bundle/{chunk-Z2ADO6UA.js → chunk-JJHDV32D.js} +2 -2
  48. package/dist/bundle/{chunk-FA6JNXCC.js → chunk-JLUQZZ26.js} +8 -8
  49. package/dist/bundle/{chunk-WRAUO5EJ.js → chunk-JO7BJYAP.js} +45 -22
  50. package/dist/bundle/{chunk-TOVWMURV.js → chunk-JRFKCYMW.js} +22 -7
  51. package/dist/bundle/{chunk-M7ELUGU6.js → chunk-JY2GZDJL.js} +4 -4
  52. package/dist/bundle/chunk-LSAIXPAX.js +47 -0
  53. package/dist/bundle/{chunk-WVJHZIDH.js → chunk-LXRBTXCZ.js} +3 -3
  54. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  55. package/dist/bundle/{chunk-F56DRBGY.js → chunk-MBLB4TQI.js} +75 -20
  56. package/dist/bundle/{chunk-4Y5YBFMS.js → chunk-MEQNAZ6R.js} +7 -7
  57. package/dist/bundle/{chunk-XYE7XZPB.js → chunk-MEY7URZZ.js} +39 -35
  58. package/dist/bundle/{chunk-IBO23OID.js → chunk-MF46W7PQ.js} +2 -2
  59. package/dist/bundle/{chunk-7AQGVX5O.js → chunk-MW46BLWH.js} +60 -29
  60. package/dist/bundle/{chunk-VHQYWFWV.js → chunk-NFIR346J.js} +1 -1
  61. package/dist/bundle/{chunk-NI5PD5KM.js → chunk-NWYVOHIX.js} +18611 -16472
  62. package/dist/bundle/chunk-NYECVHFH.js +10283 -0
  63. package/dist/bundle/{chunk-D7WB54P7.js → chunk-OOBSSU2G.js} +546 -457
  64. package/dist/bundle/{chunk-VLXWAH5E.js → chunk-P6A77LMP.js} +4 -4
  65. package/dist/bundle/{chunk-ZD4MB7NH.js → chunk-PDHN4GHU.js} +5 -40
  66. package/dist/bundle/{chunk-PLP5527C.js → chunk-PV3AWPHR.js} +5 -5
  67. package/dist/bundle/{chunk-TMHF4BCL.js → chunk-QOKPRFHM.js} +2 -2
  68. package/dist/bundle/{chunk-JMJIH6JH.js → chunk-RC72RU66.js} +6 -6
  69. package/dist/bundle/{chunk-NQRTKYJB.js → chunk-RLH6BOEG.js} +47 -80
  70. package/dist/bundle/{chunk-II4S2DBJ.js → chunk-SJE7UGOW.js} +12 -6
  71. package/dist/bundle/{chunk-LMKPP2JP.js → chunk-SXJDCRXE.js} +1 -1
  72. package/dist/bundle/{chunk-B2LPCHQN.js → chunk-T2VAEDJS.js} +4 -4
  73. package/dist/bundle/{chunk-I272E6UR.js → chunk-U2ERT45N.js} +54 -117
  74. package/dist/bundle/{chunk-A27UVLPK.js → chunk-UFNE57VY.js} +3 -3
  75. package/dist/bundle/{chunk-5XSBCMAF.js → chunk-ULH3TNUP.js} +4 -4
  76. package/dist/bundle/{chunk-3ONWN3IA.js → chunk-UOAHZV3K.js} +161 -48
  77. package/dist/bundle/{chunk-ECEP4SO3.js → chunk-UPCEHSIZ.js} +10 -10
  78. package/dist/bundle/{chunk-42G2XNPN.js → chunk-V7E25BUU.js} +2 -2
  79. package/dist/bundle/{chunk-EZ2OLYEK.js → chunk-VZ5KETIX.js} +14 -5
  80. package/dist/bundle/{chunk-X7YGGWXI.js → chunk-WBKYZZQT.js} +3 -2
  81. package/dist/bundle/{chunk-GW3LBY3T.js → chunk-WKIQKGOF.js} +146 -133
  82. package/dist/bundle/{chunk-O7ZDCOZE.js → chunk-WWW7YTFG.js} +1 -1
  83. package/dist/bundle/{chunk-2AFI4KGI.js → chunk-XZCF5XU7.js} +7 -7
  84. package/dist/bundle/chunk-Y2QVNVHK.js +70 -0
  85. package/dist/bundle/{chunk-WRMJN6UQ.js → chunk-Y5WSRG3F.js} +3 -3
  86. package/dist/bundle/{chunk-A4QNADEX.js → chunk-YI4DXASF.js} +49 -49
  87. package/dist/bundle/{chunk-SS4LKLD7.js → chunk-YVUAG7RF.js} +371 -362
  88. package/dist/bundle/chunk-ZEPDEFVT.js +71 -0
  89. package/dist/bundle/{chunk-SE352DBY.js → chunk-ZH4H5XTA.js} +1 -1
  90. package/dist/bundle/{chunk-3HXNDF6Q.js → chunk-ZK46UHDP.js} +2 -2
  91. package/dist/bundle/{chunk-SNLSEYJO.js → chunk-ZU5VQYNY.js} +1 -1
  92. package/dist/bundle/cli-U4LSBYDV.js +1101 -0
  93. package/dist/bundle/command-contract-UU5T24ZZ.js +41 -0
  94. package/dist/bundle/{command-server-entry-36JXYIJB.js → command-server-entry-PK6FBUPO.js} +31 -30
  95. package/dist/bundle/{decode-T5ZW57WZ.js → decode-3ZE6NBKV.js} +8 -8
  96. package/dist/bundle/{dispatch-RMA2XFYA.js → dispatch-WBEOHZDV.js} +9 -9
  97. package/dist/bundle/drive.js +13 -13
  98. package/dist/bundle/{echarts-KQ44LPSF.js → echarts-6FWNCNXK.js} +2 -2
  99. package/dist/bundle/{embed-Q7XST53J.js → embed-DGYBBZUW.js} +9 -9
  100. package/dist/bundle/{embedder-RWZSBVW2.js → embedder-O7A6VMWI.js} +12 -12
  101. package/dist/bundle/entry-CDJ2QSU2.js +25 -0
  102. package/dist/bundle/{failure-7NP4QPIN.js → failure-X6PSLVSO.js} +4 -4
  103. package/dist/bundle/first-run-UOQW7DN5.js +30 -0
  104. package/dist/bundle/first-screen-SNDV4YKF.js +39 -0
  105. package/dist/bundle/google-HPX52KMC.js +45 -0
  106. package/dist/bundle/{google-api-P5DRHD7L.js → google-api-HIMN4XL5.js} +68 -63
  107. package/dist/bundle/grants-RO42I6E4.js +111 -0
  108. package/dist/bundle/{identity-VDV6CHRW.js → identity-NFGHDPLL.js} +8 -6
  109. package/dist/bundle/{instructions-Q45FVY6H.js → instructions-6JAQYCM6.js} +1 -1
  110. package/dist/bundle/{login-XKN3NI6X.js → login-RZOQN63N.js} +73 -70
  111. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  112. package/dist/bundle/{node-MSW565D3.js → node-KSIX3GIH.js} +2 -2
  113. package/dist/bundle/{node-sqlite-S74XVVHL.js → node-sqlite-4FJ6WJXN.js} +10 -10
  114. package/dist/bundle/oauth-BKZAMFKK.js +22 -0
  115. package/dist/bundle/{open-P7UQG7XJ.js → open-4AQJGH42.js} +8 -8
  116. package/dist/bundle/{openai-DDHJ57KZ.js → openai-24F2OX55.js} +28 -21
  117. package/dist/bundle/{process-NMUB5SHK.js → process-7NOA2T7H.js} +1 -1
  118. package/dist/bundle/{program-PJNWP6JW.js → program-7JHMLDEX.js} +306 -692
  119. package/dist/bundle/{prompt-VOSMK4C2.js → prompt-NM66MAZ4.js} +8 -8
  120. package/dist/bundle/{reasons-KDAXOC5S.js → reasons-KSYP5VDJ.js} +5 -5
  121. package/dist/bundle/{recognize-GZIY63HS.js → recognize-DBKV2JYZ.js} +7 -7
  122. package/dist/bundle/{remote-V3YGN7LN.js → remote-ABWUTBVB.js} +13 -10
  123. package/dist/bundle/{rerank-XRU6AVN7.js → rerank-FQAU4ENY.js} +10 -10
  124. package/dist/bundle/{serve-NDOAFA57.js → serve-QLJG4QZD.js} +12 -12
  125. package/dist/bundle/server-NUBLY5SV.js +74 -0
  126. package/dist/bundle/{server-BKGWJYMC.js → server-VGZNK5XD.js} +47 -45
  127. package/dist/bundle/{services-TYDMFQCA.js → services-5KARVUHK.js} +44 -34
  128. package/dist/bundle/{sqlite-runtime-UAFJKSJR.js → sqlite-runtime-ILF6EFQJ.js} +9 -9
  129. package/dist/bundle/{start-2ZLDP2OE.js → start-C6EXYXAL.js} +7 -7
  130. package/dist/bundle/{state-6SP27J2K.js → state-R2M56GPU.js} +9 -9
  131. package/dist/bundle/{store-4UUY545Q.js → store-2OBVMUQL.js} +21 -19
  132. package/dist/bundle/{store-EJN27MXI.js → store-DA4K7HWW.js} +23 -21
  133. package/dist/bundle/store-maintenance-command-KSIPI5B5.js +65 -0
  134. package/dist/bundle/tokens-VQDGSHRB.js +111 -0
  135. package/dist/commands/config.d.ts.map +1 -1
  136. package/dist/commands/config.js +5 -3
  137. package/dist/commands/config.js.map +1 -1
  138. package/dist/commands/discovery.d.ts +0 -1
  139. package/dist/commands/discovery.d.ts.map +1 -1
  140. package/dist/commands/discovery.js +6 -26
  141. package/dist/commands/discovery.js.map +1 -1
  142. package/dist/commands/knowledge.d.ts.map +1 -1
  143. package/dist/commands/knowledge.js +7 -6
  144. package/dist/commands/knowledge.js.map +1 -1
  145. package/dist/commands/search.d.ts.map +1 -1
  146. package/dist/commands/search.js +15 -12
  147. package/dist/commands/search.js.map +1 -1
  148. package/dist/commands/sync.d.ts.map +1 -1
  149. package/dist/commands/sync.js +2 -1
  150. package/dist/commands/sync.js.map +1 -1
  151. package/dist/commands/transcripts.d.ts +4 -0
  152. package/dist/commands/transcripts.d.ts.map +1 -0
  153. package/dist/commands/transcripts.js +42 -0
  154. package/dist/commands/transcripts.js.map +1 -0
  155. package/dist/config.d.ts +10 -0
  156. package/dist/config.d.ts.map +1 -1
  157. package/dist/config.js +17 -3
  158. package/dist/config.js.map +1 -1
  159. package/dist/contract-overrides.d.ts +16 -4
  160. package/dist/contract-overrides.d.ts.map +1 -1
  161. package/dist/contract-overrides.js +86 -410
  162. package/dist/contract-overrides.js.map +1 -1
  163. package/dist/errors.d.ts.map +1 -1
  164. package/dist/errors.js +4 -0
  165. package/dist/errors.js.map +1 -1
  166. package/dist/google-api.d.ts.map +1 -1
  167. package/dist/google-api.js +4 -1
  168. package/dist/google-api.js.map +1 -1
  169. package/dist/google.d.ts.map +1 -1
  170. package/dist/google.js +31 -28
  171. package/dist/google.js.map +1 -1
  172. package/dist/identity.d.ts +4 -0
  173. package/dist/identity.d.ts.map +1 -1
  174. package/dist/identity.js +22 -0
  175. package/dist/identity.js.map +1 -1
  176. package/dist/knowledge.js +2 -2
  177. package/dist/knowledge.js.map +1 -1
  178. package/dist/list-queries.d.ts +10 -0
  179. package/dist/list-queries.d.ts.map +1 -1
  180. package/dist/list-queries.js +12 -1
  181. package/dist/list-queries.js.map +1 -1
  182. package/dist/login.d.ts.map +1 -1
  183. package/dist/login.js +2 -2
  184. package/dist/login.js.map +1 -1
  185. package/dist/model.d.ts +4 -1
  186. package/dist/model.d.ts.map +1 -1
  187. package/dist/program.d.ts.map +1 -1
  188. package/dist/program.js +10 -6
  189. package/dist/program.js.map +1 -1
  190. package/dist/reasons.d.ts.map +1 -1
  191. package/dist/reasons.js +0 -1
  192. package/dist/reasons.js.map +1 -1
  193. package/dist/state.d.ts.map +1 -1
  194. package/dist/state.js +2 -0
  195. package/dist/state.js.map +1 -1
  196. package/dist/store-transition.js +2 -2
  197. package/dist/store-transition.js.map +1 -1
  198. package/dist/store.d.ts.map +1 -1
  199. package/dist/store.js +7 -7
  200. package/dist/store.js.map +1 -1
  201. package/dist/sync.d.ts.map +1 -1
  202. package/dist/sync.js +5 -1
  203. package/dist/sync.js.map +1 -1
  204. package/dist/tokens.d.ts +9 -2
  205. package/dist/tokens.d.ts.map +1 -1
  206. package/dist/tokens.js +18 -15
  207. package/dist/tokens.js.map +1 -1
  208. package/dist/transcripts.d.ts +21 -0
  209. package/dist/transcripts.d.ts.map +1 -0
  210. package/dist/transcripts.js +48 -0
  211. package/dist/transcripts.js.map +1 -0
  212. package/dist/version.d.ts +1 -1
  213. package/dist/version.js +1 -1
  214. package/dist/wcat.d.ts +3 -0
  215. package/dist/wcat.d.ts.map +1 -0
  216. package/dist/wcat.js +4 -0
  217. package/dist/wcat.js.map +1 -0
  218. package/package.json +7 -7
  219. package/dist/bundle/chunk-CGQRZRTH.js +0 -26
  220. package/dist/bundle/chunk-IKHOIXJR.js +0 -27
  221. package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
  222. package/dist/bundle/command-contract-25E4PYMD.js +0 -40
  223. package/dist/bundle/dist-PY3MVR3G.js +0 -21
  224. package/dist/bundle/entry-HPLW4QL2.js +0 -25
  225. package/dist/bundle/first-run-RL3RKYZW.js +0 -30
  226. package/dist/bundle/first-screen-NX3TM2VJ.js +0 -38
  227. package/dist/bundle/google-DPD5N6AQ.js +0 -42
  228. package/dist/bundle/grants-TX4MHLI4.js +0 -109
  229. package/dist/bundle/oauth-6R7AWAES.js +0 -22
  230. package/dist/bundle/server-QD2MUJJZ.js +0 -72
  231. package/dist/bundle/store-maintenance-command-LETURZDC.js +0 -60
  232. package/dist/bundle/tokens-MTFJPTYT.js +0 -107
  233. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -2,14 +2,14 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorObjectOf
5
- } from "./chunk-PLP5527C.js";
5
+ } from "./chunk-PV3AWPHR.js";
6
6
  import {
7
7
  visibleControls
8
- } from "./chunk-6DCLZLGX.js";
8
+ } from "./chunk-HCZYJMBP.js";
9
9
  import {
10
10
  LOG_ATTRIBUTE_KEYS,
11
11
  isContentKey
12
- } from "./chunk-W2XY6C5S.js";
12
+ } from "./chunk-5TK2YQCO.js";
13
13
  import {
14
14
  getDotPath,
15
15
  object,
@@ -17,10 +17,10 @@ import {
17
17
  safeParse,
18
18
  string,
19
19
  unknown
20
- } from "./chunk-TOVWMURV.js";
20
+ } from "./chunk-JRFKCYMW.js";
21
21
  import {
22
22
  CliError
23
- } from "./chunk-ELJUBPY4.js";
23
+ } from "./chunk-EA2OB75T.js";
24
24
  import {
25
25
  __commonJS,
26
26
  __name,
@@ -1893,7 +1893,7 @@ var require_cli_table3 = __commonJS({
1893
1893
  }
1894
1894
  });
1895
1895
 
1896
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
1896
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
1897
1897
  import { createRequire } from "node:module";
1898
1898
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
1899
1899
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -1902,7 +1902,13 @@ var entryClass = /* @__PURE__ */ __name(() => {
1902
1902
  cached ??= require2("@napi-rs/keyring").Entry;
1903
1903
  return cached;
1904
1904
  }, "entryClass");
1905
- var entry = /* @__PURE__ */ __name((service, account) => new (entryClass())(service, account, ENTRY_OPTIONS), "entry");
1905
+ var STAND_IN = /* @__PURE__ */ Symbol.for("@wirecat/cli-base/testing/keyring-stand-in");
1906
+ var entry = /* @__PURE__ */ __name((service, account) => {
1907
+ const Entry = entryClass();
1908
+ if (!(STAND_IN in Entry) && process.env.VITEST !== void 0)
1909
+ throw new Error("a test reached the real OS keyring without the test setup; pass memoryKeyring()");
1910
+ return new Entry(service, account, ENTRY_OPTIONS);
1911
+ }, "entry");
1906
1912
  var systemKeyring = {
1907
1913
  // Returns null for an absent entry rather than throwing — measured against @napi-rs/keyring
1908
1914
  // on 2026-09-13, and the difference matters: a throw here means the keychain is unusable.
@@ -1913,7 +1919,8 @@ var systemKeyring = {
1913
1919
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
1914
1920
  };
1915
1921
 
1916
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1922
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1923
+ import { realpathSync } from "node:fs";
1917
1924
  import { homedir, userInfo } from "node:os";
1918
1925
  import { join, posix, win32 } from "node:path";
1919
1926
  var PATH_KINDS = ["config", "state", "cache"];
@@ -1937,8 +1944,36 @@ var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platfor
1937
1944
  cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
1938
1945
  };
1939
1946
  }, "defaultPaths");
1947
+ var accountHome = /* @__PURE__ */ __name(() => {
1948
+ try {
1949
+ return userInfo().homedir;
1950
+ } catch {
1951
+ return void 0;
1952
+ }
1953
+ }, "accountHome");
1954
+ var sameFolder = /* @__PURE__ */ __name((a, b, platform) => {
1955
+ if ((platform === "win32" ? win32 : posix).relative(a, b) === "")
1956
+ return true;
1957
+ try {
1958
+ return realpathSync.native(a) === realpathSync.native(b);
1959
+ } catch {
1960
+ return false;
1961
+ }
1962
+ }, "sameFolder");
1963
+ var refuseOwnerHomeInTests = /* @__PURE__ */ __name((env = process.env, platform = process.platform, account = accountHome) => {
1964
+ const named = [env.HOME, env.USERPROFILE].filter((home) => Boolean(home));
1965
+ if ((named.length > 0 ? env.VITEST : env.VITEST ?? process.env.VITEST) === void 0)
1966
+ return;
1967
+ const owner = account();
1968
+ if (owner === void 0)
1969
+ return;
1970
+ for (const home of named.length > 0 ? named : [homedir()])
1971
+ if (sameFolder(owner, home, platform))
1972
+ throw new Error(`a test is running with the owner's real home (${home}); load @wirecat/cli-base/testing/setup (\`vitest --root\` outside the repository skips it) or give the test a HOME of its own`);
1973
+ }, "refuseOwnerHomeInTests");
1940
1974
  var resolvePaths = /* @__PURE__ */ __name((options) => {
1941
- const { appName, prefix, env = process.env } = options;
1975
+ const { appName, prefix, env = process.env, platform = process.platform } = options;
1976
+ refuseOwnerHomeInTests(env, platform);
1942
1977
  const base = defaultPaths(options);
1943
1978
  return {
1944
1979
  config: env[overrideName(appName, prefix, "config")] ?? base.config,
@@ -1947,13 +1982,6 @@ var resolvePaths = /* @__PURE__ */ __name((options) => {
1947
1982
  };
1948
1983
  }, "resolvePaths");
1949
1984
  var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
1950
- var accountHome = /* @__PURE__ */ __name(() => {
1951
- try {
1952
- return userInfo().homedir;
1953
- } catch {
1954
- return void 0;
1955
- }
1956
- }, "accountHome");
1957
1985
  var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
1958
1986
  if (home === void 0)
1959
1987
  return true;
@@ -1965,11 +1993,11 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
1965
1993
  var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
1966
1994
  var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
1967
1995
 
1968
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
1996
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
1969
1997
  import { readFileSync as readFileSync2 } from "node:fs";
1970
1998
  import { join as join3, resolve } from "node:path";
1971
1999
 
1972
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2000
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
1973
2001
  import { randomBytes } from "node:crypto";
1974
2002
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
1975
2003
  import { dirname, join as join2 } from "node:path";
@@ -2013,7 +2041,7 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
2013
2041
  `, 384);
2014
2042
  }, "saveConfigFile");
2015
2043
 
2016
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2044
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2017
2045
  var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
2018
2046
  var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
2019
2047
  var warnedRuns = /* @__PURE__ */ new WeakSet();
@@ -2149,7 +2177,7 @@ var Credentials = class {
2149
2177
  }
2150
2178
  };
2151
2179
 
2152
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2180
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2153
2181
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2154
2182
  if (signal?.aborted)
2155
2183
  return Promise.reject(signal.reason);
@@ -2177,7 +2205,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2177
2205
  });
2178
2206
  }, "waitForDrain");
2179
2207
 
2180
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2208
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2181
2209
  var processStreams = {
2182
2210
  drain: /* @__PURE__ */ __name(async (signal) => {
2183
2211
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -2206,7 +2234,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
2206
2234
  };
2207
2235
  }, "captureStreams");
2208
2236
 
2209
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
2237
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
2210
2238
  var DEFAULT_RETRY = {
2211
2239
  retries: 1,
2212
2240
  baseDelayMs: 250,
@@ -2218,7 +2246,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
2218
2246
  return Math.round(random() * ceiling);
2219
2247
  }, "backoffMs");
2220
2248
 
2221
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
2249
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
2222
2250
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
2223
2251
  var validate = /* @__PURE__ */ __name((paths) => {
2224
2252
  if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
@@ -2283,7 +2311,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
2283
2311
  return project(value, fields);
2284
2312
  }, "projectFields");
2285
2313
 
2286
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2314
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2287
2315
  var BATCH_LIMITS = Object.freeze({
2288
2316
  requests: 32,
2289
2317
  input_bytes: 262144,
@@ -2410,7 +2438,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
2410
2438
  };
2411
2439
  }, "runBatch");
2412
2440
 
2413
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2441
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2414
2442
  import { fileURLToPath } from "node:url";
2415
2443
  var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
2416
2444
  var baseConstantsSchema = object({});
@@ -2465,7 +2493,7 @@ var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
2465
2493
  return deepFreeze(result.output);
2466
2494
  }, "loadConstants");
2467
2495
 
2468
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2496
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2469
2497
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
2470
2498
  var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
2471
2499
  if (signal?.aborted) {
@@ -2479,7 +2507,7 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
2479
2507
  }, { once: true });
2480
2508
  }), "realSleep");
2481
2509
 
2482
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2510
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2483
2511
  import { appendFileSync } from "node:fs";
2484
2512
  var REDACTED_FIELDS = [
2485
2513
  "authorization",
@@ -2574,7 +2602,7 @@ var silent = {
2574
2602
  }, "error")
2575
2603
  };
2576
2604
 
2577
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2605
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2578
2606
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
2579
2607
  import { styleText } from "node:util";
2580
2608
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -2597,6 +2625,7 @@ ${renderFields(rest, paint2)}` : table;
2597
2625
  }
2598
2626
  return renderJson(value);
2599
2627
  }, "renderPretty");
2628
+ var indent = /* @__PURE__ */ __name((text, spaces) => text.split("\n").map((line) => line === "" ? line : `${" ".repeat(spaces)}${line}`).join("\n"), "indent");
2600
2629
  var paint = /* @__PURE__ */ __name((format, color) => (text) => color ? styleText(format, text, { validateStream: false }) : text, "paint");
2601
2630
  var palette = /* @__PURE__ */ __name((color) => ({
2602
2631
  dim: paint("dim", color),
@@ -2648,7 +2677,7 @@ var BORDERLESS = {
2648
2677
  middle: ""
2649
2678
  };
2650
2679
 
2651
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2680
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2652
2681
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
2653
2682
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
2654
2683
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -2698,6 +2727,7 @@ export {
2698
2727
  baseConstantsSchema,
2699
2728
  loadConstants,
2700
2729
  systemKeyring,
2730
+ refuseOwnerHomeInTests,
2701
2731
  resolvePaths,
2702
2732
  pathsAreOverridden,
2703
2733
  isMovedRun,
@@ -2707,6 +2737,7 @@ export {
2707
2737
  realSleep,
2708
2738
  logRecordOf,
2709
2739
  createRecordLog,
2740
+ indent,
2710
2741
  processStreams,
2711
2742
  captureStreams,
2712
2743
  createRenderer,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
8
8
  var COMMAND_SERVER_ARGV = ["commands", "--serve"];
9
9
  var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
10
10