@wirecat/zoom-cli 0.70.0 → 0.72.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/dist/answer-entities.d.ts +2 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answers.d.ts +56 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-GE2TFJJP.js → all-profiles-XFIPF4GF.js} +12 -12
- package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
- package/dist/bundle/{anthropic-FA6NHENI.js → anthropic-SSUBR3BC.js} +29 -13
- package/dist/bundle/{app-server-IRADMSNX.js → app-server-7DJHHF2F.js} +68 -56
- package/dist/bundle/{bun-ZYZGGCX5.js → bun-6HBYWQIX.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y24TUIGS.js → bun-sqlite-4L3Q55NB.js} +10 -6
- package/dist/bundle/{chunk-JULBAECW.js → chunk-23J2ANZ7.js} +16 -6
- package/dist/bundle/{chunk-4DSIWYGO.js → chunk-24OFZNRC.js} +39296 -24139
- package/dist/bundle/{chunk-LXXCLQCW.js → chunk-2MIBRVSV.js} +2 -2
- package/dist/bundle/{chunk-CHGUNZ3L.js → chunk-37NF5CBJ.js} +4 -4
- package/dist/bundle/chunk-3KRTEX5M.js +53 -0
- package/dist/bundle/{chunk-VNU5L37V.js → chunk-4SY67IUA.js} +34 -42
- package/dist/bundle/{chunk-XWQNJKTP.js → chunk-4XQWF3U2.js} +6 -6
- package/dist/bundle/{chunk-OAQLVV6W.js → chunk-4YIGXTBP.js} +3 -3
- package/dist/bundle/{chunk-RB33VTUW.js → chunk-5AELTC52.js} +810 -210
- package/dist/bundle/chunk-5MGICK47.js +1243 -0
- package/dist/bundle/{chunk-RRRJCHUC.js → chunk-5X4IY5JH.js} +4504 -1622
- package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
- package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
- package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
- package/dist/bundle/{chunk-KM736RMJ.js → chunk-7IFO43Q5.js} +2 -2
- package/dist/bundle/{chunk-IWPXWGF7.js → chunk-7JYMGXLI.js} +44 -42
- package/dist/bundle/{chunk-LAG5O2FV.js → chunk-7OD3522V.js} +4162 -3769
- package/dist/bundle/{chunk-DCUWJITQ.js → chunk-7S4D5SM2.js} +60 -608
- package/dist/bundle/{chunk-3KC7C465.js → chunk-7SUWPMZG.js} +10 -15
- package/dist/bundle/{chunk-6IF5ZHDS.js → chunk-ADKMBXY4.js} +1 -1
- package/dist/bundle/{chunk-56OV5ASY.js → chunk-B3SILJBU.js} +18 -18
- package/dist/bundle/{chunk-CIZ25UPK.js → chunk-CANRIRNZ.js} +8241 -5553
- package/dist/bundle/{chunk-YUHM2OJM.js → chunk-CW46FWKW.js} +38 -123
- package/dist/bundle/{chunk-VSLDWT4E.js → chunk-D24OQAHM.js} +4 -4
- package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
- package/dist/bundle/{chunk-CSEBB4OP.js → chunk-DEPXZJ2V.js} +21 -150
- package/dist/bundle/{chunk-YJSPBUGB.js → chunk-DOCVEKP2.js} +51 -67
- package/dist/bundle/{chunk-V2E7QFZ3.js → chunk-EFF2XBHP.js} +2 -2
- package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
- package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
- package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
- package/dist/bundle/chunk-FSCPQQS5.js +244 -0
- package/dist/bundle/{chunk-BVWF4B33.js → chunk-H53WFZBN.js} +16 -139
- package/dist/bundle/{chunk-VJ5ZU4UF.js → chunk-I7CUMZD6.js} +3 -3
- package/dist/bundle/{chunk-OA37BWE5.js → chunk-IACWKZWS.js} +1 -1
- package/dist/bundle/{chunk-BSS6HX4O.js → chunk-IFBIXU6C.js} +2 -2
- package/dist/bundle/{chunk-UVPL7YAY.js → chunk-IU4DUUB3.js} +7 -7
- package/dist/bundle/{chunk-W7ZEEC4K.js → chunk-IXO4SCKE.js} +1 -1
- package/dist/bundle/{chunk-J3SKXICS.js → chunk-JAEPK457.js} +359 -765
- package/dist/bundle/{chunk-ZV3INEKM.js → chunk-JFPUYQSP.js} +5 -5
- package/dist/bundle/{chunk-ZS55EERO.js → chunk-JG4MNYG2.js} +1 -1
- package/dist/bundle/{chunk-IINZIP73.js → chunk-JRCH4YZP.js} +17 -10
- package/dist/bundle/{chunk-2JEM2YNV.js → chunk-JZ4XNNL7.js} +1 -1
- package/dist/bundle/chunk-K6HR6HCO.js +32 -0
- package/dist/bundle/{chunk-SNIY3JDN.js → chunk-KFZL67JP.js} +328 -60
- package/dist/bundle/{chunk-CEJJBZAE.js → chunk-KPIQXFNB.js} +375 -10
- package/dist/bundle/{chunk-M7VUXXGS.js → chunk-KWURWGGB.js} +137 -7
- package/dist/bundle/{chunk-M6JIXMQZ.js → chunk-LA6QUVGQ.js} +3 -2
- package/dist/bundle/{chunk-AISJCF7A.js → chunk-LLUNHAZ7.js} +4 -4
- package/dist/bundle/{chunk-KWRCP55G.js → chunk-LTWJM3ED.js} +17 -17
- package/dist/bundle/{chunk-IS3ZTT2Z.js → chunk-M3DMXDX6.js} +6 -6
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-L24UOUWG.js → chunk-MSQHSW4C.js} +2 -2
- package/dist/bundle/chunk-N4QNYWWG.js +71 -0
- package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
- package/dist/bundle/{chunk-DNR4B5YV.js → chunk-OHCLQJOV.js} +3 -3
- package/dist/bundle/{chunk-MVOMLJYQ.js → chunk-OP5PGE2N.js} +4 -4
- package/dist/bundle/{chunk-QL7EMFIC.js → chunk-OY6N2ABP.js} +29 -23
- package/dist/bundle/chunk-PJWSGXOB.js +185 -0
- package/dist/bundle/{chunk-YTN2JN6N.js → chunk-QA6KIL7Q.js} +12 -8
- package/dist/bundle/{chunk-6HJFIMT7.js → chunk-QQUY4MZY.js} +1 -1
- package/dist/bundle/{chunk-ZSKE7N2U.js → chunk-QW7YTRV2.js} +3 -3
- package/dist/bundle/chunk-RJTGENHZ.js +109 -0
- package/dist/bundle/{chunk-RIPAUCKJ.js → chunk-RLCVPECY.js} +74 -67
- package/dist/bundle/{chunk-M7E44TMT.js → chunk-RN5SU2RN.js} +6 -6
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
- package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
- package/dist/bundle/{chunk-SVF3NDAO.js → chunk-SXZGCD6E.js} +3 -3
- package/dist/bundle/{chunk-DXCTW3MV.js → chunk-T27IMG6X.js} +3 -1
- package/dist/bundle/{chunk-PV6OHXHN.js → chunk-TF2WKPNW.js} +18 -18
- package/dist/bundle/{chunk-X4ZF4XXI.js → chunk-U32VL3MA.js} +1 -1
- package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
- package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
- package/dist/bundle/chunk-VIV64MQM.js +779 -0
- package/dist/bundle/{chunk-2QFPVUM3.js → chunk-W3YTVEWV.js} +69 -6
- package/dist/bundle/{chunk-AUNW7N4I.js → chunk-WLVG4RBZ.js} +1 -1
- package/dist/bundle/{chunk-JRO2FWO2.js → chunk-WOAYHCM2.js} +1 -1
- package/dist/bundle/{chunk-RO3ZR4VP.js → chunk-WXTYYWZI.js} +13 -13
- package/dist/bundle/{chunk-RWIILYKW.js → chunk-WZGKHTA4.js} +2 -2
- package/dist/bundle/{chunk-GB5X3GBE.js → chunk-X2MP634F.js} +14 -5
- package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
- package/dist/bundle/{chunk-D3PNCJD5.js → chunk-YVVJ6Y5C.js} +7 -7
- package/dist/bundle/chunk-ZHA56THL.js +2355 -0
- package/dist/bundle/{chunk-QO2KPU26.js → chunk-ZVFYGTGJ.js} +101 -44
- package/dist/bundle/{chunk-V5GRSOCZ.js → chunk-ZW5KHKMA.js} +5 -5
- package/dist/bundle/{cli-VRSQ7HAE.js → cli-IYYI7GAM.js} +215 -100
- package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
- package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
- package/dist/bundle/config-YKNM33J7.js +96 -0
- package/dist/bundle/{decode-523PUQMR.js → decode-SRGOOGBW.js} +6 -6
- package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
- package/dist/bundle/{dist-6WWKPEVW.js → dist-UZLNLAIO.js} +97 -56
- package/dist/bundle/{echarts-S5UMX2D3.js → echarts-7CM2MCMW.js} +2 -2
- package/dist/bundle/{embed-ODPDVHUK.js → embed-VEE56BOB.js} +7 -7
- package/dist/bundle/{embedder-PAXRBSZE.js → embedder-SZFYR543.js} +10 -10
- package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
- package/dist/bundle/first-run-KWC7RKF2.js +29 -0
- package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
- package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
- package/dist/bundle/{instructions-DUB7E6C5.js → instructions-R7OHVAWH.js} +1 -1
- package/dist/bundle/{main-A7JSYQI6.js → main-EFUN2O3K.js} +21 -20
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{meetings-BDZQV3HR.js → meetings-5I2BDNTA.js} +9 -7
- package/dist/bundle/{node-E25KP53H.js → node-3N2JGZ7V.js} +2 -2
- package/dist/bundle/{node-sqlite-PHWDFZCP.js → node-sqlite-2UVEE2WM.js} +11 -7
- package/dist/bundle/{oauth-G2K46IYP.js → oauth-AYGD7UU3.js} +8 -8
- package/dist/bundle/{open-INWS5HIZ.js → open-3GUVDLGD.js} +6 -6
- package/dist/bundle/openai-NHCDLWWY.js +28 -0
- package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
- package/dist/bundle/{process-UJ2JHMJN.js → process-YAHHUFR5.js} +1 -1
- package/dist/bundle/{program-LYTGFV6L.js → program-OSZROCTK.js} +113 -118
- package/dist/bundle/{prompt-VTUCRCE4.js → prompt-HMCW4XQJ.js} +6 -6
- package/dist/bundle/{recognize-3CEPOW2F.js → recognize-VF5CA7EM.js} +5 -5
- package/dist/bundle/{remote-DRQEXEZL.js → remote-5C6VTPR2.js} +10 -8
- package/dist/bundle/{rerank-UL4KNNVN.js → rerank-ER7NEDOI.js} +8 -8
- package/dist/bundle/run-log-JKTLKXSK.js +124 -0
- package/dist/bundle/{serve-P5UWUOWQ.js → serve-QJWXJOM7.js} +10 -10
- package/dist/bundle/{server-M6XK2Y3X.js → server-KCIK3Y2P.js} +50 -48
- package/dist/bundle/server-LLGFDLLJ.js +75 -0
- package/dist/bundle/{services-4HRYNY62.js → services-LQMYJQG3.js} +121 -52
- package/dist/bundle/{speech-BBPBMFAO.js → speech-74GJQNQH.js} +20 -17
- package/dist/bundle/{state-GDSUNUSY.js → state-4XDGCHDF.js} +7 -7
- package/dist/bundle/{store-LBQ6FZP2.js → store-5Y5HK2L2.js} +28 -19
- package/dist/bundle/{store-VWLABMLF.js → store-Y56AHJ2Y.js} +64 -31
- package/dist/bundle/store-connection-4WI32AYU.js +89 -0
- package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
- package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
- package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
- package/dist/bundle/zm.js +34 -10
- package/dist/bundle/{zoom-app-YIEJLWCW.js → zoom-app-NVL7HEAX.js} +8 -8
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -6
- package/dist/contract-overrides.js.map +1 -1
- package/dist/ingestion-search-commands.d.ts.map +1 -1
- package/dist/ingestion-search-commands.js +0 -10
- package/dist/ingestion-search-commands.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +8 -6
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-integration.d.ts +3 -1
- package/dist/meeting-integration.d.ts.map +1 -1
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +4 -3
- package/dist/store-connection.js.map +1 -1
- package/dist/unified-search.d.ts +4 -4
- package/dist/unified-search.d.ts.map +1 -1
- package/dist/unified-search.js +1 -24
- package/dist/unified-search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/zoom-cli/SKILL.md +2 -2
- package/dist/bundle/answer-policy-GOXSDYDD.js +0 -104
- package/dist/bundle/chunk-5XWCBLUR.js +0 -27
- package/dist/bundle/chunk-AT2XKNFN.js +0 -342
- package/dist/bundle/chunk-GVT5363M.js +0 -35
- package/dist/bundle/chunk-VE2VNECR.js +0 -380
- package/dist/bundle/chunk-Y6C3N7YG.js +0 -12434
- package/dist/bundle/command-contract-RPRKHVU6.js +0 -41
- package/dist/bundle/config-QU6A6VIO.js +0 -90
- package/dist/bundle/first-run-NVTDR5VO.js +0 -28
- package/dist/bundle/first-screen-5RWZDWLK.js +0 -39
- package/dist/bundle/openai-T44ORVGQ.js +0 -25
- package/dist/bundle/run-log-UZAB5CWF.js +0 -118
- package/dist/bundle/server-F3NPVMS2.js +0 -72
- package/dist/bundle/store-connection-XEBFP56U.js +0 -83
- package/dist/bundle/store-maintenance-command-G43JN57J.js +0 -61
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -2,25 +2,36 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseLacking
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OY6N2ABP.js";
|
|
6
6
|
import {
|
|
7
7
|
servingProfiles
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SXZGCD6E.js";
|
|
9
9
|
import {
|
|
10
|
+
FloodMemory,
|
|
10
11
|
OFFLINE,
|
|
12
|
+
RecipientList,
|
|
11
13
|
capability,
|
|
14
|
+
ceilingRefusal,
|
|
12
15
|
chatIdIn,
|
|
16
|
+
floodPathFor,
|
|
17
|
+
guardFor,
|
|
18
|
+
holdEnd,
|
|
13
19
|
profilesOnAccount,
|
|
20
|
+
recipientsPathFor,
|
|
14
21
|
servicesFor,
|
|
15
|
-
throughWrapper
|
|
16
|
-
|
|
22
|
+
throughWrapper,
|
|
23
|
+
withFileLockAsync
|
|
24
|
+
} from "./chunk-5X4IY5JH.js";
|
|
25
|
+
import {
|
|
26
|
+
openStore
|
|
27
|
+
} from "./chunk-24OFZNRC.js";
|
|
17
28
|
import {
|
|
18
29
|
chatReferenceOf,
|
|
19
30
|
ensureAccount,
|
|
20
31
|
foldName,
|
|
21
32
|
isId,
|
|
22
33
|
pickPerson
|
|
23
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ZHA56THL.js";
|
|
24
35
|
import {
|
|
25
36
|
asFirstWord,
|
|
26
37
|
baseContext,
|
|
@@ -31,54 +42,39 @@ import {
|
|
|
31
42
|
recalledAccount,
|
|
32
43
|
rememberAccount,
|
|
33
44
|
rootOf2 as rootOf
|
|
34
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-7OD3522V.js";
|
|
35
46
|
import {
|
|
36
47
|
providerErrorKey
|
|
37
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-QA6KIL7Q.js";
|
|
38
49
|
import {
|
|
39
|
-
LOG_ATTRIBUTES,
|
|
40
50
|
codeOf,
|
|
41
51
|
currentOperation,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
limitBatch,
|
|
45
|
-
logAttributes
|
|
46
|
-
} from "./chunk-J3SKXICS.js";
|
|
47
|
-
import {
|
|
48
|
-
MESSENGER_CHANGE_REFUSAL,
|
|
49
|
-
readOnlyRefusal
|
|
50
|
-
} from "./chunk-5XWCBLUR.js";
|
|
52
|
+
limitBatch
|
|
53
|
+
} from "./chunk-JAEPK457.js";
|
|
51
54
|
import {
|
|
52
55
|
AUTHORITY_KEY,
|
|
53
56
|
CEILING_KEY,
|
|
54
57
|
DEFAULT_PERMISSIONS,
|
|
55
58
|
WRITE_KEYS,
|
|
56
59
|
keyForCommand,
|
|
57
|
-
keyForWrite,
|
|
58
60
|
levelFor,
|
|
59
61
|
readKeysForCommand,
|
|
60
62
|
skipFlagFor
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
openStore
|
|
64
|
-
} from "./chunk-4DSIWYGO.js";
|
|
63
|
+
} from "./chunk-LA6QUVGQ.js";
|
|
65
64
|
import {
|
|
66
65
|
isCliFailure
|
|
67
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-WZGKHTA4.js";
|
|
68
67
|
import {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
resolvePaths,
|
|
72
|
-
writeSecurely
|
|
73
|
-
} from "./chunk-OORMSM6O.js";
|
|
68
|
+
resolvePaths
|
|
69
|
+
} from "./chunk-S7SXSHRC.js";
|
|
74
70
|
import {
|
|
75
71
|
CliError
|
|
76
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-ELJUBPY4.js";
|
|
77
73
|
import {
|
|
78
74
|
__name
|
|
79
75
|
} from "./chunk-ZVVMGPBJ.js";
|
|
80
76
|
|
|
81
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
77
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
82
78
|
import { openSync } from "node:fs";
|
|
83
79
|
import { createInterface } from "node:readline";
|
|
84
80
|
import { ReadStream } from "node:tty";
|
|
@@ -133,547 +129,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
133
129
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
134
130
|
}, "terminalAsker");
|
|
135
131
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
137
|
-
import { randomUUID } from "node:crypto";
|
|
138
|
-
|
|
139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
140
|
-
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
141
|
-
import { dirname, join } from "node:path";
|
|
142
|
-
var MOST_DEADLINES = 50;
|
|
143
|
-
var LIMITED_HOLD_MS = 60 * 60 * 1e3;
|
|
144
|
-
var FROZEN_HOLD_MS = 24 * 60 * 60 * 1e3;
|
|
145
|
-
var NO_END = "9999-12-31T23:59:59.999Z";
|
|
146
|
-
var holdEnd = /* @__PURE__ */ __name((block, show = (iso) => iso) => block.until === null ? "until lifted" : `until ${show(block.until)}`, "holdEnd");
|
|
147
|
-
var floodPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "flood", `${profile}.json`), "floodPathFor");
|
|
148
|
-
var FloodMemory = class {
|
|
149
|
-
static {
|
|
150
|
-
__name(this, "FloodMemory");
|
|
151
|
-
}
|
|
152
|
-
path;
|
|
153
|
-
now;
|
|
154
|
-
constructor(path, now = Date.now) {
|
|
155
|
-
this.path = path;
|
|
156
|
-
this.now = now;
|
|
157
|
-
}
|
|
158
|
-
/** What is still in force; anything expired is left out. */
|
|
159
|
-
read() {
|
|
160
|
-
const now = this.now();
|
|
161
|
-
let raw;
|
|
162
|
-
try {
|
|
163
|
-
raw = JSON.parse(readFileSync(this.path, "utf8"));
|
|
164
|
-
} catch {
|
|
165
|
-
return { deadlines: [] };
|
|
166
|
-
}
|
|
167
|
-
const alive = /* @__PURE__ */ __name((until) => typeof until === "string" && Date.parse(until) > now, "alive");
|
|
168
|
-
const deadlines = Array.isArray(raw.deadlines) ? raw.deadlines.filter((one) => typeof one?.operation === "string" && alive(one.until)) : [];
|
|
169
|
-
const block = raw.sendBlock && (raw.sendBlock.until === NO_END ? { ...raw.sendBlock, until: null } : raw.sendBlock);
|
|
170
|
-
const held = block && (block.until === null || alive(block.until));
|
|
171
|
-
return { deadlines, ...held ? { sendBlock: block } : {} };
|
|
172
|
-
}
|
|
173
|
-
/** The deadline this call is still under: one for its chat, or one for the call in every chat. */
|
|
174
|
-
owed(operation, chatId) {
|
|
175
|
-
return this.read().deadlines.filter((one) => one.operation === operation && (one.chatId === void 0 || one.chatId === chatId)).sort((a, b) => b.until.localeCompare(a.until))[0];
|
|
176
|
-
}
|
|
177
|
-
remember(deadline) {
|
|
178
|
-
const { waitMs, ...rest } = deadline;
|
|
179
|
-
const kept = { ...rest, until: new Date(this.now() + waitMs).toISOString() };
|
|
180
|
-
const state = this.read();
|
|
181
|
-
const others = state.deadlines.filter((one) => one.operation !== kept.operation || one.chatId !== kept.chatId);
|
|
182
|
-
const deadlines = [...others, kept].sort((a, b) => b.until.localeCompare(a.until)).slice(0, MOST_DEADLINES);
|
|
183
|
-
this.#write({ ...state, deadlines });
|
|
184
|
-
return kept;
|
|
185
|
-
}
|
|
186
|
-
sendBlock() {
|
|
187
|
-
return this.read().sendBlock;
|
|
188
|
-
}
|
|
189
|
-
/** A ban the messenger gave no end for holds until lifted; a spam limit or a freeze without one, for a while. */
|
|
190
|
-
block(block) {
|
|
191
|
-
const now = this.now();
|
|
192
|
-
const holdMs = { limited: LIMITED_HOLD_MS, frozen: FROZEN_HOLD_MS, banned: void 0 }[block.state];
|
|
193
|
-
const kept = {
|
|
194
|
-
...block,
|
|
195
|
-
since: new Date(now).toISOString(),
|
|
196
|
-
until: block.until ?? (holdMs === void 0 ? null : new Date(now + holdMs).toISOString())
|
|
197
|
-
};
|
|
198
|
-
this.#write({ ...this.read(), sendBlock: kept });
|
|
199
|
-
return kept;
|
|
200
|
-
}
|
|
201
|
-
/** Lifts only a block of this state: an account found not frozen may still be limited for spam. */
|
|
202
|
-
unblock(state) {
|
|
203
|
-
const { sendBlock, ...rest } = this.read();
|
|
204
|
-
if (sendBlock?.state === state)
|
|
205
|
-
this.#write(rest);
|
|
206
|
-
}
|
|
207
|
-
/** Forgets every wait and lifts the hold, and answers with what was still in force. */
|
|
208
|
-
clear() {
|
|
209
|
-
const cleared = this.read();
|
|
210
|
-
this.#write({ deadlines: [] });
|
|
211
|
-
return cleared;
|
|
212
|
-
}
|
|
213
|
-
#write({ sendBlock, ...rest }) {
|
|
214
|
-
const state = sendBlock ? { ...rest, sendBlock: { ...sendBlock, until: sendBlock.until ?? NO_END } } : rest;
|
|
215
|
-
mkdirSync(dirname(this.path), { recursive: true, mode: 448 });
|
|
216
|
-
const temporary = `${this.path}.${process.pid}.tmp`;
|
|
217
|
-
writeFileSync(temporary, `${JSON.stringify(state)}
|
|
218
|
-
`, { mode: 384 });
|
|
219
|
-
renameSync(temporary, this.path);
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
224
|
-
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
225
|
-
import { dirname as dirname3, join as join2 } from "node:path";
|
|
226
|
-
|
|
227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
228
|
-
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
229
|
-
import { dirname as dirname2 } from "node:path";
|
|
230
|
-
var LOCK_WAIT_MS = 5e3;
|
|
231
|
-
var LOCK_STALE_MS = 3e4;
|
|
232
|
-
var RETRY_MS = 20;
|
|
233
|
-
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
234
|
-
var withFileLock = /* @__PURE__ */ __name((path, what2, body, waitMs = LOCK_WAIT_MS) => {
|
|
235
|
-
const lock = lockFor(path);
|
|
236
|
-
const deadline = Date.now() + waitMs;
|
|
237
|
-
while (!taken(lock)) {
|
|
238
|
-
if (Date.now() >= deadline)
|
|
239
|
-
throw lockTimeout(what2, waitMs, lock);
|
|
240
|
-
Atomics.wait(pause, 0, 0, RETRY_MS);
|
|
241
|
-
}
|
|
242
|
-
return holding(lock, body);
|
|
243
|
-
}, "withFileLock");
|
|
244
|
-
var withFileLockAsync = /* @__PURE__ */ __name(async (path, what2, body, waitMs = LOCK_WAIT_MS, sleep = realSleep) => {
|
|
245
|
-
const lock = lockFor(path);
|
|
246
|
-
const deadline = Date.now() + waitMs;
|
|
247
|
-
while (!taken(lock)) {
|
|
248
|
-
if (Date.now() >= deadline)
|
|
249
|
-
throw lockTimeout(what2, waitMs, lock);
|
|
250
|
-
await sleep(RETRY_MS);
|
|
251
|
-
}
|
|
252
|
-
return holding(lock, body);
|
|
253
|
-
}, "withFileLockAsync");
|
|
254
|
-
var lockFor = /* @__PURE__ */ __name((path) => {
|
|
255
|
-
mkdirSync2(dirname2(path), { recursive: true, mode: 448 });
|
|
256
|
-
return `${path}.lock`;
|
|
257
|
-
}, "lockFor");
|
|
258
|
-
var taken = /* @__PURE__ */ __name((lock) => {
|
|
259
|
-
for (; ; ) {
|
|
260
|
-
try {
|
|
261
|
-
closeSync(openSync2(lock, "wx", 384));
|
|
262
|
-
return true;
|
|
263
|
-
} catch (error) {
|
|
264
|
-
if (error.code !== "EEXIST")
|
|
265
|
-
throw error;
|
|
266
|
-
if (Date.now() - lockTime(lock) <= LOCK_STALE_MS)
|
|
267
|
-
return false;
|
|
268
|
-
try {
|
|
269
|
-
unlinkSync(lock);
|
|
270
|
-
} catch {
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}, "taken");
|
|
275
|
-
var holding = /* @__PURE__ */ __name((lock, body) => {
|
|
276
|
-
try {
|
|
277
|
-
return body();
|
|
278
|
-
} finally {
|
|
279
|
-
try {
|
|
280
|
-
unlinkSync(lock);
|
|
281
|
-
} catch {
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}, "holding");
|
|
285
|
-
var lockTimeout = /* @__PURE__ */ __name((what2, waitMs, lock) => new CliError("timeout", `${what2} stayed locked for ${waitMs / 1e3}s (${lock})`), "lockTimeout");
|
|
286
|
-
var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
287
|
-
try {
|
|
288
|
-
return statSync(lock).mtimeMs;
|
|
289
|
-
} catch {
|
|
290
|
-
return Date.now();
|
|
291
|
-
}
|
|
292
|
-
}, "lockTime");
|
|
293
|
-
|
|
294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
295
|
-
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
296
|
-
var SendJournal = class {
|
|
297
|
-
static {
|
|
298
|
-
__name(this, "SendJournal");
|
|
299
|
-
}
|
|
300
|
-
path;
|
|
301
|
-
resource;
|
|
302
|
-
constructor(path, resource = { service: "unknown", version: "unknown" }) {
|
|
303
|
-
this.path = path;
|
|
304
|
-
this.resource = resource;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Runs `body` with the journal to itself, across processes: two sends at the limit must not both
|
|
308
|
-
* read "one left". A lock file opened with `wx`, because `flock` is not there on Windows.
|
|
309
|
-
*/
|
|
310
|
-
locked(body) {
|
|
311
|
-
return withFileLock(this.path, "the send journal", body);
|
|
312
|
-
}
|
|
313
|
-
/** `locked` without blocking the thread while another process holds the journal: what `serve` uses. */
|
|
314
|
-
lockedAsync(body) {
|
|
315
|
-
return withFileLockAsync(this.path, "the send journal", body);
|
|
316
|
-
}
|
|
317
|
-
append(entry) {
|
|
318
|
-
const { at, ...attributes } = entry;
|
|
319
|
-
const { runId, command, traceId } = currentRun();
|
|
320
|
-
const record = logRecordOf({
|
|
321
|
-
severity: entry.outcome === "sent" || entry.outcome === "reserved" ? "info" : "warn",
|
|
322
|
-
event: logAttributes({ event: "send.recorded", ...attributes }),
|
|
323
|
-
time: at,
|
|
324
|
-
runId,
|
|
325
|
-
...traceId === void 0 ? {} : { traceId },
|
|
326
|
-
command,
|
|
327
|
-
resource: this.resource,
|
|
328
|
-
allow: LOG_ATTRIBUTES
|
|
329
|
-
});
|
|
330
|
-
mkdirSync3(dirname3(this.path), { recursive: true, mode: 448 });
|
|
331
|
-
appendFileSync(this.path, `${JSON.stringify(record)}
|
|
332
|
-
`, { mode: 384 });
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Oldest first, each reservation folded into its outcome; one with no outcome yet is in flight,
|
|
336
|
-
* or its process died. A line that does not parse is skipped: a torn last write must not block sending.
|
|
337
|
-
*/
|
|
338
|
-
entries(filter) {
|
|
339
|
-
const lines = this.#lines();
|
|
340
|
-
const settled2 = new Set(lines.filter((entry) => entry.outcome !== "reserved").map((entry) => entry.reservation));
|
|
341
|
-
const entries = lines.filter((entry) => entry.outcome !== "reserved" || !settled2.has(entry.reservation)).map(({ reservation, ...entry }) => entry.outcome === "reserved" ? { ...entry, reservation } : entry).map(withSendId);
|
|
342
|
-
return filter === void 0 ? entries : entries.filter((entry) => (filter.outcome === void 0 || entry.outcome === filter.outcome) && (filter.chatId === void 0 || entry.chatId === filter.chatId) && (filter.operationId === void 0 || entry.operationId === filter.operationId) && (filter.errorCode === void 0 || entry.errorCode === filter.errorCode) && (filter.key === void 0 || entry.key === filter.key));
|
|
343
|
-
}
|
|
344
|
-
#lines() {
|
|
345
|
-
let text;
|
|
346
|
-
try {
|
|
347
|
-
text = readFileSync2(this.path, "utf8");
|
|
348
|
-
} catch {
|
|
349
|
-
return [];
|
|
350
|
-
}
|
|
351
|
-
return text.split("\n").filter((line) => line.trim() !== "").flatMap((line) => {
|
|
352
|
-
try {
|
|
353
|
-
return [entryOf(JSON.parse(line))];
|
|
354
|
-
} catch {
|
|
355
|
-
return [];
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
var entryOf = /* @__PURE__ */ __name((line) => {
|
|
361
|
-
if (!("attributes" in line))
|
|
362
|
-
return line;
|
|
363
|
-
const { event: _, ...attributes } = line.attributes;
|
|
364
|
-
return { at: line.time, ...fromLogAttributes(attributes) };
|
|
365
|
-
}, "entryOf");
|
|
366
|
-
var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
367
|
-
const { cid, ...rest } = entry;
|
|
368
|
-
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
369
|
-
}, "withSendId");
|
|
370
|
-
|
|
371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
372
|
-
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
373
|
-
import { join as join3 } from "node:path";
|
|
374
|
-
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
375
|
-
var RecipientList = class {
|
|
376
|
-
static {
|
|
377
|
-
__name(this, "RecipientList");
|
|
378
|
-
}
|
|
379
|
-
path;
|
|
380
|
-
command;
|
|
381
|
-
lockWaitMs;
|
|
382
|
-
/** `command` names the program in the hint that turns the list off. */
|
|
383
|
-
constructor(path, command, lockWaitMs) {
|
|
384
|
-
this.path = path;
|
|
385
|
-
this.command = command;
|
|
386
|
-
this.lockWaitMs = lockWaitMs;
|
|
387
|
-
}
|
|
388
|
-
/** `undefined` when the list is off. A file that cannot be read refuses rather than opening up. */
|
|
389
|
-
read() {
|
|
390
|
-
if (!existsSync(this.path))
|
|
391
|
-
return void 0;
|
|
392
|
-
try {
|
|
393
|
-
const parsed = JSON.parse(readFileSync3(this.path, "utf8"));
|
|
394
|
-
if (!Array.isArray(parsed.chats))
|
|
395
|
-
throw new Error("no `chats` array");
|
|
396
|
-
return parsed.chats;
|
|
397
|
-
} catch (error) {
|
|
398
|
-
throw new CliError("configuration_error", `the recipient list ${this.path} cannot be read (${error instanceof Error ? error.message : String(error)}) \u2014 fix the file or turn the list off with \`${this.command} recipients clear\``);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
list(filter = {}) {
|
|
402
|
-
const chats = this.read();
|
|
403
|
-
return {
|
|
404
|
-
state: chats === void 0 ? "off" : chats.length === 0 ? "empty" : "on",
|
|
405
|
-
items: (chats ?? []).filter((chat) => (filter.id === void 0 || chat.id === filter.id) && (filter.title === void 0 || chat.title?.toLocaleLowerCase() === filter.title.toLocaleLowerCase()))
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
/** Whether it was new. Adding one again fills in a partner an older entry was stored without. */
|
|
409
|
-
add(recipient) {
|
|
410
|
-
return this.#locked(() => this.#added(recipient));
|
|
411
|
-
}
|
|
412
|
-
/** `add` waiting for the lock on timers: `recipients add` connects, so it runs inside `serve` when one holds the account. */
|
|
413
|
-
addAsync(recipient) {
|
|
414
|
-
return withFileLockAsync(this.path, "the recipient list", () => this.#added(recipient), this.lockWaitMs);
|
|
415
|
-
}
|
|
416
|
-
#added(recipient) {
|
|
417
|
-
const chats = this.read() ?? [];
|
|
418
|
-
const known = chats.find((chat) => chat.id === recipient.id);
|
|
419
|
-
if (known) {
|
|
420
|
-
if (recipient.partnerId && !known.partnerId) {
|
|
421
|
-
this.#write(chats.map((chat) => chat === known ? { ...known, partnerId: recipient.partnerId } : chat));
|
|
422
|
-
}
|
|
423
|
-
return false;
|
|
424
|
-
}
|
|
425
|
-
this.#write([...chats, recipient]);
|
|
426
|
-
return true;
|
|
427
|
-
}
|
|
428
|
-
/** The id or the title as it was stored; `undefined` when neither matched. */
|
|
429
|
-
remove(reference) {
|
|
430
|
-
return this.#locked(() => {
|
|
431
|
-
const chats = this.read() ?? [];
|
|
432
|
-
const wanted = reference.trim();
|
|
433
|
-
const gone = chats.find((chat) => chat.id === wanted) ?? chats.find((chat) => chat.title?.toLocaleLowerCase() === wanted.toLocaleLowerCase());
|
|
434
|
-
if (gone)
|
|
435
|
-
this.#write(chats.filter((chat) => chat !== gone));
|
|
436
|
-
return gone;
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* The chat the messenger now names `to`: its entry, and a partner of that id, follow it. Only an entry already there
|
|
441
|
-
* changes, and no list is created, so the list never opens up. Whether anything changed.
|
|
442
|
-
*/
|
|
443
|
-
async rekey(from, to) {
|
|
444
|
-
if (from === to)
|
|
445
|
-
return false;
|
|
446
|
-
return withFileLockAsync(this.path, "the recipient list", () => {
|
|
447
|
-
const chats = this.read();
|
|
448
|
-
if (!chats?.some((chat) => chat.id === from || chat.partnerId === from))
|
|
449
|
-
return false;
|
|
450
|
-
const held = chats.some((chat) => chat.id === to);
|
|
451
|
-
this.#write(chats.filter((chat) => !(held && chat.id === from)).map((chat) => ({
|
|
452
|
-
...chat,
|
|
453
|
-
...chat.id === from ? { id: to } : {},
|
|
454
|
-
...chat.partnerId === from ? { partnerId: to } : {}
|
|
455
|
-
})));
|
|
456
|
-
return true;
|
|
457
|
-
}, this.lockWaitMs);
|
|
458
|
-
}
|
|
459
|
-
/** Whether there was a list to turn off. */
|
|
460
|
-
off() {
|
|
461
|
-
return this.#locked(() => {
|
|
462
|
-
if (!existsSync(this.path))
|
|
463
|
-
return false;
|
|
464
|
-
rmSync(this.path);
|
|
465
|
-
return true;
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* Every change reads and writes under one lock: a `serve` re-keying while the owner removes a chat must not write
|
|
470
|
-
* the removed chat back. A lock held too long refuses the change and leaves the list as it was. Blocks the thread
|
|
471
|
-
* while it waits: for callers that cannot be async, and `recipients remove` and `clear`, which never
|
|
472
|
-
* connect and so never run inside `serve`.
|
|
473
|
-
*/
|
|
474
|
-
#locked(body) {
|
|
475
|
-
return withFileLock(this.path, "the recipient list", body, this.lockWaitMs);
|
|
476
|
-
}
|
|
477
|
-
#write(chats) {
|
|
478
|
-
writeSecurely(this.path, `${JSON.stringify({ chats }, null, 2)}
|
|
479
|
-
`, 384);
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
484
|
-
var HOUR_MS = 60 * 60 * 1e3;
|
|
485
|
-
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
486
|
-
"attachments.extract",
|
|
487
|
-
"conversations.embeddings",
|
|
488
|
-
"conversations.links",
|
|
489
|
-
"messages.server-search",
|
|
490
|
-
"messages.sync-first",
|
|
491
|
-
"stats.contacts.top.sync-first",
|
|
492
|
-
"stats.messages.counters.sync",
|
|
493
|
-
"stats.messages.show.sync-first",
|
|
494
|
-
"stats.messages.top.sync-first",
|
|
495
|
-
"store.gaps.repair"
|
|
496
|
-
]);
|
|
497
|
-
var countsTowardLimit = /* @__PURE__ */ __name(({ kind = "message", action, notify }) => kind === "message" || kind === "forward" || kind === "edit" || kind === "delete" || kind === "pin" && notify === true || action === "create" || action === "members.add" || action === "requests.accept" || action === "join" || action === "contact-import", "countsTowardLimit");
|
|
498
|
-
var weightOf = /* @__PURE__ */ __name(({ kind = "message", action, count, people }) => kind === "delete" || kind === "message" && action === void 0 ? Math.max(1, count ?? 1) : action === "create" || action === "members.add" || action === "requests.accept" || action === "contact-import" ? Math.max(1, people ?? count ?? 1) : 1, "weightOf");
|
|
499
|
-
var timeOf = /* @__PURE__ */ __name((entry) => Date.parse(entry.scheduledFor ?? entry.at), "timeOf");
|
|
500
|
-
var ceilingRefusal = /* @__PURE__ */ __name((key, command) => new CliError("permission_error", `${key} is not allowed: setup's answer keeps every WireCat tool read-only; the owner changes it at a terminal with \`${command} setup\``, { permission: key }), "ceilingRefusal");
|
|
501
|
-
var levelRefusal = /* @__PURE__ */ __name((refused, fix = `${refused.command} ${refused.profile} config set permissions.${refused.key} allow`) => refused.named === CEILING_KEY ? ceilingRefusal(refused.key, refused.command) : new CliError("permission_error", `profile ${refused.profile} does not let ${refused.key} write (permissions.${refused.named} is ${refused.level}, from the ${refused.permissionSources[refused.named ?? ""] ?? "default"}); to allow it: ${fix}`, { permission: refused.key }), "levelRefusal");
|
|
502
|
-
var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipients.command, readOnlyLock, permissions, permissionSources = {}, permissionDefaults, permissionFix, ask = refuseToAsk, sendsPerHour, journal, flood, warn, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now") }) => {
|
|
503
|
-
const currentPermissions = /* @__PURE__ */ __name(() => typeof permissions === "function" ? permissions() : permissions, "currentPermissions");
|
|
504
|
-
let reservation;
|
|
505
|
-
const answered = /* @__PURE__ */ new WeakSet();
|
|
506
|
-
const refuseReadOnly = /* @__PURE__ */ __name(() => {
|
|
507
|
-
if (readOnlyLock)
|
|
508
|
-
throw readOnlyRefusal(readOnlyLock, MESSENGER_CHANGE_REFUSAL);
|
|
509
|
-
}, "refuseReadOnly");
|
|
510
|
-
const refuseHeld = /* @__PURE__ */ __name(({ key }) => {
|
|
511
|
-
if (key !== void 0 && READS_UNDER_HOLD.has(key))
|
|
512
|
-
return;
|
|
513
|
-
const block = flood?.sendBlock();
|
|
514
|
-
if (!block)
|
|
515
|
-
return;
|
|
516
|
-
throw new CliError("permission_error", `profile ${profile} holds its writes ${holdEnd(block)}: ${block.hint} \u2014 reads still work; do not retry: the owner checks the account with \`${command} ${profile} doctor --online\`, and lifts the hold with \`${command} ${profile} flood clear\` once it is over`, { sendBlock: block, standing: { state: block.state, hint: block.hint } });
|
|
517
|
-
}, "refuseHeld");
|
|
518
|
-
const permitted = /* @__PURE__ */ __name((request) => {
|
|
519
|
-
const { chatId, kind = "message", action, personIds } = request;
|
|
520
|
-
refuseReadOnly();
|
|
521
|
-
const levels = currentPermissions();
|
|
522
|
-
if (levels !== void 0) {
|
|
523
|
-
const key = request.key ?? keyForWrite(kind, action);
|
|
524
|
-
const { level, key: named } = levelFor(levels, key, permissionDefaults);
|
|
525
|
-
if (level === "deny" || level === "readonly")
|
|
526
|
-
throw levelRefusal({ profile, command, key, level, named, permissionSources }, permissionFix?.(request, key));
|
|
527
|
-
if (level === "ask" && !answered.has(request)) {
|
|
528
|
-
throw new CliError("confirmation_required", `${key} asks before it acts, and it was not asked`);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
const allowed = recipients.read();
|
|
532
|
-
if (chatId !== null && allowed && !allowed.some((chat) => chat.id === chatId)) {
|
|
533
|
-
throw new CliError("confirmation_required", `chat ${chatId} is not on the recipient list of profile ${profile} \u2014 the owner adds it with \`${command} ${profile} recipients add ${chatId}\``, { chat_id: chatId });
|
|
534
|
-
}
|
|
535
|
-
const strangers = allowed ? (personIds ?? []).filter((id) => !allowed.some((chat) => chat.partnerId === id)) : [];
|
|
536
|
-
if (strangers.length > 0) {
|
|
537
|
-
throw new CliError("confirmation_required", `${strangers.join(", ")} ${strangers.length === 1 ? "is" : "are"} not on the recipient list of profile ${profile} \u2014 the owner adds the one-to-one chat with each person (\`${command} ${profile} recipients add <chat>\`); a chat added to the list earlier is added again to be recognised`, { person_ids: strangers });
|
|
538
|
-
}
|
|
539
|
-
}, "permitted");
|
|
540
|
-
const withinLimit = /* @__PURE__ */ __name((request, entries) => {
|
|
541
|
-
const { chatId, sendId } = request;
|
|
542
|
-
const asked = { ...request, people: request.personIds?.length ?? request.count };
|
|
543
|
-
const count = weightOf(asked);
|
|
544
|
-
if (count > sendsPerHour) {
|
|
545
|
-
throw new CliError("rate_limited", `${count} at once is more than the hourly limit of profile ${profile} (sendsPerHour ${sendsPerHour}) \u2014 do fewer at a time`);
|
|
546
|
-
}
|
|
547
|
-
const at = request.scheduledFor ? Date.parse(request.scheduledFor) : now().getTime();
|
|
548
|
-
const counted = entries.filter(countsTowardLimit).filter((entry) => entry.outcome === "sent" || entry.outcome === "outcome_unknown" || entry.outcome === "reserved").filter((entry) => Math.abs(timeOf(entry) - at) < HOUR_MS);
|
|
549
|
-
const unsure = /* @__PURE__ */ __name((entry) => entry.outcome === "outcome_unknown", "unsure");
|
|
550
|
-
const same = /* @__PURE__ */ __name((a, b) => a.sendId !== void 0 && a.sendId === b.sendId && a.chatId === b.chatId, "same");
|
|
551
|
-
const last = [...counted].reverse().find((entry) => same(entry, { chatId, sendId }));
|
|
552
|
-
if (sendId !== void 0 && last && unsure(last)) {
|
|
553
|
-
if (last.sendAs !== request.sendAs) {
|
|
554
|
-
throw new CliError("validation_error", "this send id was tried under another identity; repeat it with the same --send-as, or it may post twice", { operation_id: sendId, retryable: false });
|
|
555
|
-
}
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
const recent = counted.filter((entry, index) => !(unsure(entry) && counted.slice(index + 1).some((later) => same(later, entry)))).map((entry) => ({ time: timeOf(entry), weight: weightOf(entry) })).sort((a, b) => a.time - b.time);
|
|
559
|
-
const used = recent.reduce((sum, { weight }) => sum + weight, 0);
|
|
560
|
-
if (used + count > sendsPerHour) {
|
|
561
|
-
let freed = 0;
|
|
562
|
-
const opening = recent.find(({ weight }) => {
|
|
563
|
-
freed += weight;
|
|
564
|
-
return used - freed + count <= sendsPerHour;
|
|
565
|
-
});
|
|
566
|
-
const nextMs = (opening?.time ?? 0) + HOUR_MS;
|
|
567
|
-
const next = new Date(nextMs).toISOString();
|
|
568
|
-
throw new CliError("rate_limited", `profile ${profile} has sent ${used} messages in the hour around ${new Date(at).toISOString()}, and its limit is ${sendsPerHour} (sendsPerHour) \u2014 the next send is possible at ${next}`, { retry_after_ms: nextMs - now().getTime(), retry_at: next });
|
|
569
|
-
}
|
|
570
|
-
return true;
|
|
571
|
-
}, "withinLimit");
|
|
572
|
-
const counting = /* @__PURE__ */ __name((request) => {
|
|
573
|
-
permitted(request);
|
|
574
|
-
refuseHeld(request);
|
|
575
|
-
const asked = { ...request, people: request.personIds?.length ?? request.count };
|
|
576
|
-
const creatingTopic = request.kind === "chat" && request.action === "topic-create";
|
|
577
|
-
if (!countsTowardLimit(asked) && !creatingTopic)
|
|
578
|
-
return void 0;
|
|
579
|
-
const checked = /* @__PURE__ */ __name((entries) => {
|
|
580
|
-
if (!creatingTopic)
|
|
581
|
-
return withinLimit(request, entries);
|
|
582
|
-
if (request.sendId === void 0)
|
|
583
|
-
throw new CliError("validation_error", "a topic creation needs an attempt id");
|
|
584
|
-
if (entries.some((entry) => entry.action === "topic-create" && entry.sendId === request.sendId && ["sent", "outcome_unknown", "reserved"].includes(entry.outcome))) {
|
|
585
|
-
throw new CliError("validation_error", "this topic creation was already attempted; check topics list and do not repeat an unknown creation", { operation_id: request.sendId, retryable: false });
|
|
586
|
-
}
|
|
587
|
-
return true;
|
|
588
|
-
}, "checked");
|
|
589
|
-
const reserving = /* @__PURE__ */ __name(() => {
|
|
590
|
-
if (!checked(journal.entries()))
|
|
591
|
-
return;
|
|
592
|
-
const id = randomUUID();
|
|
593
|
-
const { chatId, kind, action, sendId, operationId, scheduledFor, notify } = request;
|
|
594
|
-
journal.append({
|
|
595
|
-
at: now().toISOString(),
|
|
596
|
-
profile,
|
|
597
|
-
chatId,
|
|
598
|
-
outcome: "reserved",
|
|
599
|
-
reservation: id,
|
|
600
|
-
...kind ? { kind } : {},
|
|
601
|
-
...action ? { action } : {},
|
|
602
|
-
...asked.people === void 0 ? {} : kind === "delete" || kind === "message" || kind === void 0 ? { count: asked.people } : { people: asked.people },
|
|
603
|
-
...sendId === void 0 ? {} : { sendId },
|
|
604
|
-
...operationId === void 0 ? {} : { operationId },
|
|
605
|
-
...scheduledFor ? { scheduledFor } : {},
|
|
606
|
-
...notify === void 0 ? {} : { notify }
|
|
607
|
-
});
|
|
608
|
-
reservation = id;
|
|
609
|
-
}, "reserving");
|
|
610
|
-
return { checked, reserving };
|
|
611
|
-
}, "counting");
|
|
612
|
-
return {
|
|
613
|
-
ask: /* @__PURE__ */ __name(async (request) => {
|
|
614
|
-
refuseReadOnly();
|
|
615
|
-
const levels = currentPermissions();
|
|
616
|
-
if (levels === void 0)
|
|
617
|
-
return;
|
|
618
|
-
const key = request.key ?? keyForWrite(request.kind ?? "message", request.action);
|
|
619
|
-
if (levelFor(levels, key, permissionDefaults).level !== "ask")
|
|
620
|
-
return;
|
|
621
|
-
refuseHeld(request);
|
|
622
|
-
await ask(key, request);
|
|
623
|
-
answered.add(request);
|
|
624
|
-
}, "ask"),
|
|
625
|
-
check: /* @__PURE__ */ __name((request, { reserve = true } = {}) => {
|
|
626
|
-
const counted = counting(request);
|
|
627
|
-
if (!counted)
|
|
628
|
-
return;
|
|
629
|
-
if (reserve)
|
|
630
|
-
journal.locked(counted.reserving);
|
|
631
|
-
else
|
|
632
|
-
counted.checked(journal.entries());
|
|
633
|
-
}, "check"),
|
|
634
|
-
reserve: /* @__PURE__ */ __name(async (request) => {
|
|
635
|
-
const counted = counting(request);
|
|
636
|
-
if (counted)
|
|
637
|
-
await journal.lockedAsync(counted.reserving);
|
|
638
|
-
}, "reserve"),
|
|
639
|
-
// After a send, a failure to write here must not become the command's answer: the message is
|
|
640
|
-
// already with a person, and an error would invite the caller to send it again.
|
|
641
|
-
record: /* @__PURE__ */ __name((entry) => {
|
|
642
|
-
const { personIds: _, ...kept } = entry;
|
|
643
|
-
const settles = entry.outcome === "refused" ? void 0 : reservation;
|
|
644
|
-
reservation = void 0;
|
|
645
|
-
try {
|
|
646
|
-
journal.append({ at: now().toISOString(), profile, ...kept, ...settles ? { reservation: settles } : {} });
|
|
647
|
-
} catch (error) {
|
|
648
|
-
warn(`this send is not in the send journal: ${journalFailure(error)}`, {
|
|
649
|
-
event: "warning",
|
|
650
|
-
code: "send_not_journaled",
|
|
651
|
-
operation: "sends.journal"
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
}, "record")
|
|
655
|
-
};
|
|
656
|
-
}, "sendGuard");
|
|
657
|
-
var refuseToAsk = /* @__PURE__ */ __name(async (key) => {
|
|
658
|
-
throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is here to answer \u2014 add ${skipFlagFor(key)} to go ahead`);
|
|
659
|
-
}, "refuseToAsk");
|
|
660
|
-
var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, ask) => sendGuard({
|
|
661
|
-
profile: settings.profile,
|
|
662
|
-
command: app.command,
|
|
663
|
-
...settings.readOnlyLock ? { readOnlyLock: settings.readOnlyLock } : {},
|
|
664
|
-
permissions: /* @__PURE__ */ __name(() => settings.permissions, "permissions"),
|
|
665
|
-
permissionSources: settings.permissionSources,
|
|
666
|
-
...settings.permissionDefaults ? { permissionDefaults: settings.permissionDefaults } : {},
|
|
667
|
-
...ask ? { ask } : {},
|
|
668
|
-
sendsPerHour: settings.sendsPerHour,
|
|
669
|
-
journal: new SendJournal(sendsPathFor(app, settings.profile, env), { service: app.command, version: app.version }),
|
|
670
|
-
recipients: new RecipientList(recipientsPathFor(app, settings.profile, env), app.command),
|
|
671
|
-
flood: new FloodMemory(floodPathFor(app, settings.profile, env)),
|
|
672
|
-
warn
|
|
673
|
-
}), "guardFor");
|
|
674
|
-
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
675
|
-
|
|
676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
677
133
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
678
134
|
"help",
|
|
679
135
|
"guide",
|
|
@@ -753,7 +209,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
753
209
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
754
210
|
}, "refuseUnknownPermissionKeys");
|
|
755
211
|
|
|
756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
757
213
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
758
214
|
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" }) => {
|
|
759
215
|
let warned = false;
|
|
@@ -874,13 +330,13 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
874
330
|
}
|
|
875
331
|
if (round !== rekeyRound)
|
|
876
332
|
return;
|
|
877
|
-
const
|
|
878
|
-
rekeysQueued -=
|
|
333
|
+
const taken = pass?.taken ?? rest.length;
|
|
334
|
+
rekeysQueued -= taken;
|
|
879
335
|
for (const { from, to } of pass?.applied ?? [])
|
|
880
336
|
await Promise.resolve().then(() => rekeyed?.(from, to)).catch((error) => notWritten("history.rekey", error));
|
|
881
337
|
for (const { error } of pass?.refused ?? [])
|
|
882
338
|
notWritten("history.rekey", error);
|
|
883
|
-
rest = rest.slice(
|
|
339
|
+
rest = rest.slice(taken);
|
|
884
340
|
if (rest.length > 0)
|
|
885
341
|
await new Promise((resolve) => setTimeout(resolve, rekeyPacing.pauseMs));
|
|
886
342
|
}
|
|
@@ -1329,11 +785,11 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1329
785
|
}
|
|
1330
786
|
}, "keep");
|
|
1331
787
|
|
|
1332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1333
|
-
import { readFileSync
|
|
1334
|
-
import { join
|
|
788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
789
|
+
import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
790
|
+
import { join } from "node:path";
|
|
1335
791
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
1336
|
-
var pacePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
792
|
+
var pacePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "pace", `${profile}.json`), "pacePathFor");
|
|
1337
793
|
var Pacer = class {
|
|
1338
794
|
static {
|
|
1339
795
|
__name(this, "Pacer");
|
|
@@ -1351,12 +807,12 @@ var Pacer = class {
|
|
|
1351
807
|
}
|
|
1352
808
|
/** When this call may go; reserved at once, so the next caller in any process lines up behind it. */
|
|
1353
809
|
async reserve() {
|
|
1354
|
-
const now = this.now();
|
|
1355
810
|
if (this.interval === 0)
|
|
1356
|
-
return now;
|
|
811
|
+
return this.now();
|
|
1357
812
|
return withFileLockAsync(this.path, "the request pace", () => {
|
|
1358
|
-
const
|
|
1359
|
-
|
|
813
|
+
const now = this.now();
|
|
814
|
+
const tat = Math.max(this.read(now), now);
|
|
815
|
+
this.write(tat + this.interval, now);
|
|
1360
816
|
return Math.max(now, tat - this.rate.burst * this.interval);
|
|
1361
817
|
});
|
|
1362
818
|
}
|
|
@@ -1365,26 +821,31 @@ var Pacer = class {
|
|
|
1365
821
|
if (this.interval === 0)
|
|
1366
822
|
return;
|
|
1367
823
|
await withFileLockAsync(this.path, "the request pace", () => {
|
|
1368
|
-
const
|
|
1369
|
-
this.
|
|
824
|
+
const now = this.now();
|
|
825
|
+
const hold = now + waitMs + this.rate.burst * this.interval;
|
|
826
|
+
this.write(Math.max(this.read(now), hold), now);
|
|
1370
827
|
});
|
|
1371
828
|
}
|
|
1372
829
|
/** The owner's `flood clear`: every process may go again at once. */
|
|
1373
830
|
async reset() {
|
|
1374
|
-
await withFileLockAsync(this.path, "the request pace", () => this.write(0));
|
|
831
|
+
await withFileLockAsync(this.path, "the request pace", () => this.write(0, this.now()));
|
|
1375
832
|
}
|
|
1376
|
-
read() {
|
|
833
|
+
read(now) {
|
|
1377
834
|
try {
|
|
1378
|
-
const
|
|
1379
|
-
|
|
835
|
+
const file = JSON.parse(readFileSync(this.path, "utf8"));
|
|
836
|
+
const tat = Number(file.tat);
|
|
837
|
+
if (!Number.isFinite(tat))
|
|
838
|
+
return 0;
|
|
839
|
+
const at = Number(file.at);
|
|
840
|
+
return Number.isFinite(at) && at > now ? now + Math.max(0, tat - at) : tat;
|
|
1380
841
|
} catch {
|
|
1381
842
|
return 0;
|
|
1382
843
|
}
|
|
1383
844
|
}
|
|
1384
|
-
write(tat) {
|
|
845
|
+
write(tat, at) {
|
|
1385
846
|
const temporary = `${this.path}.${process.pid}.tmp`;
|
|
1386
|
-
|
|
1387
|
-
|
|
847
|
+
writeFileSync(temporary, JSON.stringify({ tat, at }), { mode: 384 });
|
|
848
|
+
renameSync(temporary, this.path);
|
|
1388
849
|
}
|
|
1389
850
|
};
|
|
1390
851
|
var ANNOUNCE_WAIT_MS = 5e3;
|
|
@@ -1405,8 +866,8 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
1405
866
|
const waitMs = at - now();
|
|
1406
867
|
if (waitMs <= 0)
|
|
1407
868
|
return;
|
|
1408
|
-
if (waitMs > LONGEST_PACE_WAIT_MS)
|
|
1409
|
-
throw new CliError("rate_limited",
|
|
869
|
+
if (waitMs > (options.longestWaitMs ?? LONGEST_PACE_WAIT_MS))
|
|
870
|
+
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 });
|
|
1410
871
|
if (waitMs >= ANNOUNCE_WAIT_MS) {
|
|
1411
872
|
const seconds = Math.ceil(waitMs / 1e3);
|
|
1412
873
|
warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
|
|
@@ -1419,7 +880,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
1419
880
|
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
1420
881
|
}, "waitForTurn");
|
|
1421
882
|
|
|
1422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
1423
884
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
1424
885
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
1425
886
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -1516,7 +977,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
1516
977
|
});
|
|
1517
978
|
}, "flooded");
|
|
1518
979
|
|
|
1519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
1520
981
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
1521
982
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
1522
983
|
const write = currentOperation();
|
|
@@ -1615,7 +1076,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1615
1076
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1616
1077
|
}, "byPart");
|
|
1617
1078
|
|
|
1618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1619
1080
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1620
1081
|
let opened;
|
|
1621
1082
|
return {
|
|
@@ -1957,6 +1418,7 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1957
1418
|
history: base.settings.record,
|
|
1958
1419
|
searchCatchUp: base.settings.searchCatchUp,
|
|
1959
1420
|
...base.settings.historyLimits ? { historyLimits: base.settings.historyLimits } : {},
|
|
1421
|
+
historyMuted: base.settings.historyMuted,
|
|
1960
1422
|
pictures: base.settings.pictureSearch,
|
|
1961
1423
|
reranker: base.settings.searchReranker,
|
|
1962
1424
|
guard,
|
|
@@ -2015,17 +1477,6 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
2015
1477
|
export {
|
|
2016
1478
|
answerOf,
|
|
2017
1479
|
terminalAsker,
|
|
2018
|
-
holdEnd,
|
|
2019
|
-
floodPathFor,
|
|
2020
|
-
FloodMemory,
|
|
2021
|
-
sendsPathFor,
|
|
2022
|
-
SendJournal,
|
|
2023
|
-
recipientsPathFor,
|
|
2024
|
-
RecipientList,
|
|
2025
|
-
ceilingRefusal,
|
|
2026
|
-
levelRefusal,
|
|
2027
|
-
sendGuard,
|
|
2028
|
-
guardFor,
|
|
2029
1480
|
DEFAULT_PACE,
|
|
2030
1481
|
pacePathFor,
|
|
2031
1482
|
Pacer,
|
|
@@ -2037,6 +1488,7 @@ export {
|
|
|
2037
1488
|
unknownPermissionIssues,
|
|
2038
1489
|
refuseUnknownPermissionKeys,
|
|
2039
1490
|
stored,
|
|
1491
|
+
fill,
|
|
2040
1492
|
connectFor,
|
|
2041
1493
|
connectedFor,
|
|
2042
1494
|
refuseLocalWrite,
|