@wirecat/drive-cli 0.44.0 → 0.45.1

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 (168) hide show
  1. package/dist/bin/drive.js +35 -40
  2. package/dist/bundle/all-profiles-O7CNQ7FO.js +26 -0
  3. package/dist/bundle/anthropic-6T67J2CE.js +71 -0
  4. package/dist/bundle/app-server-BVBZT3UY.js +237 -0
  5. package/dist/bundle/bun-O6RL6LRQ.js +169 -0
  6. package/dist/bundle/bun-sqlite-54W7JUY3.js +70 -0
  7. package/dist/bundle/chunk-2DLAJGRN.js +62 -0
  8. package/dist/bundle/chunk-37MAA6F2.js +5624 -0
  9. package/dist/bundle/chunk-3HRDEJJW.js +161 -0
  10. package/dist/bundle/chunk-3Z7WSD2A.js +433 -0
  11. package/dist/bundle/chunk-44FV5JAS.js +1855 -0
  12. package/dist/bundle/chunk-4DW6QGEV.js +164 -0
  13. package/dist/bundle/chunk-4NGLRHWO.js +24 -0
  14. package/dist/bundle/chunk-5DPV7X27.js +663 -0
  15. package/dist/bundle/chunk-5FONRUG6.js +24805 -0
  16. package/dist/bundle/chunk-5MGIL5LW.js +846 -0
  17. package/dist/bundle/chunk-5TC3NCAF.js +42 -0
  18. package/dist/bundle/chunk-6Y2BYFXQ.js +65 -0
  19. package/dist/bundle/chunk-A3FU4RR6.js +150 -0
  20. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  21. package/dist/bundle/chunk-AIXLOMH4.js +63 -0
  22. package/dist/bundle/chunk-AOOD3RMK.js +384 -0
  23. package/dist/bundle/chunk-AUS6TKP5.js +1975 -0
  24. package/dist/bundle/chunk-B2J6FJNL.js +19 -0
  25. package/dist/bundle/chunk-BEXHAGXH.js +3542 -0
  26. package/dist/bundle/chunk-BHE7ZY2N.js +2352 -0
  27. package/dist/bundle/chunk-BJ3JRO34.js +2356 -0
  28. package/dist/bundle/chunk-BQUPOB5H.js +2315 -0
  29. package/dist/bundle/chunk-CFZWPIVC.js +1092 -0
  30. package/dist/bundle/chunk-CKR3DVUK.js +754 -0
  31. package/dist/bundle/chunk-CVIKKIGE.js +76 -0
  32. package/dist/bundle/chunk-D67JGWSC.js +190 -0
  33. package/dist/bundle/chunk-DDYR6DYL.js +78 -0
  34. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  35. package/dist/bundle/chunk-DL7D6Y3B.js +18102 -0
  36. package/dist/bundle/chunk-DORXXBFC.js +484 -0
  37. package/dist/bundle/chunk-DXKVEOSS.js +53 -0
  38. package/dist/bundle/chunk-DXQEJWI3.js +522 -0
  39. package/dist/bundle/chunk-FEULDMWM.js +35598 -0
  40. package/dist/bundle/chunk-G3FAOS52.js +630 -0
  41. package/dist/bundle/chunk-GHOWRW7E.js +237 -0
  42. package/dist/bundle/chunk-GNFHZZ55.js +264 -0
  43. package/dist/bundle/chunk-GNI7INK6.js +18 -0
  44. package/dist/bundle/chunk-GOR3Z2FR.js +17 -0
  45. package/dist/bundle/chunk-GQW4GRYR.js +886 -0
  46. package/dist/bundle/chunk-GWPKIRNQ.js +220 -0
  47. package/dist/bundle/chunk-GYCUY4CL.js +9 -0
  48. package/dist/bundle/chunk-HEPIOCHN.js +8181 -0
  49. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  50. package/dist/bundle/chunk-IAW5A7OR.js +1913 -0
  51. package/dist/bundle/chunk-IGMRWQP3.js +1071 -0
  52. package/dist/bundle/chunk-IKNU5A5Y.js +82 -0
  53. package/dist/bundle/chunk-JVTVAZ5X.js +1054 -0
  54. package/dist/bundle/chunk-K74PQVQZ.js +168 -0
  55. package/dist/bundle/chunk-K7FRUB33.js +795 -0
  56. package/dist/bundle/chunk-KADPV4YA.js +45 -0
  57. package/dist/bundle/chunk-KJMBV574.js +16225 -0
  58. package/dist/bundle/chunk-LHIL46I3.js +31 -0
  59. package/dist/bundle/chunk-LJARCTGL.js +60 -0
  60. package/dist/bundle/chunk-LOTQ2HMT.js +3954 -0
  61. package/dist/bundle/chunk-MAXN7COO.js +99 -0
  62. package/dist/bundle/chunk-MFS52LTZ.js +570 -0
  63. package/dist/bundle/chunk-MFSIOSUM.js +1714 -0
  64. package/dist/bundle/chunk-NB2N6L3R.js +138 -0
  65. package/dist/bundle/chunk-NDNTLUPS.js +58 -0
  66. package/dist/bundle/chunk-NLEB26GA.js +288 -0
  67. package/dist/bundle/chunk-NP3XLLN3.js +73 -0
  68. package/dist/bundle/chunk-NW7IMGRR.js +6848 -0
  69. package/dist/bundle/chunk-O5EHUB2V.js +2 -0
  70. package/dist/bundle/chunk-OWXTPXIQ.js +215 -0
  71. package/dist/bundle/chunk-PDBBBUY7.js +166 -0
  72. package/dist/bundle/chunk-PH74B2VZ.js +122 -0
  73. package/dist/bundle/chunk-PJ7IQVOM.js +421 -0
  74. package/dist/bundle/chunk-Q2Z3VCM4.js +2 -0
  75. package/dist/bundle/chunk-QTJUH3LS.js +15572 -0
  76. package/dist/bundle/chunk-QW36EOAM.js +106 -0
  77. package/dist/bundle/chunk-QWSRPXCJ.js +281 -0
  78. package/dist/bundle/chunk-R2A3K7ZF.js +193 -0
  79. package/dist/bundle/chunk-R2QRP7EJ.js +835 -0
  80. package/dist/bundle/chunk-RCS2SCX5.js +375 -0
  81. package/dist/bundle/chunk-RJ633GFA.js +25 -0
  82. package/dist/bundle/chunk-SBZB7HMU.js +1055 -0
  83. package/dist/bundle/chunk-SMHQA5J6.js +459 -0
  84. package/dist/bundle/chunk-SWMMR3FR.js +48 -0
  85. package/dist/bundle/chunk-TRMIV3OA.js +18 -0
  86. package/dist/bundle/chunk-VAGF723Z.js +74 -0
  87. package/dist/bundle/chunk-VCYFEWPD.js +18078 -0
  88. package/dist/bundle/chunk-VHQNVG3J.js +263 -0
  89. package/dist/bundle/chunk-VHT2WI4I.js +2941 -0
  90. package/dist/bundle/chunk-VYBOYBLX.js +100 -0
  91. package/dist/bundle/chunk-WUFCYDKB.js +71 -0
  92. package/dist/bundle/chunk-XAZQTJXR.js +3402 -0
  93. package/dist/bundle/chunk-XEBFFKXO.js +111 -0
  94. package/dist/bundle/chunk-XF5MFUEB.js +498 -0
  95. package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
  96. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  97. package/dist/bundle/chunk-ZBM4GEV2.js +120 -0
  98. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  99. package/dist/bundle/command-contract-MXCBV3GJ.js +38 -0
  100. package/dist/bundle/dist-MWTMOYWT.js +7577 -0
  101. package/dist/bundle/dist-PY3MVR3G.js +21 -0
  102. package/dist/bundle/drive.js +50 -0
  103. package/dist/bundle/echarts-LD3AI55P.js +42501 -0
  104. package/dist/bundle/embed-FJKIIM43.js +37 -0
  105. package/dist/bundle/embedder-NNQ5ZC25.js +110 -0
  106. package/dist/bundle/entry-ZYSNPDSD.js +15 -0
  107. package/dist/bundle/failure-MJJXFR63.js +37 -0
  108. package/dist/bundle/first-run-KA2UPZAU.js +24 -0
  109. package/dist/bundle/first-screen-VQ3RXDMF.js +36 -0
  110. package/dist/bundle/google-ZYDFTHLN.js +32 -0
  111. package/dist/bundle/google-api-2GT5PAW2.js +82 -0
  112. package/dist/bundle/identity-JQFQXQIR.js +10 -0
  113. package/dist/bundle/instructions-RZMSW3OC.js +11 -0
  114. package/dist/bundle/login-JU6NKW5P.js +158 -0
  115. package/dist/bundle/mcp-2PZDI7WE.js +501 -0
  116. package/dist/bundle/mcp-JOQMFGBC.js +95 -0
  117. package/dist/bundle/mcp-OQBZXELQ.js +165 -0
  118. package/dist/bundle/mdast-util-from-markdown-FXEPSNER.js +1958 -0
  119. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +2103 -0
  120. package/dist/bundle/micromark-extension-gfm-GRL24TU6.js +1838 -0
  121. package/dist/bundle/node-P4E63KXA.js +2340 -0
  122. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  123. package/dist/bundle/node-ZRLYQL7J.js +176 -0
  124. package/dist/bundle/node-sqlite-TXPSRROT.js +46 -0
  125. package/dist/bundle/oauth-NAIBKERJ.js +18 -0
  126. package/dist/bundle/open-3P5EPXPV.js +20 -0
  127. package/dist/bundle/process-LL77573L.js +91 -0
  128. package/dist/bundle/program-CZ55L6EW.js +24078 -0
  129. package/dist/bundle/prompt-3TX2SWOY.js +13 -0
  130. package/dist/bundle/reasons-GF2TYGX6.js +11 -0
  131. package/dist/bundle/recognize-IFXOJHEA.js +191 -0
  132. package/dist/bundle/remote-663M42Y5.js +28 -0
  133. package/dist/bundle/rerank-OT2F2DBV.js +51 -0
  134. package/dist/bundle/serve-PDNNI6O6.js +20 -0
  135. package/dist/bundle/server-BFOEPMR7.js +56 -0
  136. package/dist/bundle/server-K566PJ7H.js +69 -0
  137. package/dist/bundle/services-5MCTECBU.js +333 -0
  138. package/dist/bundle/sqlite-runtime-BF3KDM7W.js +17 -0
  139. package/dist/bundle/state-SZX65E74.js +34 -0
  140. package/dist/bundle/store-TCWNLA3V.js +125 -0
  141. package/dist/bundle/store-UKPGGAPW.js +142 -0
  142. package/dist/bundle/store-maintenance-command-QHLUVBTJ.js +57 -0
  143. package/dist/bundle/terminal-TFCTWLOS.js +11 -0
  144. package/dist/bundle/tokens-DFCFRF7I.js +103 -0
  145. package/dist/commands/mcp.d.ts.map +1 -1
  146. package/dist/commands/mcp.js +82 -36
  147. package/dist/commands/mcp.js.map +1 -1
  148. package/dist/contract-overrides.d.ts.map +1 -1
  149. package/dist/contract-overrides.js +59 -53
  150. package/dist/contract-overrides.js.map +1 -1
  151. package/dist/mcp.d.ts +6 -5
  152. package/dist/mcp.d.ts.map +1 -1
  153. package/dist/mcp.js +13 -10
  154. package/dist/mcp.js.map +1 -1
  155. package/dist/program.js +4 -4
  156. package/dist/program.js.map +1 -1
  157. package/dist/registry.d.ts +2 -2
  158. package/dist/registry.d.ts.map +1 -1
  159. package/dist/registry.js +3 -3
  160. package/dist/registry.js.map +1 -1
  161. package/dist/state.d.ts +13 -2
  162. package/dist/state.d.ts.map +1 -1
  163. package/dist/state.js +12 -2
  164. package/dist/state.js.map +1 -1
  165. package/dist/version.d.ts +1 -1
  166. package/dist/version.js +1 -1
  167. package/package.json +7 -5
  168. package/skills/drive-cli/SKILL.md +1 -0
