@wirecat/drive-cli 0.59.0 → 0.61.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 (182) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/bundle/{all-profiles-CVISDGMF.js → all-profiles-H4L3Z5UM.js} +14 -14
  5. package/dist/bundle/{anthropic-WLNQC23G.js → anthropic-PPGFISVP.js} +9 -9
  6. package/dist/bundle/{app-server-P2VOONXF.js → app-server-YXVK2FUZ.js} +52 -52
  7. package/dist/bundle/{bun-CDFBNTKV.js → bun-DKZAL6ML.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-MNZICITP.js → bun-sqlite-MTZY36QK.js} +8 -8
  9. package/dist/bundle/{chunk-TFH5X46A.js → chunk-2RJA4BQB.js} +19 -19
  10. package/dist/bundle/{chunk-VVCZS42A.js → chunk-3252WXOL.js} +1 -1
  11. package/dist/bundle/{chunk-H2BKXPBL.js → chunk-36CWGEVX.js} +2 -2
  12. package/dist/bundle/{chunk-HWLLVLAB.js → chunk-3I2D5TK2.js} +14 -11
  13. package/dist/bundle/{chunk-PAEVBAM3.js → chunk-3SJQNS72.js} +5 -5
  14. package/dist/bundle/{chunk-GI5JBGXH.js → chunk-3UPIJ7DW.js} +615 -374
  15. package/dist/bundle/{chunk-EORMZCVF.js → chunk-3WZH3WV3.js} +3 -3
  16. package/dist/bundle/{chunk-ZSMCJKGP.js → chunk-5W56YMQS.js} +28 -27
  17. package/dist/bundle/{chunk-LJ7E4HLQ.js → chunk-5W7D5H2R.js} +1 -1
  18. package/dist/bundle/{chunk-6C6255U6.js → chunk-67HS46KM.js} +12 -12
  19. package/dist/bundle/{chunk-AD62XJKO.js → chunk-6DN4VPA7.js} +25 -25
  20. package/dist/bundle/{chunk-HIP43OGZ.js → chunk-6IBM4Z3V.js} +1 -1
  21. package/dist/bundle/{chunk-QTM7USFA.js → chunk-6SUGANRJ.js} +6 -6
  22. package/dist/bundle/{chunk-II7LST64.js → chunk-6Y2FWJZ4.js} +4 -3
  23. package/dist/bundle/{chunk-XCOCPXCM.js → chunk-73WSULMI.js} +2 -2
  24. package/dist/bundle/{chunk-V42KAPU3.js → chunk-AM4RIWOZ.js} +4 -4
  25. package/dist/bundle/{chunk-DI5Z4SH5.js → chunk-AWN22PJK.js} +3 -3
  26. package/dist/bundle/{chunk-HMZAMHKN.js → chunk-BCWUDTYQ.js} +2 -2
  27. package/dist/bundle/{chunk-EHEZSV6I.js → chunk-BF6TQMNB.js} +8 -8
  28. package/dist/bundle/chunk-BQMIDYBA.js +415 -0
  29. package/dist/bundle/{chunk-FVQCM7IQ.js → chunk-BXR7BKM3.js} +5 -5
  30. package/dist/bundle/{chunk-OKXSTWKW.js → chunk-CACYL36O.js} +8 -8
  31. package/dist/bundle/{chunk-CBM2XAEZ.js → chunk-DCBFNBEB.js} +113 -51
  32. package/dist/bundle/{chunk-GT5KTGCN.js → chunk-DEPMQHXQ.js} +4 -4
  33. package/dist/bundle/{chunk-3KJTJDDT.js → chunk-DXPOVLQC.js} +46 -28
  34. package/dist/bundle/{chunk-P7WPYKSB.js → chunk-E5EXJ2XS.js} +4 -4
  35. package/dist/bundle/{chunk-IGF6EXBR.js → chunk-E6J5YH2N.js} +34 -34
  36. package/dist/bundle/{chunk-IIP43FQJ.js → chunk-ECEYAQGN.js} +2 -2
  37. package/dist/bundle/{chunk-OMMEQJOB.js → chunk-EPCJUL6M.js} +3 -3
  38. package/dist/bundle/{chunk-JSDVK3JA.js → chunk-FE5JJXKA.js} +2 -2
  39. package/dist/bundle/{chunk-FICVPYE4.js → chunk-HFM653T3.js} +49 -49
  40. package/dist/bundle/{chunk-KPRGTTJH.js → chunk-HGOYQUT7.js} +1 -1
  41. package/dist/bundle/{chunk-3VSUT6BD.js → chunk-I26VL4W7.js} +2 -2
  42. package/dist/bundle/{chunk-V36RIXFA.js → chunk-J4HQVHMN.js} +6 -5
  43. package/dist/bundle/{chunk-P3ZTW2ZM.js → chunk-J5UDQD5S.js} +5 -5
  44. package/dist/bundle/{chunk-3KNZADHJ.js → chunk-JVBLXSAA.js} +437 -193
  45. package/dist/bundle/{chunk-TJXPJ3A5.js → chunk-K7LS3NGM.js} +137 -62
  46. package/dist/bundle/{chunk-2AXA5SKP.js → chunk-KV4267S4.js} +1 -1
  47. package/dist/bundle/{chunk-YU3PTU3D.js → chunk-LARQTWIL.js} +1 -1
  48. package/dist/bundle/{chunk-B5GBJ35N.js → chunk-N2RLJTIW.js} +4 -4
  49. package/dist/bundle/{chunk-K4LXGZTE.js → chunk-NIX2MWHZ.js} +242 -344
  50. package/dist/bundle/{chunk-L5SE2XZP.js → chunk-NZ2EIZLX.js} +14 -10
  51. package/dist/bundle/{chunk-F3FOL42A.js → chunk-O5CUFS7T.js} +2 -2
  52. package/dist/bundle/{chunk-UQPKAY6I.js → chunk-OFFA54TW.js} +2 -2
  53. package/dist/bundle/{chunk-W62CON5K.js → chunk-OGNOQDWB.js} +4 -4
  54. package/dist/bundle/{chunk-MUUHUHWC.js → chunk-OLPJRD4S.js} +1 -22
  55. package/dist/bundle/{chunk-YADXWQHV.js → chunk-PJTX2MOI.js} +26 -26
  56. package/dist/bundle/{chunk-M6I2SQN7.js → chunk-PY7LKNOS.js} +2 -2
  57. package/dist/bundle/{chunk-GJ4ZCIOP.js → chunk-Q4XVBKX4.js} +3 -3
  58. package/dist/bundle/{chunk-A6SLYOP2.js → chunk-QR5VQXQ5.js} +69 -36
  59. package/dist/bundle/{chunk-OZH4ALTI.js → chunk-QSGT4ZH4.js} +1 -1
  60. package/dist/bundle/{chunk-UWVNRPT7.js → chunk-RFRCOAWS.js} +22 -22
  61. package/dist/bundle/{chunk-A6EG7ZDS.js → chunk-S4YK6TTG.js} +13 -13
  62. package/dist/bundle/{chunk-LPHMAQJQ.js → chunk-TKGAYKXW.js} +16 -16
  63. package/dist/bundle/{chunk-KFZUODXB.js → chunk-UKOYQC5O.js} +39 -22
  64. package/dist/bundle/{chunk-MEAPA4EZ.js → chunk-UO2IUDVK.js} +2 -2
  65. package/dist/bundle/{chunk-HIOJRPCT.js → chunk-VPDAH7PJ.js} +1 -1
  66. package/dist/bundle/{chunk-3U22QTU6.js → chunk-VYXVPYA3.js} +24 -6
  67. package/dist/bundle/{chunk-VT6GZAF4.js → chunk-W767AUNR.js} +4 -4
  68. package/dist/bundle/{chunk-5C7K6XIT.js → chunk-WIU733D2.js} +1 -1
  69. package/dist/bundle/{chunk-IADOBOKB.js → chunk-WUP2MJDN.js} +2 -2
  70. package/dist/bundle/{chunk-EBLA7GXY.js → chunk-WZ5XK74U.js} +2 -1
  71. package/dist/bundle/{chunk-IBZ3IBO4.js → chunk-X2CXW4HM.js} +7 -7
  72. package/dist/bundle/{chunk-JW2CVCUH.js → chunk-XGMDWIUP.js} +4 -4
  73. package/dist/bundle/{chunk-BSGOM3BD.js → chunk-XGNC5OJG.js} +1 -1
  74. package/dist/bundle/{chunk-TI55J3BA.js → chunk-XLFJLZJL.js} +4 -4
  75. package/dist/bundle/{chunk-7QTVIZII.js → chunk-XYCCGGKN.js} +792 -327
  76. package/dist/bundle/{chunk-6CQO2FIN.js → chunk-XZBR2O63.js} +400 -291
  77. package/dist/bundle/{chunk-EVETU3TF.js → chunk-YMBFZA3H.js} +8 -8
  78. package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-YPF6OS37.js} +1 -1
  79. package/dist/bundle/{chunk-36B7AIGP.js → chunk-YWIU4HOT.js} +1 -1
  80. package/dist/bundle/{chunk-MKCNUI72.js → chunk-ZHYRHERD.js} +2 -2
  81. package/dist/bundle/{chunk-YV4ABH6J.js → chunk-ZMNYK3FC.js} +5 -5
  82. package/dist/bundle/command-contract-T3EO5AYD.js +39 -0
  83. package/dist/bundle/{decode-XTOMXMGN.js → decode-62A3HGPW.js} +8 -8
  84. package/dist/bundle/{dispatch-T6TW2JJB.js → dispatch-IE7PBEQC.js} +9 -9
  85. package/dist/bundle/drive.js +12 -12
  86. package/dist/bundle/{echarts-RKKIOYVV.js → echarts-BGBPRGR5.js} +2 -2
  87. package/dist/bundle/{embed-STHKKA6G.js → embed-J3IBVV2V.js} +9 -9
  88. package/dist/bundle/{embedder-3XZEWHRO.js → embedder-QFPMDRT2.js} +12 -12
  89. package/dist/bundle/entry-YQSYER66.js +22 -0
  90. package/dist/bundle/{failure-DNQYXP2T.js → failure-BKOGBMIC.js} +4 -4
  91. package/dist/bundle/first-run-ZIFPVZAI.js +30 -0
  92. package/dist/bundle/first-screen-L5U26EY7.js +37 -0
  93. package/dist/bundle/{google-BYNSAIQI.js → google-RXM2XEPD.js} +13 -13
  94. package/dist/bundle/{google-api-4VTZH7OP.js → google-api-NC65BZO4.js} +83 -64
  95. package/dist/bundle/grants-SEWUYYH3.js +105 -0
  96. package/dist/bundle/{identity-ARDPFYV5.js → identity-PI6F2GWA.js} +6 -6
  97. package/dist/bundle/{instructions-N3OH5X2Y.js → instructions-6LPDSKAD.js} +1 -1
  98. package/dist/bundle/{login-4VQEC7VI.js → login-HTY7GT2S.js} +66 -68
  99. package/dist/bundle/{mcp-WBHKX5E3.js → mcp-PPVOM4SE.js} +2 -2
  100. package/dist/bundle/{node-YU5JBNAA.js → node-IB246NCQ.js} +2 -2
  101. package/dist/bundle/{node-sqlite-3C6PSBIW.js → node-sqlite-G2Y5SFJM.js} +9 -9
  102. package/dist/bundle/oauth-MWBKBI4T.js +22 -0
  103. package/dist/bundle/{open-M2V2VYXO.js → open-WD4GFSJD.js} +8 -8
  104. package/dist/bundle/{openai-ST2IWNUX.js → openai-QVM4PMY7.js} +17 -17
  105. package/dist/bundle/{process-PYNNBBTV.js → process-SWPJGPQC.js} +1 -1
  106. package/dist/bundle/{program-Q4VWV2MR.js → program-WHYFAMXR.js} +142 -106
  107. package/dist/bundle/prompt-OVYCGZB7.js +17 -0
  108. package/dist/bundle/{reasons-LOQ5J73F.js → reasons-Q34DQWB6.js} +5 -5
  109. package/dist/bundle/{recognize-FBLMWXNE.js → recognize-DM3YWHSE.js} +7 -7
  110. package/dist/bundle/{remote-XC3OXE4T.js → remote-KXVWRK7J.js} +10 -10
  111. package/dist/bundle/{rerank-2XMKKF4S.js → rerank-TINXM3MY.js} +10 -10
  112. package/dist/bundle/{serve-Q2BQHNZB.js → serve-IY2WL656.js} +12 -12
  113. package/dist/bundle/server-EMWVVT2C.js +70 -0
  114. package/dist/bundle/{server-42HPV3AH.js → server-VPY3OWPC.js} +44 -44
  115. package/dist/bundle/{services-WU22S2MU.js → services-PXNBOCOC.js} +34 -32
  116. package/dist/bundle/{sqlite-runtime-CSO6K6B2.js → sqlite-runtime-5ZK2CV7Y.js} +9 -9
  117. package/dist/bundle/{start-TZWKM4AH.js → start-LDVCN3DK.js} +7 -7
  118. package/dist/bundle/{state-FLUT7U7R.js → state-3MKTT3VS.js} +9 -9
  119. package/dist/bundle/{store-TG6622NG.js → store-4VQOT5IJ.js} +18 -18
  120. package/dist/bundle/{store-HDWMJ44E.js → store-7M4MSUJV.js} +28 -22
  121. package/dist/bundle/store-maintenance-command-NRATYBWD.js +60 -0
  122. package/dist/bundle/tokens-XUKLM3SL.js +103 -0
  123. package/dist/commands/config.d.ts.map +1 -1
  124. package/dist/commands/config.js +15 -6
  125. package/dist/commands/config.js.map +1 -1
  126. package/dist/commands/context.d.ts +4 -2
  127. package/dist/commands/context.d.ts.map +1 -1
  128. package/dist/commands/context.js.map +1 -1
  129. package/dist/commands/session.d.ts.map +1 -1
  130. package/dist/commands/session.js +15 -4
  131. package/dist/commands/session.js.map +1 -1
  132. package/dist/config.d.ts +23 -5
  133. package/dist/config.d.ts.map +1 -1
  134. package/dist/config.js +33 -20
  135. package/dist/config.js.map +1 -1
  136. package/dist/download.d.ts +3 -2
  137. package/dist/download.d.ts.map +1 -1
  138. package/dist/download.js +21 -9
  139. package/dist/download.js.map +1 -1
  140. package/dist/errors.js +4 -4
  141. package/dist/errors.js.map +1 -1
  142. package/dist/google-api.d.ts +3 -1
  143. package/dist/google-api.d.ts.map +1 -1
  144. package/dist/google-api.js +27 -7
  145. package/dist/google-api.js.map +1 -1
  146. package/dist/login.d.ts.map +1 -1
  147. package/dist/login.js +4 -6
  148. package/dist/login.js.map +1 -1
  149. package/dist/program.d.ts.map +1 -1
  150. package/dist/program.js +11 -7
  151. package/dist/program.js.map +1 -1
  152. package/dist/reasons.d.ts +1 -1
  153. package/dist/reasons.d.ts.map +1 -1
  154. package/dist/reasons.js +1 -22
  155. package/dist/reasons.js.map +1 -1
  156. package/dist/registry.d.ts +1 -1
  157. package/dist/registry.d.ts.map +1 -1
  158. package/dist/registry.js +2 -1
  159. package/dist/registry.js.map +1 -1
  160. package/dist/tokens.js +5 -5
  161. package/dist/tokens.js.map +1 -1
  162. package/dist/upload.js +1 -1
  163. package/dist/upload.js.map +1 -1
  164. package/dist/version.d.ts +1 -1
  165. package/dist/version.js +1 -1
  166. package/package.json +3 -3
  167. package/dist/bundle/chunk-PGKIOSN3.js +0 -249
  168. package/dist/bundle/command-contract-LQDNHZJU.js +0 -39
  169. package/dist/bundle/entry-CNOYSSSD.js +0 -22
  170. package/dist/bundle/first-run-F2SI24PK.js +0 -30
  171. package/dist/bundle/first-screen-TYYF6VXY.js +0 -37
  172. package/dist/bundle/grants-EUQXSICG.js +0 -105
  173. package/dist/bundle/oauth-D6NJFPYU.js +0 -22
  174. package/dist/bundle/prompt-MFIOJMAF.js +0 -17
  175. package/dist/bundle/server-EWZYN323.js +0 -70
  176. package/dist/bundle/store-maintenance-command-RHWRUREJ.js +0 -60
  177. package/dist/bundle/tokens-TXYURU4S.js +0 -103
  178. package/dist/oauth-application.d.ts +0 -5
  179. package/dist/oauth-application.d.ts.map +0 -1
  180. package/dist/oauth-application.js +0 -9
  181. package/dist/oauth-application.js.map +0 -1
  182. /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-LU3WKZBA.js} +0 -0
