@wirecat/drive-cli 0.66.0 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/contracts/wirecat.json +29 -1
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-WCQLIHUG.js → all-profiles-DVZUVAPQ.js} +14 -14
  4. package/dist/bundle/{anthropic-5RJMB6O7.js → anthropic-Y45C45O2.js} +8 -8
  5. package/dist/bundle/{app-server-3RGYXPKG.js → app-server-GTXUOUGD.js} +56 -56
  6. package/dist/bundle/{bun-L34VEKGG.js → bun-QVJV76QJ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-H6IAXQXI.js → bun-sqlite-CC7PIAMH.js} +9 -9
  8. package/dist/bundle/{chunk-UAKX6DP4.js → chunk-2MEVCMBW.js} +5 -5
  9. package/dist/bundle/{chunk-7ZGJRVBH.js → chunk-2PIA45FC.js} +4 -4
  10. package/dist/bundle/{chunk-5PLINHEY.js → chunk-2Y3YBDZX.js} +151 -149
  11. package/dist/bundle/{chunk-BQXSE645.js → chunk-3RG6LL25.js} +12 -12
  12. package/dist/bundle/{chunk-3QFUDXMQ.js → chunk-4G7WQNG7.js} +3 -2
  13. package/dist/bundle/{chunk-5HVJK3ZJ.js → chunk-4VH7M2OD.js} +4 -4
  14. package/dist/bundle/{chunk-COGWKO2T.js → chunk-5DMPGTNR.js} +3 -3
  15. package/dist/bundle/{chunk-NYZS2LKF.js → chunk-5TK2YQCO.js} +2 -2
  16. package/dist/bundle/{chunk-4UHBJSMI.js → chunk-5TSILGTO.js} +508 -450
  17. package/dist/bundle/{chunk-WYTYHUFH.js → chunk-6ERQE4FS.js} +43 -43
  18. package/dist/bundle/{chunk-O53WLYX3.js → chunk-7AZCAUST.js} +2 -2
  19. package/dist/bundle/{chunk-P7HQFII6.js → chunk-7J2IP3WL.js} +7 -7
  20. package/dist/bundle/{chunk-UNTIVT47.js → chunk-7JKECODO.js} +1 -1
  21. package/dist/bundle/{chunk-UQPW42HF.js → chunk-AAZPDWRD.js} +1 -1
  22. package/dist/bundle/{chunk-2S3E2HVV.js → chunk-ABJQ6IDU.js} +17 -17
  23. package/dist/bundle/{chunk-GY4DAJSK.js → chunk-AJ3DFPRT.js} +35 -6
  24. package/dist/bundle/{chunk-JLCR24UM.js → chunk-AZKFZ7J7.js} +1 -1
  25. package/dist/bundle/{chunk-I5R5CMQR.js → chunk-BHSLMJF7.js} +5 -5
  26. package/dist/bundle/{chunk-AP4MX247.js → chunk-C72WYRXD.js} +12 -12
  27. package/dist/bundle/{chunk-OZOQLAWK.js → chunk-CWDC6QJM.js} +6 -6
  28. package/dist/bundle/{chunk-JCHF7LZT.js → chunk-D4MVEOU2.js} +4 -4
  29. package/dist/bundle/{chunk-M7543RUJ.js → chunk-DAFKV6DJ.js} +220 -15
  30. package/dist/bundle/{chunk-3SDJIMZB.js → chunk-E3XA56TS.js} +1 -1
  31. package/dist/bundle/{chunk-IIHZTV6V.js → chunk-EA2OB75T.js} +1 -1
  32. package/dist/bundle/{chunk-FKKPVPZR.js → chunk-ETAFFY3J.js} +57 -57
  33. package/dist/bundle/{chunk-QJ57PV55.js → chunk-EXWOOST5.js} +102 -84
  34. package/dist/bundle/{chunk-PJGOQSE5.js → chunk-FIVFP53N.js} +1 -1
  35. package/dist/bundle/{chunk-TYLEICTX.js → chunk-FOMQ4MG3.js} +3 -3
  36. package/dist/bundle/{chunk-VUUPFDRU.js → chunk-FS2PG2PE.js} +113 -39
  37. package/dist/bundle/{chunk-JQXK3M5M.js → chunk-HCZYJMBP.js} +1 -1
  38. package/dist/bundle/{chunk-VR3YKXHL.js → chunk-HJF2QGOX.js} +16 -16
  39. package/dist/bundle/{chunk-NK4GVFJH.js → chunk-IJCUAKR5.js} +4 -4
  40. package/dist/bundle/{chunk-XVZNFA2P.js → chunk-IRULPE5M.js} +293 -278
  41. package/dist/bundle/{chunk-QSELSDWE.js → chunk-JCNEPYQZ.js} +13 -13
  42. package/dist/bundle/{chunk-FA2TNA5X.js → chunk-JEMBW6IO.js} +1 -1
  43. package/dist/bundle/{chunk-H7XL6WTW.js → chunk-JJHDV32D.js} +2 -2
  44. package/dist/bundle/{chunk-LVAPSAHF.js → chunk-JLUQZZ26.js} +8 -8
  45. package/dist/bundle/{chunk-HPKE2GDP.js → chunk-JO7BJYAP.js} +18 -18
  46. package/dist/bundle/{chunk-VQKNKJYL.js → chunk-JRFKCYMW.js} +6 -6
  47. package/dist/bundle/{chunk-IRNDYNQX.js → chunk-JY2GZDJL.js} +4 -4
  48. package/dist/bundle/{chunk-YTIPTHEE.js → chunk-LSAIXPAX.js} +2 -2
  49. package/dist/bundle/{chunk-T3ULDA7C.js → chunk-LXRBTXCZ.js} +3 -3
  50. package/dist/bundle/{chunk-OIF4B526.js → chunk-M4OP5ASJ.js} +1 -1
  51. package/dist/bundle/{chunk-PKM55ZRR.js → chunk-MBLB4TQI.js} +20 -20
  52. package/dist/bundle/{chunk-HQBLJLYH.js → chunk-MEQNAZ6R.js} +7 -7
  53. package/dist/bundle/{chunk-TAHISPDE.js → chunk-MEY7URZZ.js} +39 -35
  54. package/dist/bundle/{chunk-KRG5X5PH.js → chunk-MF46W7PQ.js} +2 -2
  55. package/dist/bundle/{chunk-6X3KUFRQ.js → chunk-MW46BLWH.js} +20 -20
  56. package/dist/bundle/{chunk-2AF77WMH.js → chunk-NFIR346J.js} +1 -1
  57. package/dist/bundle/{chunk-BIJW6AYA.js → chunk-NWYVOHIX.js} +3662 -3598
  58. package/dist/bundle/{chunk-HPSHQVJU.js → chunk-OOBSSU2G.js} +24 -19
  59. package/dist/bundle/{chunk-UG3GHFGY.js → chunk-P6A77LMP.js} +4 -4
  60. package/dist/bundle/{chunk-XLGDNI4S.js → chunk-PDHN4GHU.js} +5 -40
  61. package/dist/bundle/{chunk-ALE67WRR.js → chunk-PV3AWPHR.js} +5 -5
  62. package/dist/bundle/{chunk-SOOU5WO6.js → chunk-QOKPRFHM.js} +2 -2
  63. package/dist/bundle/{chunk-V2WXTILT.js → chunk-RC72RU66.js} +6 -6
  64. package/dist/bundle/{chunk-E2F2XIX6.js → chunk-RLH6BOEG.js} +8 -8
  65. package/dist/bundle/{chunk-D4MIMH2N.js → chunk-SJE7UGOW.js} +5 -5
  66. package/dist/bundle/{chunk-QF7VL4C3.js → chunk-SXJDCRXE.js} +1 -1
  67. package/dist/bundle/{chunk-5XLU4NN6.js → chunk-T2VAEDJS.js} +4 -4
  68. package/dist/bundle/{chunk-3NYH756U.js → chunk-U2ERT45N.js} +11 -6
  69. package/dist/bundle/{chunk-MZWXTJ4O.js → chunk-UFNE57VY.js} +3 -3
  70. package/dist/bundle/{chunk-6UJCCOZC.js → chunk-ULH3TNUP.js} +4 -4
  71. package/dist/bundle/{chunk-SZ6JFOL4.js → chunk-UOAHZV3K.js} +58 -37
  72. package/dist/bundle/{chunk-GVA3KTCD.js → chunk-UPCEHSIZ.js} +10 -10
  73. package/dist/bundle/{chunk-D7KOAPG6.js → chunk-V7E25BUU.js} +2 -2
  74. package/dist/bundle/{chunk-KOY5HUBY.js → chunk-VZ5KETIX.js} +4 -4
  75. package/dist/bundle/{chunk-ULXEW6FT.js → chunk-WBKYZZQT.js} +1 -1
  76. package/dist/bundle/{chunk-7LT2G5BC.js → chunk-WKIQKGOF.js} +26 -26
  77. package/dist/bundle/{chunk-5VDVGDOC.js → chunk-WWW7YTFG.js} +1 -1
  78. package/dist/bundle/{chunk-G4TNKBDX.js → chunk-XZCF5XU7.js} +7 -7
  79. package/dist/bundle/{chunk-5K54RZBK.js → chunk-Y2QVNVHK.js} +1 -1
  80. package/dist/bundle/{chunk-7EP4AU6A.js → chunk-Y5WSRG3F.js} +3 -3
  81. package/dist/bundle/{chunk-FHBTQPA3.js → chunk-YI4DXASF.js} +37 -37
  82. package/dist/bundle/{chunk-OT7SQQJK.js → chunk-YVUAG7RF.js} +17 -17
  83. package/dist/bundle/{chunk-Y5U4HIZS.js → chunk-ZEPDEFVT.js} +2 -2
  84. package/dist/bundle/{chunk-HHRJPLFO.js → chunk-ZH4H5XTA.js} +1 -1
  85. package/dist/bundle/{chunk-JHMEETXI.js → chunk-ZK46UHDP.js} +2 -2
  86. package/dist/bundle/{chunk-PUMDOCAF.js → chunk-ZU5VQYNY.js} +1 -1
  87. package/dist/bundle/{cli-KW6QQVS5.js → cli-U4LSBYDV.js} +61 -61
  88. package/dist/bundle/command-contract-UU5T24ZZ.js +41 -0
  89. package/dist/bundle/{command-server-entry-OC4E4DED.js → command-server-entry-PK6FBUPO.js} +31 -31
  90. package/dist/bundle/{decode-AH5ZLLDK.js → decode-3ZE6NBKV.js} +8 -8
  91. package/dist/bundle/{dispatch-CDWZZ54Q.js → dispatch-WBEOHZDV.js} +9 -9
  92. package/dist/bundle/drive.js +11 -11
  93. package/dist/bundle/{echarts-VC7MTXWY.js → echarts-6FWNCNXK.js} +2 -2
  94. package/dist/bundle/{embed-EPSQY6QG.js → embed-DGYBBZUW.js} +9 -9
  95. package/dist/bundle/{embedder-TK4U4TJR.js → embedder-O7A6VMWI.js} +12 -12
  96. package/dist/bundle/entry-CDJ2QSU2.js +25 -0
  97. package/dist/bundle/{failure-WSVZOPFE.js → failure-X6PSLVSO.js} +4 -4
  98. package/dist/bundle/first-run-UOQW7DN5.js +30 -0
  99. package/dist/bundle/first-screen-SNDV4YKF.js +39 -0
  100. package/dist/bundle/google-HPX52KMC.js +45 -0
  101. package/dist/bundle/{google-api-AV4X2JH3.js → google-api-HIMN4XL5.js} +63 -63
  102. package/dist/bundle/grants-RO42I6E4.js +111 -0
  103. package/dist/bundle/{identity-CGHHF7AK.js → identity-NFGHDPLL.js} +6 -6
  104. package/dist/bundle/{instructions-24PHDBBE.js → instructions-6JAQYCM6.js} +1 -1
  105. package/dist/bundle/{login-XHFESAFM.js → login-RZOQN63N.js} +69 -69
  106. package/dist/bundle/{mcp-M5YCSWJJ.js → mcp-TDKGDB4V.js} +2 -2
  107. package/dist/bundle/{node-GIDULTV5.js → node-KSIX3GIH.js} +2 -2
  108. package/dist/bundle/{node-sqlite-LINBOAWK.js → node-sqlite-4FJ6WJXN.js} +10 -10
  109. package/dist/bundle/oauth-BKZAMFKK.js +22 -0
  110. package/dist/bundle/{open-RYFKPNCJ.js → open-4AQJGH42.js} +8 -8
  111. package/dist/bundle/{openai-Q7YYUHJF.js → openai-24F2OX55.js} +19 -19
  112. package/dist/bundle/{process-VPIZTIJR.js → process-7NOA2T7H.js} +1 -1
  113. package/dist/bundle/{program-IUXFRBZA.js → program-7JHMLDEX.js} +181 -225
  114. package/dist/bundle/{prompt-LF4KX3XL.js → prompt-NM66MAZ4.js} +8 -8
  115. package/dist/bundle/{reasons-JPYOU5GV.js → reasons-KSYP5VDJ.js} +5 -5
  116. package/dist/bundle/{recognize-KEWTJXFH.js → recognize-DBKV2JYZ.js} +7 -7
  117. package/dist/bundle/{remote-HGGLB76S.js → remote-ABWUTBVB.js} +13 -13
  118. package/dist/bundle/{rerank-TDUKETFT.js → rerank-FQAU4ENY.js} +10 -10
  119. package/dist/bundle/{serve-XFYMKW5W.js → serve-QLJG4QZD.js} +12 -12
  120. package/dist/bundle/server-NUBLY5SV.js +74 -0
  121. package/dist/bundle/{server-PXIPSGFP.js → server-VGZNK5XD.js} +47 -47
  122. package/dist/bundle/{services-2BOCGMJU.js → services-5KARVUHK.js} +36 -36
  123. package/dist/bundle/{sqlite-runtime-R7M5XUMW.js → sqlite-runtime-ILF6EFQJ.js} +9 -9
  124. package/dist/bundle/{start-YRLT4MQZ.js → start-C6EXYXAL.js} +7 -7
  125. package/dist/bundle/{state-NZ7WRJWH.js → state-R2M56GPU.js} +9 -9
  126. package/dist/bundle/{store-ICDGPSEN.js → store-2OBVMUQL.js} +19 -19
  127. package/dist/bundle/{store-7LCVDO7G.js → store-DA4K7HWW.js} +21 -21
  128. package/dist/bundle/store-maintenance-command-KSIPI5B5.js +65 -0
  129. package/dist/bundle/tokens-VQDGSHRB.js +111 -0
  130. package/dist/commands/config.d.ts.map +1 -1
  131. package/dist/commands/config.js +5 -3
  132. package/dist/commands/config.js.map +1 -1
  133. package/dist/commands/search.js +4 -4
  134. package/dist/commands/search.js.map +1 -1
  135. package/dist/commands/sync.d.ts.map +1 -1
  136. package/dist/commands/sync.js +2 -1
  137. package/dist/commands/sync.js.map +1 -1
  138. package/dist/commands/transcripts.d.ts +4 -0
  139. package/dist/commands/transcripts.d.ts.map +1 -0
  140. package/dist/commands/transcripts.js +42 -0
  141. package/dist/commands/transcripts.js.map +1 -0
  142. package/dist/config.d.ts +9 -0
  143. package/dist/config.d.ts.map +1 -1
  144. package/dist/config.js +14 -1
  145. package/dist/config.js.map +1 -1
  146. package/dist/google.d.ts.map +1 -1
  147. package/dist/google.js +31 -28
  148. package/dist/google.js.map +1 -1
  149. package/dist/list-queries.d.ts +10 -0
  150. package/dist/list-queries.d.ts.map +1 -1
  151. package/dist/list-queries.js +12 -1
  152. package/dist/list-queries.js.map +1 -1
  153. package/dist/model.d.ts +4 -1
  154. package/dist/model.d.ts.map +1 -1
  155. package/dist/program.d.ts.map +1 -1
  156. package/dist/program.js +2 -0
  157. package/dist/program.js.map +1 -1
  158. package/dist/state.d.ts.map +1 -1
  159. package/dist/state.js +2 -0
  160. package/dist/state.js.map +1 -1
  161. package/dist/sync.d.ts.map +1 -1
  162. package/dist/sync.js +5 -1
  163. package/dist/sync.js.map +1 -1
  164. package/dist/transcripts.d.ts +21 -0
  165. package/dist/transcripts.d.ts.map +1 -0
  166. package/dist/transcripts.js +48 -0
  167. package/dist/transcripts.js.map +1 -0
  168. package/dist/version.d.ts +1 -1
  169. package/dist/version.js +1 -1
  170. package/package.json +3 -3
  171. package/dist/bundle/command-contract-CE543JBN.js +0 -41
  172. package/dist/bundle/entry-3VN23M7M.js +0 -25
  173. package/dist/bundle/first-run-7ZYJ7EB3.js +0 -30
  174. package/dist/bundle/first-screen-CZDH7QY3.js +0 -39
  175. package/dist/bundle/google-OBZMWA7J.js +0 -45
  176. package/dist/bundle/grants-WTRLN4ZI.js +0 -111
  177. package/dist/bundle/oauth-JHUX3KE3.js +0 -22
  178. package/dist/bundle/server-BDEV3CZJ.js +0 -74
  179. package/dist/bundle/store-maintenance-command-SJPLY6IH.js +0 -65
  180. package/dist/bundle/tokens-FGTBE7VW.js +0 -111
  181. /package/dist/bundle/{chunk-HVJJWJYQ.js → chunk-XWBPP2HX.js} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
