@wirecat/tg-cli 0.116.0 → 0.118.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/bin/tg.js +2 -2
- package/dist/bot/transport.d.ts +1 -1
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +42 -30
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-6CLMTQOV.js → adapter-4YNP6VCO.js} +70 -61
- package/dist/bundle/{all-profiles-R2UZMH24.js → all-profiles-MIQDYAGO.js} +10 -10
- package/dist/bundle/{anthropic-QKIPHV2Z.js → anthropic-NTASPJYE.js} +6 -6
- package/dist/bundle/{app-server-AZB2MFK6.js → app-server-UJZBJ2SK.js} +49 -46
- package/dist/bundle/{bot-api-2IM243J4.js → bot-api-JZAD4L3N.js} +49 -49
- package/dist/bundle/{bot-history-G6CRVCL2.js → bot-history-OUDHH3NU.js} +18 -18
- package/dist/bundle/{bun-JDKPISPX.js → bun-EC4HDIRD.js} +2 -2
- package/dist/bundle/{bun-sqlite-X5PY5IQT.js → bun-sqlite-A4HJR6KO.js} +5 -5
- package/dist/bundle/{chunk-SD5PUYKF.js → chunk-2KQHUBTV.js} +12 -12
- package/dist/bundle/{chunk-QHBVGKC3.js → chunk-2NA5KVP6.js} +210 -82
- package/dist/bundle/{chunk-PPLFOIYX.js → chunk-3MQOLYAN.js} +4 -4
- package/dist/bundle/{chunk-QGL2UGML.js → chunk-4BV4UMBB.js} +738 -235
- package/dist/bundle/{chunk-Y6VWGJ4Q.js → chunk-57LKX6N2.js} +4 -2
- package/dist/bundle/{chunk-BGMV66FC.js → chunk-5IIU7X4S.js} +1 -1
- package/dist/bundle/{chunk-H72UEHNG.js → chunk-5LDWBEWU.js} +55 -33
- package/dist/bundle/{chunk-XQUTJITP.js → chunk-5QYU7B27.js} +763 -130
- package/dist/bundle/chunk-65XV5PPI.js +64 -0
- package/dist/bundle/{chunk-NUYRMU56.js → chunk-6AXUEJGL.js} +2 -2
- package/dist/bundle/{chunk-N42VUNTO.js → chunk-6RI4TEIC.js} +2 -2
- package/dist/bundle/{chunk-VQPLHOVQ.js → chunk-6ZMTEUVU.js} +6 -6
- package/dist/bundle/{chunk-MQ7MCVZV.js → chunk-76EKXFX2.js} +2 -2
- package/dist/bundle/{chunk-K62YATVD.js → chunk-BNEP5EOV.js} +18 -4
- package/dist/bundle/{chunk-EB2IULWB.js → chunk-BXTDAGM4.js} +2 -2
- package/dist/bundle/{chunk-HBUJNNZD.js → chunk-CEY43D3A.js} +31 -29
- package/dist/bundle/chunk-DKFC5ZZ3.js +208 -0
- package/dist/bundle/{chunk-FDI4GOIP.js → chunk-DSZJREEO.js} +463 -358
- package/dist/bundle/{chunk-76CX2YPT.js → chunk-EPCFXKTX.js} +8 -8
- package/dist/bundle/{chunk-KA6EGOJY.js → chunk-EPXVRJAX.js} +2 -2
- package/dist/bundle/{chunk-4IQZRW4O.js → chunk-EQJ6NLF5.js} +13 -13
- package/dist/bundle/{chunk-4D5AUWAY.js → chunk-FHMK6OK4.js} +43 -25
- package/dist/bundle/{chunk-RSDIPQXP.js → chunk-G3RT2EQI.js} +2 -2
- package/dist/bundle/{chunk-IR4S7POE.js → chunk-GI4MTNA2.js} +8 -8
- package/dist/bundle/{chunk-HK6SIIGG.js → chunk-GIM37COQ.js} +3 -3
- package/dist/bundle/{chunk-UCSFO5GW.js → chunk-GLRRCKP6.js} +3 -3
- package/dist/bundle/{chunk-YYKJN6H5.js → chunk-GXCJ47SJ.js} +1499 -710
- package/dist/bundle/{chunk-GV7ZJ33M.js → chunk-H6S3C3MH.js} +4 -4
- package/dist/bundle/{chunk-LXH3SKY3.js → chunk-HJNRIK5X.js} +8 -8
- package/dist/bundle/{chunk-5VFPUOJO.js → chunk-I4TI5HDJ.js} +11 -11
- package/dist/bundle/{chunk-RSNGMNU5.js → chunk-JLJKGKU2.js} +6 -6
- package/dist/bundle/{chunk-T7CDLV33.js → chunk-JPVFYMSQ.js} +22 -14
- package/dist/bundle/{chunk-B4UOCWM4.js → chunk-JWIUK3SK.js} +2 -2
- package/dist/bundle/{chunk-LSKGCJWD.js → chunk-JWPSVS6C.js} +21246 -4044
- package/dist/bundle/{chunk-JJMQA272.js → chunk-JZETEZHC.js} +8 -21
- package/dist/bundle/{chunk-42GK3XRS.js → chunk-KEDHX6XG.js} +2 -2
- package/dist/bundle/{chunk-QAKL3GXB.js → chunk-MBH7IKLT.js} +1 -1
- package/dist/bundle/{chunk-HLNYJPAB.js → chunk-MZNOASAW.js} +2 -2
- package/dist/bundle/{chunk-YLRTLZF6.js → chunk-NKFTZVQU.js} +1 -1
- package/dist/bundle/{chunk-577MFPCP.js → chunk-NMT2VGEI.js} +3 -3
- package/dist/bundle/{chunk-5ZIBAYIZ.js → chunk-NUCDEOFC.js} +2 -2
- package/dist/bundle/{chunk-NL3PAFAE.js → chunk-OTQDJUES.js} +6 -6
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-TZVL4U7U.js → chunk-PB252TT3.js} +4 -2
- package/dist/bundle/{chunk-HUOXUI2M.js → chunk-PO74BDER.js} +58 -47
- package/dist/bundle/{chunk-LFKEKSI5.js → chunk-PW3HFIJA.js} +523 -239
- package/dist/bundle/{chunk-5FCONCJO.js → chunk-PWCQC56A.js} +1 -1
- package/dist/bundle/{chunk-XBIPSSKI.js → chunk-QOGYHU3Q.js} +4 -4
- package/dist/bundle/{chunk-JFTCOV37.js → chunk-RG2E7ZQZ.js} +180 -25
- package/dist/bundle/{chunk-R52RMHWF.js → chunk-TMTEWOQS.js} +3 -3
- package/dist/bundle/{chunk-I6JF43YP.js → chunk-TSTEZNSX.js} +3 -3
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-SKZ2E3WC.js → chunk-Y64SI2RO.js} +47 -1
- package/dist/bundle/{chunk-DP5LRU7K.js → chunk-YEOSV6JC.js} +1 -1
- package/dist/bundle/{chunk-OX6EWGSG.js → chunk-YHZFGUAP.js} +19 -19
- package/dist/bundle/{chunk-N6TIFJHW.js → chunk-YPRUWRKE.js} +1 -1
- package/dist/bundle/{chunk-PPSUA3IZ.js → chunk-ZMUC3UQO.js} +3 -3
- package/dist/bundle/{chunk-PXMHBTK3.js → chunk-ZXXTJF4Z.js} +4 -4
- package/dist/bundle/command-contract-7GZ6HAA6.js +33 -0
- package/dist/bundle/{decode-W6YPTGJA.js → decode-NMNPLKNR.js} +5 -5
- package/dist/bundle/{dispatch-H7EFNBEH.js → dispatch-OP27MWX5.js} +8 -8
- package/dist/bundle/{echarts-YAWDIC5D.js → echarts-S46LEIPS.js} +2 -2
- package/dist/bundle/{embed-EN4UTLV5.js → embed-I5ZYHGYC.js} +6 -6
- package/dist/bundle/{embedder-HEKHRL7E.js → embedder-LTJI67N2.js} +9 -9
- package/dist/bundle/{entry-2KB6MTCG.js → entry-O6BUPXF7.js} +7 -7
- package/dist/bundle/{failure-3DU3HLBQ.js → failure-4JUQFXJT.js} +2 -2
- package/dist/bundle/{first-run-LBG26WWO.js → first-run-PMZNCDGD.js} +11 -11
- package/dist/bundle/first-screen-BGML5DSO.js +31 -0
- package/dist/bundle/{instructions-HA62QNPR.js → instructions-AUEGY3VO.js} +1 -1
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{node-MZ2VWSQQ.js → node-XRA7RBCQ.js} +2 -2
- package/dist/bundle/{node-sqlite-KNNS6DCM.js → node-sqlite-DEZO6LRS.js} +6 -6
- package/dist/bundle/{oauth-KWUABBSQ.js → oauth-DAVC7WCD.js} +7 -7
- package/dist/bundle/{open-JXMCYCIV.js → open-DE2YO4T7.js} +5 -5
- package/dist/bundle/{openai-HL3IR4VT.js → openai-5BKGAULH.js} +14 -14
- package/dist/bundle/{process-K2FICLWY.js → process-4ZHPNUIQ.js} +1 -1
- package/dist/bundle/{program-IFOMT4JS.js → program-EGTKSNB4.js} +51 -51
- package/dist/bundle/{prompt-HVD3Q77P.js → prompt-HWCWHHPE.js} +5 -5
- package/dist/bundle/{proxy-transport-PA5SGMRY.js → proxy-transport-4DPZB2W2.js} +5 -5
- package/dist/bundle/{recognize-HHLVETKI.js → recognize-NG6RXNGF.js} +4 -4
- package/dist/bundle/{remote-HUAKXJCS.js → remote-ZKXIIGYH.js} +7 -7
- package/dist/bundle/{rerank-NWFIV7OF.js → rerank-TX5QFURV.js} +7 -7
- package/dist/bundle/{serve-ANUKAJJN.js → serve-XAS6DECW.js} +9 -9
- package/dist/bundle/{server-7Q7WAOHO.js → server-CNPIWBYU.js} +35 -35
- package/dist/bundle/server-FRTKLHZF.js +60 -0
- package/dist/bundle/{state-Y2AJ5XTP.js → state-3HTUETTS.js} +6 -6
- package/dist/bundle/{store-S3IG5KWL.js → store-B5VZWJHN.js} +23 -13
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +50 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/account.d.ts.map +1 -1
- package/dist/telegram/account.js +4 -1
- package/dist/telegram/account.js.map +1 -1
- package/dist/telegram/errors.d.ts.map +1 -1
- package/dist/telegram/errors.js +2 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/telegram/feature.d.ts +4 -1
- package/dist/telegram/feature.d.ts.map +1 -1
- package/dist/telegram/feature.js +5 -2
- package/dist/telegram/feature.js.map +1 -1
- package/dist/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +24 -10
- package/dist/telegram/sending.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/chunk-K2RYCCTP.js +0 -48
- package/dist/bundle/chunk-ZDIAPICE.js +0 -132
- package/dist/bundle/command-contract-DPXM4SZT.js +0 -33
- package/dist/bundle/first-screen-TGTSLUI6.js +0 -31
- package/dist/bundle/server-HCQS4YDQ.js +0 -60
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +0 -50
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EQJ6NLF5.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
WEIGHTS,
|
|
22
22
|
agenda,
|
|
23
23
|
annotate,
|
|
24
|
+
annotateOption,
|
|
24
25
|
attachment,
|
|
25
26
|
codeOf,
|
|
26
27
|
conversation,
|
|
@@ -48,17 +49,14 @@ import {
|
|
|
48
49
|
typedCommand,
|
|
49
50
|
vectorModelKey,
|
|
50
51
|
withAttempt
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import {
|
|
53
|
-
isCliFailure
|
|
54
|
-
} from "./chunk-JJMQA272.js";
|
|
52
|
+
} from "./chunk-PW3HFIJA.js";
|
|
55
53
|
import {
|
|
56
54
|
isNewer,
|
|
57
55
|
updateCommand
|
|
58
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-3MQOLYAN.js";
|
|
59
57
|
import {
|
|
60
58
|
readOnlyLockOf
|
|
61
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-PB252TT3.js";
|
|
62
60
|
import {
|
|
63
61
|
AGENDA_COLUMNS,
|
|
64
62
|
CHAT_COLUMNS,
|
|
@@ -83,6 +81,7 @@ import {
|
|
|
83
81
|
TASK_RELATION_KINDS,
|
|
84
82
|
TRACKED_CHAT_COLUMNS,
|
|
85
83
|
UNKNOWN_PROVIDER,
|
|
84
|
+
WORD_BODY,
|
|
86
85
|
amountsOf,
|
|
87
86
|
attachmentColumns,
|
|
88
87
|
attachmentMaxBytes,
|
|
@@ -111,16 +110,19 @@ import {
|
|
|
111
110
|
hasText,
|
|
112
111
|
historyStartKey,
|
|
113
112
|
hitFiles,
|
|
113
|
+
holdsKind,
|
|
114
|
+
holdsKindOf,
|
|
114
115
|
inSource,
|
|
115
116
|
inboxKey,
|
|
116
117
|
isAccountList,
|
|
117
118
|
isFolderProvider,
|
|
119
|
+
isImportedProvider,
|
|
118
120
|
isKind,
|
|
119
121
|
isLocator,
|
|
120
122
|
isQueryLimit,
|
|
121
123
|
isStemmed,
|
|
122
124
|
kindIn,
|
|
123
|
-
|
|
125
|
+
listedHolds,
|
|
124
126
|
looksLikeReference,
|
|
125
127
|
matchDownloads,
|
|
126
128
|
messageOfEmail,
|
|
@@ -129,6 +131,7 @@ import {
|
|
|
129
131
|
parseLocator,
|
|
130
132
|
parseReference,
|
|
131
133
|
pdfPreviewLimits,
|
|
134
|
+
plainQuery,
|
|
132
135
|
providerLabel,
|
|
133
136
|
providerNamed,
|
|
134
137
|
queryFilter,
|
|
@@ -141,7 +144,7 @@ import {
|
|
|
141
144
|
validateAst,
|
|
142
145
|
validateFields,
|
|
143
146
|
withoutField
|
|
144
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-JWPSVS6C.js";
|
|
145
148
|
import {
|
|
146
149
|
EVENT_QUERY,
|
|
147
150
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -163,6 +166,7 @@ import {
|
|
|
163
166
|
implicitTextTerms,
|
|
164
167
|
importFiles,
|
|
165
168
|
isClosedState,
|
|
169
|
+
isUsable,
|
|
166
170
|
listed,
|
|
167
171
|
meetingCueFingerprint,
|
|
168
172
|
meetingDetailsAnswer,
|
|
@@ -186,23 +190,27 @@ import {
|
|
|
186
190
|
validateQuery,
|
|
187
191
|
walkQuery,
|
|
188
192
|
zonedMoment
|
|
189
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-4BV4UMBB.js";
|
|
194
|
+
import {
|
|
195
|
+
isCliFailure,
|
|
196
|
+
sqliteCode
|
|
197
|
+
} from "./chunk-Y64SI2RO.js";
|
|
190
198
|
import {
|
|
191
199
|
DEFAULT_STEMMERS,
|
|
192
200
|
createStemmer,
|
|
193
201
|
fold,
|
|
194
202
|
normalize
|
|
195
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-GI4MTNA2.js";
|
|
196
204
|
import {
|
|
197
205
|
DEFAULT_TASK_CATEGORIES,
|
|
198
206
|
FALLBACK_CATEGORY
|
|
199
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-6ZMTEUVU.js";
|
|
200
208
|
import {
|
|
201
209
|
MAX_MODEL_IMAGE_BYTES
|
|
202
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-76EKXFX2.js";
|
|
203
211
|
import {
|
|
204
212
|
remoteKey
|
|
205
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-NMT2VGEI.js";
|
|
206
214
|
import {
|
|
207
215
|
Unzip,
|
|
208
216
|
UnzipInflate,
|
|
@@ -213,19 +221,19 @@ import {
|
|
|
213
221
|
placedText,
|
|
214
222
|
runEmbedders,
|
|
215
223
|
textModelsDirectory
|
|
216
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-OTQDJUES.js";
|
|
217
225
|
import {
|
|
218
226
|
installFiles,
|
|
219
227
|
megabytes
|
|
220
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-JPVFYMSQ.js";
|
|
221
229
|
import {
|
|
222
230
|
storePath,
|
|
223
231
|
wirecatDirectory
|
|
224
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-G3RT2EQI.js";
|
|
225
233
|
import {
|
|
226
234
|
resolvePaths,
|
|
227
235
|
writeSecurely
|
|
228
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-YHZFGUAP.js";
|
|
229
237
|
import {
|
|
230
238
|
array,
|
|
231
239
|
boolean,
|
|
@@ -248,7 +256,7 @@ import {
|
|
|
248
256
|
string,
|
|
249
257
|
transform,
|
|
250
258
|
unknown
|
|
251
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-EPCFXKTX.js";
|
|
252
260
|
import {
|
|
253
261
|
importFrom,
|
|
254
262
|
resolveFrom
|
|
@@ -258,7 +266,7 @@ import {
|
|
|
258
266
|
isCliError,
|
|
259
267
|
singleLine,
|
|
260
268
|
visibleControls
|
|
261
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-BXTDAGM4.js";
|
|
262
270
|
import {
|
|
263
271
|
__commonJS,
|
|
264
272
|
__name,
|
|
@@ -13120,8 +13128,8 @@ var require_bom_handling = __commonJS({
|
|
|
13120
13128
|
"use strict";
|
|
13121
13129
|
var BOMChar = "\uFEFF";
|
|
13122
13130
|
exports.PrependBOM = PrependBOMWrapper;
|
|
13123
|
-
function PrependBOMWrapper(
|
|
13124
|
-
this.encoder =
|
|
13131
|
+
function PrependBOMWrapper(encoder2, options) {
|
|
13132
|
+
this.encoder = encoder2;
|
|
13125
13133
|
this.addBOM = true;
|
|
13126
13134
|
}
|
|
13127
13135
|
__name(PrependBOMWrapper, "PrependBOMWrapper");
|
|
@@ -16754,9 +16762,9 @@ var require_lib3 = __commonJS({
|
|
|
16754
16762
|
module.exports.defaultCharSingleByte = "?";
|
|
16755
16763
|
module.exports.encode = /* @__PURE__ */ __name(function encode(str, encoding, options) {
|
|
16756
16764
|
str = "" + (str || "");
|
|
16757
|
-
var
|
|
16758
|
-
var res =
|
|
16759
|
-
var trail =
|
|
16765
|
+
var encoder2 = module.exports.getEncoder(encoding, options);
|
|
16766
|
+
var res = encoder2.write(str);
|
|
16767
|
+
var trail = encoder2.end();
|
|
16760
16768
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
16761
16769
|
}, "encode");
|
|
16762
16770
|
module.exports.decode = /* @__PURE__ */ __name(function decode2(buf, encoding, options) {
|
|
@@ -16827,11 +16835,11 @@ var require_lib3 = __commonJS({
|
|
|
16827
16835
|
};
|
|
16828
16836
|
module.exports.getEncoder = /* @__PURE__ */ __name(function getEncoder(encoding, options) {
|
|
16829
16837
|
var codec = module.exports.getCodec(encoding);
|
|
16830
|
-
var
|
|
16838
|
+
var encoder2 = new codec.encoder(options, codec);
|
|
16831
16839
|
if (codec.bomAware && options && options.addBOM) {
|
|
16832
|
-
|
|
16840
|
+
encoder2 = new bomHandling.PrependBOM(encoder2, options);
|
|
16833
16841
|
}
|
|
16834
|
-
return
|
|
16842
|
+
return encoder2;
|
|
16835
16843
|
}, "getEncoder");
|
|
16836
16844
|
module.exports.getDecoder = /* @__PURE__ */ __name(function getDecoder(encoding, options) {
|
|
16837
16845
|
var codec = module.exports.getCodec(encoding);
|
|
@@ -16874,7 +16882,7 @@ var require_lib3 = __commonJS({
|
|
|
16874
16882
|
}
|
|
16875
16883
|
});
|
|
16876
16884
|
|
|
16877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16878
16886
|
var RULES_VERSION = 5;
|
|
16879
16887
|
var LOOK_BACK = 50;
|
|
16880
16888
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16964,15 +16972,15 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16964
16972
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16965
16973
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16966
16974
|
|
|
16967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16968
16976
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16969
16977
|
|
|
16970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
16971
16979
|
import { randomBytes } from "node:crypto";
|
|
16972
16980
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
16973
16981
|
var newOperationId = newSendId;
|
|
16974
16982
|
|
|
16975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
16976
16984
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
16977
16985
|
import { open, stat } from "node:fs/promises";
|
|
16978
16986
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17193,7 +17201,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17193
17201
|
return { name, source };
|
|
17194
17202
|
}, "readStickerFile");
|
|
17195
17203
|
|
|
17196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17197
17205
|
var COMMAND_NEEDS = {
|
|
17198
17206
|
"account update": ["updateProfile", "change the profile"],
|
|
17199
17207
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17243,7 +17251,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17243
17251
|
return group;
|
|
17244
17252
|
}, "hideNever");
|
|
17245
17253
|
|
|
17246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17247
17255
|
var AUDIT_PAGE = 200;
|
|
17248
17256
|
var AUDIT_BUDGET = 10;
|
|
17249
17257
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17323,7 +17331,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17323
17331
|
return found;
|
|
17324
17332
|
}, "burstJoins");
|
|
17325
17333
|
|
|
17326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17327
17335
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17328
17336
|
command.allowUnknownOption();
|
|
17329
17337
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17343,7 +17351,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17343
17351
|
return command;
|
|
17344
17352
|
}, "queryWordsAfterOptions");
|
|
17345
17353
|
|
|
17346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17347
17355
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17348
17356
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17349
17357
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17385,7 +17393,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17385
17393
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17386
17394
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17387
17395
|
|
|
17388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17389
17397
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17390
17398
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17391
17399
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17408,7 +17416,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17408
17416
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17409
17417
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17410
17418
|
|
|
17411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17412
17420
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17413
17421
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17414
17422
|
const zone = timezoneOf();
|
|
@@ -17494,7 +17502,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17494
17502
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17495
17503
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17496
17504
|
|
|
17497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17498
17506
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17499
17507
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17500
17508
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17544,7 +17552,14 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17544
17552
|
output(annotate(group.command("summary"), { effects: LOCAL_READ, output: { entity: "meeting_summary" } }).description("show stored meeting summaries").argument("<meeting>", "stored meeting id", integer4)).action(async (id2, _opts, command) => {
|
|
17545
17553
|
print(await meetingSummaryAnswer(deps.store, id2, deps.accountId), command);
|
|
17546
17554
|
});
|
|
17547
|
-
output(annotate(group.command("export"), { effects: LOCAL_WRITE, output: { entity: "meeting_export" } }).description("export a meeting as Markdown or one transcript as WebVTT").argument("<meeting>", "stored meeting id", integer4).addOption(new Option("--format <format>", "export format").choices(["markdown", "vtt"]).default("markdown")).option("--transcript-id <id>", "export a specific transcript version", integer4).
|
|
17555
|
+
const exporter = output(annotate(group.command("export"), { effects: LOCAL_WRITE, output: { entity: "meeting_export" } }).description("export a meeting as Markdown or one transcript as WebVTT").argument("<meeting>", "stored meeting id", integer4).addOption(new Option("--format <format>", "export format").choices(["markdown", "vtt"]).default("markdown")).option("--transcript-id <id>", "export a specific transcript version", integer4).addOption(
|
|
17556
|
+
// Not over MCP: an agent would choose where on the owner's disk to write; it gets the content in the answer.
|
|
17557
|
+
annotateOption(new Option("--output <file>", "write content to a new file through the host's writer"), {
|
|
17558
|
+
mcp: false
|
|
17559
|
+
})
|
|
17560
|
+
));
|
|
17561
|
+
deps.newFileOutput?.(exporter, "output");
|
|
17562
|
+
exporter.action(async (id2, opts, command) => {
|
|
17548
17563
|
if (opts.output !== void 0 && !opts.output.trim())
|
|
17549
17564
|
throw new MeetingError("validation_error", "output path must not be empty");
|
|
17550
17565
|
if (opts.output !== void 0 && !deps.writeFile)
|
|
@@ -17571,16 +17586,21 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17571
17586
|
output(annotate(group.command("sync"), {
|
|
17572
17587
|
effects: FETCH,
|
|
17573
17588
|
offline: false,
|
|
17574
|
-
output: { entity: "meeting_ingestion" }
|
|
17575
|
-
|
|
17576
|
-
|
|
17589
|
+
output: { entity: "meeting_ingestion" },
|
|
17590
|
+
// Only a sync that stops itself at its budget may outlive the one-shot deadline.
|
|
17591
|
+
...deps.budgetOf ? { cooperative: true, partial: true } : {}
|
|
17592
|
+
}).description("bring the stored meetings up to date from the connected account, oldest first; a run that stops before its deadline keeps what it saved and the next one goes on from there")).option("--since-time <time>", "fetch meetings starting at or after this ISO 8601 date or time", date).option("--lookback-days <days>", "revisit recent occurrences for late transcripts (0\u201331)", lookbackDays).option("--rescan", "read the last 30 days again, not only what came after the last sync").action(async (opts, command) => {
|
|
17593
|
+
const source = deps.source;
|
|
17594
|
+
if (!source)
|
|
17577
17595
|
throw new MeetingError("configuration_error", "meeting source is unavailable");
|
|
17578
|
-
print(await pull(
|
|
17596
|
+
await deps.inRun(command, async () => print(await pull(source, deps.store, {
|
|
17579
17597
|
accountId: deps.accountId,
|
|
17580
17598
|
since: opts.sinceTime === void 0 ? void 0 : new Date(opts.sinceTime).toISOString(),
|
|
17581
17599
|
now: deps.now?.(),
|
|
17582
|
-
lookbackMs: opts.lookbackDays * 864e5
|
|
17583
|
-
|
|
17600
|
+
...opts.lookbackDays === void 0 ? {} : { lookbackMs: opts.lookbackDays * 864e5 },
|
|
17601
|
+
...opts.rescan ? { rescan: true } : {},
|
|
17602
|
+
...deps.budgetOf ? { budget: deps.budgetOf(command) } : {}
|
|
17603
|
+
}), command));
|
|
17584
17604
|
});
|
|
17585
17605
|
const importCommand = annotate(group.command("import"), {
|
|
17586
17606
|
effects: LOCAL_WRITE,
|
|
@@ -17626,7 +17646,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17626
17646
|
}, "addMeetingCommandsDefinition");
|
|
17627
17647
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17628
17648
|
|
|
17629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17630
17650
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17631
17651
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17632
17652
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17759,7 +17779,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17759
17779
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17760
17780
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17761
17781
|
|
|
17762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17763
17783
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17764
17784
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17765
17785
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17768,7 +17788,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17768
17788
|
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");
|
|
17769
17789
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17770
17790
|
|
|
17771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17772
17792
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17773
17793
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17774
17794
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18030,7 +18050,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18030
18050
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18031
18051
|
}), "sessionAnswer");
|
|
18032
18052
|
|
|
18033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18034
18054
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18035
18055
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18036
18056
|
if (key in own)
|
|
@@ -18047,7 +18067,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18047
18067
|
return found.bind(adapter);
|
|
18048
18068
|
}, "capability");
|
|
18049
18069
|
|
|
18050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18051
18071
|
var TAKES = {
|
|
18052
18072
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18053
18073
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18107,9 +18127,9 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18107
18127
|
throw wrongAccount(reference, scope, profiles);
|
|
18108
18128
|
}, "ensureAccount");
|
|
18109
18129
|
|
|
18110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18111
18131
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18112
|
-
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18132
|
+
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18113
18133
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
18114
18134
|
const wanted = foldName(reference.trim());
|
|
18115
18135
|
const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
|
|
@@ -18152,7 +18172,7 @@ ${lines3}`, { candidates });
|
|
|
18152
18172
|
}, "ambiguous");
|
|
18153
18173
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18154
18174
|
|
|
18155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18156
18176
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18157
18177
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18158
18178
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18160,9 +18180,7 @@ var SQLITE_BUSY = 5;
|
|
|
18160
18180
|
var storeAbsent = /* @__PURE__ */ __name((error) => {
|
|
18161
18181
|
if (isCliFailure(error))
|
|
18162
18182
|
return error.code === "validation_error" && error.message === NO_LOCAL_STORE;
|
|
18163
|
-
|
|
18164
|
-
const code = errcode ?? errno;
|
|
18165
|
-
return error instanceof Error && typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
18183
|
+
return error instanceof Error && sqliteCode(error) === SQLITE_BUSY;
|
|
18166
18184
|
}, "storeAbsent");
|
|
18167
18185
|
var accountUnknown = /* @__PURE__ */ __name((error) => isCliFailure(error) && (error.code === "not_found" || error.code === "authentication_error"), "accountUnknown");
|
|
18168
18186
|
var unless = /* @__PURE__ */ __name(async (work, expected2) => {
|
|
@@ -18216,7 +18234,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18216
18234
|
}), "storedDeps");
|
|
18217
18235
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18218
18236
|
|
|
18219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18220
18238
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18221
18239
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18222
18240
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18239,10 +18257,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18239
18257
|
}
|
|
18240
18258
|
}, "patiently");
|
|
18241
18259
|
|
|
18242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18243
18261
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18244
18262
|
|
|
18245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18246
18264
|
var REQUEST_MS = 400;
|
|
18247
18265
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18248
18266
|
const lowest = ranges[0];
|
|
@@ -18265,13 +18283,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18265
18283
|
};
|
|
18266
18284
|
}, "estimateBackfill");
|
|
18267
18285
|
|
|
18268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18269
18287
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18270
18288
|
...error,
|
|
18271
18289
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18272
18290
|
}), "withRecovery");
|
|
18273
18291
|
|
|
18274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18275
18293
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18276
18294
|
if (isCliFailure(error))
|
|
18277
18295
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18354,7 +18372,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18354
18372
|
};
|
|
18355
18373
|
}, "mergeBatches");
|
|
18356
18374
|
|
|
18357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18358
18376
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18359
18377
|
if (deps.reads !== "store")
|
|
18360
18378
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18513,7 +18531,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18513
18531
|
}
|
|
18514
18532
|
}, "senderAmong");
|
|
18515
18533
|
|
|
18516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18517
18535
|
var CONTEXT_MESSAGES = 3;
|
|
18518
18536
|
var CONTEXT_MINUTES = 10;
|
|
18519
18537
|
var MAX_CHARS = 1200;
|
|
@@ -18537,12 +18555,12 @@ var context = {
|
|
|
18537
18555
|
}, "describe")
|
|
18538
18556
|
};
|
|
18539
18557
|
|
|
18540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18541
18559
|
var BUILT_INS = [context];
|
|
18542
18560
|
var providers = [...BUILT_INS];
|
|
18543
18561
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18544
18562
|
|
|
18545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18546
18564
|
var READ_PAGE = 5e3;
|
|
18547
18565
|
var CHAIN = 50;
|
|
18548
18566
|
var CONVERSATION_QUERY = {
|
|
@@ -18694,7 +18712,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
18694
18712
|
return size2;
|
|
18695
18713
|
}, "sized");
|
|
18696
18714
|
|
|
18697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18698
18716
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18699
18717
|
var MESSAGE_PAGE = 5e3;
|
|
18700
18718
|
var PER_SESSION = 8;
|
|
@@ -18713,7 +18731,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18713
18731
|
price: remote.price,
|
|
18714
18732
|
installed: true,
|
|
18715
18733
|
perBatch: PER_REQUEST * concurrency,
|
|
18716
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18734
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-ZKXIIGYH.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18717
18735
|
};
|
|
18718
18736
|
}
|
|
18719
18737
|
const model = textModel(choice);
|
|
@@ -18730,7 +18748,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18730
18748
|
if (!isTextModelInstalled(model, directory2))
|
|
18731
18749
|
throw notDownloaded(model.id);
|
|
18732
18750
|
if (apart) {
|
|
18733
|
-
const { openProcess } = await import("./process-
|
|
18751
|
+
const { openProcess } = await import("./process-4ZHPNUIQ.js");
|
|
18734
18752
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18735
18753
|
}
|
|
18736
18754
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19019,7 +19037,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19019
19037
|
return { ...one, state };
|
|
19020
19038
|
}, "shaped");
|
|
19021
19039
|
|
|
19022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19023
19041
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19024
19042
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19025
19043
|
for (const [key, value, maximum] of [
|
|
@@ -19072,7 +19090,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19072
19090
|
}
|
|
19073
19091
|
}, "catchUpSearch");
|
|
19074
19092
|
|
|
19075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19076
19094
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19077
19095
|
if (deps.reads === "store") {
|
|
19078
19096
|
throw new CliError("validation_error", `${what} asks for older history, and this messenger pushes its history instead \u2014 keep \`${typedCommand(deps.messenger.app.command, "serve")}\` running`);
|
|
@@ -19438,7 +19456,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19438
19456
|
return message?.timestamp ?? fallback;
|
|
19439
19457
|
}, "timeOfKey");
|
|
19440
19458
|
|
|
19441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19442
19460
|
var LINKS = /https?:\/\/\S+/g;
|
|
19443
19461
|
var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before: before2 }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before2).map(({ question }) => question), "unanswered");
|
|
19444
19462
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19468,7 +19486,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19468
19486
|
});
|
|
19469
19487
|
}, "questions");
|
|
19470
19488
|
|
|
19471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19472
19490
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19473
19491
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19474
19492
|
const name = typed.trim().toLowerCase();
|
|
@@ -19502,7 +19520,7 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
19502
19520
|
const stem = stemmersOf();
|
|
19503
19521
|
const english = stem.english.stemTokens(text2);
|
|
19504
19522
|
const spanish = readsSpanish(text2) ? stem.spanish.stemTokens(text2) : [];
|
|
19505
|
-
const
|
|
19523
|
+
const counted2 = [];
|
|
19506
19524
|
for (const triggers of triggerStems(categories)) {
|
|
19507
19525
|
const hit = /* @__PURE__ */ new Set();
|
|
19508
19526
|
english.forEach((word, at) => {
|
|
@@ -19512,20 +19530,20 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
19512
19530
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
19513
19531
|
hit.add(other);
|
|
19514
19532
|
});
|
|
19515
|
-
|
|
19533
|
+
counted2.push({ name: triggers.name, hits: hit.size });
|
|
19516
19534
|
}
|
|
19517
|
-
return
|
|
19535
|
+
return counted2;
|
|
19518
19536
|
}, "hitsByList");
|
|
19519
19537
|
var listsHit = /* @__PURE__ */ __name((text2, categories) => hitsByList(text2, categories).filter(({ hits }) => hits > 0).map(({ name }) => name), "listsHit");
|
|
19520
19538
|
var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGORIES) => {
|
|
19521
19539
|
let best = { name: FALLBACK_CATEGORY, hits: 0 };
|
|
19522
|
-
for (const
|
|
19523
|
-
if (
|
|
19524
|
-
best =
|
|
19540
|
+
for (const counted2 of hitsByList(text2, categories))
|
|
19541
|
+
if (counted2.hits > best.hits)
|
|
19542
|
+
best = counted2;
|
|
19525
19543
|
return best.name;
|
|
19526
19544
|
}, "categorize");
|
|
19527
19545
|
|
|
19528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19529
19547
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19530
19548
|
var RULES_IN = {
|
|
19531
19549
|
dialog: "all",
|
|
@@ -19622,7 +19640,7 @@ var applyTaskRules = /* @__PURE__ */ __name(async (review, { store, account, now
|
|
|
19622
19640
|
return result;
|
|
19623
19641
|
}, "applyTaskRules");
|
|
19624
19642
|
var ARRIVAL_WINDOW = 50;
|
|
19625
|
-
var
|
|
19643
|
+
var kindOf = /* @__PURE__ */ __name(async (store, account, chat) => await store.chats.chatKind(account, chat) ?? "unknown", "kindOf");
|
|
19626
19644
|
var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, message) => {
|
|
19627
19645
|
const page = await store.messages.messages(account, message.chatId, { limit: ARRIVAL_WINDOW });
|
|
19628
19646
|
const messages = [...page.items.filter((one) => one.id !== message.id), message].sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp));
|
|
@@ -19631,7 +19649,7 @@ var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, mess
|
|
|
19631
19649
|
{
|
|
19632
19650
|
id: message.chatId,
|
|
19633
19651
|
messages,
|
|
19634
|
-
kind: await
|
|
19652
|
+
kind: await kindOf(store, account, message.chatId),
|
|
19635
19653
|
watched: (await watchedChats(store, account)).has(message.chatId)
|
|
19636
19654
|
}
|
|
19637
19655
|
]
|
|
@@ -19723,7 +19741,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19723
19741
|
const tasks = [];
|
|
19724
19742
|
const pass = await applyTaskRules({
|
|
19725
19743
|
chats: [
|
|
19726
|
-
{ id: chat, messages: page.items, kind: await
|
|
19744
|
+
{ id: chat, messages: page.items, kind: await kindOf(store, account, chat), watched: watched.has(chat) }
|
|
19727
19745
|
]
|
|
19728
19746
|
}, { store: store.tasks, account, categories, dryRun: !yes, onHeld: /* @__PURE__ */ __name((task2) => tasks.push(task2), "onHeld") });
|
|
19729
19747
|
passes.push({ chat, messages: page.items.length, ...pass, tasks });
|
|
@@ -19731,7 +19749,11 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19731
19749
|
return passes;
|
|
19732
19750
|
}, "applyTaskRulesToChats");
|
|
19733
19751
|
|
|
19734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
19753
|
+
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
19754
|
+
var encoder = new TextEncoder();
|
|
19755
|
+
|
|
19756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19735
19757
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19736
19758
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19737
19759
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19771,7 +19793,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19771
19793
|
};
|
|
19772
19794
|
}, "dateWindow");
|
|
19773
19795
|
|
|
19774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19775
19797
|
var DAY_MS = 864e5;
|
|
19776
19798
|
var NEW_DAYS = 30;
|
|
19777
19799
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19848,7 +19870,23 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19848
19870
|
};
|
|
19849
19871
|
}, "scorePerson");
|
|
19850
19872
|
|
|
19851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
19874
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
19875
|
+
const controller = new AbortController();
|
|
19876
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
19877
|
+
timer.unref();
|
|
19878
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
19879
|
+
}, "timeLimit");
|
|
19880
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
19881
|
+
const limit = timeLimit(ms);
|
|
19882
|
+
try {
|
|
19883
|
+
return await run(limit.signal);
|
|
19884
|
+
} finally {
|
|
19885
|
+
limit.clear();
|
|
19886
|
+
}
|
|
19887
|
+
}, "withTimeLimit");
|
|
19888
|
+
|
|
19889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19852
19890
|
var REGISTRIES = {
|
|
19853
19891
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19854
19892
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -19857,16 +19895,18 @@ var TIMEOUT_MS = 1e4;
|
|
|
19857
19895
|
var askRegistries = /* @__PURE__ */ __name(async (id2, options = {}) => Promise.all([askCas(id2, options), askLols(id2, options)]), "askRegistries");
|
|
19858
19896
|
var getJson = /* @__PURE__ */ __name(async (url, headers, { fetch: fetchFn = fetch, timeoutMs = TIMEOUT_MS }) => {
|
|
19859
19897
|
try {
|
|
19860
|
-
const
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19898
|
+
const { status, text: text2 } = await withTimeLimit(timeoutMs, async (signal) => {
|
|
19899
|
+
const response = await fetchFn(url, {
|
|
19900
|
+
headers: { accept: "application/json", ...headers },
|
|
19901
|
+
signal,
|
|
19902
|
+
redirect: "error"
|
|
19903
|
+
});
|
|
19904
|
+
return { status: response.status, text: await response.text() };
|
|
19864
19905
|
});
|
|
19865
|
-
const text2 = await response.text();
|
|
19866
19906
|
try {
|
|
19867
|
-
return { status
|
|
19907
|
+
return { status, body: JSON.parse(text2) };
|
|
19868
19908
|
} catch {
|
|
19869
|
-
return { failed: `answered ${
|
|
19909
|
+
return { failed: `answered ${status} with something that is not JSON` };
|
|
19870
19910
|
}
|
|
19871
19911
|
} catch (error) {
|
|
19872
19912
|
return {
|
|
@@ -19933,7 +19973,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
19933
19973
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
19934
19974
|
})), "notCovered");
|
|
19935
19975
|
|
|
19936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
19937
19977
|
var ACTIVITY_MESSAGES = 1e3;
|
|
19938
19978
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
19939
19979
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20021,7 +20061,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20021
20061
|
};
|
|
20022
20062
|
}, "botCheckService");
|
|
20023
20063
|
|
|
20024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20025
20065
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20026
20066
|
if (value === void 0)
|
|
20027
20067
|
return void 0;
|
|
@@ -20031,7 +20071,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20031
20071
|
return id2;
|
|
20032
20072
|
}, "threadIdOf");
|
|
20033
20073
|
|
|
20034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20035
20075
|
var TOP_POSTS = 5;
|
|
20036
20076
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20037
20077
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20148,7 +20188,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20148
20188
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20149
20189
|
}, "median");
|
|
20150
20190
|
|
|
20151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20152
20192
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20153
20193
|
const events = [];
|
|
20154
20194
|
for (const stay of stays) {
|
|
@@ -20180,7 +20220,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20180
20220
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20181
20221
|
}, "memberEvents");
|
|
20182
20222
|
|
|
20183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20184
20224
|
var EVENTS_DAYS = 7;
|
|
20185
20225
|
var TRACKED_DAYS = 30;
|
|
20186
20226
|
var STATS_PAGE = 1e3;
|
|
@@ -20298,8 +20338,8 @@ var chatsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
20298
20338
|
});
|
|
20299
20339
|
const counts = await store.roster.memberCounts(chatId, { since: new Date(from).toISOString().slice(0, 10) });
|
|
20300
20340
|
const known2 = unrecorded ? { ...stats, complete: false, membersUnrecorded: true } : stats;
|
|
20301
|
-
const
|
|
20302
|
-
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ?
|
|
20341
|
+
const counted2 = counts.length > 0 ? { ...known2, memberCounts: counts } : known2;
|
|
20342
|
+
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ? counted2 : { ...counted2, fetch: typedCommand(deps.messenger.app.command, `messages sync ${chatId}`) };
|
|
20303
20343
|
}, "stats"),
|
|
20304
20344
|
sendAs: /* @__PURE__ */ __name(async (chat) => {
|
|
20305
20345
|
if (deps.offline) {
|
|
@@ -20475,7 +20515,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20475
20515
|
return members.length === 0 ? null : members;
|
|
20476
20516
|
}, "storedMembers");
|
|
20477
20517
|
|
|
20478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20479
20519
|
var INBOX_CHATS = 20;
|
|
20480
20520
|
var REVIEW_DAYS = 3;
|
|
20481
20521
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20683,7 +20723,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20683
20723
|
};
|
|
20684
20724
|
}, "inboxService");
|
|
20685
20725
|
|
|
20686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
20687
20727
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
20688
20728
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
20689
20729
|
const { text: text2, spans } = formatted2;
|
|
@@ -20743,7 +20783,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
20743
20783
|
};
|
|
20744
20784
|
}, "visibleFormattedText");
|
|
20745
20785
|
|
|
20746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
20747
20787
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
20748
20788
|
var LINK2 = /https?:\/\/\S+/i;
|
|
20749
20789
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -20931,7 +20971,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
20931
20971
|
}, "nextPoint");
|
|
20932
20972
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
20933
20973
|
|
|
20934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
20935
20975
|
import { existsSync, readFileSync } from "node:fs";
|
|
20936
20976
|
import { join } from "node:path";
|
|
20937
20977
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -21074,7 +21114,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
21074
21114
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
21075
21115
|
}, "assign");
|
|
21076
21116
|
|
|
21077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21078
21118
|
var CONTEXT_MESSAGES2 = 10;
|
|
21079
21119
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21080
21120
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21150,18 +21190,34 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
21150
21190
|
}
|
|
21151
21191
|
return { items, cut: true };
|
|
21152
21192
|
}, "eventsOnce");
|
|
21153
|
-
var
|
|
21193
|
+
var nameOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "nameOf");
|
|
21194
|
+
var readableAccounts = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
21195
|
+
const stored = await store.accounts.storedAccounts();
|
|
21196
|
+
const own = stored.find((one) => nameOf(one) === nameOf(asked));
|
|
21197
|
+
if (!own || asked.scope !== void 0 && asked.scope !== own.scope)
|
|
21198
|
+
throw new CliError("not_found", `no ${asked.provider} account ${asked.account} in the store`);
|
|
21199
|
+
const allowed = scopes ?? [own.scope];
|
|
21200
|
+
return stored.filter((one) => allowed.includes(one.scope));
|
|
21201
|
+
}, "readableAccounts");
|
|
21202
|
+
var readsOf = /* @__PURE__ */ __name((record2, asked, readable) => {
|
|
21203
|
+
const scopeOf4 = new Map(readable.map((one) => [nameOf(one), one.scope]));
|
|
21204
|
+
return record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).flatMap((account) => {
|
|
21205
|
+
const scope = scopeOf4.get(nameOf({ provider: identity.provider, account }));
|
|
21206
|
+
return identity.accounts.includes(account) && scope !== void 0 ? [{ key: { provider: identity.provider, account }, scope, identity }] : [];
|
|
21207
|
+
}));
|
|
21208
|
+
}, "readsOf");
|
|
21154
21209
|
var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
|
|
21155
21210
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21156
21211
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
21157
21212
|
if (!record2)
|
|
21158
21213
|
throw new CliError("not_found", `no person ${found.id} in the store`);
|
|
21214
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21159
21215
|
return {
|
|
21160
21216
|
person: { ...record2, provider: asked.provider, id: found.id },
|
|
21161
|
-
...await recordContext(store, record2, readsOf(record2, asked), options)
|
|
21217
|
+
...await recordContext(store, record2, readsOf(record2, asked, readable), readable, options)
|
|
21162
21218
|
};
|
|
21163
21219
|
}, "personContext");
|
|
21164
|
-
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21220
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21165
21221
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
21166
21222
|
const shared = [];
|
|
21167
21223
|
const notRead = [];
|
|
@@ -21219,9 +21275,15 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21219
21275
|
cut ||= named2.hasMore;
|
|
21220
21276
|
}
|
|
21221
21277
|
const personId = Number(record2.uid);
|
|
21222
|
-
const
|
|
21278
|
+
const calendars = [];
|
|
21279
|
+
for (const one of readable)
|
|
21280
|
+
if ((await store.calendar.calendars(one.id)).length)
|
|
21281
|
+
calendars.push(one);
|
|
21282
|
+
const accountIds = calendars.map(({ id: id2 }) => id2);
|
|
21283
|
+
const nothing = { items: [], cut: false };
|
|
21284
|
+
const upcoming = accountIds.length ? await eventsOnce(store, { personId, accountIds, from: now }, messages) : nothing;
|
|
21223
21285
|
const upcomingIds = new Set(upcoming.items.map(({ id: id2 }) => id2));
|
|
21224
|
-
const past = await eventsOnce(store, { personId, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages);
|
|
21286
|
+
const past = accountIds.length ? await eventsOnce(store, { personId, accountIds, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages) : nothing;
|
|
21225
21287
|
cut ||= upcoming.cut || past.cut;
|
|
21226
21288
|
direct.sort(newestFirst);
|
|
21227
21289
|
const each = [...direct, ...beyond].sort(newestFirst);
|
|
@@ -21237,7 +21299,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21237
21299
|
};
|
|
21238
21300
|
cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
|
|
21239
21301
|
const kept2 = withinBytes(lists, bytes2);
|
|
21302
|
+
const read = [
|
|
21303
|
+
...reads.map(({ key, scope }) => ({ ...key, scope })),
|
|
21304
|
+
...calendars.map(({ provider, account, scope }) => ({ provider, account, scope }))
|
|
21305
|
+
];
|
|
21306
|
+
const accounts = [...new Map(read.map((one) => [nameOf(one), one])).values()].sort((a, b) => nameOf(a).localeCompare(nameOf(b)));
|
|
21240
21307
|
return {
|
|
21308
|
+
accounts,
|
|
21241
21309
|
shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
|
|
21242
21310
|
last: {
|
|
21243
21311
|
fromThem: each.find((message) => !message.outgoing) ?? null,
|
|
@@ -21309,7 +21377,7 @@ var lean = /* @__PURE__ */ __name((key, message, detail) => {
|
|
|
21309
21377
|
replyTo: message.replyTo?.id ?? message.replyToId ?? null
|
|
21310
21378
|
};
|
|
21311
21379
|
}, "lean");
|
|
21312
|
-
var
|
|
21380
|
+
var kindOf2 = /* @__PURE__ */ __name((chat, chatId, person) => chat && chat.kind !== "unknown" ? chat.kind : chatId === person ? "dialog" : chat?.kind ?? "unknown", "kindOf");
|
|
21313
21381
|
var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { chats, limit = CHAT_MESSAGES, detail = 0 }) => {
|
|
21314
21382
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21315
21383
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
@@ -21322,7 +21390,7 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21322
21390
|
const chat = stored.find((one) => one.id === chatId);
|
|
21323
21391
|
const page = await store.messages.find({ account: asked, senders: [found.id], chatId, limit });
|
|
21324
21392
|
answer.push({
|
|
21325
|
-
chat: { id: chatId, title: chat?.title ?? null, kind:
|
|
21393
|
+
chat: { id: chatId, title: chat?.title ?? null, kind: kindOf2(chat, chatId, found.id) },
|
|
21326
21394
|
messages: page.items.toSorted((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((message) => lean(asked, message, detail)),
|
|
21327
21395
|
complete: held.get(chatId) === "complete",
|
|
21328
21396
|
more: page.hasMore
|
|
@@ -21335,10 +21403,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21335
21403
|
};
|
|
21336
21404
|
}, "personMessages");
|
|
21337
21405
|
|
|
21338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21339
21407
|
import { createHash } from "node:crypto";
|
|
21340
21408
|
|
|
21341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21342
21410
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21343
21411
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21344
21412
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21356,7 +21424,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21356
21424
|
return { parsed, meeting };
|
|
21357
21425
|
}, "authorizedMeetingMetadata");
|
|
21358
21426
|
|
|
21359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21360
21428
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21361
21429
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21362
21430
|
if (signal?.aborted)
|
|
@@ -21555,7 +21623,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21555
21623
|
return { ...packet, fingerprint: hash(packet) };
|
|
21556
21624
|
}, "readMeetingEvidence");
|
|
21557
21625
|
|
|
21558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21559
21627
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21560
21628
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21561
21629
|
const requestedAccounts = options.accountIds;
|
|
@@ -21654,7 +21722,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21654
21722
|
};
|
|
21655
21723
|
}, "personMeetingContext");
|
|
21656
21724
|
|
|
21657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21658
21726
|
var PREPARE_BYTES = 96 * 1024;
|
|
21659
21727
|
var MEETINGS = 5;
|
|
21660
21728
|
var CUES = 3;
|
|
@@ -21682,7 +21750,6 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21682
21750
|
coverage: { included: items.length, hasMore: over || cut, cutBy: cut ? "bytes" : over ? "limit" : null }
|
|
21683
21751
|
};
|
|
21684
21752
|
}, "budgeted");
|
|
21685
|
-
const reads = readsOf(context2.person, asked);
|
|
21686
21753
|
const partial = new Set(context2.notRead.map((chat) => `${chat.provider}/${chat.account}/${chat.chatId}`));
|
|
21687
21754
|
const waiting = [];
|
|
21688
21755
|
for (const chat of context2.shared.filter((one) => one.kind === "dialog")) {
|
|
@@ -21699,10 +21766,10 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21699
21766
|
});
|
|
21700
21767
|
}
|
|
21701
21768
|
waiting.sort((a, b) => Date.parse(b.message.timestamp) - Date.parse(a.message.timestamp));
|
|
21702
|
-
const accounts =
|
|
21769
|
+
const accounts = context2.accounts.map(({ provider, account }) => ({ provider, account }));
|
|
21703
21770
|
const held = await store.people.preparation(context2.person.uid, { accounts, limit });
|
|
21704
|
-
const
|
|
21705
|
-
const meetings = await meetingsOf(store, context2.person.uid,
|
|
21771
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21772
|
+
const meetings = await meetingsOf(store, context2.person.uid, readable, options.since, () => left);
|
|
21706
21773
|
const sections = {
|
|
21707
21774
|
waiting: budgeted({ items: waiting, hasMore: false }),
|
|
21708
21775
|
tasks: budgeted(held.tasks),
|
|
@@ -21771,7 +21838,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21771
21838
|
}
|
|
21772
21839
|
}, "meetingsOf");
|
|
21773
21840
|
|
|
21774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21775
21842
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21776
21843
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21777
21844
|
const held = await storeIfOpen(deps);
|
|
@@ -21841,7 +21908,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21841
21908
|
complete: false
|
|
21842
21909
|
})), "quiet");
|
|
21843
21910
|
|
|
21844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21845
21912
|
var TIMELINE_ITEMS = 50;
|
|
21846
21913
|
var TIMELINE_MAX = 500;
|
|
21847
21914
|
var SCOPES = ["personal", "work"];
|
|
@@ -21896,7 +21963,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21896
21963
|
};
|
|
21897
21964
|
}, "personTimeline");
|
|
21898
21965
|
|
|
21899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21900
21967
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21901
21968
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21902
21969
|
const held = await storeIfOpen(deps);
|
|
@@ -22123,7 +22190,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22123
22190
|
return rest;
|
|
22124
22191
|
}, "withoutPhone");
|
|
22125
22192
|
|
|
22126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22127
22194
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22128
22195
|
var PERIOD_FIELD = "created";
|
|
22129
22196
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22226,7 +22293,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22226
22293
|
}));
|
|
22227
22294
|
}, "meetingNames");
|
|
22228
22295
|
|
|
22229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22230
22297
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22231
22298
|
const tags = /* @__PURE__ */ new Map();
|
|
22232
22299
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22235,7 +22302,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22235
22302
|
return tags;
|
|
22236
22303
|
}, "taskTagFilters");
|
|
22237
22304
|
|
|
22238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22239
22306
|
var TASK_QUERY = {
|
|
22240
22307
|
entity: "task",
|
|
22241
22308
|
backend: "sql",
|
|
@@ -22727,7 +22794,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22727
22794
|
};
|
|
22728
22795
|
}, "taskView");
|
|
22729
22796
|
|
|
22730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
22731
22798
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
22732
22799
|
if (newest === null)
|
|
22733
22800
|
return null;
|
|
@@ -22736,7 +22803,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
22736
22803
|
return newest.addressed ? "owed" : null;
|
|
22737
22804
|
}, "mailTurn");
|
|
22738
22805
|
|
|
22739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
22740
22807
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
22741
22808
|
if (error instanceof CliError && error.code === "not_found")
|
|
22742
22809
|
return void 0;
|
|
@@ -22794,7 +22861,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22794
22861
|
};
|
|
22795
22862
|
}, "mailActivity");
|
|
22796
22863
|
|
|
22797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22798
22865
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22799
22866
|
const ids = [...new Set(chatIds)];
|
|
22800
22867
|
if (ids.length === 0)
|
|
@@ -22820,7 +22887,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22820
22887
|
}));
|
|
22821
22888
|
}, "chatCoverage");
|
|
22822
22889
|
|
|
22823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
22824
22891
|
var DAY = 864e5;
|
|
22825
22892
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
22826
22893
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23067,7 +23134,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23067
23134
|
};
|
|
23068
23135
|
}, "agendaItem");
|
|
23069
23136
|
|
|
23070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
23071
23138
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
23072
23139
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
23073
23140
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -23131,7 +23198,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
23131
23198
|
}
|
|
23132
23199
|
}, "validateContextEvidencePage");
|
|
23133
23200
|
|
|
23134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
23135
23202
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
23136
23203
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
23137
23204
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -23184,7 +23251,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
23184
23251
|
};
|
|
23185
23252
|
}, "contextReadBudget");
|
|
23186
23253
|
|
|
23187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
23188
23255
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
23189
23256
|
if (!port || typeof port.read !== "function")
|
|
23190
23257
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -23228,7 +23295,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
23228
23295
|
};
|
|
23229
23296
|
}, "createContextEvidenceReader");
|
|
23230
23297
|
|
|
23231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23232
23299
|
var queryWords = /* @__PURE__ */ __name((query) => query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[\p{L}_]+:/u, "").replace(/~\d+$/u, "").replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word)), "queryWords");
|
|
23233
23300
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
23234
23301
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23244,7 +23311,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
23244
23311
|
}, "excerpt");
|
|
23245
23312
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
23246
23313
|
|
|
23247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
23248
23315
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
23249
23316
|
var DEFAULT_PURPOSES = ["work"];
|
|
23250
23317
|
var LINK_PURPOSE = "work";
|
|
@@ -23274,7 +23341,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
23274
23341
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
23275
23342
|
], "purposeList");
|
|
23276
23343
|
|
|
23277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
23278
23345
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
23279
23346
|
async around(ref, window3) {
|
|
23280
23347
|
const at = parseLocator(ref);
|
|
@@ -23369,7 +23436,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23369
23436
|
};
|
|
23370
23437
|
}, "storedNeighbours");
|
|
23371
23438
|
|
|
23372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23373
23440
|
import { createHash as createHash2 } from "node:crypto";
|
|
23374
23441
|
var DAY2 = 864e5;
|
|
23375
23442
|
var MAX_TIME = 864e13;
|
|
@@ -23685,7 +23752,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23685
23752
|
return value;
|
|
23686
23753
|
}, "decodeCheckpoint");
|
|
23687
23754
|
|
|
23688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23689
23756
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23690
23757
|
var PAGE3 = 20;
|
|
23691
23758
|
var PEOPLE = 20;
|
|
@@ -24089,7 +24156,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
24089
24156
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
24090
24157
|
}, "peopleOf");
|
|
24091
24158
|
|
|
24092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
24093
24160
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
24094
24161
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
24095
24162
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -24133,7 +24200,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
24133
24200
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
24134
24201
|
}, "matchVocabularyTerms");
|
|
24135
24202
|
|
|
24136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
24137
24204
|
var KINDS = ["project", "tag", "topic"];
|
|
24138
24205
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
24139
24206
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -24188,7 +24255,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
24188
24255
|
};
|
|
24189
24256
|
}, "findEvidenceMentions");
|
|
24190
24257
|
|
|
24191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
24192
24259
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
24193
24260
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
24194
24261
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -24283,7 +24350,7 @@ var proposedLinksOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
|
24283
24350
|
}
|
|
24284
24351
|
];
|
|
24285
24352
|
}).sort((a, b) => Number(a.id) - Number(b.id));
|
|
24286
|
-
const legacy = (await store.knowledge.relations(null, project)).filter((one) =>
|
|
24353
|
+
const legacy = (await store.knowledge.relations(null, project)).filter((one) => one.standing === "proposed" && one.kind === "member-of" && one.to === project).map((one) => ({ from: one.from, id: `link:${one.id}`, role: one.role, purpose: one.purpose }));
|
|
24287
24354
|
return [...proposals, ...legacy];
|
|
24288
24355
|
}, "proposedLinksOf");
|
|
24289
24356
|
var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed) => {
|
|
@@ -24291,7 +24358,7 @@ var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed
|
|
|
24291
24358
|
return [];
|
|
24292
24359
|
const confirmed = /* @__PURE__ */ new Set();
|
|
24293
24360
|
for (const relation of await store.knowledge.relations(null, project))
|
|
24294
|
-
if (relation.
|
|
24361
|
+
if (isUsable(relation.standing) && relation.kind === "member-of" && relation.to === project && /^person:.+/.test(relation.from))
|
|
24295
24362
|
confirmed.add(relation.from);
|
|
24296
24363
|
const members = [...confirmed].sort().map((ref) => ({ ref }));
|
|
24297
24364
|
if (!includeProposed)
|
|
@@ -24329,7 +24396,7 @@ var linkedChatsOf = /* @__PURE__ */ __name(async (store, project, options = {})
|
|
|
24329
24396
|
return [];
|
|
24330
24397
|
const chats = [];
|
|
24331
24398
|
for (const relation of await store.knowledge.relations(null, project)) {
|
|
24332
|
-
if (!relation.
|
|
24399
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== project)
|
|
24333
24400
|
continue;
|
|
24334
24401
|
const reference = chatOf2(relation.from);
|
|
24335
24402
|
if (reference)
|
|
@@ -24456,7 +24523,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24456
24523
|
const leftOut = [];
|
|
24457
24524
|
for (const one of all.filter((chat) => !purposeRead(purposes, chat.purpose))) {
|
|
24458
24525
|
const account = { provider: one.provider, account: one.account };
|
|
24459
|
-
const [
|
|
24526
|
+
const [counted2, [held]] = await Promise.all([
|
|
24460
24527
|
count4(account, one.chat, { since: gathered.window.after, until: gathered.window.before }),
|
|
24461
24528
|
chatCoverage(store, account, [one.chat])
|
|
24462
24529
|
]);
|
|
@@ -24469,7 +24536,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24469
24536
|
purpose: one.purpose ?? LINK_PURPOSE,
|
|
24470
24537
|
relationship: one.relationship,
|
|
24471
24538
|
...one.proposed ? { proposed: one.proposed } : {},
|
|
24472
|
-
...
|
|
24539
|
+
...counted2
|
|
24473
24540
|
});
|
|
24474
24541
|
}
|
|
24475
24542
|
return {
|
|
@@ -24494,18 +24561,18 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
24494
24561
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
24495
24562
|
}, "purposeHintOf");
|
|
24496
24563
|
|
|
24497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
24498
24565
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24499
24566
|
|
|
24500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
24501
24568
|
import { lstat } from "node:fs/promises";
|
|
24502
24569
|
|
|
24503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24504
24571
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
24505
24572
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
24506
24573
|
import { join as join3 } from "node:path";
|
|
24507
24574
|
|
|
24508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
24509
24576
|
import { createHash as createHash3 } from "node:crypto";
|
|
24510
24577
|
var metadataLimit = 16384;
|
|
24511
24578
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -24565,7 +24632,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
24565
24632
|
}
|
|
24566
24633
|
}, "readPartialMetadata");
|
|
24567
24634
|
|
|
24568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
24569
24636
|
import { randomUUID } from "node:crypto";
|
|
24570
24637
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
24571
24638
|
import { join as join2 } from "node:path";
|
|
@@ -24657,7 +24724,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
24657
24724
|
};
|
|
24658
24725
|
}, "partialWriter");
|
|
24659
24726
|
|
|
24660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24661
24728
|
var NativeRecordingPartialStore = class {
|
|
24662
24729
|
static {
|
|
24663
24730
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -24764,12 +24831,12 @@ var NativeRecordingPartialStore = class {
|
|
|
24764
24831
|
}
|
|
24765
24832
|
};
|
|
24766
24833
|
|
|
24767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24768
24835
|
import { createHash as createHash5 } from "node:crypto";
|
|
24769
24836
|
import { link as link2 } from "node:fs/promises";
|
|
24770
24837
|
import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve2 } from "node:path";
|
|
24771
24838
|
|
|
24772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
24773
24840
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
24774
24841
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
24775
24842
|
signal?.throwIfAborted();
|
|
@@ -24804,7 +24871,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
24804
24871
|
signal?.throwIfAborted();
|
|
24805
24872
|
}, "commitPublication");
|
|
24806
24873
|
|
|
24807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
24808
24875
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24809
24876
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
24810
24877
|
import { join as join4 } from "node:path";
|
|
@@ -24877,7 +24944,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
24877
24944
|
}
|
|
24878
24945
|
}, "writePublicationJournal");
|
|
24879
24946
|
|
|
24880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24881
24948
|
var NativeRecordingPublication = class {
|
|
24882
24949
|
static {
|
|
24883
24950
|
__name(this, "NativeRecordingPublication");
|
|
@@ -24950,7 +25017,7 @@ var NativeRecordingPublication = class {
|
|
|
24950
25017
|
}
|
|
24951
25018
|
};
|
|
24952
25019
|
|
|
24953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
24954
25021
|
import { createHash as createHash6 } from "node:crypto";
|
|
24955
25022
|
import { readdir } from "node:fs/promises";
|
|
24956
25023
|
import { isAbsolute as isAbsolute2, join as join6, resolve as resolve3 } from "node:path";
|
|
@@ -25037,7 +25104,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
25037
25104
|
beforePublish
|
|
25038
25105
|
}), "commitMediaEntry");
|
|
25039
25106
|
|
|
25040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25041
25108
|
var validator = '"media-completed-v1"';
|
|
25042
25109
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
25043
25110
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -25138,7 +25205,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
25138
25205
|
return entry;
|
|
25139
25206
|
}, "archiveMediaFile");
|
|
25140
25207
|
|
|
25141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
25142
25209
|
import { mkdir, realpath } from "node:fs/promises";
|
|
25143
25210
|
import { join as join7, resolve as resolve4 } from "node:path";
|
|
25144
25211
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -25205,7 +25272,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
25205
25272
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
25206
25273
|
}, "withMediaArchiveLocks");
|
|
25207
25274
|
|
|
25208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25209
25276
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
25210
25277
|
if (value === void 0)
|
|
25211
25278
|
return void 0;
|
|
@@ -25358,7 +25425,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
25358
25425
|
}, { create: true });
|
|
25359
25426
|
}, "archiveMedia");
|
|
25360
25427
|
|
|
25361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
25362
25429
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
25363
25430
|
import { basename as basename3, dirname as dirname3, join as join8, resolve as resolve5 } from "node:path";
|
|
25364
25431
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -25511,7 +25578,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
25511
25578
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
25512
25579
|
}, "moveMediaArchive");
|
|
25513
25580
|
|
|
25514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
25515
25582
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
25516
25583
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
25517
25584
|
}, "progress") }) => {
|
|
@@ -25522,7 +25589,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
25522
25589
|
}
|
|
25523
25590
|
}, "nativeRuntime");
|
|
25524
25591
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25525
|
-
}, "progress"), acceptTerms = false }) => {
|
|
25592
|
+
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
25526
25593
|
const model = textModel(id2);
|
|
25527
25594
|
if (model.terms && !acceptTerms) {
|
|
25528
25595
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
@@ -25530,11 +25597,11 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25530
25597
|
const directory2 = textModelsDirectory(env);
|
|
25531
25598
|
if (!isTextModelInstalled(model, directory2)) {
|
|
25532
25599
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25533
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
25600
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25534
25601
|
}
|
|
25535
25602
|
await nativeRuntime({ env, progress });
|
|
25536
25603
|
progress(`${model.id}: loading it once to check it works`);
|
|
25537
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
25604
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-I5ZYHGYC.js");
|
|
25538
25605
|
const embedder = await openEmbedder2(model, directory2);
|
|
25539
25606
|
try {
|
|
25540
25607
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -25546,16 +25613,16 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25546
25613
|
return { model, directory: directory2 };
|
|
25547
25614
|
}, "downloadTextModel");
|
|
25548
25615
|
var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25549
|
-
}, "progress") }) => {
|
|
25616
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
25550
25617
|
const model = rerankModel(id2);
|
|
25551
25618
|
const directory2 = textModelsDirectory(env);
|
|
25552
25619
|
if (!isTextModelInstalled(model, directory2)) {
|
|
25553
25620
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25554
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
25621
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25555
25622
|
}
|
|
25556
25623
|
await nativeRuntime({ env, progress });
|
|
25557
25624
|
progress(`${model.id}: loading it once to check it works`);
|
|
25558
|
-
const { openReranker } = await import("./rerank-
|
|
25625
|
+
const { openReranker } = await import("./rerank-TX5QFURV.js");
|
|
25559
25626
|
const reranker = await openReranker(model, directory2);
|
|
25560
25627
|
try {
|
|
25561
25628
|
await reranker.score("check", ["check"]);
|
|
@@ -25565,15 +25632,15 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
25565
25632
|
return { model, directory: directory2 };
|
|
25566
25633
|
}, "downloadRerankModel");
|
|
25567
25634
|
var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25568
|
-
}, "progress") }) => {
|
|
25635
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
25569
25636
|
const model = imageModel(id2);
|
|
25570
25637
|
const directory2 = imageModelsDirectory(env);
|
|
25571
25638
|
if (!isImageModelInstalled(model, directory2)) {
|
|
25572
25639
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25573
|
-
await installFiles(placedImage(model, directory2), { progress });
|
|
25640
|
+
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25574
25641
|
}
|
|
25575
25642
|
progress(`${model.id}: loading it once to check it works`);
|
|
25576
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
25643
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
25577
25644
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
25578
25645
|
try {
|
|
25579
25646
|
const vector = await embedder.embedQuery("check");
|
|
@@ -25585,7 +25652,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25585
25652
|
return { model, directory: directory2 };
|
|
25586
25653
|
}, "downloadImageModel");
|
|
25587
25654
|
|
|
25588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
25589
25656
|
var MONEY_REQUEST = "money-request";
|
|
25590
25657
|
var MONEY_DONE = "money-done";
|
|
25591
25658
|
var PROMISE = "promise";
|
|
@@ -25619,10 +25686,10 @@ var MONEY_WORDS = [
|
|
|
25619
25686
|
}
|
|
25620
25687
|
];
|
|
25621
25688
|
|
|
25622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
25623
25690
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
25624
25691
|
|
|
25625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
25626
25693
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
25627
25694
|
var MONEY_DONE_FORMS = words([
|
|
25628
25695
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -25662,7 +25729,7 @@ var PROMISE_FORMS = words([
|
|
|
25662
25729
|
"estar\xE1 listo"
|
|
25663
25730
|
]);
|
|
25664
25731
|
|
|
25665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
25666
25733
|
var EXCERPT_CHARS = 80;
|
|
25667
25734
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
25668
25735
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -25684,7 +25751,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
25684
25751
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
25685
25752
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
25686
25753
|
|
|
25687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
25688
25755
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
25689
25756
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
25690
25757
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -25724,10 +25791,10 @@ var rowsOf = /* @__PURE__ */ __name((chat) => chat.messages.flatMap((message) =>
|
|
|
25724
25791
|
var centsText = /* @__PURE__ */ __name((cents) => `${Math.floor(cents / 100)}.${String(cents % 100).padStart(2, "0")}`, "centsText");
|
|
25725
25792
|
var amounts = {
|
|
25726
25793
|
id: "amounts",
|
|
25727
|
-
version:
|
|
25794
|
+
version: 3,
|
|
25728
25795
|
scope: "chat",
|
|
25729
|
-
read: /* @__PURE__ */ __name(async (
|
|
25730
|
-
if (!chat)
|
|
25796
|
+
read: /* @__PURE__ */ __name(async (context2, chat) => {
|
|
25797
|
+
if (!chat || context2.books)
|
|
25731
25798
|
return [];
|
|
25732
25799
|
const groups = /* @__PURE__ */ new Map();
|
|
25733
25800
|
for (const row of rowsOf(chat)) {
|
|
@@ -25740,7 +25807,8 @@ var amounts = {
|
|
|
25740
25807
|
const lastAsk = asks.at(-1);
|
|
25741
25808
|
const first2 = asks[0] ?? done2[0] ?? rows[0];
|
|
25742
25809
|
const paidAfter = done2.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
|
|
25743
|
-
const
|
|
25810
|
+
const paid2 = asks.length ? paidAfter : done2.length > 0;
|
|
25811
|
+
const state = paid2 ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
|
|
25744
25812
|
const cited = asks.length ? [...asks, ...paidAfter ? done2.slice(-1) : []] : rows;
|
|
25745
25813
|
return {
|
|
25746
25814
|
signal: "amounts",
|
|
@@ -25761,10 +25829,10 @@ var amounts = {
|
|
|
25761
25829
|
};
|
|
25762
25830
|
});
|
|
25763
25831
|
}, "read"),
|
|
25764
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "
|
|
25832
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
25765
25833
|
};
|
|
25766
25834
|
|
|
25767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
25768
25836
|
var children = {
|
|
25769
25837
|
id: "children",
|
|
25770
25838
|
version: 1,
|
|
@@ -25793,7 +25861,7 @@ var children = {
|
|
|
25793
25861
|
}, "read")
|
|
25794
25862
|
};
|
|
25795
25863
|
|
|
25796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
25797
25865
|
var coverage = {
|
|
25798
25866
|
id: "coverage",
|
|
25799
25867
|
version: 1,
|
|
@@ -25822,29 +25890,7 @@ var coverage = {
|
|
|
25822
25890
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
|
|
25823
25891
|
};
|
|
25824
25892
|
|
|
25825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25826
|
-
var lastMessage = {
|
|
25827
|
-
id: "last-message",
|
|
25828
|
-
version: 1,
|
|
25829
|
-
scope: "chat",
|
|
25830
|
-
read: /* @__PURE__ */ __name(async (_context, chat) => {
|
|
25831
|
-
const last = chat?.messages.at(-1);
|
|
25832
|
-
if (!chat || !last)
|
|
25833
|
-
return [];
|
|
25834
|
-
const item2 = {
|
|
25835
|
-
signal: "last-message",
|
|
25836
|
-
chat: chat.ref,
|
|
25837
|
-
at: last.timestamp,
|
|
25838
|
-
who: whoOf(last),
|
|
25839
|
-
evidence: evidenceOf(chat, last),
|
|
25840
|
-
basis: "store",
|
|
25841
|
-
data: {}
|
|
25842
|
-
};
|
|
25843
|
-
return [item2];
|
|
25844
|
-
}, "read")
|
|
25845
|
-
};
|
|
25846
|
-
|
|
25847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25848
25894
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
25849
25895
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
25850
25896
|
signal: "payments",
|
|
@@ -25894,7 +25940,7 @@ var payments = {
|
|
|
25894
25940
|
}, "read")
|
|
25895
25941
|
};
|
|
25896
25942
|
|
|
25897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
25898
25944
|
var PATTERNS_PER_CHAT = 3;
|
|
25899
25945
|
var DAY3 = 864e5;
|
|
25900
25946
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -25983,7 +26029,7 @@ var promises = {
|
|
|
25983
26029
|
}, "read")
|
|
25984
26030
|
};
|
|
25985
26031
|
|
|
25986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
25987
26033
|
var PER_SIDE = 5;
|
|
25988
26034
|
var WEEK = 7 * 864e5;
|
|
25989
26035
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26014,7 +26060,7 @@ var questions2 = {
|
|
|
26014
26060
|
}, "attention")
|
|
26015
26061
|
};
|
|
26016
26062
|
|
|
26017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26018
26064
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26019
26065
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
26020
26066
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -26082,7 +26128,7 @@ var replyNext = {
|
|
|
26082
26128
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
26083
26129
|
};
|
|
26084
26130
|
|
|
26085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
26086
26132
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
26087
26133
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
26088
26134
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -26128,9 +26174,8 @@ var topics = {
|
|
|
26128
26174
|
}, "read")
|
|
26129
26175
|
};
|
|
26130
26176
|
|
|
26131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
26132
26178
|
var STATUS_SIGNALS = [
|
|
26133
|
-
lastMessage,
|
|
26134
26179
|
replyNext,
|
|
26135
26180
|
questions2,
|
|
26136
26181
|
promises,
|
|
@@ -26141,7 +26186,7 @@ var STATUS_SIGNALS = [
|
|
|
26141
26186
|
children
|
|
26142
26187
|
];
|
|
26143
26188
|
|
|
26144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
26145
26190
|
var DAY4 = 864e5;
|
|
26146
26191
|
var STATUS_WINDOW = 300;
|
|
26147
26192
|
var STATUS_CHATS = 16;
|
|
@@ -26157,7 +26202,7 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
26157
26202
|
const below = [];
|
|
26158
26203
|
for (const parent of level2)
|
|
26159
26204
|
for (const relation of await store.knowledge.relations(null, parent)) {
|
|
26160
|
-
if (!relation.
|
|
26205
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== parent)
|
|
26161
26206
|
continue;
|
|
26162
26207
|
if (!relation.from.startsWith("project:"))
|
|
26163
26208
|
continue;
|
|
@@ -26186,17 +26231,23 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
26186
26231
|
}, "childrenOf");
|
|
26187
26232
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account) => accounts === void 0 || accounts.some((one) => one.provider === provider && one.account === account), "inAccounts");
|
|
26188
26233
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
26189
|
-
var
|
|
26190
|
-
const
|
|
26191
|
-
|
|
26192
|
-
|
|
26193
|
-
|
|
26234
|
+
var owed = /* @__PURE__ */ __name((item2) => {
|
|
26235
|
+
const data = item2.data;
|
|
26236
|
+
return item2.signal === "payments" && data.state === "expected" && data.status === "confirmed";
|
|
26237
|
+
}, "owed");
|
|
26238
|
+
var keepsBooks = /* @__PURE__ */ __name(async (store, projects) => {
|
|
26239
|
+
for (const project of projects) {
|
|
26240
|
+
const filter = { project, review: "confirmed", limit: 1 };
|
|
26241
|
+
if ((await store.finance.invoices(filter)).length || (await store.finance.payments(filter)).length)
|
|
26242
|
+
return true;
|
|
26243
|
+
}
|
|
26244
|
+
return false;
|
|
26245
|
+
}, "keepsBooks");
|
|
26194
26246
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
26195
26247
|
const totals = /* @__PURE__ */ new Map();
|
|
26196
|
-
const open7 = counted2(items);
|
|
26197
26248
|
for (const item2 of items) {
|
|
26198
26249
|
const data = item2.data;
|
|
26199
|
-
if (!
|
|
26250
|
+
if (!owed(item2) || data.amount === void 0)
|
|
26200
26251
|
continue;
|
|
26201
26252
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
26202
26253
|
const total = totals.get(key) ?? {
|
|
@@ -26279,6 +26330,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26279
26330
|
chats,
|
|
26280
26331
|
project: { ...root, children: children2, cut },
|
|
26281
26332
|
store,
|
|
26333
|
+
books: await keepsBooks(store, [root.ref, ...children2.map((child) => child.ref)]),
|
|
26282
26334
|
contextQueries: input.contextQueries ?? []
|
|
26283
26335
|
};
|
|
26284
26336
|
const items = [];
|
|
@@ -26323,7 +26375,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26323
26375
|
};
|
|
26324
26376
|
}, "projectStatus");
|
|
26325
26377
|
|
|
26326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
26327
26379
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
26328
26380
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
26329
26381
|
if (deps.offline)
|
|
@@ -26395,7 +26447,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
26395
26447
|
};
|
|
26396
26448
|
}, "accountService");
|
|
26397
26449
|
|
|
26398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
26399
26451
|
var MINUTE = 6e4;
|
|
26400
26452
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
26401
26453
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -26414,7 +26466,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
26414
26466
|
return new Date(at - at % MINUTE).toISOString();
|
|
26415
26467
|
}, "sendTime");
|
|
26416
26468
|
|
|
26417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
26418
26470
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
26419
26471
|
try {
|
|
26420
26472
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -26560,21 +26612,21 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
26560
26612
|
const answerAll = capability(connection, "answerAllJoinRequests", "answer every join request at once");
|
|
26561
26613
|
const { id: chatId } = await connection.resolve(chat);
|
|
26562
26614
|
const page = await list3(chatId, { limit: 100, ...link4 === void 0 ? {} : { link: link4 } });
|
|
26563
|
-
const
|
|
26615
|
+
const counted2 = page.total ?? page.items.length;
|
|
26564
26616
|
if (page.total === void 0 && page.hasMore)
|
|
26565
26617
|
throw new CliError("validation_error", "too many requests to count; answer them by person, or by --link");
|
|
26566
|
-
if (
|
|
26567
|
-
return { chatId, accepted: accept, counted:
|
|
26618
|
+
if (counted2 === 0)
|
|
26619
|
+
return { chatId, accepted: accept, counted: counted2 };
|
|
26568
26620
|
const operationId = newOperationId();
|
|
26569
26621
|
await guardedWrite(deps.guard, {
|
|
26570
26622
|
operationId,
|
|
26571
26623
|
chatId,
|
|
26572
26624
|
kind: "chat",
|
|
26573
26625
|
action: accept ? "requests.accept" : "requests.decline",
|
|
26574
|
-
count:
|
|
26575
|
-
people:
|
|
26626
|
+
count: counted2,
|
|
26627
|
+
people: counted2
|
|
26576
26628
|
}, () => answerAll(chatId, accept, link4));
|
|
26577
|
-
return { operationId, chatId, accepted: accept, counted:
|
|
26629
|
+
return { operationId, chatId, accepted: accept, counted: counted2 };
|
|
26578
26630
|
}, "answerAllRequests"),
|
|
26579
26631
|
links: /* @__PURE__ */ __name(async (chat, window3) => {
|
|
26580
26632
|
if (deps.offline)
|
|
@@ -26661,7 +26713,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
26661
26713
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
26662
26714
|
}, "linkLimits");
|
|
26663
26715
|
|
|
26664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
26665
26717
|
var THREADS_PAGE = 500;
|
|
26666
26718
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
26667
26719
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -26740,7 +26792,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
26740
26792
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
26741
26793
|
}, "readMail");
|
|
26742
26794
|
|
|
26743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
26744
26796
|
var NO_MAIL = "no_mail";
|
|
26745
26797
|
var MAIL = "email";
|
|
26746
26798
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -26771,11 +26823,11 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26771
26823
|
if (kind === "messages") {
|
|
26772
26824
|
if (explicit === MAIL)
|
|
26773
26825
|
throw new CliError("validation_error", "mail is searched with `memo search mail`, not search messages");
|
|
26774
|
-
return chosen.filter(({ provider }) =>
|
|
26826
|
+
return chosen.filter(({ provider }) => holdsKindOf(provider, "messages"));
|
|
26775
26827
|
}
|
|
26776
26828
|
if (explicit !== void 0 && explicit !== MAIL && explicit !== "all")
|
|
26777
26829
|
throw new CliError("validation_error", `search mail reads mail only \u2014 \`${command === void 0 ? "" : `${command} `}search messages\` searches ${explicit}`);
|
|
26778
|
-
const mail = (listed2 ? chosen : held).filter(({ provider }) =>
|
|
26830
|
+
const mail = (listed2 ? chosen : held).filter(({ provider }) => holdsKindOf(provider, "mail"));
|
|
26779
26831
|
if (mail.length === 0)
|
|
26780
26832
|
throw new CliError("not_found", "no mail in the store yet \u2014 `memo sync --only mail --since-time <time>` imports it", {
|
|
26781
26833
|
reason: NO_MAIL
|
|
@@ -26787,7 +26839,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26787
26839
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
26788
26840
|
}, "accountsOfKind");
|
|
26789
26841
|
|
|
26790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
26791
26843
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
26792
26844
|
var positiveSources = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "in" ? [node.value.toLowerCase()] : [] : node.clauses.filter(({ occur }) => occur !== "must_not").flatMap(({ node: node2 }) => positiveSources(node2)), "positiveSources");
|
|
26793
26845
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -26970,7 +27022,7 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
26970
27022
|
const completeness = [];
|
|
26971
27023
|
const stats = /* @__PURE__ */ new Map();
|
|
26972
27024
|
let inventoryComplete = scopeAccounts.length > 0;
|
|
26973
|
-
for (const selected of scopeAccounts) {
|
|
27025
|
+
for (const selected of scopeAccounts.filter(({ provider }) => !isImportedProvider(provider))) {
|
|
26974
27026
|
if (!await store.sync.syncState(selected, CHAT_LIST_KEY)) {
|
|
26975
27027
|
inventoryComplete = false;
|
|
26976
27028
|
}
|
|
@@ -27135,7 +27187,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
27135
27187
|
};
|
|
27136
27188
|
}, "statsLucene");
|
|
27137
27189
|
|
|
27138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
27139
27191
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
27140
27192
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
27141
27193
|
function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -27304,7 +27356,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27304
27356
|
};
|
|
27305
27357
|
}, "readRankingSelection");
|
|
27306
27358
|
|
|
27307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
27308
27360
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
|
|
27309
27361
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
27310
27362
|
command,
|
|
@@ -27314,7 +27366,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
27314
27366
|
fieldsVersion: FIELD_VERSION
|
|
27315
27367
|
}), "searchRecordOf");
|
|
27316
27368
|
|
|
27317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
27318
27370
|
function invalid4(message) {
|
|
27319
27371
|
throw new CliError("validation_error", message);
|
|
27320
27372
|
}
|
|
@@ -27608,7 +27660,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
27608
27660
|
}, "evidence")
|
|
27609
27661
|
}), "adminStatisticsService");
|
|
27610
27662
|
|
|
27611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
27612
27664
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
27613
27665
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
27614
27666
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -27745,12 +27797,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27745
27797
|
return { plan, repair };
|
|
27746
27798
|
}, "gapsService");
|
|
27747
27799
|
|
|
27748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
27749
27801
|
import { createHash as createHash9 } from "node:crypto";
|
|
27750
27802
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
27751
27803
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
27752
27804
|
|
|
27753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
27754
27806
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
27755
27807
|
import { basename as basename4, join as join9, relative as relative2, sep as sep2 } from "node:path";
|
|
27756
27808
|
var MAX_FILES = 1e4;
|
|
@@ -27821,15 +27873,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
27821
27873
|
return choices;
|
|
27822
27874
|
}, "directoryPaths");
|
|
27823
27875
|
|
|
27824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27825
27877
|
import { posix } from "node:path";
|
|
27826
27878
|
|
|
27827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27828
27880
|
import { setImmediate as tick } from "node:timers/promises";
|
|
27829
27881
|
import { crc32 } from "node:zlib";
|
|
27830
27882
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
27831
27883
|
|
|
27832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
27833
27885
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
27834
27886
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
27835
27887
|
var SAMPLE = 65536;
|
|
@@ -27931,7 +27983,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
27931
27983
|
return result.text;
|
|
27932
27984
|
}, "decodeXml");
|
|
27933
27985
|
|
|
27934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27935
27987
|
var MAX_PART = 10 * 1024 * 1024;
|
|
27936
27988
|
var MAX_ENTRIES = 1e3;
|
|
27937
27989
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28146,7 +28198,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
28146
28198
|
return found;
|
|
28147
28199
|
}, "elements");
|
|
28148
28200
|
|
|
28149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
28150
28202
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
28151
28203
|
let name = "";
|
|
28152
28204
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -28201,7 +28253,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
28201
28253
|
return { text: parts.join("").trim(), truncated: false };
|
|
28202
28254
|
}, "sheetText");
|
|
28203
28255
|
|
|
28204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28205
28257
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
28206
28258
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
28207
28259
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -28601,10 +28653,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
28601
28653
|
}
|
|
28602
28654
|
}, "readDocument");
|
|
28603
28655
|
|
|
28604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28605
28657
|
import { extname as extname3 } from "node:path";
|
|
28606
28658
|
|
|
28607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
28608
28660
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
28609
28661
|
import { dirname as dirname4, extname as extname2, join as join10 } from "node:path";
|
|
28610
28662
|
import { fileURLToPath } from "node:url";
|
|
@@ -28665,7 +28717,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
28665
28717
|
}
|
|
28666
28718
|
}, "derived");
|
|
28667
28719
|
|
|
28668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
28669
28721
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
28670
28722
|
var image2 = {
|
|
28671
28723
|
id: "image",
|
|
@@ -28674,7 +28726,7 @@ var image2 = {
|
|
|
28674
28726
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
28675
28727
|
};
|
|
28676
28728
|
|
|
28677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
28678
28730
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
28679
28731
|
var doc = {
|
|
28680
28732
|
id: "doc",
|
|
@@ -28686,7 +28738,7 @@ var doc = {
|
|
|
28686
28738
|
}), "read")
|
|
28687
28739
|
};
|
|
28688
28740
|
|
|
28689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
28690
28742
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
28691
28743
|
var docx = {
|
|
28692
28744
|
id: "docx",
|
|
@@ -28699,7 +28751,7 @@ var docx = {
|
|
|
28699
28751
|
}), "read")
|
|
28700
28752
|
};
|
|
28701
28753
|
|
|
28702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
28703
28755
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
28704
28756
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
28705
28757
|
"fonttbl",
|
|
@@ -28875,7 +28927,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
28875
28927
|
}, "htmlText");
|
|
28876
28928
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
28877
28929
|
|
|
28878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
28879
28931
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
28880
28932
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
28881
28933
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -28931,7 +28983,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
28931
28983
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
28932
28984
|
}, "markdownSections");
|
|
28933
28985
|
|
|
28934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
28935
28987
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
28936
28988
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
28937
28989
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29002,7 +29054,7 @@ var html = {
|
|
|
29002
29054
|
}, "read")
|
|
29003
29055
|
};
|
|
29004
29056
|
|
|
29005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29006
29058
|
var office = {
|
|
29007
29059
|
id: "office",
|
|
29008
29060
|
version: documentExtractor("odt"),
|
|
@@ -29013,7 +29065,7 @@ var office = {
|
|
|
29013
29065
|
}, "read")
|
|
29014
29066
|
};
|
|
29015
29067
|
|
|
29016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29017
29069
|
var pdf = {
|
|
29018
29070
|
id: "pdf",
|
|
29019
29071
|
version: "unpdf",
|
|
@@ -29080,7 +29132,7 @@ var pdf = {
|
|
|
29080
29132
|
}), "read")
|
|
29081
29133
|
};
|
|
29082
29134
|
|
|
29083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
29084
29136
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
29085
29137
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
29086
29138
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -29100,7 +29152,7 @@ var plain = {
|
|
|
29100
29152
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
29101
29153
|
};
|
|
29102
29154
|
|
|
29103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
29104
29156
|
var rtf = {
|
|
29105
29157
|
id: "rtf",
|
|
29106
29158
|
version: "v1",
|
|
@@ -29108,10 +29160,10 @@ var rtf = {
|
|
|
29108
29160
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
29109
29161
|
};
|
|
29110
29162
|
|
|
29111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29112
29164
|
import { basename as basename5 } from "node:path";
|
|
29113
29165
|
|
|
29114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
29115
29167
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
29116
29168
|
const cells = [];
|
|
29117
29169
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -29149,7 +29201,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
29149
29201
|
return { cells, truncated };
|
|
29150
29202
|
}, "delimitedSpans");
|
|
29151
29203
|
|
|
29152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29153
29205
|
var DELIMITED = {
|
|
29154
29206
|
".csv": ",",
|
|
29155
29207
|
".tsv": " ",
|
|
@@ -29188,7 +29240,7 @@ var sheets = {
|
|
|
29188
29240
|
}, "read")
|
|
29189
29241
|
};
|
|
29190
29242
|
|
|
29191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
29192
29244
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
29193
29245
|
var HEAD_BYTES = 1024;
|
|
29194
29246
|
var readers = [...BUILT_INS2];
|
|
@@ -29198,7 +29250,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
29198
29250
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
29199
29251
|
}, "readWithRegistry");
|
|
29200
29252
|
|
|
29201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29202
29254
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
29203
29255
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
29204
29256
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -30277,7 +30329,7 @@ function imageSize(input) {
|
|
|
30277
30329
|
}
|
|
30278
30330
|
__name(imageSize, "imageSize");
|
|
30279
30331
|
|
|
30280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
30281
30333
|
var MAX_PAGES = 20;
|
|
30282
30334
|
var MAX_PIXELS = 2e7;
|
|
30283
30335
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -30428,7 +30480,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
30428
30480
|
}
|
|
30429
30481
|
}, "ocrPdf");
|
|
30430
30482
|
|
|
30431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
30432
30484
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
30433
30485
|
const limits = pdfPreviewLimits(env);
|
|
30434
30486
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -30505,7 +30557,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
30505
30557
|
}
|
|
30506
30558
|
}, "pdfPreview");
|
|
30507
30559
|
|
|
30508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
30509
30561
|
import { createHash as createHash8 } from "node:crypto";
|
|
30510
30562
|
import { constants } from "node:fs";
|
|
30511
30563
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -30613,7 +30665,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
30613
30665
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
30614
30666
|
}, "transferMime");
|
|
30615
30667
|
|
|
30616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
30617
30669
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
30618
30670
|
import { link as link3, rm } from "node:fs/promises";
|
|
30619
30671
|
import { join as join11, resolve as resolve6 } from "node:path";
|
|
@@ -30727,7 +30779,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30727
30779
|
}
|
|
30728
30780
|
}, "save");
|
|
30729
30781
|
|
|
30730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
30731
30783
|
var ATTACHMENT_QUERY = {
|
|
30732
30784
|
entity: "attachment",
|
|
30733
30785
|
backend: "sql",
|
|
@@ -31150,7 +31202,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31150
31202
|
}, "setText")
|
|
31151
31203
|
}), "attachmentsService");
|
|
31152
31204
|
|
|
31153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
31154
31206
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
31155
31207
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
31156
31208
|
const store = await accountStore(deps);
|
|
@@ -31180,7 +31232,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31180
31232
|
}, "list")
|
|
31181
31233
|
}), "chatDocumentsService");
|
|
31182
31234
|
|
|
31183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
31184
31236
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
31185
31237
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
31186
31238
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -31267,7 +31319,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
31267
31319
|
}
|
|
31268
31320
|
}, "isRetentionSelection");
|
|
31269
31321
|
|
|
31270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
31271
31323
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
31272
31324
|
const fields = text2.split(",").map((one) => one.trim());
|
|
31273
31325
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -31474,7 +31526,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31474
31526
|
};
|
|
31475
31527
|
}, "countersService");
|
|
31476
31528
|
|
|
31477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
31478
31530
|
var SYNC_KEY = "messages.sync-first";
|
|
31479
31531
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
31480
31532
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -31566,7 +31618,7 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
31566
31618
|
}
|
|
31567
31619
|
try {
|
|
31568
31620
|
const newest = (await store.messages.messages(account, chatId, { limit: 1 })).items[0];
|
|
31569
|
-
let
|
|
31621
|
+
let counted2 = 0;
|
|
31570
31622
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
31571
31623
|
limit: options.maxMessages - result.messages,
|
|
31572
31624
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
@@ -31575,11 +31627,11 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
31575
31627
|
stop,
|
|
31576
31628
|
note,
|
|
31577
31629
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
31578
|
-
result.messages += fetched2 -
|
|
31579
|
-
|
|
31630
|
+
result.messages += fetched2 - counted2;
|
|
31631
|
+
counted2 = fetched2;
|
|
31580
31632
|
}, "onPage")
|
|
31581
31633
|
});
|
|
31582
|
-
result.messages += fetched.fetched -
|
|
31634
|
+
result.messages += fetched.fetched - counted2;
|
|
31583
31635
|
if (fetched.stopped || !fetched.complete && !fetched.reachedSince) {
|
|
31584
31636
|
result.complete = false;
|
|
31585
31637
|
result.failed.push({
|
|
@@ -31606,7 +31658,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
31606
31658
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
31607
31659
|
}), "withRefresh");
|
|
31608
31660
|
|
|
31609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
31610
31662
|
var CANDIDATES = 50;
|
|
31611
31663
|
var WORD_HITS = 200;
|
|
31612
31664
|
var RRF_K = 60;
|
|
@@ -31881,13 +31933,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
31881
31933
|
return mean2.map((value) => value / length);
|
|
31882
31934
|
}, "meanOf");
|
|
31883
31935
|
|
|
31884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
31885
31937
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
31886
31938
|
...embeddingsMaintenance(deps),
|
|
31887
31939
|
...embeddingsSearch(deps)
|
|
31888
31940
|
}), "embeddingsService");
|
|
31889
31941
|
|
|
31890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
31891
31943
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
31892
31944
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
31893
31945
|
if (deps.offline)
|
|
@@ -32028,7 +32080,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32028
32080
|
};
|
|
32029
32081
|
}, "foldersService");
|
|
32030
32082
|
|
|
32031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
32032
32084
|
var REVIEW_COUNT = 500;
|
|
32033
32085
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
32034
32086
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -32107,7 +32159,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
32107
32159
|
};
|
|
32108
32160
|
}, "mentionsService");
|
|
32109
32161
|
|
|
32110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
32111
32163
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
32112
32164
|
position,
|
|
32113
32165
|
kind,
|
|
@@ -32156,7 +32208,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
32156
32208
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
32157
32209
|
}, "validatePermalink");
|
|
32158
32210
|
|
|
32159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
32160
32212
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
32161
32213
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
32162
32214
|
return `${seconds / 86400}d`;
|
|
@@ -32188,7 +32240,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
32188
32240
|
return seconds;
|
|
32189
32241
|
}, "pinDurationOf");
|
|
32190
32242
|
|
|
32191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
32192
32244
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
32193
32245
|
if (sendAs === void 0) {
|
|
32194
32246
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -32213,7 +32265,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
32213
32265
|
return sendAs;
|
|
32214
32266
|
}, "typedSendAs");
|
|
32215
32267
|
|
|
32216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
32217
32269
|
var TOTAL_CAP = 1e4;
|
|
32218
32270
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
32219
32271
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -32224,7 +32276,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
32224
32276
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
32225
32277
|
}, "totalOf");
|
|
32226
32278
|
|
|
32227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
32228
32280
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
32229
32281
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
32230
32282
|
let narrows = false;
|
|
@@ -32253,7 +32305,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
32253
32305
|
return wanted(root).join(" ").trim();
|
|
32254
32306
|
}, "meaningWords");
|
|
32255
32307
|
|
|
32256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
32257
32309
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
32258
32310
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
32259
32311
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -32385,7 +32437,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
32385
32437
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
32386
32438
|
}, "questionLookup");
|
|
32387
32439
|
|
|
32388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
32389
32441
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
32390
32442
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
32391
32443
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -32578,7 +32630,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
32578
32630
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
32579
32631
|
}, "signals");
|
|
32580
32632
|
|
|
32581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
32582
32634
|
var MEANING_DEPTH = 100;
|
|
32583
32635
|
var RRF_K2 = 60;
|
|
32584
32636
|
var RERANK_DEPTH = 50;
|
|
@@ -32903,7 +32955,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
32903
32955
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
32904
32956
|
}, "mixedWithReranker");
|
|
32905
32957
|
|
|
32906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
32907
32959
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
32908
32960
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
32909
32961
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -33102,7 +33154,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
33102
33154
|
return result;
|
|
33103
33155
|
}, "readThreadContext");
|
|
33104
33156
|
|
|
33105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
33106
33158
|
var SEARCH_FILL_MS = 200;
|
|
33107
33159
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
33108
33160
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -33133,6 +33185,8 @@ var topUp = /* @__PURE__ */ __name(async (store) => {
|
|
|
33133
33185
|
}, "topUp");
|
|
33134
33186
|
var MAX_SEARCH_OFFSET = 1e3;
|
|
33135
33187
|
var searchStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, meaning, rerank) => {
|
|
33188
|
+
if (request.text !== void 0)
|
|
33189
|
+
request = { ...request, text: plainQuery(request.text) };
|
|
33136
33190
|
const offset = request.offset ?? 0;
|
|
33137
33191
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
33138
33192
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -33169,12 +33223,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
33169
33223
|
}, "accountOf");
|
|
33170
33224
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
33171
33225
|
|
|
33172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33173
33227
|
import { createHash as createHash10 } from "node:crypto";
|
|
33174
33228
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
33175
33229
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
33176
33230
|
|
|
33177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
33178
33232
|
var GROUP_SETTINGS = [
|
|
33179
33233
|
"allCanPin",
|
|
33180
33234
|
"onlyAdminsAdd",
|
|
@@ -33188,7 +33242,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
33188
33242
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
33189
33243
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
33190
33244
|
|
|
33191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33192
33246
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
33193
33247
|
var PICTURE_FLOOR = 0.25;
|
|
33194
33248
|
var PAGE5 = 50;
|
|
@@ -33205,7 +33259,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33205
33259
|
const directory2 = imageModelsDirectory(deps.env);
|
|
33206
33260
|
if (!isImageModelInstalled(model2, directory2))
|
|
33207
33261
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
33208
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33262
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
33209
33263
|
return openPictureEmbedder(model2, directory2);
|
|
33210
33264
|
}, "open");
|
|
33211
33265
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33402,7 +33456,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
33402
33456
|
}, "search")
|
|
33403
33457
|
}), "withPictures");
|
|
33404
33458
|
|
|
33405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
33406
33460
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
33407
33461
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
33408
33462
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -33470,7 +33524,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
33470
33524
|
}
|
|
33471
33525
|
}, "meaningLane");
|
|
33472
33526
|
|
|
33473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
33474
33528
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
33475
33529
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
33476
33530
|
if (choice === "off")
|
|
@@ -33482,9 +33536,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33482
33536
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
33483
33537
|
try {
|
|
33484
33538
|
const warm = deps.embedders;
|
|
33485
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
33539
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-4ZHPNUIQ.js")).openRerankerProcess(model, directory2, {
|
|
33486
33540
|
threads: defaultThreads()
|
|
33487
|
-
})) : await (await import("./rerank-
|
|
33541
|
+
})) : await (await import("./rerank-TX5QFURV.js")).openReranker(model, directory2);
|
|
33488
33542
|
return {
|
|
33489
33543
|
model: model.id,
|
|
33490
33544
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33504,17 +33558,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33504
33558
|
};
|
|
33505
33559
|
}, "rerankLane");
|
|
33506
33560
|
|
|
33507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
33508
33562
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
33509
33563
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
33510
33564
|
const directory2 = imageModelsDirectory(env);
|
|
33511
33565
|
if (!isImageModelInstalled(model, directory2))
|
|
33512
33566
|
throw new CliError("not_found", `the picture model is not downloaded \u2014 ${command === void 0 ? "install it with a WireCat CLI that has `images models download` (tg, max or wa); they share the model folder" : `\`${command} images models download ${model.id}\` fetches it`}`, { reason: "model.not-downloaded", model: model.id });
|
|
33513
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33567
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
33514
33568
|
return openPictureEmbedder(model, directory2);
|
|
33515
33569
|
}, "openPictureEmbedderFor");
|
|
33516
33570
|
|
|
33517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
33518
33572
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
33519
33573
|
const metadata = note.frontMatter;
|
|
33520
33574
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -33529,7 +33583,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
33529
33583
|
};
|
|
33530
33584
|
}, "documentSource");
|
|
33531
33585
|
|
|
33532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
33533
33587
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33534
33588
|
let root;
|
|
33535
33589
|
try {
|
|
@@ -33556,7 +33610,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
33556
33610
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33557
33611
|
}, "titleTiers");
|
|
33558
33612
|
|
|
33559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
33560
33614
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33561
33615
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33562
33616
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -33772,6 +33826,7 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
33772
33826
|
return totalOf(count4, shown, hasMore, othersComplete);
|
|
33773
33827
|
}, "notesTotal");
|
|
33774
33828
|
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
33829
|
+
query = plainQuery(query);
|
|
33775
33830
|
const typed = noteSourceOfQuery(query);
|
|
33776
33831
|
const source = given ?? typed.source;
|
|
33777
33832
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
@@ -33835,13 +33890,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
33835
33890
|
meaningSkipped = error.message;
|
|
33836
33891
|
}
|
|
33837
33892
|
}
|
|
33838
|
-
const
|
|
33839
|
-
const titled =
|
|
33840
|
-
text: [titleQuery(
|
|
33893
|
+
const titleWords2 = plainQueryWords(rest);
|
|
33894
|
+
const titled = titleWords2 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
33895
|
+
text: [titleQuery(titleWords2), filter ?? ""].filter(Boolean).join(" AND "),
|
|
33841
33896
|
limit: Math.max(window3, CANDIDATES2),
|
|
33842
33897
|
...scope
|
|
33843
33898
|
});
|
|
33844
|
-
const tier =
|
|
33899
|
+
const tier = titleWords2 === void 0 ? [] : titleTiers(titled.items, titleWords2);
|
|
33845
33900
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
33846
33901
|
const slice = meaning === void 0 && tier.length === 0;
|
|
33847
33902
|
const matched = await searchNotesQuery(store, {
|
|
@@ -33858,9 +33913,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
33858
33913
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
33859
33914
|
held.foundBy.push(by);
|
|
33860
33915
|
ranked.set(ref, held);
|
|
33916
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
33861
33917
|
if (by === "meaning" && lookup2 !== void 0 && held.foundBy.includes("words"))
|
|
33862
|
-
|
|
33863
|
-
|
|
33918
|
+
held.score = Math.max(held.score, vote);
|
|
33919
|
+
else
|
|
33920
|
+
held.score += vote;
|
|
33864
33921
|
}), "add");
|
|
33865
33922
|
add(matched.items, "words");
|
|
33866
33923
|
if (meaning !== void 0)
|
|
@@ -33948,12 +34005,14 @@ var notesScopeOf = /* @__PURE__ */ __name((accounts) => {
|
|
|
33948
34005
|
return { folderIds, ...accounts.length > folderIds.length ? { withInternal: true } : {} };
|
|
33949
34006
|
}, "notesScopeOf");
|
|
33950
34007
|
var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accounts: list3, app, ...query }) => {
|
|
34008
|
+
text2 = plainQuery(text2);
|
|
33951
34009
|
const own = app?.command ?? query.command;
|
|
33952
34010
|
const what = `${own === void 0 ? "" : `${own} `}search notes`;
|
|
33953
34011
|
const held = [
|
|
33954
34012
|
{ provider: "notes", account: INTERNAL_NOTES },
|
|
33955
34013
|
...(await store.notes.folders()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
33956
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 }))
|
|
34014
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
34015
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [{ provider: "notes", account: added.id }] : [])
|
|
33957
34016
|
];
|
|
33958
34017
|
const named2 = list3 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list3, await listContextOf(store, account, app)), ["notes", "documents"], what);
|
|
33959
34018
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
@@ -33973,14 +34032,14 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
33973
34032
|
};
|
|
33974
34033
|
}, "searchNotesOf");
|
|
33975
34034
|
|
|
33976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33977
34036
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33978
34037
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
33979
34038
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
33980
34039
|
const held = await store.accounts.storedAccounts();
|
|
33981
34040
|
return held.filter((one) => accounts.some(({ provider, account }) => one.provider === provider && one.account === account)).map(({ id: id2 }) => String(id2));
|
|
33982
34041
|
}, "accountIdsOf");
|
|
33983
|
-
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) =>
|
|
34042
|
+
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) => holdsKind(provider, "events")).map(({ provider, account }) => ({ provider, account })), "calendarAccounts");
|
|
33984
34043
|
var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
33985
34044
|
ref: hit.ref,
|
|
33986
34045
|
provider: hit.account?.provider ?? null,
|
|
@@ -34010,6 +34069,7 @@ var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null
|
|
|
34010
34069
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
34011
34070
|
if (!query.trim())
|
|
34012
34071
|
throw new CliError("validation_error", "say what to find in the events");
|
|
34072
|
+
query = plainQuery(query);
|
|
34013
34073
|
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
34014
34074
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
34015
34075
|
...exact ? { exact: true } : {},
|
|
@@ -34090,8 +34150,14 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34090
34150
|
};
|
|
34091
34151
|
}, "searchEvents");
|
|
34092
34152
|
|
|
34093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34094
|
-
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
34153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34154
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
34155
|
+
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
34156
|
+
const { reason, span } = error.details ?? {};
|
|
34157
|
+
const why = typeof reason === "string" ? reason : void 0;
|
|
34158
|
+
const token = span && Number.isInteger(span.start) && Number.isInteger(span.end) ? text2.slice(span.start, span.end).trim() : "";
|
|
34159
|
+
return { ...why ? { why } : {}, ...token ? { token } : {} };
|
|
34160
|
+
}, "refusal");
|
|
34095
34161
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
34096
34162
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
34097
34163
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -34099,9 +34165,22 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
34099
34165
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34100
34166
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
34101
34167
|
}, "filtersBeside");
|
|
34102
|
-
var
|
|
34103
|
-
|
|
34168
|
+
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
34169
|
+
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
34170
|
+
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34171
|
+
const words3 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
34172
|
+
// A title holds "invoice", not the question mark of "invoice?".
|
|
34173
|
+
node.value.replace(/\?+$/u, "") || node.value
|
|
34174
|
+
) : (() => {
|
|
34175
|
+
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
34176
|
+
})());
|
|
34177
|
+
return { words: words3, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
34178
|
+
}, "titleWords");
|
|
34179
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm")), "crmAccounts");
|
|
34180
|
+
var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger = {}, searchMessages = (query) => searchStore(store, account, query, messenger), meaning) => {
|
|
34181
|
+
if (!asked.text.trim())
|
|
34104
34182
|
throw new CliError("validation_error", "say what to find");
|
|
34183
|
+
const request = { ...asked, text: plainQuery(asked.text) };
|
|
34105
34184
|
const offset = request.offset ?? 0;
|
|
34106
34185
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
34107
34186
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -34145,7 +34224,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34145
34224
|
if (kind === "messages" && found.coverage)
|
|
34146
34225
|
coverage2 = found.coverage;
|
|
34147
34226
|
hasMore ||= found.hasMore;
|
|
34148
|
-
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) =>
|
|
34227
|
+
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, kind));
|
|
34149
34228
|
for (const one of found.skipped ?? [])
|
|
34150
34229
|
if (!skipped.some(({ source }) => source === one.source))
|
|
34151
34230
|
skipped.push(one);
|
|
@@ -34192,12 +34271,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34192
34271
|
const held = fused2.get(hit.locator);
|
|
34193
34272
|
if (held)
|
|
34194
34273
|
held.item.foundBy = ["words", "meaning"];
|
|
34274
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
34195
34275
|
if (held && discovers)
|
|
34196
|
-
|
|
34197
|
-
|
|
34198
|
-
item: held?.item ?? itemOf3(hit, ["meaning"]),
|
|
34199
|
-
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
34200
|
-
});
|
|
34276
|
+
held.score = Math.max(held.score, vote);
|
|
34277
|
+
else
|
|
34278
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf3(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
34201
34279
|
});
|
|
34202
34280
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
34203
34281
|
}, "messagesOf");
|
|
@@ -34239,7 +34317,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34239
34317
|
const read = chosen?.map(({ account: account2 }) => account2) ?? [
|
|
34240
34318
|
INTERNAL_NOTES,
|
|
34241
34319
|
...(await store.notes.folders()).map(({ id: id2 }) => id2),
|
|
34242
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2)
|
|
34320
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2),
|
|
34321
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [added.id] : [])
|
|
34243
34322
|
];
|
|
34244
34323
|
accounts.push(...read.map((account2) => ({ resource, provider: "notes", account: account2 })));
|
|
34245
34324
|
} else if (resource === "events") {
|
|
@@ -34277,13 +34356,37 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34277
34356
|
foundBy: hit.found_by
|
|
34278
34357
|
})));
|
|
34279
34358
|
accounts.push(...read.map(({ provider, account: account2 }) => ({ resource, provider, account: account2 })));
|
|
34359
|
+
} else if (resource === "crm") {
|
|
34360
|
+
const { words: words3, anyWord } = titleWords(request.text);
|
|
34361
|
+
const chosen = request.scope?.crm;
|
|
34362
|
+
const found = await store.deals.find({
|
|
34363
|
+
words: words3,
|
|
34364
|
+
anyWord: anyWord || discover,
|
|
34365
|
+
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
34366
|
+
limit: Math.min(window3 + 1, 500),
|
|
34367
|
+
...chosen === void 0 ? {} : { accounts: chosen }
|
|
34368
|
+
});
|
|
34369
|
+
hasMore ||= found.length > window3;
|
|
34370
|
+
lists.push(found.slice(0, window3).map((deal) => ({
|
|
34371
|
+
kind: deal.kind,
|
|
34372
|
+
ref: deal.ref,
|
|
34373
|
+
provider: deal.account?.provider ?? "crm",
|
|
34374
|
+
account: deal.account?.account ?? INTERNAL_NOTES,
|
|
34375
|
+
title: deal.title,
|
|
34376
|
+
timestamp: deal.updatedAt,
|
|
34377
|
+
text: deal.summary,
|
|
34378
|
+
foundBy: ["title"]
|
|
34379
|
+
})));
|
|
34380
|
+
const read = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
34381
|
+
for (const { provider, account: account2 } of read)
|
|
34382
|
+
accounts.push({ resource, provider, account: account2 });
|
|
34280
34383
|
} else
|
|
34281
34384
|
lists.push(await messagesOf(resource));
|
|
34282
34385
|
searched.push(resource);
|
|
34283
34386
|
} catch (error) {
|
|
34284
34387
|
if (!skippable(error))
|
|
34285
34388
|
throw error;
|
|
34286
|
-
skipped.push({ resource, code: error.code, reason: error.message });
|
|
34389
|
+
skipped.push({ resource, code: error.code, reason: error.message, ...refusal(error, request.text) });
|
|
34287
34390
|
}
|
|
34288
34391
|
}
|
|
34289
34392
|
} finally {
|
|
@@ -34292,7 +34395,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34292
34395
|
const ordered = oneList(lists, cosines);
|
|
34293
34396
|
const more = hasMore || ordered.length > window3;
|
|
34294
34397
|
return {
|
|
34295
|
-
query:
|
|
34398
|
+
query: asked.text,
|
|
34296
34399
|
items: ordered.slice(offset, window3),
|
|
34297
34400
|
hasMore: more,
|
|
34298
34401
|
...more && window3 <= MAX_SEARCH_OFFSET ? { nextOffset: window3 } : {},
|
|
@@ -34319,7 +34422,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
34319
34422
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
34320
34423
|
}, "oneList");
|
|
34321
34424
|
|
|
34322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
34323
34426
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
34324
34427
|
var whole3 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
34325
34428
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -34544,7 +34647,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34544
34647
|
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
34545
34648
|
const { skipped } = fitting(entries, only, "search all", (kind) => `--only leaves ${kind} out`);
|
|
34546
34649
|
const named2 = /* @__PURE__ */ __name((resource) => [
|
|
34547
|
-
...new Map(entries.flatMap(({ accounts }) => accounts).filter((
|
|
34650
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one) => listedHolds(one, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
34548
34651
|
], "named");
|
|
34549
34652
|
const meetings = await holdingMeetings(store, named2("meetings"));
|
|
34550
34653
|
const empty2 = named2("meetings").filter((one) => !meetings.some(({ provider, account: account2 }) => provider === one.provider && account2 === one.account)).map(({ provider, account: account2 }) => ({
|
|
@@ -34564,7 +34667,8 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34564
34667
|
messages: named2("messages"),
|
|
34565
34668
|
mail: named2("mail"),
|
|
34566
34669
|
notes: named2("notes"),
|
|
34567
|
-
events: named2("events")
|
|
34670
|
+
events: named2("events"),
|
|
34671
|
+
crm: named2("crm")
|
|
34568
34672
|
},
|
|
34569
34673
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
34570
34674
|
}, messenger, searchMessages, meaning);
|
|
@@ -34572,7 +34676,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34572
34676
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
34573
34677
|
}, "searchAllOfSource");
|
|
34574
34678
|
|
|
34575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34576
34680
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34577
34681
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34578
34682
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34625,7 +34729,7 @@ var asQuery = /* @__PURE__ */ __name(({ words: words3, from, ...rest }) => ({
|
|
|
34625
34729
|
...rest,
|
|
34626
34730
|
...from !== void 0 && rest.chat !== void 0 ? { from } : {}
|
|
34627
34731
|
}), "asQuery");
|
|
34628
|
-
var
|
|
34732
|
+
var refusal2 = {
|
|
34629
34733
|
unsupported: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
34630
34734
|
pushed_history: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
34631
34735
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -34649,7 +34753,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34649
34753
|
if (quiet2)
|
|
34650
34754
|
return void 0;
|
|
34651
34755
|
if (backend === "server")
|
|
34652
|
-
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error",
|
|
34756
|
+
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error", refusal2[reason], {
|
|
34653
34757
|
reason
|
|
34654
34758
|
});
|
|
34655
34759
|
return { report: { ...report, skipped: reason, complete: false }, sources };
|
|
@@ -34761,7 +34865,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34761
34865
|
return { report, sources };
|
|
34762
34866
|
}, "searchServer");
|
|
34763
34867
|
|
|
34764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34765
34869
|
var DELETE_AT_ONCE = 10;
|
|
34766
34870
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
34767
34871
|
const files = fileLinks(attachments);
|
|
@@ -35202,7 +35306,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35202
35306
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35203
35307
|
}, "checkMediaOptions");
|
|
35204
35308
|
|
|
35205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35206
35310
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35207
35311
|
var RULES = {
|
|
35208
35312
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -35217,7 +35321,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
35217
35321
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
35218
35322
|
}), "classifyChannel");
|
|
35219
35323
|
|
|
35220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35221
35325
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35222
35326
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35223
35327
|
const store = await deps.store();
|
|
@@ -35303,7 +35407,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35303
35407
|
};
|
|
35304
35408
|
}, "metadataService");
|
|
35305
35409
|
|
|
35306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35307
35411
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35308
35412
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
35309
35413
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -35340,7 +35444,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
35340
35444
|
return { chatId, rows, notes };
|
|
35341
35445
|
}, "moderateWith");
|
|
35342
35446
|
|
|
35343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
35344
35448
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
35345
35449
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
35346
35450
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -35418,7 +35522,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
35418
35522
|
}, "removePerson")
|
|
35419
35523
|
}), "moderatorOf");
|
|
35420
35524
|
|
|
35421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
35422
35526
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
35423
35527
|
id: note.id,
|
|
35424
35528
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -35462,7 +35566,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
35462
35566
|
};
|
|
35463
35567
|
}, "privatePeopleService");
|
|
35464
35568
|
|
|
35465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
35466
35570
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
35467
35571
|
total: 0,
|
|
35468
35572
|
population: 0,
|
|
@@ -35718,7 +35822,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
35718
35822
|
}, "evidence")
|
|
35719
35823
|
}), "rankingsService");
|
|
35720
35824
|
|
|
35721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
35722
35826
|
var FIELDS = ["date", "chat", "kind"];
|
|
35723
35827
|
var WAITING_TAIL = 100;
|
|
35724
35828
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -35845,7 +35949,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35845
35949
|
};
|
|
35846
35950
|
}, "replyStatsService");
|
|
35847
35951
|
|
|
35848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
35849
35953
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
35850
35954
|
id: one.id,
|
|
35851
35955
|
name: one.name,
|
|
@@ -35866,7 +35970,7 @@ var MESSAGE_SEARCH_COMMANDS = [
|
|
|
35866
35970
|
"admin-statistics"
|
|
35867
35971
|
];
|
|
35868
35972
|
var NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
35869
|
-
var
|
|
35973
|
+
var nameOf2 = /* @__PURE__ */ __name((value) => {
|
|
35870
35974
|
const name = value.trim().toLowerCase();
|
|
35871
35975
|
if (!NAME.test(name) || /^\d+$/.test(name))
|
|
35872
35976
|
throw new CliError("validation_error", `"${singleLine(value)}" cannot name a saved search \u2014 use up to 64 letters a\u2013z, digits and hyphens, not only digits`, { reason: "name.invalid" });
|
|
@@ -35921,13 +36025,13 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35921
36025
|
if (isAdminSelection(params.selection)) {
|
|
35922
36026
|
const selected = await readAdminSelection(store, params.selection);
|
|
35923
36027
|
const normalized2 = typeof params.selection === "string" ? JSON.parse(params.selection) : params.selection;
|
|
35924
|
-
return store.searches.saveSearch(
|
|
36028
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf("admin-statistics", {
|
|
35925
36029
|
adminReport: selected.options.report,
|
|
35926
36030
|
selection: normalized2,
|
|
35927
36031
|
timezone: selected.base.timezone
|
|
35928
36032
|
}), { replace });
|
|
35929
36033
|
}
|
|
35930
|
-
return store.searches.saveSearch(
|
|
36034
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf(params.target ? params.target === "messages" ? "message-top" : "author-top" : params.by === void 0 ? "search" : "stats", checked(params)), {
|
|
35931
36035
|
replace
|
|
35932
36036
|
});
|
|
35933
36037
|
}), "create"),
|
|
@@ -35974,7 +36078,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35974
36078
|
};
|
|
35975
36079
|
}, "searchesService");
|
|
35976
36080
|
|
|
35977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
35978
36082
|
var TAGGING_QUERY = {
|
|
35979
36083
|
entity: "tagging",
|
|
35980
36084
|
backend: "sql",
|
|
@@ -36058,7 +36162,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36058
36162
|
};
|
|
36059
36163
|
}, "tagsService");
|
|
36060
36164
|
|
|
36061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
36062
36166
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
36063
36167
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
36064
36168
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -36257,7 +36361,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36257
36361
|
};
|
|
36258
36362
|
}, "topicsService");
|
|
36259
36363
|
|
|
36260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
36261
36365
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
36262
36366
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36263
36367
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -36331,7 +36435,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
36331
36435
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
36332
36436
|
}, "prepareEvidencePacket");
|
|
36333
36437
|
|
|
36334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
36335
36439
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
36336
36440
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
36337
36441
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -36351,7 +36455,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
36351
36455
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
36352
36456
|
}, "readEvidencePacket");
|
|
36353
36457
|
|
|
36354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36355
36459
|
var scopeKeys = [
|
|
36356
36460
|
"accountId",
|
|
36357
36461
|
"meetingId",
|
|
@@ -36373,7 +36477,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
36373
36477
|
"maxVocabularyReadBytes"
|
|
36374
36478
|
]);
|
|
36375
36479
|
|
|
36376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
36377
36481
|
var communicationFields = {
|
|
36378
36482
|
sources: pipe(array(strictObject({
|
|
36379
36483
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -36405,7 +36509,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
36405
36509
|
return { ...input, after, before: before2 };
|
|
36406
36510
|
}, "communicationRequest");
|
|
36407
36511
|
|
|
36408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
36409
36513
|
var MEETING_PREPARATION_LIMITS = {
|
|
36410
36514
|
meetings: { min: 1, max: 20, default: 5 },
|
|
36411
36515
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -36478,7 +36582,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
36478
36582
|
};
|
|
36479
36583
|
}, "validateMeetingPreparationRequest");
|
|
36480
36584
|
|
|
36481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
36482
36586
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
36483
36587
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
36484
36588
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -36526,7 +36630,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
36526
36630
|
}
|
|
36527
36631
|
}, "validatePreparationCommunications");
|
|
36528
36632
|
|
|
36529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
36530
36634
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
36531
36635
|
const installer = ports.installer();
|
|
36532
36636
|
const argv = updateCommand(installer, packageName);
|
|
@@ -36591,7 +36695,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
36591
36695
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
36592
36696
|
}, "dayAfter");
|
|
36593
36697
|
|
|
36594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
36595
36699
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
36596
36700
|
const pictures = picturesService(deps);
|
|
36597
36701
|
const base = {
|
|
@@ -36628,7 +36732,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
36628
36732
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
36629
36733
|
}, "servicesFor");
|
|
36630
36734
|
|
|
36631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
36632
36736
|
import { createHash as createHash12 } from "node:crypto";
|
|
36633
36737
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
36634
36738
|
import { createConnection, createServer } from "node:net";
|
|
@@ -36849,7 +36953,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
36849
36953
|
}, () => finish({ error: stopped() }));
|
|
36850
36954
|
}), "relayCommand");
|
|
36851
36955
|
|
|
36852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
36853
36957
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
36854
36958
|
close: /* @__PURE__ */ __name(async () => {
|
|
36855
36959
|
}, "close"),
|
|
@@ -36939,6 +37043,7 @@ export {
|
|
|
36939
37043
|
syncsOneChat,
|
|
36940
37044
|
throughWrapper,
|
|
36941
37045
|
capability,
|
|
37046
|
+
withTimeLimit,
|
|
36942
37047
|
newSendId,
|
|
36943
37048
|
newOperationId,
|
|
36944
37049
|
batchProgress,
|