@@ -9,15 +9,15 @@ import {
9
9
  optional,
10
10
  pipe,
11
11
  safeParse
12
- } from "./chunk-3U22QTU6.js";
12
+ } from "./chunk-VYXVPYA3.js";
13
13
  import {
14
14
  CliError
15
- } from "./chunk-EBLA7GXY.js";
15
+ } from "./chunk-WZ5XK74U.js";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/models/options.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/models/options.js
21
21
  var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
22
22
  const parsed = safeParse(schema, options);
23
23
  if (!parsed.success) {
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorCodes
5
- } from "./chunk-EBLA7GXY.js";
5
+ } from "./chunk-WZ5XK74U.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/errors/failures.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/errors/failures.js
11
11
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
12
12
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
13
13
  const { code, exitCode } = value ?? {};
@@ -2,26 +2,26 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  isCliFailure
5
- } from "./chunk-HMZAMHKN.js";
5
+ } from "./chunk-BCWUDTYQ.js";
6
6
  import {
7
7
  secretNamed,
8
8
  withoutSecrets
9
- } from "./chunk-HIOJRPCT.js";
9
+ } from "./chunk-VPDAH7PJ.js";
10
10
  import {
11
11
  isContentKey
12
- } from "./chunk-UQPKAY6I.js";
12
+ } from "./chunk-OFFA54TW.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/runs/run-context.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/run-context.js
18
18
  import { AsyncLocalStorage } from "node:async_hooks";