8
8
  import { existsSync } from "node:fs";
9
9
  import { win32 } from "node:path";
10
10
  var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-H7XL6WTW.js";
7
+ } from "./chunk-JJHDV32D.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-IIHZTV6V.js";
10
+ } from "./chunk-EA2OB75T.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
16
16
  import { createInterface } from "node:readline";
17
17
  import { Writable } from "node:stream";
18
18
  var EMPTY_TRIES = 3;
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  walkQuery
5
- } from "./chunk-GVA3KTCD.js";
5
+ } from "./chunk-UPCEHSIZ.js";
6
6
  import {
7
7
  writeSecurely
8
- } from "./chunk-6X3KUFRQ.js";
8
+ } from "./chunk-MW46BLWH.js";
9
9
  import {
10
10
  array,
11
11
  literal,
@@ -21,16 +21,16 @@ import {
21
21
  safeParse,
22
22
  string,
23
23
  trim
24
- } from "./chunk-VQKNKJYL.js";
24
+ } from "./chunk-JRFKCYMW.js";
25
25
  import {
26
26
  CliError,
27
27
  isCliError
28
- } from "./chunk-IIHZTV6V.js";
28
+ } from "./chunk-EA2OB75T.js";
29
29
  import {
30
30
  __name
31
31
  } from "./chunk-ZVVMGPBJ.js";
