@wirecat/drive-cli 0.66.0 → 0.68.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 +29 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-WCQLIHUG.js → all-profiles-BU6XUFUP.js} +14 -14
- package/dist/bundle/{anthropic-5RJMB6O7.js → anthropic-ZP5B7S2Z.js} +8 -8
- package/dist/bundle/{app-server-3RGYXPKG.js → app-server-EB4DH6T7.js} +60 -56
- package/dist/bundle/{bun-L34VEKGG.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-H6IAXQXI.js → bun-sqlite-6VPR2SVC.js} +9 -9
- package/dist/bundle/{chunk-HPKE2GDP.js → chunk-2UHQVRH2.js} +18 -18
- package/dist/bundle/{chunk-2AF77WMH.js → chunk-2VYEGKQ3.js} +1 -1
- package/dist/bundle/{chunk-TAHISPDE.js → chunk-43NEDPXB.js} +39 -35
- package/dist/bundle/{chunk-OT7SQQJK.js → chunk-5G2BY4B6.js} +17 -17
- package/dist/bundle/{chunk-NYZS2LKF.js → chunk-5TK2YQCO.js} +2 -2
- package/dist/bundle/{chunk-5XLU4NN6.js → chunk-5W65QTYS.js} +4 -4
- package/dist/bundle/{chunk-YTIPTHEE.js → chunk-6HFZZ2PW.js} +2 -2
- package/dist/bundle/{chunk-GY4DAJSK.js → chunk-6QR7NKMG.js} +35 -6
- package/dist/bundle/{chunk-BIJW6AYA.js → chunk-6WAC2LOS.js} +3698 -3594
- package/dist/bundle/{chunk-VR3YKXHL.js → chunk-74NCZKRW.js} +33 -20
- package/dist/bundle/{chunk-5HVJK3ZJ.js → chunk-7A77GYCE.js} +4 -4
- package/dist/bundle/{chunk-7ZGJRVBH.js → chunk-7BXVI7XF.js} +4 -4
- package/dist/bundle/{chunk-UNTIVT47.js → chunk-7JKECODO.js} +1 -1
- package/dist/bundle/{chunk-FKKPVPZR.js → chunk-7TNQZKRD.js} +57 -57
- package/dist/bundle/{chunk-3SDJIMZB.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-QJ57PV55.js → chunk-AXYG2DDY.js} +136 -90
- package/dist/bundle/{chunk-T3ULDA7C.js → chunk-BXHFJTU5.js} +3 -3
- package/dist/bundle/{chunk-HPSHQVJU.js → chunk-CK2SQ2CE.js} +28 -22
- package/dist/bundle/{chunk-KRG5X5PH.js → chunk-CMWFYZ45.js} +2 -2
- package/dist/bundle/{chunk-3QFUDXMQ.js → chunk-CRIEW4FP.js} +3 -2
- package/dist/bundle/{chunk-V2WXTILT.js → chunk-CVAJMRRD.js} +6 -6
- package/dist/bundle/{chunk-JCHF7LZT.js → chunk-D4MVEOU2.js} +4 -4
- package/dist/bundle/{chunk-FHBTQPA3.js → chunk-DIZBJLPM.js} +41 -37
- package/dist/bundle/{chunk-VUUPFDRU.js → chunk-DU23ET2O.js} +113 -39
- package/dist/bundle/{chunk-IRNDYNQX.js → chunk-DYLYH7VE.js} +4 -4
- package/dist/bundle/{chunk-IIHZTV6V.js → chunk-EA2OB75T.js} +1 -1
- package/dist/bundle/{chunk-AP4MX247.js → chunk-EEE4H2PA.js} +12 -12
- package/dist/bundle/{chunk-UAKX6DP4.js → chunk-EOC7RHJ2.js} +5 -5
- package/dist/bundle/{chunk-HHRJPLFO.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-KOY5HUBY.js → chunk-F7KAMSXA.js} +4 -4
- package/dist/bundle/{chunk-D4MIMH2N.js → chunk-FAMXUI2X.js} +5 -5
- package/dist/bundle/{chunk-PJGOQSE5.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-XVZNFA2P.js → chunk-GTLXBAJV.js} +309 -278
- package/dist/bundle/{chunk-JQXK3M5M.js → chunk-HCZYJMBP.js} +1 -1
- package/dist/bundle/{chunk-NK4GVFJH.js → chunk-IJCUAKR5.js} +4 -4
- package/dist/bundle/{chunk-MZWXTJ4O.js → chunk-IVOG6T6P.js} +3 -3
- package/dist/bundle/{chunk-PKM55ZRR.js → chunk-J5LXL435.js} +20 -20
- package/dist/bundle/{chunk-G4TNKBDX.js → chunk-JMZQBRRZ.js} +7 -7
- package/dist/bundle/{chunk-VQKNKJYL.js → chunk-JRFKCYMW.js} +6 -6
- package/dist/bundle/{chunk-XLGDNI4S.js → chunk-JZ3MT7IE.js} +5 -40
- package/dist/bundle/{chunk-UG3GHFGY.js → chunk-KPKIHJIT.js} +6 -8
- package/dist/bundle/{chunk-OIF4B526.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-5PLINHEY.js → chunk-MLSXHTUB.js} +153 -149
- package/dist/bundle/{chunk-Y5U4HIZS.js → chunk-MOKEB656.js} +2 -2
- package/dist/bundle/{chunk-6X3KUFRQ.js → chunk-MW46BLWH.js} +20 -20
- package/dist/bundle/{chunk-I5R5CMQR.js → chunk-MWCPKUU4.js} +5 -5
- package/dist/bundle/{chunk-6UJCCOZC.js → chunk-NV75QPML.js} +4 -4
- package/dist/bundle/{chunk-OZOQLAWK.js → chunk-O7T3WGCV.js} +6 -6
- package/dist/bundle/{chunk-H7XL6WTW.js → chunk-PGPHEC2X.js} +2 -2
- package/dist/bundle/{chunk-UQPW42HF.js → chunk-PJ3FKBXG.js} +1 -1
- package/dist/bundle/{chunk-ALE67WRR.js → chunk-PV3AWPHR.js} +5 -5
- package/dist/bundle/{chunk-HQBLJLYH.js → chunk-PWIEOATY.js} +8 -8
- package/dist/bundle/{chunk-WYTYHUFH.js → chunk-Q6BD6RUH.js} +43 -43
- package/dist/bundle/{chunk-BQXSE645.js → chunk-QKY24RWV.js} +12 -12
- package/dist/bundle/{chunk-2S3E2HVV.js → chunk-QRSPFCRY.js} +17 -17
- package/dist/bundle/{chunk-3NYH756U.js → chunk-QTRYJZL7.js} +11 -6
- package/dist/bundle/{chunk-QF7VL4C3.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-ULXEW6FT.js → chunk-QWGEOQHA.js} +1 -1
- package/dist/bundle/{chunk-JLCR24UM.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-M7543RUJ.js → chunk-RT5NT62B.js} +220 -15
- package/dist/bundle/{chunk-SZ6JFOL4.js → chunk-SOS4U2RF.js} +62 -41
- package/dist/bundle/{chunk-PUMDOCAF.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-COGWKO2T.js → chunk-U52QE4QV.js} +3 -3
- package/dist/bundle/{chunk-LVAPSAHF.js → chunk-UFPRP7MG.js} +8 -8
- package/dist/bundle/{chunk-5VDVGDOC.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-7LT2G5BC.js → chunk-ULNN3LCY.js} +29 -27
- package/dist/bundle/{chunk-GVA3KTCD.js → chunk-UPCEHSIZ.js} +10 -10
- package/dist/bundle/{chunk-4UHBJSMI.js → chunk-UUQJVKPB.js} +516 -458
- package/dist/bundle/{chunk-O53WLYX3.js → chunk-UYBLNGZ2.js} +2 -2
- package/dist/bundle/{chunk-D7KOAPG6.js → chunk-WCNTDETD.js} +2 -2
- package/dist/bundle/{chunk-JHMEETXI.js → chunk-WGX4DZPW.js} +2 -2
- package/dist/bundle/{chunk-P7HQFII6.js → chunk-WUFZGPXX.js} +7 -7
- package/dist/bundle/{chunk-5K54RZBK.js → chunk-Y2QVNVHK.js} +1 -1
- package/dist/bundle/{chunk-7EP4AU6A.js → chunk-YUGTJBV3.js} +3 -3
- package/dist/bundle/{chunk-QSELSDWE.js → chunk-YYIWPH53.js} +13 -13
- package/dist/bundle/{chunk-E2F2XIX6.js → chunk-Z5BMYI2V.js} +8 -8
- package/dist/bundle/{chunk-TYLEICTX.js → chunk-ZAIE3G5I.js} +3 -3
- package/dist/bundle/{chunk-SOOU5WO6.js → chunk-ZSVMZH5O.js} +2 -2
- package/dist/bundle/{chunk-FA2TNA5X.js → chunk-ZVQDOKDY.js} +1 -1
- package/dist/bundle/{cli-KW6QQVS5.js → cli-L7P36YUH.js} +61 -61
- package/dist/bundle/command-contract-EYFGMKIG.js +41 -0
- package/dist/bundle/{command-server-entry-OC4E4DED.js → command-server-entry-H3VGPOLJ.js} +31 -31
- package/dist/bundle/{decode-AH5ZLLDK.js → decode-JEU6JWCV.js} +8 -8
- package/dist/bundle/{dispatch-CDWZZ54Q.js → dispatch-WBEOHZDV.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-VC7MTXWY.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-EPSQY6QG.js → embed-WUKOASQG.js} +9 -9
- package/dist/bundle/{embedder-TK4U4TJR.js → embedder-UBRAXRDZ.js} +12 -12
- package/dist/bundle/entry-C4NUQFTF.js +25 -0
- package/dist/bundle/{failure-WSVZOPFE.js → failure-X6PSLVSO.js} +4 -4
- package/dist/bundle/first-run-PKHBS7B4.js +30 -0
- package/dist/bundle/first-screen-QOVOM4BF.js +39 -0
- package/dist/bundle/google-XXHSMTVK.js +45 -0
- package/dist/bundle/{google-api-AV4X2JH3.js → google-api-SQQ4BSNR.js} +63 -63
- package/dist/bundle/grants-2U4JVT6O.js +111 -0
- package/dist/bundle/{identity-CGHHF7AK.js → identity-SRL6RSU2.js} +6 -6
- package/dist/bundle/{instructions-24PHDBBE.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/{login-XHFESAFM.js → login-N243GGEE.js} +69 -69
- package/dist/bundle/{mcp-M5YCSWJJ.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{node-GIDULTV5.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-sqlite-LINBOAWK.js → node-sqlite-SZQCCMV2.js} +10 -10
- package/dist/bundle/oauth-CMAFXX6A.js +22 -0
- package/dist/bundle/{open-RYFKPNCJ.js → open-RVTPKDA3.js} +8 -8
- package/dist/bundle/{openai-Q7YYUHJF.js → openai-6NN63BMH.js} +19 -19
- package/dist/bundle/{process-VPIZTIJR.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-IUXFRBZA.js → program-B4QBJYB5.js} +187 -228
- package/dist/bundle/{prompt-LF4KX3XL.js → prompt-HGP2DSRW.js} +8 -8
- package/dist/bundle/{reasons-JPYOU5GV.js → reasons-KSYP5VDJ.js} +5 -5
- package/dist/bundle/{recognize-KEWTJXFH.js → recognize-26SHB7HI.js} +7 -7
- package/dist/bundle/{remote-HGGLB76S.js → remote-Z4PWHZ5N.js} +13 -13
- package/dist/bundle/{rerank-TDUKETFT.js → rerank-QHJZJK3Q.js} +10 -10
- package/dist/bundle/{serve-XFYMKW5W.js → serve-MYJW5IEM.js} +12 -12
- package/dist/bundle/server-HBZPIHDX.js +74 -0
- package/dist/bundle/{server-PXIPSGFP.js → server-XFW3V7CR.js} +49 -47
- package/dist/bundle/{services-2BOCGMJU.js → services-IQG2RVTO.js} +36 -36
- package/dist/bundle/{sqlite-runtime-R7M5XUMW.js → sqlite-runtime-X4GB5PBV.js} +9 -9
- package/dist/bundle/{start-YRLT4MQZ.js → start-C6EXYXAL.js} +7 -7
- package/dist/bundle/{state-NZ7WRJWH.js → state-ATQK2X3W.js} +9 -9
- package/dist/bundle/{store-ICDGPSEN.js → store-MEHEUOJH.js} +19 -19
- package/dist/bundle/{store-7LCVDO7G.js → store-QUBUPK6F.js} +21 -21
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +65 -0
- package/dist/bundle/tokens-A2GP4F34.js +111 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +5 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/search.js +4 -4
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +2 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/transcripts.d.ts +4 -0
- package/dist/commands/transcripts.d.ts.map +1 -0
- package/dist/commands/transcripts.js +42 -0
- package/dist/commands/transcripts.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -1
- package/dist/config.js.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +31 -28
- package/dist/google.js.map +1 -1
- package/dist/list-queries.d.ts +10 -0
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +12 -1
- package/dist/list-queries.js.map +1 -1
- package/dist/model.d.ts +4 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/policy.d.ts +2 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -2
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +5 -2
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +2 -0
- package/dist/state.js.map +1 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +5 -1
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +21 -0
- package/dist/transcripts.d.ts.map +1 -0
- package/dist/transcripts.js +48 -0
- package/dist/transcripts.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-CE543JBN.js +0 -41
- package/dist/bundle/entry-3VN23M7M.js +0 -25
- package/dist/bundle/first-run-7ZYJ7EB3.js +0 -30
- package/dist/bundle/first-screen-CZDH7QY3.js +0 -39
- package/dist/bundle/google-OBZMWA7J.js +0 -45
- package/dist/bundle/grants-WTRLN4ZI.js +0 -111
- package/dist/bundle/oauth-JHUX3KE3.js +0 -22
- package/dist/bundle/server-BDEV3CZJ.js +0 -74
- package/dist/bundle/store-maintenance-command-SJPLY6IH.js +0 -65
- package/dist/bundle/tokens-FGTBE7VW.js +0 -111
- /package/dist/bundle/{chunk-HVJJWJYQ.js → chunk-XWBPP2HX.js} +0 -0
|
@@ -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-UPCEHSIZ.js";
|
|
6
6
|
import {
|
|
7
7
|
writeSecurely
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
24
|
+
} from "./chunk-JRFKCYMW.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError,
|
|
27
27
|
isCliError
|
|
28
|
-
} from "./chunk-
|
|
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.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.
|
|
1445
|
-
var catalogFiles = /* @__PURE__ */ __name((state, roots) => {
|
|
1451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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) =>
|
|
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.
|
|
1470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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 (!
|
|
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 || !
|
|
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 {
|
|
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.
|
|
1676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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
|
-
|
|
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
|
};
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EA2OB75T.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
|
|
17
17
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
|
|
18
18
|
var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
19
19
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
|
70
70
|
throw invalid();
|
|
71
71
|
}, "checkOggDuration");
|
|
72
72
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
74
74
|
var SAMPLE_RATE = 16e3;
|
|
75
75
|
var LEAD = SAMPLE_RATE / 2;
|
|
76
76
|
var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
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/errors.js
|
|
8
8
|
var errorCodes = [
|
|
9
9
|
"validation_error",
|
|
10
10
|
"configuration_error",
|
|
@@ -2,28 +2,28 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isCommandServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2VYEGKQ3.js";
|
|
6
6
|
import {
|
|
7
7
|
ensureSqlite
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZSVMZH5O.js";
|
|
9
9
|
import {
|
|
10
10
|
envName,
|
|
11
11
|
readOnlyLockOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MOKEB656.js";
|
|
13
13
|
import {
|
|
14
14
|
catchCrashes
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PV3AWPHR.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EA2OB75T.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
24
24
|
import { spawn } from "node:child_process";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
|
|
27
27
|
import { appendFileSync } from "node:fs";
|
|
28
28
|
var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
|
|
29
29
|
const words = [];
|
|
@@ -47,7 +47,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
|
|
|
47
47
|
`);
|
|
48
48
|
}, "logVersion");
|
|
49
49
|
|
|
50
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
51
51
|
var processIo = /* @__PURE__ */ __name(() => ({
|
|
52
52
|
argv: process.argv,
|
|
53
53
|
env: process.env,
|
|
@@ -67,7 +67,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
67
67
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-V"))
|
|
68
68
|
return printVersion(entry.app, io);
|
|
69
69
|
if (isCommandServer(args)) {
|
|
70
|
-
const { serveEntry } = await import("./command-server-entry-
|
|
70
|
+
const { serveEntry } = await import("./command-server-entry-H3VGPOLJ.js");
|
|
71
71
|
return serveEntry(entry, io, { firstRunAt, commanderExit });
|
|
72
72
|
}
|
|
73
73
|
const tty = io.stdout.isTTY === true;
|
|
@@ -105,7 +105,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
105
105
|
ask: /* @__PURE__ */ __name(async (question, command) => {
|
|
106
106
|
if (headless(command) || io.stdin.isTTY !== true)
|
|
107
107
|
return false;
|
|
108
|
-
const { readSecret } = await import("./prompt-
|
|
108
|
+
const { readSecret } = await import("./prompt-HGP2DSRW.js");
|
|
109
109
|
const answer = await readSecret(`${question} [y/N] `, {
|
|
110
110
|
input: io.stdin,
|
|
111
111
|
output: io.stderr,
|
|
@@ -148,8 +148,8 @@ var firstRunAt = /* @__PURE__ */ __name((entry, io, headless) => async (command)
|
|
|
148
148
|
if (command.optsWithGlobals().dryRun === true)
|
|
149
149
|
return;
|
|
150
150
|
const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
|
|
151
|
-
import("./first-run-
|
|
152
|
-
import("./command-contract-
|
|
151
|
+
import("./first-run-PKHBS7B4.js"),
|
|
152
|
+
import("./command-contract-EYFGMKIG.js")
|
|
153
153
|
]);
|
|
154
154
|
await setupAtStart({
|
|
155
155
|
command: entry.app.command,
|
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
answerSchema,
|
|
7
7
|
describeOptions,
|
|
8
8
|
metaOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MLSXHTUB.js";
|
|
10
10
|
import {
|
|
11
11
|
keyForCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J5LXL435.js";
|
|
13
13
|
import {
|
|
14
14
|
jsonSchemaOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JRFKCYMW.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EA2OB75T.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
24
24
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
25
25
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
26
26
|
const entity = answerEntitySchema(command);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
optional,
|
|
10
10
|
pipe,
|
|
11
11
|
safeParse
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JRFKCYMW.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EA2OB75T.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/options.js
|
|
21
21
|
var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
22
22
|
const parsed = safeParse(schema, options);
|
|
23
23
|
if (!parsed.success) {
|
|
@@ -27,7 +27,7 @@ var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
|
27
27
|
}, "checkedOptions");
|
|
28
28
|
var range = /* @__PURE__ */ __name((min, max) => optional(pipe(number(), finite(), minValue(min), maxValue(max))), "range");
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/types.js
|
|
31
31
|
var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
32
32
|
var validateImages = /* @__PURE__ */ __name((images) => {
|
|
33
33
|
if (images === void 0)
|
|
@@ -2,21 +2,21 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseModelAddress
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O7T3WGCV.js";
|
|
6
6
|
import {
|
|
7
7
|
unit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MWCPKUU4.js";
|
|
9
9
|
import {
|
|
10
10
|
onThisComputer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6QR7NKMG.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EA2OB75T.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
20
20
|
import { setTimeout } from "node:timers/promises";
|
|
21
21
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
22
22
|
var OPENAI_MODELS = {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
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");
|