@wirecat/drive-cli 0.68.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.
- package/contracts/wirecat.json +14 -13
- package/dist/age.d.ts +0 -36
- package/dist/age.d.ts.map +1 -1
- package/dist/age.js +0 -22
- package/dist/age.js.map +1 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-BU6XUFUP.js → all-profiles-FW3GK3QO.js} +24 -34
- package/dist/bundle/{anthropic-ZP5B7S2Z.js → anthropic-QVKJT3II.js} +8 -8
- package/dist/bundle/{app-server-EB4DH6T7.js → app-server-QU73RD5R.js} +68 -76
- package/dist/bundle/{bun-PWMM6L45.js → bun-5XCD5CBB.js} +2 -2
- package/dist/bundle/{bun-sqlite-6VPR2SVC.js → bun-sqlite-TIGSVNSV.js} +9 -9
- package/dist/bundle/{chunk-7BXVI7XF.js → chunk-2SBC4DVV.js} +4 -4
- package/dist/bundle/{chunk-UFPRP7MG.js → chunk-3AHBZP33.js} +10 -15
- package/dist/bundle/{chunk-QRSPFCRY.js → chunk-3CHW7JGR.js} +17 -17
- package/dist/bundle/chunk-3TCMANIM.js +387 -0
- package/dist/bundle/{chunk-EOC7RHJ2.js → chunk-3UWRAIWA.js} +5 -7
- package/dist/bundle/{chunk-5G2BY4B6.js → chunk-3UZ4OH22.js} +32 -31
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-4WK26MPY.js} +1 -1
- package/dist/bundle/{chunk-WUFZGPXX.js → chunk-54BQWRJL.js} +7 -7
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-54NDYVZA.js} +1 -1
- package/dist/bundle/{chunk-QKY24RWV.js → chunk-5JTB4URG.js} +12 -12
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
- package/dist/bundle/{chunk-JMZQBRRZ.js → chunk-6BMTW5A6.js} +9 -9
- package/dist/bundle/{chunk-CVAJMRRD.js → chunk-6DPOWBKA.js} +6 -6
- package/dist/bundle/{chunk-YUGTJBV3.js → chunk-7C5KENNU.js} +3 -3
- package/dist/bundle/chunk-7DJNURKV.js +823 -0
- package/dist/bundle/{chunk-5TK2YQCO.js → chunk-7IBENBCK.js} +2 -2
- package/dist/bundle/chunk-7QSRODXM.js +259 -0
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-ABZ2NYDT.js} +1 -1
- package/dist/bundle/chunk-AV5UKJZM.js +729 -0
- package/dist/bundle/{chunk-IVOG6T6P.js → chunk-BBFXQPKD.js} +3 -3
- package/dist/bundle/{chunk-BXHFJTU5.js → chunk-BBRMDMIR.js} +3 -3
- package/dist/bundle/{chunk-DYLYH7VE.js → chunk-BD2K2ONK.js} +4 -4
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-BFKFKDPC.js} +1 -1
- package/dist/bundle/{chunk-JZ3MT7IE.js → chunk-BXPC5TFG.js} +2 -2
- package/dist/bundle/chunk-DHX27E5M.js +31 -0
- package/dist/bundle/{chunk-6QR7NKMG.js → chunk-DR57KDAY.js} +109 -5
- package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-DVI72ZQG.js} +1 -1
- package/dist/bundle/{chunk-WGX4DZPW.js → chunk-DVVUJ254.js} +2 -2
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-EDO5LZVF.js} +1 -1
- package/dist/bundle/{chunk-QTRYJZL7.js → chunk-EG62WVR2.js} +6 -6
- package/dist/bundle/{chunk-WCNTDETD.js → chunk-F5KJWRF5.js} +98 -6
- package/dist/bundle/{chunk-D4MVEOU2.js → chunk-FADAOLGB.js} +4 -4
- package/dist/bundle/{chunk-FAMXUI2X.js → chunk-FCSHWUMW.js} +5 -5
- package/dist/bundle/{chunk-O7T3WGCV.js → chunk-FN3RXBO7.js} +6 -6
- package/dist/bundle/{chunk-5W65QTYS.js → chunk-FONIFRYI.js} +4 -4
- package/dist/bundle/{chunk-UUQJVKPB.js → chunk-FVTKFIQH.js} +2340 -1436
- package/dist/bundle/{chunk-7A77GYCE.js → chunk-FYPW7NMH.js} +4 -4
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
- package/dist/bundle/{chunk-GTLXBAJV.js → chunk-GAHIHE4K.js} +3035 -2482
- package/dist/bundle/{chunk-CMWFYZ45.js → chunk-GJZSVSV3.js} +2 -2
- package/dist/bundle/{chunk-QWGEOQHA.js → chunk-GK3BJMGK.js} +1 -1
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-GPDPEHYX.js} +1 -1
- package/dist/bundle/{chunk-KPKIHJIT.js → chunk-GV5DGHSA.js} +4 -4
- package/dist/bundle/{chunk-JRFKCYMW.js → chunk-HHAZ6DCY.js} +23 -6
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-HK225DAG.js} +1 -1
- package/dist/bundle/{chunk-MW46BLWH.js → chunk-HRATXUFH.js} +22 -20
- package/dist/bundle/{chunk-Z5BMYI2V.js → chunk-HWUPU6WX.js} +8 -8
- package/dist/bundle/{chunk-6WAC2LOS.js → chunk-HYXXMSVD.js} +8614 -8597
- package/dist/bundle/{chunk-YYIWPH53.js → chunk-I7YSHUPW.js} +13 -13
- package/dist/bundle/{chunk-MWCPKUU4.js → chunk-IFTX7AQU.js} +5 -5
- package/dist/bundle/{chunk-SOS4U2RF.js → chunk-IGNIUDI3.js} +71 -49
- package/dist/bundle/{chunk-7JKECODO.js → chunk-ILAQIBEO.js} +1 -11
- package/dist/bundle/{chunk-CK2SQ2CE.js → chunk-KSJAFMU5.js} +78 -31
- package/dist/bundle/{chunk-ZSVMZH5O.js → chunk-LINBDWJK.js} +2 -2
- package/dist/bundle/{chunk-43NEDPXB.js → chunk-LMJBQFW6.js} +6 -6
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-ML3R2UHV.js} +4 -4
- package/dist/bundle/{chunk-PGPHEC2X.js → chunk-MXNQZAJQ.js} +2 -2
- package/dist/bundle/{chunk-RT5NT62B.js → chunk-NP7LJATI.js} +16 -70
- package/dist/bundle/chunk-OY7TNUEC.js +16 -0
- package/dist/bundle/{chunk-74NCZKRW.js → chunk-P77FL6RY.js} +18 -18
- package/dist/bundle/chunk-P7PLKNPX.js +3611 -0
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-PAPY6Q6H.js} +1 -1
- package/dist/bundle/{chunk-Q6BD6RUH.js → chunk-PN4JYURZ.js} +102 -57
- package/dist/bundle/{chunk-MOKEB656.js → chunk-PR7XD2DI.js} +2 -2
- package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-Q5C6YKAY.js} +21 -16
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-QBAOIMVB.js} +1 -1
- package/dist/bundle/{chunk-ULNN3LCY.js → chunk-RCTOWLCD.js} +44 -37
- package/dist/bundle/{chunk-7TNQZKRD.js → chunk-REM5WHHQ.js} +77 -76
- package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-RHSBXOQM.js} +1 -1
- package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-RLNZ7NX5.js} +2 -2
- package/dist/bundle/chunk-RQNRYF6D.js +170 -0
- package/dist/bundle/{chunk-PV3AWPHR.js → chunk-SONPLYV7.js} +5 -5
- package/dist/bundle/{chunk-CRIEW4FP.js → chunk-T5D4OGDC.js} +2 -2
- package/dist/bundle/{chunk-MLSXHTUB.js → chunk-TGS5VPJD.js} +1228 -455
- package/dist/bundle/chunk-TNKQDS5A.js +335 -0
- package/dist/bundle/{chunk-DU23ET2O.js → chunk-VVN6GHAZ.js} +60 -81
- package/dist/bundle/{chunk-PWIEOATY.js → chunk-WJK6KTCS.js} +325 -14
- package/dist/bundle/{chunk-U52QE4QV.js → chunk-WWE5GO6G.js} +3 -3
- package/dist/bundle/{chunk-6HFZZ2PW.js → chunk-XOL346TJ.js} +2 -2
- package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-XZBA6FVH.js} +3 -3
- package/dist/bundle/chunk-YCL3SK4T.js +1978 -0
- package/dist/bundle/{chunk-DIZBJLPM.js → chunk-YRUR3E3E.js} +68 -78
- package/dist/bundle/{chunk-EEE4H2PA.js → chunk-YZPE72GE.js} +12 -12
- package/dist/bundle/{chunk-F7KAMSXA.js → chunk-ZCXWV4XO.js} +4 -4
- package/dist/bundle/{chunk-NV75QPML.js → chunk-ZHZYGY5R.js} +4 -4
- package/dist/bundle/{cli-L7P36YUH.js → cli-K4D4DIGQ.js} +137 -88
- package/dist/bundle/command-contract-V3F452QI.js +43 -0
- package/dist/bundle/{command-server-entry-H3VGPOLJ.js → command-server-entry-WREK3QBB.js} +33 -31
- package/dist/bundle/decode-SEETPKBH.js +299 -0
- package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-SQCEURVK.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-WZ5RKFCX.js} +2 -2
- package/dist/bundle/{embed-WUKOASQG.js → embed-B2UCRZZR.js} +9 -9
- package/dist/bundle/{embedder-UBRAXRDZ.js → embedder-4R6Z7G7L.js} +12 -12
- package/dist/bundle/entry-ORZYRJ5N.js +25 -0
- package/dist/bundle/{failure-X6PSLVSO.js → failure-CYNXH3RQ.js} +4 -4
- package/dist/bundle/first-run-KAKA6KBY.js +31 -0
- package/dist/bundle/first-screen-R645UHRH.js +41 -0
- package/dist/bundle/google-BSO3YB7N.js +45 -0
- package/dist/bundle/{google-api-SQQ4BSNR.js → google-api-SAND2F7L.js} +70 -63
- package/dist/bundle/grants-PLNFYARD.js +118 -0
- package/dist/bundle/{identity-SRL6RSU2.js → identity-JVVGS4U6.js} +6 -6
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-JSMTSB22.js} +1 -1
- package/dist/bundle/{login-N243GGEE.js → login-6WG3YBDU.js} +78 -71
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
- package/dist/bundle/meeting-combined-SUKMFK3F.js +27 -0
- package/dist/bundle/meeting-model-S4YGKIFI.js +29 -0
- package/dist/bundle/meeting-semantic-5U7JQCFF.js +25 -0
- package/dist/bundle/{node-BZDMUFTW.js → node-VJMVHOWD.js} +2 -2
- package/dist/bundle/{node-sqlite-SZQCCMV2.js → node-sqlite-DCNT3HVE.js} +10 -10
- package/dist/bundle/oauth-KCMNQ3ZP.js +22 -0
- package/dist/bundle/{open-RVTPKDA3.js → open-NFOEHVW7.js} +8 -8
- package/dist/bundle/{openai-6NN63BMH.js → openai-D47WY7EC.js} +32 -30
- package/dist/bundle/{process-756VBE7E.js → process-Q2FRU5VA.js} +1 -1
- package/dist/bundle/{program-B4QBJYB5.js → program-T2AJJQEM.js} +1327 -1329
- package/dist/bundle/{prompt-HGP2DSRW.js → prompt-YJSDABXN.js} +8 -8
- package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-WEHPCSJX.js} +5 -5
- package/dist/bundle/{recognize-26SHB7HI.js → recognize-6OBEIEB3.js} +7 -7
- package/dist/bundle/{remote-Z4PWHZ5N.js → remote-3SL2QJ7T.js} +13 -13
- package/dist/bundle/{rerank-QHJZJK3Q.js → rerank-L6F5SLIB.js} +10 -10
- package/dist/bundle/{serve-MYJW5IEM.js → serve-GYSWIWH4.js} +12 -12
- package/dist/bundle/server-BI46BSRE.js +80 -0
- package/dist/bundle/{server-XFW3V7CR.js → server-GWWP3RIT.js} +62 -53
- package/dist/bundle/{services-IQG2RVTO.js → services-BDQBRXT5.js} +91 -51
- package/dist/bundle/{sqlite-runtime-X4GB5PBV.js → sqlite-runtime-ZSZGAUYB.js} +9 -9
- package/dist/bundle/{start-C6EXYXAL.js → start-BJ275RUK.js} +7 -7
- package/dist/bundle/{state-ATQK2X3W.js → state-HLNGFI2T.js} +9 -9
- package/dist/bundle/{store-QUBUPK6F.js → store-I43KZNJW.js} +35 -26
- package/dist/bundle/{store-MEHEUOJH.js → store-OSRTGYGI.js} +23 -19
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +72 -0
- package/dist/bundle/tokens-DB7O7QNB.js +118 -0
- package/dist/catalog.d.ts +0 -28
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +0 -82
- package/dist/catalog.js.map +1 -1
- package/dist/commands/catalog.d.ts +3 -8
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +36 -109
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +20 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +30 -72
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/folders.d.ts +1 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +45 -48
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -21
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +3 -241
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/mirrors.d.ts +2 -2
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +46 -202
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/search.d.ts +1 -3
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +20 -42
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +36 -53
- package/dist/commands/sync.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -317
- package/dist/contract-overrides.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +4 -3
- package/dist/knowledge.js.map +1 -1
- package/dist/list-queries.d.ts +0 -31
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +0 -36
- package/dist/list-queries.js.map +1 -1
- package/dist/policy.d.ts +1 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -3
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -3
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +5 -5
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -10
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-2UHQVRH2.js +0 -1235
- package/dist/bundle/chunk-AXYG2DDY.js +0 -4721
- package/dist/bundle/chunk-J5LXL435.js +0 -1316
- package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
- package/dist/bundle/command-contract-EYFGMKIG.js +0 -41
- package/dist/bundle/decode-JEU6JWCV.js +0 -165
- package/dist/bundle/entry-C4NUQFTF.js +0 -25
- package/dist/bundle/first-run-PKHBS7B4.js +0 -30
- package/dist/bundle/first-screen-QOVOM4BF.js +0 -39
- package/dist/bundle/google-XXHSMTVK.js +0 -45
- package/dist/bundle/grants-2U4JVT6O.js +0 -111
- package/dist/bundle/oauth-CMAFXX6A.js +0 -22
- package/dist/bundle/server-HBZPIHDX.js +0 -74
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +0 -65
- package/dist/bundle/tokens-A2GP4F34.js +0 -111
- package/dist/knowledge-query.d.ts +0 -77
- package/dist/knowledge-query.d.ts.map +0 -1
- package/dist/knowledge-query.js +0 -104
- package/dist/knowledge-query.js.map +0 -1
- package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
- 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-
|
|
5
|
+
} from "./chunk-Q5C6YKAY.js";
|
|
6
6
|
import {
|
|
7
7
|
writeSecurely
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
24
|
+
} from "./chunk-HHAZ6DCY.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError,
|
|
27
27
|
isCliError
|
|
28
|
-
} from "./chunk-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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.
|
|
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;
|