@wirecat/drive-cli 0.69.0 → 0.70.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 (217) hide show
  1. package/contracts/wirecat.json +14 -13
  2. package/dist/age.d.ts +0 -36
  3. package/dist/age.d.ts.map +1 -1
  4. package/dist/age.js +0 -22
  5. package/dist/age.js.map +1 -1
  6. package/dist/bin/drive.js +2 -2
  7. package/dist/bundle/{all-profiles-B4A737YW.js → all-profiles-FW3GK3QO.js} +13 -13
  8. package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-QVKJT3II.js} +8 -8
  9. package/dist/bundle/{app-server-OWEW7DY5.js → app-server-QU73RD5R.js} +66 -58
  10. package/dist/bundle/{bun-V5QLYBZU.js → bun-5XCD5CBB.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-TIGSVNSV.js} +9 -9
  12. package/dist/bundle/{chunk-GK6KXBL6.js → chunk-2SBC4DVV.js} +4 -4
  13. package/dist/bundle/{chunk-E7URRFBB.js → chunk-3AHBZP33.js} +10 -15
  14. package/dist/bundle/{chunk-V4FMN5A6.js → chunk-3CHW7JGR.js} +17 -17
  15. package/dist/bundle/chunk-3TCMANIM.js +387 -0
  16. package/dist/bundle/{chunk-6EL5AVXX.js → chunk-3UWRAIWA.js} +4 -4
  17. package/dist/bundle/{chunk-2DS2TDGW.js → chunk-3UZ4OH22.js} +18 -18
  18. package/dist/bundle/{chunk-WQOGHND4.js → chunk-4WK26MPY.js} +1 -1
  19. package/dist/bundle/{chunk-AD7VI3XU.js → chunk-54BQWRJL.js} +7 -7
  20. package/dist/bundle/{chunk-EA2OB75T.js → chunk-54NDYVZA.js} +1 -1
  21. package/dist/bundle/{chunk-4YECZ6CN.js → chunk-5JTB4URG.js} +12 -12
  22. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
  23. package/dist/bundle/{chunk-BVVXYZSU.js → chunk-6BMTW5A6.js} +9 -9
  24. package/dist/bundle/{chunk-6D44YQ5X.js → chunk-6DPOWBKA.js} +6 -6
  25. package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-7C5KENNU.js} +3 -3
  26. package/dist/bundle/chunk-7DJNURKV.js +823 -0
  27. package/dist/bundle/{chunk-5TK2YQCO.js → chunk-7IBENBCK.js} +2 -2
  28. package/dist/bundle/chunk-7QSRODXM.js +259 -0
  29. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-ABZ2NYDT.js} +1 -1
  30. package/dist/bundle/{chunk-RLGQMMYE.js → chunk-AV5UKJZM.js} +35 -13
  31. package/dist/bundle/{chunk-533XOW74.js → chunk-BBFXQPKD.js} +3 -3
  32. package/dist/bundle/{chunk-ZUG67442.js → chunk-BBRMDMIR.js} +3 -3
  33. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-BD2K2ONK.js} +4 -4
  34. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-BFKFKDPC.js} +1 -1
  35. package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-BXPC5TFG.js} +2 -2
  36. package/dist/bundle/chunk-DHX27E5M.js +31 -0
  37. package/dist/bundle/{chunk-L342KHIZ.js → chunk-DR57KDAY.js} +6 -6
  38. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-DVI72ZQG.js} +1 -1
  39. package/dist/bundle/{chunk-N4ACIIQB.js → chunk-DVVUJ254.js} +2 -2
  40. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-EDO5LZVF.js} +1 -1
  41. package/dist/bundle/{chunk-LUZRVBQR.js → chunk-EG62WVR2.js} +6 -6
  42. package/dist/bundle/{chunk-WNMPIRRF.js → chunk-F5KJWRF5.js} +3 -3
  43. package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FADAOLGB.js} +4 -4
  44. package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-FCSHWUMW.js} +5 -5
  45. package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-FN3RXBO7.js} +6 -6
  46. package/dist/bundle/{chunk-GTDCP5OG.js → chunk-FONIFRYI.js} +4 -4
  47. package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-FVTKFIQH.js} +981 -589
  48. package/dist/bundle/{chunk-F5UUJU6R.js → chunk-FYPW7NMH.js} +4 -4
  49. package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
  50. package/dist/bundle/{chunk-HEBZCKMU.js → chunk-GAHIHE4K.js} +1778 -2232
  51. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GJZSVSV3.js} +2 -2
  52. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-GK3BJMGK.js} +1 -1
  53. package/dist/bundle/{chunk-6XNTELM5.js → chunk-GPDPEHYX.js} +1 -1
  54. package/dist/bundle/{chunk-CU6RATZH.js → chunk-GV5DGHSA.js} +4 -4
  55. package/dist/bundle/{chunk-JRFKCYMW.js → chunk-HHAZ6DCY.js} +23 -6
  56. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-HK225DAG.js} +1 -1
  57. package/dist/bundle/{chunk-5SJZDEIO.js → chunk-HRATXUFH.js} +20 -20
  58. package/dist/bundle/{chunk-TZ75K6R7.js → chunk-HWUPU6WX.js} +8 -8
  59. package/dist/bundle/{chunk-3RLRJHAI.js → chunk-HYXXMSVD.js} +7688 -8301
  60. package/dist/bundle/{chunk-EL2E3ABX.js → chunk-I7YSHUPW.js} +13 -13
  61. package/dist/bundle/{chunk-EWUQIUTB.js → chunk-IFTX7AQU.js} +5 -5
  62. package/dist/bundle/{chunk-BBJVV4E2.js → chunk-IGNIUDI3.js} +61 -38
  63. package/dist/bundle/{chunk-7JKECODO.js → chunk-ILAQIBEO.js} +1 -11
  64. package/dist/bundle/{chunk-SY2HLH5R.js → chunk-KSJAFMU5.js} +57 -23
  65. package/dist/bundle/{chunk-PB6NWKH3.js → chunk-LINBDWJK.js} +2 -2
  66. package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-LMJBQFW6.js} +6 -6
  67. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-ML3R2UHV.js} +4 -4
  68. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-MXNQZAJQ.js} +2 -2
  69. package/dist/bundle/{chunk-WOUIHZRI.js → chunk-NP7LJATI.js} +15 -67
  70. package/dist/bundle/chunk-OY7TNUEC.js +16 -0
  71. package/dist/bundle/{chunk-2VFAXC6O.js → chunk-P77FL6RY.js} +18 -18
  72. package/dist/bundle/{chunk-I55XYREN.js → chunk-P7PLKNPX.js} +993 -2512
  73. package/dist/bundle/{chunk-3URYKAJP.js → chunk-PAPY6Q6H.js} +1 -1
  74. package/dist/bundle/{chunk-5B5NOAIA.js → chunk-PN4JYURZ.js} +45 -45
  75. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-PR7XD2DI.js} +2 -2
  76. package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-Q5C6YKAY.js} +21 -16
  77. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-QBAOIMVB.js} +1 -1
  78. package/dist/bundle/{chunk-KUQDBWPU.js → chunk-RCTOWLCD.js} +31 -32
  79. package/dist/bundle/{chunk-22SH77TG.js → chunk-REM5WHHQ.js} +64 -64
  80. package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-RHSBXOQM.js} +1 -1
  81. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-RLNZ7NX5.js} +2 -2
  82. package/dist/bundle/chunk-RQNRYF6D.js +170 -0
  83. package/dist/bundle/{chunk-PV3AWPHR.js → chunk-SONPLYV7.js} +5 -5
  84. package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-T5D4OGDC.js} +2 -2
  85. package/dist/bundle/{chunk-25FT44S3.js → chunk-TGS5VPJD.js} +282 -525
  86. package/dist/bundle/chunk-TNKQDS5A.js +335 -0
  87. package/dist/bundle/{chunk-NVDR72GP.js → chunk-VVN6GHAZ.js} +60 -81
  88. package/dist/bundle/{chunk-CDSB7WVG.js → chunk-WJK6KTCS.js} +8 -8
  89. package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-WWE5GO6G.js} +3 -3
  90. package/dist/bundle/{chunk-SYUXKV2E.js → chunk-XOL346TJ.js} +2 -2
  91. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-XZBA6FVH.js} +3 -3
  92. package/dist/bundle/chunk-YCL3SK4T.js +1978 -0
  93. package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-YRUR3E3E.js} +53 -53
  94. package/dist/bundle/{chunk-QJGFQRTL.js → chunk-YZPE72GE.js} +12 -12
  95. package/dist/bundle/{chunk-O6PD7RZY.js → chunk-ZCXWV4XO.js} +4 -4
  96. package/dist/bundle/{chunk-376ZGVUZ.js → chunk-ZHZYGY5R.js} +4 -4
  97. package/dist/bundle/{cli-BS4L3HAP.js → cli-K4D4DIGQ.js} +88 -69
  98. package/dist/bundle/command-contract-V3F452QI.js +43 -0
  99. package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-WREK3QBB.js} +33 -30
  100. package/dist/bundle/decode-SEETPKBH.js +299 -0
  101. package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-SQCEURVK.js} +9 -9
  102. package/dist/bundle/drive.js +11 -11
  103. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-WZ5RKFCX.js} +2 -2
  104. package/dist/bundle/{embed-YNZW5X6M.js → embed-B2UCRZZR.js} +9 -9
  105. package/dist/bundle/{embedder-LRC2PKTS.js → embedder-4R6Z7G7L.js} +12 -12
  106. package/dist/bundle/entry-ORZYRJ5N.js +25 -0
  107. package/dist/bundle/{failure-X6PSLVSO.js → failure-CYNXH3RQ.js} +4 -4
  108. package/dist/bundle/first-run-KAKA6KBY.js +31 -0
  109. package/dist/bundle/first-screen-R645UHRH.js +41 -0
  110. package/dist/bundle/google-BSO3YB7N.js +45 -0
  111. package/dist/bundle/{google-api-7JDZDCWE.js → google-api-SAND2F7L.js} +70 -62
  112. package/dist/bundle/grants-PLNFYARD.js +118 -0
  113. package/dist/bundle/{identity-E43WKN5F.js → identity-JVVGS4U6.js} +6 -6
  114. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-JSMTSB22.js} +1 -1
  115. package/dist/bundle/{login-RBDJPQAG.js → login-6WG3YBDU.js} +78 -70
  116. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
  117. package/dist/bundle/meeting-combined-SUKMFK3F.js +27 -0
  118. package/dist/bundle/meeting-model-S4YGKIFI.js +29 -0
  119. package/dist/bundle/meeting-semantic-5U7JQCFF.js +25 -0
  120. package/dist/bundle/{node-IEVT2FSJ.js → node-VJMVHOWD.js} +2 -2
  121. package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-DCNT3HVE.js} +10 -10
  122. package/dist/bundle/oauth-KCMNQ3ZP.js +22 -0
  123. package/dist/bundle/{open-TZ5H7NYM.js → open-NFOEHVW7.js} +8 -8
  124. package/dist/bundle/{openai-XF2KB7W2.js → openai-D47WY7EC.js} +32 -30
  125. package/dist/bundle/{process-6Q23D3TO.js → process-Q2FRU5VA.js} +1 -1
  126. package/dist/bundle/{program-D5XWOHV5.js → program-T2AJJQEM.js} +1332 -1331
  127. package/dist/bundle/{prompt-KUC5D4GX.js → prompt-YJSDABXN.js} +8 -8
  128. package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-WEHPCSJX.js} +5 -5
  129. package/dist/bundle/{recognize-DPFW7HO3.js → recognize-6OBEIEB3.js} +7 -7
  130. package/dist/bundle/{remote-MODTSUNH.js → remote-3SL2QJ7T.js} +13 -13
  131. package/dist/bundle/{rerank-JK7SERLE.js → rerank-L6F5SLIB.js} +10 -10
  132. package/dist/bundle/{serve-BV2WHZLW.js → serve-GYSWIWH4.js} +12 -12
  133. package/dist/bundle/server-BI46BSRE.js +80 -0
  134. package/dist/bundle/{server-N3WPEU7Z.js → server-GWWP3RIT.js} +54 -46
  135. package/dist/bundle/{services-SV6CFUCS.js → services-BDQBRXT5.js} +79 -54
  136. package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-ZSZGAUYB.js} +9 -9
  137. package/dist/bundle/{start-C6EXYXAL.js → start-BJ275RUK.js} +7 -7
  138. package/dist/bundle/{state-RAZIREVG.js → state-HLNGFI2T.js} +9 -9
  139. package/dist/bundle/{store-2DLGLYS6.js → store-I43KZNJW.js} +31 -26
  140. package/dist/bundle/{store-DQKJKX2G.js → store-OSRTGYGI.js} +23 -19
  141. package/dist/bundle/store-maintenance-command-FO7LEVSL.js +72 -0
  142. package/dist/bundle/tokens-DB7O7QNB.js +118 -0
  143. package/dist/catalog.d.ts +0 -28
  144. package/dist/catalog.d.ts.map +1 -1
  145. package/dist/catalog.js +0 -82
  146. package/dist/catalog.js.map +1 -1
  147. package/dist/commands/catalog.d.ts +3 -8
  148. package/dist/commands/catalog.d.ts.map +1 -1
  149. package/dist/commands/catalog.js +36 -109
  150. package/dist/commands/catalog.js.map +1 -1
  151. package/dist/commands/context.d.ts +3 -0
  152. package/dist/commands/context.d.ts.map +1 -1
  153. package/dist/commands/context.js +20 -0
  154. package/dist/commands/context.js.map +1 -1
  155. package/dist/commands/documents.d.ts.map +1 -1
  156. package/dist/commands/documents.js +30 -72
  157. package/dist/commands/documents.js.map +1 -1
  158. package/dist/commands/folders.d.ts +1 -1
  159. package/dist/commands/folders.d.ts.map +1 -1
  160. package/dist/commands/folders.js +45 -48
  161. package/dist/commands/folders.js.map +1 -1
  162. package/dist/commands/knowledge.d.ts +4 -21
  163. package/dist/commands/knowledge.d.ts.map +1 -1
  164. package/dist/commands/knowledge.js +3 -241
  165. package/dist/commands/knowledge.js.map +1 -1
  166. package/dist/commands/mirrors.d.ts +2 -2
  167. package/dist/commands/mirrors.d.ts.map +1 -1
  168. package/dist/commands/mirrors.js +46 -202
  169. package/dist/commands/mirrors.js.map +1 -1
  170. package/dist/commands/search.d.ts +1 -3
  171. package/dist/commands/search.d.ts.map +1 -1
  172. package/dist/commands/search.js +20 -42
  173. package/dist/commands/search.js.map +1 -1
  174. package/dist/commands/sync.d.ts.map +1 -1
  175. package/dist/commands/sync.js +36 -53
  176. package/dist/commands/sync.js.map +1 -1
  177. package/dist/contract-overrides.d.ts +0 -2
  178. package/dist/contract-overrides.d.ts.map +1 -1
  179. package/dist/contract-overrides.js +0 -317
  180. package/dist/contract-overrides.js.map +1 -1
  181. package/dist/knowledge.d.ts +1 -1
  182. package/dist/knowledge.d.ts.map +1 -1
  183. package/dist/knowledge.js +4 -3
  184. package/dist/knowledge.js.map +1 -1
  185. package/dist/list-queries.d.ts +0 -31
  186. package/dist/list-queries.d.ts.map +1 -1
  187. package/dist/list-queries.js +0 -36
  188. package/dist/list-queries.js.map +1 -1
  189. package/dist/program.d.ts.map +1 -1
  190. package/dist/program.js +2 -3
  191. package/dist/program.js.map +1 -1
  192. package/dist/provider-json.d.ts.map +1 -1
  193. package/dist/provider-json.js +5 -5
  194. package/dist/provider-json.js.map +1 -1
  195. package/dist/reasons.d.ts.map +1 -1
  196. package/dist/reasons.js +0 -10
  197. package/dist/reasons.js.map +1 -1
  198. package/dist/version.d.ts +1 -1
  199. package/dist/version.js +1 -1
  200. package/package.json +3 -3
  201. package/dist/bundle/command-contract-HYURWSD6.js +0 -40
  202. package/dist/bundle/decode-E2NM5SSM.js +0 -165
  203. package/dist/bundle/entry-2IMSWRJU.js +0 -25
  204. package/dist/bundle/first-run-7CPHQDM5.js +0 -30
  205. package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
  206. package/dist/bundle/google-WDKDBDD4.js +0 -45
  207. package/dist/bundle/grants-AU25GWKF.js +0 -110
  208. package/dist/bundle/oauth-3JGSN47Z.js +0 -22
  209. package/dist/bundle/server-6YDI4Y36.js +0 -72
  210. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
  211. package/dist/bundle/tokens-LY3WML55.js +0 -110
  212. package/dist/knowledge-query.d.ts +0 -77
  213. package/dist/knowledge-query.d.ts.map +0 -1
  214. package/dist/knowledge-query.js +0 -104
  215. package/dist/knowledge-query.js.map +0 -1
  216. package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
  217. package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -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-UPCEHSIZ.js";
