@wirecat/mail-cli 0.25.0 → 0.27.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/CHANGELOG.md +49 -0
- package/README.md +3 -0
- package/contracts/wirecat.json +1325 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bin/mail.js.map +1 -1
- package/dist/bundle/{all-profiles-QEV2PSOR.js → all-profiles-5XWH7TBM.js} +11 -11
- package/dist/bundle/{anthropic-5NKQXIHM.js → anthropic-QEQGUEPW.js} +5 -5
- package/dist/bundle/{app-server-G2CJNT4R.js → app-server-YWDU56NR.js} +55 -51
- package/dist/bundle/{bun-6HBYWQIX.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-DXIQ7BVR.js → bun-sqlite-S4QD5YUO.js} +6 -6
- package/dist/bundle/{chunk-37F6QYTO.js → chunk-255RGG5W.js} +6 -6
- package/dist/bundle/{chunk-DIA56CS7.js → chunk-2FZMIJW7.js} +11 -7
- package/dist/bundle/{chunk-S2QRAKQI.js → chunk-4VDWQKDI.js} +17 -17
- package/dist/bundle/{chunk-QB3DP2TN.js → chunk-572NWJUN.js} +2 -2
- package/dist/bundle/{chunk-PHHH2NQP.js → chunk-5BPOEPYL.js} +15 -113
- package/dist/bundle/{chunk-VL6H2BND.js → chunk-5DLPM5AV.js} +18 -17
- package/dist/bundle/{chunk-HEIDAHRC.js → chunk-77J5ID2O.js} +2 -2
- package/dist/bundle/{chunk-5ZYFV6FD.js → chunk-7BXOFLWJ.js} +129 -74
- package/dist/bundle/{chunk-L4QVOEOB.js → chunk-7C6FGWDH.js} +4 -4
- package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
- package/dist/bundle/{chunk-TY644DKQ.js → chunk-7MEVD5PI.js} +57 -28
- package/dist/bundle/{chunk-WOAYHCM2.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-WX6OYVCH.js → chunk-AIZ225IA.js} +379 -270
- package/dist/bundle/{chunk-K2OGF7KC.js → chunk-APLVXHFG.js} +2 -2
- package/dist/bundle/{chunk-GY4XCLCO.js → chunk-BZCXAVGP.js} +8 -8
- package/dist/bundle/{chunk-434YOD6A.js → chunk-CKFVKHTB.js} +4 -4
- package/dist/bundle/{chunk-B7SWTH5O.js → chunk-CZRMT6XV.js} +2 -2
- package/dist/bundle/{chunk-Z5T6OW3V.js → chunk-DQO2LX5I.js} +4 -4
- package/dist/bundle/{chunk-OLKCJBZY.js → chunk-DSUOYJUL.js} +5 -5
- package/dist/bundle/{chunk-IZOYW4Z4.js → chunk-ECZSYLSL.js} +24 -9
- package/dist/bundle/{chunk-YNS2YVUR.js → chunk-ELPH22W6.js} +9 -9
- package/dist/bundle/{chunk-JG4MNYG2.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-HLXVUMZJ.js → chunk-FOTP6QLO.js} +2 -2
- package/dist/bundle/{chunk-SMTBV62X.js → chunk-FVVSBQGK.js} +29 -25
- package/dist/bundle/{chunk-XQYKIZMG.js → chunk-HBK6MRAL.js} +12 -9
- package/dist/bundle/{chunk-5QYK3LWS.js → chunk-IDOHT4Z3.js} +123 -42
- package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
- package/dist/bundle/{chunk-7GLJSJ7M.js → chunk-KHBZ4OEP.js} +1 -1
- package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-CBYBZCQP.js → chunk-MY4LVD64.js} +3 -2
- package/dist/bundle/{chunk-OLLIWNFG.js → chunk-NZG6IRDW.js} +3 -3
- package/dist/bundle/{chunk-ND5H5ADM.js → chunk-OC3U2JAK.js} +4 -4
- package/dist/bundle/{chunk-KFB2X6KE.js → chunk-OCUKQRJ3.js} +201 -160
- package/dist/bundle/{chunk-PQMJ5BXH.js → chunk-OEPNLKHI.js} +4 -4
- package/dist/bundle/{chunk-GJRYZXBN.js → chunk-OPOEAGVB.js} +9 -9
- package/dist/bundle/{chunk-VFU7PVPQ.js → chunk-PA7LDYVX.js} +62 -60
- package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-PJ3FKBXG.js} +1 -1
- package/dist/bundle/{chunk-A6BPOX5O.js → chunk-PRSXMM4I.js} +3825 -3516
- package/dist/bundle/{chunk-HEYVMAAQ.js → chunk-QQTSPQ2D.js} +2 -2
- package/dist/bundle/{chunk-IXO4SCKE.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-J4OYK4WL.js → chunk-R3A65A4D.js} +12 -12
- package/dist/bundle/{chunk-QQUY4MZY.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-XMDEM6BZ.js → chunk-RGQFVVBB.js} +276 -254
- package/dist/bundle/{chunk-FZZD4AFY.js → chunk-ROLHKFKB.js} +26 -18
- package/dist/bundle/{chunk-PP3YOAWG.js → chunk-RRLAFEPQ.js} +3 -3
- package/dist/bundle/{chunk-3XVR2ROR.js → chunk-S2QRW647.js} +35 -31
- package/dist/bundle/{chunk-G5LHHAW2.js → chunk-S7H7TAC3.js} +6 -6
- package/dist/bundle/{chunk-U6IQ6YQ2.js → chunk-SXKKOOA7.js} +8 -2
- package/dist/bundle/{chunk-MBFPFWCO.js → chunk-T7VERZP5.js} +27 -27
- package/dist/bundle/{chunk-ADKMBXY4.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-EXVY76VO.js → chunk-TKOZCIHU.js} +19 -18
- package/dist/bundle/{chunk-BC7PFQL7.js → chunk-UBH4UPZ7.js} +40 -2
- package/dist/bundle/{chunk-P6GXNT7Z.js → chunk-UEJVXUIO.js} +13 -13
- package/dist/bundle/{chunk-IACWKZWS.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-LGZPKKBN.js → chunk-VYZ37D2Q.js} +3 -2
- package/dist/bundle/{chunk-HJSJBNCJ.js → chunk-WMXUFUV3.js} +28 -9
- package/dist/bundle/{chunk-CIWWNBVW.js → chunk-WRHAX53U.js} +8 -8
- package/dist/bundle/{chunk-LVGX7VTD.js → chunk-XBL46B4V.js} +63 -5
- package/dist/bundle/{chunk-KK4HD3SI.js → chunk-XCYDTIVK.js} +7 -7
- package/dist/bundle/{chunk-PGC5TRH6.js → chunk-XM2THVMR.js} +3 -3
- package/dist/bundle/{chunk-MWGH3M46.js → chunk-ZSWSFKNE.js} +5 -7
- package/dist/bundle/{chunk-T27IMG6X.js → chunk-ZVQDOKDY.js} +1 -1
- package/dist/bundle/command-contract-MIJONVVG.js +36 -0
- package/dist/bundle/{command-server-entry-XMSSY5ID.js → command-server-entry-VHUFW3OZ.js} +25 -25
- package/dist/bundle/{decode-RYGB4PGT.js → decode-TIMTSVXM.js} +5 -5
- package/dist/bundle/{dispatch-PLQOIZG5.js → dispatch-DSVN7MNG.js} +8 -8
- package/dist/bundle/{dist-GY2AQETI.js → dist-IP25JFTN.js} +19 -15
- package/dist/bundle/{echarts-7CM2MCMW.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-FTBDPOPT.js → embed-4W527BCE.js} +6 -6
- package/dist/bundle/{embedder-B43WGNBD.js → embedder-LQE2SBJ3.js} +9 -9
- package/dist/bundle/{failure-XP5QYV2T.js → failure-COTPFUP4.js} +2 -2
- package/dist/bundle/{first-run-XIIUARNM.js → first-run-KZTKMEI4.js} +12 -12
- package/dist/bundle/first-screen-4LG5SJ6D.js +34 -0
- package/dist/bundle/{instructions-R7OHVAWH.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/mail.js +15 -20
- package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{node-3N2JGZ7V.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-sqlite-WFJXW3CZ.js → node-sqlite-PVSKI4OS.js} +7 -7
- package/dist/bundle/{oauth-SVJLQTWV.js → oauth-TGYGAVGF.js} +7 -7
- package/dist/bundle/{open-ZDONVKSX.js → open-5YED4Q4C.js} +5 -5
- package/dist/bundle/{openai-XVEW6XOU.js → openai-XVJTML22.js} +21 -20
- package/dist/bundle/{process-YAHHUFR5.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-HU2UVMJE.js → program-TDHDXAQA.js} +1499 -998
- package/dist/bundle/{prompt-JAJ2CUJI.js → prompt-HPZANASN.js} +5 -5
- package/dist/bundle/{recognize-UFBWUNFR.js → recognize-PP5XQQHH.js} +4 -4
- package/dist/bundle/{remote-2GFOVLCR.js → remote-C2LU2WYG.js} +9 -9
- package/dist/bundle/{rerank-BGPSMXTL.js → rerank-WRHNOM4Z.js} +7 -7
- package/dist/bundle/{serve-CB3XJTH3.js → serve-RE3IV2QB.js} +9 -9
- package/dist/bundle/server-43V7HNFY.js +68 -0
- package/dist/bundle/{server-M7FQY7TX.js → server-52BJ7UTO.js} +44 -42
- package/dist/bundle/{sqlite-runtime-AEV6PGDR.js → sqlite-runtime-CRRL3MYX.js} +6 -6
- package/dist/bundle/{state-YLBEQLBI.js → state-YGJRPMWD.js} +6 -6
- package/dist/bundle/{store-EKWKY6GG.js → store-6AZ5LVJL.js} +21 -19
- package/dist/bundle/{store-CDUL3HKK.js → store-ESQE4VHP.js} +17 -17
- package/dist/bundle/store-maintenance-command-AKQMKUYO.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +57 -19
- package/dist/commands/rules.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +1 -1
- package/dist/commands/session-start.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -12
- package/dist/config.js.map +1 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +7 -2
- package/dist/discovery.js.map +1 -1
- package/dist/identity.d.ts +2 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +34 -0
- package/dist/identity.js.map +1 -1
- package/dist/mail/domain-age.d.ts +1 -1
- package/dist/mail/domain-age.d.ts.map +1 -1
- package/dist/mail/domain-age.js +9 -3
- package/dist/mail/domain-age.js.map +1 -1
- package/dist/mail/rules/file.d.ts.map +1 -1
- package/dist/mail/rules/file.js +4 -1
- package/dist/mail/rules/file.js.map +1 -1
- package/dist/mail/rules/query.d.ts +2 -1
- package/dist/mail/rules/query.d.ts.map +1 -1
- package/dist/mail/rules/query.js +16 -3
- package/dist/mail/rules/query.js.map +1 -1
- package/dist/oauth.d.ts +3 -1
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +48 -34
- package/dist/oauth.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +5 -0
- package/dist/reasons.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +2 -21
- package/dist/store.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +10 -9
- package/dist/bundle/chunk-K6HR6HCO.js +0 -32
- package/dist/bundle/command-contract-XSW2Q33S.js +0 -36
- package/dist/bundle/first-screen-Z7HC6PQU.js +0 -34
- package/dist/bundle/server-34GEF22R.js +0 -68
- package/dist/bundle/store-maintenance-command-XH2JUM5F.js +0 -58
- /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XM2THVMR.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/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
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/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// 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/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
LEVELS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2FZMIJW7.js";
|
|
6
6
|
import {
|
|
7
7
|
WORD_BODY,
|
|
8
8
|
e164Of
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RGQFVVBB.js";
|
|
10
10
|
import {
|
|
11
11
|
resolvePaths,
|
|
12
12
|
writeSecurely
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7MEVD5PI.js";
|
|
14
14
|
import {
|
|
15
15
|
array,
|
|
16
16
|
getDotPath,
|
|
@@ -29,16 +29,16 @@ import {
|
|
|
29
29
|
string,
|
|
30
30
|
transform,
|
|
31
31
|
unknown
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ECZSYLSL.js";
|
|
33
33
|
import {
|
|
34
34
|
CliError,
|
|
35
35
|
visibleControls
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-7KCBPAQS.js";
|
|
37
37
|
import {
|
|
38
38
|
__name
|
|
39
39
|
} from "./chunk-ZVVMGPBJ.js";
|
|
40
40
|
|
|
41
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41
|
+
// 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/domain/vcard.js
|
|
42
42
|
import { createHash } from "node:crypto";
|
|
43
43
|
var MAX_ID = 512;
|
|
44
44
|
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
@@ -269,7 +269,7 @@ var envelopeOfVcard = /* @__PURE__ */ __name((text, { provider, account, batchId
|
|
|
269
269
|
};
|
|
270
270
|
}, "envelopeOfVcard");
|
|
271
271
|
|
|
272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
272
|
+
// 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/domain/formatting.js
|
|
273
273
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
274
274
|
var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
275
275
|
const { text, spans } = formatted;
|
|
@@ -329,7 +329,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
|
|
|
329
329
|
};
|
|
330
330
|
}, "visibleFormattedText");
|
|
331
331
|
|
|
332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
332
|
+
// 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/moderation/check.js
|
|
333
333
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
334
334
|
var LINK = /https?:\/\/\S+/i;
|
|
335
335
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -517,7 +517,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
517
517
|
}, "nextPoint");
|
|
518
518
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
519
519
|
|
|
520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
520
|
+
// 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/moderation/rules.js
|
|
521
521
|
import { existsSync, readFileSync } from "node:fs";
|
|
522
522
|
import { join } from "node:path";
|
|
523
523
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
renderMessages
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QQTSPQ2D.js";
|
|
6
6
|
import {
|
|
7
7
|
answerOf,
|
|
8
8
|
messengerContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TKOZCIHU.js";
|
|
10
10
|
import {
|
|
11
11
|
FETCHING,
|
|
12
12
|
RULES_VERSION,
|
|
@@ -31,17 +31,17 @@ import {
|
|
|
31
31
|
typedQuery,
|
|
32
32
|
withQuery,
|
|
33
33
|
withTimeLimit
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-AIZ225IA.js";
|
|
35
35
|
import {
|
|
36
36
|
holdLock,
|
|
37
37
|
lockPath,
|
|
38
38
|
releaseLock,
|
|
39
39
|
servingProfiles,
|
|
40
40
|
takeLock
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XM2THVMR.js";
|
|
42
42
|
import {
|
|
43
43
|
readSecret
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RRLAFEPQ.js";
|
|
45
45
|
import {
|
|
46
46
|
Command,
|
|
47
47
|
LOCAL_READ,
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
commandAt,
|
|
54
54
|
destroysNothing,
|
|
55
55
|
environmentOf,
|
|
56
|
+
grantsAuthority,
|
|
56
57
|
itemOf,
|
|
57
58
|
jsonlRecords,
|
|
58
59
|
lineOf,
|
|
@@ -67,13 +68,13 @@ import {
|
|
|
67
68
|
snakeKeys,
|
|
68
69
|
storeTable,
|
|
69
70
|
withoutProviderRefs
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-OCUKQRJ3.js";
|
|
71
72
|
import {
|
|
72
73
|
levelFor
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-2FZMIJW7.js";
|
|
74
75
|
import {
|
|
75
76
|
holdersOf
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-UIKVP23D.js";
|
|
77
78
|
import {
|
|
78
79
|
QUICK_HEALTH_CHECKS,
|
|
79
80
|
fts5Tables,
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
lossUnknown,
|
|
82
83
|
storeDamageReport,
|
|
83
84
|
storeHealth
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-4VDWQKDI.js";
|
|
85
86
|
import {
|
|
86
87
|
CORPORA,
|
|
87
88
|
MIGRATIONS,
|
|
@@ -116,44 +117,44 @@ import {
|
|
|
116
117
|
storeClients,
|
|
117
118
|
storeContents,
|
|
118
119
|
vectorIndexCounts
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PRSXMM4I.js";
|
|
120
121
|
import {
|
|
121
122
|
currentRun,
|
|
122
123
|
readDamageMark,
|
|
123
124
|
readHealthMark,
|
|
124
125
|
readJournalMark,
|
|
125
126
|
recordDeepCheck
|
|
126
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-T7VERZP5.js";
|
|
127
128
|
import {
|
|
128
129
|
formatLocator,
|
|
129
130
|
parseLocator,
|
|
130
131
|
queryFieldsOf
|
|
131
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-7BXOFLWJ.js";
|
|
132
133
|
import {
|
|
133
134
|
failureKey,
|
|
134
135
|
isStoreDamage
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-SXKKOOA7.js";
|
|
136
137
|
import {
|
|
137
138
|
modelAddressAllowed,
|
|
138
139
|
onThisComputer
|
|
139
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-XBL46B4V.js";
|
|
140
141
|
import {
|
|
141
142
|
readSharedSection,
|
|
142
143
|
sharedConfigPath,
|
|
143
144
|
writeSharedSection
|
|
144
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-XCYDTIVK.js";
|
|
145
146
|
import {
|
|
146
147
|
storePath
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-VYZ37D2Q.js";
|
|
148
149
|
import {
|
|
149
150
|
openCache
|
|
150
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-255RGG5W.js";
|
|
151
152
|
import {
|
|
152
153
|
Credentials,
|
|
153
154
|
isMovedRun,
|
|
154
155
|
resolvePaths,
|
|
155
156
|
writeSecurely
|
|
156
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-7MEVD5PI.js";
|
|
157
158
|
import {
|
|
158
159
|
array,
|
|
159
160
|
boolean,
|
|
@@ -175,10 +176,10 @@ import {
|
|
|
175
176
|
string,
|
|
176
177
|
transform,
|
|
177
178
|
trim
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-ECZSYLSL.js";
|
|
179
180
|
import {
|
|
180
181
|
CliError
|
|
181
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-7KCBPAQS.js";
|
|
182
183
|
import {
|
|
183
184
|
__commonJS,
|
|
184
185
|
__name,
|
|
@@ -5518,11 +5519,11 @@ var require_liquid_node = __commonJS({
|
|
|
5518
5519
|
}
|
|
5519
5520
|
});
|
|
5520
5521
|
|
|
5521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5522
|
+
// 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/messenger/store-maintenance-command.js
|
|
5522
5523
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5523
5524
|
import { dirname as dirname3, resolve } from "node:path";
|
|
5524
5525
|
|
|
5525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5526
|
+
// 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/sealed.js
|
|
5526
5527
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5527
5528
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5528
5529
|
import { Transform } from "node:stream";
|
|
@@ -5629,7 +5630,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5629
5630
|
renameSync(pending, to);
|
|
5630
5631
|
}, "unsealFile");
|
|
5631
5632
|
|
|
5632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5633
|
+
// 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/store/compatibility.js
|
|
5633
5634
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5634
5635
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5635
5636
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5653,7 +5654,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5653
5654
|
};
|
|
5654
5655
|
}, "compatibilityOf");
|
|
5655
5656
|
|
|
5656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5657
|
+
// 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/store/repair.js
|
|
5657
5658
|
import { createHash as createHash2 } from "node:crypto";
|
|
5658
5659
|
var COPY_MARK = "__repair_";
|
|
5659
5660
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5907,19 +5908,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5907
5908
|
return found;
|
|
5908
5909
|
}, "deleteCopy");
|
|
5909
5910
|
|
|
5910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5911
|
+
// 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/store-info.js
|
|
5911
5912
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5912
5913
|
|
|
5913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5914
|
+
// 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/store-recover.js
|
|
5914
5915
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5915
5916
|
|
|
5916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5917
|
+
// 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/store/recover.js
|
|
5917
5918
|
import { execFileSync, spawn } from "node:child_process";
|
|
5918
5919
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5919
5920
|
import { basename, dirname, join } from "node:path";
|
|
5920
5921
|
import { Transform as Transform2 } from "node:stream";
|
|
5921
5922
|
|
|
5922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5923
|
+
// 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/store/refill.js
|
|
5923
5924
|
var REFILL_MARGIN_MS = 864e5;
|
|
5924
5925
|
var TIME_KEYS = 1e12;
|
|
5925
5926
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -5999,7 +6000,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
5999
6000
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6000
6001
|
}, "forgetMail");
|
|
6001
6002
|
|
|
6002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6003
|
+
// 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/store/recover.js
|
|
6003
6004
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6004
6005
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6005
6006
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6527,7 +6528,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6527
6528
|
}
|
|
6528
6529
|
}, "recoverLocked");
|
|
6529
6530
|
|
|
6530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6531
|
+
// 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/store-recover.js
|
|
6531
6532
|
var COUNTED = [
|
|
6532
6533
|
"accounts",
|
|
6533
6534
|
"chats",
|
|
@@ -6668,7 +6669,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6668
6669
|
for (const line of recoveryNotes(answer))
|
|
6669
6670
|
output.renderer.note(line);
|
|
6670
6671
|
});
|
|
6671
|
-
recover.addCommand(annotate(new Command("run"), { effects: LOCAL_WRITE, examples: [`${command} store recover run`] }).summary("rebuild a damaged store from every row it can read").description("copy every readable row into a new file with the sqlite3 program, rebuild the search indexes, mentions and vector index, check it, and put it in place of the store; the damaged file is kept beside it. Refuses while a WireCat timer or process has the store").action(async function() {
|
|
6672
|
+
recover.addCommand(grantsAuthority(annotate(new Command("run"), { effects: LOCAL_WRITE, examples: [`${command} store recover run`] })).summary("rebuild a damaged store from every row it can read").description("copy every readable row into a new file with the sqlite3 program, rebuild the search indexes, mentions and vector index, check it, and put it in place of the store; the damaged file is kept beside it. Refuses while a WireCat timer or process has the store").action(async function() {
|
|
6672
6673
|
const output = outputFor(this);
|
|
6673
6674
|
const answer = await storeRecoveryRun(environmentOf(this).env ?? process.env, {
|
|
6674
6675
|
command,
|
|
@@ -6683,7 +6684,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6683
6684
|
return recover;
|
|
6684
6685
|
}, "storeRecoverCommand");
|
|
6685
6686
|
|
|
6686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6687
|
+
// 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/store-info.js
|
|
6687
6688
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6688
6689
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6689
6690
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6729,7 +6730,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
6729
6730
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
6730
6731
|
}), "storeInfoCommand");
|
|
6731
6732
|
|
|
6732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6733
|
+
// 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/messenger/password.js
|
|
6733
6734
|
var ENCRYPT_OPTION = [
|
|
6734
6735
|
"--encrypt",
|
|
6735
6736
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -6748,7 +6749,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6748
6749
|
return password;
|
|
6749
6750
|
}, "passwordOf");
|
|
6750
6751
|
|
|
6751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6752
|
+
// 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/replies/rules.js
|
|
6752
6753
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6753
6754
|
import { join as join2 } from "node:path";
|
|
6754
6755
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6919,7 +6920,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6919
6920
|
}, "problem");
|
|
6920
6921
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6921
6922
|
|
|
6922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6923
|
+
// 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/replies/state.js
|
|
6923
6924
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6924
6925
|
import { join as join3 } from "node:path";
|
|
6925
6926
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6972,7 +6973,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6972
6973
|
}, "recordReply");
|
|
6973
6974
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6974
6975
|
|
|
6975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6976
|
+
// 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/replies/decide.js
|
|
6976
6977
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6977
6978
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6978
6979
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7078,10 +7079,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7078
7079
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7079
7080
|
}, "filled");
|
|
7080
7081
|
|
|
7081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7082
|
+
// 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/replies/template.js
|
|
7082
7083
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7083
7084
|
|
|
7084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7085
|
+
// 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/render/liquid.js
|
|
7085
7086
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7086
7087
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7087
7088
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7108,7 +7109,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7108
7109
|
return engine;
|
|
7109
7110
|
}, "safeLiquid");
|
|
7110
7111
|
|
|
7111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7112
|
+
// 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/replies/template.js
|
|
7112
7113
|
var TEMPLATE_LIMITS = {
|
|
7113
7114
|
parse: 32768,
|
|
7114
7115
|
renders: 2e3,
|
|
@@ -7247,7 +7248,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7247
7248
|
}
|
|
7248
7249
|
}, "renderReplyTemplate");
|
|
7249
7250
|
|
|
7250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7251
|
+
// 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/replies/dry-run.js
|
|
7251
7252
|
var DRY_RUN_DAYS = 7;
|
|
7252
7253
|
var PAGE = 500;
|
|
7253
7254
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7361,7 +7362,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7361
7362
|
}
|
|
7362
7363
|
}, "storedSince");
|
|
7363
7364
|
|
|
7364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7365
|
+
// 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/ai.js
|
|
7365
7366
|
var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
|
|
7366
7367
|
var DEFAULT_BASE_URL = {
|
|
7367
7368
|
anthropic: "https://api.anthropic.com",
|
|
@@ -7407,10 +7408,10 @@ var aiSettingOf = /* @__PURE__ */ __name((given) => {
|
|
|
7407
7408
|
const checked = safeParse(settingShape, draft);
|
|
7408
7409
|
if (!checked.success) {
|
|
7409
7410
|
const field = getDotPath(checked.issues[0]);
|
|
7410
|
-
throw new CliError("validation_error", field === "provider" ? `the provider is one of ${AI_PROVIDERS.join(", ")}` : field === "base_url" ? "this address is not allowed: use https, or http only on this computer" : "name the model, 1 to 200 characters", { reason: field === "base_url" ? "
|
|
7411
|
+
throw new CliError("validation_error", field === "provider" ? `the provider is one of ${AI_PROVIDERS.join(", ")}` : field === "base_url" ? "this address is not allowed: use https, or http only on this computer" : "name the model, 1 to 200 characters", { reason: field === "base_url" ? "model.address-refused" : "ai.setting-invalid" });
|
|
7411
7412
|
}
|
|
7412
7413
|
if (checked.output.provider === "ollama" && !onThisComputer(aiBaseUrl(checked.output)))
|
|
7413
|
-
throw new CliError("validation_error", "Ollama is read only on this computer", { reason: "
|
|
7414
|
+
throw new CliError("validation_error", "Ollama is read only on this computer", { reason: "model.address-refused" });
|
|
7414
7415
|
return given.allowImages ? {
|
|
7415
7416
|
...checked.output,
|
|
7416
7417
|
images: { origin: aiOrigin(checked.output), model: checked.output.model, at: (/* @__PURE__ */ new Date()).toISOString() }
|
|
@@ -7511,7 +7512,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
|
|
|
7511
7512
|
}
|
|
7512
7513
|
}, "checkAi");
|
|
7513
7514
|
|
|
7514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7515
|
+
// 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/purpose.js
|
|
7515
7516
|
var HOSTED = {
|
|
7516
7517
|
openai: "https://api.openai.com/v1",
|
|
7517
7518
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7532,7 +7533,7 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7532
7533
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7533
7534
|
}, "purposeModel");
|
|
7534
7535
|
|
|
7535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7536
|
+
// 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/replies/consents.js
|
|
7536
7537
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7537
7538
|
import { join as join4 } from "node:path";
|
|
7538
7539
|
var shape = strictObject({
|
|
@@ -7557,7 +7558,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7557
7558
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7558
7559
|
}, "mayModelReply");
|
|
7559
7560
|
|
|
7560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7561
|
+
// 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/replies/rendering.js
|
|
7561
7562
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7562
7563
|
ai: true
|
|
7563
7564
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7605,7 +7606,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7605
7606
|
return result2;
|
|
7606
7607
|
}, "replyRenderer");
|
|
7607
7608
|
|
|
7608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7609
|
+
// 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/replies/serve.js
|
|
7609
7610
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7610
7611
|
var NO_RULES = "no rules";
|
|
7611
7612
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7698,7 +7699,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7698
7699
|
return { skip: why };
|
|
7699
7700
|
}, "replyTo");
|
|
7700
7701
|
|
|
7701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7702
|
+
// 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/messenger/serve-catch-up.js
|
|
7702
7703
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7703
7704
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7704
7705
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7775,7 +7776,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7775
7776
|
};
|
|
7776
7777
|
}, "startSync");
|
|
7777
7778
|
|
|
7778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7779
|
+
// 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/messenger/serve-members.js
|
|
7779
7780
|
var FIRST_FETCH_MS = 6e4;
|
|
7780
7781
|
var DAY_MS = 864e5;
|
|
7781
7782
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7829,7 +7830,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7829
7830
|
};
|
|
7830
7831
|
}, "memberFetches");
|
|
7831
7832
|
|
|
7832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7833
|
+
// 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/messenger/serve-notice.js
|
|
7833
7834
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7834
7835
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7835
7836
|
if (context.format === "pretty") {
|
|
@@ -7862,7 +7863,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7862
7863
|
return context;
|
|
7863
7864
|
}, "recordDiagnostics");
|
|
7864
7865
|
|
|
7865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7866
|
+
// 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/messenger/serve-outdated.js
|
|
7866
7867
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7867
7868
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
7868
7869
|
var OUTDATED_CHECK_MS = 6e4;
|
|
@@ -7948,7 +7949,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7948
7949
|
};
|
|
7949
7950
|
}, "watchOutdated");
|
|
7950
7951
|
|
|
7951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7952
|
+
// 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/messenger/serve-stems.js
|
|
7952
7953
|
var STEMS_EVERY_MS = 3e4;
|
|
7953
7954
|
var STEMS_SLICE_MS = 2e3;
|
|
7954
7955
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7988,7 +7989,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7988
7989
|
};
|
|
7989
7990
|
}, "stemFills");
|
|
7990
7991
|
|
|
7991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7992
|
+
// 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/messenger/message-items.js
|
|
7992
7993
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7993
7994
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7994
7995
|
kind: attachment.kind,
|
|
@@ -8084,7 +8085,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8084
8085
|
locale: messenger.app.locale
|
|
8085
8086
|
}), "viewOf");
|
|
8086
8087
|
|
|
8087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8088
|
+
// 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/messenger/watch-answers.js
|
|
8088
8089
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8089
8090
|
value: value.value,
|
|
8090
8091
|
observed_at: value.observedAt,
|
|
@@ -8151,7 +8152,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8151
8152
|
}
|
|
8152
8153
|
}, "watchEventItem");
|
|
8153
8154
|
|
|
8154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8155
|
+
// 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/messenger/watch-command.js
|
|
8155
8156
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8156
8157
|
output: { entity: "watch_item" },
|
|
8157
8158
|
effects: REMOTE_READ,
|
|
@@ -8306,7 +8307,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8306
8307
|
}
|
|
8307
8308
|
}, "describe");
|
|
8308
8309
|
|
|
8309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8310
|
+
// 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/messenger/serve-command.js
|
|
8310
8311
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8311
8312
|
const command = annotate(new Command("serve"), {
|
|
8312
8313
|
output: { entity: "serve_summary" },
|
|
@@ -8589,7 +8590,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8589
8590
|
};
|
|
8590
8591
|
}, "tasking");
|
|
8591
8592
|
|
|
8592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8593
|
+
// 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/messenger/store-tables-command.js
|
|
8593
8594
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8594
8595
|
var PATH = "store tables list";
|
|
8595
8596
|
var STORE_TABLES_QUERY = {
|
|
@@ -8632,7 +8633,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8632
8633
|
return tables;
|
|
8633
8634
|
}, "storeTablesCommand");
|
|
8634
8635
|
|
|
8635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8636
|
+
// 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/messenger/store-maintenance-command.js
|
|
8636
8637
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8637
8638
|
var WORD_INDEX = "message_words";
|
|
8638
8639
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -9118,7 +9119,7 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
|
|
|
9118
9119
|
await unsealFile(from, to, await passwordOf(this, { twice: false }));
|
|
9119
9120
|
result(this, { path: to, from, bytes: bytesOf2(to) });
|
|
9120
9121
|
}), "decryptCommand");
|
|
9121
|
-
var restoreCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE }).summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
9122
|
+
var restoreCommand = /* @__PURE__ */ __name((owner) => grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })).summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
9122
9123
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9123
9124
|
const given = resolve(file2);
|
|
9124
9125
|
if (!existsSync10(given))
|
|
@@ -9250,7 +9251,7 @@ var quiesce = /* @__PURE__ */ __name(async (path, owner, then, warn, waitMs = ST
|
|
|
9250
9251
|
database.close();
|
|
9251
9252
|
}
|
|
9252
9253
|
}, "quiesce");
|
|
9253
|
-
var resetCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("reset"), { output: { entity: "store_reset" }, effects: LOCAL_WRITE }).summary(`back up the ${archive(owner)} and replace it with an empty one`).description("back the store up beside itself, then delete it and start an empty one at this build's schema; asks first, or --yes").option("--no-backup", "delete the store without backing it up first").option("--dry-run", "list every table it would empty, with its rows, and delete nothing").action(async function({ backup: keep, dryRun: dryRun2 }) {
|
|
9254
|
+
var resetCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("reset"), { output: { entity: "store_reset" }, effects: LOCAL_WRITE, mcp: false }).summary(`back up the ${archive(owner)} and replace it with an empty one`).description("back the store up beside itself, then delete it and start an empty one at this build's schema; asks first, or --yes").option("--no-backup", "delete the store without backing it up first").option("--dry-run", "list every table it would empty, with its rows, and delete nothing").action(async function({ backup: keep, dryRun: dryRun2 }) {
|
|
9254
9255
|
const { renderer } = outputFor(this);
|
|
9255
9256
|
const { command } = owner.app;
|
|
9256
9257
|
const env = environmentOf(this).env ?? process.env;
|
|
@@ -9370,6 +9371,7 @@ export {
|
|
|
9370
9371
|
ENCRYPT_OPTION,
|
|
9371
9372
|
passwordOf,
|
|
9372
9373
|
DAY_MS,
|
|
9374
|
+
ownPackageRoot,
|
|
9373
9375
|
messageItem,
|
|
9374
9376
|
messageItems,
|
|
9375
9377
|
selfOf,
|
|
@@ -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/cli/stdin-field.js
|
|
8
8
|
var fields = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
var readsStdin = /* @__PURE__ */ __name((command, field) => {
|
|
10
10
|
fields.set(command, field);
|