@wirecat/mail-cli 0.33.0 → 0.34.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 +16 -0
- package/contracts/wirecat.json +2 -2
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-W3CGXEEJ.js → all-profiles-2KUKROHY.js} +10 -10
- package/dist/bundle/{anthropic-UMDO5AKP.js → anthropic-E5KRCEVC.js} +8 -8
- package/dist/bundle/{app-server-4SICQ5RP.js → app-server-HIQ3QO5K.js} +60 -52
- package/dist/bundle/{bun-QVVCH4MJ.js → bun-KARJPE5D.js} +2 -2
- package/dist/bundle/{bun-sqlite-CHD4AIUK.js → bun-sqlite-NHGX6ZUN.js} +6 -6
- package/dist/bundle/{chunk-TK77DCE5.js → chunk-26DYRMXE.js} +1 -1
- package/dist/bundle/{chunk-JADBHKBP.js → chunk-2GDLJKPT.js} +1 -1
- package/dist/bundle/{chunk-JUYUWMTG.js → chunk-2SCQ7Z4I.js} +4 -4
- package/dist/bundle/{chunk-Y2P2LC5R.js → chunk-2VBEBPGX.js} +9 -9
- package/dist/bundle/{chunk-OOYIPK4F.js → chunk-4SKE5GYA.js} +1 -1
- package/dist/bundle/{chunk-H46MANPR.js → chunk-4URI6EAV.js} +3 -3
- package/dist/bundle/chunk-4VHK5UBM.js +170 -0
- package/dist/bundle/{chunk-L3MKFI3Y.js → chunk-4VM3UCSO.js} +2 -2
- package/dist/bundle/chunk-5GANGHQI.js +721 -0
- package/dist/bundle/{chunk-AEKWEYIG.js → chunk-6G4VQFVX.js} +19 -19
- package/dist/bundle/{chunk-KLLT572M.js → chunk-6GGMFL7J.js} +3 -3
- package/dist/bundle/{chunk-UYZDH5LK.js → chunk-6LFRZDPV.js} +1 -1
- package/dist/bundle/{chunk-LB5FTCPZ.js → chunk-A2Y2RFNW.js} +75 -10
- package/dist/bundle/{chunk-35AH33VJ.js → chunk-AGZ7SNFF.js} +1 -1
- package/dist/bundle/chunk-CKVWAUBW.js +787 -0
- package/dist/bundle/{chunk-QN423PC6.js → chunk-DYQGEZA2.js} +3 -3
- package/dist/bundle/{chunk-BF73DBAA.js → chunk-DZRP4UCK.js} +13 -13
- package/dist/bundle/{chunk-CZ6ZXDSO.js → chunk-EGQJDEFY.js} +74 -36
- package/dist/bundle/{chunk-BRRHYXUP.js → chunk-EZAX77SM.js} +20 -20
- package/dist/bundle/{chunk-47YNANPZ.js → chunk-FNYWC6A3.js} +2 -2
- package/dist/bundle/chunk-FORAOCZ3.js +334 -0
- package/dist/bundle/{chunk-EW3JFV7J.js → chunk-H77ALM2Y.js} +4 -4
- package/dist/bundle/{chunk-OWAJN74H.js → chunk-HH647UBC.js} +23 -23
- package/dist/bundle/{chunk-74BYHR44.js → chunk-HRDCH2VB.js} +620 -622
- package/dist/bundle/{chunk-SDWYOYGN.js → chunk-I3MS74OF.js} +4 -4
- package/dist/bundle/{chunk-FSMCXQH2.js → chunk-IMQ4CVZJ.js} +2 -2
- package/dist/bundle/{chunk-XN5KH24X.js → chunk-JVGVLRBA.js} +5 -5
- package/dist/bundle/{chunk-MNJ3BMPZ.js → chunk-KF6O4RZO.js} +3 -3
- package/dist/bundle/{chunk-UX76GMQM.js → chunk-KGYK3OI3.js} +6 -6
- package/dist/bundle/{chunk-BZY5W35X.js → chunk-KLI5FKZ2.js} +7 -7
- package/dist/bundle/chunk-KNVTBDTE.js +72 -0
- package/dist/bundle/{chunk-SW7YGW3T.js → chunk-LKTDW5LH.js} +7 -7
- package/dist/bundle/{chunk-UWF3SSRL.js → chunk-LOSYDRJU.js} +28 -8
- package/dist/bundle/{chunk-MT7T5N2N.js → chunk-MDISZMK4.js} +4 -4
- package/dist/bundle/{chunk-CIG4UVP6.js → chunk-MGXYIVVJ.js} +14 -13
- package/dist/bundle/{chunk-2BFXHCZW.js → chunk-NAENYLIO.js} +2 -2
- package/dist/bundle/{chunk-LXAX6AZU.js → chunk-NHD5BOJU.js} +6 -6
- package/dist/bundle/{chunk-IPSLQX64.js → chunk-NI4GCP2T.js} +2 -2
- package/dist/bundle/{chunk-CHNNKHLL.js → chunk-NJVJH5MH.js} +1206 -1544
- package/dist/bundle/{chunk-S6CHYNFE.js → chunk-NWD7AFOR.js} +2 -2
- package/dist/bundle/{chunk-7OYZU5SP.js → chunk-NXERDBEK.js} +4 -4
- package/dist/bundle/{chunk-2L6D54BR.js → chunk-OG5QO5RR.js} +8 -8
- package/dist/bundle/{chunk-2P44S7XK.js → chunk-OJ3BI2U4.js} +26 -24
- package/dist/bundle/chunk-OOYRMTX5.js +374 -0
- package/dist/bundle/{chunk-I3UAD4EI.js → chunk-OX5MCGXL.js} +40 -40
- package/dist/bundle/{chunk-LACMDMDI.js → chunk-PA4GEJXQ.js} +9 -9
- package/dist/bundle/{chunk-RENCSP47.js → chunk-PC3N3LH3.js} +3 -3
- package/dist/bundle/{chunk-UG2QDGAH.js → chunk-PRDKEVUL.js} +1 -1
- package/dist/bundle/{chunk-2X344EUT.js → chunk-PVZMN3UZ.js} +8 -8
- package/dist/bundle/{chunk-GZYICXO4.js → chunk-QFJC6POK.js} +1 -1
- package/dist/bundle/{chunk-OFMYFFEF.js → chunk-QOQF2TX3.js} +487 -1144
- package/dist/bundle/{chunk-BI5P7JWM.js → chunk-QQGPV3QN.js} +2 -2
- package/dist/bundle/{chunk-LXUHYDNE.js → chunk-QXLYLVEC.js} +1 -1
- package/dist/bundle/chunk-QXYNDMA6.js +259 -0
- package/dist/bundle/{chunk-HFFHL7SV.js → chunk-R2GS3GBJ.js} +61 -59
- package/dist/bundle/{chunk-LFBD6RTX.js → chunk-RPNQXWRS.js} +4 -4
- package/dist/bundle/{chunk-6IS4BEN4.js → chunk-SK3N4CK5.js} +4 -4
- package/dist/bundle/{chunk-JCQ47WR4.js → chunk-T2EE5M7O.js} +5 -5
- package/dist/bundle/{chunk-XQXYAOBV.js → chunk-TZJC4AOK.js} +26 -26
- package/dist/bundle/{chunk-LKGJMM6W.js → chunk-V43KEZYA.js} +9 -9
- package/dist/bundle/{chunk-SYUIAMVA.js → chunk-VBVR6JRC.js} +260 -516
- package/dist/bundle/{chunk-QO7BK4WD.js → chunk-VRGEDK4T.js} +8 -8
- package/dist/bundle/{chunk-DI74RP6R.js → chunk-WYGDALB3.js} +31 -85
- package/dist/bundle/{chunk-IBIFX2LK.js → chunk-X6IGETU6.js} +2 -2
- package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-XIF75Z7D.js} +1 -1
- package/dist/bundle/chunk-XWU3A7H6.js +29 -0
- package/dist/bundle/{chunk-TBZLGT7R.js → chunk-YWX5X5RI.js} +19 -117
- package/dist/bundle/{chunk-RXUVXAMM.js → chunk-Z6A6QPPW.js} +1 -1
- package/dist/bundle/{chunk-UAV74EY4.js → chunk-ZGZADWD7.js} +1 -1
- package/dist/bundle/{chunk-MJ7DUSHT.js → chunk-ZZEWQR43.js} +18 -14
- package/dist/bundle/command-contract-PZ7VOOXP.js +39 -0
- package/dist/bundle/{command-server-entry-G2ZHCN5J.js → command-server-entry-NF45UPEV.js} +28 -25
- package/dist/bundle/decode-DUZA3EHC.js +296 -0
- package/dist/bundle/{dispatch-RHIK22OA.js → dispatch-CDJZAMVP.js} +8 -8
- package/dist/bundle/{dist-X5G2IMYG.js → dist-RH7EMC4J.js} +29 -24
- package/dist/bundle/{echarts-UZJ6AREV.js → echarts-GZHZBNRA.js} +2 -2
- package/dist/bundle/{embed-FEXLUH3T.js → embed-VE3CSJN4.js} +6 -6
- package/dist/bundle/{embedder-NHQARKFJ.js → embedder-DSJ77DX5.js} +9 -9
- package/dist/bundle/{failure-7DIA4OET.js → failure-YH6HAGFT.js} +2 -2
- package/dist/bundle/{first-run-PS5NR2QG.js → first-run-3L7HLYTI.js} +12 -12
- package/dist/bundle/first-screen-MY5KID77.js +37 -0
- package/dist/bundle/{instructions-SDDUBGH4.js → instructions-OZK3BLIO.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-GN4FTJX5.js → mcp-YUG4YR4R.js} +2 -2
- package/dist/bundle/meeting-combined-RYMUPY54.js +24 -0
- package/dist/bundle/meeting-model-U7LW5WEN.js +24 -0
- package/dist/bundle/meeting-semantic-64IOIQRR.js +21 -0
- package/dist/bundle/{node-ELCNUOCE.js → node-OS3VWBUZ.js} +2 -2
- package/dist/bundle/{node-sqlite-2E5MKZMH.js → node-sqlite-RQ623VFA.js} +7 -7
- package/dist/bundle/{oauth-JGPEIY3M.js → oauth-CBPAG734.js} +7 -7
- package/dist/bundle/{open-6DEMCZAB.js → open-H4DGOMBC.js} +5 -5
- package/dist/bundle/{openai-IVKDU5AH.js → openai-EMWRGR54.js} +28 -26
- package/dist/bundle/{process-67DAKAAQ.js → process-3TOIYASI.js} +1 -1
- package/dist/bundle/{program-ESJDQMAJ.js → program-WA6RGAJL.js} +3075 -2024
- package/dist/bundle/{prompt-ZBWOT5KG.js → prompt-22KNCMBI.js} +5 -5
- package/dist/bundle/{recognize-UUBH2DOH.js → recognize-UWD4RSCZ.js} +4 -4
- package/dist/bundle/{remote-UYTNWNOB.js → remote-LJY7MF2E.js} +9 -9
- package/dist/bundle/{rerank-X2633CQN.js → rerank-JJ6KNJFB.js} +7 -7
- package/dist/bundle/{serve-CP7Q4OVW.js → serve-3EPLJYVZ.js} +9 -9
- package/dist/bundle/{server-I7MXRSAG.js → server-5JOFO4V4.js} +52 -44
- package/dist/bundle/server-EOQNS7B7.js +75 -0
- package/dist/bundle/{sqlite-runtime-BX55LI5G.js → sqlite-runtime-MGJA5E27.js} +6 -6
- package/dist/bundle/{state-LLNJQXFH.js → state-UCRDOWOP.js} +6 -6
- package/dist/bundle/{store-K4KU5N75.js → store-265VRRQV.js} +25 -20
- package/dist/bundle/{store-N27XI3VV.js → store-HS272YSA.js} +21 -17
- package/dist/bundle/store-maintenance-command-IKZM5NRP.js +66 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-NRNQAFFE.js +0 -36
- package/dist/bundle/decode-U6V6D6XH.js +0 -162
- package/dist/bundle/first-screen-C2WTLOG2.js +0 -34
- package/dist/bundle/server-QGTMJ7SF.js +0 -67
- package/dist/bundle/store-maintenance-command-VPAFQCNA.js +0 -58
- /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-FEBUZHU3.js} +0 -0
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
normalize
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-26DYRMXE.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QQGPV3QN.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.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
14
14
|
var LANGUAGES = [
|
|
15
15
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
16
16
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -18,7 +18,7 @@ var LANGUAGES = [
|
|
|
18
18
|
];
|
|
19
19
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
22
22
|
var BaseStemmer = class {
|
|
23
23
|
static {
|
|
24
24
|
__name(this, "BaseStemmer");
|
|
@@ -393,7 +393,7 @@ var BaseStemmer = class {
|
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
|
|
396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
397
397
|
var a_0 = [
|
|
398
398
|
["arsen", -1],
|
|
399
399
|
["commun", -1],
|
|
@@ -1094,7 +1094,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1094
1094
|
stemWord = this.stem;
|
|
1095
1095
|
};
|
|
1096
1096
|
|
|
1097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1098
1098
|
var a_02 = [
|
|
1099
1099
|
["\u0432", 1],
|
|
1100
1100
|
["\u0438\u0432", 2, 1],
|
|
@@ -1517,7 +1517,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1517
1517
|
stemWord = this.stem;
|
|
1518
1518
|
};
|
|
1519
1519
|
|
|
1520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1521
1521
|
var a_03 = [
|
|
1522
1522
|
["", 6],
|
|
1523
1523
|
["\xE1", 1, 1],
|
|
@@ -2193,7 +2193,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2193
2193
|
stemWord = this.stem;
|
|
2194
2194
|
};
|
|
2195
2195
|
|
|
2196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2197
2197
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2198
2198
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2199
2199
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
QUERY_LIMITS,
|
|
5
|
+
exhausted,
|
|
6
|
+
searchError
|
|
7
|
+
} from "./chunk-KNVTBDTE.js";
|
|
8
|
+
import {
|
|
9
|
+
fold
|
|
10
|
+
} from "./chunk-26DYRMXE.js";
|
|
3
11
|
import {
|
|
4
12
|
CATALOG_KINDS,
|
|
5
13
|
CONTRACT_KINDS,
|
|
@@ -11,29 +19,23 @@ import {
|
|
|
11
19
|
ORDER_DIRECTIONS,
|
|
12
20
|
ORDER_PURPOSES,
|
|
13
21
|
ORDER_STATUSES,
|
|
14
|
-
QUERY_LIMITS,
|
|
15
22
|
SUBSCRIPTION_STATUSES,
|
|
16
23
|
TRANSACTION_STATUSES,
|
|
17
24
|
WALLET_KINDS,
|
|
18
25
|
looksLikeReference,
|
|
19
26
|
parseReference,
|
|
20
27
|
providerLabel,
|
|
21
|
-
providerNamed
|
|
22
|
-
|
|
23
|
-
} from "./chunk-OFMYFFEF.js";
|
|
24
|
-
import {
|
|
25
|
-
fold
|
|
26
|
-
} from "./chunk-TK77DCE5.js";
|
|
28
|
+
providerNamed
|
|
29
|
+
} from "./chunk-CKVWAUBW.js";
|
|
27
30
|
import {
|
|
28
31
|
CliError,
|
|
29
|
-
isCliError,
|
|
30
32
|
singleLine
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QQGPV3QN.js";
|
|
32
34
|
import {
|
|
33
35
|
__name
|
|
34
36
|
} from "./chunk-ZVVMGPBJ.js";
|
|
35
37
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
37
39
|
var PHONE_PLANS = [
|
|
38
40
|
{
|
|
39
41
|
country: "us",
|
|
@@ -413,7 +415,7 @@ var PHONE_PLANS = [
|
|
|
413
415
|
}
|
|
414
416
|
];
|
|
415
417
|
|
|
416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
417
419
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
418
420
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
419
421
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -488,7 +490,7 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
488
490
|
return found ? `+${found[1]}` : void 0;
|
|
489
491
|
}, "storedPhone");
|
|
490
492
|
|
|
491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
492
494
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
493
495
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
494
496
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -538,7 +540,7 @@ var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
|
|
|
538
540
|
}), "arrayOf");
|
|
539
541
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
540
542
|
|
|
541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
542
544
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
543
545
|
var PARTY = ["person", "organization"];
|
|
544
546
|
var ORGANIZATION = ["organization"];
|
|
@@ -933,7 +935,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf(type).some(([, role])
|
|
|
933
935
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
934
936
|
var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
|
|
935
937
|
|
|
936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
937
939
|
var TAKES = {
|
|
938
940
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
939
941
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -993,52 +995,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
993
995
|
throw wrongAccount(reference, scope, profiles);
|
|
994
996
|
}, "ensureAccount");
|
|
995
997
|
|
|
996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
997
|
-
var QUERY_VERSION = 1;
|
|
998
|
-
var QUERY_LIMITS2 = {
|
|
999
|
-
...QUERY_LIMITS,
|
|
1000
|
-
pattern: 1024,
|
|
1001
|
-
states: 1e4,
|
|
1002
|
-
expansions: 1e4,
|
|
1003
|
-
candidates: 5e4,
|
|
1004
|
-
bodyBytes: 8388608,
|
|
1005
|
-
milliseconds: 2e3,
|
|
1006
|
-
work: 1e7
|
|
1007
|
-
};
|
|
1008
|
-
var SEARCH_QUERY = {
|
|
1009
|
-
command: "search",
|
|
1010
|
-
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md"
|
|
1011
|
-
};
|
|
1012
|
-
var MESSAGE_PARSING = { ...SEARCH_QUERY, proximity: true };
|
|
1013
|
-
var MOST_WORDS_APART = 50;
|
|
1014
|
-
function searchError(reason, span, alternative) {
|
|
1015
|
-
queryError(reason, span, alternative, SEARCH_QUERY);
|
|
1016
|
-
}
|
|
1017
|
-
__name(searchError, "searchError");
|
|
1018
|
-
var ANSWER_MS = 1e3;
|
|
1019
|
-
var searchTimeLimit = /* @__PURE__ */ __name((deadline, now = Date.now()) => deadline?.explicit ? Math.max(QUERY_LIMITS2.milliseconds, deadline.endsAt - now - ANSWER_MS) : void 0, "searchTimeLimit");
|
|
1020
|
-
function outOfTime(limitMs = QUERY_LIMITS2.milliseconds) {
|
|
1021
|
-
throw new CliError("timeout", `search stopped at its time limit of ${limitMs / 1e3}s \u2014 the query is valid; add chat: or date: to search less of the store`, { reason: "query.time-limit", budget: "time", limit_ms: limitMs, complete: false });
|
|
1022
|
-
}
|
|
1023
|
-
__name(outOfTime, "outOfTime");
|
|
1024
|
-
var isQueryLimit = /* @__PURE__ */ __name((error) => isCliError(error) && (error.details.reason === "query.too-large" || error.details.reason === "query.time-limit"), "isQueryLimit");
|
|
1025
|
-
function exhausted(budget) {
|
|
1026
|
-
throw new CliError("validation_error", `search exceeded its ${budget} budget \u2014 narrow the chat or date range`, {
|
|
1027
|
-
reason: "query.too-large",
|
|
1028
|
-
budget,
|
|
1029
|
-
complete: false
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
__name(exhausted, "exhausted");
|
|
1033
|
-
function tooWideTerm([term], budget) {
|
|
1034
|
-
if (term === void 0)
|
|
1035
|
-
exhausted(budget);
|
|
1036
|
-
const part = term.replace(/[*?]+/gu, " ").trim().split(/\s+/u).sort((a, b) => b.length - a.length)[0] ?? term;
|
|
1037
|
-
throw new CliError("validation_error", `search exceeded its ${budget} budget: ${term} is checked word by word, and too many messages hold it \u2014 write *${part}* (any word holding it, read from the index), more of the word, or add chat: or date:`, { reason: "query.too-large", budget, term, complete: false });
|
|
1038
|
-
}
|
|
1039
|
-
__name(tooWideTerm, "tooWideTerm");
|
|
1040
|
-
|
|
1041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
1042
999
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
1043
1000
|
var literal = /* @__PURE__ */ __name((c) => ({
|
|
1044
1001
|
kind: "char",
|
|
@@ -1046,10 +1003,10 @@ var literal = /* @__PURE__ */ __name((c) => ({
|
|
|
1046
1003
|
negate: false
|
|
1047
1004
|
}), "literal");
|
|
1048
1005
|
var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end: pattern.length }) => {
|
|
1049
|
-
if (pattern.length >
|
|
1006
|
+
if (pattern.length > QUERY_LIMITS.pattern * 2)
|
|
1050
1007
|
exhausted("pattern");
|
|
1051
1008
|
const chars = [...pattern];
|
|
1052
|
-
if (chars.length >
|
|
1009
|
+
if (chars.length > QUERY_LIMITS.pattern)
|
|
1053
1010
|
exhausted("pattern");
|
|
1054
1011
|
let at = 0, depth = 0;
|
|
1055
1012
|
const failure = /* @__PURE__ */ __name(() => searchError("query.invalid-regex", span, "use the supported Lucene regex subset"), "failure");
|
|
@@ -1092,7 +1049,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
|
|
|
1092
1049
|
return character();
|
|
1093
1050
|
}, "escaped");
|
|
1094
1051
|
const union = /* @__PURE__ */ __name(() => {
|
|
1095
|
-
if (++depth >
|
|
1052
|
+
if (++depth > QUERY_LIMITS.depth)
|
|
1096
1053
|
exhausted("pattern depth");
|
|
1097
1054
|
const children = [concat()];
|
|
1098
1055
|
while (chars[at] === "|") {
|
|
@@ -1134,7 +1091,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
|
|
|
1134
1091
|
if (character() !== "}" || max !== null && max < min)
|
|
1135
1092
|
return failure();
|
|
1136
1093
|
}
|
|
1137
|
-
if (min >
|
|
1094
|
+
if (min > QUERY_LIMITS.states || max !== null && max > QUERY_LIMITS.states)
|
|
1138
1095
|
exhausted("automaton states");
|
|
1139
1096
|
child = { kind: "repeat", child, min, max };
|
|
1140
1097
|
}
|
|
@@ -1214,7 +1171,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
|
|
|
1214
1171
|
return failure();
|
|
1215
1172
|
const states = [];
|
|
1216
1173
|
const state = /* @__PURE__ */ __name(() => {
|
|
1217
|
-
if (states.length >=
|
|
1174
|
+
if (states.length >= QUERY_LIMITS.states)
|
|
1218
1175
|
exhausted("automaton states");
|
|
1219
1176
|
states.push({ epsilon: [], edges: [] });
|
|
1220
1177
|
return states.length - 1;
|
|
@@ -1278,7 +1235,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
|
|
|
1278
1235
|
states: states.length,
|
|
1279
1236
|
test: /* @__PURE__ */ __name((text2, budget = { work: 0 }) => {
|
|
1280
1237
|
const spend = /* @__PURE__ */ __name(() => {
|
|
1281
|
-
if (++budget.work > (budget.maxWork ??
|
|
1238
|
+
if (++budget.work > (budget.maxWork ?? QUERY_LIMITS.work))
|
|
1282
1239
|
exhausted("automaton work");
|
|
1283
1240
|
}, "spend");
|
|
1284
1241
|
const closure = /* @__PURE__ */ __name((initial) => {
|
|
@@ -1438,7 +1395,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
1438
1395
|
return out;
|
|
1439
1396
|
}, "foldRegex");
|
|
1440
1397
|
|
|
1441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
1442
1399
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
1443
1400
|
const padded = ` ${term} `;
|
|
1444
1401
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -1447,7 +1404,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
1447
1404
|
return [...pieces];
|
|
1448
1405
|
}, "trigrams");
|
|
1449
1406
|
|
|
1450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
1451
1408
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
1452
1409
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
1453
1410
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -1518,7 +1475,7 @@ ${lines}`, { candidates });
|
|
|
1518
1475
|
}, "ambiguous");
|
|
1519
1476
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
1520
1477
|
|
|
1521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
1522
1479
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
1523
1480
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
1524
1481
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -1580,7 +1537,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
1580
1537
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
1581
1538
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
1582
1539
|
|
|
1583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
1584
1541
|
var QUOTES = [
|
|
1585
1542
|
['"', '"'],
|
|
1586
1543
|
["'", "'"],
|
|
@@ -1638,7 +1595,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
1638
1595
|
}, "nameKey");
|
|
1639
1596
|
var isReadable = /* @__PURE__ */ __name((shown) => shown !== null && READABLE.test(shown), "isReadable");
|
|
1640
1597
|
|
|
1641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
1642
1599
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
1643
1600
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
1644
1601
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -1675,7 +1632,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
1675
1632
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
1676
1633
|
}, "counterFreshness");
|
|
1677
1634
|
|
|
1678
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
1679
1636
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
1680
1637
|
var AUTHOR_MEASURES = [
|
|
1681
1638
|
"messages",
|
|
@@ -1815,7 +1772,7 @@ var withoutUrls = /* @__PURE__ */ __name((text2) => text2.replace(/\S+/gu, (toke
|
|
|
1815
1772
|
var rankingWords = /* @__PURE__ */ __name((text2) => withoutUrls(text2).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
1816
1773
|
var rankingQuestion = /* @__PURE__ */ __name((text2) => withoutUrls(text2).includes("?"), "rankingQuestion");
|
|
1817
1774
|
|
|
1818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
1819
1776
|
import { createHash } from "node:crypto";
|
|
1820
1777
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
1821
1778
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -1987,7 +1944,7 @@ var fieldReferences = /* @__PURE__ */ __name((record, options = {}) => {
|
|
|
1987
1944
|
return found;
|
|
1988
1945
|
}, "fieldReferences");
|
|
1989
1946
|
|
|
1990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
1991
1948
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
1992
1949
|
var ROLE_LABELS = {
|
|
1993
1950
|
organization: {
|
|
@@ -2038,17 +1995,6 @@ export {
|
|
|
2038
1995
|
isMobilePhone,
|
|
2039
1996
|
BARE_INTERNATIONAL_PROVIDERS,
|
|
2040
1997
|
storedPhone,
|
|
2041
|
-
QUERY_VERSION,
|
|
2042
|
-
QUERY_LIMITS2 as QUERY_LIMITS,
|
|
2043
|
-
SEARCH_QUERY,
|
|
2044
|
-
MESSAGE_PARSING,
|
|
2045
|
-
MOST_WORDS_APART,
|
|
2046
|
-
searchError,
|
|
2047
|
-
searchTimeLimit,
|
|
2048
|
-
outOfTime,
|
|
2049
|
-
isQueryLimit,
|
|
2050
|
-
exhausted,
|
|
2051
|
-
tooWideTerm,
|
|
2052
1998
|
compileAutomaton,
|
|
2053
1999
|
wildcardPattern,
|
|
2054
2000
|
foldRegex,
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QQGPV3QN.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.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/store/vector-extension.js
|
|
14
14
|
import { readFileSync } from "node:fs";
|
|
15
15
|
var musl = /* @__PURE__ */ __name(() => {
|
|
16
16
|
if (process.platform !== "linux")
|
|
@@ -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.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CliError,
|
|
5
|
+
singleLine
|
|
6
|
+
} from "./chunk-QQGPV3QN.js";
|
|
7
|
+
import {
|
|
8
|
+
__name
|
|
9
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
10
|
+
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
12
|
+
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
13
|
+
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
14
|
+
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
15
|
+
const tag = value.trim().toLowerCase();
|
|
16
|
+
return TAG.test(tag) ? tag : void 0;
|
|
17
|
+
}, "tagOf");
|
|
18
|
+
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
19
|
+
const tag = tagOf(value);
|
|
20
|
+
if (tag === void 0)
|
|
21
|
+
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
22
|
+
return tag;
|
|
23
|
+
}, "normalizeTag");
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
TAG_TYPES,
|
|
27
|
+
tagOf,
|
|
28
|
+
normalizeTag
|
|
29
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
+
DEFAULT_PACE,
|
|
4
5
|
FloodMemory,
|
|
5
6
|
OFFLINE,
|
|
7
|
+
Pacer,
|
|
6
8
|
RecipientList,
|
|
7
9
|
capability,
|
|
8
10
|
ceilingRefusal,
|
|
@@ -10,16 +12,17 @@ import {
|
|
|
10
12
|
floodPathFor,
|
|
11
13
|
guardFor,
|
|
12
14
|
holdEnd,
|
|
15
|
+
pacePathFor,
|
|
13
16
|
profilesOnAccount,
|
|
14
17
|
recipientsPathFor,
|
|
15
18
|
refuseLacking,
|
|
16
19
|
servicesFor,
|
|
17
20
|
throughWrapper,
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
waitForTurn
|
|
22
|
+
} from "./chunk-HRDCH2VB.js";
|
|
20
23
|
import {
|
|
21
24
|
servingProfiles
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PC3N3LH3.js";
|
|
23
26
|
import {
|
|
24
27
|
asFirstWord,
|
|
25
28
|
baseContext,
|
|
@@ -33,7 +36,7 @@ import {
|
|
|
33
36
|
recalledAccount,
|
|
34
37
|
rememberAccount,
|
|
35
38
|
rootOf2 as rootOf
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VBVR6JRC.js";
|
|
37
40
|
import {
|
|
38
41
|
AUTHORITY_KEY,
|
|
39
42
|
CEILING_KEY,
|
|
@@ -45,34 +48,31 @@ import {
|
|
|
45
48
|
levelFor,
|
|
46
49
|
readKeysForCommand,
|
|
47
50
|
skipFlagFor
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-LKTDW5LH.js";
|
|
49
52
|
import {
|
|
50
53
|
providerErrorKey
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-PVZMN3UZ.js";
|
|
52
55
|
import {
|
|
53
56
|
openStore
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-NJVJH5MH.js";
|
|
55
58
|
import {
|
|
56
59
|
chatReferenceOf,
|
|
57
60
|
ensureAccount,
|
|
58
61
|
foldName,
|
|
59
62
|
isId,
|
|
60
63
|
pickPerson
|
|
61
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-WYGDALB3.js";
|
|
62
65
|
import {
|
|
63
66
|
isCliFailure
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
resolvePaths
|
|
67
|
-
} from "./chunk-BRRHYXUP.js";
|
|
67
|
+
} from "./chunk-4VM3UCSO.js";
|
|
68
68
|
import {
|
|
69
69
|
CliError
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-QQGPV3QN.js";
|
|
71
71
|
import {
|
|
72
72
|
__name
|
|
73
73
|
} from "./chunk-ZVVMGPBJ.js";
|
|
74
74
|
|
|
75
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
75
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
76
76
|
import { openSync } from "node:fs";
|
|
77
77
|
import { createInterface } from "node:readline";
|
|
78
78
|
import { ReadStream } from "node:tty";
|
|
@@ -127,102 +127,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
127
127
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
128
128
|
}, "terminalAsker");
|
|
129
129
|
|
|
130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
131
|
-
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
132
|
-
import { join } from "node:path";
|
|
133
|
-
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
134
|
-
var pacePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "pace", `${profile}.json`), "pacePathFor");
|
|
135
|
-
var Pacer = class {
|
|
136
|
-
static {
|
|
137
|
-
__name(this, "Pacer");
|
|
138
|
-
}
|
|
139
|
-
path;
|
|
140
|
-
rate;
|
|
141
|
-
now;
|
|
142
|
-
constructor(path, rate, now = Date.now) {
|
|
143
|
-
this.path = path;
|
|
144
|
-
this.rate = rate;
|
|
145
|
-
this.now = now;
|
|
146
|
-
}
|
|
147
|
-
get interval() {
|
|
148
|
-
return this.rate.perMinute > 0 ? 6e4 / this.rate.perMinute : 0;
|
|
149
|
-
}
|
|
150
|
-
/** When this call may go; reserved at once, so the next caller in any process lines up behind it. */
|
|
151
|
-
async reserve() {
|
|
152
|
-
if (this.interval === 0)
|
|
153
|
-
return this.now();
|
|
154
|
-
return withFileLockAsync(this.path, "the request pace", () => {
|
|
155
|
-
const now = this.now();
|
|
156
|
-
const tat = Math.max(this.read(now), now);
|
|
157
|
-
this.write(tat + this.interval, now);
|
|
158
|
-
return Math.max(now, tat - this.rate.burst * this.interval);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
/** The messenger asked every caller to wait: nothing goes before `now + waitMs`, in any process. */
|
|
162
|
-
async holdFor(waitMs) {
|
|
163
|
-
if (this.interval === 0)
|
|
164
|
-
return;
|
|
165
|
-
await withFileLockAsync(this.path, "the request pace", () => {
|
|
166
|
-
const now = this.now();
|
|
167
|
-
const hold = now + waitMs + this.rate.burst * this.interval;
|
|
168
|
-
this.write(Math.max(this.read(now), hold), now);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
/** The owner's `flood clear`: every process may go again at once. */
|
|
172
|
-
async reset() {
|
|
173
|
-
await withFileLockAsync(this.path, "the request pace", () => this.write(0, this.now()));
|
|
174
|
-
}
|
|
175
|
-
read(now) {
|
|
176
|
-
try {
|
|
177
|
-
const file = JSON.parse(readFileSync(this.path, "utf8"));
|
|
178
|
-
const tat = Number(file.tat);
|
|
179
|
-
if (!Number.isFinite(tat))
|
|
180
|
-
return 0;
|
|
181
|
-
const at = Number(file.at);
|
|
182
|
-
return Number.isFinite(at) && at > now ? now + Math.max(0, tat - at) : tat;
|
|
183
|
-
} catch {
|
|
184
|
-
return 0;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
write(tat, at) {
|
|
188
|
-
const temporary = `${this.path}.${process.pid}.tmp`;
|
|
189
|
-
writeFileSync(temporary, JSON.stringify({ tat, at }), { mode: 384 });
|
|
190
|
-
renameSync(temporary, this.path);
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
var ANNOUNCE_WAIT_MS = 5e3;
|
|
194
|
-
var LONGEST_PACE_WAIT_MS = 5 * 6e4;
|
|
195
|
-
var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
196
|
-
const { name, operation, warn } = options;
|
|
197
|
-
const now = options.now ?? Date.now;
|
|
198
|
-
let at = now();
|
|
199
|
-
try {
|
|
200
|
-
at = await pacer.reserve();
|
|
201
|
-
} catch (error) {
|
|
202
|
-
warn?.(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
|
|
203
|
-
event: "warning",
|
|
204
|
-
code: "wait_not_remembered",
|
|
205
|
-
operation
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
const waitMs = at - now();
|
|
209
|
-
if (waitMs <= 0)
|
|
210
|
-
return;
|
|
211
|
-
if (waitMs > (options.longestWaitMs ?? LONGEST_PACE_WAIT_MS))
|
|
212
|
-
throw new CliError("rate_limited", `this profile's next request to ${name} has to wait ${Math.ceil(waitMs / 1e3)} s more \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at).toISOString(), remembered: true });
|
|
213
|
-
if (waitMs >= ANNOUNCE_WAIT_MS) {
|
|
214
|
-
const seconds = Math.ceil(waitMs / 1e3);
|
|
215
|
-
warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
|
|
216
|
-
event: "warning",
|
|
217
|
-
code: "pace_wait",
|
|
218
|
-
operation,
|
|
219
|
-
counts: { seconds }
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
223
|
-
}, "waitForTurn");
|
|
224
|
-
|
|
225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
226
131
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
227
132
|
"help",
|
|
228
133
|
"guide",
|
|
@@ -302,7 +207,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
302
207
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
303
208
|
}, "refuseUnknownPermissionKeys");
|
|
304
209
|
|
|
305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
306
211
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
307
212
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
308
213
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -399,7 +304,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
399
304
|
});
|
|
400
305
|
}, "flooded");
|
|
401
306
|
|
|
402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
403
308
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
404
309
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
405
310
|
const write = currentOperation();
|
|
@@ -498,7 +403,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
498
403
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
499
404
|
}, "byPart");
|
|
500
405
|
|
|
501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
502
407
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
503
408
|
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" }) => {
|
|
504
409
|
let warned = false;
|
|
@@ -1074,7 +979,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1074
979
|
}
|
|
1075
980
|
}, "keep");
|
|
1076
981
|
|
|
1077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1078
983
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1079
984
|
let opened;
|
|
1080
985
|
return {
|
|
@@ -1477,9 +1382,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1477
1382
|
export {
|
|
1478
1383
|
answerOf,
|
|
1479
1384
|
terminalAsker,
|
|
1480
|
-
DEFAULT_PACE,
|
|
1481
|
-
pacePathFor,
|
|
1482
|
-
Pacer,
|
|
1483
1385
|
commandPermissions,
|
|
1484
1386
|
knownPermissionKeys,
|
|
1485
1387
|
knownBeside,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { win32 } from "node:path";
|
|
10
10
|
var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
|
|
@@ -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.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/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);
|