@wirecat/mail-cli 0.25.0 → 0.26.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 +35 -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-6NXVQLUQ.js} +11 -11
- package/dist/bundle/{anthropic-5NKQXIHM.js → anthropic-OLNFE2CL.js} +5 -5
- package/dist/bundle/{app-server-G2CJNT4R.js → app-server-J76N6XIK.js} +51 -51
- package/dist/bundle/{bun-6HBYWQIX.js → bun-6PYDHXNR.js} +2 -2
- package/dist/bundle/{bun-sqlite-DXIQ7BVR.js → bun-sqlite-QD5PFHPS.js} +6 -6
- package/dist/bundle/{chunk-5ZYFV6FD.js → chunk-2E2EV4HD.js} +103 -71
- package/dist/bundle/{chunk-T27IMG6X.js → chunk-2TCS4PLJ.js} +1 -1
- package/dist/bundle/{chunk-EXVY76VO.js → chunk-3J2UJFBJ.js} +19 -18
- package/dist/bundle/{chunk-LVGX7VTD.js → chunk-3RY4HC4V.js} +63 -5
- package/dist/bundle/{chunk-LGZPKKBN.js → chunk-3XTKQ5EM.js} +3 -2
- package/dist/bundle/{chunk-CIWWNBVW.js → chunk-4Q6KAV4O.js} +8 -8
- package/dist/bundle/{chunk-IXO4SCKE.js → chunk-52M5BAEG.js} +1 -1
- package/dist/bundle/{chunk-DIA56CS7.js → chunk-5WROIMUV.js} +11 -7
- package/dist/bundle/{chunk-ADKMBXY4.js → chunk-66C66FNK.js} +1 -1
- package/dist/bundle/{chunk-MBFPFWCO.js → chunk-76EKZSDK.js} +27 -27
- package/dist/bundle/{chunk-XQYKIZMG.js → chunk-76VSHS5Y.js} +12 -9
- 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-7GLJSJ7M.js → chunk-A3EBRXOQ.js} +1 -1
- package/dist/bundle/{chunk-XMDEM6BZ.js → chunk-A6XETABW.js} +276 -254
- package/dist/bundle/{chunk-S2QRAKQI.js → chunk-AJ5K74X6.js} +17 -17
- package/dist/bundle/{chunk-QQUY4MZY.js → chunk-BDYQQ6G2.js} +1 -1
- package/dist/bundle/{chunk-JG4MNYG2.js → chunk-BMGRDZM3.js} +1 -1
- package/dist/bundle/{chunk-WX6OYVCH.js → chunk-CFBIPM7T.js} +363 -270
- package/dist/bundle/{chunk-HEIDAHRC.js → chunk-CZI45AQM.js} +2 -2
- package/dist/bundle/{chunk-VL6H2BND.js → chunk-DKIVYAXW.js} +18 -17
- package/dist/bundle/{chunk-IZOYW4Z4.js → chunk-ECZSYLSL.js} +24 -9
- package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-EDWJ7IYH.js} +1 -1
- package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-G5LHHAW2.js → chunk-GIG7F6UW.js} +6 -6
- package/dist/bundle/{chunk-PHHH2NQP.js → chunk-H2IJQH5X.js} +15 -113
- package/dist/bundle/{chunk-QB3DP2TN.js → chunk-HI5XUETY.js} +2 -2
- package/dist/bundle/{chunk-PGC5TRH6.js → chunk-HNSBXC6U.js} +3 -3
- package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
- package/dist/bundle/{chunk-VFU7PVPQ.js → chunk-JNKXU7AE.js} +62 -60
- package/dist/bundle/{chunk-BC7PFQL7.js → chunk-JVJG54QK.js} +40 -2
- package/dist/bundle/{chunk-PP3YOAWG.js → chunk-KXASCNOV.js} +3 -3
- package/dist/bundle/{chunk-3XVR2ROR.js → chunk-LMTQMYUF.js} +31 -31
- package/dist/bundle/{chunk-CBYBZCQP.js → chunk-LTZGLOKE.js} +3 -2
- package/dist/bundle/{chunk-HJSJBNCJ.js → chunk-M2LATBP2.js} +28 -9
- package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-HLXVUMZJ.js → chunk-M4Y33SJJ.js} +2 -2
- package/dist/bundle/{chunk-MWGH3M46.js → chunk-M7ECSGSN.js} +3 -3
- package/dist/bundle/{chunk-OLLIWNFG.js → chunk-M7RHPCXM.js} +3 -3
- package/dist/bundle/{chunk-B7SWTH5O.js → chunk-MIWSCTLG.js} +2 -2
- package/dist/bundle/{chunk-GY4XCLCO.js → chunk-NBJU6MBU.js} +8 -8
- package/dist/bundle/{chunk-Z5T6OW3V.js → chunk-NMFPK3MU.js} +4 -4
- package/dist/bundle/{chunk-HEYVMAAQ.js → chunk-OGE7YG4J.js} +2 -2
- package/dist/bundle/{chunk-A6BPOX5O.js → chunk-PJ6YMNJG.js} +3954 -3685
- package/dist/bundle/{chunk-OLKCJBZY.js → chunk-PY2IOVUN.js} +5 -5
- package/dist/bundle/{chunk-WOAYHCM2.js → chunk-QI6EXKSH.js} +1 -1
- package/dist/bundle/{chunk-YNS2YVUR.js → chunk-QJGG6QYV.js} +9 -9
- package/dist/bundle/{chunk-K2OGF7KC.js → chunk-RXKIP2ML.js} +2 -2
- package/dist/bundle/{chunk-SMTBV62X.js → chunk-T7SHPALQ.js} +26 -24
- package/dist/bundle/{chunk-GJRYZXBN.js → chunk-UE2NKPA4.js} +9 -9
- package/dist/bundle/{chunk-P6GXNT7Z.js → chunk-UNJUCK5R.js} +13 -13
- package/dist/bundle/{chunk-ND5H5ADM.js → chunk-V32L23NN.js} +4 -4
- package/dist/bundle/{chunk-IACWKZWS.js → chunk-V4PFD25P.js} +1 -1
- package/dist/bundle/{chunk-37F6QYTO.js → chunk-VA4V73SL.js} +6 -6
- package/dist/bundle/{chunk-U6IQ6YQ2.js → chunk-VJPLIXV4.js} +8 -2
- package/dist/bundle/{chunk-PQMJ5BXH.js → chunk-VWRT57QU.js} +4 -4
- package/dist/bundle/{chunk-KFB2X6KE.js → chunk-XELZCDWE.js} +191 -160
- package/dist/bundle/{chunk-KK4HD3SI.js → chunk-XUJEZ5YF.js} +6 -6
- package/dist/bundle/{chunk-434YOD6A.js → chunk-XZ7CQ6NA.js} +4 -4
- package/dist/bundle/{chunk-5QYK3LWS.js → chunk-YM345236.js} +119 -38
- package/dist/bundle/{chunk-J4OYK4WL.js → chunk-YXGHC3NP.js} +12 -12
- package/dist/bundle/{chunk-FZZD4AFY.js → chunk-ZZSZN4CJ.js} +22 -15
- package/dist/bundle/command-contract-NNEXHZW5.js +36 -0
- package/dist/bundle/{command-server-entry-XMSSY5ID.js → command-server-entry-AIBWNC5D.js} +25 -25
- package/dist/bundle/{decode-RYGB4PGT.js → decode-H7KLRD33.js} +5 -5
- package/dist/bundle/{dispatch-PLQOIZG5.js → dispatch-DSVN7MNG.js} +8 -8
- package/dist/bundle/{dist-GY2AQETI.js → dist-YYSP43J3.js} +19 -15
- package/dist/bundle/{echarts-7CM2MCMW.js → echarts-VSD3LS6D.js} +2 -2
- package/dist/bundle/{embed-FTBDPOPT.js → embed-UENZ5HN3.js} +6 -6
- package/dist/bundle/{embedder-B43WGNBD.js → embedder-MJMGOJT7.js} +9 -9
- package/dist/bundle/{failure-XP5QYV2T.js → failure-COTPFUP4.js} +2 -2
- package/dist/bundle/{first-run-XIIUARNM.js → first-run-HYALREFN.js} +12 -12
- package/dist/bundle/first-screen-GPF5RHBX.js +34 -0
- package/dist/bundle/{instructions-R7OHVAWH.js → instructions-WOHRYOLN.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-4BRWJJCE.js} +2 -2
- package/dist/bundle/{node-sqlite-WFJXW3CZ.js → node-sqlite-D3QESEYQ.js} +7 -7
- package/dist/bundle/{oauth-SVJLQTWV.js → oauth-T7TTOBIZ.js} +7 -7
- package/dist/bundle/{open-ZDONVKSX.js → open-6P6627QB.js} +5 -5
- package/dist/bundle/{openai-XVEW6XOU.js → openai-FIMCJGAP.js} +21 -20
- package/dist/bundle/{process-YAHHUFR5.js → process-35IH3WHC.js} +1 -1
- package/dist/bundle/{program-HU2UVMJE.js → program-IEXB72IK.js} +1475 -987
- package/dist/bundle/{prompt-JAJ2CUJI.js → prompt-HFBCPMVL.js} +5 -5
- package/dist/bundle/{recognize-UFBWUNFR.js → recognize-CNL4HJ7Z.js} +4 -4
- package/dist/bundle/{remote-2GFOVLCR.js → remote-AYGZI7HT.js} +9 -9
- package/dist/bundle/{rerank-BGPSMXTL.js → rerank-5C2OZZXD.js} +7 -7
- package/dist/bundle/{serve-CB3XJTH3.js → serve-S6OYBDIB.js} +9 -9
- package/dist/bundle/{server-M7FQY7TX.js → server-VKO6E6PI.js} +42 -42
- package/dist/bundle/server-WXSHVDME.js +68 -0
- package/dist/bundle/{sqlite-runtime-AEV6PGDR.js → sqlite-runtime-DBTGNTVE.js} +6 -6
- package/dist/bundle/{state-YLBEQLBI.js → state-ZQG6AL2Y.js} +6 -6
- package/dist/bundle/{store-EKWKY6GG.js → store-B7BXWILZ.js} +21 -19
- package/dist/bundle/{store-CDUL3HKK.js → store-LY4QKTOO.js} +17 -17
- package/dist/bundle/store-maintenance-command-UR6NQDVV.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
|
@@ -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.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
8
8
|
var TIME_LIMIT_FUNCTION = "wc_time_limit";
|
|
9
9
|
var TimeLimitReached = class extends Error {
|
|
10
10
|
static {
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
servicesFor,
|
|
17
17
|
throughWrapper,
|
|
18
18
|
withFileLockAsync
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CFBIPM7T.js";
|
|
20
20
|
import {
|
|
21
21
|
servingProfiles
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HNSBXC6U.js";
|
|
23
23
|
import {
|
|
24
24
|
asFirstWord,
|
|
25
25
|
baseContext,
|
|
@@ -33,44 +33,45 @@ import {
|
|
|
33
33
|
recalledAccount,
|
|
34
34
|
rememberAccount,
|
|
35
35
|
rootOf2 as rootOf
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XELZCDWE.js";
|
|
37
37
|
import {
|
|
38
38
|
AUTHORITY_KEY,
|
|
39
39
|
CEILING_KEY,
|
|
40
40
|
DEFAULT_PERMISSIONS,
|
|
41
|
+
KEYED_UNDER_HOUSEKEEPING,
|
|
41
42
|
WRITE_KEYS,
|
|
42
43
|
keyForCommand,
|
|
43
44
|
levelFor,
|
|
44
45
|
readKeysForCommand,
|
|
45
46
|
skipFlagFor
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-5WROIMUV.js";
|
|
47
48
|
import {
|
|
48
49
|
providerErrorKey
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-76VSHS5Y.js";
|
|
50
51
|
import {
|
|
51
52
|
openStore
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-PJ6YMNJG.js";
|
|
53
54
|
import {
|
|
54
55
|
chatReferenceOf,
|
|
55
56
|
ensureAccount,
|
|
56
57
|
foldName,
|
|
57
58
|
isId,
|
|
58
59
|
pickPerson
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-A6XETABW.js";
|
|
60
61
|
import {
|
|
61
62
|
isCliFailure
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-VJPLIXV4.js";
|
|
63
64
|
import {
|
|
64
65
|
resolvePaths
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-7MEVD5PI.js";
|
|
66
67
|
import {
|
|
67
68
|
CliError
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-7KCBPAQS.js";
|
|
69
70
|
import {
|
|
70
71
|
__name
|
|
71
72
|
} from "./chunk-ZVVMGPBJ.js";
|
|
72
73
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
74
75
|
import { openSync } from "node:fs";
|
|
75
76
|
import { createInterface } from "node:readline";
|
|
76
77
|
import { ReadStream } from "node:tty";
|
|
@@ -125,7 +126,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
125
126
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
126
127
|
}, "terminalAsker");
|
|
127
128
|
|
|
128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
129
130
|
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
130
131
|
import { join } from "node:path";
|
|
131
132
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -220,7 +221,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
220
221
|
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
221
222
|
}, "waitForTurn");
|
|
222
223
|
|
|
223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
224
225
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
225
226
|
"help",
|
|
226
227
|
"guide",
|
|
@@ -234,7 +235,7 @@ var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
|
234
235
|
"mcp",
|
|
235
236
|
"runs"
|
|
236
237
|
]);
|
|
237
|
-
var commandPathKey = /* @__PURE__ */ __name((path) => path[0] === void 0 || HOUSEKEEPING.has(path[0]) ? null : path.join("."), "commandPathKey");
|
|
238
|
+
var commandPathKey = /* @__PURE__ */ __name((path) => path[0] === void 0 || HOUSEKEEPING.has(path[0]) && !KEYED_UNDER_HOUSEKEEPING.has(path.join(".")) ? null : path.join("."), "commandPathKey");
|
|
238
239
|
var commandPermissions = /* @__PURE__ */ __name(({ keyOf = commandPathKey, extra = [], defaults = {}, alsoChecks } = {}) => ({
|
|
239
240
|
keyOf,
|
|
240
241
|
extra: [AUTHORITY_KEY, ...extra],
|
|
@@ -300,7 +301,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
300
301
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
301
302
|
}, "refuseUnknownPermissionKeys");
|
|
302
303
|
|
|
303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
304
305
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
305
306
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
306
307
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -397,7 +398,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
397
398
|
});
|
|
398
399
|
}, "flooded");
|
|
399
400
|
|
|
400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
401
402
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
402
403
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
403
404
|
const write = currentOperation();
|
|
@@ -496,7 +497,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
496
497
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
497
498
|
}, "byPart");
|
|
498
499
|
|
|
499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
500
501
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
501
502
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
502
503
|
let warned = false;
|
|
@@ -1072,7 +1073,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1072
1073
|
}
|
|
1073
1074
|
}, "keep");
|
|
1074
1075
|
|
|
1075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1076
1077
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1077
1078
|
let opened;
|
|
1078
1079
|
return {
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
isCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7KCBPAQS.js";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
11
|
+
// 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/http/hosts.js
|
|
12
12
|
var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
|
|
13
13
|
var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
|
|
14
14
|
var hostProblems = /* @__PURE__ */ __name((hosts) => [
|
|
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
|
|
|
20
20
|
return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
|
|
21
21
|
}, "hostCovered");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
23
|
+
// 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/http/fetch.js
|
|
24
24
|
var HOST_FETCH_TIMEOUT_MS = 3e4;
|
|
25
25
|
var REDIRECTS = 5;
|
|
26
26
|
var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
@@ -108,7 +108,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
|
|
|
108
108
|
};
|
|
109
109
|
}, "hostFetch");
|
|
110
110
|
|
|
111
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
111
|
+
// 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/http/index.js
|
|
112
112
|
var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
|
|
113
113
|
if (!header)
|
|
114
114
|
return void 0;
|
|
@@ -132,7 +132,65 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
|
|
|
132
132
|
}, "parseRateLimitReset");
|
|
133
133
|
var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
|
|
134
134
|
|
|
135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
136
|
+
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
137
|
+
try {
|
|
138
|
+
const url = new URL(value);
|
|
139
|
+
return ["https:", "http:"].includes(url.protocol) && !url.username && !url.password && !url.search && !url.hash;
|
|
140
|
+
} catch {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}, "endpoint");
|
|
144
|
+
var loopback = /* @__PURE__ */ __name((hostname) => hostname === "localhost" || hostname === "[::1]" || /^127(\.\d{1,3}){3}$/.test(hostname), "loopback");
|
|
145
|
+
var onThisComputer = /* @__PURE__ */ __name((value) => {
|
|
146
|
+
try {
|
|
147
|
+
return loopback(new URL(value).hostname);
|
|
148
|
+
} catch {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
}, "onThisComputer");
|
|
152
|
+
var modelAddressAllowed = /* @__PURE__ */ __name((value) => endpoint(value) && (new URL(value).protocol === "https:" || onThisComputer(value)), "modelAddressAllowed");
|
|
153
|
+
var PLAIN_HTTP_REFUSED = "this address is not allowed: use https, or http only on this computer";
|
|
154
|
+
var literalFetch = /* @__PURE__ */ __name((hostname, timeoutMs) => async (input, init = {}) => {
|
|
155
|
+
const url = new URL(input instanceof Request ? input.url : String(input));
|
|
156
|
+
if (url.hostname !== hostname)
|
|
157
|
+
throw new CliError("configuration_error", `${url.hostname} is not the model address's host, ${hostname}`, {
|
|
158
|
+
reason: "network.host-undeclared",
|
|
159
|
+
sent: false
|
|
160
|
+
});
|
|
161
|
+
const deadline2 = AbortSignal.timeout(timeoutMs);
|
|
162
|
+
const signal = init.signal ? AbortSignal.any([init.signal, deadline2]) : deadline2;
|
|
163
|
+
try {
|
|
164
|
+
const response = await fetch(input, { ...init, signal, redirect: "manual" });
|
|
165
|
+
if (response.status >= 300 && response.status < 400) {
|
|
166
|
+
void response.body?.cancel().catch(() => {
|
|
167
|
+
});
|
|
168
|
+
throw new CliError("invalid_response", `${hostname} answered with a redirect, which is not followed`);
|
|
169
|
+
}
|
|
170
|
+
return response;
|
|
171
|
+
} catch (error) {
|
|
172
|
+
if (isCliError(error))
|
|
173
|
+
throw error;
|
|
174
|
+
if (init.signal?.aborted)
|
|
175
|
+
throw new CliError("cancelled", "request cancelled");
|
|
176
|
+
if (deadline2.aborted)
|
|
177
|
+
throw new CliError("timeout", `${hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
|
|
178
|
+
throw new CliError("network_error", `${hostname} could not be reached`, { retryable: true });
|
|
179
|
+
}
|
|
180
|
+
}, "literalFetch");
|
|
181
|
+
var endpointFetch = /* @__PURE__ */ __name((address, timeoutMs) => {
|
|
182
|
+
const { hostname } = new URL(address);
|
|
183
|
+
if (hostname === "[::1]")
|
|
184
|
+
return fetch;
|
|
185
|
+
return hostname.startsWith("[") ? literalFetch(hostname, timeoutMs) : hostFetch({ hosts: [hostname], timeoutMs });
|
|
186
|
+
}, "endpointFetch");
|
|
187
|
+
|
|
135
188
|
export {
|
|
136
189
|
hostFetch,
|
|
137
|
-
providerWaitMs
|
|
190
|
+
providerWaitMs,
|
|
191
|
+
endpoint,
|
|
192
|
+
onThisComputer,
|
|
193
|
+
modelAddressAllowed,
|
|
194
|
+
PLAIN_HTTP_REFUSED,
|
|
195
|
+
endpointFetch
|
|
138
196
|
};
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
resolvePaths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7MEVD5PI.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { realpathSync } from "node:fs";
|
|
12
12
|
import { userInfo } from "node:os";
|
|
13
13
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
@@ -49,5 +49,6 @@ export {
|
|
|
49
49
|
storePath,
|
|
50
50
|
accountHome,
|
|
51
51
|
inOwnerFolder,
|
|
52
|
+
settled,
|
|
52
53
|
refuseOwnerStoreInTests
|
|
53
54
|
};
|
|
@@ -2,33 +2,33 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
stdinFieldOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EDWJ7IYH.js";
|
|
6
6
|
import {
|
|
7
7
|
commandPathOf
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PY2IOVUN.js";
|
|
9
9
|
import {
|
|
10
10
|
commandServerRequest,
|
|
11
11
|
metaOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XELZCDWE.js";
|
|
13
13
|
import {
|
|
14
14
|
errorObjectOf,
|
|
15
15
|
renderError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ECZSYLSL.js";
|
|
17
17
|
import {
|
|
18
18
|
CliError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7KCBPAQS.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
25
25
|
import { createInterface } from "node:readline";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
|
|
28
28
|
var COMMAND_SERVER_ARGV = ["commands", "--serve"];
|
|
29
29
|
var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
|
|
30
30
|
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
32
32
|
var COMMAND_SERVER_PROTOCOL = 1;
|
|
33
33
|
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
34
34
|
var COMMAND_SERVER_CONCURRENT = 8;
|
|
@@ -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.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
fieldsOf,
|
|
6
6
|
processStreams,
|
|
7
7
|
projectFields
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7MEVD5PI.js";
|
|
9
9
|
import {
|
|
10
10
|
COMPACT_FLAG
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ECZSYLSL.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
singleLine
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7KCBPAQS.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.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
21
21
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
22
22
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
23
23
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -43,6 +43,7 @@ var DEFAULT_PERMISSIONS = {
|
|
|
43
43
|
"store.clear": "ask",
|
|
44
44
|
"store.decrypt": "ask",
|
|
45
45
|
"store.copies.delete": "ask",
|
|
46
|
+
"store.recover.run": "ask",
|
|
46
47
|
"server.start": "ask",
|
|
47
48
|
"server.stop": "ask",
|
|
48
49
|
"server.restart": "ask",
|
|
@@ -332,6 +333,8 @@ var readKeysForCommand = /* @__PURE__ */ __name((path) => {
|
|
|
332
333
|
return [key, "messages"];
|
|
333
334
|
if (path[0] === "store" && ["reset", "clear", "decrypt"].includes(path[1] ?? ""))
|
|
334
335
|
return [key, "messages"];
|
|
336
|
+
if (key === "store.recover.run")
|
|
337
|
+
return [key, "messages"];
|
|
335
338
|
if (path[0] === "search") {
|
|
336
339
|
if (path[1] === "notes")
|
|
337
340
|
return [key];
|
|
@@ -418,7 +421,7 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
418
421
|
}
|
|
419
422
|
}, "assertRetentionEvidenceRead");
|
|
420
423
|
|
|
421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
422
425
|
var named = /* @__PURE__ */ __name((work) => {
|
|
423
426
|
try {
|
|
424
427
|
return work();
|
|
@@ -445,7 +448,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
445
448
|
return projectFields(value, fields);
|
|
446
449
|
}), "projectFields");
|
|
447
450
|
|
|
448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
449
452
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
450
453
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
451
454
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -481,7 +484,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
481
484
|
return value;
|
|
482
485
|
}, "atDetail");
|
|
483
486
|
|
|
484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/output.js
|
|
485
488
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
486
489
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
487
490
|
if (other)
|
|
@@ -549,6 +552,7 @@ export {
|
|
|
549
552
|
LEVELS,
|
|
550
553
|
skipFlagFor,
|
|
551
554
|
DEFAULT_PERMISSIONS,
|
|
555
|
+
KEYED_UNDER_HOUSEKEEPING,
|
|
552
556
|
AUTHORITY_KEY,
|
|
553
557
|
authorityAllowed,
|
|
554
558
|
BOT_API_KEY,
|
|
@@ -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.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -13,20 +13,20 @@ import {
|
|
|
13
13
|
kindsIn,
|
|
14
14
|
providerNamed,
|
|
15
15
|
providers
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2E2EV4HD.js";
|
|
17
17
|
import {
|
|
18
18
|
isCliFailure,
|
|
19
19
|
isStoreDamage
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VJPLIXV4.js";
|
|
21
21
|
import {
|
|
22
22
|
refuseOwnerStoreInTests
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3XTKQ5EM.js";
|
|
24
24
|
import {
|
|
25
25
|
createRecordLog,
|
|
26
26
|
resolvePaths,
|
|
27
27
|
traceIdOf,
|
|
28
28
|
writeSecurely
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7MEVD5PI.js";
|
|
30
30
|
import {
|
|
31
31
|
array,
|
|
32
32
|
boolean,
|
|
@@ -45,25 +45,25 @@ import {
|
|
|
45
45
|
strictObject,
|
|
46
46
|
string,
|
|
47
47
|
unknown
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ECZSYLSL.js";
|
|
49
49
|
import {
|
|
50
50
|
CliError
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-7KCBPAQS.js";
|
|
52
52
|
import {
|
|
53
53
|
__name
|
|
54
54
|
} from "./chunk-ZVVMGPBJ.js";
|
|
55
55
|
|
|
56
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
57
57
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
58
58
|
import { randomBytes } from "node:crypto";
|
|
59
59
|
|
|
60
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
61
61
|
import { randomUUID } from "node:crypto";
|
|
62
62
|
import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
63
63
|
import { userInfo } from "node:os";
|
|
64
64
|
import { join, sep } from "node:path";
|
|
65
65
|
|
|
66
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
67
67
|
var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
68
68
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
69
69
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -76,7 +76,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
76
76
|
error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
|
|
77
77
|
}), "snakeLogger");
|
|
78
78
|
|
|
79
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
79
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
80
80
|
var diagnostic = {
|
|
81
81
|
event: true,
|
|
82
82
|
operation: true,
|
|
@@ -150,7 +150,7 @@ var LOG_ATTRIBUTES = [
|
|
|
150
150
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
151
151
|
].sort();
|
|
152
152
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
154
154
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
155
155
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
156
156
|
var KEEP_STORE_RUNS_FOR_DAYS = 3;
|
|
@@ -517,7 +517,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
517
517
|
};
|
|
518
518
|
}, "metadataOf");
|
|
519
519
|
|
|
520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
521
521
|
var scopes = new AsyncLocalStorage();
|
|
522
522
|
var processScope;
|
|
523
523
|
var ownProcesses = new AsyncLocalStorage();
|
|
@@ -568,7 +568,7 @@ var attempts = new AsyncLocalStorage();
|
|
|
568
568
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
569
569
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
570
570
|
|
|
571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
572
572
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
573
573
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
574
574
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -583,7 +583,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
583
583
|
}
|
|
584
584
|
__name(closeTask, "closeTask");
|
|
585
585
|
|
|
586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
587
587
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
588
588
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
589
589
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -612,7 +612,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
612
612
|
}, "priorityOf");
|
|
613
613
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
614
614
|
|
|
615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
616
616
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
617
617
|
async function find(id2) {
|
|
618
618
|
const task = await store.get(id2);
|
|
@@ -672,20 +672,20 @@ function median(values) {
|
|
|
672
672
|
}
|
|
673
673
|
__name(median, "median");
|
|
674
674
|
|
|
675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
676
676
|
function matches(task, filter) {
|
|
677
677
|
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
678
678
|
}
|
|
679
679
|
__name(matches, "matches");
|
|
680
680
|
|
|
681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
682
682
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
683
683
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
684
684
|
var ERASED_TEXT = "[source erased]";
|
|
685
685
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
686
686
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
687
687
|
|
|
688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
689
689
|
var text = string();
|
|
690
690
|
var id = pipe(string(), minLength(1));
|
|
691
691
|
var time = isoTime;
|
|
@@ -710,7 +710,7 @@ var author = strictObject({
|
|
|
710
710
|
name: nullable(text)
|
|
711
711
|
});
|
|
712
712
|
|
|
713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
714
714
|
var organization = strictObject({
|
|
715
715
|
id,
|
|
716
716
|
ref: reference,
|
|
@@ -740,7 +740,7 @@ var reminder = strictObject({
|
|
|
740
740
|
receipt: nullable(text)
|
|
741
741
|
});
|
|
742
742
|
|
|
743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
744
744
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
745
745
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
746
746
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -748,7 +748,7 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
748
748
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
749
749
|
var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
750
750
|
|
|
751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
752
752
|
import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
753
753
|
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
754
754
|
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
@@ -869,7 +869,7 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
|
|
|
869
869
|
return { previous, cleared };
|
|
870
870
|
}, "recordDeepCheck");
|
|
871
871
|
|
|
872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
873
873
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
874
874
|
var inSource = /* @__PURE__ */ __name((source, provider) => source === "all" || source === "bots" && isBotProvider(provider) || source === "personal" && !isBotProvider(provider) || source === provider || providerNamed(source)?.name === provider || isKind(source) && holdsKindOf(provider, source), "inSource");
|
|
875
875
|
var fail = /* @__PURE__ */ __name((message) => {
|
|
@@ -892,7 +892,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
892
892
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
893
893
|
}, "sourceOf");
|
|
894
894
|
|
|
895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
896
896
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
897
897
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
898
898
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -1102,7 +1102,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind) =>
|
|
|
1102
1102
|
return { accounts: [...chosen.values()], skipped };
|
|
1103
1103
|
}, "fitting");
|
|
1104
1104
|
|
|
1105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
|
|
1106
1106
|
var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
|
|
1107
1107
|
var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
1108
1108
|
const reporter = row.account_id == null ? void 0 : "reporter" in row ? row.reporter : database.prepare("SELECT provider || ':' || external_id AS key FROM accounts WHERE id = ?").get(Number(row.account_id))?.key;
|
|
@@ -1112,7 +1112,7 @@ var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
|
1112
1112
|
};
|
|
1113
1113
|
}, "sourceOf");
|
|
1114
1114
|
|
|
1115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
1116
1116
|
var LINK_KINDS = [
|
|
1117
1117
|
"links-to",
|
|
1118
1118
|
"blocked-by",
|
|
@@ -1132,11 +1132,11 @@ var LINK_KINDS = [
|
|
|
1132
1132
|
"attached"
|
|
1133
1133
|
];
|
|
1134
1134
|
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
1135
|
-
var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
|
|
1135
|
+
var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
|
|
1136
1136
|
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
1137
1137
|
var COUNTERPART_ROLE = "counterpart";
|
|
1138
1138
|
|
|
1139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/domain/categories.js
|
|
1140
1140
|
var CATEGORIES = ["client", "supplier", "partner", "employer"];
|
|
1141
1141
|
|
|
1142
1142
|
export {
|