5
+ } from "./chunk-Q5C6YKAY.js";
6
6
  import {
7
7
  writeSecurely
8
- } from "./chunk-5SJZDEIO.js";
8
+ } from "./chunk-HRATXUFH.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-JRFKCYMW.js";
24
+ } from "./chunk-HHAZ6DCY.js";
25
25
  import {
26
26
  CliError,
27
27
  isCliError
28
- } from "./chunk-EA2OB75T.js";
28
+ } from "./chunk-54NDYVZA.js";
29
29
  import {
30
30
  __name
31
31
  } from "./chunk-ZVVMGPBJ.js";
32
32
 
33
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/documents/blocks.js
33
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/block-diff.js
81
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
227
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/ingestion.js
262
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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)
@@ -270,28 +270,6 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
270
270
  const found = (await store.notes.folders()).find((item) => item.name === name);
271
271
  return found ?? (create ? await store.notes.addFolder({ name, format: "markdown" }) : void 0);
272
272
  }, "folder");
273
- const documents = /* @__PURE__ */ new Map();
274
- const cached = /* @__PURE__ */ __name(async (principal) => {
275
- const known = documents.get(principal);
276
- if (known)
277
- return known;
278
- const notes = /* @__PURE__ */ new Map();
279
- const selected = await folder(principal, false);
280
- if (selected) {
281
- for (let offset = 0; ; offset += 500) {
282
- const page = await store.notes.notes({ folderId: selected.id, source: "file", limit: 500, offset });
283
- for (const note of page.items)
284
- if (note.path)
285
- notes.set(note.path, note);
286
- if (!page.hasMore)
287
- break;
288
- if (offset >= 1e4)
289
- throw new CliError("provider_error", "local document listing exceeded its bound");
290
- }
291
- }
292
- documents.set(principal, notes);
293
- return notes;
294
- }, "cached");
295
273
  const stale = /* @__PURE__ */ __name(async (ref) => {
296
274
  for (const status of ["proposed", "confirmed"]) {
297
275
  for (let batch = 0; ; batch++) {
@@ -308,23 +286,20 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
308
286
  return {
309
287
  catalog: {
310
288
  import: /* @__PURE__ */ __name(async (principal, files) => {
311
- if (files.length > 1e4)
312
- throw new CliError("validation_error", "catalog scope exceeds 10000 entries", {
313
- reason: "catalog.scope-limit"
314
- });
315
289
  const selected = await folder(principal, true);
316
290
  if (!selected)
317
291
  throw new CliError("configuration_error", "catalog collection could not be registered");
318
292
  for (let start = 0; start < files.length; start += 200) {
319
- await store.catalog.upsert(selected.id, files.slice(start, start + 200).map(options.catalogInput));
320
- }
321
- for (const file of files) {
322
- const entry = await store.catalog.get(selected.id, options.externalId(file.id));
323
- if (entry)
324
- await options.observed?.(principal, file, entry.ref.slice("document:".length));
293
+ const chunk = files.slice(start, start + 200);
294
+ await store.catalog.upsert(selected.id, chunk.map(options.catalogInput));
295
+ if (options.observed)
296
+ for (const file of chunk) {
297
+ const entry = await store.catalog.get(selected.id, options.externalId(file.id));
298
+ if (entry)
299
+ await options.observed(principal, file, entry.ref.slice("document:".length));
300
+ }
325
301
  }
326
302
  const retired = await store.catalog.reconcile(selected.id, files.map((file) => options.externalId(file.id)));
327
- documents.delete(principal);
328
303
  return { entries: files.length, retired };
329
304
  }, "import"),
330
305
  get: /* @__PURE__ */ __name(async (principal, id) => {
@@ -351,14 +326,13 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
351
326
  const selected = await folder(principal, true);
352
327
  if (!selected)
353
328
  throw new Error("folder registration failed");
354
- const notes = await cached(principal);
355
329
  const path = options.externalId(content.metadata.id);
356
- const before = notes.get(path);
330
+ const before = await store.notes.fileNote(selected.id, path);
357
331
  if (before && before.contentHash !== hash)
358
332
  await stale(before.ref);
359
333
  const { note } = await store.notes.saveFileNote({
360
334
  folderId: selected.id,
361
- path: options.externalId(content.metadata.id),
335
+ path,
362
336
  title: content.metadata.name,
363
337
  text: content.text,
364
338
  contentHash: hash,
@@ -366,27 +340,24 @@ var documentIngestion = /* @__PURE__ */ __name((store, options) => {
366
340
  });
367
341
  await store.catalog.upsert(selected.id, [options.catalogInput(content.metadata)]);
368
342
  await options.observed?.(principal, content.metadata, note.id);
369
- notes.set(path, note);
370
343
  return note.ref;
371
344
  }, "save"),
372
345
  remove: /* @__PURE__ */ __name(async (principal, id) => {
373
346
  const selected = await folder(principal, false);
374
347
  if (selected) {
375
- const notes = await cached(principal);
376
348
  const path = options.externalId(id);
377
- const note = notes.get(path);
349
+ const note = await store.notes.fileNote(selected.id, path);
378
350
  const retired = note ? void 0 : await store.catalog.get(selected.id, path, true);
379
351
  const ref = note?.ref ?? retired?.ref;
380
352
  if (ref)
381
353
  await stale(ref);
382
354
  await store.notes.deleteFileNotes(selected.id, [path]);
383
- notes.delete(path);
384
355
  }
385
356
  }, "remove")
386
357
  };
387
358
  }, "documentIngestion");
388
359
 
389
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/knowledge.js
360
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/knowledge.js
390
361
  var writer = /* @__PURE__ */ __name((by) => {
391
362
  if (by === void 0)
392
363
  throw new CliError("validation_error", "name who writes it: the owner or an agent; there is no default", {
@@ -541,10 +512,10 @@ var documentKnowledge = /* @__PURE__ */ __name((store, folder) => {
541
512
  return port;
542
513
  }, "documentKnowledge");
543
514
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/documents/markdown-blocks.js
515
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/documents/markdown-blocks.js
545
516
  var parser;
546
517
  var loadParser = /* @__PURE__ */ __name(() => parser ??= Promise.all([
547
- import("./mdast-util-from-markdown-CE73EWJ2.js"),
518
+ import("./mdast-util-from-markdown-FXEPSNER.js"),
548
519
  import("./mdast-util-gfm-SZM5GBDF.js"),
549
520
  import("./micromark-extension-gfm-GRL24TU6.js")
550
521
  ]).then(([{ fromMarkdown }, { gfmFromMarkdown }, { gfm }]) => (markdown) => fromMarkdown(markdown, { extensions: [gfm()], mdastExtensions: [gfmFromMarkdown()] })), "loadParser");
@@ -666,7 +637,7 @@ var placedMarkdownBlocks = /* @__PURE__ */ __name(async (markdown) => {
666
637
  return blocks(tree.children);
667
638
  }, "placedMarkdownBlocks");
668
639
 
669
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/markdown-splice.js
640
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/markdown-splice.js
670
641
  var escapeText = /* @__PURE__ */ __name((text) => text.replace(/[\\`*_[\]<>~|]/g, "\\$&"), "escapeText");
671
642
  var codeSpan = /* @__PURE__ */ __name((text) => {
672
643
  const longest = (text.match(/`+/g) ?? []).reduce((most, run) => Math.max(most, run.length), 0);
@@ -852,15 +823,15 @@ var columnsBefore = /* @__PURE__ */ __name((placed, index) => {
852
823
  return columns;
853
824
  }, "columnsBefore");
854
825
 
855
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
826
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
856
827
  import { watch } from "node:fs";
857
828
 
858
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
829
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
859
830
  import { createHash as createHash2 } from "node:crypto";
860
831
  import { mkdirSync, readFileSync } from "node:fs";
861
832
  import { join as join2 } from "node:path";
862
833
 
863
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/push.js
834
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/push.js
864
835
  import { createHash, randomUUID } from "node:crypto";
865
836
  import { createReadStream } from "node:fs";
866
837
  import { chmod, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
@@ -1112,7 +1083,7 @@ var pushDocuments = /* @__PURE__ */ __name(async (options) => {
1112
1083
  return result;
1113
1084
  }, "pushDocuments");
1114
1085
 
1115
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
1086
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
1116
1087
  var mirrorId = /* @__PURE__ */ __name((root, folder) => createHash2("sha256").update(JSON.stringify([root, folder])).digest("hex").slice(0, 8), "mirrorId");
1117
1088
  var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
1118
1089
  var stateSchema = /* @__PURE__ */ __name((kinds) => object({
@@ -1234,7 +1205,7 @@ var syncMirrors = /* @__PURE__ */ __name(async (options) => {
1234
1205
  };
1235
1206
  }, "syncMirrors");
1236
1207
 
1237
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
1208
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/mirror-watch.js
1238
1209
  var sleep = /* @__PURE__ */ __name((milliseconds, signal) => new Promise((resolve) => {
1239
1210
  const finish = /* @__PURE__ */ __name(() => {
1240
1211
  clearTimeout(timer);
@@ -1373,7 +1344,7 @@ async function* watchMirrors(sync, options) {
1373
1344
  }
1374
1345
  __name(watchMirrors, "watchMirrors");
1375
1346
 
1376
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/proposals.js
1347
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/proposals.js
1377
1348
  var extractDocumentMemories = /* @__PURE__ */ __name(async (options) => {
1378
1349
  const source = options.read();
1379
1350
  const text = options.tab ? source.snapshot.tabs.find((tab) => tab.id === options.tab)?.text : source.snapshot.text;
@@ -1423,10 +1394,10 @@ Snapshot: ${source.hash}`;
1423
1394
  };
1424
1395
  }, "extractDocumentMemories");
1425
1396
 
1426
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1397
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1427
1398
  import { createHash as createHash4 } from "node:crypto";
1428
1399
 
1429
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/documents/scope.js
1400
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/documents/scope.js
1430
1401
  var within = /* @__PURE__ */ __name((file, roots, folders, seen = /* @__PURE__ */ new Set()) => {
1431
1402
  if (file.trashed)
1432
1403
  return false;
@@ -1448,7 +1419,7 @@ var inScope = /* @__PURE__ */ __name((file, roots, folders, matched = /* @__PURE
1448
1419
  return matched.has(file.id) || within(file, roots, folders);
1449
1420
  }, "inScope");
1450
1421
 
1451
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/documents/catalog.js
1422
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/documents/catalog.js
1452
1423
  var catalogFiles = /* @__PURE__ */ __name((state, roots, query) => {
1453
1424
  const folders = state.pending?.folders ?? state.folders;
1454
1425
  const matched = new Set(state.pending?.matched ?? state.matched ?? []);
@@ -1467,15 +1438,15 @@ var catalogFiles = /* @__PURE__ */ __name((state, roots, query) => {
1467
1438
  return [...files.values()].filter((file) => inScope(file, roots, folders, matched, query));
1468
1439
  }, "catalogFiles");
1469
1440
 
1470
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/plan.js
1441
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/plan.js
1471
1442
  import { createHash as createHash3 } from "node:crypto";
1472
- var scopeHash = /* @__PURE__ */ __name((roots, query) => createHash3("sha256").update(JSON.stringify(query ? [[...roots].sort(), query.mode, query.key] : [...roots].sort())).digest("hex"), "scopeHash");
1443
+ var scopeHash = /* @__PURE__ */ __name((roots, query, pages = false) => createHash3("sha256").update(JSON.stringify(query || pages ? [[...roots].sort(), query?.mode, query?.key, ...pages ? ["pages"] : []] : [...roots].sort())).digest("hex"), "scopeHash");
1473
1444
  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");
1474
1445
  var SAVE_EVERY_MS = 2e3;
1475
1446
  var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots, limit, pictures, abandoned = [], walks) => {
1476
1447
  const { isFolder, skipReason, retryable, maxEntries: MAX_ENTRIES, errorOf, query } = options;
1477
1448
  const tooManyEntries = /* @__PURE__ */ __name(() => options.limitError?.() ?? new CliError("validation_error", `selected folders exceed the ${MAX_ENTRIES} entry limit`), "tooManyEntries");
1478
- const scope = scopeHash(roots, query);
1449
+ const scope = scopeHash(roots, query, options.isDocument !== void 0);
1479
1450
  if (!roots.length && query?.mode !== "include")
1480
1451
  return {
1481
1452
  scope,
@@ -1498,6 +1469,14 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1498
1469
  for (const skipped2 of state.skipped)
1499
1470
  if (skipped2.file)
1500
1471
  files.set(skipped2.id, skipped2.file);
1472
+ const keep = /* @__PURE__ */ __name((file) => {
1473
+ files.set(file.id, file);
1474
+ changed.add(file.id);
1475
+ }, "keep");
1476
+ const container = /* @__PURE__ */ __name((file) => {
1477
+ if (options.isDocument?.(file))
1478
+ keep(file);
1479
+ }, "container");
1501
1480
  const visited = /* @__PURE__ */ new Set();
1502
1481
  let discovered = 0;
1503
1482
  const crawl = /* @__PURE__ */ __name(async (folder, ancestry = /* @__PURE__ */ new Set()) => {
@@ -1510,12 +1489,11 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1510
1489
  for (const file of await source.children(folder.id)) {
1511
1490
  if (++discovered > MAX_ENTRIES)
1512
1491
  throw tooManyEntries();
1513
- if (isFolder(file))
1492
+ if (isFolder(file)) {
1493
+ container(file);
1514
1494
  await crawl(file, /* @__PURE__ */ new Set([...ancestry, folder.id]));
1515
- else {
1516
- files.set(file.id, file);
1517
- changed.add(file.id);
1518
- }
1495
+ } else
1496
+ keep(file);
1519
1497
  }
1520
1498
  }, "crawl");
1521
1499
  let finalCursor = cursor;
@@ -1554,6 +1532,8 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1554
1532
  const folder = step.folder ?? await source.metadata(step.id);
1555
1533
  if (!step.folder && (!isFolder(folder) || folder.trashed))
1556
1534
  throw new CliError("validation_error", "configured root is not an accessible folder");
1535
+ if (!step.folder)
1536
+ container(folder);
1557
1537
  const children = await source.children(folder.id);
1558
1538
  if (discovered + children.length > MAX_ENTRIES)
1559
1539
  throw tooManyEntries();
@@ -1563,12 +1543,11 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1563
1543
  folders[folder.id] = folder;
1564
1544
  const nested = [];
1565
1545
  for (const file of children)
1566
- if (isFolder(file))
1546
+ if (isFolder(file)) {
1547
+ container(file);
1567
1548
  nested.push({ id: file.id, ancestry: [...step.ancestry, folder.id], folder: file });
1568
- else {
1569
- files.set(file.id, file);
1570
- changed.add(file.id);
1571
- }
1549
+ } else
1550
+ keep(file);
1572
1551
  for (const entry of nested.reverse())
1573
1552
  walk.stack.push(entry);
1574
1553
  if ((options.now ?? Date.now)() - savedAt > SAVE_EVERY_MS)
@@ -1591,10 +1570,10 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1591
1570
  } else if (change.file && isFolder(change.file)) {
1592
1571
  folders[change.id] = change.file;
1593
1572
  entering.push(change.file);
1594
- } else if (change.file) {
1595
- files.set(change.id, change.file);
1596
- changed.add(change.id);
1597
- } else if (state.documents[change.id] || folders[change.id])
1573
+ container(change.file);
1574
+ } else if (change.file)
1575
+ keep(change.file);
1576
+ else if (state.documents[change.id] || folders[change.id])
1598
1577
  throw new CliError("invalid_response", "known source changed without metadata; checkpoint preserved");
1599
1578
  }
1600
1579
  for (const root of roots) {
@@ -1619,7 +1598,7 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1619
1598
  }
1620
1599
  const matched = /* @__PURE__ */ new Set();
1621
1600
  for (const file of found) {
1622
- if (isFolder(file) || file.trashed || !query?.matches(file) || matched.has(file.id))
1601
+ if (isFolder(file) && !options.isDocument?.(file) || file.trashed || !query?.matches(file) || matched.has(file.id))
1623
1602
  continue;
1624
1603
  if (!files.has(file.id) && ++discovered > MAX_ENTRIES)
1625
1604
  throw tooManyEntries();
@@ -1673,7 +1652,7 @@ var planDocuments = /* @__PURE__ */ __name(async (options, source, state, roots,
1673
1652
  };
1674
1653
  }, "planDocuments");
1675
1654
 
1676
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1655
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
1677
1656
  var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
1678
1657
  var SAVE_EVERY_MS2 = 2e3;
1679
1658
  var SAVE_EVERY_ITEMS = 25;
@@ -1709,7 +1688,7 @@ var syncDocuments = /* @__PURE__ */ __name(async (options) => {
1709
1688
  const state = statePort.read();
1710
1689
  if (state.principal !== principal)
1711
1690
  throw new CliError("configuration_error", "sync state belongs to another source account");
1712
- const currentScope = scopeHash(profile.roots, query);
1691
+ const currentScope = scopeHash(profile.roots, query, options.isDocument !== void 0);
1713
1692
  const abandoned = state.pending && (state.pending.scope !== currentScope || rescan) ? state.pending.jobs.map((job) => job.id) : [];
1714
1693
  if (state.pending?.scope !== currentScope || rescan)
1715
1694
  delete state.pending;
@@ -2,26 +2,26 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  storePath
5
- } from "./chunk-RWQ7T4Y5.js";
5
+ } from "./chunk-T5D4OGDC.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-5SJZDEIO.js";
9
+ } from "./chunk-HRATXUFH.js";
10
10
  import {
11
11
  singleLine
12
- } from "./chunk-HCZYJMBP.js";
12
+ } from "./chunk-ABZ2NYDT.js";
13
13
  import {
14
14
  CliError
15
- } from "./chunk-EA2OB75T.js";
15
+ } from "./chunk-54NDYVZA.js";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/shared-config.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/store/shared-config.js
21
21
  import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
22
22
  import { dirname, join, resolve } from "node:path";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/config-repair.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/domain/config-repair.js
25
25
  var REPAIR_WORDS = {
26
26
  byte_order_mark: "an invisible byte-order mark at the start",
27
27
  comment: "a comment, which JSON does not allow",
@@ -305,7 +305,7 @@ var explainBrokenJson = /* @__PURE__ */ __name((text, result) => {
305
305
  return `line ${line}, column ${column}: ${why}${around(line)}; likely fix: ${fix ?? "correct that part by hand"}`;
306
306
  }, "explainBrokenJson");
307
307
 
308
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
308
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
309
309
  var DEFAULT_TASK_CATEGORIES = [
310
310
  {
311
311
  name: "taxes",
@@ -1060,7 +1060,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
1060
1060
  }
1061
1061
  }, "storedTaskCategories");
1062
1062
 
1063
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/shared-config.js
1063
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/store/shared-config.js
1064
1064
  var SECTION = "task_categories";
1065
1065
  var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
1066
1066
  const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  alive
5
- } from "./chunk-WQOGHND4.js";
5
+ } from "./chunk-4WK26MPY.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-5SJZDEIO.js";
9
+ } from "./chunk-HRATXUFH.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/background/lock.js
15
15
  import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  REASONS
5
- } from "./chunk-7JKECODO.js";
5
+ } from "./chunk-ILAQIBEO.js";
6
6
 
7
7
  // dist/version.js
8
- var VERSION = "0.69.0";
8
+ var VERSION = "0.70.0";
9
9
 
10
10
  // dist/identity.js
11
11
  var PACKAGE = "@wirecat/drive-cli";
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-2Q4CB4EI.js";
7
+ } from "./chunk-MXNQZAJQ.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-EA2OB75T.js";
10
+ } from "./chunk-54NDYVZA.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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;