32
32
 
33
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/blocks.js
33
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/documents/blocks.js
34
34
  var MARKS = ["bold", "italic", "strike", "code", "link"];
35
35
  var sameMarks = /* @__PURE__ */ __name((a, b) => MARKS.every((mark) => a[mark] === b[mark]), "sameMarks");
36
36
  var normalizeInlines = /* @__PURE__ */ __name((inlines) => {
@@ -78,7 +78,7 @@ var key = /* @__PURE__ */ __name((block, withChecked) => {
78
78
  var blockKey = /* @__PURE__ */ __name((block) => JSON.stringify(key(block, true)), "blockKey");
79
79
  var blockShape = /* @__PURE__ */ __name((block) => JSON.stringify(key(block, false)), "blockShape");
80
80
 
81
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/block-diff.js
81
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/block-diff.js
82
82
  var MAX_CELLS = 4e6;
83
83
  var matches = /* @__PURE__ */ __name((a, b, keyOf) => {
84
84
  const ka = a.map(keyOf);
@@ -224,7 +224,7 @@ var mergeBlocks = /* @__PURE__ */ __name((baseLocal, baseRemote, local, remote,
224
224
  return { status: "clean", blocks, conflicts };
225
225
  }, "mergeBlocks");
226
226
 
227
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
227
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
228
228
  var Proposal = object({
229
229
  kind: picklist(["summary", "digest", "fact", "preference"]),
230
230
  body: pipe(string(), trim(), minLength(1), maxLength(15e3)),
@@ -259,7 +259,7 @@ var extractMemories = /* @__PURE__ */ __name(async (text, complete) => {
259
259
  return { ...proposals, provider: answer.provider, model: answer.model, tokens: answer.tokens };
260
260
  }, "extractMemories");
261
261
 
262
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/ingestion.js
262
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/ingestion.js
263
263
  var documentIngestion = /* @__PURE__ */ __name((store, options) => {
264
264
  const folder = /* @__PURE__ */ __name(async (principal, create) => {
265
265
  if (options.provider)
@@ -386,7 +386,7 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
386
386
  };
387
387
  }, "documentIngestion");
388
388
 
389
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/knowledge.js
389
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/knowledge.js
390
390
  var writer = /* @__PURE__ */ __name((by) => {
391
391
  if (by === void 0)
392
392
  throw new CliError("validation_error", "name who writes it: the owner or an agent; there is no default", {
@@ -541,7 +541,7 @@ var documentKnowledge = /* @__PURE__ */ __name((store, folder) => {
541
541
  return port;
542
542
  }, "documentKnowledge");
543
543
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/markdown-blocks.js
544
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/documents/markdown-blocks.js
545
545
  var parser;
546
546
  var loadParser = /* @__PURE__ */ __name(() => parser ??= Promise.all([
547
547
  import("./mdast-util-from-markdown-CE73EWJ2.js"),
@@ -666,7 +666,7 @@ var placedMarkdownBlocks = /* @__PURE__ */ __name(async (markdown) => {
666
666
  return blocks(tree.children);
667
667
  }, "placedMarkdownBlocks");
668
668
 
669
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/markdown-splice.js
669
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/markdown-splice.js
670
670
  var escapeText = /* @__PURE__ */ __name((text) => text.replace(/[\\`*_[\]<>~|]/g, "\\$&"), "escapeText");
671
671
  var codeSpan = /* @__PURE__ */ __name((text) => {
672
672
  const longest = (text.match(/`+/g) ?? []).reduce((most, run) => Math.max(most, run.length), 0);
@@ -852,15 +852,15 @@ var columnsBefore = /* @__PURE__ */ __name((placed, index) => {
852
852
  return columns;
853
853
  }, "columnsBefore");
854
854
 
855
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
855
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
856
856
  import { watch } from "node:fs";
857
857
 
858
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
858
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
859
859
  import { createHash as createHash2 } from "node:crypto";
860
860
  import { mkdirSync, readFileSync } from "node:fs";
861
861
  import { join as join2 } from "node:path";
862
862
 
863
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/push.js
863
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/push.js
864
864
  import { createHash, randomUUID } from "node:crypto";
865
865
  import { createReadStream } from "node:fs";
866
866
  import { chmod, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
@@ -1112,7 +1112,7 @@ var pushDocuments = /* @__PURE__ */ __name(async (options) => {
1112
1112
  return result;
1113
1113
  }, "pushDocuments");
1114
1114
 
1115
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
1115
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
1116
1116
  var mirrorId = /* @__PURE__ */ __name((root, folder) => createHash2("sha256").update(JSON.stringify([root, folder])).digest("hex").slice(0, 8), "mirrorId");
1117
1117
  var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
1118
1118
  var stateSchema = /* @__PURE__ */ __name((kinds) => object({
@@ -1234,7 +1234,7 @@ var syncMirrors = /* @__PURE__ */ __name(async (options) => {
1234
1234
  };
1235
1235
  }, "syncMirrors");
1236
1236
 
1237
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
1237
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
1238
1238
  var sleep = /* @__PURE__ */ __name((milliseconds, signal) => new Promise((resolve) => {
1239
1239
  const finish = /* @__PURE__ */ __name(() => {
1240
1240
  clearTimeout(timer);
@@ -1373,7 +1373,7 @@ async function* watchMirrors(sync, options) {
1373
1373
  }
1374
1374
  __name(watchMirrors, "watchMirrors");
1375
1375
 
1376
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/proposals.js
1376
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/proposals.js
1377
1377
  var extractDocumentMemories = /* @__PURE__ */ __name(async (options) => {
1378
1378
  const source = options.read();
1379
1379
  const text = options.tab ? source.snapshot.tabs.find((tab) => tab.id === options.tab)?.text : source.snapshot.text;
@@ -1423,10 +1423,10 @@ Snapshot: ${source.hash}`;
1423
1423
  };
1424
1424
  }, "extractDocumentMemories");
1425
1425
 
1426
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1426
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1427
1427
  import { createHash as createHash4 } from "node:crypto";
1428
1428
 
1429
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/scope.js
1429
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/documents/scope.js
1430
1430
  var within = /* @__PURE__ */ __name((file, roots, folders, seen = /* @__PURE__ */ new Set()) => {
1431
1431
  if (file.trashed)
1432
1432
  return false;
@@ -1440,10 +1440,18 @@ var within = /* @__PURE__ */ __name((file, roots, folders, seen = /* @__PURE__ *
1440
1440
  return folder ? within(folder, roots, folders, next) : roots.includes(id);
1441
1441
  });
1442
1442
  }, "within");
1443
+ var inScope = /* @__PURE__ */ __name((file, roots, folders, matched = /* @__PURE__ */ new Set(), query) => {
1444
+ if (file.trashed)
1445
+ return false;
1446
+ if (query?.mode === "exclude" && query.matches(file))
1447
+ return false;
1448
+ return matched.has(file.id) || within(file, roots, folders);
1449
+ }, "inScope");
1443
1450
 
1444
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/documents/catalog.js
1445
- var catalogFiles = /* @__PURE__ */ __name((state, roots) => {
1451
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/documents/catalog.js
1452
+ var catalogFiles = /* @__PURE__ */ __name((state, roots, query) => {
1446
1453
  const folders = state.pending?.folders ?? state.folders;
1454
+ const matched = new Set(state.pending?.matched ?? state.matched ?? []);
1447
1455
  const files = new Map(Object.values(state.documents).map((doc) => [doc.metadata.id, doc.metadata]));
1448
1456
  for (const skip of state.skipped)
1449
1457
  if (skip.file)
@@ -1456,19 +1464,19 @@ var catalogFiles = /* @__PURE__ */ __name((state, roots) => {
1456
1464
  else if (job.file)
1457
1465
  files.set(job.id, job.file);
1458
1466
  }
1459
- return [...files.values()].filter((file) => within(file, roots, folders));
1467
+ return [...files.values()].filter((file) => inScope(file, roots, folders, matched, query));
1460
1468
  }, "catalogFiles");
1461
1469
 
1462
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/plan.js
1470
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/plan.js
1463
1471
  import { createHash as createHash3 } from "node:crypto";
1464
- var scopeHash = /* @__PURE__ */ __name((roots) => createHash3("sha256").update(JSON.stringify([...roots].sort())).digest("hex"), "scopeHash");
1472
+ var scopeHash = /* @__PURE__ */ __name((roots, query) => createHash3("sha256").update(JSON.stringify(query ? [[...roots].sort(), query.mode, query.key] : [...roots].sort())).digest("hex"), "scopeHash");
1465
1473
  var changedSince = /* @__PURE__ */ __name((previous, file) => previous.version !== file.version || previous.modifiedAt !== file.modifiedAt || previous.name !== file.name || previous.canDownload !== file.canDownload || JSON.stringify(previous.parents) !== JSON.stringify(file.parents), "changedSince");
1466
1474
  var SAVE_EVERY_MS = 2e3;
1467
1475
  var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots, limit, pictures, abandoned = [], walks) => {
1468
- const { isFolder, skipReason, retryable, maxEntries: MAX_ENTRIES, errorOf } = options;
1476
+ const { isFolder, skipReason, retryable, maxEntries: MAX_ENTRIES, errorOf, query } = options;
1469
1477
  const tooManyEntries = /* @__PURE__ */ __name(() => options.limitError?.() ?? new CliError("validation_error", `selected folders exceed the ${MAX_ENTRIES} entry limit`), "tooManyEntries");
1470
- const scope = scopeHash(roots);
1471
- if (!roots.length)
1478
+ const scope = scopeHash(roots, query);
1479
+ if (!roots.length && query?.mode !== "include")
1472
1480
  return {
1473
1481
  scope,
1474
1482
  cursor: state.cursor ?? "",
@@ -1477,7 +1485,10 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1477
1485
  jobs: [.../* @__PURE__ */ new Set([...Object.keys(state.documents), ...abandoned])].map((id) => ({ id, kind: "remove" }))
1478
1486
  };
1479
1487
  if (!source)
1480
- throw new CliError("configuration_error", "selected folders require an authenticated source");
1488
+ throw new CliError("configuration_error", "selected folders or a saved query require an authenticated source");
1489
+ if (query?.mode === "include" && !query.list)
1490
+ throw new CliError("configuration_error", "a query that includes files must list them");
1491
+ const found = query?.mode === "include" && query.list ? await query.list() : [];
1481
1492
  const initial = !state.cursor || scope !== state.scope;
1482
1493
  const resumed = initial ? walks?.read(scope) : void 0;
1483
1494
  const cursor = initial ? resumed?.cursor ?? await source.startToken() : state.cursor;
@@ -1606,13 +1617,25 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1606
1617
  if (!visited.has(folder.id) && within(folder, roots, folders))
1607
1618
  await crawl(folder);
1608
1619
  }
1620
+ const matched = /* @__PURE__ */ new Set();
1621
+ for (const file of found) {
1622
+ if (isFolder(file) || file.trashed || !query?.matches(file) || matched.has(file.id))
1623
+ continue;
1624
+ if (!files.has(file.id) && ++discovered > MAX_ENTRIES)
1625
+ throw tooManyEntries();
1626
+ const prior = state.documents[file.id]?.metadata ?? state.skipped.find((item) => item.id === file.id)?.file;
1627
+ if (initial || !prior || changedSince(prior, file))
1628
+ changed.add(file.id);
1629
+ files.set(file.id, file);
1630
+ matched.add(file.id);
1631
+ }
1609
1632
  const jobs = [];
1610
1633
  const skipped = [];
1611
1634
  for (const root of roots)
1612
1635
  if (folders[root]?.trashed)
1613
1636
  skipped.push({ id: root, reason: "selected folder is unavailable" });
1614
1637
  for (const [id, file] of files) {
1615
- if (!within(file, roots, folders))
1638
+ if (!inScope(file, roots, folders, matched, query))
1616
1639
  continue;
1617
1640
  const previousSkip = state.skipped.find((item) => item.id === id);
1618
1641
  const reason = skipReason(file);
@@ -1636,21 +1659,28 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1636
1659
  }
1637
1660
  for (const id of /* @__PURE__ */ new Set([...Object.keys(state.documents), ...abandoned])) {
1638
1661
  const file = files.get(id);
1639
- if (!file || !within(file, roots, folders))
1662
+ if (!file || !inScope(file, roots, folders, matched, query))
1640
1663
  jobs.push({ id, kind: "remove" });
1641
1664
  }
1642
1665
  const scopedFolders = Object.fromEntries(Object.entries(folders).filter(([, file]) => within(file, roots, folders) || roots.includes(file.id)));
1643
- return { scope, cursor: finalCursor, folders: scopedFolders, jobs, skipped };
1666
+ return {
1667
+ scope,
1668
+ cursor: finalCursor,
1669
+ folders: scopedFolders,
1670
+ jobs,
1671
+ skipped,
1672
+ ...query?.mode === "include" ? { matched: [...matched] } : {}
1673
+ };
1644
1674
  }, "planDocuments");
1645
1675
 
1646
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1676
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1647
1677
  var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
1648
1678
  var SAVE_EVERY_MS2 = 2e3;
1649
1679
  var SAVE_EVERY_ITEMS = 25;
1650
1680
  var isPicture = /* @__PURE__ */ __name((file) => file.mime.startsWith("image/") && file.canDownload, "isPicture");
1651
1681
  var hashText2 = /* @__PURE__ */ __name((text) => createHash4("sha256").update(text).digest("hex"), "hashText");
1652
1682
  var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1653
- const { source, index, state: statePort, principal, roots, textLimit: limit, max, signal, rescan = false, pictures = false, assertHeld, errorOf, skipReason, storeVersion: VERSION } = options;
1683
+ const { source, index, state: statePort, principal, roots, textLimit: limit, max, signal, rescan = false, pictures = false, assertHeld, errorOf, skipReason, storeVersion: VERSION, query } = options;
1654
1684
  if (![max, limit, options.maxEntries].every((value) => Number.isSafeInteger(value) && value > 0))
1655
1685
  throw new CliError("validation_error", "sync limits must be positive whole numbers");
1656
1686
  const profile = { principal, roots, picture_search: pictures };
@@ -1666,20 +1696,20 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1666
1696
  pending: 0,
1667
1697
  skipped: [],
1668
1698
  errors: [],
1669
- coverage: "selected folders only; unsupported files are reported",
1699
+ coverage: query?.mode === "include" ? "selected folders and the files a saved query finds; unsupported files are reported" : query?.mode === "exclude" ? "selected folders only, without the files a saved query keeps out; unsupported files are reported" : "selected folders only; unsupported files are reported",
1670
1700
  ...profile.picture_search ? { pictures: 0 } : {}
1671
1701
  };
1672
1702
  let writer2;
1673
1703
  let flush;
1674
1704
  try {
1675
- if (profile.roots.length && (!source || await source.identity() !== profile.principal))
1705
+ if ((profile.roots.length || query?.mode === "include") && (!source || await source.identity() !== profile.principal))
1676
1706
  throw new CliError("authentication_error", "signed-in source account does not match this profile", {
1677
1707
  reason: "profile.wrong-account"
1678
1708
  });
1679
1709
  const state = statePort.read();
1680
1710
  if (state.principal !== principal)
1681
1711
  throw new CliError("configuration_error", "sync state belongs to another source account");
1682
- const currentScope = scopeHash(profile.roots);
1712
+ const currentScope = scopeHash(profile.roots, query);
1683
1713
  const abandoned = state.pending && (state.pending.scope !== currentScope || rescan) ? state.pending.jobs.map((job) => job.id) : [];
1684
1714
  if (state.pending?.scope !== currentScope || rescan)
1685
1715
  delete state.pending;
@@ -1700,7 +1730,7 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1700
1730
  if (!pending)
1701
1731
  throw new CliError("invalid_response", "could not prepare a sync batch");
1702
1732
  if (index.catalog)
1703
- await index.catalog.import(profile.principal, catalogFiles(state, profile.roots));
1733
+ await index.catalog.import(profile.principal, catalogFiles(state, profile.roots, query));
1704
1734
  result.skipped = state.skipped.map(({ id, reason }) => ({ id, reason }));
1705
1735
  const saveNamesOnly = /* @__PURE__ */ __name(async (file, reason) => {
1706
1736
  const doc = { metadata: file, markdown: "", text: "", tabs: [], notRead: reason };
@@ -1777,7 +1807,8 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1777
1807
  if (!source)
1778
1808
  throw new CliError("configuration_error", "a pending save requires source sign-in");
1779
1809
  const content = await source.content(job.id, limit);
1780
- if (!within(content.metadata, profile.roots, pending.folders)) {
1810
+ const listed = query?.mode === "include" && (pending.matched?.includes(job.id) ?? query.matches(content.metadata));
1811
+ if (!listed && !inScope(content.metadata, profile.roots, pending.folders, /* @__PURE__ */ new Set(), query)) {
1781
1812
  await index.remove(profile.principal, job.id);
1782
1813
  statePort.removeSnapshot(job.id);
1783
1814
  delete state.documents[job.id];
@@ -1838,6 +1869,10 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1838
1869
  state.cursor = pending.cursor;
1839
1870
  state.scope = pending.scope;
1840
1871
  state.folders = pending.folders;
1872
+ if (pending.matched)
1873
+ state.matched = pending.matched;
1874
+ else
1875
+ delete state.matched;
1841
1876
  delete state.pending;
1842
1877
  state.lastSync = new Date(now()).toISOString();
1843
1878
  statePort.save(state);
@@ -1849,6 +1884,40 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1849
1884
  }
1850
1885
  }, "syncDocuments");
1851
1886
 
1887
+ // dist/model.js
1888
+ var FOLDER = "application/vnd.google-apps.folder";
1889
+ var DOC = "application/vnd.google-apps.document";
1890
+ var SHEET = "application/vnd.google-apps.spreadsheet";
1891
+ var metadataJson = /* @__PURE__ */ __name(({ modifiedAt, canDownload, createdAt, driveId, lastModifiedBy, providerMetadata, ...rest }) => ({
1892
+ ...rest,
1893
+ ...providerMetadata === void 0 ? {} : { provider_metadata: providerMetadata },
1894
+ ...modifiedAt === void 0 ? {} : { modified_at: modifiedAt },
1895
+ can_download: canDownload,
1896
+ ...createdAt === void 0 ? {} : { created_at: createdAt },
1897
+ ...driveId === void 0 ? {} : { drive_id: driveId },
1898
+ ...lastModifiedBy === void 0 ? {} : { last_modified_by: lastModifiedBy }
1899
+ }), "metadataJson");
1900
+ var DOCUMENT_LIST_FIELDS = Object.keys({
1901
+ id: true,
1902
+ name: true,
1903
+ mime: true,
1904
+ parents: true,
1905
+ version: true,
1906
+ url: true,
1907
+ trashed: true,
1908
+ size: true,
1909
+ description: true,
1910
+ owners: true,
1911
+ provider_metadata: true,
1912
+ modified_at: true,
1913
+ can_download: true,
1914
+ created_at: true,
1915
+ drive_id: true,
1916
+ last_modified_by: true,
1917
+ reference: true,
1918
+ tabs: true
1919
+ });
1920
+
1852
1921
  export {
1853
1922
  normalizeInlines,
1854
1923
  blockKey,
@@ -1866,5 +1935,10 @@ export {
1866
1935
  watchMirrors,
1867
1936
  extractDocumentMemories,
1868
1937
  catalogFiles,
1869
- syncDocuments
1938
+ syncDocuments,
1939
+ FOLDER,
1940
+ DOC,
1941
+ SHEET,
1942
+ metadataJson,
1943
+ DOCUMENT_LIST_FIELDS
1870
1944
  };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
8
8
  var CONTROL = (
9
9
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
10
10
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -3,35 +3,35 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  activeProfile,
5
5
  paths
6
- } from "./chunk-M7543RUJ.js";
6
+ } from "./chunk-DAFKV6DJ.js";
7
7
  import {
8
8
  READ_SCOPE,
9
9
  WRITE_SCOPE
10
10
  } from "./chunk-NYECVHFH.js";
11
11
  import {
12
12
  googleError
13
- } from "./chunk-5K54RZBK.js";
13
+ } from "./chunk-Y2QVNVHK.js";
14
14
  import {
15
15
  providerRequest
16
- } from "./chunk-4UHBJSMI.js";
16
+ } from "./chunk-5TSILGTO.js";
17
17
  import {
18
18
  withTimeLimit
19
- } from "./chunk-WYTYHUFH.js";
19
+ } from "./chunk-6ERQE4FS.js";
20
20
  import {
21
21
  acquireLock
22
- } from "./chunk-QSELSDWE.js";
22
+ } from "./chunk-JCNEPYQZ.js";
23
23
  import {
24
24
  hostFetch
25
- } from "./chunk-GY4DAJSK.js";
25
+ } from "./chunk-AJ3DFPRT.js";
26
26
  import {
27
27
  DESKTOP
28
- } from "./chunk-YTIPTHEE.js";
28
+ } from "./chunk-LSAIXPAX.js";
29
29
  import {
30
30
  Credentials,
31
31
  isMovedRun,
32
32
  keyringService,
33
33
  systemKeyring
34
- } from "./chunk-6X3KUFRQ.js";
34
+ } from "./chunk-MW46BLWH.js";
35
35
  import {
36
36
  minLength,
37
37
  nullable,
@@ -41,16 +41,16 @@ import {
41
41
  pipe,
42
42
  safeParse,
43
43
  string
44
- } from "./chunk-VQKNKJYL.js";
44
+ } from "./chunk-JRFKCYMW.js";
45
45
  import {
46
46
  CliError,
47
47
  isCliError
48
- } from "./chunk-IIHZTV6V.js";
48
+ } from "./chunk-EA2OB75T.js";
49
49
  import {
50
50
  __name
51
51
  } from "./chunk-ZVVMGPBJ.js";
52
52
 
53
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
53
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
54
54
  import { createHash, randomBytes } from "node:crypto";
55
55
  import { createServer } from "node:http";
56
56
  var DEFAULT_TIMEOUT_MS = 3e5;
@@ -186,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
186
186
  }
187
187
  }, "authorize");
188
188
 
189
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
189
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
190
190
  import { createHash as createHash2 } from "node:crypto";
191
191
  import { join } from "node:path";
192
192
  import { setTimeout as delay } from "node:timers/promises";
193
193
 
194
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/requests.js
194
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/requests.js
195
195
  var REQUEST_LIMIT_MS = 3e4;
196
196
  var TOKEN_LOG_EVENT = "oauth.token";
197
197
  var object2 = /* @__PURE__ */ __name((value) => {
@@ -311,7 +311,7 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
311
311
  });
312
312
  }, "revokeToken");
313
313
 
314
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
314
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
315
315
  var inFlight = /* @__PURE__ */ new Map();
316
316
  var refreshedInMemory = /* @__PURE__ */ new Map();
317
317
  var tokenKeeper = /* @__PURE__ */ __name((options) => {
@@ -473,7 +473,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
473
473
  };
474
474
  }, "tokenKeeper");
475
475
 
476
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/provider.js
476
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/provider.js
477
477
  var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
478
478
  id: "google",
479
479
  name: "Google",
@@ -490,7 +490,7 @@ var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
490
490
  }
491
491
  }), "googleProvider");
492
492
 
493
- // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/storage.js
493
+ // node_modules/.pnpm/@wirecat+cli-core@0.652.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_8be4ae3be01c4720e564a3a01e19fd64/node_modules/@wirecat/cli-core/dist/oauth/storage.js
494
494
  var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
495
495
  var parse = /* @__PURE__ */ __name((raw) => {
496
496
  let value;
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  singleLine
5
- } from "./chunk-JQXK3M5M.js";
5
+ } from "./chunk-HCZYJMBP.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
10
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
11
11
  var FIRST_PARTY_TOOLS = [
12
12
  { name: "tg", package: "@wirecat/tg-cli" },
13
13
  { name: "max", package: "@wirecat/max-cli" },
@@ -31,7 +31,7 @@ var DESCRIBE_FLAG = "--wcat-describe";
31
31
  var DESCRIBE_MAX_BYTES = 64 * 1024;
32
32
  var DISPATCH_FLAG = "--wcat-dispatch";
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
34
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
35
35
  var DESCRIBE_FORMAT = 1;
36
36
  var DESCRIBE_MANIFEST_FORMAT = 2;
37
37
  var describeAnswer = /* @__PURE__ */ __name((tool, manifest) => {
@@ -74,7 +74,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
74
74
  };
75
75
  }, "parseDescribe");
76
76
 
77
- // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
77
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
78
78
  import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
79
79
  import { join } from "node:path";
80
80
  var SHIM_FORMAT = 2;