@wirecat/zoom-cli 0.64.0 → 0.65.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 +13 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +5 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answers.d.ts +8 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/archive-import.d.ts +1 -1
- package/dist/archive-import.d.ts.map +1 -1
- package/dist/archive-import.js +2 -1
- package/dist/archive-import.js.map +1 -1
- package/dist/bin/zm.js +6 -2
- package/dist/bundle/{all-profiles-W2OVBZ7S.js → all-profiles-SKMLZJSY.js} +8 -8
- package/dist/bundle/answer-policy-BHDNSJWX.js +96 -0
- package/dist/bundle/{anthropic-P4BKQNBO.js → anthropic-TVHK7CY2.js} +4 -4
- package/dist/bundle/{app-server-AYUW45ND.js → app-server-44ASFH47.js} +53 -52
- package/dist/bundle/{bun-MNGPTYDQ.js → bun-O4WHGL2F.js} +2 -2
- package/dist/bundle/{bun-sqlite-PTPUSXAO.js → bun-sqlite-NS32GMM4.js} +3 -3
- package/dist/bundle/{chunk-CZKV4USJ.js → chunk-24F7JBLY.js} +59 -4
- package/dist/bundle/{chunk-A2FOW3ZC.js → chunk-25IDWPEN.js} +148 -97
- package/dist/bundle/{chunk-BMYZWBAX.js → chunk-266WOOB3.js} +4 -4
- package/dist/bundle/{chunk-23LOMA2I.js → chunk-2H5SXK7K.js} +45 -25
- package/dist/bundle/{chunk-24WCZURP.js → chunk-37PHGASE.js} +2 -2
- package/dist/bundle/{chunk-WFIJOFS5.js → chunk-3CZIWGZ6.js} +1 -1
- package/dist/bundle/{chunk-BO5YVG3X.js → chunk-5NGOP4EZ.js} +125 -35
- package/dist/bundle/{chunk-BWPKSUXW.js → chunk-6CS7ETBK.js} +4496 -386
- package/dist/bundle/{chunk-LEQCRVPD.js → chunk-7SQJCKR6.js} +1 -1
- package/dist/bundle/{chunk-RK3JBC4U.js → chunk-A6OA2EH2.js} +2 -2
- package/dist/bundle/{chunk-QK54GOGE.js → chunk-AMMD6YCJ.js} +7 -9
- package/dist/bundle/chunk-BLT3LR3U.js +34 -0
- package/dist/bundle/{chunk-X6M5DK66.js → chunk-BNXH73OU.js} +10 -10
- package/dist/bundle/{chunk-RJLNVHIU.js → chunk-BWRBALXG.js} +3 -3
- package/dist/bundle/{chunk-UFI5SX3F.js → chunk-C6BG57FA.js} +11 -11
- package/dist/bundle/{chunk-IIGXCYEL.js → chunk-CNEE6TPE.js} +13 -13
- package/dist/bundle/{chunk-TYKZCJD7.js → chunk-CVCRQW3A.js} +35 -35
- package/dist/bundle/{chunk-UCPL55YP.js → chunk-DNCKH7CO.js} +17 -17
- package/dist/bundle/{chunk-L4JGVSBN.js → chunk-DYJXAY7Q.js} +26 -25
- package/dist/bundle/{chunk-UABUBDYB.js → chunk-EA63UGWE.js} +2 -2
- package/dist/bundle/{chunk-UNO4G5NX.js → chunk-ERPRAYA7.js} +5 -5
- package/dist/bundle/{chunk-CZFV6XTW.js → chunk-FYJL276J.js} +3 -3
- package/dist/bundle/{chunk-YNYMWXXH.js → chunk-FYM27FCG.js} +32 -9
- package/dist/bundle/{chunk-H65B6A7Y.js → chunk-GBZF4IIP.js} +8 -8
- package/dist/bundle/{chunk-JRPYHDCO.js → chunk-GEX4V5TM.js} +4 -4
- package/dist/bundle/{chunk-5BCNJB2A.js → chunk-GMTXCFI7.js} +668 -504
- package/dist/bundle/{chunk-JM43EKTY.js → chunk-GXCNCMUY.js} +1896 -651
- package/dist/bundle/{chunk-FSYO3PUW.js → chunk-H7762LDA.js} +2 -2
- package/dist/bundle/{chunk-C3RRIJ5C.js → chunk-IPTI3Y2E.js} +6 -41
- package/dist/bundle/{chunk-7NDSBTKR.js → chunk-JF7ZEUXU.js} +34 -26
- package/dist/bundle/{chunk-5YLR24D5.js → chunk-K6ATTKQR.js} +13 -6
- package/dist/bundle/{chunk-R4NTPYXZ.js → chunk-KYLS5QGC.js} +2 -2
- package/dist/bundle/{chunk-OPP5CWAX.js → chunk-KZE3G4ZT.js} +34 -33
- package/dist/bundle/{chunk-I5QX2HAT.js → chunk-LOL6JYYN.js} +211 -106
- package/dist/bundle/{chunk-COTC7HF3.js → chunk-LPUFOWL3.js} +1 -1
- package/dist/bundle/{chunk-AF4HONAZ.js → chunk-M6IDHQ7N.js} +6402 -4395
- package/dist/bundle/{chunk-Y7TWNMTW.js → chunk-MH7AWCB4.js} +178 -49
- package/dist/bundle/{chunk-ZW4N73FO.js → chunk-MIB5X2XW.js} +3 -3
- package/dist/bundle/{chunk-Q3EDUZ5R.js → chunk-MPKKIL3U.js} +15 -12
- package/dist/bundle/{chunk-JMSKDW5G.js → chunk-MRWIXUYT.js} +2 -2
- package/dist/bundle/{chunk-HIGFBTEI.js → chunk-MZ6U6HNJ.js} +2 -2
- package/dist/bundle/{chunk-7SWNZ44U.js → chunk-NJSIHMAE.js} +2 -2
- package/dist/bundle/{chunk-HQHYPKSU.js → chunk-NNNEVWFF.js} +44 -31
- package/dist/bundle/{chunk-TJH5IQVZ.js → chunk-NO24PJNW.js} +1 -1
- package/dist/bundle/{chunk-7D56BQZL.js → chunk-OXUHTKO2.js} +2 -2
- package/dist/bundle/{chunk-IIP4J3PD.js → chunk-PV3UDPCI.js} +82 -6
- package/dist/bundle/{chunk-5FN4Q5H5.js → chunk-QI7BZS2G.js} +8 -13
- package/dist/bundle/{chunk-SMT6SFBK.js → chunk-QLCYAQ66.js} +2 -2
- package/dist/bundle/{chunk-PBJY5VR6.js → chunk-R5BAF5XE.js} +1 -1
- package/dist/bundle/{chunk-7VJIKJNW.js → chunk-RZLNHNSS.js} +8 -8
- package/dist/bundle/{chunk-3DGQJASQ.js → chunk-S4GDDO5S.js} +1 -1
- package/dist/bundle/{chunk-AAC6VNSL.js → chunk-SQWRZZOQ.js} +3 -3
- package/dist/bundle/{chunk-63MRRNDL.js → chunk-T3KICUOK.js} +6 -6
- package/dist/bundle/{chunk-7EOW47PV.js → chunk-TC7PD3LH.js} +4 -4
- package/dist/bundle/{chunk-XZSQLVED.js → chunk-TUIEDVI6.js} +2 -2
- package/dist/bundle/{chunk-H5LLZ5XA.js → chunk-U3ZUT557.js} +1 -1
- package/dist/bundle/{chunk-4XVRA6P5.js → chunk-U4RVOSX3.js} +1 -1
- package/dist/bundle/{chunk-EQYPTGCT.js → chunk-U5ASRBBF.js} +6 -4
- package/dist/bundle/{chunk-3IMEAZIM.js → chunk-UKU6MYUI.js} +4 -4
- package/dist/bundle/{chunk-J25UNZIL.js → chunk-UMHJZWZU.js} +9 -9
- package/dist/bundle/{chunk-HQHUPTZR.js → chunk-UPJXN2CO.js} +1308 -635
- package/dist/bundle/{chunk-OWXMQVVN.js → chunk-VH4F2EK4.js} +1 -1
- package/dist/bundle/{chunk-TJODNJKE.js → chunk-VJTGYBJJ.js} +18 -13
- package/dist/bundle/{chunk-54UEJGYB.js → chunk-VW2SW7ME.js} +3 -3
- package/dist/bundle/{chunk-2UONVSJQ.js → chunk-WLSF3GCC.js} +2 -2
- package/dist/bundle/{chunk-H3DMYF3W.js → chunk-XJQB47IL.js} +4 -4
- package/dist/bundle/{chunk-JZKNHA44.js → chunk-Y3EIK4XW.js} +1 -1
- package/dist/bundle/{chunk-3AAO5N4L.js → chunk-Z5424QL6.js} +2 -2
- package/dist/bundle/{chunk-K6OSD6DG.js → chunk-ZFNM3FNI.js} +75 -33
- package/dist/bundle/{chunk-SJIBJQJN.js → chunk-ZH743WNV.js} +40 -12
- package/dist/bundle/{chunk-JJZAGKUK.js → chunk-ZOGYTDHG.js} +2 -2
- package/dist/bundle/{chunk-6NBQJJT6.js → chunk-ZREFYKUB.js} +7 -7
- package/dist/bundle/{chunk-KJCCT3QY.js → chunk-ZXGRK44F.js} +14 -13
- package/dist/bundle/{cli-Y2ZO3D5U.js → cli-FDO6CP6R.js} +105 -59
- package/dist/bundle/command-contract-O4FDXM4U.js +37 -0
- package/dist/bundle/config-UBHKZG3J.js +78 -0
- package/dist/bundle/{decode-GO6GAYH2.js → decode-7SZI3TGZ.js} +3 -3
- package/dist/bundle/{dist-MIJKAGXW.js → dist-5GWUXW27.js} +18 -14
- package/dist/bundle/{echarts-NWK7LALR.js → echarts-FMACRZQC.js} +2 -2
- package/dist/bundle/{embed-2DOSN4DV.js → embed-24YSXHLP.js} +4 -4
- package/dist/bundle/{embedder-3Q3C2WKC.js → embedder-MEXN2TFB.js} +7 -7
- package/dist/bundle/{first-run-S75VKIT3.js → first-run-OCVEJH63.js} +8 -8
- package/dist/bundle/first-screen-KJIU25MH.js +35 -0
- package/dist/bundle/{folders-RSWEBHDZ.js → folders-DBAAMU26.js} +2 -2
- package/dist/bundle/{instructions-M3FZPQVI.js → instructions-E5FXYCWF.js} +1 -1
- package/dist/bundle/{main-R77BPRRS.js → main-EIUCXXDW.js} +17 -16
- package/dist/bundle/{mcp-YJEQYYTR.js → mcp-FUSDPAOL.js} +2 -2
- package/dist/bundle/{meetings-IV4Y4WRH.js → meetings-JDTRGXZJ.js} +16 -6
- package/dist/bundle/{node-I3GEHYGL.js → node-4SNKUPXT.js} +2 -2
- package/dist/bundle/{node-sqlite-W6MR2TVQ.js → node-sqlite-O4BAODFR.js} +9 -3
- package/dist/bundle/{oauth-M6YL4QXP.js → oauth-3YLHXGUW.js} +5 -5
- package/dist/bundle/{open-2VITLJAN.js → open-QGRMSNM2.js} +3 -2
- package/dist/bundle/{openai-OG6B3JCU.js → openai-7PSCSTH7.js} +9 -9
- package/dist/bundle/{output-file-XJJ3XMLQ.js → output-file-J26UQKRA.js} +3 -3
- package/dist/bundle/{process-UBA4L4B2.js → process-HQZOTT6U.js} +1 -1
- package/dist/bundle/{program-5R5MRXUM.js → program-47DT7SHE.js} +75 -75
- package/dist/bundle/{prompt-AVIXIM7Z.js → prompt-IUD7HCDC.js} +3 -3
- package/dist/bundle/{recognize-DJKTJOYU.js → recognize-DMJJHHXF.js} +2 -2
- package/dist/bundle/{remote-S3DTNYRP.js → remote-5WFSOVVB.js} +5 -5
- package/dist/bundle/{rerank-FMCDP6VF.js → rerank-UKQ65ECH.js} +5 -5
- package/dist/bundle/{run-log-T4MV2VEH.js → run-log-UGYL6NW2.js} +53 -53
- package/dist/bundle/{serve-5SGFJFMC.js → serve-WAOSED3I.js} +9 -8
- package/dist/bundle/server-HAXN772R.js +66 -0
- package/dist/bundle/{server-PCMCY7WK.js → server-NWZFNXC5.js} +42 -42
- package/dist/bundle/{services-SKRQ2POT.js → services-VPANRE72.js} +101 -28
- package/dist/bundle/{speech-FSDICIKO.js → speech-O6UNUDRW.js} +11 -11
- package/dist/bundle/{state-KPUSPWO6.js → state-BNE7I65A.js} +4 -4
- package/dist/bundle/{store-7MP2ZGQ7.js → store-4IIVSCJ4.js} +37 -18
- package/dist/bundle/{store-W7LFPKG2.js → store-QQH4FJXJ.js} +14 -13
- package/dist/bundle/store-connection-PPEQK2K3.js +76 -0
- package/dist/bundle/store-maintenance-command-JZXCT6NY.js +56 -0
- package/dist/bundle/{streaming-Q44ESD3E.js → streaming-S4EZB6P2.js} +4 -4
- package/dist/bundle/{tokens-TAFCHANI.js → tokens-VCXIH7WZ.js} +4 -4
- package/dist/bundle/zm.js +1 -1
- package/dist/local-transcription.d.ts.map +1 -1
- package/dist/local-transcription.js +1 -0
- package/dist/local-transcription.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/answer-policy-HOA43GNA.js +0 -96
- package/dist/bundle/chunk-JRPAZ2WD.js +0 -3635
- package/dist/bundle/command-contract-DGTZIH2F.js +0 -38
- package/dist/bundle/config-N2UHDKGG.js +0 -78
- package/dist/bundle/first-screen-DQNRT6GH.js +0 -36
- package/dist/bundle/server-EYGZLKKQ.js +0 -66
- package/dist/bundle/store-connection-3HNZFJC4.js +0 -76
- package/dist/bundle/store-maintenance-command-6WBLTUZP.js +0 -55
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-NUN6OGOV.js} +0 -0
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
AUDIT_MIN_SCORE,
|
|
5
5
|
throughWrapper
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M6IDHQ7N.js";
|
|
7
7
|
import {
|
|
8
8
|
Command,
|
|
9
9
|
InvalidArgumentError,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
renderAnswer,
|
|
17
17
|
sharedCommand,
|
|
18
18
|
snakeKeys
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6CS7ETBK.js";
|
|
20
20
|
import {
|
|
21
21
|
readOnlyLockOf
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WLSF3GCC.js";
|
|
23
23
|
import {
|
|
24
24
|
formatReference
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LOL6JYYN.js";
|
|
26
26
|
import {
|
|
27
27
|
EVENT_QUERY,
|
|
28
28
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
readMeetingProjectEvidence,
|
|
46
46
|
validateMeetingHitSearch,
|
|
47
47
|
validateMeetingPassage
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GMTXCFI7.js";
|
|
49
49
|
import {
|
|
50
50
|
OPERATORS_BY_TYPE,
|
|
51
51
|
QUERY_LIMITS,
|
|
@@ -54,12 +54,13 @@ import {
|
|
|
54
54
|
fieldsHelp,
|
|
55
55
|
fieldsNamed,
|
|
56
56
|
parseLucene,
|
|
57
|
+
queryDescription,
|
|
57
58
|
queryError,
|
|
58
59
|
queryFieldsOf,
|
|
59
60
|
timezoneOf,
|
|
60
61
|
validateQuery,
|
|
61
62
|
zonedMoment
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ZH743WNV.js";
|
|
63
64
|
import {
|
|
64
65
|
CliError,
|
|
65
66
|
array,
|
|
@@ -73,12 +74,12 @@ import {
|
|
|
73
74
|
safeParse,
|
|
74
75
|
strictObject,
|
|
75
76
|
string
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-JF7ZEUXU.js";
|
|
77
78
|
import {
|
|
78
79
|
__name
|
|
79
80
|
} from "./chunk-ZVVMGPBJ.js";
|
|
80
81
|
|
|
81
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
82
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
82
83
|
var COMMAND_NEEDS = {
|
|
83
84
|
"account update": ["updateProfile", "change the profile"],
|
|
84
85
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -128,7 +129,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
128
129
|
return group;
|
|
129
130
|
}, "hideNever");
|
|
130
131
|
|
|
131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
132
133
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
133
134
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
134
135
|
const zone = timezoneOf();
|
|
@@ -214,7 +215,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
214
215
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
215
216
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
216
217
|
|
|
217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
218
219
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
219
220
|
command.allowUnknownOption();
|
|
220
221
|
const parse = command.parseOptions.bind(command);
|
|
@@ -234,7 +235,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
234
235
|
return command;
|
|
235
236
|
}, "queryWordsAfterOptions");
|
|
236
237
|
|
|
237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
238
239
|
var count = /* @__PURE__ */ __name((value) => {
|
|
239
240
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
240
241
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -276,7 +277,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
276
277
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
277
278
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
278
279
|
|
|
279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
280
281
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
281
282
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
282
283
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -299,7 +300,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
299
300
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
300
301
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
301
302
|
|
|
302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
303
304
|
var integer3 = /* @__PURE__ */ __name((text) => {
|
|
304
305
|
if (!/^[1-9]\d*$/.test(text) || !Number.isSafeInteger(Number(text)))
|
|
305
306
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -402,6 +403,18 @@ ${deps.importHelp}`);
|
|
|
402
403
|
throw new MeetingError("validation_error", "file account differs from selected account");
|
|
403
404
|
print(await importFiles(files, deps.store, deps.now?.()), command);
|
|
404
405
|
});
|
|
406
|
+
output(annotate(group.command("repair"), {
|
|
407
|
+
effects: LOCAL_WRITE,
|
|
408
|
+
output: { entity: "meeting_repair" }
|
|
409
|
+
}).description("preview filling in what older builds left out of stored transcripts (their language); --yes stores it")).option("--yes", "store the detected languages; otherwise only preview").action(async (opts, command) => {
|
|
410
|
+
if (!deps.store.fillTranscriptLanguages)
|
|
411
|
+
throw new MeetingError("configuration_error", "this store cannot fill transcript languages");
|
|
412
|
+
print(await deps.store.fillTranscriptLanguages({
|
|
413
|
+
accountId: deps.accountId,
|
|
414
|
+
apply: opts.yes === true,
|
|
415
|
+
now: deps.now?.() ?? Date.now()
|
|
416
|
+
}), command);
|
|
417
|
+
});
|
|
405
418
|
const eventList = queryWordsAfterOptions(annotate(program.command("events").description("the owner's stored events"), {
|
|
406
419
|
effects: { remote: "none", local: "none" }
|
|
407
420
|
}).command("list")).description("list stored events").argument("[query...]", "event id, origin or time fields that narrow the list").addHelpText("after", `
|
|
@@ -419,13 +432,14 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
419
432
|
}, "addMeetingCommandsDefinition");
|
|
420
433
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
421
434
|
|
|
422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
423
436
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
437
|
+
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
424
438
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
425
439
|
const query = defineQuery(registry);
|
|
426
440
|
annotate(command, { query, output: { entity: registry.entity } });
|
|
427
441
|
const shown = askable(query);
|
|
428
|
-
queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ?
|
|
442
|
+
queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ? QUERY_ARGUMENT : "field:value terms; this list filters by none yet");
|
|
429
443
|
if (shown.length > 0)
|
|
430
444
|
command.addHelpText("after", `
|
|
431
445
|
${fieldsHelp({ ...query, fields: shown }, LIST_QUERY_GUIDE)}`);
|
|
@@ -485,12 +499,10 @@ var pagedList = /* @__PURE__ */ __name((command, { limit, page, all }, { items,
|
|
|
485
499
|
page
|
|
486
500
|
}), "pagedList");
|
|
487
501
|
var askable = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "askable");
|
|
488
|
-
var queryArgument = /* @__PURE__ */ __name((registry) =>
|
|
489
|
-
|
|
490
|
-
return optional(pipe(string(), maxLength(QUERY_LIMITS.bytes), description(fields.length === 0 ? "field:value terms; this list filters by none yet, so any term is refused" : `${registry.backend === "native" ? "field:value terms joined by AND that narrow the list" : "field:value terms that narrow the list (Lucene: AND OR NOT, [a TO b], > <)"}; fields: ${fields.map((field) => field.name).join(", ")}; e.g. ${fields[0]?.example ?? ""}`)));
|
|
491
|
-
}, "queryArgument");
|
|
502
|
+
var queryArgument = /* @__PURE__ */ __name((registry) => optional(pipe(string(), maxLength(QUERY_LIMITS.bytes), description(queryDescription(registry)))), "queryArgument");
|
|
503
|
+
var negatableOf = /* @__PURE__ */ __name((registry) => askable(registry).filter((field) => field.negatable).map((field) => field.name), "negatableOf");
|
|
492
504
|
var nativeTerms = /* @__PURE__ */ __name((ast, command) => new Map([...nativeTermLists(ast, command)].map(([field, [node]]) => [field, node])), "nativeTerms");
|
|
493
|
-
var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) => {
|
|
505
|
+
var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = [], negatable = []) => {
|
|
494
506
|
const terms = /* @__PURE__ */ new Map();
|
|
495
507
|
if (!ast)
|
|
496
508
|
return terms;
|
|
@@ -498,8 +510,14 @@ var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) =>
|
|
|
498
510
|
const add = /* @__PURE__ */ __name((node) => {
|
|
499
511
|
if (node.kind === "boolean") {
|
|
500
512
|
for (const clause of node.clauses) {
|
|
513
|
+
const excluded = clause.occur === "must_not" && clause.node.kind === "predicate" && negatable.includes(clause.node.field);
|
|
514
|
+
if (excluded && clause.node.kind === "predicate") {
|
|
515
|
+
const key = `-${clause.node.field}`;
|
|
516
|
+
terms.set(key, [...terms.get(key) ?? [], clause.node]);
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
501
519
|
if (clause.occur !== "must")
|
|
502
|
-
queryError("query.unsupported-placement", clause.node.span, "this list takes only field:value terms joined by AND", context);
|
|
520
|
+
queryError("query.unsupported-placement", clause.node.span, negatable.length ? `this list takes only field:value terms joined by AND, and -field:value for ${negatable.join(", ")}` : "this list takes only field:value terms joined by AND", context);
|
|
503
521
|
add(clause.node);
|
|
504
522
|
}
|
|
505
523
|
return;
|
|
@@ -555,7 +573,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
555
573
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
556
574
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
557
575
|
|
|
558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
559
577
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
560
578
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
561
579
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -564,7 +582,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
564
582
|
var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
|
|
565
583
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
566
584
|
|
|
567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
568
586
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
569
587
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
570
588
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -826,7 +844,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
826
844
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
827
845
|
}), "sessionAnswer");
|
|
828
846
|
|
|
829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
830
848
|
import { createHash } from "node:crypto";
|
|
831
849
|
import { chmodSync, lstatSync, mkdirSync, rmSync } from "node:fs";
|
|
832
850
|
import { createConnection, createServer } from "node:net";
|
|
@@ -1047,7 +1065,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
1047
1065
|
}, () => finish({ error: stopped() }));
|
|
1048
1066
|
}), "relayCommand");
|
|
1049
1067
|
|
|
1050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
1051
1069
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
1052
1070
|
close: /* @__PURE__ */ __name(async () => {
|
|
1053
1071
|
}, "close"),
|
|
@@ -1151,6 +1169,7 @@ export {
|
|
|
1151
1169
|
createMeetingSearchCommand,
|
|
1152
1170
|
addMeetingCommands,
|
|
1153
1171
|
LIST_QUERY_GUIDE,
|
|
1172
|
+
QUERY_ARGUMENT,
|
|
1154
1173
|
withQuery,
|
|
1155
1174
|
unfilteredQuery,
|
|
1156
1175
|
commandPath,
|
|
@@ -1159,6 +1178,7 @@ export {
|
|
|
1159
1178
|
pageOf,
|
|
1160
1179
|
pagedList,
|
|
1161
1180
|
queryArgument,
|
|
1181
|
+
negatableOf,
|
|
1162
1182
|
nativeTerms,
|
|
1163
1183
|
nativeTermLists,
|
|
1164
1184
|
queryTerms,
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
checkCancelled,
|
|
5
5
|
object
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EA63UGWE.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError,
|
|
9
9
|
Credentials,
|
|
10
10
|
isCliError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JF7ZEUXU.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -2,17 +2,18 @@ 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-2H5SXK7K.js";
|
|
6
6
|
import {
|
|
7
7
|
servingProfiles
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BWRBALXG.js";
|
|
9
9
|
import {
|
|
10
10
|
OFFLINE,
|
|
11
11
|
capability,
|
|
12
12
|
chatIdIn,
|
|
13
|
+
profilesOnAccount,
|
|
13
14
|
servicesFor,
|
|
14
15
|
throughWrapper
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M6IDHQ7N.js";
|
|
16
17
|
import {
|
|
17
18
|
asFirstWord,
|
|
18
19
|
baseContext,
|
|
@@ -23,30 +24,33 @@ import {
|
|
|
23
24
|
recalledAccount,
|
|
24
25
|
rememberAccount,
|
|
25
26
|
rootOf2 as rootOf
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6CS7ETBK.js";
|
|
27
28
|
import {
|
|
28
29
|
MESSENGER_CHANGE_REFUSAL,
|
|
29
30
|
readOnlyRefusal
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WLSF3GCC.js";
|
|
31
32
|
import {
|
|
32
33
|
providerErrorKey
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-GBZF4IIP.js";
|
|
34
35
|
import {
|
|
35
36
|
LOG_ATTRIBUTES,
|
|
36
37
|
codeOf,
|
|
37
38
|
currentOperation,
|
|
38
39
|
currentRun,
|
|
39
40
|
fromLogAttributes,
|
|
41
|
+
limitBatch,
|
|
40
42
|
logAttributes
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-25IDWPEN.js";
|
|
42
44
|
import {
|
|
43
45
|
isCliFailure
|
|
44
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-Z5424QL6.js";
|
|
45
47
|
import {
|
|
48
|
+
chatReferenceOf,
|
|
49
|
+
ensureAccount,
|
|
46
50
|
foldName,
|
|
47
51
|
isId,
|
|
48
52
|
pickPerson
|
|
49
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-PV3UDPCI.js";
|
|
50
54
|
import {
|
|
51
55
|
AUTHORITY_KEY,
|
|
52
56
|
CEILING_KEY,
|
|
@@ -57,22 +61,22 @@ import {
|
|
|
57
61
|
levelFor,
|
|
58
62
|
readKeysForCommand,
|
|
59
63
|
skipFlagFor
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-OXUHTKO2.js";
|
|
61
65
|
import {
|
|
62
66
|
openStore
|
|
63
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-GXCNCMUY.js";
|
|
64
68
|
import {
|
|
65
69
|
CliError,
|
|
66
70
|
logRecordOf,
|
|
67
71
|
realSleep,
|
|
68
72
|
resolvePaths,
|
|
69
73
|
writeSecurely
|
|
70
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-JF7ZEUXU.js";
|
|
71
75
|
import {
|
|
72
76
|
__name
|
|
73
77
|
} from "./chunk-ZVVMGPBJ.js";
|
|
74
78
|
|
|
75
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
79
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
76
80
|
import { openSync } from "node:fs";
|
|
77
81
|
import { createInterface } from "node:readline";
|
|
78
82
|
import { ReadStream } from "node:tty";
|
|
@@ -127,10 +131,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
127
131
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
128
132
|
}, "terminalAsker");
|
|
129
133
|
|
|
130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
131
135
|
import { randomUUID } from "node:crypto";
|
|
132
136
|
|
|
133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
134
138
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
135
139
|
import { dirname, join } from "node:path";
|
|
136
140
|
var MOST_DEADLINES = 50;
|
|
@@ -214,11 +218,11 @@ var FloodMemory = class {
|
|
|
214
218
|
}
|
|
215
219
|
};
|
|
216
220
|
|
|
217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
218
222
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
219
223
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
220
224
|
|
|
221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
222
226
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
223
227
|
import { dirname as dirname2 } from "node:path";
|
|
224
228
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -285,7 +289,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
285
289
|
}
|
|
286
290
|
}, "lockTime");
|
|
287
291
|
|
|
288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
289
293
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
290
294
|
var SendJournal = class {
|
|
291
295
|
static {
|
|
@@ -362,7 +366,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
362
366
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
363
367
|
}, "withSendId");
|
|
364
368
|
|
|
365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
366
370
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
367
371
|
import { join as join3 } from "node:path";
|
|
368
372
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -474,7 +478,7 @@ var RecipientList = class {
|
|
|
474
478
|
}
|
|
475
479
|
};
|
|
476
480
|
|
|
477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
478
482
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
479
483
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
480
484
|
"attachments.extract",
|
|
@@ -667,7 +671,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
667
671
|
}), "guardFor");
|
|
668
672
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
669
673
|
|
|
670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
671
675
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
672
676
|
"help",
|
|
673
677
|
"guide",
|
|
@@ -746,10 +750,37 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
746
750
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
747
751
|
}, "refuseUnknownPermissionKeys");
|
|
748
752
|
|
|
749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
750
754
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
751
|
-
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
755
|
+
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" }) => {
|
|
752
756
|
let warned = false;
|
|
757
|
+
let limitedNoted = false;
|
|
758
|
+
const limited = /* @__PURE__ */ __name(async (opened, batch) => {
|
|
759
|
+
if (!historyLimits || !batch.messages?.length)
|
|
760
|
+
return { batch, skipped: /* @__PURE__ */ new Map() };
|
|
761
|
+
const shapes = await opened.chats.historyShapes(account, [...new Set(batch.messages.map((one) => one.chatId))]);
|
|
762
|
+
return limitBatch(batch, (chatId) => shapes.get(chatId), (chatId) => shapes.get(chatId)?.included === true, historyLimits);
|
|
763
|
+
}, "limited");
|
|
764
|
+
const noteLimited = /* @__PURE__ */ __name((skipped) => {
|
|
765
|
+
if (skipped.size === 0)
|
|
766
|
+
return;
|
|
767
|
+
const counts = {
|
|
768
|
+
chats: skipped.size,
|
|
769
|
+
messages: 0,
|
|
770
|
+
group_too_large: 0,
|
|
771
|
+
older_than_window: 0
|
|
772
|
+
};
|
|
773
|
+
for (const skip of skipped.values()) {
|
|
774
|
+
counts.messages = (counts.messages ?? 0) + skip.messages;
|
|
775
|
+
counts[skip.reason] = (counts[skip.reason] ?? 0) + 1;
|
|
776
|
+
}
|
|
777
|
+
const warning = { event: "warning", code: "history_limited", operation: "history.save", counts };
|
|
778
|
+
events(warning);
|
|
779
|
+
if (limitedNoted)
|
|
780
|
+
return;
|
|
781
|
+
limitedNoted = true;
|
|
782
|
+
warn(`history limits left out ${counts.messages} pushed messages of ${skipped.size} chats (big groups, older than the window) \u2014 \`${command} store status\` lists them; \`${command} messages sync <chat> --full-history\` fetches one and keeps it in full`, warning);
|
|
783
|
+
}, "noteLimited");
|
|
753
784
|
let recorded = profile === void 0;
|
|
754
785
|
const notWritten = /* @__PURE__ */ __name((operation, error) => {
|
|
755
786
|
const warning = { event: "warning", code: "store_not_written", operation };
|
|
@@ -761,15 +792,18 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
761
792
|
const attempt = /* @__PURE__ */ __name(async (operation, write) => {
|
|
762
793
|
try {
|
|
763
794
|
const opened = await store();
|
|
764
|
-
if (opened)
|
|
765
|
-
|
|
795
|
+
if (!opened)
|
|
796
|
+
return false;
|
|
797
|
+
await write(opened);
|
|
766
798
|
if (opened && !recorded && profile) {
|
|
767
799
|
recorded = true;
|
|
768
800
|
await Promise.resolve().then(() => opened.accounts.saveProfile(profile.app, profile.name, account)).catch(() => {
|
|
769
801
|
});
|
|
770
802
|
}
|
|
803
|
+
return true;
|
|
771
804
|
} catch (error) {
|
|
772
805
|
notWritten(operation, error);
|
|
806
|
+
return false;
|
|
773
807
|
}
|
|
774
808
|
}, "attempt");
|
|
775
809
|
const save = /* @__PURE__ */ __name((operation, writing) => {
|
|
@@ -867,7 +901,13 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
867
901
|
rekeysQueued += rekeys.length;
|
|
868
902
|
const saving = previous.then(async () => {
|
|
869
903
|
await saveRekeys(rekeys, round);
|
|
870
|
-
|
|
904
|
+
return attempt(operation, async (opened) => {
|
|
905
|
+
const { batch: kept, skipped } = await limited(opened, batch);
|
|
906
|
+
await fill(opened, account, kept);
|
|
907
|
+
if (skipped.size > 0)
|
|
908
|
+
await opened.chats.recordHistorySkips(account, skipped);
|
|
909
|
+
noteLimited(skipped);
|
|
910
|
+
});
|
|
871
911
|
});
|
|
872
912
|
previous = saving;
|
|
873
913
|
pending?.add(saving);
|
|
@@ -877,10 +917,11 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
877
917
|
pending?.delete(saving);
|
|
878
918
|
rekeysOnly.delete(saving);
|
|
879
919
|
});
|
|
880
|
-
onBatch(batch);
|
|
920
|
+
void onBatch(batch, saving);
|
|
921
|
+
return saving;
|
|
881
922
|
};
|
|
882
923
|
}, "saveBatches");
|
|
883
|
-
|
|
924
|
+
const wrapped = throughWrapper(messenger, {
|
|
884
925
|
...messenger.forumState ? {
|
|
885
926
|
forumState: /* @__PURE__ */ __name(async (chatId) => {
|
|
886
927
|
const state = await capability(messenger, "forumState", "read forum settings")(chatId);
|
|
@@ -1101,7 +1142,54 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
1101
1142
|
return sent;
|
|
1102
1143
|
}, "send")
|
|
1103
1144
|
});
|
|
1145
|
+
const chatOf2 = /* @__PURE__ */ __name(async (typed) => {
|
|
1146
|
+
const named = chatReferenceOf(typed, account.provider);
|
|
1147
|
+
if (!named)
|
|
1148
|
+
return typed;
|
|
1149
|
+
let known;
|
|
1150
|
+
try {
|
|
1151
|
+
known = account.account;
|
|
1152
|
+
} catch {
|
|
1153
|
+
}
|
|
1154
|
+
await ensureAccount(named, { account: known, ...profile ? { profile: profile.name } : {} }, async (other) => {
|
|
1155
|
+
const opened = await store();
|
|
1156
|
+
return opened && profilesOnAccount(opened, profile?.app, account.provider)(other);
|
|
1157
|
+
});
|
|
1158
|
+
return named.chat;
|
|
1159
|
+
}, "chatOf");
|
|
1160
|
+
return withChatReferences(wrapped, chatOf2);
|
|
1104
1161
|
}, "stored");
|
|
1162
|
+
var TYPED_CHAT = [
|
|
1163
|
+
"resolve",
|
|
1164
|
+
"chat",
|
|
1165
|
+
"history",
|
|
1166
|
+
"around",
|
|
1167
|
+
"historyAfter",
|
|
1168
|
+
"historyBefore",
|
|
1169
|
+
"historyFrom",
|
|
1170
|
+
"topics",
|
|
1171
|
+
"topic",
|
|
1172
|
+
"topicHistory",
|
|
1173
|
+
"download",
|
|
1174
|
+
"transcribe",
|
|
1175
|
+
"scheduled",
|
|
1176
|
+
"admins",
|
|
1177
|
+
"chatEvents",
|
|
1178
|
+
"leave",
|
|
1179
|
+
"group",
|
|
1180
|
+
"officialChatStats"
|
|
1181
|
+
];
|
|
1182
|
+
var withChatReferences = /* @__PURE__ */ __name((adapter, chatOf2) => {
|
|
1183
|
+
const methods = adapter;
|
|
1184
|
+
const own = Object.fromEntries(TYPED_CHAT.flatMap((name) => {
|
|
1185
|
+
const method = methods[name];
|
|
1186
|
+
if (typeof method !== "function")
|
|
1187
|
+
return [];
|
|
1188
|
+
const call = /* @__PURE__ */ __name(async (typed, ...rest) => method.call(adapter, await chatOf2(typed), ...rest), "call");
|
|
1189
|
+
return [[name, call]];
|
|
1190
|
+
}));
|
|
1191
|
+
return throughWrapper(adapter, own);
|
|
1192
|
+
}, "withChatReferences");
|
|
1105
1193
|
var saveSent = /* @__PURE__ */ __name((opened, account, typed, message, options, into = message.chatId || typed) => opened.messages.saveMessages(account, into, [message], { ...options, typedChatId: typed }), "saveSent");
|
|
1106
1194
|
var storedChat = /* @__PURE__ */ __name(async (store, account, traits, reference) => {
|
|
1107
1195
|
const bound = store.forAccount(account);
|
|
@@ -1238,7 +1326,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1238
1326
|
}
|
|
1239
1327
|
}, "keep");
|
|
1240
1328
|
|
|
1241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
1242
1330
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
1243
1331
|
import { join as join4 } from "node:path";
|
|
1244
1332
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -1297,7 +1385,7 @@ var Pacer = class {
|
|
|
1297
1385
|
}
|
|
1298
1386
|
};
|
|
1299
1387
|
|
|
1300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
1301
1389
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
1302
1390
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
1303
1391
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -1416,7 +1504,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
1416
1504
|
});
|
|
1417
1505
|
}, "flooded");
|
|
1418
1506
|
|
|
1419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
1420
1508
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
1421
1509
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
1422
1510
|
const write = currentOperation();
|
|
@@ -1452,9 +1540,9 @@ var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
|
1452
1540
|
}, "timed");
|
|
1453
1541
|
const counted = /* @__PURE__ */ __name(async (operation, onItem, work, count) => {
|
|
1454
1542
|
const counts = {};
|
|
1455
|
-
await timed(operation, {}, () => work((item) => {
|
|
1543
|
+
await timed(operation, {}, () => work((item, ...rest) => {
|
|
1456
1544
|
count(item, counts);
|
|
1457
|
-
onItem(item);
|
|
1545
|
+
return onItem(item, ...rest);
|
|
1458
1546
|
}), () => ({ counts }));
|
|
1459
1547
|
}, "counted");
|
|
1460
1548
|
const mint = messenger.newSendId;
|
|
@@ -1515,7 +1603,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1515
1603
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1516
1604
|
}, "byPart");
|
|
1517
1605
|
|
|
1518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1519
1607
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1520
1608
|
let opened;
|
|
1521
1609
|
return {
|
|
@@ -1693,7 +1781,8 @@ var connected = /* @__PURE__ */ __name((connection, { app, provider, name, delet
|
|
|
1693
1781
|
rekeyed: /* @__PURE__ */ __name((from, to) => rekeyRecipients(app, settings.profile, env, renderer.warn, from, to), "rekeyed"),
|
|
1694
1782
|
recipientIds: /* @__PURE__ */ __name(() => (new RecipientList(recipientsPathFor(app, settings.profile, env), app.command).read() ?? []).flatMap((recipient) => [recipient.id, ...recipient.partnerId ? [recipient.partnerId] : []]), "recipientIds"),
|
|
1695
1783
|
...history === "store" ? { namesFromStore: savedChatId ? { savedChatId } : {} } : {},
|
|
1696
|
-
...unreadCounts === "store" ? { countsUnread: true } : {}
|
|
1784
|
+
...unreadCounts === "store" ? { countsUnread: true } : {},
|
|
1785
|
+
...history === "store" && settings.historyLimits ? { historyLimits: settings.historyLimits, command: `${app.command} ${settings.profile}` } : {}
|
|
1697
1786
|
});
|
|
1698
1787
|
const passives = history === "store" && self !== null && !watching ? passivesOf(saving).map((passive) => listened(passive, events, renderer.warn, closeWaitMs)) : [];
|
|
1699
1788
|
return {
|
|
@@ -1855,6 +1944,7 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
|
|
|
1855
1944
|
// Turning recording off by name (--no-record, or record: false) keeps no search history either.
|
|
1856
1945
|
history: base.settings.record,
|
|
1857
1946
|
searchCatchUp: base.settings.searchCatchUp,
|
|
1947
|
+
...base.settings.historyLimits ? { historyLimits: base.settings.historyLimits } : {},
|
|
1858
1948
|
pictures: base.settings.pictureSearch,
|
|
1859
1949
|
reranker: base.settings.searchReranker,
|
|
1860
1950
|
guard,
|