19
19
  import { createHash } from "node:crypto";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
22
22
  import { homedir } from "node:os";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/runs/events.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/events.js
25
25
  var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
26
26
  var renderEvent = /* @__PURE__ */ __name((event) => {
27
27
  if (event.event === "warning") {
@@ -69,7 +69,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
69
69
  var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
70
70
  var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
71
71
 
72
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
72
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
73
73
  var MESSAGE_AT_MOST = 500;
74
74
  var CAUSES_AT_MOST = 5;
75
75
  var FRAMES_AT_MOST = 15;
@@ -178,7 +178,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
178
178
  return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
179
179
  }, "redactText");
180
180
 
181
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/runs/run-context.js
181
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/runs/run-context.js
182
182
  var REDACTED = "[redacted]";
183
183
  var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
184
184
  if (!record)
@@ -0,0 +1,415 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ operations,
5
+ privateFiles
6
+ } from "./chunk-XZBR2O63.js";
7
+ import {
8
+ commandPathKey,
9
+ commandPermissions
10
+ } from "./chunk-5W56YMQS.js";
11
+ import {
12
+ AI_ENTRIES,
13
+ checkConfigText,
14
+ issueMessage,
15
+ settingsFor,
16
+ usableProfileName,
17
+ withSettingDefaults
18
+ } from "./chunk-JVBLXSAA.js";
19
+ import {
20
+ LEVELS
21
+ } from "./chunk-6DN4VPA7.js";
22
+ import {
23
+ MAX_TEXT_CHARS
24
+ } from "./chunk-WUP2MJDN.js";
25
+ import {
26
+ DRIVE_APP
27
+ } from "./chunk-UO2IUDVK.js";
28
+ import {
29
+ BASE_CONSTANTS,
30
+ baseConstantsSchema,
31
+ loadConstants,
32
+ resolvePaths,
33
+ saveConfigFile
34
+ } from "./chunk-DCBFNBEB.js";
35
+ import {
36
+ array,
37
+ boolean,
38
+ integer,
39
+ literal,
40
+ maxValue,
41
+ minLength,
42
+ minValue,
43
+ nonEmpty,
44
+ number,
45
+ object,
46
+ optional,
47
+ parse,
48
+ picklist,
49
+ pipe,
50
+ record,
51
+ regex,
52
+ strictObject,
53
+ string,
54
+ transform,
55
+ trim,
56
+ union
57
+ } from "./chunk-VYXVPYA3.js";
58
+ import {
59
+ CliError
60
+ } from "./chunk-WZ5XK74U.js";
61
+ import {
62
+ __name
63
+ } from "./chunk-ZVVMGPBJ.js";
64
+
65
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
66
+ import { readFileSync } from "node:fs";
67
+ var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
68
+ if (!options.shipped && typeof location === "string") {
69
+ const mode = privateFiles({ files: [location], dirs: [] }, options.platform);
70
+ if (mode.checked && !mode.ok)
71
+ throw new CliError("configuration_error", `the client file can be read by other users of this computer; run chmod 600 ${location} and try again`, { reason: "sign-in.client-file-open" });
72
+ }
73
+ try {
74
+ const { installed } = JSON.parse(readFileSync(location, "utf8"));
75
+ const { client_id: clientId, client_secret: clientSecret } = installed;
76
+ if (typeof clientId !== "string" || !clientId)
77
+ throw new TypeError("client_id");
78
+ if (clientSecret !== void 0 && typeof clientSecret !== "string")
79
+ throw new TypeError("client_secret");
80
+ return { clientId, ...clientSecret ? { clientSecret } : {} };
81
+ } catch {
82
+ throw options.invalid ?? new CliError("configuration_error", "could not read a Desktop app OAuth client JSON from the client file; its contents were not logged", { reason: "sign-in.client-file-invalid" });
83
+ }
84
+ }, "readClientFile");
85
+
86
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/constants/obscure.js
87
+ import { createDecipheriv } from "node:crypto";
88
+ var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
89
+ var reveal = /* @__PURE__ */ __name((obscured) => {
90
+ const bytes = Buffer.from(obscured, "base64url");
91
+ const decipher = createDecipheriv("aes-256-ctr", KEY, bytes.subarray(0, 16));
92
+ return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
93
+ }, "reveal");
94
+
95
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/constants/index.js
96
+ var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
97
+ var constantsSchema = object({
98
+ ...baseConstantsSchema.entries,
99
+ google: object({
100
+ app: object({
101
+ client_id: pipe(string(), nonEmpty(), transform(reveal)),
102
+ client_secret: optional(pipe(string(), transform(reveal)))
103
+ })
104
+ }),
105
+ microsoft: object({ app: object({ client_id: pipe(string(), nonEmpty()) }) })
106
+ });
107
+ var loaded = /* @__PURE__ */ new Map();
108
+ var constants = /* @__PURE__ */ __name((toolLayer, schema) => {
109
+ const key = toolLayer?.href ?? "";
110
+ if (!loaded.has(key)) {
111
+ const layers = toolLayer ? [BASE_CONSTANTS, CORE_CONSTANTS, toolLayer] : [BASE_CONSTANTS, CORE_CONSTANTS];
112
+ loaded.set(key, loadConstants(layers, schema ?? constantsSchema));
113
+ }
114
+ return loaded.get(key);
115
+ }, "constants");
116
+ var oauthApp = /* @__PURE__ */ __name((options) => {
117
+ const { env, prefix, provider } = options;
118
+ const name = `${prefix}_${provider.toUpperCase()}_CLIENT`;
119
+ const clientSecret = env[`${name}_SECRET`];
120
+ const own = [
121
+ [options.clientId, "flag"],
122
+ [env[`${name}_ID`], "env"],
123
+ [options.configClientId, "config"]
124
+ ];
125
+ const [clientId, source] = own.find(([id]) => id) ?? [];
126
+ if (clientId && source)
127
+ return app({ clientId, ...clientSecret ? { clientSecret } : {} }, source);
128
+ if (clientSecret)
129
+ throw new CliError("configuration_error", `${name}_SECRET is set without a client id; set ${name}_ID too, or unset it to use WireCat's app`, { reason: "sign-in.secret-without-id" });
130
+ const wirecat = options.wirecat;
131
+ if (!wirecat?.client_id)
132
+ return void 0;
133
+ return app({ clientId: wirecat.client_id, ...wirecat.client_secret ? { clientSecret: wirecat.client_secret } : {} }, "constants");
134
+ }, "oauthApp");
135
+ var app = /* @__PURE__ */ __name((client, source) => ({ client: { ...client, source }, source }), "app");
136
+ var googleApp = /* @__PURE__ */ __name((options) => {
137
+ const { clientFile, platform } = options;
138
+ if (clientFile)
139
+ return app(readClientFile(clientFile, platform ? { platform } : {}), "flag");
140
+ const wirecat = (options.constants ?? constants()).google.app;
141
+ return oauthApp({ ...options, provider: "google", wirecat });
142
+ }, "googleApp");
143
+ var oauthClientReport = /* @__PURE__ */ __name((app2, reason) => app2?.source ? { client: app2.source === "constants" ? "wirecat" : "own", source: app2.source } : { client: null, source: null, ...reason ? { reason } : {} }, "oauthClientReport");
144
+
145
+ // dist/policy-keys.js
146
+ var permissionKeys = /* @__PURE__ */ __name((paths2) => {
147
+ const keys = /* @__PURE__ */ new Set([
148
+ "mcp.authority",
149
+ "mcp",
150
+ "sheets.create",
151
+ "sheets.rename",
152
+ "sheets.insert",
153
+ "sheets.format",
154
+ "sheets.update"
155
+ ]);
156
+ for (const path of paths2)
157
+ keys.add(path.join("."));
158
+ for (const operation of operations)
159
+ for (const key of methodPolicyKeys(operation.id))
160
+ keys.add(key);
161
+ return keys;
162
+ }, "permissionKeys");
163
+ var permissionNames = /* @__PURE__ */ __name((keys) => {
164
+ const names = /* @__PURE__ */ new Set();
165
+ for (const key of keys) {
166
+ const parts = key.split(".");
167
+ for (let end = 1; end <= parts.length; end++)
168
+ names.add(parts.slice(0, end).join("."));
169
+ }
170
+ return names;
171
+ }, "permissionNames");
172
+ var DEFAULT_LEVELS = {
173
+ "mcp.authority": "deny",
174
+ ...Object.fromEntries(operations.filter((op) => op.effect === "destructive").map((op) => [`api.${op.id}`, "ask"]))
175
+ };
176
+ var methodPolicyKeys = /* @__PURE__ */ __name((method, body) => {
177
+ const parts = method.split(".");
178
+ const verb = parts.at(-1);
179
+ const alias = method.startsWith("drive.files.") ? `files.${verb}` : method.startsWith("docs.documents.") ? `documents.${verb === "batchUpdate" ? "update" : verb}` : method.startsWith("sheets.spreadsheets.") ? `sheets.${method === "sheets.spreadsheets.get" ? "info" : method === "sheets.spreadsheets.values.get" ? "show" : verb === "append" ? "add" : verb}` : method === "driveactivity.activity.query" ? "documents.history" : method.startsWith("drive.") ? `${parts[1]}.${verb}` : void 0;
180
+ const keys = [`api.${method}`, ...alias ? [alias] : []];
181
+ if (method === "drive.replies.create" && body)
182
+ keys.push(body.action === "resolve" ? "comments.resolve" : body.action === "reopen" ? "comments.reopen" : "comments.reply");
183
+ if (method === "drive.replies.create" && body?.content !== void 0)
184
+ keys.push("comments.reply");
185
+ if (method === "sheets.spreadsheets.batchUpdate" && Array.isArray(body?.requests)) {
186
+ const object2 = /* @__PURE__ */ __name((value) => !!value && typeof value === "object" && !Array.isArray(value), "object");
187
+ for (const request of body.requests) {
188
+ if (!object2(request))
189
+ continue;
190
+ if (request.addSheet || request.duplicateSheet)
191
+ keys.push("sheets.create");
192
+ if (object2(request.updateSheetProperties)) {
193
+ const update = request.updateSheetProperties;
194
+ if (object2(update.properties) && update.properties.title !== void 0 || String(update.fields).split(",").some((field) => field.trim() === "title" || field.trim() === "*"))
195
+ keys.push("sheets.rename");
196
+ if (object2(update.properties) && update.properties.gridProperties)
197
+ keys.push("sheets.insert");
198
+ }
199
+ if (request.insertDimension || request.appendDimension || request.insertRange)
200
+ keys.push("sheets.insert");
201
+ if (request.repeatCell || request.updateCells || request.appendCells || request.updateBorders || request.addConditionalFormatRule || request.updateConditionalFormatRule || request.deleteConditionalFormatRule || request.addBanding || request.updateBanding || request.deleteBanding)
202
+ keys.push("sheets.format");
203
+ if (request.updateCells || request.appendCells || request.findReplace || request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
204
+ keys.push("sheets.update");
205
+ if (request.pasteData || request.copyPaste || request.cutPaste || request.autoFill)
206
+ keys.push("sheets.format");
207
+ if (object2(request.repeatCell) && (String(request.repeatCell.fields).split(",").some((field) => field.trim() === "*" || field.includes("userEnteredValue")) || object2(request.repeatCell.cell) && request.repeatCell.cell.userEnteredValue !== void 0))
208
+ keys.push("sheets.update");
209
+ }
210
+ }
211
+ return [...new Set(keys)];
212
+ }, "methodPolicyKeys");
213
+
214
+ // dist/config.js
215
+ import { readFileSync as readFileSync2 } from "node:fs";
216
+ import { join } from "node:path";
217
+ var Common = {
218
+ ...AI_ENTRIES,
219
+ permissions: optional(record(string(), picklist(LEVELS))),
220
+ max_text_chars: optional(pipe(number(), integer(), minValue(1), maxValue(MAX_TEXT_CHARS))),
221
+ google_client_id: optional(pipe(string(), trim(), minLength(1)))
222
+ };
223
+ var RunSettings = {
224
+ record: optional(boolean()),
225
+ keep_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
226
+ keep_successful_runs_for_days: optional(pipe(number(), integer(), minValue(1))),
227
+ runs_size_limit_mb: optional(pipe(number(), integer(), minValue(1))),
228
+ record_input: optional(union([boolean(), literal("failed")]))
229
+ };
230
+ var SharedDefaults = {
231
+ limit: optional(pipe(number(), integer(), minValue(1))),
232
+ sends_per_hour: optional(pipe(number(), integer(), minValue(0))),
233
+ update_check: optional(boolean()),
234
+ skill_hint: optional(boolean())
235
+ };
236
+ var DEFAULTS_ONLY = /* @__PURE__ */ new Set([...Object.keys(RunSettings), "update_check", "skill_hint"]);
237
+ var SETTING_NAMES = /* @__PURE__ */ new Set([...Object.keys(Common), "picture_search", ...DEFAULTS_ONLY]);
238
+ var Mirror = strictObject({
239
+ id: pipe(string(), regex(/^[a-z0-9-]{1,40}$/)),
240
+ path: pipe(string(), minLength(1)),
241
+ folder: pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/))
242
+ });
243
+ var Profile = strictObject({
244
+ principal: string(),
245
+ roots: optional(array(pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/))), []),
246
+ mirrors: optional(array(Mirror)),
247
+ storage: picklist(["keyring", "file"]),
248
+ picture_search: optional(boolean()),
249
+ ...Common
250
+ });
251
+ var ConfigSchema = strictObject({
252
+ profiles: optional(record(string(), Profile), {}),
253
+ defaults: optional(strictObject({ ...Common, ...RunSettings, ...SharedDefaults }))
254
+ });
255
+ var keyOf = /* @__PURE__ */ __name((path) => {
256
+ if (path[0] !== "api" || path[1] === void 0)
257
+ return commandPathKey(path);
258
+ if (["call", "list", "show"].includes(path[1]))
259
+ return null;
260
+ const operation = operations.find((one) => one.command === path[1]);
261
+ return operation ? `api.${operation.id}` : commandPathKey(path);
262
+ }, "keyOf");
263
+ var configuration = settingsFor(DRIVE_APP, {
264
+ configRepair: false,
265
+ // drive's own schema decides what the file may hold, so `doctor` names a profile that lacks its principal.
266
+ schema: ConfigSchema,
267
+ profile: {
268
+ principal: optional(string()),
269
+ roots: optional(array(pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/)))),
270
+ mirrors: optional(array(Mirror)),
271
+ storage: optional(picklist(["keyring", "file"])),
272
+ max_text_chars: Common.max_text_chars,
273
+ google_client_id: Common.google_client_id
274
+ },
275
+ settings: [
276
+ {
277
+ key: "max_text_chars",
278
+ default: MAX_TEXT_CHARS,
279
+ description: "the most characters of text one file may have to be imported"
280
+ }
281
+ ],
282
+ permissions: commandPermissions({ keyOf, extra: [...permissionKeys([])], defaults: DEFAULT_LEVELS })
283
+ });
284
+ var paths = /* @__PURE__ */ __name((env) => resolvePaths({ appName: "drive-cli", prefix: "DRIVE", env }), "paths");
285
+ var configPath = /* @__PURE__ */ __name((env) => join(paths(env).config, "config.json"), "configPath");
286
+ var TOOL = "drive";
287
+ var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
288
+ var withoutIncomplete = /* @__PURE__ */ __name((raw, issues) => {
289
+ const incomplete = new Set(issues.flatMap((issue) => issue.kind === "missing_setting" && issue.profile ? [issue.profile] : []));
290
+ if (!incomplete.size || !isNode(raw) || !isNode(raw.profiles))
291
+ return void 0;
292
+ return {
293
+ ...raw,
294
+ profiles: Object.fromEntries(Object.entries(raw.profiles).filter(([name]) => !incomplete.has(name)))
295
+ };
296
+ }, "withoutIncomplete");
297
+ var examine = /* @__PURE__ */ __name((text, file, knownPermissions) => {
298
+ const check = /* @__PURE__ */ __name((body) => checkConfigText(body, {
299
+ file,
300
+ tool: TOOL,
301
+ schema: ConfigSchema,
302
+ repair: false,
303
+ ...knownPermissions ? { knownPermissions } : {}
304
+ }), "check");
305
+ const first = check(text);
306
+ if (first.issues.some((issue) => issue.kind === "invalid_json"))
307
+ return { raw: {}, config: { profiles: {} }, issues: first.issues };
308
+ const raw = JSON.parse(text);
309
+ if (first.config)
310
+ return { raw, config: first.config, issues: first.issues };
311
+ const rest = withoutIncomplete(raw, first.issues);
312
+ const second = rest && check(JSON.stringify(rest));
313
+ return {
314
+ raw,
315
+ config: second?.config ?? { profiles: {} },
316
+ // Saved permissions are checked only in what loads, and the first pass loaded nothing.
317
+ issues: [...first.issues, ...(second?.issues ?? []).filter((issue) => issue.kind === "unknown_permission")]
318
+ };
319
+ }, "examine");
320
+ var inspectConfig = /* @__PURE__ */ __name((env, knownPermissions) => {
321
+ const path = configPath(env);
322
+ let text;
323
+ try {
324
+ text = readFileSync2(path, "utf8");
325
+ } catch {
326
+ return { path, found: false, raw: {}, config: { profiles: {} }, issues: [] };
327
+ }
328
+ return { path, found: true, ...examine(text, path, knownPermissions) };
329
+ }, "inspectConfig");
330
+ var configIssues = /* @__PURE__ */ __name((raw, file, knownPermissions) => examine(JSON.stringify(raw), file, knownPermissions).issues, "configIssues");
331
+ var refusal = /* @__PURE__ */ __name((issues) => new CliError("configuration_error", issueMessage(issues)), "refusal");
332
+ var readConfig = /* @__PURE__ */ __name((env, knownPermissions) => {
333
+ const { config, issues } = inspectConfig(env, knownPermissions);
334
+ if (issues.length)
335
+ throw refusal(issues);
336
+ return config;
337
+ }, "readConfig");
338
+ var writeConfig = /* @__PURE__ */ __name((env, config) => {
339
+ const [issue] = configIssues(config, "drive settings");
340
+ if (issue)
341
+ throw new CliError("configuration_error", `drive settings: ${issue.profile === void 0 ? "" : `profile ${issue.profile}: `}${issue.what}`);
342
+ saveConfigFile(configPath(env), withDefaults(parse(ConfigSchema, config)));
343
+ }, "writeConfig");
344
+ var withDefaults = /* @__PURE__ */ __name((raw, except = []) => withSettingDefaults(isNode(raw) && !Object.hasOwn(raw, "defaults") ? { ...raw, defaults: {} } : raw, configuration.declaredSettings.filter(({ key }) => !except.includes(key))).config, "withDefaults");
345
+ var profileName = usableProfileName;
346
+ var fileId = /* @__PURE__ */ __name((input) => {
347
+ let id = input;
348
+ if (input.startsWith("https://")) {
349
+ const url = new URL(input);
350
+ if (url.hostname !== "drive.google.com" && url.hostname !== "docs.google.com")
351
+ throw new CliError("validation_error", "use a Google Drive/Docs URL or file ID");
352
+ id = url.pathname.match(/\/(?:folders|d)\/([^/]+)/)?.[1] ?? "";
353
+ }
354
+ if (!/^[A-Za-z0-9_-]{1,200}$/.test(id))
355
+ throw new CliError("validation_error", "invalid Google file ID");
356
+ return id;
357
+ }, "fileId");
358
+ var unknownProfile = /* @__PURE__ */ __name((name, profiles) => new CliError("validation_error", profiles.length ? `no profile ${name} here \u2014 profiles here: ${profiles.join(", ")}; a new one signs in with drive ${name} session start` : `no profiles here yet; create one with drive ${name} session start`, { reason: "profile.unknown", profiles }), "unknownProfile");
359
+ var activeProfile = /* @__PURE__ */ __name((env, name) => {
360
+ const config = readConfig(env);
361
+ const profile = config.profiles[profileName(name)];
362
+ if (!profile)
363
+ throw unknownProfile(name, Object.keys(config.profiles).sort());
364
+ return profile;
365
+ }, "activeProfile");
366
+ var checkTextLimit = /* @__PURE__ */ __name((value) => {
367
+ if (typeof value !== "number" || !Number.isInteger(value) || value < 1)
368
+ throw new CliError("validation_error", "max_text_chars must be a positive whole number of characters");
369
+ if (value > MAX_TEXT_CHARS)
370
+ throw new CliError("validation_error", `max_text_chars can be at most ${MAX_TEXT_CHARS}: the document readers return at most that many characters`);
371
+ return value;
372
+ }, "checkTextLimit");
373
+ var textLimit = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).max_text_chars ?? readConfig(env).defaults?.max_text_chars ?? MAX_TEXT_CHARS, "textLimit");
374
+ var pictureSearch = /* @__PURE__ */ __name((env, name) => activeProfile(env, name).picture_search ?? false, "pictureSearch");
375
+ var googleAppOf = /* @__PURE__ */ __name((env, { file, clientId, profile } = {}) => {
376
+ const own = file || clientId || env.DRIVE_GOOGLE_CLIENT_ID;
377
+ const config = own ? void 0 : readConfig(env);
378
+ const configClientId = (profile === void 0 ? void 0 : config?.profiles[profileName(profile)]?.google_client_id) ?? config?.defaults?.google_client_id;
379
+ return googleApp({ env, prefix: "DRIVE", clientFile: file, clientId, configClientId });
380
+ }, "googleAppOf");
381
+ var application = /* @__PURE__ */ __name((env, choice = {}) => googleAppOf(env, choice).client, "application");
382
+ var selectedFolders = /* @__PURE__ */ __name((env, profile, filter = {}) => activeProfile(env, profile).roots.flatMap((id) => filter.id === void 0 || id === filter.id ? [{ id }] : []), "selectedFolders");
383
+ var configuredMirrors = /* @__PURE__ */ __name((env, profile, filter = {}) => (activeProfile(env, profile).mirrors ?? []).filter((row) => Object.entries(filter).every(([key, value]) => row[key] === value)), "configuredMirrors");
384
+ var configuredSessions = /* @__PURE__ */ __name((env, filter, knownPermissions) => Object.entries(readConfig(env, knownPermissions).profiles).flatMap(([name, row]) => (filter.profile === void 0 || filter.profile === name) && (filter.storage === void 0 || filter.storage === row.storage) ? [{ profile: name, selected_folders: row.roots.length, storage: row.storage }] : []), "configuredSessions");
385
+
386
+ export {
387
+ oauthClientReport,
388
+ permissionKeys,
389
+ permissionNames,
390
+ DEFAULT_LEVELS,
391
+ methodPolicyKeys,
392
+ DEFAULTS_ONLY,
393
+ SETTING_NAMES,
394
+ configuration,
395
+ paths,
396
+ configPath,
397
+ inspectConfig,
398
+ configIssues,
399
+ refusal,
400
+ readConfig,
401
+ writeConfig,
402
+ withDefaults,
403
+ profileName,
404
+ fileId,
405
+ unknownProfile,
406
+ activeProfile,
407
+ checkTextLimit,
408
+ textLimit,
409
+ pictureSearch,
410
+ googleAppOf,
411
+ application,
412
+ selectedFolders,
413
+ configuredMirrors,
414
+ configuredSessions
415
+ };
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-EBLA7GXY.js";
6
+ } from "./chunk-WZ5XK74U.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", {
@@ -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-EBLA7GXY.js";
5
+ } from "./chunk-WZ5XK74U.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/languages.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/store/normalize.js
18
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
398
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
1099
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
1522
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/search/stem.js
2198
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/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"];