@wirecat/drive-cli 0.58.0 → 0.60.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 (191) hide show
  1. package/dist/bin/drive.js +6 -2
  2. package/dist/bin/drive.js.map +1 -1
  3. package/dist/bundle/{all-profiles-ANDWOJDL.js → all-profiles-537I27Z4.js} +14 -13
  4. package/dist/bundle/{anthropic-EZPZUWGS.js → anthropic-X4NWVHDF.js} +9 -9
  5. package/dist/bundle/{app-server-67WL423B.js → app-server-KSHJKKS7.js} +53 -51
  6. package/dist/bundle/{bun-NIIYUR5F.js → bun-WTBGGCUC.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-A5ZKTIYC.js → bun-sqlite-T7Y3JFFD.js} +8 -8
  8. package/dist/bundle/{chunk-5NPFHWLP.js → chunk-22ATLSNK.js} +5 -5
  9. package/dist/bundle/{chunk-ALTG7BZQ.js → chunk-246P2DCT.js} +19 -19
  10. package/dist/bundle/{chunk-NYINLKWT.js → chunk-2AXA5SKP.js} +1 -1
  11. package/dist/bundle/{chunk-BAEIAQWH.js → chunk-3TQHIHZI.js} +2 -2
  12. package/dist/bundle/{chunk-MBNKNWOG.js → chunk-4CBZEAQ7.js} +35 -34
  13. package/dist/bundle/{chunk-SWFA36F3.js → chunk-4VHBDVY2.js} +20 -14
  14. package/dist/bundle/{chunk-Z5GDNCTJ.js → chunk-4XZXH2NM.js} +2 -2
  15. package/dist/bundle/{chunk-A4DHPOFQ.js → chunk-57QVQGBE.js} +53 -39
  16. package/dist/bundle/{chunk-SPVPKHBQ.js → chunk-5AMRCBMP.js} +78 -40
  17. package/dist/bundle/{chunk-ED5JNYN5.js → chunk-5XHLQZAG.js} +30 -28
  18. package/dist/bundle/{chunk-BLJVCJZU.js → chunk-67QXMO2G.js} +26 -26
  19. package/dist/bundle/{chunk-EFEI724Z.js → chunk-6HTKB4WC.js} +1 -1
  20. package/dist/bundle/{chunk-U2RSVKR5.js → chunk-73MNUSP3.js} +1 -1
  21. package/dist/bundle/{chunk-4UU4ONKY.js → chunk-73TTP6ET.js} +5326 -636
  22. package/dist/bundle/{chunk-4ICWGMHN.js → chunk-77C5XRH3.js} +7 -7
  23. package/dist/bundle/{chunk-W6KMNO3C.js → chunk-77YTRBL6.js} +11 -11
  24. package/dist/bundle/{chunk-YHRJUZ3O.js → chunk-ALWTUDZF.js} +6 -4
  25. package/dist/bundle/{chunk-ESF2B22R.js → chunk-AXWXQNTC.js} +14 -11
  26. package/dist/bundle/{chunk-FD7A6745.js → chunk-CKGHRWVR.js} +4 -4
  27. package/dist/bundle/{chunk-X4F3M6L6.js → chunk-D6WIWOQC.js} +4 -4
  28. package/dist/bundle/{chunk-TCJRJ3TE.js → chunk-DMHGWL5D.js} +13 -13
  29. package/dist/bundle/{chunk-AFZ33AC7.js → chunk-DQDKLZAK.js} +179 -50
  30. package/dist/bundle/{chunk-ITD7WI23.js → chunk-EBLA7GXY.js} +1 -1
  31. package/dist/bundle/{chunk-UTDL7MKT.js → chunk-EHAI773E.js} +2 -2
  32. package/dist/bundle/{chunk-RRHC5SBB.js → chunk-FO4TCH6P.js} +2 -2
  33. package/dist/bundle/{chunk-7VFD3UJQ.js → chunk-FTZNUZO7.js} +3 -3
  34. package/dist/bundle/{chunk-JEMKSWVI.js → chunk-FZOCQQ66.js} +12 -12
  35. package/dist/bundle/{chunk-P5MCZ635.js → chunk-GD6TQ6U4.js} +11 -88
  36. package/dist/bundle/{chunk-PYPLD7JO.js → chunk-GVRS5AIH.js} +2 -2
  37. package/dist/bundle/{chunk-2TASMYGM.js → chunk-HCJG7ENG.js} +3 -3
  38. package/dist/bundle/{chunk-TIXIB32T.js → chunk-HFGR33KD.js} +153 -101
  39. package/dist/bundle/{chunk-ASPIEEXN.js → chunk-HIP43OGZ.js} +1 -1
  40. package/dist/bundle/{chunk-IBJOO5FG.js → chunk-HQVIK6PM.js} +37 -19
  41. package/dist/bundle/{chunk-AL7MY7MW.js → chunk-IRZ7OF3F.js} +1 -1
  42. package/dist/bundle/{chunk-OOR6PEHV.js → chunk-IXN7Y6JA.js} +1 -1
  43. package/dist/bundle/{chunk-4EEOJ54H.js → chunk-JGUJJNGZ.js} +5930 -3061
  44. package/dist/bundle/{chunk-6THTUYPT.js → chunk-JQLIM6BH.js} +5 -5
  45. package/dist/bundle/{chunk-LSSIVBQI.js → chunk-K6XVRA6U.js} +1 -1
  46. package/dist/bundle/chunk-KEXTTZJM.js +35 -0
  47. package/dist/bundle/{chunk-3RG27IWA.js → chunk-LJ77Y3TK.js} +5 -5
  48. package/dist/bundle/{chunk-I4VUHZSD.js → chunk-LQSRVQ3V.js} +4 -3
  49. package/dist/bundle/{chunk-NKL5XXOM.js → chunk-MVNPE5FZ.js} +8 -8
  50. package/dist/bundle/{chunk-6SARLV3Z.js → chunk-MXP35VPO.js} +4 -4
  51. package/dist/bundle/{chunk-J36Z6BDZ.js → chunk-N7S2UPF3.js} +652 -373
  52. package/dist/bundle/{chunk-4GZLX2ME.js → chunk-O37ESNAP.js} +40 -33
  53. package/dist/bundle/{chunk-OZEJA67C.js → chunk-OMKUBCNN.js} +8 -8
  54. package/dist/bundle/{chunk-XQMMB6ST.js → chunk-OYNUBWD2.js} +2 -22
  55. package/dist/bundle/{chunk-OUQVZTF5.js → chunk-PDYHEWKG.js} +7 -42
  56. package/dist/bundle/{chunk-QVIJMV22.js → chunk-PETFPXLU.js} +3 -3
  57. package/dist/bundle/{chunk-TNX77VPM.js → chunk-PPL5ASW2.js} +4908 -1588
  58. package/dist/bundle/{chunk-GDRO4YMH.js → chunk-QIJWSKZL.js} +4 -4
  59. package/dist/bundle/{chunk-EFX6FIDM.js → chunk-S36HRPNS.js} +1 -1
  60. package/dist/bundle/{chunk-WICYDOVL.js → chunk-SBHSNOU4.js} +91 -23
  61. package/dist/bundle/{chunk-7YUZAEBG.js → chunk-SZXI4OXX.js} +2 -2
  62. package/dist/bundle/{chunk-O3K46QRL.js → chunk-TKW4QWCY.js} +20 -6
  63. package/dist/bundle/{chunk-UBZ2LH7N.js → chunk-TVQDMP2F.js} +1533 -602
  64. package/dist/bundle/{chunk-7AL57FCK.js → chunk-TXMTMEHW.js} +4 -4
  65. package/dist/bundle/{chunk-X5XWUQNU.js → chunk-UNJE63JK.js} +2 -2
  66. package/dist/bundle/chunk-UTFATA4K.js +93 -0
  67. package/dist/bundle/{chunk-34XHR5FL.js → chunk-UVLSWLPZ.js} +16 -16
  68. package/dist/bundle/chunk-UVYVIHEA.js +34 -0
  69. package/dist/bundle/{chunk-IH4UCM5K.js → chunk-V2VMBM7O.js} +2 -2
  70. package/dist/bundle/{chunk-KCBHOYNZ.js → chunk-V7QMHMR3.js} +8 -13
  71. package/dist/bundle/{chunk-IXXQZCNK.js → chunk-VRW6ZDTH.js} +32 -19
  72. package/dist/bundle/{chunk-VXI67T7U.js → chunk-VVCZS42A.js} +1 -1
  73. package/dist/bundle/{chunk-A7FMNTCK.js → chunk-W62CON5K.js} +4 -4
  74. package/dist/bundle/{chunk-BKM2CGG2.js → chunk-XDIEQ2CE.js} +3 -3
  75. package/dist/bundle/{chunk-OG5ERX4S.js → chunk-XFXRGQXJ.js} +2 -2
  76. package/dist/bundle/{chunk-UMJLXAJI.js → chunk-YDN2RH5S.js} +2 -2
  77. package/dist/bundle/{chunk-TMW526H3.js → chunk-YGG7UA3C.js} +5 -5
  78. package/dist/bundle/{chunk-D72FL3L3.js → chunk-YYHKVOVK.js} +35 -35
  79. package/dist/bundle/{chunk-3GXNODTB.js → chunk-ZPQS7XJA.js} +4 -4
  80. package/dist/bundle/{chunk-JZ67M3HR.js → chunk-ZYCLPJ7U.js} +1 -1
  81. package/dist/bundle/command-contract-NUIWUVYB.js +39 -0
  82. package/dist/bundle/{decode-2R6DTGRX.js → decode-35N57AFW.js} +8 -8
  83. package/dist/bundle/{dispatch-DEXAEMIN.js → dispatch-CWXZW3PL.js} +9 -9
  84. package/dist/bundle/drive.js +12 -12
  85. package/dist/bundle/{echarts-CLB22SZS.js → echarts-3P3QZWMU.js} +2 -2
  86. package/dist/bundle/{embed-RJJWOLKN.js → embed-Q6Q5IOJQ.js} +9 -9
  87. package/dist/bundle/{embedder-DWYS5JYJ.js → embedder-D44JDTAA.js} +12 -12
  88. package/dist/bundle/entry-ZHCNI7XO.js +22 -0
  89. package/dist/bundle/{failure-GBZ4L5QO.js → failure-GRMMSDCZ.js} +4 -4
  90. package/dist/bundle/first-run-3DC2SDWM.js +30 -0
  91. package/dist/bundle/first-screen-YJF4YODC.js +37 -0
  92. package/dist/bundle/{google-L776ETP4.js → google-6ZZDKFBN.js} +13 -13
  93. package/dist/bundle/{google-api-AI5ZJJ2M.js → google-api-E6MOJ4ZD.js} +57 -56
  94. package/dist/bundle/grants-GWXDH5GM.js +105 -0
  95. package/dist/bundle/{identity-MDLWK2TX.js → identity-TID7S5NE.js} +6 -6
  96. package/dist/bundle/{instructions-BXZZNAMS.js → instructions-ANJN4HV3.js} +1 -1
  97. package/dist/bundle/{login-6HHQLRHY.js → login-BGMK2ABH.js} +65 -66
  98. package/dist/bundle/{mcp-ZZUYI44D.js → mcp-WBHKX5E3.js} +2 -2
  99. package/dist/bundle/{node-R6ZNQ3NT.js → node-VOB45ES2.js} +2 -2
  100. package/dist/bundle/{node-sqlite-AVNHGMVL.js → node-sqlite-TSX6XQY2.js} +14 -8
  101. package/dist/bundle/oauth-CEOYXW6C.js +22 -0
  102. package/dist/bundle/{open-BXPLXJC2.js → open-3USWHGNR.js} +8 -7
  103. package/dist/bundle/{openai-CRO5GDBY.js → openai-YZ5VGPIP.js} +17 -17
  104. package/dist/bundle/{process-P36JP33R.js → process-44JS2W7L.js} +1 -1
  105. package/dist/bundle/{program-4DWVWSGQ.js → program-TZLAFKJV.js} +158 -103
  106. package/dist/bundle/prompt-SG7LAOXW.js +17 -0
  107. package/dist/bundle/{reasons-IHPNUP5W.js → reasons-ZK3U3CIN.js} +5 -5
  108. package/dist/bundle/{recognize-NAISVA56.js → recognize-OFW7HWTM.js} +7 -7
  109. package/dist/bundle/{remote-KCUHG5HV.js → remote-YBDRZQZ5.js} +10 -10
  110. package/dist/bundle/{rerank-Q3POCDSK.js → rerank-TQQNS5FJ.js} +10 -10
  111. package/dist/bundle/{serve-5CUOYLSG.js → serve-OPZXMVLH.js} +14 -13
  112. package/dist/bundle/{server-FXW3GARV.js → server-2D6DDIK5.js} +44 -43
  113. package/dist/bundle/server-R6G2O772.js +70 -0
  114. package/dist/bundle/{services-PEYBXZ3R.js → services-34WKT3NN.js} +101 -31
  115. package/dist/bundle/{sqlite-runtime-YMPWN5PM.js → sqlite-runtime-WPUMKLUV.js} +9 -8
  116. package/dist/bundle/{start-PFWEF44R.js → start-ZXUJZ4JV.js} +7 -7
  117. package/dist/bundle/{state-5TQ7IOJH.js → state-AV2RB3AQ.js} +9 -9
  118. package/dist/bundle/{store-P4OYYFW5.js → store-3M7N2Q5T.js} +20 -16
  119. package/dist/bundle/{store-E2VWY4O6.js → store-YKV4GAMS.js} +49 -22
  120. package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +60 -0
  121. package/dist/bundle/tokens-F63RXXEF.js +103 -0
  122. package/dist/commands/config.d.ts.map +1 -1
  123. package/dist/commands/config.js +14 -5
  124. package/dist/commands/config.js.map +1 -1
  125. package/dist/commands/context.d.ts +4 -2
  126. package/dist/commands/context.d.ts.map +1 -1
  127. package/dist/commands/context.js.map +1 -1
  128. package/dist/commands/documents.d.ts +1 -0
  129. package/dist/commands/documents.d.ts.map +1 -1
  130. package/dist/commands/documents.js +14 -1
  131. package/dist/commands/documents.js.map +1 -1
  132. package/dist/commands/knowledge.d.ts +4 -0
  133. package/dist/commands/knowledge.d.ts.map +1 -1
  134. package/dist/commands/knowledge.js +8 -7
  135. package/dist/commands/knowledge.js.map +1 -1
  136. package/dist/commands/session.d.ts.map +1 -1
  137. package/dist/commands/session.js +5 -2
  138. package/dist/commands/session.js.map +1 -1
  139. package/dist/config.d.ts +7 -0
  140. package/dist/config.d.ts.map +1 -1
  141. package/dist/config.js +22 -3
  142. package/dist/config.js.map +1 -1
  143. package/dist/contract-overrides.js +5 -5
  144. package/dist/contract-overrides.js.map +1 -1
  145. package/dist/errors.js +4 -4
  146. package/dist/errors.js.map +1 -1
  147. package/dist/knowledge-query.d.ts +2 -0
  148. package/dist/knowledge-query.d.ts.map +1 -1
  149. package/dist/login.d.ts.map +1 -1
  150. package/dist/login.js +3 -5
  151. package/dist/login.js.map +1 -1
  152. package/dist/program.d.ts.map +1 -1
  153. package/dist/program.js +13 -4
  154. package/dist/program.js.map +1 -1
  155. package/dist/provider-json.d.ts +2 -0
  156. package/dist/provider-json.d.ts.map +1 -1
  157. package/dist/provider-json.js +13 -0
  158. package/dist/provider-json.js.map +1 -1
  159. package/dist/reasons.d.ts +1 -1
  160. package/dist/reasons.d.ts.map +1 -1
  161. package/dist/reasons.js +2 -22
  162. package/dist/reasons.js.map +1 -1
  163. package/dist/registry.d.ts +1 -1
  164. package/dist/registry.d.ts.map +1 -1
  165. package/dist/registry.js +2 -1
  166. package/dist/registry.js.map +1 -1
  167. package/dist/store.d.ts +2 -0
  168. package/dist/store.d.ts.map +1 -1
  169. package/dist/store.js +9 -0
  170. package/dist/store.js.map +1 -1
  171. package/dist/tokens.js +5 -5
  172. package/dist/tokens.js.map +1 -1
  173. package/dist/upload.js +1 -1
  174. package/dist/upload.js.map +1 -1
  175. package/dist/version.d.ts +1 -1
  176. package/dist/version.js +1 -1
  177. package/package.json +3 -3
  178. package/skills/drive-cli/SKILL.md +2 -1
  179. package/dist/bundle/chunk-7VUHY5LP.js +0 -18
  180. package/dist/bundle/chunk-Y6M2G7JK.js +0 -3609
  181. package/dist/bundle/command-contract-ZCXFT764.js +0 -39
  182. package/dist/bundle/entry-E6H7IUPV.js +0 -21
  183. package/dist/bundle/first-run-DI2JIG44.js +0 -30
  184. package/dist/bundle/first-screen-X5N4TCKD.js +0 -37
  185. package/dist/bundle/grants-HKGYAWL6.js +0 -104
  186. package/dist/bundle/oauth-UVU52X57.js +0 -22
  187. package/dist/bundle/prompt-AFWVGRDG.js +0 -17
  188. package/dist/bundle/server-FTLPSLRU.js +0 -69
  189. package/dist/bundle/store-maintenance-command-MWVERNK7.js +0 -58
  190. package/dist/bundle/tokens-OVG4CJO4.js +0 -102
  191. /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-LK2E2ELG.js} +0 -0
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-ITD7WI23.js";
6
+ } from "./chunk-EBLA7GXY.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
@@ -21,14 +21,14 @@ var googleError = /* @__PURE__ */ __name((error) => {
21
21
  const disabled = typeof payload === "object" && payload !== null && Array.isArray(payload.details) && payload.details.some((detail) => detail !== null && typeof detail === "object" && "@type" in detail && detail["@type"] === "type.googleapis.com/google.rpc.ErrorInfo" && "domain" in detail && detail.domain === "googleapis.com" && "reason" in detail && detail.reason === "SERVICE_DISABLED");
22
22
  if (reason === "invalid_grant" || reason === "invalid_token")
23
23
  return new CliError("authentication_error", "Google sign-in is no longer valid \u2014 run drive <profile> session start again", {
24
- reason: "sign-in.expired"
24
+ reason: "oauth.expired"
25
25
  });
26
26
  if (reason === "invalid_client")
27
27
  return new CliError("configuration_error", "Google rejected the OAuth application; check its Desktop client setup", {
28
- reason: "oauth-client.rejected"
28
+ reason: "sign-in.client-rejected"
29
29
  });
30
30
  if (status === 403 && (reason === "accessNotConfigured" || disabled))
31
- return new CliError("configuration_error", "Google API is disabled for this OAuth project; its owner must enable it in Google Cloud API Library", { reason: "google-api.disabled", status });
31
+ return new CliError("configuration_error", "Google API is disabled for this OAuth project; its owner must enable it in Google Cloud API Library", { reason: "api.disabled", status });
32
32
  if (reason === "rateLimitExceeded" || reason === "userRateLimitExceeded")
33
33
  return new CliError("rate_limited", "Google rate limit reached; retry the command", {
34
34
  retryable: true,
@@ -40,7 +40,7 @@ var googleError = /* @__PURE__ */ __name((error) => {
40
40
  });
41
41
  if (status === 401)
42
42
  return new CliError("authentication_error", "Google sign-in expired \u2014 run drive <profile> session start again", {
43
- reason: "sign-in.expired"
43
+ reason: "oauth.expired"
44
44
  });
45
45
  if (status === 403)
46
46
  return new CliError("permission_error", "Google denied this operation; check access and OAuth permissions", {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
8
8
  var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
9
9
  var kindsByConstructor = /* @__PURE__ */ new WeakMap();
10
10
  function collectKinds(ctor) {
@@ -0,0 +1,35 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ resolvePaths
5
+ } from "./chunk-246P2DCT.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/store/path.js
11
+ import { userInfo } from "node:os";
12
+ import { isAbsolute, join, relative, resolve } from "node:path";
13
+ var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
14
+ var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
15
+ var accountHome = /* @__PURE__ */ __name(() => {
16
+ try {
17
+ return userInfo().homedir;
18
+ } catch {
19
+ return void 0;
20
+ }
21
+ }, "accountHome");
22
+ var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
23
+ if (!env.VITEST || !home || file === ":memory:")
24
+ return;
25
+ const inside = relative(wirecatDirectory({ HOME: home, USERPROFILE: home }), resolve(file));
26
+ if (inside.startsWith("..") || isAbsolute(inside))
27
+ return;
28
+ throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
29
+ }, "refuseOwnerStoreInTests");
30
+
31
+ export {
32
+ wirecatDirectory,
33
+ storePath,
34
+ refuseOwnerStoreInTests
35
+ };
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  visibleControls
5
- } from "./chunk-ASPIEEXN.js";
5
+ } from "./chunk-HIP43OGZ.js";
6
6
  import {
7
7
  BASE_REASONS,
8
8
  COMMON_DETAILS,
@@ -10,16 +10,16 @@ import {
10
10
  CRASH_REASON,
11
11
  stepOf,
12
12
  writes
13
- } from "./chunk-O3K46QRL.js";
13
+ } from "./chunk-TKW4QWCY.js";
14
14
  import {
15
15
  errorCodes,
16
16
  isCliError
17
- } from "./chunk-ITD7WI23.js";
17
+ } from "./chunk-EBLA7GXY.js";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-ZVVMGPBJ.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
22
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
23
23
  var EXIT_CODES = {
24
24
  validation_error: 2,
25
25
  configuration_error: 3,
@@ -39,7 +39,7 @@ var EXIT_CODES = {
39
39
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
40
40
  var GENERIC_FAILURE = 1;
41
41
 
42
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
42
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
43
43
  var recognise = /* @__PURE__ */ __name((failure) => {
44
44
  if (isCliError(failure))
45
45
  return failure;
@@ -6,13 +6,13 @@ import {
6
6
  describeProgram,
7
7
  flatten,
8
8
  profileFree
9
- } from "./chunk-4UU4ONKY.js";
9
+ } from "./chunk-73TTP6ET.js";
10
10
  import {
11
11
  VERSION
12
- } from "./chunk-OG5ERX4S.js";
12
+ } from "./chunk-XFXRGQXJ.js";
13
13
  import {
14
14
  CliError
15
- } from "./chunk-ITD7WI23.js";
15
+ } from "./chunk-EBLA7GXY.js";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
@@ -50,6 +50,7 @@ var ANY_PROFILE_COMMANDS = /* @__PURE__ */ new Set([
50
50
  "commands info",
51
51
  "complete",
52
52
  "config show",
53
+ "config migrate",
53
54
  "session list",
54
55
  "store info"
55
56
  ]);
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-ITD7WI23.js";
5
+ } from "./chunk-EBLA7GXY.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/languages.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/languages.js
11
11
  var LANGUAGES = [
12
12
  { name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
13
13
  { name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
@@ -15,12 +15,12 @@ var LANGUAGES = [
15
15
  ];
16
16
  var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
17
17
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/store/normalize.js
18
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/store/normalize.js
19
19
  var NORMALIZER_VERSION = 1;
20
20
  var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
21
21
  var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
24
24
  var BaseStemmer = class {
25
25
  static {
26
26
  __name(this, "BaseStemmer");
@@ -395,7 +395,7 @@ var BaseStemmer = class {
395
395
  }
396
396
  };
397
397
 
398
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
398
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
399
399
  var a_0 = [
400
400
  ["arsen", -1],
401
401
  ["commun", -1],
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
1096
1096
  stemWord = this.stem;
1097
1097
  };
1098
1098
 
1099
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
1099
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
1100
1100
  var a_02 = [
1101
1101
  ["\u0432", 1],
1102
1102
  ["\u0438\u0432", 2, 1],
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
1519
1519
  stemWord = this.stem;
1520
1520
  };
1521
1521
 
1522
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
1522
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
1523
1523
  var a_03 = [
1524
1524
  ["", 6],
1525
1525
  ["\xE1", 1, 1],
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
2195
2195
  stemWord = this.stem;
2196
2196
  };
2197
2197
 
2198
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/search/stem.js
2198
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/search/stem.js
2199
2199
  var SNOWBALL_VERSION = "3.1.1";
2200
2200
  var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
2201
2201
  var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-7AL57FCK.js";
11
+ } from "./chunk-TXMTMEHW.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -57,7 +57,7 @@ var redirectAllowed = /* @__PURE__ */ __name((uri) => {
57
57
  return false;
58
58
  }
59
59
  }, "redirectAllowed");
60
- var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, onCode, now = /* @__PURE__ */ __name(() => Date.now(), "now") }) => {
60
+ var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, reaches = `your ${appName} data`, onCode, now = /* @__PURE__ */ __name(() => Date.now(), "now") }) => {
61
61
  const store = tokenFile(file);
62
62
  const codes = /* @__PURE__ */ new Map();
63
63
  let login = { value: "", expires: 0 };
@@ -153,7 +153,7 @@ var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, onCo
153
153
  const hidden = ["response_type", "client_id", "redirect_uri", "code_challenge", "code_challenge_method", "state"].map((name) => `<input type="hidden" name="${name}" value="${escapeHtml(params.get(name) ?? "")}">`).join("");
154
154
  const who = escapeHtml(client.name ?? "an application");
155
155
  const target = new URL(params.get("redirect_uri") ?? "");
156
- const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(appName)} login</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem;color:#1d2430}input[type=text]{font:20px ui-monospace,monospace;letter-spacing:.1em;width:100%;padding:.5rem;margin:.5rem 0 1rem;box-sizing:border-box}button{font:inherit;padding:.5rem 1rem}.error{color:#b42318}</style></head><body><h1>${escapeHtml(appName)}</h1><p>An app that calls itself <strong>${who}</strong> asks to reach your messages through <code>${escapeHtml(appName)} mcp --http</code>.</p><p>After you allow it, the login goes to <strong>${escapeHtml(target.host)}</strong>. Allow only if that is the app you are connecting, such as chatgpt.com or claude.ai.</p><p>Type the code shown in WireCat Desktop, or in the terminal where the server runs. If you did not start this login, close this page.</p>${message ? `<p class="error">${escapeHtml(message)}</p>` : ""}<form method="post" action="${escapeHtml(`${base}/authorize`)}">${hidden}<label>Login code<input type="text" name="login_code" autocomplete="off" autofocus required></label><button type="submit">Allow</button></form></body></html>`;
156
+ const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(appName)} login</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem;color:#1d2430}input[type=text]{font:20px ui-monospace,monospace;letter-spacing:.1em;width:100%;padding:.5rem;margin:.5rem 0 1rem;box-sizing:border-box}button{font:inherit;padding:.5rem 1rem}.error{color:#b42318}</style></head><body><h1>${escapeHtml(appName)}</h1><p>An app that calls itself <strong>${who}</strong> asks to reach ${escapeHtml(reaches)} through <code>${escapeHtml(appName)} mcp serve --http</code>.</p><p>After you allow it, the login goes to <strong>${escapeHtml(target.host)}</strong>. Allow only if that is the app you are connecting, such as chatgpt.com or claude.ai.</p><p>Type the code shown in WireCat Desktop, or in the terminal where the server runs. If you did not start this login, close this page.</p>${message ? `<p class="error">${escapeHtml(message)}</p>` : ""}<form method="post" action="${escapeHtml(`${base}/authorize`)}">${hidden}<label>Login code<input type="text" name="login_code" autocomplete="off" autofocus required></label><button type="submit">Allow</button></form></body></html>`;
157
157
  return new Response(html, {
158
158
  status: message ? 400 : 200,
159
159
  headers: {