@@ -0,0 +1,37 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ WARM_IDLE_MS,
5
+ defaultThreads,
6
+ isTextModelInstalled,
7
+ loadModel,
8
+ meanOf,
9
+ openEmbedder,
10
+ placedText,
11
+ runEmbedders,
12
+ textModelsDirectory,
13
+ truncated,
14
+ unit,
15
+ warmEmbedders
16
+ } from "./chunk-RCS2SCX5.js";
17
+ import "./chunk-5DPV7X27.js";
18
+ import "./chunk-GNFHZZ55.js";
19
+ import "./chunk-TRMIV3OA.js";
20
+ import "./chunk-VHT2WI4I.js";
21
+ import "./chunk-BJ3JRO34.js";
22
+ import "./chunk-Y5E2WNWB.js";
23
+ import "./chunk-ZVVMGPBJ.js";
24
+ export {
25
+ WARM_IDLE_MS,
26
+ defaultThreads,
27
+ isTextModelInstalled,
28
+ loadModel,
29
+ meanOf,
30
+ openEmbedder,
31
+ placedText,
32
+ runEmbedders,
33
+ textModelsDirectory,
34
+ truncated,
35
+ unit,
36
+ warmEmbedders
37
+ };
@@ -0,0 +1,110 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ openSession,
5
+ truncated,
6
+ unit
7
+ } from "./chunk-RCS2SCX5.js";
8
+ import "./chunk-5DPV7X27.js";
9
+ import "./chunk-GNFHZZ55.js";
10
+ import "./chunk-TRMIV3OA.js";
11
+ import "./chunk-VHT2WI4I.js";
12
+ import {
13
+ CliError
14
+ } from "./chunk-BJ3JRO34.js";
15
+ import {
16
+ importFrom
17
+ } from "./chunk-Y5E2WNWB.js";
18
+ import {
19
+ __name
20
+ } from "./chunk-ZVVMGPBJ.js";
21
+
22
+ // node_modules/.pnpm/@wirecat+cli-core@0.473.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_39633e3162553a2c86dde989a9811fcb/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
23
+ import { readFileSync } from "node:fs";
24
+ import { join } from "node:path";
25
+
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.473.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_39633e3162553a2c86dde989a9811fcb/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
27
+ var SIZE = 224;
28
+ var MEAN = [0.48145466, 0.4578275, 0.40821073];
29
+ var STD = [0.26862954, 0.26130258, 0.27577711];
30
+ var importCanvas = /* @__PURE__ */ __name(async () => {
31
+ try {
32
+ return await importFrom(new URL("images/picture/preprocess.js", import.meta.resolve("@wirecat/cli-core")).href, "@napi-rs/canvas");
33
+ } catch {
34
+ throw new CliError("validation_error", "searching pictures needs the optional package @napi-rs/canvas to read an image \u2014 install it next to this tool");
35
+ }
36
+ }, "importCanvas");
37
+ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
38
+ const { createCanvas, loadImage } = await load();
39
+ let image;
40
+ try {
41
+ image = await loadImage(bytes);
42
+ } catch {
43
+ throw new CliError("invalid_response", "the file is not an image this tool can read");
44
+ }
45
+ const scale = SIZE / Math.min(image.width, image.height);
46
+ const width = Math.max(SIZE, Math.round(image.width * scale));
47
+ const height = Math.max(SIZE, Math.round(image.height * scale));
48
+ const surface = createCanvas(SIZE, SIZE);
49
+ const context = surface.getContext("2d");
50
+ context.fillStyle = "#ffffff";
51
+ context.fillRect(0, 0, SIZE, SIZE);
52
+ context.imageSmoothingQuality = "high";
53
+ context.drawImage(image, 0, 0, image.width, image.height, Math.round((SIZE - width) / 2), Math.round((SIZE - height) / 2), width, height);
54
+ const { data } = context.getImageData(0, 0, SIZE, SIZE);
55
+ const plane = SIZE * SIZE;
56
+ const pixels = new Float32Array(3 * plane);
57
+ for (let at = 0; at < plane; at++) {
58
+ for (let channel = 0; channel < 3; channel++) {
59
+ pixels[channel * plane + at] = (data[at * 4 + channel] / 255 - MEAN[channel]) / STD[channel];
60
+ }
61
+ }
62
+ return pixels;
63
+ }, "preprocess");
64
+
65
+ // node_modules/.pnpm/@wirecat+cli-core@0.473.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_39633e3162553a2c86dde989a9811fcb/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
66
+ var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
67
+ const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
68
+ const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
69
+ const tokenizer = new Tokenizer(JSON.parse(readFileSync(path("tokenizer.json"), "utf8")), JSON.parse(readFileSync(path("tokenizer_config.json"), "utf8")));
70
+ const sessions = [];
71
+ const lazy = /* @__PURE__ */ __name((name) => {
72
+ let opened;
73
+ return () => {
74
+ opened ??= openSession(readFileSync(path(name)), threads).then((created) => {
75
+ sessions.push(created.session);
76
+ return created;
77
+ });
78
+ return opened;
79
+ };
80
+ }, "lazy");
81
+ const vision = lazy(model.vision);
82
+ const text = lazy(model.text);
83
+ return {
84
+ model,
85
+ embedImage: /* @__PURE__ */ __name(async (bytes) => {
86
+ const pixels = await preprocess(bytes, canvas);
87
+ const { ort, session } = await vision();
88
+ const output = await session.run({ pixel_values: new ort.Tensor("float32", pixels, [1, 3, SIZE, SIZE]) });
89
+ return unit(Float32Array.from(output.image_embeds?.data));
90
+ }, "embedImage"),
91
+ embedQuery: /* @__PURE__ */ __name(async (query) => {
92
+ const ids = truncated(tokenizer.encode(query.toLowerCase()).ids, model.maxTokens);
93
+ const shape = [1, ids.length];
94
+ const { ort, session } = await text();
95
+ const feeds = {
96
+ input_ids: new ort.Tensor("int64", BigInt64Array.from(ids, BigInt), shape)
97
+ };
98
+ if (session.inputNames.includes("attention_mask"))
99
+ feeds.attention_mask = new ort.Tensor("int64", new BigInt64Array(ids.length).fill(1n), shape);
100
+ const output = await session.run(feeds);
101
+ return unit(Float32Array.from(output.text_embeds?.data));
102
+ }, "embedQuery"),
103
+ close: /* @__PURE__ */ __name(async () => {
104
+ await Promise.all(sessions.map((session) => session.release()));
105
+ }, "close")
106
+ };
107
+ }, "openPictureEmbedder");
108
+ export {
109
+ openPictureEmbedder
110
+ };
@@ -0,0 +1,15 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ startCli
5
+ } from "./chunk-PDBBBUY7.js";
6
+ import "./chunk-RJ633GFA.js";
7
+ import "./chunk-QW36EOAM.js";
8
+ import "./chunk-VYBOYBLX.js";
9
+ import "./chunk-VHT2WI4I.js";
10
+ import "./chunk-BJ3JRO34.js";
11
+ import "./chunk-Y5E2WNWB.js";
12
+ import "./chunk-ZVVMGPBJ.js";
13
+ export {
14
+ startCli
15
+ };
@@ -0,0 +1,37 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ errorObject,
5
+ mcpFailure,
6
+ reportFailure
7
+ } from "./chunk-MFSIOSUM.js";
8
+ import "./chunk-GHOWRW7E.js";
9
+ import "./chunk-GYCUY4CL.js";
10
+ import {
11
+ REASONS
12
+ } from "./chunk-MAXN7COO.js";
13
+ import {
14
+ interactiveOf
15
+ } from "./chunk-GNI7INK6.js";
16
+ import "./chunk-D67JGWSC.js";
17
+ import "./chunk-DORXXBFC.js";
18
+ import "./chunk-HTQTIKWP.js";
19
+ import "./chunk-LOTQ2HMT.js";
20
+ import "./chunk-PJ7IQVOM.js";
21
+ import "./chunk-IKNU5A5Y.js";
22
+ import "./chunk-WUFCYDKB.js";
23
+ import "./chunk-AOOD3RMK.js";
24
+ import "./chunk-BHE7ZY2N.js";
25
+ import "./chunk-R2QRP7EJ.js";
26
+ import "./chunk-O5EHUB2V.js";
27
+ import "./chunk-VHT2WI4I.js";
28
+ import "./chunk-BJ3JRO34.js";
29
+ import "./chunk-Y5E2WNWB.js";
30
+ import "./chunk-ZVVMGPBJ.js";
31
+ export {
32
+ REASONS,
33
+ errorObject,
34
+ interactiveOf,
35
+ mcpFailure,
36
+ reportFailure
37
+ };
@@ -0,0 +1,24 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ askSetupQuestions,
5
+ asksAtStart,
6
+ setupAtStart,
7
+ systemLanguage
8
+ } from "./chunk-OWXTPXIQ.js";
9
+ import "./chunk-A3FU4RR6.js";
10
+ import "./chunk-MFS52LTZ.js";
11
+ import "./chunk-LJARCTGL.js";
12
+ import "./chunk-BQUPOB5H.js";
13
+ import "./chunk-GQW4GRYR.js";
14
+ import "./chunk-TRMIV3OA.js";
15
+ import "./chunk-VHT2WI4I.js";
16
+ import "./chunk-BJ3JRO34.js";
17
+ import "./chunk-Y5E2WNWB.js";
18
+ import "./chunk-ZVVMGPBJ.js";
19
+ export {
20
+ askSetupQuestions,
21
+ asksAtStart,
22
+ setupAtStart,
23
+ systemLanguage
24
+ };
@@ -0,0 +1,36 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ WIRECAT_TOOLS,
5
+ firstScreen,
6
+ installHelp
7
+ } from "./chunk-SMHQA5J6.js";
8
+ import "./chunk-HTQTIKWP.js";
9
+ import "./chunk-K74PQVQZ.js";
10
+ import "./chunk-BEXHAGXH.js";
11
+ import "./chunk-AUS6TKP5.js";
12
+ import "./chunk-3Z7WSD2A.js";
13
+ import "./chunk-LOTQ2HMT.js";
14
+ import "./chunk-AIXLOMH4.js";
15
+ import "./chunk-CFZWPIVC.js";
16
+ import "./chunk-GOR3Z2FR.js";
17
+ import "./chunk-PJ7IQVOM.js";
18
+ import "./chunk-ZBM4GEV2.js";
19
+ import "./chunk-LJARCTGL.js";
20
+ import "./chunk-RJ633GFA.js";
21
+ import "./chunk-GNFHZZ55.js";
22
+ import "./chunk-NB2N6L3R.js";
23
+ import "./chunk-BHE7ZY2N.js";
24
+ import "./chunk-R2QRP7EJ.js";
25
+ import "./chunk-O5EHUB2V.js";
26
+ import "./chunk-GQW4GRYR.js";
27
+ import "./chunk-TRMIV3OA.js";
28
+ import "./chunk-VHT2WI4I.js";
29
+ import "./chunk-BJ3JRO34.js";
30
+ import "./chunk-Y5E2WNWB.js";
31
+ import "./chunk-ZVVMGPBJ.js";
32
+ export {
33
+ WIRECAT_TOOLS,
34
+ firstScreen,
35
+ installHelp
36
+ };
@@ -0,0 +1,32 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ googleSource,
5
+ metadataOf,
6
+ readFile,
7
+ userOf
8
+ } from "./chunk-VHQNVG3J.js";
9
+ import {
10
+ MAX_ENTRIES,
11
+ supported,
12
+ tooManyEntries
13
+ } from "./chunk-VAGF723Z.js";
14
+ import "./chunk-44FV5JAS.js";
15
+ import "./chunk-2DLAJGRN.js";
16
+ import "./chunk-VCYFEWPD.js";
17
+ import "./chunk-5DPV7X27.js";
18
+ import "./chunk-5TC3NCAF.js";
19
+ import "./chunk-R2QRP7EJ.js";
20
+ import "./chunk-VHT2WI4I.js";
21
+ import "./chunk-BJ3JRO34.js";
22
+ import "./chunk-Y5E2WNWB.js";
23
+ import "./chunk-ZVVMGPBJ.js";
24
+ export {
25
+ MAX_ENTRIES,
26
+ googleSource,
27
+ metadataOf,
28
+ readFile,
29
+ supported,
30
+ tooManyEntries,
31
+ userOf
32
+ };
@@ -0,0 +1,82 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ googleApi,
5
+ googleDownload,
6
+ googleUploadRequest
7
+ } from "./chunk-XEBFFKXO.js";
8
+ import {
9
+ apiMethod,
10
+ apiMethods,
11
+ validateApiParams
12
+ } from "./chunk-QTJUH3LS.js";
13
+ import "./chunk-KJMBV574.js";
14
+ import "./chunk-2DLAJGRN.js";
15
+ import "./chunk-DDYR6DYL.js";
16
+ import "./chunk-IGMRWQP3.js";
17
+ import "./chunk-SWMMR3FR.js";
18
+ import "./chunk-4NGLRHWO.js";
19
+ import "./chunk-XF5MFUEB.js";
20
+ import "./chunk-SBZB7HMU.js";
21
+ import "./chunk-GHOWRW7E.js";
22
+ import "./chunk-3HRDEJJW.js";
23
+ import "./chunk-HEPIOCHN.js";
24
+ import "./chunk-IAW5A7OR.js";
25
+ import "./chunk-JVTVAZ5X.js";
26
+ import "./chunk-D67JGWSC.js";
27
+ import "./chunk-NP3XLLN3.js";
28
+ import "./chunk-DL7D6Y3B.js";
29
+ import "./chunk-VCYFEWPD.js";
30
+ import "./chunk-DORXXBFC.js";
31
+ import "./chunk-5MGIL5LW.js";
32
+ import "./chunk-SMHQA5J6.js";
33
+ import "./chunk-HTQTIKWP.js";
34
+ import "./chunk-K74PQVQZ.js";
35
+ import "./chunk-BEXHAGXH.js";
36
+ import "./chunk-AUS6TKP5.js";
37
+ import "./chunk-3Z7WSD2A.js";
38
+ import "./chunk-LOTQ2HMT.js";
39
+ import "./chunk-AIXLOMH4.js";
40
+ import "./chunk-CFZWPIVC.js";
41
+ import "./chunk-GOR3Z2FR.js";
42
+ import "./chunk-PJ7IQVOM.js";
43
+ import "./chunk-ZBM4GEV2.js";
44
+ import "./chunk-OWXTPXIQ.js";
45
+ import "./chunk-A3FU4RR6.js";
46
+ import "./chunk-MFS52LTZ.js";
47
+ import "./chunk-LJARCTGL.js";
48
+ import "./chunk-PDBBBUY7.js";
49
+ import "./chunk-RJ633GFA.js";
50
+ import "./chunk-IKNU5A5Y.js";
51
+ import "./chunk-WUFCYDKB.js";
52
+ import "./chunk-LHIL46I3.js";
53
+ import "./chunk-KADPV4YA.js";
54
+ import "./chunk-PH74B2VZ.js";
55
+ import "./chunk-RCS2SCX5.js";
56
+ import "./chunk-5DPV7X27.js";
57
+ import "./chunk-GNFHZZ55.js";
58
+ import "./chunk-QW36EOAM.js";
59
+ import "./chunk-FEULDMWM.js";
60
+ import "./chunk-5TC3NCAF.js";
61
+ import "./chunk-AOOD3RMK.js";
62
+ import "./chunk-NB2N6L3R.js";
63
+ import "./chunk-BHE7ZY2N.js";
64
+ import "./chunk-R2QRP7EJ.js";
65
+ import "./chunk-O5EHUB2V.js";
66
+ import "./chunk-BQUPOB5H.js";
67
+ import "./chunk-GQW4GRYR.js";
68
+ import "./chunk-TRMIV3OA.js";
69
+ import "./chunk-VYBOYBLX.js";
70
+ import "./chunk-VHT2WI4I.js";
71
+ import "./chunk-BJ3JRO34.js";
72
+ import "./chunk-Y5E2WNWB.js";
73
+ import "./chunk-NW7IMGRR.js";
74
+ import "./chunk-ZVVMGPBJ.js";
75
+ export {
76
+ apiMethod,
77
+ apiMethods,
78
+ googleApi,
79
+ googleDownload,
80
+ googleUploadRequest,
81
+ validateApiParams
82
+ };
@@ -0,0 +1,10 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ DRIVE_APP
5
+ } from "./chunk-B2J6FJNL.js";
6
+ import "./chunk-GYCUY4CL.js";
7
+ import "./chunk-ZVVMGPBJ.js";
8
+ export {
9
+ DRIVE_APP
10
+ };
@@ -0,0 +1,11 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ appInstructions,
5
+ instructions
6
+ } from "./chunk-DXKVEOSS.js";
7
+ import "./chunk-ZVVMGPBJ.js";
8
+ export {
9
+ appInstructions,
10
+ instructions
11
+ };
@@ -0,0 +1,158 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ googleSource
5
+ } from "./chunk-VHQNVG3J.js";
6
+ import "./chunk-VAGF723Z.js";
7
+ import {
8
+ notSaved,
9
+ sessionKeeper
10
+ } from "./chunk-CKR3DVUK.js";
11
+ import {
12
+ profileName,
13
+ readConfig,
14
+ writeConfig
15
+ } from "./chunk-GWPKIRNQ.js";
16
+ import "./chunk-44FV5JAS.js";
17
+ import {
18
+ ACTIVITY_SCOPE,
19
+ APPS_SCOPE,
20
+ READ_SCOPE,
21
+ WRITE_SCOPE
22
+ } from "./chunk-KJMBV574.js";
23
+ import "./chunk-2DLAJGRN.js";
24
+ import "./chunk-DDYR6DYL.js";
25
+ import "./chunk-IGMRWQP3.js";
26
+ import "./chunk-SWMMR3FR.js";
27
+ import "./chunk-4NGLRHWO.js";
28
+ import "./chunk-XF5MFUEB.js";
29
+ import "./chunk-SBZB7HMU.js";
30
+ import "./chunk-GHOWRW7E.js";
31
+ import "./chunk-3HRDEJJW.js";
32
+ import "./chunk-HEPIOCHN.js";
33
+ import "./chunk-IAW5A7OR.js";
34
+ import "./chunk-JVTVAZ5X.js";
35
+ import "./chunk-D67JGWSC.js";
36
+ import "./chunk-NP3XLLN3.js";
37
+ import "./chunk-DL7D6Y3B.js";
38
+ import "./chunk-VCYFEWPD.js";
39
+ import "./chunk-DORXXBFC.js";
40
+ import "./chunk-5MGIL5LW.js";
41
+ import "./chunk-SMHQA5J6.js";
42
+ import "./chunk-HTQTIKWP.js";
43
+ import "./chunk-K74PQVQZ.js";
44
+ import "./chunk-BEXHAGXH.js";
45
+ import "./chunk-AUS6TKP5.js";
46
+ import "./chunk-3Z7WSD2A.js";
47
+ import "./chunk-LOTQ2HMT.js";
48
+ import "./chunk-AIXLOMH4.js";
49
+ import "./chunk-CFZWPIVC.js";
50
+ import "./chunk-GOR3Z2FR.js";
51
+ import "./chunk-PJ7IQVOM.js";
52
+ import "./chunk-ZBM4GEV2.js";
53
+ import "./chunk-OWXTPXIQ.js";
54
+ import "./chunk-A3FU4RR6.js";
55
+ import "./chunk-MFS52LTZ.js";
56
+ import "./chunk-LJARCTGL.js";
57
+ import "./chunk-PDBBBUY7.js";
58
+ import "./chunk-RJ633GFA.js";
59
+ import "./chunk-IKNU5A5Y.js";
60
+ import "./chunk-WUFCYDKB.js";
61
+ import "./chunk-LHIL46I3.js";
62
+ import "./chunk-KADPV4YA.js";
63
+ import "./chunk-PH74B2VZ.js";
64
+ import "./chunk-RCS2SCX5.js";
65
+ import "./chunk-5DPV7X27.js";
66
+ import "./chunk-GNFHZZ55.js";
67
+ import "./chunk-QW36EOAM.js";
68
+ import "./chunk-FEULDMWM.js";
69
+ import "./chunk-5TC3NCAF.js";
70
+ import "./chunk-AOOD3RMK.js";
71
+ import "./chunk-NB2N6L3R.js";
72
+ import "./chunk-BHE7ZY2N.js";
73
+ import "./chunk-R2QRP7EJ.js";
74
+ import "./chunk-O5EHUB2V.js";
75
+ import "./chunk-BQUPOB5H.js";
76
+ import "./chunk-GQW4GRYR.js";
77
+ import "./chunk-TRMIV3OA.js";
78
+ import "./chunk-VYBOYBLX.js";
79
+ import "./chunk-VHT2WI4I.js";
80
+ import {
81
+ CliError,
82
+ isCliError
83
+ } from "./chunk-BJ3JRO34.js";
84
+ import "./chunk-Y5E2WNWB.js";
85
+ import "./chunk-NW7IMGRR.js";
86
+ import {
87
+ __name
88
+ } from "./chunk-ZVVMGPBJ.js";
89
+
90
+ // dist/login.js
91
+ import { OAuth2Client } from "google-auth-library";
92
+ var signInError = /* @__PURE__ */ __name((error) => {
93
+ if (!isCliError(error))
94
+ return error;
95
+ const reason = error.details.reason;
96
+ if (reason === "oauth.declined")
97
+ return new CliError("authentication_error", "Google sign-in was declined", { reason: "sign-in.declined" });
98
+ if (reason === "oauth.not-saved")
99
+ return notSaved();
100
+ if (typeof reason === "string" && reason.startsWith("oauth.") && reason !== "oauth.timeout")
101
+ return new CliError("authentication_error", "Google token exchange failed; credential details were not logged", {
102
+ reason: "sign-in.failed"
103
+ });
104
+ return error;
105
+ }, "signInError");
106
+ var login = /* @__PURE__ */ __name(async (options) => {
107
+ const name = profileName(options.profile);
108
+ const keeper = sessionKeeper({
109
+ env: options.env,
110
+ name,
111
+ storage: options.storage,
112
+ client: options.application,
113
+ ...options.keyring ? { keyring: options.keyring } : {},
114
+ ...options.signal ? { signal: options.signal } : {},
115
+ ...options.fetch ? { fetch: options.fetch } : {}
116
+ });
117
+ let principal = "";
118
+ try {
119
+ await keeper.signIn({
120
+ scopes: [
121
+ options.write ? WRITE_SCOPE : READ_SCOPE,
122
+ ...options.activity ? [ACTIVITY_SCOPE] : [],
123
+ ...options.apps ? [APPS_SCOPE] : []
124
+ ],
125
+ openBrowser: options.openBrowser,
126
+ showUrl: options.showUrl,
127
+ ...options.timeoutMs ? { timeoutMs: options.timeoutMs } : {},
128
+ // Runs before anything is saved, so a refused account leaves the profile's sign-in as it was.
129
+ accept: /* @__PURE__ */ __name(async (tokens) => {
130
+ const client = new OAuth2Client({
131
+ clientId: options.application.clientId,
132
+ clientSecret: options.application.clientSecret,
133
+ transporterOptions: { timeout: 3e4, ...options.signal ? { signal: options.signal } : {} }
134
+ });
135
+ client.setCredentials({ access_token: tokens.accessToken ?? null });
136
+ principal = await (options.identity?.(client) ?? googleSource(client).identity());
137
+ const config2 = readConfig(options.env);
138
+ const previous = config2.profiles[name];
139
+ if (previous && previous.principal !== principal)
140
+ throw new CliError("authentication_error", "this profile belongs to another account; use a new profile", {
141
+ reason: "profile.wrong-account"
142
+ });
143
+ if (Object.entries(config2.profiles).some(([other, profile]) => other !== name && profile.principal === principal))
144
+ throw new CliError("validation_error", "this Google account already has a profile; reuse it to preserve source identity");
145
+ return { principal, clientSecret: void 0 };
146
+ }, "accept")
147
+ });
148
+ } catch (error) {
149
+ throw signInError(error);
150
+ }
151
+ const config = readConfig(options.env);
152
+ config.profiles[name] = { principal, roots: config.profiles[name]?.roots ?? [], storage: options.storage };
153
+ writeConfig(options.env, config);
154
+ return { profile: name, signed_in: true, storage: options.storage };
155
+ }, "login");
156
+ export {
157
+ login
158
+ };