@wirecat/cli-memo 0.131.71 → 0.131.73
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/memo.js +2 -2
- package/dist/bundle/{all-profiles-G6S5HOBT.js → all-profiles-L5QBYI3V.js} +5 -5
- package/dist/bundle/{anthropic-LA6PXTPQ.js → anthropic-XXKHNCQS.js} +13 -4
- package/dist/bundle/{app-server-W622CBPF.js → app-server-FDMP3IBP.js} +35 -35
- package/dist/bundle/auto-YQAECIZA.js +85 -0
- package/dist/bundle/{bun-PZNVNH4G.js → bun-VLN4HBWB.js} +2 -2
- package/dist/bundle/{bun-sqlite-VICDK5FS.js → bun-sqlite-KJCYXNMS.js} +2 -2
- package/dist/bundle/{chunk-NNUS57F4.js → chunk-2BH2RNFR.js} +5 -5
- package/dist/bundle/{chunk-BE22RDTR.js → chunk-2C323QNQ.js} +4 -4
- package/dist/bundle/{chunk-SR7C53CS.js → chunk-3CANRF2G.js} +2 -2
- package/dist/bundle/{chunk-3PIKTX3U.js → chunk-6OPZTBRR.js} +12 -12
- package/dist/bundle/{chunk-I4HWKPQR.js → chunk-6ZRBQTKZ.js} +4 -4
- package/dist/bundle/{chunk-ASDOPGKC.js → chunk-A7QXBRUH.js} +2 -2
- package/dist/bundle/{chunk-IXZWUHSG.js → chunk-B7ATMWVO.js} +7 -7
- package/dist/bundle/{chunk-X337K4BD.js → chunk-BBLT77AO.js} +5 -5
- package/dist/bundle/{chunk-CZUAGRL7.js → chunk-BOZEBD3I.js} +435 -368
- package/dist/bundle/{chunk-FPWF2XLH.js → chunk-BTVND2RV.js} +12 -12
- package/dist/bundle/{chunk-HIHZNBR7.js → chunk-C3UOKLIT.js} +1 -1
- package/dist/bundle/{chunk-UCRR7R6Q.js → chunk-E75LK7GD.js} +2 -2
- package/dist/bundle/{chunk-M2DAITNE.js → chunk-EH7ACKFW.js} +2 -2
- package/dist/bundle/{chunk-MSTWHRLN.js → chunk-EI2P5E4C.js} +1 -1
- package/dist/bundle/{chunk-FHIGY5K6.js → chunk-EQLOQOIB.js} +1 -1
- package/dist/bundle/{chunk-V6BJM3XW.js → chunk-FMSXN2N6.js} +482 -369
- package/dist/bundle/{chunk-UX52EWLQ.js → chunk-FSXQLNU4.js} +1 -1
- package/dist/bundle/{chunk-K55WZ67L.js → chunk-H74CWBSY.js} +3 -3
- package/dist/bundle/{chunk-OWFC6BAF.js → chunk-HBP7AQXX.js} +5 -5
- package/dist/bundle/{chunk-SVVSGUMU.js → chunk-I6MGDSYH.js} +4 -4
- package/dist/bundle/{chunk-ZM6J47GY.js → chunk-IDCYBSML.js} +2 -2
- package/dist/bundle/{chunk-QUPPO7DB.js → chunk-IKH4RCJO.js} +1 -1
- package/dist/bundle/{chunk-PHL53ERQ.js → chunk-IUEYR3TK.js} +4 -4
- package/dist/bundle/{chunk-MKOQDN3I.js → chunk-J7ESMDVV.js} +1 -1
- package/dist/bundle/{chunk-INQAQ55X.js → chunk-JABLJBXL.js} +80 -76
- package/dist/bundle/{chunk-QNJ4EKKW.js → chunk-JLC2RE4Y.js} +46 -46
- package/dist/bundle/{chunk-NLRPCKUS.js → chunk-JPXDDRBD.js} +8 -8
- package/dist/bundle/{chunk-SL2LXOCN.js → chunk-K54MCZWM.js} +2 -2
- package/dist/bundle/{chunk-DXWDHC2K.js → chunk-KK3ZHBMI.js} +73 -1
- package/dist/bundle/{chunk-LRS5X7G3.js → chunk-KQTR6YA4.js} +9 -9
- package/dist/bundle/{chunk-HNQGX4AG.js → chunk-LG5SQGNM.js} +28 -28
- package/dist/bundle/{chunk-LIF2HXIQ.js → chunk-LHZ4QBWB.js} +1 -1
- package/dist/bundle/{chunk-6Z62U7NY.js → chunk-LOYI3STE.js} +3 -3
- package/dist/bundle/{chunk-IP5CA3CW.js → chunk-MLN4DPXN.js} +10 -10
- package/dist/bundle/{chunk-FVJSDDSV.js → chunk-MM3OMWST.js} +11 -9
- package/dist/bundle/{chunk-G3FQTKHT.js → chunk-NMOWIFH3.js} +7 -7
- package/dist/bundle/{chunk-ESYCZ575.js → chunk-O5KXCQE4.js} +2 -2
- package/dist/bundle/{chunk-CLQXHFKG.js → chunk-OGUXOAOH.js} +5 -5
- package/dist/bundle/{chunk-H3LAORYX.js → chunk-ON7ZROFP.js} +2 -2
- package/dist/bundle/{chunk-KH43CUE2.js → chunk-PAHBDQ5A.js} +5 -5
- package/dist/bundle/{chunk-MAGAWAPG.js → chunk-PF6LXPK5.js} +167 -165
- package/dist/bundle/{chunk-TG3XWDFI.js → chunk-QHLEMEF3.js} +37 -31
- package/dist/bundle/{chunk-U3P5F57B.js → chunk-R3PK4Y7C.js} +1 -1
- package/dist/bundle/{chunk-G7XOBQB5.js → chunk-RB266FS6.js} +3 -3
- package/dist/bundle/{chunk-6EIWRE6E.js → chunk-SILEPITK.js} +27 -36
- package/dist/bundle/{chunk-STJWETNW.js → chunk-US2HTCJA.js} +4 -4
- package/dist/bundle/{chunk-6B3GQMR6.js → chunk-VPR47AG4.js} +1 -1
- package/dist/bundle/{chunk-3LS76TFB.js → chunk-VQUSPMYO.js} +1 -1
- package/dist/bundle/{chunk-RF6KPQWV.js → chunk-W6JPIP5C.js} +2 -2
- package/dist/bundle/{chunk-2LTQ6ZBS.js → chunk-WJNLBQSV.js} +1099 -743
- package/dist/bundle/{chunk-XNX3U6GD.js → chunk-X35Q5CHE.js} +6 -6
- package/dist/bundle/{chunk-OHBP2KPQ.js → chunk-XGXEWKR7.js} +4 -4
- package/dist/bundle/{chunk-CPUQC7UF.js → chunk-XM6ZAPFW.js} +1 -1
- package/dist/bundle/{chunk-DW6CDBXA.js → chunk-YDGZJK6U.js} +13 -13
- package/dist/bundle/{chunk-3ZSPTUG3.js → chunk-ZI5Y2EUA.js} +6 -6
- package/dist/bundle/{chunk-PGOMGFXA.js → chunk-ZIGVDRSI.js} +1 -1
- package/dist/bundle/{command-contract-7QECBB6M.js → command-contract-6HJ322BP.js} +11 -11
- package/dist/bundle/{decode-WRWXOJML.js → decode-OS6Y6ICA.js} +2 -2
- package/dist/bundle/{echarts-MTCNTCST.js → echarts-JKGDUDYL.js} +2 -2
- package/dist/bundle/{embed-PPPCHSTE.js → embed-UB4LH6MF.js} +3 -3
- package/dist/bundle/{embedder-UJBIX6A2.js → embedder-TUQBG22Y.js} +6 -6
- package/dist/bundle/{entry-4P5556KI.js → entry-N4NCIQYH.js} +4 -4
- package/dist/bundle/failure-BJEFFYH3.js +65 -0
- package/dist/bundle/{first-run-EKRDZLLY.js → first-run-VNJHZYGS.js} +5 -5
- package/dist/bundle/{first-screen-FRRTKWFB.js → first-screen-4XGF2NZ3.js} +12 -12
- package/dist/bundle/{instructions-JKIO4JF7.js → instructions-Q6IZQUU7.js} +1 -1
- package/dist/bundle/{mcp-FQPK2KAF.js → mcp-REIASUJR.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-3AIXDDDR.js → node-ZSSIVKVC.js} +2 -2
- package/dist/bundle/{node-sqlite-NX722DXD.js → node-sqlite-AUNJSQQL.js} +3 -3
- package/dist/bundle/{oauth-2NPSI7Q3.js → oauth-2MTJFCMI.js} +4 -4
- package/dist/bundle/{open-AFRN6Q36.js → open-U7RC27MJ.js} +2 -2
- package/dist/bundle/{openai-U5CQFLRU.js → openai-2SJCG6XM.js} +7 -7
- package/dist/bundle/{process-J2IBN6X7.js → process-UEQX5STY.js} +1 -1
- package/dist/bundle/{program-L5IM35PO.js → program-G3F26HW7.js} +1049 -159
- package/dist/bundle/{prompt-6XNKR4VQ.js → prompt-F23FC5PJ.js} +2 -2
- package/dist/bundle/{recognize-G3GI32QS.js → recognize-ZVEGVD56.js} +1 -1
- package/dist/bundle/{remote-DJO255PT.js → remote-CZXQS7PS.js} +4 -4
- package/dist/bundle/{rerank-5SBZRIHF.js → rerank-IRFXSVVO.js} +4 -4
- package/dist/bundle/{serve-BZVBKGU3.js → serve-6CIMU5HP.js} +6 -6
- package/dist/bundle/server-27KXLL4E.js +61 -0
- package/dist/bundle/{server-LWQAHDBH.js → server-H24MAUT2.js} +57 -51
- package/dist/bundle/server-TWMUWMFM.js +48 -0
- package/dist/bundle/{state-A57F7T5D.js → state-TRWZWXB5.js} +3 -3
- package/dist/bundle/{store-WG2GYWTG.js → store-E4QUOOLX.js} +9 -9
- package/dist/bundle/store-maintenance-command-GLHRB2VZ.js +47 -0
- package/dist/bundle/update-QQEM73O5.js +68 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides/search.d.ts.map +1 -1
- package/dist/contract-overrides/search.js +9 -3
- package/dist/contract-overrides/search.js.map +1 -1
- package/dist/digest/backfill.d.ts.map +1 -1
- package/dist/digest/backfill.js +7 -7
- package/dist/digest/backfill.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +25 -3
- package/dist/examples.js.map +1 -1
- package/dist/mcp/catalogue.d.ts +18 -0
- package/dist/mcp/catalogue.d.ts.map +1 -1
- package/dist/mcp/catalogue.js +6 -0
- package/dist/mcp/catalogue.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/people/command.d.ts.map +1 -1
- package/dist/people/command.js +5 -1
- package/dist/people/command.js.map +1 -1
- package/dist/people/identities-command.d.ts +5 -0
- package/dist/people/identities-command.d.ts.map +1 -0
- package/dist/people/identities-command.js +179 -0
- package/dist/people/identities-command.js.map +1 -0
- package/dist/people/identity.d.ts +5 -0
- package/dist/people/identity.d.ts.map +1 -1
- package/dist/people/identity.js +19 -2
- package/dist/people/identity.js.map +1 -1
- package/dist/program.d.ts +3 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +34 -2
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +72 -0
- package/dist/reasons.js.map +1 -1
- package/dist/review/kinds.d.ts +1 -1
- package/dist/review/kinds.d.ts.map +1 -1
- package/dist/review/kinds.js +1 -0
- package/dist/review/kinds.js.map +1 -1
- package/dist/run/import.d.ts +6 -0
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +22 -8
- package/dist/run/import.js.map +1 -1
- package/dist/search/answers.d.ts +9 -2
- package/dist/search/answers.d.ts.map +1 -1
- package/dist/search/answers.js +59 -5
- package/dist/search/answers.js.map +1 -1
- package/dist/search/command.d.ts.map +1 -1
- package/dist/search/command.js +38 -7
- package/dist/search/command.js.map +1 -1
- package/dist/search/search.d.ts +6 -2
- package/dist/search/search.d.ts.map +1 -1
- package/dist/search/search.js +14 -5
- package/dist/search/search.js.map +1 -1
- package/dist/sources/command.d.ts +3 -1
- package/dist/sources/command.d.ts.map +1 -1
- package/dist/sources/command.js +3 -1
- package/dist/sources/command.js.map +1 -1
- package/dist/sources/readers/api.d.ts +4 -0
- package/dist/sources/readers/api.d.ts.map +1 -0
- package/dist/sources/readers/api.js +48 -0
- package/dist/sources/readers/api.js.map +1 -0
- package/dist/sources/readers/claude-code.d.ts +7 -0
- package/dist/sources/readers/claude-code.d.ts.map +1 -0
- package/dist/sources/readers/claude-code.js +74 -0
- package/dist/sources/readers/claude-code.js.map +1 -0
- package/dist/sources/readers/codex.d.ts +7 -0
- package/dist/sources/readers/codex.d.ts.map +1 -0
- package/dist/sources/readers/codex.js +72 -0
- package/dist/sources/readers/codex.js.map +1 -0
- package/dist/sources/readers/index.d.ts +6 -0
- package/dist/sources/readers/index.d.ts.map +1 -0
- package/dist/sources/readers/index.js +8 -0
- package/dist/sources/readers/index.js.map +1 -0
- package/dist/sources/readers/keys.d.ts +13 -0
- package/dist/sources/readers/keys.d.ts.map +1 -0
- package/dist/sources/readers/keys.js +25 -0
- package/dist/sources/readers/keys.js.map +1 -0
- package/dist/sources/readers/ollama.d.ts +3 -0
- package/dist/sources/readers/ollama.d.ts.map +1 -0
- package/dist/sources/readers/ollama.js +60 -0
- package/dist/sources/readers/ollama.js.map +1 -0
- package/dist/sources/readers/process.d.ts +16 -0
- package/dist/sources/readers/process.d.ts.map +1 -0
- package/dist/sources/readers/process.js +49 -0
- package/dist/sources/readers/process.js.map +1 -0
- package/dist/sources/readers/types.d.ts +38 -0
- package/dist/sources/readers/types.d.ts.map +1 -0
- package/dist/sources/readers/types.js +2 -0
- package/dist/sources/readers/types.js.map +1 -0
- package/dist/sources/suggest-command.d.ts +9 -0
- package/dist/sources/suggest-command.d.ts.map +1 -0
- package/dist/sources/suggest-command.js +202 -0
- package/dist/sources/suggest-command.js.map +1 -0
- package/dist/sources/suggest.d.ts +56 -0
- package/dist/sources/suggest.d.ts.map +1 -0
- package/dist/sources/suggest.js +143 -0
- package/dist/sources/suggest.js.map +1 -0
- package/dist/store/group.d.ts +1 -1
- package/dist/store/group.d.ts.map +1 -1
- package/dist/store/group.js +2 -1
- package/dist/store/group.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/cli-memo/SKILL.md +5 -5
- package/skills/cli-memo/topics/meetings.md +2 -1
- package/skills/cli-memo/topics/proposals.md +40 -1
- package/skills/cli-memo/topics/search.md +4 -1
- package/dist/bundle/auto-WUU2MYGS.js +0 -85
- package/dist/bundle/failure-3F3YHF7G.js +0 -65
- package/dist/bundle/server-GCESLOOF.js +0 -48
- package/dist/bundle/server-JUSMYLIQ.js +0 -61
- package/dist/bundle/store-maintenance-command-GTY6VU76.js +0 -47
- package/dist/bundle/update-LICMP7UR.js +0 -68
- /package/dist/bundle/{chunk-YSYFOIW7.js → chunk-ZOWQ5B33.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BTVND2RV.js";
|
|
12
12
|
import {
|
|
13
13
|
CEILING_KEY,
|
|
14
14
|
Command,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
textModels,
|
|
59
59
|
vectorModelKey,
|
|
60
60
|
writeTextModelsSection
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-PF6LXPK5.js";
|
|
62
62
|
import {
|
|
63
63
|
isNewer,
|
|
64
64
|
updateCommand
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
envName,
|
|
69
69
|
readOnlyLockOf,
|
|
70
70
|
readOnlyRefusal
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-C3UOKLIT.js";
|
|
72
72
|
import {
|
|
73
73
|
AGENDA_COLUMNS,
|
|
74
74
|
BUSINESS_FIND_MAX,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
validateFields,
|
|
163
163
|
waitingPointer,
|
|
164
164
|
withoutField
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-BOZEBD3I.js";
|
|
166
166
|
import {
|
|
167
167
|
CATEGORIES,
|
|
168
168
|
DEAL_KINDS,
|
|
@@ -176,6 +176,7 @@ import {
|
|
|
176
176
|
MEETING_QUERY_GUIDE,
|
|
177
177
|
MeetingError,
|
|
178
178
|
OPERATORS_BY_TYPE,
|
|
179
|
+
READ_BUDGET_EXCEEDED,
|
|
179
180
|
SAVE_HELP,
|
|
180
181
|
SOURCE_REVIEW_KIND,
|
|
181
182
|
TASK_KINDS,
|
|
@@ -186,6 +187,7 @@ import {
|
|
|
186
187
|
createTaskService,
|
|
187
188
|
currentRun,
|
|
188
189
|
dateRange,
|
|
190
|
+
dayBoundary,
|
|
189
191
|
defineQuery,
|
|
190
192
|
entriesOfList,
|
|
191
193
|
eventItem,
|
|
@@ -234,6 +236,7 @@ import {
|
|
|
234
236
|
normalizeTag,
|
|
235
237
|
parseLocator,
|
|
236
238
|
parseLucene,
|
|
239
|
+
parseMeetingQuery,
|
|
237
240
|
parseMeetingReference,
|
|
238
241
|
parseReference,
|
|
239
242
|
paymentTitle,
|
|
@@ -259,25 +262,25 @@ import {
|
|
|
259
262
|
walkQuery,
|
|
260
263
|
withAttempt,
|
|
261
264
|
zonedMoment
|
|
262
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-JABLJBXL.js";
|
|
263
266
|
import {
|
|
264
267
|
damagedFile,
|
|
265
268
|
isCliFailure,
|
|
266
269
|
sqliteCode
|
|
267
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-EH7ACKFW.js";
|
|
268
271
|
import {
|
|
269
272
|
DEFAULT_STEMMERS,
|
|
270
273
|
createStemmer,
|
|
271
274
|
fold,
|
|
272
275
|
normalize
|
|
273
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-NMOWIFH3.js";
|
|
274
277
|
import {
|
|
275
278
|
DEFAULT_TASK_CATEGORIES,
|
|
276
279
|
FALLBACK_CATEGORY,
|
|
277
280
|
readSharedSection,
|
|
278
281
|
sharedConfigPath,
|
|
279
282
|
writeSharedSection
|
|
280
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-I6MGDSYH.js";
|
|
281
284
|
import {
|
|
282
285
|
MAX_MODEL_IMAGE_BYTES,
|
|
283
286
|
checkedOptions,
|
|
@@ -285,10 +288,10 @@ import {
|
|
|
285
288
|
range,
|
|
286
289
|
systemFor,
|
|
287
290
|
validateImages
|
|
288
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-O5KXCQE4.js";
|
|
289
292
|
import {
|
|
290
293
|
remoteKey
|
|
291
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-3CANRF2G.js";
|
|
292
295
|
import {
|
|
293
296
|
Unzip,
|
|
294
297
|
UnzipInflate,
|
|
@@ -299,15 +302,15 @@ import {
|
|
|
299
302
|
placedText,
|
|
300
303
|
runEmbedders,
|
|
301
304
|
textModelsDirectory
|
|
302
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-OGUXOAOH.js";
|
|
303
306
|
import {
|
|
304
307
|
installFiles,
|
|
305
308
|
megabytes
|
|
306
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-RB266FS6.js";
|
|
307
310
|
import {
|
|
308
311
|
storePath,
|
|
309
312
|
wirecatDirectory
|
|
310
|
-
} from "./chunk-
|
|
313
|
+
} from "./chunk-R3PK4Y7C.js";
|
|
311
314
|
import {
|
|
312
315
|
Credentials,
|
|
313
316
|
logRecordOf,
|
|
@@ -323,6 +326,7 @@ import {
|
|
|
323
326
|
getDotPath,
|
|
324
327
|
integer,
|
|
325
328
|
isoTimestamp,
|
|
329
|
+
literal,
|
|
326
330
|
maxLength,
|
|
327
331
|
minLength,
|
|
328
332
|
minValue,
|
|
@@ -1691,9 +1695,9 @@ var require_dom = __commonJS({
|
|
|
1691
1695
|
var headNode = doc2.createElement("head");
|
|
1692
1696
|
htmlNode.appendChild(headNode);
|
|
1693
1697
|
if (typeof title === "string") {
|
|
1694
|
-
var
|
|
1695
|
-
|
|
1696
|
-
headNode.appendChild(
|
|
1698
|
+
var titleNode2 = doc2.createElement("title");
|
|
1699
|
+
titleNode2.appendChild(doc2.createTextNode(title));
|
|
1700
|
+
headNode.appendChild(titleNode2);
|
|
1697
1701
|
}
|
|
1698
1702
|
htmlNode.appendChild(doc2.createElement("body"));
|
|
1699
1703
|
}
|
|
@@ -16969,7 +16973,7 @@ var require_lib3 = __commonJS({
|
|
|
16969
16973
|
}
|
|
16970
16974
|
});
|
|
16971
16975
|
|
|
16972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16973
16977
|
var RULES_VERSION = 5;
|
|
16974
16978
|
var LOOK_BACK = 50;
|
|
16975
16979
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17059,10 +17063,10 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
17059
17063
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17060
17064
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17061
17065
|
|
|
17062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17063
17067
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17064
17068
|
|
|
17065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
17066
17070
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
17067
17071
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
17068
17072
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
@@ -17165,7 +17169,7 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
|
|
|
17165
17169
|
};
|
|
17166
17170
|
}, "storeDamageReport");
|
|
17167
17171
|
|
|
17168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
17169
17173
|
import { existsSync, statSync } from "node:fs";
|
|
17170
17174
|
var JSON_COLUMNS = {
|
|
17171
17175
|
accounts: ["settings"],
|
|
@@ -17307,10 +17311,10 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
17307
17311
|
}
|
|
17308
17312
|
}, "storeHealth");
|
|
17309
17313
|
|
|
17310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
17311
17315
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
17312
17316
|
|
|
17313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17314
17318
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options2) => {
|
|
17315
17319
|
if (!options2 || typeof options2 !== "object" || Array.isArray(options2))
|
|
17316
17320
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17336,7 +17340,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options2) =
|
|
|
17336
17340
|
});
|
|
17337
17341
|
}, "previewProjectAnnotationSnapshot");
|
|
17338
17342
|
|
|
17339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17340
17344
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options2) => {
|
|
17341
17345
|
if (!options2 || typeof options2 !== "object" || Array.isArray(options2))
|
|
17342
17346
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17357,7 +17361,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options2) => {
|
|
|
17357
17361
|
}
|
|
17358
17362
|
}, "snapshotProjectAnnotations");
|
|
17359
17363
|
|
|
17360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/search/groups.js
|
|
17361
17365
|
var ALL = "all";
|
|
17362
17366
|
var OWNER_NOTES = { provider: "notes", account: INTERNAL_NOTES };
|
|
17363
17367
|
var NOT_GROUP_NAMES = /* @__PURE__ */ new Set([ALL, "bots"]);
|
|
@@ -17491,7 +17495,7 @@ var scopeToGroup = /* @__PURE__ */ __name((run, request, context2) => {
|
|
|
17491
17495
|
return scoped;
|
|
17492
17496
|
}, "scopeToGroup");
|
|
17493
17497
|
|
|
17494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
17495
17499
|
var NO_MAIL = "no_mail";
|
|
17496
17500
|
var MAIL = "email";
|
|
17497
17501
|
var groupLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
@@ -17565,10 +17569,10 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
17565
17569
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
17566
17570
|
}, "accountsOfKind");
|
|
17567
17571
|
|
|
17568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17569
17573
|
import { randomUUID } from "node:crypto";
|
|
17570
17574
|
|
|
17571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
17572
17576
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
17573
17577
|
import { dirname, join } from "node:path";
|
|
17574
17578
|
var MOST_DEADLINES = 50;
|
|
@@ -17652,11 +17656,11 @@ var FloodMemory = class {
|
|
|
17652
17656
|
}
|
|
17653
17657
|
};
|
|
17654
17658
|
|
|
17655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17656
17660
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
17657
17661
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
17658
17662
|
|
|
17659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
17660
17664
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync as statSync2, unlinkSync } from "node:fs";
|
|
17661
17665
|
import { dirname as dirname2 } from "node:path";
|
|
17662
17666
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -17723,7 +17727,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
17723
17727
|
}
|
|
17724
17728
|
}, "lockTime");
|
|
17725
17729
|
|
|
17726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17727
17731
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
17728
17732
|
var SendJournal = class {
|
|
17729
17733
|
static {
|
|
@@ -17800,7 +17804,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
17800
17804
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
17801
17805
|
}, "withSendId");
|
|
17802
17806
|
|
|
17803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
17804
17808
|
import { existsSync as existsSync2, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
17805
17809
|
import { join as join3 } from "node:path";
|
|
17806
17810
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -17912,7 +17916,7 @@ var RecipientList = class {
|
|
|
17912
17916
|
}
|
|
17913
17917
|
};
|
|
17914
17918
|
|
|
17915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17916
17920
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
17917
17921
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
17918
17922
|
"attachments.extract",
|
|
@@ -18105,7 +18109,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
18105
18109
|
}), "guardFor");
|
|
18106
18110
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
18107
18111
|
|
|
18108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18109
18113
|
var TAKES = {
|
|
18110
18114
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18111
18115
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18165,7 +18169,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn2)
|
|
|
18165
18169
|
throw wrongAccount(reference, scope, profiles);
|
|
18166
18170
|
}, "ensureAccount");
|
|
18167
18171
|
|
|
18168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18169
18173
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18170
18174
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18171
18175
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18210,7 +18214,7 @@ ${lines3}`, { candidates });
|
|
|
18210
18214
|
}, "ambiguous");
|
|
18211
18215
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18212
18216
|
|
|
18213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18214
18218
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18215
18219
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18216
18220
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18285,7 +18289,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
18285
18289
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
18286
18290
|
}, "storeOnlyDeps");
|
|
18287
18291
|
|
|
18288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
18289
18293
|
var DAY_MS = 864e5;
|
|
18290
18294
|
var NEW_DAYS = 30;
|
|
18291
18295
|
var SAME_TEXT_MIN = 20;
|
|
@@ -18362,7 +18366,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
18362
18366
|
};
|
|
18363
18367
|
}, "scorePerson");
|
|
18364
18368
|
|
|
18365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
18366
18370
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
18367
18371
|
const controller = new AbortController();
|
|
18368
18372
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -18378,7 +18382,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
18378
18382
|
}
|
|
18379
18383
|
}, "withTimeLimit");
|
|
18380
18384
|
|
|
18381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
18382
18386
|
var REGISTRIES = {
|
|
18383
18387
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
18384
18388
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -18465,7 +18469,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
18465
18469
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
18466
18470
|
})), "notCovered");
|
|
18467
18471
|
|
|
18468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
18469
18473
|
var ACTIVITY_MESSAGES = 1e3;
|
|
18470
18474
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
18471
18475
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18553,7 +18557,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
18553
18557
|
};
|
|
18554
18558
|
}, "botCheckService");
|
|
18555
18559
|
|
|
18556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
18557
18561
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
18558
18562
|
if (newest === null)
|
|
18559
18563
|
return null;
|
|
@@ -18562,7 +18566,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
18562
18566
|
return newest.addressed ? "owed" : null;
|
|
18563
18567
|
}, "mailTurn");
|
|
18564
18568
|
|
|
18565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
18566
18570
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
18567
18571
|
if (error instanceof CliError && error.code === "not_found")
|
|
18568
18572
|
return void 0;
|
|
@@ -18620,7 +18624,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
18620
18624
|
};
|
|
18621
18625
|
}, "mailActivity");
|
|
18622
18626
|
|
|
18623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
18624
18628
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
18625
18629
|
const ids = [...new Set(chatIds)];
|
|
18626
18630
|
if (ids.length === 0)
|
|
@@ -18646,7 +18650,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
18646
18650
|
}));
|
|
18647
18651
|
}, "chatCoverage");
|
|
18648
18652
|
|
|
18649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
18650
18654
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
18651
18655
|
if (value === void 0)
|
|
18652
18656
|
return void 0;
|
|
@@ -18656,7 +18660,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
18656
18660
|
return id2;
|
|
18657
18661
|
}, "threadIdOf");
|
|
18658
18662
|
|
|
18659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18660
18664
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18661
18665
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18662
18666
|
if (key in own)
|
|
@@ -18673,12 +18677,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18673
18677
|
return found.bind(adapter);
|
|
18674
18678
|
}, "capability");
|
|
18675
18679
|
|
|
18676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18677
18681
|
import { randomBytes } from "node:crypto";
|
|
18678
18682
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18679
18683
|
var newOperationId = newSendId;
|
|
18680
18684
|
|
|
18681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
18682
18686
|
var LINKS = /https?:\/\/\S+/g;
|
|
18683
18687
|
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");
|
|
18684
18688
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -18708,7 +18712,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
18708
18712
|
});
|
|
18709
18713
|
}, "questions");
|
|
18710
18714
|
|
|
18711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
18712
18716
|
var TOP_POSTS = 5;
|
|
18713
18717
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
18714
18718
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -18786,7 +18790,7 @@ var membersOf2 = /* @__PURE__ */ __name(({ events, more }, messages, since) => {
|
|
|
18786
18790
|
}, "membersOf");
|
|
18787
18791
|
var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
18788
18792
|
const dayOf = calendarKey(timezone, "day");
|
|
18789
|
-
const
|
|
18793
|
+
const keyOf7 = /* @__PURE__ */ __name((timestamp2) => {
|
|
18790
18794
|
const day2 = dayOf(Date.parse(timestamp2));
|
|
18791
18795
|
if (by === "day")
|
|
18792
18796
|
return day2;
|
|
@@ -18801,12 +18805,12 @@ var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
|
18801
18805
|
return found;
|
|
18802
18806
|
}, "row");
|
|
18803
18807
|
for (const one2 of messages)
|
|
18804
|
-
row(
|
|
18808
|
+
row(keyOf7(one2.timestamp)).messages.push(one2);
|
|
18805
18809
|
for (const { timestamp: timestamp2, event, people } of events?.events ?? []) {
|
|
18806
18810
|
if (JOINS.has(event))
|
|
18807
|
-
row(
|
|
18811
|
+
row(keyOf7(timestamp2)).joined += people.length;
|
|
18808
18812
|
if (LEAVES.has(event))
|
|
18809
|
-
row(
|
|
18813
|
+
row(keyOf7(timestamp2)).left += people.length;
|
|
18810
18814
|
}
|
|
18811
18815
|
return [...rows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, found]) => ({
|
|
18812
18816
|
key,
|
|
@@ -18825,7 +18829,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
18825
18829
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
18826
18830
|
}, "median");
|
|
18827
18831
|
|
|
18828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
18829
18833
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
18830
18834
|
const events = [];
|
|
18831
18835
|
for (const stay of stays) {
|
|
@@ -18857,7 +18861,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
18857
18861
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
18858
18862
|
}, "memberEvents");
|
|
18859
18863
|
|
|
18860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
18861
18865
|
var AUDIT_PAGE = 200;
|
|
18862
18866
|
var AUDIT_BUDGET = 10;
|
|
18863
18867
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -18937,7 +18941,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
18937
18941
|
return found;
|
|
18938
18942
|
}, "burstJoins");
|
|
18939
18943
|
|
|
18940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18941
18945
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18942
18946
|
if (deps.reads !== "store")
|
|
18943
18947
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -19096,7 +19100,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
19096
19100
|
}
|
|
19097
19101
|
}, "senderAmong");
|
|
19098
19102
|
|
|
19099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
19100
19104
|
var EVENTS_DAYS = 7;
|
|
19101
19105
|
var TRACKED_DAYS = 30;
|
|
19102
19106
|
var STATS_PAGE = 1e3;
|
|
@@ -19391,7 +19395,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
19391
19395
|
return members.length === 0 ? null : members;
|
|
19392
19396
|
}, "storedMembers");
|
|
19393
19397
|
|
|
19394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19395
19399
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19396
19400
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19397
19401
|
const name = typed.trim().toLowerCase();
|
|
@@ -19448,7 +19452,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19448
19452
|
return best.name;
|
|
19449
19453
|
}, "categorize");
|
|
19450
19454
|
|
|
19451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19452
19456
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19453
19457
|
var RULES_IN = {
|
|
19454
19458
|
dialog: "all",
|
|
@@ -19654,7 +19658,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19654
19658
|
return passes;
|
|
19655
19659
|
}, "applyTaskRulesToChats");
|
|
19656
19660
|
|
|
19657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
19658
19662
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
19659
19663
|
const tags = /* @__PURE__ */ new Map();
|
|
19660
19664
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -19663,7 +19667,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
19663
19667
|
return tags;
|
|
19664
19668
|
}, "taskTagFilters");
|
|
19665
19669
|
|
|
19666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
19667
19671
|
var DAY = 864e5;
|
|
19668
19672
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
19669
19673
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -19910,7 +19914,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
19910
19914
|
};
|
|
19911
19915
|
}, "agendaItem");
|
|
19912
19916
|
|
|
19913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19914
19918
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19915
19919
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19916
19920
|
const fail5 = /* @__PURE__ */ __name(() => {
|
|
@@ -19974,7 +19978,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19974
19978
|
}
|
|
19975
19979
|
}, "validateContextEvidencePage");
|
|
19976
19980
|
|
|
19977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19978
19982
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19979
19983
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19980
19984
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -20027,7 +20031,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
20027
20031
|
};
|
|
20028
20032
|
}, "contextReadBudget");
|
|
20029
20033
|
|
|
20030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
20031
20035
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
20032
20036
|
if (!port || typeof port.read !== "function")
|
|
20033
20037
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -20071,7 +20075,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
20071
20075
|
};
|
|
20072
20076
|
}, "createContextEvidenceReader");
|
|
20073
20077
|
|
|
20074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
20075
20079
|
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");
|
|
20076
20080
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options2 = {}) => {
|
|
20077
20081
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -20087,10 +20091,10 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options2 = {})
|
|
|
20087
20091
|
}, "excerpt");
|
|
20088
20092
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
20089
20093
|
|
|
20090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
20091
20095
|
import { createInterface } from "node:readline";
|
|
20092
20096
|
|
|
20093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
20094
20098
|
import { createHash } from "node:crypto";
|
|
20095
20099
|
var MAX_ID = 512;
|
|
20096
20100
|
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
@@ -20321,7 +20325,7 @@ var envelopeOfVcard = /* @__PURE__ */ __name((text2, { provider, account, batchI
|
|
|
20321
20325
|
};
|
|
20322
20326
|
}, "envelopeOfVcard");
|
|
20323
20327
|
|
|
20324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
20325
20329
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
20326
20330
|
dryRun,
|
|
20327
20331
|
source: null,
|
|
@@ -20421,7 +20425,7 @@ var ingestVcard = /* @__PURE__ */ __name(async (store, text2, { provider, batchI
|
|
|
20421
20425
|
return { ...await ingest(store, envelope, options2), vcard: issues };
|
|
20422
20426
|
}, "ingestVcard");
|
|
20423
20427
|
|
|
20424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
20425
20429
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
20426
20430
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
20427
20431
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -20465,7 +20469,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
20465
20469
|
var remembered = /* @__PURE__ */ __name((input, key, read2) => input.remember ? input.remember(key, read2) : read2(), "remembered");
|
|
20466
20470
|
var chatsWithOf = /* @__PURE__ */ __name((input, key, id2) => remembered(input, `chats-with\0${key.provider}\0${key.account}\0${id2}`, () => input.store.chats.chatsWith(key, id2)), "chatsWithOf");
|
|
20467
20471
|
|
|
20468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
20469
20473
|
var SEARCH_LIMIT = 500;
|
|
20470
20474
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
20471
20475
|
var aliasHits = {
|
|
@@ -20514,7 +20518,7 @@ var aliasHits = {
|
|
|
20514
20518
|
}, "candidates")
|
|
20515
20519
|
};
|
|
20516
20520
|
|
|
20517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
20518
20522
|
var WEIGHT = 0.5;
|
|
20519
20523
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
20520
20524
|
var LARGE_GROUP = 30;
|
|
@@ -20586,7 +20590,7 @@ var sendersOf2 = /* @__PURE__ */ __name(async (input, chat, reference, key) => {
|
|
|
20586
20590
|
return found;
|
|
20587
20591
|
}, "sendersOf");
|
|
20588
20592
|
|
|
20589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
20590
20594
|
var WEIGHT2 = 0.7;
|
|
20591
20595
|
var chatTitle = {
|
|
20592
20596
|
id: "chat-title",
|
|
@@ -20625,7 +20629,7 @@ var chatTitle = {
|
|
|
20625
20629
|
}, "candidates")
|
|
20626
20630
|
};
|
|
20627
20631
|
|
|
20628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
20629
20633
|
var WEIGHT3 = 0.3;
|
|
20630
20634
|
var CONTACTS = 500;
|
|
20631
20635
|
var MOST_PAIRS = 200;
|
|
@@ -20686,7 +20690,7 @@ var emailDomain = {
|
|
|
20686
20690
|
}, "candidates")
|
|
20687
20691
|
};
|
|
20688
20692
|
|
|
20689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
20690
20694
|
var NAMED = 0.7;
|
|
20691
20695
|
var MEMBER_ONLY = 0.3;
|
|
20692
20696
|
var READ_LIMIT2 = 500;
|
|
@@ -20760,7 +20764,7 @@ var mailThread = {
|
|
|
20760
20764
|
}, "candidates")
|
|
20761
20765
|
};
|
|
20762
20766
|
|
|
20763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
20764
20768
|
var WEIGHT4 = 0.5;
|
|
20765
20769
|
var memberChats = {
|
|
20766
20770
|
id: "member-chats",
|
|
@@ -20802,7 +20806,7 @@ var memberChats = {
|
|
|
20802
20806
|
}, "candidates")
|
|
20803
20807
|
};
|
|
20804
20808
|
|
|
20805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
20806
20810
|
var WEIGHT5 = 0.6;
|
|
20807
20811
|
var memberDialog = {
|
|
20808
20812
|
id: "member-dialog",
|
|
@@ -20835,7 +20839,7 @@ var memberDialog = {
|
|
|
20835
20839
|
}, "candidates")
|
|
20836
20840
|
};
|
|
20837
20841
|
|
|
20838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
20839
20843
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20840
20844
|
var DEFAULT_PURPOSES = ["work"];
|
|
20841
20845
|
var LINK_PURPOSE = "work";
|
|
@@ -20865,7 +20869,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
20865
20869
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
20866
20870
|
], "purposeList");
|
|
20867
20871
|
|
|
20868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
20869
20873
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
20870
20874
|
async around(ref, window3) {
|
|
20871
20875
|
const at = parseLocator(ref);
|
|
@@ -20961,7 +20965,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
20961
20965
|
};
|
|
20962
20966
|
}, "storedNeighbours");
|
|
20963
20967
|
|
|
20964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
20965
20969
|
import { createHash as createHash2 } from "node:crypto";
|
|
20966
20970
|
var DAY2 = 864e5;
|
|
20967
20971
|
var MAX_TIME = 864e13;
|
|
@@ -21223,7 +21227,7 @@ var contextChunks = /* @__PURE__ */ __name((after, before2) => {
|
|
|
21223
21227
|
}, "contextChunks");
|
|
21224
21228
|
var projectUnits = /* @__PURE__ */ __name((plan, window3) => {
|
|
21225
21229
|
const chunks = contextChunks(window3.after, window3.before);
|
|
21226
|
-
const
|
|
21230
|
+
const literal2 = chunks.flatMap((chunk) => plan.lanes.filter((lane) => lane.query !== null).flatMap((lane) => plan.sources.map((source, sourceIndex) => ({
|
|
21227
21231
|
lane,
|
|
21228
21232
|
source,
|
|
21229
21233
|
sourceIndex,
|
|
@@ -21250,7 +21254,7 @@ var projectUnits = /* @__PURE__ */ __name((plan, window3) => {
|
|
|
21250
21254
|
}
|
|
21251
21255
|
] : [];
|
|
21252
21256
|
}));
|
|
21253
|
-
const units2 = [...
|
|
21257
|
+
const units2 = [...literal2, ...bySender, ...linked];
|
|
21254
21258
|
if (units2.length > LIMITS.units)
|
|
21255
21259
|
fail2(`${units2.length} lane \xD7 source \xD7 90-day reads exceed ${LIMITS.units}; narrow the lanes, sources or window`);
|
|
21256
21260
|
return units2;
|
|
@@ -21277,7 +21281,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
21277
21281
|
return value;
|
|
21278
21282
|
}, "decodeCheckpoint");
|
|
21279
21283
|
|
|
21280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
21281
21285
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
21282
21286
|
var PAGE = 20;
|
|
21283
21287
|
var PEOPLE = 20;
|
|
@@ -21681,7 +21685,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
21681
21685
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
21682
21686
|
}, "peopleOf");
|
|
21683
21687
|
|
|
21684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
21685
21689
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
21686
21690
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
21687
21691
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -21725,7 +21729,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
21725
21729
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
21726
21730
|
}, "matchVocabularyTerms");
|
|
21727
21731
|
|
|
21728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
21729
21733
|
var KINDS = ["project", "tag", "topic"];
|
|
21730
21734
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options2 = {}) => {
|
|
21731
21735
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -21780,7 +21784,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
21780
21784
|
};
|
|
21781
21785
|
}, "findEvidenceMentions");
|
|
21782
21786
|
|
|
21783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
21784
21788
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
21785
21789
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
21786
21790
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -22086,7 +22090,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
22086
22090
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
22087
22091
|
}, "purposeHintOf");
|
|
22088
22092
|
|
|
22089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
22090
22094
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
22091
22095
|
var PERSON_SCORERS = [emailDomain];
|
|
22092
22096
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -22342,18 +22346,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
22342
22346
|
}, "referenceOf");
|
|
22343
22347
|
var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
|
|
22344
22348
|
|
|
22345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
22346
22350
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
22347
22351
|
|
|
22348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
22349
22353
|
import { lstat } from "node:fs/promises";
|
|
22350
22354
|
|
|
22351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
22352
22356
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
22353
22357
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
22354
22358
|
import { join as join5 } from "node:path";
|
|
22355
22359
|
|
|
22356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
22357
22361
|
import { createHash as createHash3 } from "node:crypto";
|
|
22358
22362
|
var metadataLimit = 16384;
|
|
22359
22363
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -22413,7 +22417,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
22413
22417
|
}
|
|
22414
22418
|
}, "readPartialMetadata");
|
|
22415
22419
|
|
|
22416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
22417
22421
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
22418
22422
|
import { open, rename, unlink } from "node:fs/promises";
|
|
22419
22423
|
import { join as join4 } from "node:path";
|
|
@@ -22505,7 +22509,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
22505
22509
|
};
|
|
22506
22510
|
}, "partialWriter");
|
|
22507
22511
|
|
|
22508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
22509
22513
|
var NativeRecordingPartialStore = class {
|
|
22510
22514
|
static {
|
|
22511
22515
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -22612,12 +22616,12 @@ var NativeRecordingPartialStore = class {
|
|
|
22612
22616
|
}
|
|
22613
22617
|
};
|
|
22614
22618
|
|
|
22615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
22616
22620
|
import { createHash as createHash5 } from "node:crypto";
|
|
22617
22621
|
import { link as link2 } from "node:fs/promises";
|
|
22618
22622
|
import { basename, dirname as dirname4, join as join7, resolve } from "node:path";
|
|
22619
22623
|
|
|
22620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
22621
22625
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
22622
22626
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
22623
22627
|
signal?.throwIfAborted();
|
|
@@ -22652,7 +22656,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
22652
22656
|
signal?.throwIfAborted();
|
|
22653
22657
|
}, "commitPublication");
|
|
22654
22658
|
|
|
22655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
22656
22660
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
22657
22661
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
22658
22662
|
import { join as join6 } from "node:path";
|
|
@@ -22725,7 +22729,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
22725
22729
|
}
|
|
22726
22730
|
}, "writePublicationJournal");
|
|
22727
22731
|
|
|
22728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
22729
22733
|
var NativeRecordingPublication = class {
|
|
22730
22734
|
static {
|
|
22731
22735
|
__name(this, "NativeRecordingPublication");
|
|
@@ -22798,7 +22802,7 @@ var NativeRecordingPublication = class {
|
|
|
22798
22802
|
}
|
|
22799
22803
|
};
|
|
22800
22804
|
|
|
22801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
22802
22806
|
import { createHash as createHash6 } from "node:crypto";
|
|
22803
22807
|
import { readdir } from "node:fs/promises";
|
|
22804
22808
|
import { isAbsolute, join as join8, resolve as resolve2 } from "node:path";
|
|
@@ -22885,7 +22889,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
22885
22889
|
beforePublish
|
|
22886
22890
|
}), "commitMediaEntry");
|
|
22887
22891
|
|
|
22888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
22889
22893
|
var validator = '"media-completed-v1"';
|
|
22890
22894
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
22891
22895
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -22986,7 +22990,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
22986
22990
|
return entry;
|
|
22987
22991
|
}, "archiveMediaFile");
|
|
22988
22992
|
|
|
22989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
22990
22994
|
import { mkdir, realpath } from "node:fs/promises";
|
|
22991
22995
|
import { join as join9, resolve as resolve3 } from "node:path";
|
|
22992
22996
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -23053,7 +23057,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
23053
23057
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
23054
23058
|
}, "withMediaArchiveLocks");
|
|
23055
23059
|
|
|
23056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
23057
23061
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
23058
23062
|
if (value === void 0)
|
|
23059
23063
|
return void 0;
|
|
@@ -23206,7 +23210,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options2) => {
|
|
|
23206
23210
|
}, { create: true });
|
|
23207
23211
|
}, "archiveMedia");
|
|
23208
23212
|
|
|
23209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
23210
23214
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
23211
23215
|
import { basename as basename2, dirname as dirname5, join as join10, resolve as resolve4 } from "node:path";
|
|
23212
23216
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -23359,7 +23363,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options2) => {
|
|
|
23359
23363
|
}, { additional: [target2], createAdditional: !options2.dryRun });
|
|
23360
23364
|
}, "moveMediaArchive");
|
|
23361
23365
|
|
|
23362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
23363
23367
|
import { writeFileSync as writeFileSync2 } from "node:fs";
|
|
23364
23368
|
import { join as join11 } from "node:path";
|
|
23365
23369
|
var bytesOf2 = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
@@ -23384,7 +23388,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
23384
23388
|
`);
|
|
23385
23389
|
await nativeRuntime({ env, progress });
|
|
23386
23390
|
progress(`${model.id}: loading it once to check it works`);
|
|
23387
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
23391
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-UB4LH6MF.js");
|
|
23388
23392
|
const embedder = await openEmbedder2(model, directory2);
|
|
23389
23393
|
try {
|
|
23390
23394
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -23405,7 +23409,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
23405
23409
|
}
|
|
23406
23410
|
await nativeRuntime({ env, progress });
|
|
23407
23411
|
progress(`${model.id}: loading it once to check it works`);
|
|
23408
|
-
const { openReranker } = await import("./rerank-
|
|
23412
|
+
const { openReranker } = await import("./rerank-IRFXSVVO.js");
|
|
23409
23413
|
const reranker = await openReranker(model, directory2);
|
|
23410
23414
|
try {
|
|
23411
23415
|
await reranker.score("check", ["check"]);
|
|
@@ -23423,7 +23427,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
23423
23427
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
23424
23428
|
}
|
|
23425
23429
|
progress(`${model.id}: loading it once to check it works`);
|
|
23426
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
23430
|
+
const { openPictureEmbedder } = await import("./embedder-TUQBG22Y.js");
|
|
23427
23431
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
23428
23432
|
try {
|
|
23429
23433
|
const vector = await embedder.embedQuery("check");
|
|
@@ -23435,7 +23439,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
23435
23439
|
return { model, directory: directory2 };
|
|
23436
23440
|
}, "downloadImageModel");
|
|
23437
23441
|
|
|
23438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
23439
23443
|
var MONEY_REQUEST = "money-request";
|
|
23440
23444
|
var MONEY_DONE = "money-done";
|
|
23441
23445
|
var PROMISE = "promise";
|
|
@@ -23469,10 +23473,10 @@ var MONEY_WORDS = [
|
|
|
23469
23473
|
}
|
|
23470
23474
|
];
|
|
23471
23475
|
|
|
23472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
23473
23477
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
23474
23478
|
|
|
23475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
23476
23480
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
23477
23481
|
var MONEY_DONE_FORMS = words([
|
|
23478
23482
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -23512,7 +23516,7 @@ var PROMISE_FORMS = words([
|
|
|
23512
23516
|
"estar\xE1 listo"
|
|
23513
23517
|
]);
|
|
23514
23518
|
|
|
23515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
23516
23520
|
var EXCERPT_CHARS = 80;
|
|
23517
23521
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
23518
23522
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23534,7 +23538,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
23534
23538
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
23535
23539
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
23536
23540
|
|
|
23537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
23538
23542
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
23539
23543
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
23540
23544
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -23615,7 +23619,7 @@ var amounts = {
|
|
|
23615
23619
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
23616
23620
|
};
|
|
23617
23621
|
|
|
23618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
23619
23623
|
var children = {
|
|
23620
23624
|
id: "children",
|
|
23621
23625
|
version: 1,
|
|
@@ -23644,7 +23648,7 @@ var children = {
|
|
|
23644
23648
|
}, "read")
|
|
23645
23649
|
};
|
|
23646
23650
|
|
|
23647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
23648
23652
|
var coverage = {
|
|
23649
23653
|
id: "coverage",
|
|
23650
23654
|
version: 1,
|
|
@@ -23673,7 +23677,7 @@ var coverage = {
|
|
|
23673
23677
|
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")
|
|
23674
23678
|
};
|
|
23675
23679
|
|
|
23676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
23677
23681
|
var holding2 = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
23678
23682
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
23679
23683
|
signal: "payments",
|
|
@@ -23723,7 +23727,7 @@ var payments = {
|
|
|
23723
23727
|
}, "read")
|
|
23724
23728
|
};
|
|
23725
23729
|
|
|
23726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
23727
23731
|
var PATTERNS_PER_CHAT = 3;
|
|
23728
23732
|
var DAY3 = 864e5;
|
|
23729
23733
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -23812,7 +23816,7 @@ var promises = {
|
|
|
23812
23816
|
}, "read")
|
|
23813
23817
|
};
|
|
23814
23818
|
|
|
23815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
23816
23820
|
var PER_SIDE = 5;
|
|
23817
23821
|
var WEEK = 7 * 864e5;
|
|
23818
23822
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -23843,7 +23847,7 @@ var questions2 = {
|
|
|
23843
23847
|
}, "attention")
|
|
23844
23848
|
};
|
|
23845
23849
|
|
|
23846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
23847
23851
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
23848
23852
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
23849
23853
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -23911,7 +23915,7 @@ var replyNext = {
|
|
|
23911
23915
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
23912
23916
|
};
|
|
23913
23917
|
|
|
23914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
23915
23919
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
23916
23920
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
23917
23921
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -23957,7 +23961,7 @@ var topics = {
|
|
|
23957
23961
|
}, "read")
|
|
23958
23962
|
};
|
|
23959
23963
|
|
|
23960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
23961
23965
|
var STATUS_SIGNALS = [
|
|
23962
23966
|
replyNext,
|
|
23963
23967
|
questions2,
|
|
@@ -23969,7 +23973,7 @@ var STATUS_SIGNALS = [
|
|
|
23969
23973
|
children
|
|
23970
23974
|
];
|
|
23971
23975
|
|
|
23972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
23973
23977
|
var DAY4 = 864e5;
|
|
23974
23978
|
var STATUS_WINDOW = 300;
|
|
23975
23979
|
var STATUS_CHATS = 16;
|
|
@@ -24158,7 +24162,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24158
24162
|
};
|
|
24159
24163
|
}, "projectStatus");
|
|
24160
24164
|
|
|
24161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
24162
24166
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
24163
24167
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
24164
24168
|
if (deps.offline)
|
|
@@ -24230,7 +24234,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
24230
24234
|
};
|
|
24231
24235
|
}, "accountService");
|
|
24232
24236
|
|
|
24233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
24234
24238
|
var MINUTE = 6e4;
|
|
24235
24239
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
24236
24240
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -24249,7 +24253,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
24249
24253
|
return new Date(at - at % MINUTE).toISOString();
|
|
24250
24254
|
}, "sendTime");
|
|
24251
24255
|
|
|
24252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
24253
24257
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
24254
24258
|
try {
|
|
24255
24259
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -24496,7 +24500,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
24496
24500
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
24497
24501
|
}, "linkLimits");
|
|
24498
24502
|
|
|
24499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
24500
24504
|
var THREADS_PAGE = 500;
|
|
24501
24505
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
24502
24506
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -24575,7 +24579,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
24575
24579
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
24576
24580
|
}, "readMail");
|
|
24577
24581
|
|
|
24578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
24579
24583
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
24580
24584
|
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");
|
|
24581
24585
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -24897,10 +24901,10 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
24897
24901
|
const groups = prepared.scopeAccounts.length ? await count4(prepared.execution, calendar ? "time" : by) : [];
|
|
24898
24902
|
let rows;
|
|
24899
24903
|
if (calendar) {
|
|
24900
|
-
const
|
|
24904
|
+
const keyOf7 = calendarKey(prepared.timezone, by);
|
|
24901
24905
|
const totals = /* @__PURE__ */ new Map();
|
|
24902
24906
|
for (const { id: id2, count: count5 } of groups) {
|
|
24903
|
-
const key =
|
|
24907
|
+
const key = keyOf7(Number(id2));
|
|
24904
24908
|
totals.set(key, (totals.get(key) ?? 0) + count5);
|
|
24905
24909
|
}
|
|
24906
24910
|
rows = [...totals].sort(([a], [b]) => a.localeCompare(b)).map(([key, count5]) => ({ key, name: null, count: count5 }));
|
|
@@ -24923,7 +24927,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
24923
24927
|
};
|
|
24924
24928
|
}, "statsLucene");
|
|
24925
24929
|
|
|
24926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
24927
24931
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
24928
24932
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
24929
24933
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -24963,7 +24967,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
24963
24967
|
};
|
|
24964
24968
|
}, "dateWindow");
|
|
24965
24969
|
|
|
24966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
24967
24971
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
24968
24972
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
24969
24973
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -25132,7 +25136,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
25132
25136
|
};
|
|
25133
25137
|
}, "readRankingSelection");
|
|
25134
25138
|
|
|
25135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
25136
25140
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
|
|
25137
25141
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
25138
25142
|
command,
|
|
@@ -25142,7 +25146,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
25142
25146
|
fieldsVersion: FIELD_VERSION
|
|
25143
25147
|
}), "searchRecordOf");
|
|
25144
25148
|
|
|
25145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
25146
25150
|
function invalid2(message) {
|
|
25147
25151
|
throw new CliError("validation_error", message);
|
|
25148
25152
|
}
|
|
@@ -25436,10 +25440,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
25436
25440
|
}, "evidence")
|
|
25437
25441
|
}), "adminStatisticsService");
|
|
25438
25442
|
|
|
25439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
25440
25444
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25441
25445
|
|
|
25442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
25443
25447
|
var REQUEST_MS = 400;
|
|
25444
25448
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
25445
25449
|
const lowest = ranges[0];
|
|
@@ -25462,13 +25466,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
25462
25466
|
};
|
|
25463
25467
|
}, "estimateBackfill");
|
|
25464
25468
|
|
|
25465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
25466
25470
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
25467
25471
|
...error,
|
|
25468
25472
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
25469
25473
|
}), "withRecovery");
|
|
25470
25474
|
|
|
25471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
25472
25476
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
25473
25477
|
if (isCliFailure(error))
|
|
25474
25478
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -25551,7 +25555,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
25551
25555
|
};
|
|
25552
25556
|
}, "mergeBatches");
|
|
25553
25557
|
|
|
25554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
25555
25559
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
25556
25560
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
25557
25561
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -25574,7 +25578,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
25574
25578
|
}
|
|
25575
25579
|
}, "patiently");
|
|
25576
25580
|
|
|
25577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
25578
25582
|
var CONTEXT_MESSAGES = 3;
|
|
25579
25583
|
var CONTEXT_MINUTES = 10;
|
|
25580
25584
|
var MAX_CHARS = 1200;
|
|
@@ -25598,12 +25602,12 @@ var context = {
|
|
|
25598
25602
|
}, "describe")
|
|
25599
25603
|
};
|
|
25600
25604
|
|
|
25601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
25602
25606
|
var BUILT_INS = [context];
|
|
25603
25607
|
var providers = [...BUILT_INS];
|
|
25604
25608
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
25605
25609
|
|
|
25606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
25607
25611
|
var READ_PAGE = 5e3;
|
|
25608
25612
|
var CHAIN = 50;
|
|
25609
25613
|
var CONVERSATION_QUERY = {
|
|
@@ -25755,7 +25759,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
25755
25759
|
return size4;
|
|
25756
25760
|
}, "sized");
|
|
25757
25761
|
|
|
25758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
25759
25763
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
25760
25764
|
var MESSAGE_PAGE = 5e3;
|
|
25761
25765
|
var PER_SESSION = 8;
|
|
@@ -25774,7 +25778,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
25774
25778
|
price: remote.price,
|
|
25775
25779
|
installed: true,
|
|
25776
25780
|
perBatch: PER_REQUEST * concurrency,
|
|
25777
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
25781
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-CZXQS7PS.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
25778
25782
|
};
|
|
25779
25783
|
}
|
|
25780
25784
|
const model = textModel(choice, deps.env);
|
|
@@ -25791,7 +25795,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
25791
25795
|
if (!isTextModelInstalled(model, directory2))
|
|
25792
25796
|
throw notDownloaded(model.id);
|
|
25793
25797
|
if (apart) {
|
|
25794
|
-
const { openProcess } = await import("./process-
|
|
25798
|
+
const { openProcess } = await import("./process-UEQX5STY.js");
|
|
25795
25799
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
25796
25800
|
}
|
|
25797
25801
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -26080,7 +26084,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
26080
26084
|
return { ...one2, state };
|
|
26081
26085
|
}, "shaped");
|
|
26082
26086
|
|
|
26083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
26084
26088
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
26085
26089
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options2) => {
|
|
26086
26090
|
for (const [key, value, maximum] of [
|
|
@@ -26133,7 +26137,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options2, signal,
|
|
|
26133
26137
|
}
|
|
26134
26138
|
}, "catchUpSearch");
|
|
26135
26139
|
|
|
26136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
26137
26141
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
26138
26142
|
if (deps.reads === "store") {
|
|
26139
26143
|
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`);
|
|
@@ -26514,7 +26518,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
26514
26518
|
return message?.timestamp ?? fallback;
|
|
26515
26519
|
}, "timeOfKey");
|
|
26516
26520
|
|
|
26517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
26518
26522
|
import { createHash as createHash7, randomUUID as randomUUID5 } from "node:crypto";
|
|
26519
26523
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
26520
26524
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
@@ -26651,16 +26655,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
26651
26655
|
return { plan, repair };
|
|
26652
26656
|
}, "gapsService");
|
|
26653
26657
|
|
|
26654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
26655
26659
|
import { createHash as createHash9 } from "node:crypto";
|
|
26656
26660
|
import { constants as constants2, mkdirSync as mkdirSync5 } from "node:fs";
|
|
26657
26661
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
26658
26662
|
|
|
26659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
26660
26664
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
26661
26665
|
import { basename as basename4, join as join12, relative as relative2, sep as sep2 } from "node:path";
|
|
26662
26666
|
|
|
26663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
26664
26668
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
26665
26669
|
import { open as open4, stat } from "node:fs/promises";
|
|
26666
26670
|
import { basename as basename3, dirname as dirname6, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -26862,7 +26866,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
26862
26866
|
return { name, source };
|
|
26863
26867
|
}, "readStickerFile");
|
|
26864
26868
|
|
|
26865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
26866
26870
|
var MAX_FILES = 1e4;
|
|
26867
26871
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
26868
26872
|
if (refusedPlace(directory2, app, env))
|
|
@@ -26931,15 +26935,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
26931
26935
|
return choices;
|
|
26932
26936
|
}, "directoryPaths");
|
|
26933
26937
|
|
|
26934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26935
26939
|
import { posix } from "node:path";
|
|
26936
26940
|
|
|
26937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26938
26942
|
import { setImmediate as tick } from "node:timers/promises";
|
|
26939
26943
|
import { crc32 } from "node:zlib";
|
|
26940
26944
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
26941
26945
|
|
|
26942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
26943
26947
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
26944
26948
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
26945
26949
|
var SAMPLE = 65536;
|
|
@@ -27041,7 +27045,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
27041
27045
|
return result.text;
|
|
27042
27046
|
}, "decodeXml");
|
|
27043
27047
|
|
|
27044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27045
27049
|
var MAX_PART = 10 * 1024 * 1024;
|
|
27046
27050
|
var MAX_ENTRIES = 1e3;
|
|
27047
27051
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -27256,7 +27260,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
27256
27260
|
return found;
|
|
27257
27261
|
}, "elements");
|
|
27258
27262
|
|
|
27259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
27260
27264
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
27261
27265
|
let name = "";
|
|
27262
27266
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -27311,7 +27315,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
27311
27315
|
return { text: parts.join("").trim(), truncated: false };
|
|
27312
27316
|
}, "sheetText");
|
|
27313
27317
|
|
|
27314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27315
27319
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
27316
27320
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
27317
27321
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -27711,10 +27715,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
27711
27715
|
}
|
|
27712
27716
|
}, "readDocument");
|
|
27713
27717
|
|
|
27714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27715
27719
|
import { extname as extname3 } from "node:path";
|
|
27716
27720
|
|
|
27717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
27718
27722
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
27719
27723
|
import { dirname as dirname7, extname as extname2, join as join13 } from "node:path";
|
|
27720
27724
|
import { fileURLToPath } from "node:url";
|
|
@@ -27775,7 +27779,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
27775
27779
|
}
|
|
27776
27780
|
}, "derived");
|
|
27777
27781
|
|
|
27778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
27779
27783
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
27780
27784
|
var image2 = {
|
|
27781
27785
|
id: "image",
|
|
@@ -27784,7 +27788,7 @@ var image2 = {
|
|
|
27784
27788
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
27785
27789
|
};
|
|
27786
27790
|
|
|
27787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
27788
27792
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
27789
27793
|
var doc = {
|
|
27790
27794
|
id: "doc",
|
|
@@ -27796,7 +27800,7 @@ var doc = {
|
|
|
27796
27800
|
}), "read")
|
|
27797
27801
|
};
|
|
27798
27802
|
|
|
27799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
27800
27804
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
27801
27805
|
var docx = {
|
|
27802
27806
|
id: "docx",
|
|
@@ -27809,7 +27813,7 @@ var docx = {
|
|
|
27809
27813
|
}), "read")
|
|
27810
27814
|
};
|
|
27811
27815
|
|
|
27812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
27813
27817
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
27814
27818
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
27815
27819
|
"fonttbl",
|
|
@@ -27985,7 +27989,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
27985
27989
|
}, "htmlText");
|
|
27986
27990
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
27987
27991
|
|
|
27988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
27989
27993
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
27990
27994
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
27991
27995
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -28041,7 +28045,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
28041
28045
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
28042
28046
|
}, "markdownSections");
|
|
28043
28047
|
|
|
28044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
28045
28049
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
28046
28050
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
28047
28051
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -28063,7 +28067,7 @@ var readPage = /* @__PURE__ */ __name(async (source, load) => {
|
|
|
28063
28067
|
if (text2 === "")
|
|
28064
28068
|
return void 0;
|
|
28065
28069
|
const title = first(page.title, metadata["og:title"], metadata.title);
|
|
28066
|
-
const
|
|
28070
|
+
const merged3 = {
|
|
28067
28071
|
...metadata,
|
|
28068
28072
|
...title ? { title } : {},
|
|
28069
28073
|
...first(page.author, metadata.author) ? { author: first(page.author, metadata.author) } : {},
|
|
@@ -28074,7 +28078,7 @@ var readPage = /* @__PURE__ */ __name(async (source, load) => {
|
|
|
28074
28078
|
status: "extracted",
|
|
28075
28079
|
text: text2,
|
|
28076
28080
|
extractor: "html:v2",
|
|
28077
|
-
metadata:
|
|
28081
|
+
metadata: merged3,
|
|
28078
28082
|
sections: markdownSections(text2)
|
|
28079
28083
|
};
|
|
28080
28084
|
}, "readPage");
|
|
@@ -28112,7 +28116,7 @@ var html = {
|
|
|
28112
28116
|
}, "read")
|
|
28113
28117
|
};
|
|
28114
28118
|
|
|
28115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
28116
28120
|
var office = {
|
|
28117
28121
|
id: "office",
|
|
28118
28122
|
version: documentExtractor("odt"),
|
|
@@ -28123,7 +28127,7 @@ var office = {
|
|
|
28123
28127
|
}, "read")
|
|
28124
28128
|
};
|
|
28125
28129
|
|
|
28126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
28127
28131
|
var pdf = {
|
|
28128
28132
|
id: "pdf",
|
|
28129
28133
|
version: "unpdf",
|
|
@@ -28190,7 +28194,7 @@ var pdf = {
|
|
|
28190
28194
|
}), "read")
|
|
28191
28195
|
};
|
|
28192
28196
|
|
|
28193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
28194
28198
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
28195
28199
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
28196
28200
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -28210,7 +28214,7 @@ var plain = {
|
|
|
28210
28214
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
28211
28215
|
};
|
|
28212
28216
|
|
|
28213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
28214
28218
|
var rtf = {
|
|
28215
28219
|
id: "rtf",
|
|
28216
28220
|
version: "v1",
|
|
@@ -28218,10 +28222,10 @@ var rtf = {
|
|
|
28218
28222
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
28219
28223
|
};
|
|
28220
28224
|
|
|
28221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
28222
28226
|
import { basename as basename5 } from "node:path";
|
|
28223
28227
|
|
|
28224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
28225
28229
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
28226
28230
|
const cells = [];
|
|
28227
28231
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -28259,7 +28263,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
28259
28263
|
return { cells, truncated };
|
|
28260
28264
|
}, "delimitedSpans");
|
|
28261
28265
|
|
|
28262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
28263
28267
|
var DELIMITED = {
|
|
28264
28268
|
".csv": ",",
|
|
28265
28269
|
".tsv": " ",
|
|
@@ -28298,7 +28302,7 @@ var sheets = {
|
|
|
28298
28302
|
}, "read")
|
|
28299
28303
|
};
|
|
28300
28304
|
|
|
28301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
28302
28306
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
28303
28307
|
var HEAD_BYTES = 1024;
|
|
28304
28308
|
var readers = [...BUILT_INS2];
|
|
@@ -28308,7 +28312,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
28308
28312
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
28309
28313
|
}, "readWithRegistry");
|
|
28310
28314
|
|
|
28311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28312
28316
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
28313
28317
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
28314
28318
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -29387,7 +29391,7 @@ function imageSize(input) {
|
|
|
29387
29391
|
}
|
|
29388
29392
|
__name(imageSize, "imageSize");
|
|
29389
29393
|
|
|
29390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
29391
29395
|
var MAX_PAGES = 20;
|
|
29392
29396
|
var MAX_PIXELS = 2e7;
|
|
29393
29397
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -29538,14 +29542,14 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
29538
29542
|
}
|
|
29539
29543
|
}, "ocrPdf");
|
|
29540
29544
|
|
|
29541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
29542
29546
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
29543
29547
|
const limits = pdfPreviewLimits(env);
|
|
29544
|
-
const
|
|
29548
|
+
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
29545
29549
|
if (signal?.aborted)
|
|
29546
29550
|
throw new CliError("cancelled", "PDF preview cancelled");
|
|
29547
29551
|
}, "cancelled");
|
|
29548
|
-
|
|
29552
|
+
cancelled3();
|
|
29549
29553
|
if (!Number.isSafeInteger(page) || page < 1)
|
|
29550
29554
|
throw new CliError("validation_error", "PDF page must be a position from 1");
|
|
29551
29555
|
const optional2 = /* @__PURE__ */ __name(async (name) => {
|
|
@@ -29559,7 +29563,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29559
29563
|
if (typeof engine.createIsomorphicCanvasFactory !== "function" || typeof engine.renderPageAsImage !== "function")
|
|
29560
29564
|
throw new CliError("validation_error", "PDF page previews need unpdf with rendering support (1.8.1 or later)");
|
|
29561
29565
|
const canvas = await optional2("@napi-rs/canvas");
|
|
29562
|
-
|
|
29566
|
+
cancelled3();
|
|
29563
29567
|
let document;
|
|
29564
29568
|
let closed;
|
|
29565
29569
|
const close = /* @__PURE__ */ __name(() => {
|
|
@@ -29576,7 +29580,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29576
29580
|
maxImageSize: Math.max(2e7, limits.pixels * limits.pixels)
|
|
29577
29581
|
});
|
|
29578
29582
|
signal?.addEventListener("abort", close, { once: true });
|
|
29579
|
-
|
|
29583
|
+
cancelled3();
|
|
29580
29584
|
if (!Number.isSafeInteger(document.numPages) || document.numPages < 1)
|
|
29581
29585
|
throw new CliError("validation_error", "PDF page count must be a positive integer");
|
|
29582
29586
|
if (page > document.numPages)
|
|
@@ -29594,7 +29598,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29594
29598
|
} finally {
|
|
29595
29599
|
selected.cleanup();
|
|
29596
29600
|
}
|
|
29597
|
-
|
|
29601
|
+
cancelled3();
|
|
29598
29602
|
if (image3.byteLength > limits.bytes)
|
|
29599
29603
|
throw new CliError("validation_error", `PDF preview exceeds ${limits.bytes / 1024 / 1024} MiB; configure MESSAGING_PDF_PREVIEW_MAX_MIB`);
|
|
29600
29604
|
const { width, height, type } = imageSize(image3);
|
|
@@ -29604,7 +29608,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29604
29608
|
throw new CliError("validation_error", `PDF preview dimensions exceed ${limits.pixels} pixels per side; configure MESSAGING_PDF_PREVIEW_MAX_PIXELS`);
|
|
29605
29609
|
return { bytes: image3, page, pageCount: document.numPages };
|
|
29606
29610
|
} catch (error) {
|
|
29607
|
-
|
|
29611
|
+
cancelled3();
|
|
29608
29612
|
if (error instanceof CliError)
|
|
29609
29613
|
throw error;
|
|
29610
29614
|
throw new CliError("validation_error", "the retained PDF cannot be rendered");
|
|
@@ -29615,7 +29619,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29615
29619
|
}
|
|
29616
29620
|
}, "pdfPreview");
|
|
29617
29621
|
|
|
29618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
29619
29623
|
import { createHash as createHash8 } from "node:crypto";
|
|
29620
29624
|
import { constants } from "node:fs";
|
|
29621
29625
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -29628,11 +29632,11 @@ var validateWindow = /* @__PURE__ */ __name(({ offsetBytes = 0, chunkBytes = 524
|
|
|
29628
29632
|
var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile = false, env = process.env) => {
|
|
29629
29633
|
const maxBytes = attachmentMaxBytes(env);
|
|
29630
29634
|
const { offsetBytes, chunkBytes } = validateWindow(options2);
|
|
29631
|
-
const
|
|
29635
|
+
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
29632
29636
|
if (options2.signal?.aborted)
|
|
29633
29637
|
throw new CliError("cancelled", "file transfer cancelled");
|
|
29634
29638
|
}, "cancelled");
|
|
29635
|
-
|
|
29639
|
+
cancelled3();
|
|
29636
29640
|
try {
|
|
29637
29641
|
const before2 = await lstat3(path);
|
|
29638
29642
|
if (!before2.isFile() || before2.isSymbolicLink())
|
|
@@ -29654,7 +29658,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile =
|
|
|
29654
29658
|
let copied = 0;
|
|
29655
29659
|
const scratch = Buffer.alloc(65536);
|
|
29656
29660
|
while (true) {
|
|
29657
|
-
|
|
29661
|
+
cancelled3();
|
|
29658
29662
|
const { bytesRead } = await handle.read(scratch, 0, scratch.length, seen2);
|
|
29659
29663
|
if (bytesRead === 0)
|
|
29660
29664
|
break;
|
|
@@ -29672,7 +29676,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile =
|
|
|
29672
29676
|
copied += chunk.copy(bytes2, seen2 + start - offsetBytes, start, end);
|
|
29673
29677
|
seen2 += chunk.length;
|
|
29674
29678
|
}
|
|
29675
|
-
|
|
29679
|
+
cancelled3();
|
|
29676
29680
|
const after = await handle.stat();
|
|
29677
29681
|
if (seen2 !== opened.size || copied !== bytes2.length || after.size !== opened.size || after.mtimeMs !== opened.mtimeMs || after.ctimeMs !== opened.ctimeMs)
|
|
29678
29682
|
throw new CliError("validation_error", "the retained attachment changed; restart its transfer");
|
|
@@ -29696,7 +29700,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile =
|
|
|
29696
29700
|
} catch (error) {
|
|
29697
29701
|
if (error instanceof CliError)
|
|
29698
29702
|
throw error;
|
|
29699
|
-
|
|
29703
|
+
cancelled3();
|
|
29700
29704
|
throw new CliError("not_found", "the retained attachment cannot be read; download it again");
|
|
29701
29705
|
}
|
|
29702
29706
|
}, "retainedBytes");
|
|
@@ -29723,7 +29727,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
29723
29727
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
29724
29728
|
}, "transferMime");
|
|
29725
29729
|
|
|
29726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
29727
29731
|
import { createWriteStream, mkdirSync as mkdirSync4 } from "node:fs";
|
|
29728
29732
|
import { link as link3, rm } from "node:fs/promises";
|
|
29729
29733
|
import { join as join14, resolve as resolve6 } from "node:path";
|
|
@@ -29837,7 +29841,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
29837
29841
|
}
|
|
29838
29842
|
}, "save");
|
|
29839
29843
|
|
|
29840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29841
29845
|
var ATTACHMENT_QUERY = {
|
|
29842
29846
|
entity: "attachment",
|
|
29843
29847
|
backend: "sql",
|
|
@@ -30260,7 +30264,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30260
30264
|
}, "setText")
|
|
30261
30265
|
}), "attachmentsService");
|
|
30262
30266
|
|
|
30263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
30264
30268
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
30265
30269
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
30266
30270
|
const store = await accountStore(deps);
|
|
@@ -30290,7 +30294,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30290
30294
|
}, "list")
|
|
30291
30295
|
}), "chatDocumentsService");
|
|
30292
30296
|
|
|
30293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
30294
30298
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
30295
30299
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
30296
30300
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -30377,7 +30381,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
30377
30381
|
}
|
|
30378
30382
|
}, "isRetentionSelection");
|
|
30379
30383
|
|
|
30380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
30381
30385
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
30382
30386
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
30383
30387
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -30584,7 +30588,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30584
30588
|
};
|
|
30585
30589
|
}, "countersService");
|
|
30586
30590
|
|
|
30587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
30588
30592
|
var SYNC_KEY = "messages.sync-first";
|
|
30589
30593
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
30590
30594
|
var keyOf3 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -30716,7 +30720,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
30716
30720
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
30717
30721
|
}), "withRefresh");
|
|
30718
30722
|
|
|
30719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
30720
30724
|
var CANDIDATES = 50;
|
|
30721
30725
|
var WORD_HITS = 200;
|
|
30722
30726
|
var RRF_K = 60;
|
|
@@ -30944,9 +30948,9 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
30944
30948
|
};
|
|
30945
30949
|
}, "embeddingsSearch");
|
|
30946
30950
|
var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
30947
|
-
const
|
|
30951
|
+
const merged3 = /* @__PURE__ */ new Map();
|
|
30948
30952
|
meaning.filter(({ score }) => score > minimumCosine).forEach(({ summary, chunk, score, stale, matchedIn }, index) => {
|
|
30949
|
-
|
|
30953
|
+
merged3.set(matchedIn ? `${summary.id}#${chunk.firstMessageId}` : summary.id, {
|
|
30950
30954
|
summary,
|
|
30951
30955
|
chunk,
|
|
30952
30956
|
score,
|
|
@@ -30958,14 +30962,14 @@ var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
|
30958
30962
|
});
|
|
30959
30963
|
words4.forEach(({ summary, chunk }, index) => {
|
|
30960
30964
|
const share = 1 / (RRF_K + index + 1);
|
|
30961
|
-
const held =
|
|
30965
|
+
const held = merged3.get(summary.id);
|
|
30962
30966
|
if (held) {
|
|
30963
30967
|
held.fused += share;
|
|
30964
30968
|
held.by.push("words");
|
|
30965
30969
|
} else
|
|
30966
|
-
|
|
30970
|
+
merged3.set(summary.id, { summary, chunk, score: null, by: ["words"], stale: false, fused: share });
|
|
30967
30971
|
});
|
|
30968
|
-
return [...
|
|
30972
|
+
return [...merged3.values()].sort((a, b) => b.fused - a.fused || (b.score ?? -2) - (a.score ?? -2)).map(({ fused: _, ...hit }) => hit);
|
|
30969
30973
|
}, "fused");
|
|
30970
30974
|
var searchReadiness = /* @__PURE__ */ __name((chats, meaning, outside2) => {
|
|
30971
30975
|
const built = new Set(chats.filter(({ state }) => state !== "not-built").map(({ chat }) => chat));
|
|
@@ -30991,13 +30995,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
30991
30995
|
return mean2.map((value) => value / length);
|
|
30992
30996
|
}, "meanOf");
|
|
30993
30997
|
|
|
30994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
30995
30999
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
30996
31000
|
...embeddingsMaintenance(deps),
|
|
30997
31001
|
...embeddingsSearch(deps)
|
|
30998
31002
|
}), "embeddingsService");
|
|
30999
31003
|
|
|
31000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
31001
31005
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
31002
31006
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
31003
31007
|
if (deps.offline)
|
|
@@ -31138,7 +31142,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31138
31142
|
};
|
|
31139
31143
|
}, "foldersService");
|
|
31140
31144
|
|
|
31141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
31142
31146
|
var INBOX_CHATS = 20;
|
|
31143
31147
|
var REVIEW_DAYS = 3;
|
|
31144
31148
|
var UNANSWERED_HOURS = 24;
|
|
@@ -31346,7 +31350,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
31346
31350
|
};
|
|
31347
31351
|
}, "inboxService");
|
|
31348
31352
|
|
|
31349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
31350
31354
|
var REVIEW_COUNT = 500;
|
|
31351
31355
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
31352
31356
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -31425,7 +31429,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
31425
31429
|
};
|
|
31426
31430
|
}, "mentionsService");
|
|
31427
31431
|
|
|
31428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
31429
31433
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
31430
31434
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
31431
31435
|
const { text: text2, spans } = formatted2;
|
|
@@ -31485,7 +31489,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
31485
31489
|
};
|
|
31486
31490
|
}, "visibleFormattedText");
|
|
31487
31491
|
|
|
31488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
31489
31493
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
31490
31494
|
position,
|
|
31491
31495
|
kind,
|
|
@@ -31534,7 +31538,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
31534
31538
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
31535
31539
|
}, "validatePermalink");
|
|
31536
31540
|
|
|
31537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
31538
31542
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
31539
31543
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
31540
31544
|
return `${seconds / 86400}d`;
|
|
@@ -31566,7 +31570,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
31566
31570
|
return seconds;
|
|
31567
31571
|
}, "pinDurationOf");
|
|
31568
31572
|
|
|
31569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
31570
31574
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
31571
31575
|
if (sendAs === void 0) {
|
|
31572
31576
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -31591,7 +31595,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
31591
31595
|
return sendAs;
|
|
31592
31596
|
}, "typedSendAs");
|
|
31593
31597
|
|
|
31594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
31595
31599
|
var TOTAL_CAP = 1e4;
|
|
31596
31600
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
31597
31601
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -31602,7 +31606,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
31602
31606
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
31603
31607
|
}, "totalOf");
|
|
31604
31608
|
|
|
31605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
31606
31610
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
31607
31611
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
31608
31612
|
let narrows = false;
|
|
@@ -31631,7 +31635,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
31631
31635
|
return wanted(root).join(" ").trim();
|
|
31632
31636
|
}, "meaningWords");
|
|
31633
31637
|
|
|
31634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
31635
31639
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
31636
31640
|
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"));
|
|
31637
31641
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -31764,7 +31768,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
31764
31768
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
31765
31769
|
}, "questionLookup");
|
|
31766
31770
|
|
|
31767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
31768
31772
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
31769
31773
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
31770
31774
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options2 = COMBINED_DEFAULTS) => {
|
|
@@ -31953,11 +31957,11 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
31953
31957
|
}
|
|
31954
31958
|
}
|
|
31955
31959
|
const proximity = Number.isFinite(span) ? Math.min(1, terms.length / span) : 0;
|
|
31956
|
-
const
|
|
31957
|
-
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ?
|
|
31960
|
+
const phrase2 = tokens.some((_, index) => terms.every((term, offset) => tokens[index + offset] === term)) ? 1 : 0;
|
|
31961
|
+
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
31958
31962
|
}, "signals");
|
|
31959
31963
|
|
|
31960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
31961
31965
|
var MEANING_DEPTH = 100;
|
|
31962
31966
|
var RRF_K2 = 60;
|
|
31963
31967
|
var RERANK_DEPTH = 50;
|
|
@@ -32228,36 +32232,36 @@ var filterPks = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32228
32232
|
return pks === void 0 || pks.length > RANK_WITHIN_MESSAGES ? void 0 : pks;
|
|
32229
32233
|
}, "filterPks");
|
|
32230
32234
|
var nearEligible = /* @__PURE__ */ __name(async (store, account, request, messenger, ranked, scope) => {
|
|
32231
|
-
const
|
|
32232
|
-
const only = ranked.slice(0, MEANING_DEPTH).filter((m) => !request.only || request.only.some((key) =>
|
|
32235
|
+
const keyOf7 = /* @__PURE__ */ __name((one2) => JSON.stringify([one2.provider, one2.account, one2.chatId, one2.id]), "keyOf");
|
|
32236
|
+
const only = ranked.slice(0, MEANING_DEPTH).filter((m) => !request.only || request.only.some((key) => keyOf7(key) === keyOf7(m))).map(({ provider, account: account2, chatId, id: id2 }) => ({ provider, account: account2, chatId, id: id2 }));
|
|
32233
32237
|
if (!only.length)
|
|
32234
32238
|
return [];
|
|
32235
32239
|
const eligible = await searchLucene(store, account, { ...request, text: void 0, ast: void 0, ...scope, limit: only.length, only, context: 0, thread: void 0 }, messenger);
|
|
32236
32240
|
const hits = new Map(eligible.items.map((hit) => {
|
|
32237
32241
|
const { provider, account: account2 } = parseLocator(hit.locator);
|
|
32238
|
-
return [
|
|
32242
|
+
return [keyOf7({ provider, account: account2, chatId: hit.chatId, id: hit.id }), hit];
|
|
32239
32243
|
}));
|
|
32240
32244
|
return ranked.flatMap((m) => {
|
|
32241
|
-
const hit = hits.get(
|
|
32245
|
+
const hit = hits.get(keyOf7(m));
|
|
32242
32246
|
return hit ? [{ ...hit, cosine: m.score }] : [];
|
|
32243
32247
|
});
|
|
32244
32248
|
}, "nearEligible");
|
|
32245
32249
|
var fusedWithMeaning = /* @__PURE__ */ __name((words4, near2, described) => {
|
|
32246
|
-
const
|
|
32250
|
+
const merged3 = /* @__PURE__ */ new Map();
|
|
32247
32251
|
const by = /* @__PURE__ */ __name((hit, foundBy) => hit.discovery ? { ...hit, discovery: { ...hit.discovery, foundBy } } : hit, "by");
|
|
32248
32252
|
words4.forEach((hit, rank) => {
|
|
32249
|
-
|
|
32253
|
+
merged3.set(hit.locator, { hit: by(hit, ["words"]), rrf: 1 / (RRF_K2 + rank + 1) });
|
|
32250
32254
|
});
|
|
32251
32255
|
near2.forEach(({ cosine: _, ...m }, rank) => {
|
|
32252
32256
|
const share = 1 / (RRF_K2 + rank + 1);
|
|
32253
|
-
const held =
|
|
32257
|
+
const held = merged3.get(m.locator);
|
|
32254
32258
|
if (held) {
|
|
32255
32259
|
held.rrf += share;
|
|
32256
32260
|
held.hit = by(held.hit, ["words", "meaning"]);
|
|
32257
32261
|
} else
|
|
32258
|
-
|
|
32262
|
+
merged3.set(m.locator, { hit: by(described({ ...m, fused: 0 }), ["meaning"]), rrf: share });
|
|
32259
32263
|
});
|
|
32260
|
-
return [...
|
|
32264
|
+
return [...merged3.values()].sort((a, b) => b.rrf - a.rrf).map(({ hit, rrf }) => ({ ...hit, score: rrf }));
|
|
32261
32265
|
}, "fusedWithMeaning");
|
|
32262
32266
|
var PARENT_CHARACTERS = 300;
|
|
32263
32267
|
var pairInput = /* @__PURE__ */ __name((hit, parent) => {
|
|
@@ -32282,7 +32286,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
32282
32286
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
32283
32287
|
}, "mixedWithReranker");
|
|
32284
32288
|
|
|
32285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
32286
32290
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
32287
32291
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
32288
32292
|
var threadBounds = /* @__PURE__ */ __name((options2 = {}) => {
|
|
@@ -32481,7 +32485,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32481
32485
|
return result;
|
|
32482
32486
|
}, "readThreadContext");
|
|
32483
32487
|
|
|
32484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
32485
32489
|
var SEARCH_FILL_MS = 200;
|
|
32486
32490
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
32487
32491
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -32550,7 +32554,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
32550
32554
|
}, "accountOf");
|
|
32551
32555
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
32552
32556
|
|
|
32553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meaning-model.js
|
|
32554
32558
|
var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
32555
32559
|
const chosen = chosenTextModel(env);
|
|
32556
32560
|
if (chosen.from === "chosen" || chosen.id !== DEFAULT_TEXT_MODEL)
|
|
@@ -32565,12 +32569,12 @@ var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
|
32565
32569
|
return (counts.get(before2) ?? 0) > (counts.get(now) ?? 0) ? previous.id : current.id;
|
|
32566
32570
|
}, "meaningModel");
|
|
32567
32571
|
|
|
32568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32569
32573
|
import { createHash as createHash10 } from "node:crypto";
|
|
32570
32574
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
32571
32575
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
32572
32576
|
|
|
32573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
32574
32578
|
var GROUP_SETTINGS = [
|
|
32575
32579
|
"allCanPin",
|
|
32576
32580
|
"onlyAdminsAdd",
|
|
@@ -32584,7 +32588,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
32584
32588
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
32585
32589
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
32586
32590
|
|
|
32587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32588
32592
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
32589
32593
|
var PICTURE_FLOOR = 0.25;
|
|
32590
32594
|
var PAGE4 = 50;
|
|
@@ -32601,7 +32605,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
32601
32605
|
const directory2 = imageModelsDirectory(deps.env);
|
|
32602
32606
|
if (!isImageModelInstalled(model2, directory2))
|
|
32603
32607
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
32604
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32608
|
+
const { openPictureEmbedder } = await import("./embedder-TUQBG22Y.js");
|
|
32605
32609
|
return openPictureEmbedder(model2, directory2);
|
|
32606
32610
|
}, "open");
|
|
32607
32611
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -32798,7 +32802,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
32798
32802
|
}, "search")
|
|
32799
32803
|
}), "withPictures");
|
|
32800
32804
|
|
|
32801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
32802
32806
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
32803
32807
|
try {
|
|
32804
32808
|
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -32877,7 +32881,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
32877
32881
|
}
|
|
32878
32882
|
}, "meaningLane");
|
|
32879
32883
|
|
|
32880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
32881
32885
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
32882
32886
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
32883
32887
|
if (choice === "off")
|
|
@@ -32889,9 +32893,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
32889
32893
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
32890
32894
|
try {
|
|
32891
32895
|
const warm = deps.embedders;
|
|
32892
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
32896
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-UEQX5STY.js")).openRerankerProcess(model, directory2, {
|
|
32893
32897
|
threads: defaultThreads()
|
|
32894
|
-
})) : await (await import("./rerank-
|
|
32898
|
+
})) : await (await import("./rerank-IRFXSVVO.js")).openReranker(model, directory2);
|
|
32895
32899
|
return {
|
|
32896
32900
|
model: model.id,
|
|
32897
32901
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -32911,17 +32915,142 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
32911
32915
|
};
|
|
32912
32916
|
}, "rerankLane");
|
|
32913
32917
|
|
|
32914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/search/question-period.js
|
|
32919
|
+
var DAY5 = 864e5;
|
|
32920
|
+
var SPAN = { start: 0, end: 0 };
|
|
32921
|
+
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
32922
|
+
var MONTHS = [
|
|
32923
|
+
new RegExp("january|\u044F\u043D\u0432\u0430\u0440\\p{L}*", "u"),
|
|
32924
|
+
new RegExp("february|\u0444\u0435\u0432\u0440\u0430\u043B\\p{L}*", "u"),
|
|
32925
|
+
new RegExp("march|\u043C\u0430\u0440\u0442\\p{L}*", "u"),
|
|
32926
|
+
new RegExp("april|\u0430\u043F\u0440\u0435\u043B\\p{L}*", "u"),
|
|
32927
|
+
/may|ма[йяе]/u,
|
|
32928
|
+
new RegExp("june|\u0438\u044E\u043D\\p{L}*", "u"),
|
|
32929
|
+
new RegExp("july|\u0438\u044E\u043B\\p{L}*", "u"),
|
|
32930
|
+
new RegExp("august|\u0430\u0432\u0433\u0443\u0441\u0442\\p{L}*", "u"),
|
|
32931
|
+
new RegExp("september|\u0441\u0435\u043D\u0442\u044F\u0431\u0440\\p{L}*", "u"),
|
|
32932
|
+
new RegExp("october|\u043E\u043A\u0442\u044F\u0431\u0440\\p{L}*", "u"),
|
|
32933
|
+
new RegExp("november|\u043D\u043E\u044F\u0431\u0440\\p{L}*", "u"),
|
|
32934
|
+
new RegExp("december|\u0434\u0435\u043A\u0430\u0431\u0440\\p{L}*", "u")
|
|
32935
|
+
];
|
|
32936
|
+
var MONTH = MONTHS.map(({ source }) => source).join("|");
|
|
32937
|
+
var ORDINAL = "(?:st|nd|rd|th)?";
|
|
32938
|
+
var DATED_MONTH = phrase(`(?:(\\d{1,2})${ORDINAL}\\s+(?:of\\s+)?)?(${MONTH})(?:\\s+(\\d{1,2})${ORDINAL}(?!\\p{N}))?(?:,?\\s+(\\d{4}))?`);
|
|
32939
|
+
var MONTH_BEFORE_MAY = /(?:in|of|since|during|until|by|early|late|mid|from|through)\s+$/iu;
|
|
32940
|
+
var monthOf = /* @__PURE__ */ __name((name) => MONTHS.findIndex(({ source }) => new RegExp(`^(?:${source})$`, "iu").test(name)), "monthOf");
|
|
32941
|
+
var monthDays = /* @__PURE__ */ __name((year, month) => [Date.UTC(year, month, 1), Date.UTC(year, month + 1, 0)], "monthDays");
|
|
32942
|
+
var weekDays = /* @__PURE__ */ __name((day2) => {
|
|
32943
|
+
const sinceMonday = (new Date(day2).getUTCDay() + 6) % 7;
|
|
32944
|
+
return [day2 - sinceMonday * DAY5, day2 + (6 - sinceMonday) * DAY5];
|
|
32945
|
+
}, "weekDays");
|
|
32946
|
+
var yearDays = /* @__PURE__ */ __name((year) => [Date.UTC(year, 0, 1), Date.UTC(year, 11, 31)], "yearDays");
|
|
32947
|
+
var unitDays = /* @__PURE__ */ __name((unit, day2) => {
|
|
32948
|
+
const at = new Date(day2);
|
|
32949
|
+
if (/^(?:day|дн|день)/iu.test(unit))
|
|
32950
|
+
return [day2, day2];
|
|
32951
|
+
if (/^(?:week|недел)/iu.test(unit))
|
|
32952
|
+
return weekDays(day2);
|
|
32953
|
+
if (/^(?:month|месяц)/iu.test(unit))
|
|
32954
|
+
return monthDays(at.getUTCFullYear(), at.getUTCMonth());
|
|
32955
|
+
return yearDays(at.getUTCFullYear());
|
|
32956
|
+
}, "unitDays");
|
|
32957
|
+
var unitsBack = /* @__PURE__ */ __name((unit, count4, today) => {
|
|
32958
|
+
const at = new Date(today);
|
|
32959
|
+
if (/^(?:day|дн|день)/iu.test(unit))
|
|
32960
|
+
return today - count4 * DAY5;
|
|
32961
|
+
if (/^(?:week|недел)/iu.test(unit))
|
|
32962
|
+
return today - 7 * count4 * DAY5;
|
|
32963
|
+
if (/^(?:month|месяц)/iu.test(unit))
|
|
32964
|
+
return Date.UTC(at.getUTCFullYear(), at.getUTCMonth() - count4, 1);
|
|
32965
|
+
return Date.UTC(at.getUTCFullYear() - count4, 0, 1);
|
|
32966
|
+
}, "unitsBack");
|
|
32967
|
+
var RULES = [
|
|
32968
|
+
[
|
|
32969
|
+
new RegExp("(?<!\\p{N})(\\d{4})-(\\d{2})-(\\d{2})(?!\\p{N})", "gu"),
|
|
32970
|
+
(part) => {
|
|
32971
|
+
const day2 = Date.UTC(Number(part(1)), Number(part(2)) - 1, Number(part(3)));
|
|
32972
|
+
return [day2, day2];
|
|
32973
|
+
}
|
|
32974
|
+
],
|
|
32975
|
+
[phrase("today|tonight|\u0441\u0435\u0433\u043E\u0434\u043D\u044F"), (_, today) => [today, today]],
|
|
32976
|
+
[phrase("yesterday|\u0432\u0447\u0435\u0440\u0430"), (_, today) => [today - DAY5, today - DAY5]],
|
|
32977
|
+
[phrase("\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430"), (_, today) => [today - 2 * DAY5, today - 2 * DAY5]],
|
|
32978
|
+
[
|
|
32979
|
+
phrase(new RegExp("(\\d+|an?|one)\\s+(days?|weeks?|months?|years?)\\s+ago|(\\d+)\\s+(\u0434\u043D\\p{L}*|\u0434\u0435\u043D\u044C|\u043D\u0435\u0434\u0435\u043B\\p{L}*|\u043C\u0435\u0441\u044F\u0446\\p{L}*|\u0433\u043E\u0434\\p{L}*|\u043B\u0435\u0442)\\s+\u043D\u0430\u0437\u0430\u0434", "u").source),
|
|
32980
|
+
(part, today) => {
|
|
32981
|
+
const n = Number.parseInt(part(1) || part(3), 10) || 1;
|
|
32982
|
+
const word = part(2) || part(4);
|
|
32983
|
+
return unitDays(word, unitsBack(word, n, today));
|
|
32984
|
+
}
|
|
32985
|
+
],
|
|
32986
|
+
[
|
|
32987
|
+
phrase("(?:last|past)\\s+(\\d+)\\s+days|(?:\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u0437\u0430\\s+\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435)\\s+(\\d+)\\s+\u0434\u043D\\p{L}*"),
|
|
32988
|
+
(part, today) => [today - (Number(part(1) || part(2)) - 1) * DAY5, today]
|
|
32989
|
+
],
|
|
32990
|
+
[
|
|
32991
|
+
phrase("(last|past|previous|this)\\s+(week|weekend|month|year)"),
|
|
32992
|
+
(part, today) => {
|
|
32993
|
+
const last = part(1).toLowerCase() !== "this";
|
|
32994
|
+
const unit = part(2);
|
|
32995
|
+
if (unit.toLowerCase() === "weekend") {
|
|
32996
|
+
const [monday] = weekDays(last ? today - 7 * DAY5 : today);
|
|
32997
|
+
return [monday + 5 * DAY5, monday + 6 * DAY5];
|
|
32998
|
+
}
|
|
32999
|
+
return unitDays(unit, last ? unitsBack(unit, 1, today) : today);
|
|
33000
|
+
}
|
|
33001
|
+
],
|
|
33002
|
+
[
|
|
33003
|
+
phrase(new RegExp("(?:\u043D\u0430|\u0432)\\s+(\u043F\u0440\u043E\u0448\u043B|\u044D\u0442)\\p{L}*\\s+(\u043D\u0435\u0434\u0435\u043B\\p{L}*|\u043C\u0435\u0441\u044F\u0446\\p{L}*|\u0433\u043E\u0434\\p{L}*)", "u").source),
|
|
33004
|
+
(part, today) => unitDays(part(2), part(1).toLowerCase() === "\u044D\u0442" ? today : unitsBack(part(2), 1, today))
|
|
33005
|
+
],
|
|
33006
|
+
[
|
|
33007
|
+
DATED_MONTH,
|
|
33008
|
+
(part, today, match) => {
|
|
33009
|
+
const [name, year] = [part(2), part(4)];
|
|
33010
|
+
const day2 = Number(part(1) || part(3) || 0);
|
|
33011
|
+
if (/^may$/iu.test(name) && !day2 && !year && !MONTH_BEFORE_MAY.test(match.input.slice(0, match.index)))
|
|
33012
|
+
return;
|
|
33013
|
+
const month = monthOf(name);
|
|
33014
|
+
const now = new Date(today);
|
|
33015
|
+
const lastYear = month > now.getUTCMonth() || month === now.getUTCMonth() && day2 > now.getUTCDate();
|
|
33016
|
+
const y = year ? Number(year) : now.getUTCFullYear() - (lastYear ? 1 : 0);
|
|
33017
|
+
const [first2, last] = monthDays(y, month);
|
|
33018
|
+
if (!day2 || day2 > new Date(last).getUTCDate())
|
|
33019
|
+
return [first2, last];
|
|
33020
|
+
return [Date.UTC(y, month, day2), Date.UTC(y, month, day2)];
|
|
33021
|
+
}
|
|
33022
|
+
]
|
|
33023
|
+
];
|
|
33024
|
+
var questionPeriod = /* @__PURE__ */ __name((text2, now, zone) => {
|
|
33025
|
+
const today = Date.parse(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now)}T00:00:00Z`);
|
|
33026
|
+
const found = [];
|
|
33027
|
+
for (const [pattern, days] of RULES)
|
|
33028
|
+
for (const match of text2.matchAll(pattern)) {
|
|
33029
|
+
const span = days((n) => match[n] ?? "", today, match);
|
|
33030
|
+
if (span)
|
|
33031
|
+
found.push(span);
|
|
33032
|
+
}
|
|
33033
|
+
const inner = found.filter(([first2, last]) => !found.some(([f, l]) => f >= first2 && l <= last && l - f < last - first2));
|
|
33034
|
+
if (!inner.length)
|
|
33035
|
+
return;
|
|
33036
|
+
const iso4 = /* @__PURE__ */ __name((day2) => new Date(day2).toISOString().slice(0, 10), "iso");
|
|
33037
|
+
return {
|
|
33038
|
+
from: dayBoundary(iso4(inner.reduce((min, [first2]) => Math.min(min, first2), Infinity)), zone, false, SPAN),
|
|
33039
|
+
to: dayBoundary(iso4(inner.reduce((max, [, last]) => Math.max(max, last), -Infinity)), zone, true, SPAN)
|
|
33040
|
+
};
|
|
33041
|
+
}, "questionPeriod");
|
|
33042
|
+
|
|
33043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
32915
33044
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
32916
33045
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
32917
33046
|
const directory2 = imageModelsDirectory(env);
|
|
32918
33047
|
if (!isImageModelInstalled(model, directory2))
|
|
32919
33048
|
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 });
|
|
32920
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33049
|
+
const { openPictureEmbedder } = await import("./embedder-TUQBG22Y.js");
|
|
32921
33050
|
return openPictureEmbedder(model, directory2);
|
|
32922
33051
|
}, "openPictureEmbedderFor");
|
|
32923
33052
|
|
|
32924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
32925
33054
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
32926
33055
|
const metadata = note2.frontMatter;
|
|
32927
33056
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
@@ -32936,7 +33065,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
32936
33065
|
};
|
|
32937
33066
|
}, "documentSource");
|
|
32938
33067
|
|
|
32939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
32940
33069
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
32941
33070
|
const host = new URL(baseUrl).host;
|
|
32942
33071
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -32969,7 +33098,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
32969
33098
|
};
|
|
32970
33099
|
}, "embeddingKeys");
|
|
32971
33100
|
|
|
32972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
32973
33102
|
var options = strictObject({
|
|
32974
33103
|
temperature: range(0, 2),
|
|
32975
33104
|
top_p: range(0, 1),
|
|
@@ -33023,7 +33152,7 @@ var openai = {
|
|
|
33023
33152
|
}), "complete")
|
|
33024
33153
|
};
|
|
33025
33154
|
|
|
33026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
33027
33156
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
33028
33157
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
33029
33158
|
if (deps.signal?.aborted)
|
|
@@ -33038,7 +33167,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
33038
33167
|
if (!adapter && target2.provider === "openai")
|
|
33039
33168
|
adapter = openai;
|
|
33040
33169
|
if (!adapter && target2.provider === "anthropic")
|
|
33041
|
-
adapter = (await import("./anthropic-
|
|
33170
|
+
adapter = (await import("./anthropic-XXKHNCQS.js")).anthropic;
|
|
33042
33171
|
if (!adapter)
|
|
33043
33172
|
throw new CliError("validation_error", `no model adapter for ${target2.provider}`);
|
|
33044
33173
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -33090,7 +33219,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
33090
33219
|
}, "complete")
|
|
33091
33220
|
}), "modelGateway");
|
|
33092
33221
|
|
|
33093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/enrichment-setting.js
|
|
33094
33223
|
var SECTION = "enrichment";
|
|
33095
33224
|
var ENRICHMENT_PROVIDERS = ["openai", "anthropic"];
|
|
33096
33225
|
var DEFAULT_BASE_URLS = {
|
|
@@ -33162,7 +33291,7 @@ var costOf = /* @__PURE__ */ __name((usage, setting) => {
|
|
|
33162
33291
|
return price ? Math.round((usage.input * price.input + usage.output * price.output) * 1e6) / 1e6 : null;
|
|
33163
33292
|
}, "costOf");
|
|
33164
33293
|
|
|
33165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/enrichment.js
|
|
33166
33295
|
var ENRICH_PER_RUN = 600;
|
|
33167
33296
|
var BATCH = 20;
|
|
33168
33297
|
var CONCURRENCY = 4;
|
|
@@ -33409,7 +33538,7 @@ var enrichmentState = /* @__PURE__ */ __name(async (store, env, estimateFor, key
|
|
|
33409
33538
|
};
|
|
33410
33539
|
}, "enrichmentState");
|
|
33411
33540
|
|
|
33412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
33413
33542
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33414
33543
|
let root;
|
|
33415
33544
|
try {
|
|
@@ -33436,7 +33565,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
|
33436
33565
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33437
33566
|
}, "titleTiers");
|
|
33438
33567
|
|
|
33439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
33440
33569
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33441
33570
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33442
33571
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -33774,13 +33903,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
33774
33903
|
meaningSkipped = error.message;
|
|
33775
33904
|
}
|
|
33776
33905
|
}
|
|
33777
|
-
const
|
|
33778
|
-
const titled =
|
|
33779
|
-
text: [titleQuery(
|
|
33906
|
+
const titleWords3 = plainQueryWords(rest);
|
|
33907
|
+
const titled = titleWords3 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
33908
|
+
text: [titleQuery(titleWords3), filter ?? ""].filter(Boolean).join(" AND "),
|
|
33780
33909
|
limit: Math.max(window3, CANDIDATES2),
|
|
33781
33910
|
...scope
|
|
33782
33911
|
});
|
|
33783
|
-
const tier =
|
|
33912
|
+
const tier = titleWords3 === void 0 ? [] : titleTiers(titled.items, titleWords3);
|
|
33784
33913
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
33785
33914
|
const slice = meaning === void 0 && tier.length === 0;
|
|
33786
33915
|
const matched = await searchNotesQuery(store, {
|
|
@@ -33919,7 +34048,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
33919
34048
|
};
|
|
33920
34049
|
}, "searchNotesOf");
|
|
33921
34050
|
|
|
33922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33923
34052
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33924
34053
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
33925
34054
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -34037,7 +34166,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34037
34166
|
};
|
|
34038
34167
|
}, "searchEvents");
|
|
34039
34168
|
|
|
34040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
34041
34170
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
34042
34171
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
34043
34172
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -34068,8 +34197,457 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words4, anyWo
|
|
|
34068
34197
|
};
|
|
34069
34198
|
}, "searchBusiness");
|
|
34070
34199
|
|
|
34071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34072
|
-
var
|
|
34200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
34201
|
+
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
34202
|
+
let before2 = Number.POSITIVE_INFINITY;
|
|
34203
|
+
for (; ; ) {
|
|
34204
|
+
signal?.throwIfAborted();
|
|
34205
|
+
const { indexed, remaining } = await meetings.indexSearch({
|
|
34206
|
+
accountId,
|
|
34207
|
+
limit: 1e3,
|
|
34208
|
+
maxReadBytes: 64 * 1024 ** 2,
|
|
34209
|
+
signal
|
|
34210
|
+
});
|
|
34211
|
+
if (remaining === 0 || indexed === 0 || remaining >= before2)
|
|
34212
|
+
return;
|
|
34213
|
+
before2 = remaining;
|
|
34214
|
+
}
|
|
34215
|
+
}, "refreshMeetingIndex");
|
|
34216
|
+
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
34217
|
+
const { project: project2, tag, topic, ...input } = request;
|
|
34218
|
+
input.signal?.throwIfAborted();
|
|
34219
|
+
if (project2 !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
|
|
34220
|
+
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
34221
|
+
const selection = [];
|
|
34222
|
+
const knowledge = store.knowledge;
|
|
34223
|
+
if (!knowledge && [project2, tag, topic].some((value) => value !== void 0))
|
|
34224
|
+
throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
|
|
34225
|
+
for (const [kind, name] of [
|
|
34226
|
+
["project", project2],
|
|
34227
|
+
["tag", tag],
|
|
34228
|
+
["topic", topic]
|
|
34229
|
+
]) {
|
|
34230
|
+
if (name === void 0)
|
|
34231
|
+
continue;
|
|
34232
|
+
if (!knowledge)
|
|
34233
|
+
continue;
|
|
34234
|
+
const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
|
|
34235
|
+
input.signal?.throwIfAborted();
|
|
34236
|
+
if (found.ambiguous || found.matches.length !== 1)
|
|
34237
|
+
throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
|
|
34238
|
+
candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
|
|
34239
|
+
});
|
|
34240
|
+
const entry = found.matches[0];
|
|
34241
|
+
const id2 = Number(entry?.id);
|
|
34242
|
+
if (!entry || entry.kind !== kind || !Number.isSafeInteger(id2) || id2 < 1)
|
|
34243
|
+
throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
|
|
34244
|
+
if (kind === "project")
|
|
34245
|
+
input.projectId = id2;
|
|
34246
|
+
else
|
|
34247
|
+
input.tagId = id2;
|
|
34248
|
+
selection.push({ kind, id: id2, name: entry.name, by: "explicit-link" });
|
|
34249
|
+
}
|
|
34250
|
+
return { input, selection };
|
|
34251
|
+
}, "resolveMeetingSelection");
|
|
34252
|
+
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options2 = {}) => {
|
|
34253
|
+
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
34254
|
+
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
34255
|
+
if (options2.refreshIndex !== false)
|
|
34256
|
+
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
34257
|
+
const result = await store.meetings.searchHits(lifted.query, input);
|
|
34258
|
+
input.signal?.throwIfAborted();
|
|
34259
|
+
return { ...result, selection };
|
|
34260
|
+
}, "searchMeetingHits");
|
|
34261
|
+
|
|
34262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
34263
|
+
var MOST_HITS_PER_MEETING = 3;
|
|
34264
|
+
var PAGE_ROWS = 200;
|
|
34265
|
+
var MOST_PAGES = 25;
|
|
34266
|
+
var exactly = /* @__PURE__ */ __name((node) => node.kind === "boolean" ? { ...node, clauses: node.clauses.map((clause) => ({ ...clause, node: exactly(clause.node) })) } : node.field === "text" ? { ...node, field: "exact" } : node, "exactly");
|
|
34267
|
+
var positive = /* @__PURE__ */ __name((node) => node.kind === "predicate" || node.clauses.some(({ occur, node: node2 }) => occur !== "must_not" && positive(node2)), "positive");
|
|
34268
|
+
var titleNode = /* @__PURE__ */ __name((node) => {
|
|
34269
|
+
if (node.kind === "boolean") {
|
|
34270
|
+
const clauses = node.clauses.map((clause) => ({ ...clause, node: titleNode(clause.node) }));
|
|
34271
|
+
return clauses.every((clause) => clause.node) ? { ...node, clauses } : void 0;
|
|
34272
|
+
}
|
|
34273
|
+
if (node.field !== "text" && node.field !== "exact" || node.operator !== "term" && node.operator !== "phrase" || node.slop !== void 0)
|
|
34274
|
+
return void 0;
|
|
34275
|
+
const word = node.value.replace(/[\\*?[]/gu, "\\$&");
|
|
34276
|
+
const starting = /* @__PURE__ */ __name((value) => ({ ...node, field: "title", operator: "wildcard", value }), "starting");
|
|
34277
|
+
return {
|
|
34278
|
+
kind: "boolean",
|
|
34279
|
+
span: node.span,
|
|
34280
|
+
clauses: [
|
|
34281
|
+
{ occur: "should", node: starting(`${word}*`) },
|
|
34282
|
+
{ occur: "should", node: starting(`* ${word}*`) }
|
|
34283
|
+
]
|
|
34284
|
+
};
|
|
34285
|
+
}, "titleNode");
|
|
34286
|
+
var everyWord = /* @__PURE__ */ __name((node) => node.kind === "boolean" ? {
|
|
34287
|
+
...node,
|
|
34288
|
+
clauses: node.clauses.map((clause) => clause.occur === "should" ? { ...clause, occur: "must" } : clause)
|
|
34289
|
+
} : node, "everyWord");
|
|
34290
|
+
var titleQuery2 = /* @__PURE__ */ __name((query, input, question) => {
|
|
34291
|
+
if (input.projectId !== void 0 || input.tagId !== void 0 || !positive(query.root))
|
|
34292
|
+
return void 0;
|
|
34293
|
+
const root = titleNode(question ? everyWord(query.root) : query.root);
|
|
34294
|
+
return root && { ...query, root };
|
|
34295
|
+
}, "titleQuery");
|
|
34296
|
+
var titleWords = /* @__PURE__ */ __name((title) => fold(title).match(/[\p{L}\p{N}]+/gu) ?? [], "titleWords");
|
|
34297
|
+
var holdsExactly = /* @__PURE__ */ __name((node, words4) => {
|
|
34298
|
+
if (node.kind === "boolean") {
|
|
34299
|
+
const must = node.clauses.filter(({ occur }) => occur === "must");
|
|
34300
|
+
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
34301
|
+
return must.every((clause) => holdsExactly(clause.node, words4)) && !node.clauses.some(({ occur, node: node2 }) => occur === "must_not" && holdsExactly(node2, words4)) && (must.length > 0 || should.length === 0 || should.some((clause) => holdsExactly(clause.node, words4)));
|
|
34302
|
+
}
|
|
34303
|
+
const wanted = titleWords(node.value);
|
|
34304
|
+
if (node.field !== "exact")
|
|
34305
|
+
return wanted.every((one2) => words4.some((word) => word.startsWith(one2)));
|
|
34306
|
+
return ` ${words4.join(" ")} `.includes(` ${wanted.join(" ")} `);
|
|
34307
|
+
}, "holdsExactly");
|
|
34308
|
+
var sameAccount3 = /* @__PURE__ */ __name((one2, other) => one2.provider === other.provider && one2.account === other.account, "sameAccount");
|
|
34309
|
+
var callerScopes = /* @__PURE__ */ __name(async (all, caller) => {
|
|
34310
|
+
const own = all.find((one2) => sameAccount3(one2, caller));
|
|
34311
|
+
if (own && caller.scope !== void 0 && caller.scope !== own.scope)
|
|
34312
|
+
throw new CliError("not_found", `no ${caller.provider} account ${caller.account} in the store`);
|
|
34313
|
+
const scope = own?.scope ?? caller.scope;
|
|
34314
|
+
return scope === void 0 ? [] : [scope];
|
|
34315
|
+
}, "callerScopes");
|
|
34316
|
+
var meetingLane = /* @__PURE__ */ __name(async (store, caller, request) => {
|
|
34317
|
+
const all = await store.accounts.storedAccounts();
|
|
34318
|
+
const scopes = request.scopes ?? await callerScopes(all, caller);
|
|
34319
|
+
const unknownCaller = request.scopes === void 0 && !all.some((one2) => sameAccount3(one2, caller));
|
|
34320
|
+
const meetings = all.filter((one2) => holdsKind(one2.provider, "meetings"));
|
|
34321
|
+
const stored = meetings.filter((one2) => scopes.includes(one2.scope));
|
|
34322
|
+
const chosen = request.accounts;
|
|
34323
|
+
const read2 = chosen ? stored.filter((one2) => chosen.some((key) => sameAccount3(key, one2))) : stored;
|
|
34324
|
+
const skipped = (chosen ?? []).filter((key) => !read2.some((one2) => sameAccount3(key, one2))).map(({ provider, account }) => {
|
|
34325
|
+
const other = meetings.find((one2) => sameAccount3({ provider, account }, one2));
|
|
34326
|
+
return {
|
|
34327
|
+
source: `${provider}:${account}`,
|
|
34328
|
+
code: "not_found",
|
|
34329
|
+
reason: !other ? "no meetings stored for it" : unknownCaller ? "this account is not in the store yet, so no scope is read" : `a ${other.scope} account; this run reads ${scopes.join(" and ")} accounts`
|
|
34330
|
+
};
|
|
34331
|
+
});
|
|
34332
|
+
const [first2] = read2;
|
|
34333
|
+
if (!first2) {
|
|
34334
|
+
if (!skipped.length && request.asked)
|
|
34335
|
+
skipped.push({
|
|
34336
|
+
resource: "meetings",
|
|
34337
|
+
code: "not_found",
|
|
34338
|
+
reason: !meetings.length ? "no meeting account stored" : unknownCaller ? "this account is not in the store yet" : "no meeting account in this scope"
|
|
34339
|
+
});
|
|
34340
|
+
return { items: [], hasMore: false, read: read2, skipped, coverage: [] };
|
|
34341
|
+
}
|
|
34342
|
+
const lifted = liftMeetingFields(request.text, { accountId: first2.id }, void 0, request.timezone);
|
|
34343
|
+
const parsed = parseMeetingQuery(lifted.query);
|
|
34344
|
+
const query = request.exact ? { ...parsed, root: exactly(parsed.root) } : parsed;
|
|
34345
|
+
const { input } = await resolveMeetingSelection(store, {
|
|
34346
|
+
...lifted.request,
|
|
34347
|
+
...request.signal ? { signal: request.signal } : {}
|
|
34348
|
+
});
|
|
34349
|
+
const lists = [];
|
|
34350
|
+
const coverage2 = [];
|
|
34351
|
+
const answered = [];
|
|
34352
|
+
for (const account of read2) {
|
|
34353
|
+
try {
|
|
34354
|
+
const found = await accountHits(store, account, query, { ...input, accountId: account.id }, request);
|
|
34355
|
+
lists.push(found.ranked);
|
|
34356
|
+
coverage2.push({ provider: account.provider, account: account.account, ...found.coverage });
|
|
34357
|
+
answered.push(account);
|
|
34358
|
+
} catch (error) {
|
|
34359
|
+
if (!(error instanceof CliError) || error.code === "cancelled")
|
|
34360
|
+
throw error;
|
|
34361
|
+
skipped.push({ source: `${account.provider}:${account.account}`, code: error.code, reason: error.message });
|
|
34362
|
+
}
|
|
34363
|
+
}
|
|
34364
|
+
return { items: merged(lists), hasMore: coverage2.some((one2) => one2.hasMore), read: answered, skipped, coverage: coverage2 };
|
|
34365
|
+
}, "meetingLane");
|
|
34366
|
+
var merged = /* @__PURE__ */ __name((lists) => {
|
|
34367
|
+
const heads = lists.map((list3) => ({ list: list3, at: 0 }));
|
|
34368
|
+
const items = [];
|
|
34369
|
+
for (; ; ) {
|
|
34370
|
+
let best;
|
|
34371
|
+
for (const one2 of heads) {
|
|
34372
|
+
const head = one2.list[one2.at];
|
|
34373
|
+
const leader = best?.list[best.at];
|
|
34374
|
+
if (head && (!leader || head.tier < leader.tier || head.tier === leader.tier && head.started > leader.started))
|
|
34375
|
+
best = one2;
|
|
34376
|
+
}
|
|
34377
|
+
const next = best?.list[best.at];
|
|
34378
|
+
if (!best || !next)
|
|
34379
|
+
return items;
|
|
34380
|
+
items.push(next.item);
|
|
34381
|
+
best.at++;
|
|
34382
|
+
}
|
|
34383
|
+
}, "merged");
|
|
34384
|
+
var accountHits = /* @__PURE__ */ __name(async (store, account, query, input, { text: text2, window: window3, signal, question, exact }) => {
|
|
34385
|
+
const ranked = [];
|
|
34386
|
+
const perMeeting = /* @__PURE__ */ new Map();
|
|
34387
|
+
const keep2 = /* @__PURE__ */ __name((one2) => {
|
|
34388
|
+
const seen2 = perMeeting.get(one2.item.meetingId) ?? 0;
|
|
34389
|
+
if (seen2 >= MOST_HITS_PER_MEETING)
|
|
34390
|
+
return false;
|
|
34391
|
+
perMeeting.set(one2.item.meetingId, seen2 + 1);
|
|
34392
|
+
ranked.push(one2);
|
|
34393
|
+
return true;
|
|
34394
|
+
}, "keep");
|
|
34395
|
+
let indexing = "ready";
|
|
34396
|
+
let hasMore = false;
|
|
34397
|
+
let passages = 0;
|
|
34398
|
+
const titles = titleQuery2(query, input, question === true);
|
|
34399
|
+
if (titles) {
|
|
34400
|
+
for (const meeting of await store.meetings.meetings({
|
|
34401
|
+
accountId: account.id,
|
|
34402
|
+
query: titles,
|
|
34403
|
+
...input.since === void 0 ? {} : { since: input.since },
|
|
34404
|
+
...input.until === void 0 ? {} : { until: input.until },
|
|
34405
|
+
limit: window3 + 1
|
|
34406
|
+
}))
|
|
34407
|
+
if (!exact || holdsExactly(query.root, titleWords(meeting.title ?? "")))
|
|
34408
|
+
keep2({ item: titleItem(account, meeting, text2), tier: 1, started: meeting.startedAt ?? 0 });
|
|
34409
|
+
}
|
|
34410
|
+
let after;
|
|
34411
|
+
let rows = Math.min(PAGE_ROWS, window3 + 1);
|
|
34412
|
+
for (let page = 1; ; page++) {
|
|
34413
|
+
let found;
|
|
34414
|
+
try {
|
|
34415
|
+
found = await store.meetings.searchHits(query, {
|
|
34416
|
+
...input,
|
|
34417
|
+
limit: rows,
|
|
34418
|
+
...after === void 0 ? {} : { after }
|
|
34419
|
+
});
|
|
34420
|
+
} catch (error) {
|
|
34421
|
+
if (!(error instanceof CliError) || error.message !== READ_BUDGET_EXCEEDED || rows === 1)
|
|
34422
|
+
throw error;
|
|
34423
|
+
rows = Math.ceil(rows / 2);
|
|
34424
|
+
page--;
|
|
34425
|
+
continue;
|
|
34426
|
+
}
|
|
34427
|
+
signal?.throwIfAborted();
|
|
34428
|
+
if (found.coverage.indexing === "pending")
|
|
34429
|
+
indexing = "pending";
|
|
34430
|
+
for (const hit of found.items)
|
|
34431
|
+
if (keep2({
|
|
34432
|
+
item: meetingItem(account, hit, text2),
|
|
34433
|
+
tier: hit.match === "corrected" ? 2 : 1,
|
|
34434
|
+
started: hit.source?.startedAt ?? 0
|
|
34435
|
+
}))
|
|
34436
|
+
passages++;
|
|
34437
|
+
if (passages > window3 || !found.hasMore || found.nextCursor === null)
|
|
34438
|
+
break;
|
|
34439
|
+
if (page === MOST_PAGES) {
|
|
34440
|
+
hasMore = true;
|
|
34441
|
+
break;
|
|
34442
|
+
}
|
|
34443
|
+
after = found.nextCursor;
|
|
34444
|
+
}
|
|
34445
|
+
ranked.sort((one2, other) => one2.tier - other.tier || other.started - one2.started);
|
|
34446
|
+
return {
|
|
34447
|
+
ranked: ranked.slice(0, window3),
|
|
34448
|
+
coverage: { indexing, hasMore: hasMore || ranked.length > window3 }
|
|
34449
|
+
};
|
|
34450
|
+
}, "accountHits");
|
|
34451
|
+
var meetingItem = /* @__PURE__ */ __name((account, hit, query) => ({
|
|
34452
|
+
kind: "meeting",
|
|
34453
|
+
ref: formatMeetingReference({ type: "meeting", accountId: account.id, meetingId: hit.meetingId }),
|
|
34454
|
+
provider: account.provider,
|
|
34455
|
+
account: account.account,
|
|
34456
|
+
accountId: account.id,
|
|
34457
|
+
title: hit.source?.title ?? null,
|
|
34458
|
+
timestamp: typeof hit.source?.startedAt === "number" ? new Date(hit.source.startedAt).toISOString() : null,
|
|
34459
|
+
// Centred on the words the index matched: another form, a garbled spelling, never a word only under NOT.
|
|
34460
|
+
text: hit.matchedWords?.length ? excerpt(hit.text, hit.matchedWords.join(" "), 240, { literal: true }) : excerpt(hit.text, query),
|
|
34461
|
+
meetingId: hit.meetingId,
|
|
34462
|
+
scope: hit.scope,
|
|
34463
|
+
id: hit.id,
|
|
34464
|
+
startMs: hit.startMs,
|
|
34465
|
+
foundBy: ["words"],
|
|
34466
|
+
...hit.match === "corrected" ? { match: hit.match, corrections: hit.corrections ?? [] } : {},
|
|
34467
|
+
...hit.scope === "transcript" ? {
|
|
34468
|
+
cueRef: hit.ref,
|
|
34469
|
+
speakerName: hit.speakerName ?? null,
|
|
34470
|
+
language: hit.language ?? null,
|
|
34471
|
+
...hit.line === void 0 ? {} : { line: hit.line, linesTotal: hit.linesTotal }
|
|
34472
|
+
} : {}
|
|
34473
|
+
}), "meetingItem");
|
|
34474
|
+
var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
34475
|
+
kind: "meeting",
|
|
34476
|
+
ref: formatMeetingReference({ type: "meeting", accountId: account.id, meetingId: meeting.id }),
|
|
34477
|
+
provider: account.provider,
|
|
34478
|
+
account: account.account,
|
|
34479
|
+
accountId: account.id,
|
|
34480
|
+
title: meeting.title,
|
|
34481
|
+
timestamp: meeting.startedAt === null ? null : new Date(meeting.startedAt).toISOString(),
|
|
34482
|
+
text: excerpt(meeting.title ?? "", query),
|
|
34483
|
+
meetingId: meeting.id,
|
|
34484
|
+
scope: "title",
|
|
34485
|
+
id: meeting.id,
|
|
34486
|
+
startMs: null,
|
|
34487
|
+
foundBy: ["title"]
|
|
34488
|
+
}), "titleItem");
|
|
34489
|
+
|
|
34490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-harder.js
|
|
34491
|
+
var SECTION2 = "search_harder";
|
|
34492
|
+
var HARDER_PROVIDER = "anthropic";
|
|
34493
|
+
var DEFAULT_HARDER_MODEL = "claude-haiku-5-5";
|
|
34494
|
+
var HARDER_ENDPOINT = "https://api.anthropic.com";
|
|
34495
|
+
var HARDER_CANDIDATES = 30;
|
|
34496
|
+
var HARDER_CHARS = 400;
|
|
34497
|
+
var TIMEOUT_MS2 = 5e3;
|
|
34498
|
+
var Setting2 = strictObject({
|
|
34499
|
+
provider: literal(HARDER_PROVIDER),
|
|
34500
|
+
model: pipe(string(), trim(), minLength(1), maxLength(200)),
|
|
34501
|
+
/** When the owner agreed that a `--harder` search sends its question and hits; the setting exists only with it. */
|
|
34502
|
+
consented_at: pipe(string(), isoTimestamp())
|
|
34503
|
+
});
|
|
34504
|
+
var readHarderSetting = /* @__PURE__ */ __name((env) => {
|
|
34505
|
+
const path = enrichmentSettingPath(env);
|
|
34506
|
+
const section = readSharedSection(path, SECTION2);
|
|
34507
|
+
if (section === void 0 || section === null)
|
|
34508
|
+
return void 0;
|
|
34509
|
+
const checked2 = safeParse(Setting2, section);
|
|
34510
|
+
if (!checked2.success)
|
|
34511
|
+
throw new CliError("configuration_error", `${path}: ${SECTION2}.${getDotPath(checked2.issues[0]) ?? "settings"} is invalid \u2014 ${checked2.issues[0].message}`);
|
|
34512
|
+
return checked2.output;
|
|
34513
|
+
}, "readHarderSetting");
|
|
34514
|
+
var writeHarderSetting = /* @__PURE__ */ __name((env, setting) => writeSharedSection(enrichmentSettingPath(env), SECTION2, setting === void 0 ? void 0 : parse(Setting2, setting)), "writeHarderSetting");
|
|
34515
|
+
var PROMPT = "Today is {as_of}. A person searches their own archive of messages, mails, notes, calendar entries and phone records with the question below. Here are {n} candidate records, numbered, in the data.\n\nQuestion: {question}\n\nWhich records help answer the question? List their numbers, most useful first, at most ten; an empty list if none does.";
|
|
34516
|
+
var FORMAT = {
|
|
34517
|
+
type: "json_schema",
|
|
34518
|
+
schema: {
|
|
34519
|
+
type: "object",
|
|
34520
|
+
properties: { records: { type: "array", items: { type: "integer" } } },
|
|
34521
|
+
required: ["records"],
|
|
34522
|
+
additionalProperties: false
|
|
34523
|
+
}
|
|
34524
|
+
};
|
|
34525
|
+
var Reply2 = object({ records: array(pipe(number(), integer())) });
|
|
34526
|
+
var recordLine = /* @__PURE__ */ __name((hit, i) => `[${i}] (${hit.timestamp?.slice(0, 10) ?? "undated"}) ${`${hit.title ? `${hit.title}
|
|
34527
|
+
` : ""}${hit.text.slice(0, HARDER_CHARS)}`.replace(/\s*\n\s*/g, " ")}`, "recordLine");
|
|
34528
|
+
var REASON_TEXT2 = {
|
|
34529
|
+
"harder.no-consent": "the owner has not agreed to send searches to a hosted model",
|
|
34530
|
+
"harder.no-key": "no Anthropic key",
|
|
34531
|
+
"harder.bad-setting": "the search_harder setting cannot be read; nothing was sent",
|
|
34532
|
+
"harder.later-page": "--harder reorders the first page only; nothing was sent",
|
|
34533
|
+
"harder.too-few": "fewer than two hits to reorder; nothing was sent",
|
|
34534
|
+
"harder.timeout": `the model did not answer within ${TIMEOUT_MS2 / 1e3} s`,
|
|
34535
|
+
"harder.key-rejected": "the provider refused the key",
|
|
34536
|
+
"harder.unreachable": "the provider could not be reached",
|
|
34537
|
+
"harder.rate-limited": "the provider's rate limit was reached",
|
|
34538
|
+
"harder.bad-reply": "the model's answer could not be read",
|
|
34539
|
+
"harder.error": "the provider failed"
|
|
34540
|
+
};
|
|
34541
|
+
var reasonOf = /* @__PURE__ */ __name((error, timedOut) => {
|
|
34542
|
+
if (timedOut)
|
|
34543
|
+
return "harder.timeout";
|
|
34544
|
+
if (!(error instanceof CliError))
|
|
34545
|
+
return "harder.bad-reply";
|
|
34546
|
+
if (error.details.reason === "model.key-rejected")
|
|
34547
|
+
return "harder.key-rejected";
|
|
34548
|
+
if (error.details.reason === "model.unreachable")
|
|
34549
|
+
return "harder.unreachable";
|
|
34550
|
+
if (error.code === "rate_limited")
|
|
34551
|
+
return "harder.rate-limited";
|
|
34552
|
+
return "harder.error";
|
|
34553
|
+
}, "reasonOf");
|
|
34554
|
+
var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { env, now, command, laterPage, ...options2 }) => {
|
|
34555
|
+
const started = Date.now();
|
|
34556
|
+
let setting;
|
|
34557
|
+
let unreadable;
|
|
34558
|
+
try {
|
|
34559
|
+
setting = readHarderSetting(env);
|
|
34560
|
+
} catch (error) {
|
|
34561
|
+
unreadable = error instanceof CliError ? error.message : REASON_TEXT2["harder.bad-setting"];
|
|
34562
|
+
}
|
|
34563
|
+
const model = setting?.model ?? DEFAULT_HARDER_MODEL;
|
|
34564
|
+
const plain2 = /* @__PURE__ */ __name((reason_id, extra = {}, reason = REASON_TEXT2[reason_id]) => ({
|
|
34565
|
+
items: [...hits],
|
|
34566
|
+
harder: {
|
|
34567
|
+
applied: false,
|
|
34568
|
+
provider: HARDER_PROVIDER,
|
|
34569
|
+
model,
|
|
34570
|
+
sent: 0,
|
|
34571
|
+
cost_usd: 0,
|
|
34572
|
+
ms: Date.now() - started,
|
|
34573
|
+
...extra,
|
|
34574
|
+
reason,
|
|
34575
|
+
reason_id
|
|
34576
|
+
}
|
|
34577
|
+
}), "plain");
|
|
34578
|
+
if (laterPage)
|
|
34579
|
+
return plain2("harder.later-page");
|
|
34580
|
+
if (unreadable !== void 0)
|
|
34581
|
+
return plain2("harder.bad-setting", {}, `${unreadable}; nothing was sent`);
|
|
34582
|
+
const tool = command ?? "memo";
|
|
34583
|
+
if (!setting)
|
|
34584
|
+
return plain2("harder.no-consent", {}, `${REASON_TEXT2["harder.no-consent"]}: \`${tool} models search-consents set anthropic --yes\`; nothing was sent`);
|
|
34585
|
+
let apiKey;
|
|
34586
|
+
try {
|
|
34587
|
+
apiKey = keyLookup({ env, ...options2 }, { provider: HARDER_PROVIDER })?.key;
|
|
34588
|
+
} catch {
|
|
34589
|
+
return plain2("harder.error", {}, "the Anthropic key could not be read; nothing was sent");
|
|
34590
|
+
}
|
|
34591
|
+
if (apiKey === void 0)
|
|
34592
|
+
return plain2("harder.no-key", {}, `no Anthropic key: \`${tool} models keys set anthropic\` or set ${keyVariable(HARDER_PROVIDER)}; nothing was sent`);
|
|
34593
|
+
const candidates = hits.slice(0, HARDER_CANDIDATES);
|
|
34594
|
+
if (candidates.length < 2)
|
|
34595
|
+
return plain2("harder.too-few");
|
|
34596
|
+
const limit = new AbortController();
|
|
34597
|
+
const timer = setTimeout(() => limit.abort(), options2.timeoutMs ?? TIMEOUT_MS2);
|
|
34598
|
+
const gateway = modelGateway({
|
|
34599
|
+
resolve: /* @__PURE__ */ __name(() => ({ provider: HARDER_PROVIDER, model: setting.model, baseUrl: HARDER_ENDPOINT }), "resolve"),
|
|
34600
|
+
consent: /* @__PURE__ */ __name((_request, chosen) => chosen.provider === HARDER_PROVIDER && chosen.baseUrl === HARDER_ENDPOINT, "consent"),
|
|
34601
|
+
key: /* @__PURE__ */ __name(() => apiKey, "key"),
|
|
34602
|
+
signal: limit.signal,
|
|
34603
|
+
...options2.adapters ? { adapters: options2.adapters } : {},
|
|
34604
|
+
...options2.fetch ? { fetch: options2.fetch } : {}
|
|
34605
|
+
});
|
|
34606
|
+
const sent = { sent: candidates.length };
|
|
34607
|
+
try {
|
|
34608
|
+
const answer = await gateway.complete({
|
|
34609
|
+
purpose: "search-harder",
|
|
34610
|
+
prompt: PROMPT.replace("{as_of}", new Date(now).toISOString().slice(0, 10)).replace("{n}", String(candidates.length)).replace("{question}", question),
|
|
34611
|
+
data: candidates.map(recordLine).join("\n"),
|
|
34612
|
+
maxTokens: 300,
|
|
34613
|
+
options: { thinking: { type: "disabled" }, output_config: { effort: "low", format: FORMAT } }
|
|
34614
|
+
});
|
|
34615
|
+
const cost = costOf(answer.usage ?? { input: answer.tokens, output: 0 }, {
|
|
34616
|
+
provider: HARDER_PROVIDER,
|
|
34617
|
+
model: setting.model
|
|
34618
|
+
});
|
|
34619
|
+
let picked;
|
|
34620
|
+
try {
|
|
34621
|
+
picked = parse(Reply2, JSON.parse(answer.text)).records;
|
|
34622
|
+
} catch {
|
|
34623
|
+
return plain2("harder.bad-reply", { ...sent, cost_usd: cost });
|
|
34624
|
+
}
|
|
34625
|
+
const first2 = [...new Set(picked.filter((i) => i >= 0 && i < candidates.length))];
|
|
34626
|
+
const chosen = new Set(first2);
|
|
34627
|
+
return {
|
|
34628
|
+
items: [
|
|
34629
|
+
...first2.map((i) => candidates[i]),
|
|
34630
|
+
...candidates.filter((_, i) => !chosen.has(i)),
|
|
34631
|
+
...hits.slice(HARDER_CANDIDATES)
|
|
34632
|
+
],
|
|
34633
|
+
harder: {
|
|
34634
|
+
applied: true,
|
|
34635
|
+
provider: HARDER_PROVIDER,
|
|
34636
|
+
model: setting.model,
|
|
34637
|
+
...sent,
|
|
34638
|
+
cost_usd: cost,
|
|
34639
|
+
ms: Date.now() - started
|
|
34640
|
+
}
|
|
34641
|
+
};
|
|
34642
|
+
} catch (error) {
|
|
34643
|
+
return plain2(reasonOf(error, limit.signal.aborted), { ...sent, cost_usd: null });
|
|
34644
|
+
} finally {
|
|
34645
|
+
clearTimeout(timer);
|
|
34646
|
+
}
|
|
34647
|
+
}, "reorderHarder");
|
|
34648
|
+
|
|
34649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34650
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm", "business", "meetings"];
|
|
34073
34651
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
34074
34652
|
const { reason, span } = error.details ?? {};
|
|
34075
34653
|
const why = typeof reason === "string" ? reason : void 0;
|
|
@@ -34083,7 +34661,7 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
34083
34661
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34084
34662
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
34085
34663
|
}, "filtersBeside");
|
|
34086
|
-
var
|
|
34664
|
+
var titleWords2 = /* @__PURE__ */ __name((text2, refused = "deals and leads are found by the words of their title only") => {
|
|
34087
34665
|
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
34088
34666
|
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34089
34667
|
const words4 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
@@ -34096,7 +34674,7 @@ var titleWords = /* @__PURE__ */ __name((text2, refused = "deals and leads are f
|
|
|
34096
34674
|
}, "titleWords");
|
|
34097
34675
|
var strictWords = /* @__PURE__ */ __name((text2) => {
|
|
34098
34676
|
try {
|
|
34099
|
-
const { words: words4, anyWord } =
|
|
34677
|
+
const { words: words4, anyWord } = titleWords2(text2);
|
|
34100
34678
|
const unique = [...new Set(words4)];
|
|
34101
34679
|
return anyWord || unique.length < 2 || unique.length > 8 || unique.some((word) => /\s/u.test(word)) ? [] : unique;
|
|
34102
34680
|
} catch (error) {
|
|
@@ -34105,6 +34683,20 @@ var strictWords = /* @__PURE__ */ __name((text2) => {
|
|
|
34105
34683
|
throw error;
|
|
34106
34684
|
}
|
|
34107
34685
|
}, "strictWords");
|
|
34686
|
+
var accountKeyOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "accountKeyOf");
|
|
34687
|
+
var sourceScope = /* @__PURE__ */ __name(async (store, account, source, asked, messenger) => {
|
|
34688
|
+
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
34689
|
+
const imported = asked.includes("business") ? new Set((await store.business.accounts()).map(accountKeyOf)) : /* @__PURE__ */ new Set();
|
|
34690
|
+
const holdsBusiness = /* @__PURE__ */ __name((one2) => imported.has(accountKeyOf(one2)), "holdsBusiness");
|
|
34691
|
+
const { skipped } = fitting(entries, asked.filter((one2) => one2 !== "business"), "search all", (kind) => `--only leaves ${kind} out`, holdsBusiness);
|
|
34692
|
+
const named4 = /* @__PURE__ */ __name((resource) => [
|
|
34693
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one2) => resource === "business" ? holdsBusiness(one2) : listedHolds(one2, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
34694
|
+
], "named");
|
|
34695
|
+
const scope = Object.fromEntries(asked.map((resource) => [resource, named4(resource)]));
|
|
34696
|
+
const only = asked.filter((resource) => scope[resource]?.length);
|
|
34697
|
+
const unnamed = asked.filter((resource) => !only.includes(resource)).map((resource) => ({ resource, code: "not_found", reason: `--source names no ${resource} account` }));
|
|
34698
|
+
return { only, scope, skipped: [...skipped, ...unnamed] };
|
|
34699
|
+
}, "sourceScope");
|
|
34108
34700
|
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm")), "crmAccounts");
|
|
34109
34701
|
var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger = {}, searchMessages = (query) => searchStore(store, account, query, messenger), meaning) => {
|
|
34110
34702
|
if (!asked.text.trim())
|
|
@@ -34113,13 +34705,16 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34113
34705
|
const offset = request.offset ?? 0;
|
|
34114
34706
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
34115
34707
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
34708
|
+
const period = questionPeriod(request.text, request.now ?? Date.now(), timezoneOf(request.timezone));
|
|
34116
34709
|
const window3 = offset + request.limit;
|
|
34117
|
-
const
|
|
34710
|
+
const depth = Math.max(window3, period ? PERIOD_DEPTH : 0, request.harder ? HARDER_CANDIDATES : 0);
|
|
34711
|
+
const chosen = request.source === void 0 ? { only: request.only ?? RESOURCES_SEARCHED, scope: request.scope, skipped: [] } : await sourceScope(store, account, request.source, request.only ?? RESOURCES_SEARCHED, messenger);
|
|
34712
|
+
const { only, scope } = chosen;
|
|
34118
34713
|
const command = messenger.hintCommand === void 0 ? messenger.app?.command : messenger.hintCommand ?? void 0;
|
|
34119
34714
|
const lists = [];
|
|
34120
34715
|
const searched = [];
|
|
34121
34716
|
const accounts = [];
|
|
34122
|
-
const skipped = [];
|
|
34717
|
+
const skipped = [...chosen.skipped];
|
|
34123
34718
|
let hasMore = false;
|
|
34124
34719
|
let notes;
|
|
34125
34720
|
let events;
|
|
@@ -34128,8 +34723,9 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34128
34723
|
const discover = !request.exact && questionLookup(request.text) !== void 0;
|
|
34129
34724
|
const cosines = /* @__PURE__ */ new Map();
|
|
34130
34725
|
let coverage2;
|
|
34726
|
+
let meetings;
|
|
34131
34727
|
const messagesOf = /* @__PURE__ */ __name(async (kind) => {
|
|
34132
|
-
const given =
|
|
34728
|
+
const given = scope?.[kind];
|
|
34133
34729
|
const discovers = discover && (kind === "mail" || request.backend !== "server");
|
|
34134
34730
|
const query = {
|
|
34135
34731
|
text: request.text,
|
|
@@ -34141,7 +34737,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34141
34737
|
...request.backend === void 0 ? {} : { backend: request.backend },
|
|
34142
34738
|
...request.server === void 0 ? {} : { server: request.server }
|
|
34143
34739
|
} : {},
|
|
34144
|
-
limit:
|
|
34740
|
+
limit: depth,
|
|
34145
34741
|
...request.exact ? { exact: true } : {},
|
|
34146
34742
|
...discovers ? { discover: true } : {},
|
|
34147
34743
|
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
@@ -34213,12 +34809,12 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34213
34809
|
for (const resource of only) {
|
|
34214
34810
|
try {
|
|
34215
34811
|
if (resource === "notes") {
|
|
34216
|
-
const
|
|
34812
|
+
const chosen2 = scope?.notes;
|
|
34217
34813
|
const found = await searchNotes(store, request.text, {
|
|
34218
|
-
limit:
|
|
34814
|
+
limit: depth,
|
|
34219
34815
|
command,
|
|
34220
34816
|
embedders,
|
|
34221
|
-
...
|
|
34817
|
+
...chosen2 === void 0 ? {} : notesScopeOf(chosen2),
|
|
34222
34818
|
...request.exact ? { exact: true } : {},
|
|
34223
34819
|
...discover ? { discover: true } : {},
|
|
34224
34820
|
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
@@ -34243,7 +34839,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34243
34839
|
text: hit.excerpt,
|
|
34244
34840
|
foundBy: hit.found_by
|
|
34245
34841
|
})));
|
|
34246
|
-
const read2 =
|
|
34842
|
+
const read2 = chosen2?.map(({ account: account2 }) => account2) ?? [
|
|
34247
34843
|
INTERNAL_NOTES,
|
|
34248
34844
|
...(await store.notes.folders()).map(({ id: id2 }) => id2),
|
|
34249
34845
|
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2),
|
|
@@ -34251,11 +34847,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34251
34847
|
];
|
|
34252
34848
|
accounts.push(...read2.map((account2) => ({ resource, provider: "notes", account: account2 })));
|
|
34253
34849
|
} else if (resource === "events") {
|
|
34254
|
-
const read2 =
|
|
34850
|
+
const read2 = scope?.events ?? await calendarAccounts(store);
|
|
34255
34851
|
if (!read2.length)
|
|
34256
34852
|
continue;
|
|
34257
34853
|
const found = await searchEvents(store, request.text, {
|
|
34258
|
-
limit:
|
|
34854
|
+
limit: depth,
|
|
34259
34855
|
accounts: read2,
|
|
34260
34856
|
embedders,
|
|
34261
34857
|
...command === void 0 ? {} : { command },
|
|
@@ -34286,17 +34882,17 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34286
34882
|
})));
|
|
34287
34883
|
accounts.push(...read2.map(({ provider, account: account2 }) => ({ resource, provider, account: account2 })));
|
|
34288
34884
|
} else if (resource === "crm") {
|
|
34289
|
-
const { words: words4, anyWord } =
|
|
34290
|
-
const
|
|
34885
|
+
const { words: words4, anyWord } = titleWords2(request.text);
|
|
34886
|
+
const chosen2 = scope?.crm;
|
|
34291
34887
|
const found = await store.deals.find({
|
|
34292
34888
|
words: words4,
|
|
34293
34889
|
anyWord: anyWord || discover,
|
|
34294
34890
|
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
34295
|
-
limit: Math.min(
|
|
34296
|
-
...
|
|
34891
|
+
limit: Math.min(depth + 1, 500),
|
|
34892
|
+
...chosen2 === void 0 ? {} : { accounts: chosen2 }
|
|
34297
34893
|
});
|
|
34298
|
-
hasMore ||= found.length >
|
|
34299
|
-
lists.push(found.slice(0,
|
|
34894
|
+
hasMore ||= found.length > depth;
|
|
34895
|
+
lists.push(found.slice(0, depth).map((deal) => ({
|
|
34300
34896
|
kind: deal.kind,
|
|
34301
34897
|
ref: deal.ref,
|
|
34302
34898
|
provider: deal.account?.provider ?? "crm",
|
|
@@ -34306,18 +34902,40 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34306
34902
|
text: deal.summary,
|
|
34307
34903
|
foundBy: ["title"]
|
|
34308
34904
|
})));
|
|
34309
|
-
const read2 =
|
|
34905
|
+
const read2 = chosen2 ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
34310
34906
|
for (const { provider, account: account2 } of read2)
|
|
34311
34907
|
accounts.push({ resource, provider, account: account2 });
|
|
34312
34908
|
} else if (resource === "business") {
|
|
34313
|
-
const { words: words4, anyWord } =
|
|
34909
|
+
const { words: words4, anyWord } = titleWords2(request.text, BUSINESS_WORDS_ONLY);
|
|
34314
34910
|
const found = await searchBusiness(store, {
|
|
34315
34911
|
words: words4,
|
|
34316
34912
|
anyWord: anyWord || discover,
|
|
34317
|
-
window:
|
|
34318
|
-
accounts:
|
|
34913
|
+
window: depth,
|
|
34914
|
+
accounts: scope?.business
|
|
34915
|
+
});
|
|
34916
|
+
hasMore ||= found.hasMore;
|
|
34917
|
+
lists.push(found.items);
|
|
34918
|
+
for (const { provider, account: account2 } of found.read)
|
|
34919
|
+
accounts.push({ resource, provider, account: account2 });
|
|
34920
|
+
} else if (resource === "meetings") {
|
|
34921
|
+
const found = await meetingLane(store, account, {
|
|
34922
|
+
// A question finds passages that hold some of its words, as every other source does.
|
|
34923
|
+
text: (discover ? questionLookup(request.text) : void 0) ?? request.text,
|
|
34924
|
+
...discover ? { question: true } : {},
|
|
34925
|
+
window: depth,
|
|
34926
|
+
...scope?.meetings === void 0 ? {} : { accounts: scope.meetings },
|
|
34927
|
+
...request.meetingScopes === void 0 ? {} : { scopes: request.meetingScopes },
|
|
34928
|
+
...request.meetingsAsked ? { asked: true } : {},
|
|
34929
|
+
...request.exact ? { exact: true } : {},
|
|
34930
|
+
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
34931
|
+
...request.signal === void 0 ? {} : { signal: request.signal }
|
|
34319
34932
|
});
|
|
34933
|
+
for (const one2 of found.skipped)
|
|
34934
|
+
skipped.push(one2);
|
|
34935
|
+
if (!found.read.length)
|
|
34936
|
+
continue;
|
|
34320
34937
|
hasMore ||= found.hasMore;
|
|
34938
|
+
meetings = found.coverage;
|
|
34321
34939
|
lists.push(found.items);
|
|
34322
34940
|
for (const { provider, account: account2 } of found.read)
|
|
34323
34941
|
accounts.push({ resource, provider, account: account2 });
|
|
@@ -34333,9 +34951,21 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34333
34951
|
} finally {
|
|
34334
34952
|
await embedders.close();
|
|
34335
34953
|
}
|
|
34336
|
-
|
|
34954
|
+
let ordered = insidePeriodFirst(oneList(lists, cosines), period);
|
|
34955
|
+
let harder;
|
|
34956
|
+
if (request.harder) {
|
|
34957
|
+
const asking = {
|
|
34958
|
+
...request.harder,
|
|
34959
|
+
env: request.env ?? process.env,
|
|
34960
|
+
now: request.now ?? Date.now(),
|
|
34961
|
+
...command === void 0 ? {} : { command }
|
|
34962
|
+
};
|
|
34963
|
+
const done2 = await reorderHarder(request.text, ordered, { ...asking, laterPage: offset > 0 });
|
|
34964
|
+
ordered = done2.items;
|
|
34965
|
+
harder = done2.harder;
|
|
34966
|
+
}
|
|
34337
34967
|
const more = hasMore || ordered.length > window3;
|
|
34338
|
-
const { backend: _backend, server: _server, ...local } = asked;
|
|
34968
|
+
const { backend: _backend, server: _server, harder: _harder, ...local } = asked;
|
|
34339
34969
|
const unmatched = [];
|
|
34340
34970
|
if (!ordered.length && !offset && !discover)
|
|
34341
34971
|
for (const word of strictWords(request.text)) {
|
|
@@ -34357,283 +34987,40 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34357
34987
|
...by.mail === void 0 ? {} : { mail: by.mail },
|
|
34358
34988
|
...server === void 0 ? {} : { server },
|
|
34359
34989
|
...coverage2 === void 0 ? {} : { coverage: coverage2 },
|
|
34360
|
-
...unmatched.length ? { unmatched } : {}
|
|
34990
|
+
...unmatched.length ? { unmatched } : {},
|
|
34991
|
+
...meetings === void 0 ? {} : { meetings },
|
|
34992
|
+
...harder === void 0 ? {} : { harder }
|
|
34361
34993
|
};
|
|
34362
34994
|
}, "searchAll");
|
|
34995
|
+
var hitKey = /* @__PURE__ */ __name((item2) => item2.kind === "meeting" ? `${item2.ref}\0${item2.scope}\0${item2.id}` : item2.ref, "hitKey");
|
|
34363
34996
|
var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
34364
34997
|
const place = /* @__PURE__ */ new Map();
|
|
34365
34998
|
for (const list3 of lists) {
|
|
34366
34999
|
let above = Number.NEGATIVE_INFINITY;
|
|
34367
35000
|
list3.forEach((item2, rank) => {
|
|
35001
|
+
const key = hitKey(item2);
|
|
34368
35002
|
above = cosines.get(item2.ref) ?? above;
|
|
34369
|
-
const held = place.get(
|
|
35003
|
+
const held = place.get(key);
|
|
34370
35004
|
if (!held || rank < held.rank)
|
|
34371
|
-
place.set(
|
|
35005
|
+
place.set(key, { item: item2, rank, cosine: above });
|
|
34372
35006
|
});
|
|
34373
35007
|
}
|
|
34374
35008
|
const head = /* @__PURE__ */ __name((rank) => Math.min(rank, 1), "head");
|
|
34375
35009
|
return [...place.values()].sort((a, b) => head(a.rank) - head(b.rank) || b.cosine - a.cosine || a.rank - b.rank).map(({ item: item2 }) => item2);
|
|
34376
35010
|
}, "oneList");
|
|
34377
|
-
|
|
34378
|
-
|
|
34379
|
-
var
|
|
34380
|
-
|
|
34381
|
-
|
|
34382
|
-
|
|
34383
|
-
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
|
|
34387
|
-
|
|
34388
|
-
|
|
34389
|
-
|
|
34390
|
-
if (exact)
|
|
34391
|
-
return { reason: "meetings use word prefixes and cannot answer --exact" };
|
|
34392
|
-
try {
|
|
34393
|
-
const terms = [];
|
|
34394
|
-
const supported = /* @__PURE__ */ __name((node) => {
|
|
34395
|
-
if (node.kind === "boolean")
|
|
34396
|
-
return node.clauses.every(({ occur, node: node2 }) => occur === "must" && supported(node2));
|
|
34397
|
-
if (node.field !== "text" || node.operator !== "term" || !/^[\p{L}\p{N}]+$/u.test(node.value))
|
|
34398
|
-
return false;
|
|
34399
|
-
terms.push(node.value);
|
|
34400
|
-
return true;
|
|
34401
|
-
}, "supported");
|
|
34402
|
-
if (!supported(parseLucene(text2, SEARCH_QUERY).root) || !terms.length)
|
|
34403
|
-
return {
|
|
34404
|
-
reason: "meetings support letter/digit words joined by AND; phrases, OR/NOT, patterns and filters are unsupported"
|
|
34405
|
-
};
|
|
34406
|
-
return { query: terms.join(" ") };
|
|
34407
|
-
} catch (error) {
|
|
34408
|
-
if (codeOf(error) !== "validation_error")
|
|
34409
|
-
throw error;
|
|
34410
|
-
return { reason: error instanceof Error ? error.message : "invalid meeting search query" };
|
|
34411
|
-
}
|
|
34412
|
-
}, "meetingQuery");
|
|
34413
|
-
var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, query) => {
|
|
34414
|
-
cancelled3(request.signal);
|
|
34415
|
-
const selected = await store.accounts.storedAccount(account);
|
|
34416
|
-
cancelled3(request.signal);
|
|
34417
|
-
whole2(selected.id, 1, Number.MAX_SAFE_INTEGER, "meeting account id");
|
|
34418
|
-
if (account.scope !== void 0 && selected.scope !== account.scope)
|
|
34419
|
-
throw new CliError("not_found", "the selected meeting account has a different scope");
|
|
34420
|
-
const cursor = request.meetingCursor;
|
|
34421
|
-
if (cursor && (cursor.accountId !== selected.id || cursor.query !== query))
|
|
34422
|
-
throw new CliError("validation_error", "meeting cursor belongs to a different account or query");
|
|
34423
|
-
let meetingOffset = cursor?.meetingOffset ?? 0;
|
|
34424
|
-
let hitOffset = cursor?.hitOffset ?? 0;
|
|
34425
|
-
const position = /* @__PURE__ */ __name(() => ({ accountId: selected.id, query, meetingOffset, hitOffset }), "position");
|
|
34426
|
-
const collected = {
|
|
34427
|
-
items: [],
|
|
34428
|
-
coverage: { accountId: selected.id, by: "word-prefixes", meetingsScanned: 0, complete: false },
|
|
34429
|
-
after: position()
|
|
34430
|
-
};
|
|
34431
|
-
const seen2 = /* @__PURE__ */ new Set();
|
|
34432
|
-
const most = request.maxMeetings === "all" ? Number.POSITIVE_INFINITY : request.maxMeetings ?? 100;
|
|
34433
|
-
while (collected.coverage.meetingsScanned < most) {
|
|
34434
|
-
cancelled3(request.signal);
|
|
34435
|
-
const page = await store.meetings.meetings({ accountId: selected.id, limit: 2, offset: meetingOffset });
|
|
34436
|
-
cancelled3(request.signal);
|
|
34437
|
-
const meeting = page[0];
|
|
34438
|
-
if (!meeting) {
|
|
34439
|
-
collected.coverage.complete = true;
|
|
34440
|
-
break;
|
|
34441
|
-
}
|
|
34442
|
-
const hits = await store.meetings.search(query, { accountId: selected.id, limit: 1, offset: meetingOffset });
|
|
34443
|
-
cancelled3(request.signal);
|
|
34444
|
-
if (meeting.accountId !== selected.id || meeting.deletedAt !== null || hits.some((hit) => hit.meetingId !== meeting.id))
|
|
34445
|
-
throw new CliError("validation_error", "meeting archive changed during search; restart from the first page", {
|
|
34446
|
-
complete: false
|
|
34447
|
-
});
|
|
34448
|
-
if (hitOffset > hits.length)
|
|
34449
|
-
throw new CliError("validation_error", "meeting cursor is past the current hit list; restart from the first page");
|
|
34450
|
-
collected.coverage.meetingsScanned++;
|
|
34451
|
-
for (; hitOffset < hits.length; hitOffset++) {
|
|
34452
|
-
const hit = hits[hitOffset];
|
|
34453
|
-
const key = JSON.stringify([selected.id, hit.meetingId, hit.scope, hit.id]);
|
|
34454
|
-
if (seen2.has(key))
|
|
34455
|
-
continue;
|
|
34456
|
-
seen2.add(key);
|
|
34457
|
-
collected.items.push({
|
|
34458
|
-
before: position(),
|
|
34459
|
-
item: {
|
|
34460
|
-
kind: "meeting",
|
|
34461
|
-
ref: formatMeetingReference({ type: "meeting", accountId: selected.id, meetingId: hit.meetingId }),
|
|
34462
|
-
provider: selected.provider,
|
|
34463
|
-
account: selected.account,
|
|
34464
|
-
accountId: selected.id,
|
|
34465
|
-
title: meeting.title,
|
|
34466
|
-
timestamp: meeting.startedAt === null ? null : new Date(meeting.startedAt).toISOString(),
|
|
34467
|
-
text: hit.text.slice(0, 2e3),
|
|
34468
|
-
meetingId: hit.meetingId,
|
|
34469
|
-
scope: hit.scope,
|
|
34470
|
-
id: hit.id,
|
|
34471
|
-
startMs: hit.startMs,
|
|
34472
|
-
...hit.scope === "transcript" && hit.ref !== void 0 ? {
|
|
34473
|
-
cueRef: hit.ref,
|
|
34474
|
-
speakerName: hit.speakerName ?? null,
|
|
34475
|
-
language: hit.language ?? null,
|
|
34476
|
-
...hit.line === void 0 ? {} : { line: hit.line, linesTotal: hit.linesTotal }
|
|
34477
|
-
} : {}
|
|
34478
|
-
}
|
|
34479
|
-
});
|
|
34480
|
-
if (collected.items.length > request.limit) {
|
|
34481
|
-
hitOffset++;
|
|
34482
|
-
break;
|
|
34483
|
-
}
|
|
34484
|
-
}
|
|
34485
|
-
if (hitOffset === hits.length) {
|
|
34486
|
-
meetingOffset++;
|
|
34487
|
-
hitOffset = 0;
|
|
34488
|
-
if (page.length < 2)
|
|
34489
|
-
collected.coverage.complete = true;
|
|
34490
|
-
}
|
|
34491
|
-
collected.after = position();
|
|
34492
|
-
if (collected.coverage.complete || collected.items.length > request.limit)
|
|
34493
|
-
break;
|
|
34494
|
-
}
|
|
34495
|
-
return collected;
|
|
34496
|
-
}, "collectMeetings");
|
|
34497
|
-
var searchAllIncludingMeetings = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, searchMessages, meaning) => {
|
|
34498
|
-
whole2(request.limit, 1, 1e3, "limit");
|
|
34499
|
-
if (request.maxMeetings !== "all")
|
|
34500
|
-
whole2(request.maxMeetings ?? 100, 1, Number.MAX_SAFE_INTEGER, "maxMeetings");
|
|
34501
|
-
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
34502
|
-
if (!only.length || only.some((resource) => !RESOURCES_SEARCHED_WITH_MEETINGS.includes(resource)))
|
|
34503
|
-
throw new CliError("validation_error", "only takes messages, mail, notes, events and meetings");
|
|
34504
|
-
if (request.meetingCursor) {
|
|
34505
|
-
if (only.length !== 1 || only[0] !== "meetings")
|
|
34506
|
-
throw new CliError("validation_error", "meeting cursor requires only: [meetings]");
|
|
34507
|
-
whole2(request.meetingCursor.accountId, 1, Number.MAX_SAFE_INTEGER, "cursor account id");
|
|
34508
|
-
whole2(request.meetingCursor.meetingOffset, 0, Number.MAX_SAFE_INTEGER - 2, "cursor meeting offset");
|
|
34509
|
-
whole2(request.meetingCursor.hitOffset, 0, Number.MAX_SAFE_INTEGER, "cursor hit offset");
|
|
34510
|
-
}
|
|
34511
|
-
cancelled3(request.signal);
|
|
34512
|
-
const others = { ...request, only: only.filter((one2) => one2 !== "meetings") };
|
|
34513
|
-
if (!only.includes("meetings")) {
|
|
34514
|
-
const found = await searchAll(store, account, others, messenger, searchMessages, meaning);
|
|
34515
|
-
cancelled3(request.signal);
|
|
34516
|
-
return found;
|
|
34517
|
-
}
|
|
34518
|
-
const offset = request.offset ?? 0;
|
|
34519
|
-
const window3 = offset + request.limit;
|
|
34520
|
-
const legacy = await searchAll(store, account, { ...others, offset: 0, limit: window3 }, messenger, searchMessages, meaning);
|
|
34521
|
-
cancelled3(request.signal);
|
|
34522
|
-
const compiled = meetingQuery(request.text, request.exact);
|
|
34523
|
-
if ("reason" in compiled)
|
|
34524
|
-
return {
|
|
34525
|
-
...legacy,
|
|
34526
|
-
items: legacy.items.slice(offset),
|
|
34527
|
-
skipped: [...legacy.skipped, { resource: "meetings", code: "validation_error", reason: compiled.reason }]
|
|
34528
|
-
};
|
|
34529
|
-
let meetings;
|
|
34530
|
-
const meetingAccount = request.meetingAccount ?? account;
|
|
34531
|
-
try {
|
|
34532
|
-
meetings = await collectMeetings(store, meetingAccount, { ...request, limit: window3 }, compiled.query);
|
|
34533
|
-
} catch (error) {
|
|
34534
|
-
if (codeOf(error) !== "not_found")
|
|
34535
|
-
throw error;
|
|
34536
|
-
return {
|
|
34537
|
-
...legacy,
|
|
34538
|
-
items: legacy.items.slice(offset),
|
|
34539
|
-
skipped: [
|
|
34540
|
-
...legacy.skipped,
|
|
34541
|
-
{ resource: "meetings", code: "not_found", reason: "the selected meeting account is not stored" }
|
|
34542
|
-
]
|
|
34543
|
-
};
|
|
34544
|
-
}
|
|
34545
|
-
const ranked = /* @__PURE__ */ new Map();
|
|
34546
|
-
for (const list3 of [legacy.items, meetings.items.map(({ item: item2 }) => item2)])
|
|
34547
|
-
list3.forEach((item2, rank) => {
|
|
34548
|
-
const key = item2.kind === "meeting" ? JSON.stringify([item2.kind, item2.accountId, item2.meetingId, item2.scope, item2.id]) : item2.ref;
|
|
34549
|
-
const held = ranked.get(key) ?? { item: item2, score: 0 };
|
|
34550
|
-
held.score += 1 / (RRF_K3 + rank + 1);
|
|
34551
|
-
ranked.set(key, held);
|
|
34552
|
-
});
|
|
34553
|
-
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
34554
|
-
const items = ordered.slice(offset, window3);
|
|
34555
|
-
const returnedMeetings = ordered.slice(0, window3).filter((item2) => item2.kind === "meeting").length;
|
|
34556
|
-
const nextCursor = meetings.items[returnedMeetings]?.before ?? (!meetings.coverage.complete ? meetings.after : void 0);
|
|
34557
|
-
const more = legacy.hasMore || ordered.length > window3;
|
|
34558
|
-
const { nextOffset: _, ...rest } = legacy;
|
|
34559
|
-
return {
|
|
34560
|
-
...rest,
|
|
34561
|
-
items,
|
|
34562
|
-
hasMore: more ? true : meetings.coverage.complete ? false : null,
|
|
34563
|
-
...more && window3 <= MAX_SEARCH_OFFSET ? { nextOffset: window3 } : {},
|
|
34564
|
-
searched: [...legacy.searched, "meetings"],
|
|
34565
|
-
accounts: [
|
|
34566
|
-
...legacy.accounts,
|
|
34567
|
-
{ resource: "meetings", provider: meetingAccount.provider, account: meetingAccount.account }
|
|
34568
|
-
],
|
|
34569
|
-
meetings: { ...meetings.coverage, ...nextCursor ? { nextCursor } : {} }
|
|
34570
|
-
};
|
|
34571
|
-
}, "searchAllIncludingMeetings");
|
|
34572
|
-
var MEETINGS_UNNAMED = "meetings are searched only when --source names a meeting account, zoom or meetings";
|
|
34573
|
-
var searchAllWithMeetings = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, searchMessages, meaning) => {
|
|
34574
|
-
if (request.source !== void 0)
|
|
34575
|
-
return searchAllOfSource(store, account, request.source, request, messenger, searchMessages, meaning);
|
|
34576
|
-
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
34577
|
-
if (only.length === 1 && only[0] === "meetings")
|
|
34578
|
-
throw new CliError("validation_error", `--only meetings: ${MEETINGS_UNNAMED}`);
|
|
34579
|
-
if (request.maxMeetings !== void 0)
|
|
34580
|
-
throw new CliError("validation_error", `--max-meetings: ${MEETINGS_UNNAMED}`);
|
|
34581
|
-
const found = await searchAll(store, account, { ...request, only: only.filter((resource) => resource !== "meetings") }, messenger, searchMessages, meaning);
|
|
34582
|
-
return only.includes("meetings") ? {
|
|
34583
|
-
...found,
|
|
34584
|
-
skipped: [...found.skipped, { resource: "meetings", code: "validation_error", reason: MEETINGS_UNNAMED }]
|
|
34585
|
-
} : found;
|
|
34586
|
-
}, "searchAllWithMeetings");
|
|
34587
|
-
var holdingMeetings = /* @__PURE__ */ __name(async (store, named4) => {
|
|
34588
|
-
if (named4.length < 2)
|
|
34589
|
-
return named4;
|
|
34590
|
-
const holding3 = [];
|
|
34591
|
-
for (const key of named4) {
|
|
34592
|
-
const { id: id2 } = await store.accounts.storedAccount(key);
|
|
34593
|
-
if ((await store.meetings.meetings({ accountId: id2, limit: 1 })).length)
|
|
34594
|
-
holding3.push(key);
|
|
34595
|
-
}
|
|
34596
|
-
return holding3.length ? holding3 : named4;
|
|
34597
|
-
}, "holdingMeetings");
|
|
34598
|
-
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
|
|
34599
|
-
var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, request, messenger, searchMessages, meaning) => {
|
|
34600
|
-
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
34601
|
-
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
34602
|
-
const imported = only.includes("business") ? new Set((await store.business.accounts()).map(keyOf6)) : /* @__PURE__ */ new Set();
|
|
34603
|
-
const holdsBusiness = /* @__PURE__ */ __name((one2) => imported.has(keyOf6(one2)), "holdsBusiness");
|
|
34604
|
-
const { skipped } = fitting(entries, only.filter((one2) => one2 !== "business"), "search all", (kind) => `--only leaves ${kind} out`, holdsBusiness);
|
|
34605
|
-
const named4 = /* @__PURE__ */ __name((resource) => [
|
|
34606
|
-
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one2) => resource === "business" ? holdsBusiness(one2) : listedHolds(one2, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
34607
|
-
], "named");
|
|
34608
|
-
const meetings = await holdingMeetings(store, named4("meetings"));
|
|
34609
|
-
const empty2 = named4("meetings").filter((one2) => !meetings.some(({ provider, account: account2 }) => provider === one2.provider && account2 === one2.account)).map(({ provider, account: account2 }) => ({
|
|
34610
|
-
source: `${provider}:${account2}`,
|
|
34611
|
-
code: "not_found",
|
|
34612
|
-
reason: "no meetings stored for it"
|
|
34613
|
-
}));
|
|
34614
|
-
if (only.includes("meetings") && meetings.length > 1)
|
|
34615
|
-
throw new CliError("validation_error", `--source names several meeting accounts; search all reads one: ${meetings.map(({ provider, account: account2 }) => `${provider}:${account2}`).join(", ")}`);
|
|
34616
|
-
const read2 = only.filter((resource) => named4(resource).length > 0);
|
|
34617
|
-
if (read2.includes("meetings") && request.offset !== void 0)
|
|
34618
|
-
throw new CliError("validation_error", "--offset pages messages, mail and notes; not with a meeting account yet");
|
|
34619
|
-
const found = await searchAllIncludingMeetings(store, account, {
|
|
34620
|
-
...request,
|
|
34621
|
-
only: read2,
|
|
34622
|
-
scope: {
|
|
34623
|
-
messages: named4("messages"),
|
|
34624
|
-
mail: named4("mail"),
|
|
34625
|
-
notes: named4("notes"),
|
|
34626
|
-
events: named4("events"),
|
|
34627
|
-
crm: named4("crm"),
|
|
34628
|
-
business: named4("business")
|
|
34629
|
-
},
|
|
34630
|
-
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
34631
|
-
}, messenger, searchMessages, meaning);
|
|
34632
|
-
const unnamed = only.filter((resource) => !read2.includes(resource)).map((resource) => ({ resource, code: "not_found", reason: `--source names no ${resource} account` }));
|
|
34633
|
-
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
34634
|
-
}, "searchAllOfSource");
|
|
34635
|
-
|
|
34636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_25b690dd810be59ade44e4d26e61c9f5/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
35011
|
+
var PERIOD_DEPTH = 100;
|
|
35012
|
+
var PERIOD_BOOST = 0.5;
|
|
35013
|
+
var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
35014
|
+
if (!period)
|
|
35015
|
+
return ordered;
|
|
35016
|
+
const inside2 = /* @__PURE__ */ __name(({ timestamp: timestamp2 }) => {
|
|
35017
|
+
const at = timestamp2 === null ? Number.NaN : Date.parse(timestamp2);
|
|
35018
|
+
return at >= period.from && at < period.to;
|
|
35019
|
+
}, "inside");
|
|
35020
|
+
return ordered.map((item2, rank) => ({ item: item2, score: 1 - rank / PERIOD_DEPTH + (inside2(item2) ? PERIOD_BOOST : 0) })).sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
35021
|
+
}, "insidePeriodFirst");
|
|
35022
|
+
|
|
35023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34637
35024
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34638
35025
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34639
35026
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34655,14 +35042,14 @@ var merge = /* @__PURE__ */ __name((one2, other) => {
|
|
|
34655
35042
|
...Number.isFinite(maxDate) ? { maxDate } : {}
|
|
34656
35043
|
};
|
|
34657
35044
|
}, "merge");
|
|
34658
|
-
var
|
|
35045
|
+
var sameAccount4 = /* @__PURE__ */ __name((one2, other) => one2.provider === other.provider && one2.account === other.account, "sameAccount");
|
|
34659
35046
|
var branchesOf = /* @__PURE__ */ __name((node, account) => {
|
|
34660
35047
|
if (node.kind === "predicate") {
|
|
34661
35048
|
if ((node.field === "text" || node.field === "exact") && (node.operator === "term" || node.operator === "phrase"))
|
|
34662
35049
|
return node.value === "" ? [{ words: [] }] : [{ words: [node.value] }];
|
|
34663
35050
|
const { chat, sender, date: date2 } = node.resolution ?? {};
|
|
34664
35051
|
if (chat)
|
|
34665
|
-
return
|
|
35052
|
+
return sameAccount4(chat.account, account) ? [{ words: [], chat: chat.chatId }] : [];
|
|
34666
35053
|
if (sender?.provider === account.provider)
|
|
34667
35054
|
return [{ words: [], from: sender.id }];
|
|
34668
35055
|
if (date2)
|
|
@@ -34732,9 +35119,9 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34732
35119
|
const store = await deps.store();
|
|
34733
35120
|
const account = await deps.account();
|
|
34734
35121
|
const { execution } = await prepareLucene(store, account, request, deps.messenger);
|
|
34735
|
-
if (!execution.accounts.some((one2) =>
|
|
35122
|
+
if (!execution.accounts.some((one2) => sameAccount4(one2, account)))
|
|
34736
35123
|
return skip("other_accounts");
|
|
34737
|
-
const scoped = execution.chat ?
|
|
35124
|
+
const scoped = execution.chat ? sameAccount4(execution.chat.account, account) ? { words: [], chat: execution.chat.chatId } : void 0 : { words: [] };
|
|
34738
35125
|
if (!scoped)
|
|
34739
35126
|
return skip("other_accounts");
|
|
34740
35127
|
const all = branchesOf(execution.root, account).flatMap((branch) => merge(scoped, branch) ?? []);
|
|
@@ -34822,7 +35209,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34822
35209
|
return { report, sources };
|
|
34823
35210
|
}, "searchServer");
|
|
34824
35211
|
|
|
34825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34826
35213
|
var DELETE_AT_ONCE = 10;
|
|
34827
35214
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
34828
35215
|
const files = fileLinks(attachments);
|
|
@@ -35044,7 +35431,6 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35044
35431
|
});
|
|
35045
35432
|
}, "search"),
|
|
35046
35433
|
searchAll: /* @__PURE__ */ __name((request) => inStore((store, account) => searchAll(store, account, request, deps.messenger, unifiedMessages(store, account), meaningLane(deps))), "searchAll"),
|
|
35047
|
-
searchAllWithMeetings: /* @__PURE__ */ __name((request) => inStore((store, account) => searchAllWithMeetings(store, account, request, deps.messenger, unifiedMessages(store, account), meaningLane(deps))), "searchAllWithMeetings"),
|
|
35048
35434
|
stats: /* @__PURE__ */ __name((query) => inStore(async (store, account) => {
|
|
35049
35435
|
const refreshed = await refreshSearch(deps, query);
|
|
35050
35436
|
const stats = await statsStore(store, account, query, deps.messenger);
|
|
@@ -35263,9 +35649,9 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35263
35649
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35264
35650
|
}, "checkMediaOptions");
|
|
35265
35651
|
|
|
35266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35267
35653
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35268
|
-
var
|
|
35654
|
+
var RULES2 = {
|
|
35269
35655
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
35270
35656
|
news: [/\b(news|breaking|digest)\b/iu, /новост|дайджест|сводк/iu],
|
|
35271
35657
|
memes: [/\b(memes?|humou?r|lol)\b/iu, /мем|юмор|шутк/iu],
|
|
@@ -35273,12 +35659,12 @@ var RULES = {
|
|
|
35273
35659
|
jobs: [/\b(jobs?|hiring|careers?)\b/iu, /ваканс|работа/iu],
|
|
35274
35660
|
events: [/\b(events?|meetups?|conference)\b/iu, /мероприяти|митап|конференц/iu]
|
|
35275
35661
|
};
|
|
35276
|
-
var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(
|
|
35662
|
+
var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2).flatMap(([tag, patterns]) => {
|
|
35277
35663
|
const fields = Object.entries(metadata).filter(([, value]) => value && patterns.some((pattern) => pattern.test(value))).map(([field]) => field);
|
|
35278
35664
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
35279
35665
|
}), "classifyChannel");
|
|
35280
35666
|
|
|
35281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35282
35668
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35283
35669
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35284
35670
|
const store = await deps.store();
|
|
@@ -35364,7 +35750,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35364
35750
|
};
|
|
35365
35751
|
}, "metadataService");
|
|
35366
35752
|
|
|
35367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
35368
35754
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
35369
35755
|
var LINK2 = /https?:\/\/\S+/i;
|
|
35370
35756
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -35552,7 +35938,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
35552
35938
|
}, "nextPoint");
|
|
35553
35939
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
35554
35940
|
|
|
35555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
35556
35942
|
import { existsSync as existsSync3, readFileSync as readFileSync5 } from "node:fs";
|
|
35557
35943
|
import { join as join15 } from "node:path";
|
|
35558
35944
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -35603,7 +35989,7 @@ var defaultRules = /* @__PURE__ */ __name((title) => ({
|
|
|
35603
35989
|
consent: { delete: "ask", remove: "ask" }
|
|
35604
35990
|
}), "defaultRules");
|
|
35605
35991
|
var list2 = /* @__PURE__ */ __name((value) => value.split(",").map((item2) => item2.trim()).filter(Boolean), "list");
|
|
35606
|
-
var
|
|
35992
|
+
var whole2 = /* @__PURE__ */ __name((value) => /^\d+$/.test(value.trim()) ? Number(value) : Number.NaN, "whole");
|
|
35607
35993
|
var KEYS = {
|
|
35608
35994
|
trusted: { help: "person ids, comma-separated; never acted on", parse: list2 },
|
|
35609
35995
|
blocked: { help: "person ids, comma-separated", parse: list2 },
|
|
@@ -35612,10 +35998,10 @@ var KEYS = {
|
|
|
35612
35998
|
invites: { help: RULE_ACTIONS.join("|"), parse: String },
|
|
35613
35999
|
forwards: { help: RULE_ACTIONS.join("|"), parse: String },
|
|
35614
36000
|
blockedPeople: { help: RULE_ACTIONS.join("|"), parse: String },
|
|
35615
|
-
"flood.messages": { help: "a whole number, 1 or more", parse:
|
|
35616
|
-
"flood.minutes": { help: "a whole number, 1 or more", parse:
|
|
36001
|
+
"flood.messages": { help: "a whole number, 1 or more", parse: whole2 },
|
|
36002
|
+
"flood.minutes": { help: "a whole number, 1 or more", parse: whole2 },
|
|
35617
36003
|
"flood.action": { help: RULE_ACTIONS.join("|"), parse: String },
|
|
35618
|
-
"newAccount.days": { help: "a whole number; 0 turns it off", parse:
|
|
36004
|
+
"newAccount.days": { help: "a whole number; 0 turns it off", parse: whole2 },
|
|
35619
36005
|
"newAccount.action": { help: "report|remove", parse: String },
|
|
35620
36006
|
"consent.delete": { help: LEVELS.join("|"), parse: String },
|
|
35621
36007
|
"consent.remove": { help: LEVELS.join("|"), parse: String }
|
|
@@ -35695,7 +36081,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
35695
36081
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
35696
36082
|
}, "assign");
|
|
35697
36083
|
|
|
35698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35699
36085
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35700
36086
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
35701
36087
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -35732,7 +36118,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
35732
36118
|
return { chatId, rows, notes };
|
|
35733
36119
|
}, "moderateWith");
|
|
35734
36120
|
|
|
35735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
35736
36122
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
35737
36123
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
35738
36124
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -35810,7 +36196,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
35810
36196
|
}, "removePerson")
|
|
35811
36197
|
}), "moderatorOf");
|
|
35812
36198
|
|
|
35813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
35814
36200
|
var CONTEXT_MESSAGES2 = 10;
|
|
35815
36201
|
var CONTEXT_BYTES = 64 * 1024;
|
|
35816
36202
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -35887,14 +36273,18 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
35887
36273
|
return { items, cut: true };
|
|
35888
36274
|
}, "eventsOnce");
|
|
35889
36275
|
var nameOf2 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "nameOf");
|
|
35890
|
-
var
|
|
36276
|
+
var allowedOf = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
35891
36277
|
const stored = await store.accounts.storedAccounts();
|
|
35892
36278
|
const own = stored.find((one2) => nameOf2(one2) === nameOf2(asked));
|
|
35893
36279
|
if (!own || asked.scope !== void 0 && asked.scope !== own.scope)
|
|
35894
36280
|
throw new CliError("not_found", `no ${asked.provider} account ${asked.account} in the store`);
|
|
35895
|
-
|
|
36281
|
+
return { stored, allowed: scopes ?? [own.scope] };
|
|
36282
|
+
}, "allowedOf");
|
|
36283
|
+
var readableAccounts = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
36284
|
+
const { stored, allowed } = await allowedOf(store, asked, scopes);
|
|
35896
36285
|
return stored.filter((one2) => allowed.includes(one2.scope));
|
|
35897
36286
|
}, "readableAccounts");
|
|
36287
|
+
var readableScopes = /* @__PURE__ */ __name(async (store, asked, scopes) => (await allowedOf(store, asked, scopes)).allowed, "readableScopes");
|
|
35898
36288
|
var readsOf = /* @__PURE__ */ __name((record2, asked, readable) => {
|
|
35899
36289
|
const scopeOf5 = new Map(readable.map((one2) => [nameOf2(one2), one2.scope]));
|
|
35900
36290
|
return record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).flatMap((account) => {
|
|
@@ -35913,8 +36303,13 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, optio
|
|
|
35913
36303
|
...await recordContext(store, record2, readsOf(record2, asked, readable), readable, options2)
|
|
35914
36304
|
};
|
|
35915
36305
|
}, "personContext");
|
|
35916
|
-
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now(), calendarIds } = {}) => {
|
|
36306
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now(), calendarIds, scopes } = {}) => {
|
|
35917
36307
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
36308
|
+
const allowed = new Set(scopes ?? readable.map((one2) => one2.scope));
|
|
36309
|
+
const inScope = /* @__PURE__ */ __name(async (key, scope, hits) => {
|
|
36310
|
+
const pinned = await store.chats.chatScopes(key, [...new Set(hits.map((hit) => hit.chatId))]);
|
|
36311
|
+
return hits.filter((hit) => allowed.has(pinned.get(hit.chatId) ?? scope));
|
|
36312
|
+
}, "inScope");
|
|
35918
36313
|
const shared = [];
|
|
35919
36314
|
const notRead = [];
|
|
35920
36315
|
const direct = [];
|
|
@@ -35922,8 +36317,8 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readabl
|
|
|
35922
36317
|
const theirs = [];
|
|
35923
36318
|
const mentions = [];
|
|
35924
36319
|
let cut = false;
|
|
35925
|
-
for (const { key, identity } of reads) {
|
|
35926
|
-
const chats = await store.chats.chatsWith(key, identity.id);
|
|
36320
|
+
for (const { key, scope, identity } of reads) {
|
|
36321
|
+
const chats = (await store.chats.chatsWith(key, identity.id)).filter((chat) => allowed.has(chat.scope ?? scope));
|
|
35927
36322
|
for (const chat of chats) {
|
|
35928
36323
|
shared.push({ ...key, chatId: chat.id, title: chat.title, kind: chat.kind, lastMessageAt: chat.lastMessageAt });
|
|
35929
36324
|
}
|
|
@@ -35964,10 +36359,10 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readabl
|
|
|
35964
36359
|
cut ||= mail.hasMore;
|
|
35965
36360
|
}
|
|
35966
36361
|
const written = await store.messages.find({ account: key, senders: [identity.id], limit: messages });
|
|
35967
|
-
theirs.push(...written.items.map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
36362
|
+
theirs.push(...(await inScope(key, scope, written.items)).map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
35968
36363
|
cut ||= written.hasMore;
|
|
35969
36364
|
const named4 = await store.messages.mentioning(key, { id: identity.id, username: identity.username }, messages);
|
|
35970
|
-
mentions.push(...named4.items.filter((hit) => hit.senderId !== identity.id).map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
36365
|
+
mentions.push(...(await inScope(key, scope, named4.items)).filter((hit) => hit.senderId !== identity.id).map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
35971
36366
|
cut ||= named4.hasMore;
|
|
35972
36367
|
}
|
|
35973
36368
|
const personId = Number(record2.uid);
|
|
@@ -36100,10 +36495,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
36100
36495
|
};
|
|
36101
36496
|
}, "personMessages");
|
|
36102
36497
|
|
|
36103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
36104
36499
|
import { createHash as createHash11 } from "node:crypto";
|
|
36105
36500
|
|
|
36106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
36107
36502
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
36108
36503
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options2 = {}) => {
|
|
36109
36504
|
const parsed = parseMeetingReference(reference);
|
|
@@ -36121,7 +36516,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
36121
36516
|
return { parsed, meeting };
|
|
36122
36517
|
}, "authorizedMeetingMetadata");
|
|
36123
36518
|
|
|
36124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
36125
36520
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36126
36521
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
36127
36522
|
if (signal?.aborted)
|
|
@@ -36320,7 +36715,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
36320
36715
|
return { ...packet, fingerprint: hash(packet) };
|
|
36321
36716
|
}, "readMeetingEvidence");
|
|
36322
36717
|
|
|
36323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
36324
36719
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options2) => {
|
|
36325
36720
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options2;
|
|
36326
36721
|
const requestedAccounts = options2.accountIds;
|
|
@@ -36419,7 +36814,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
36419
36814
|
};
|
|
36420
36815
|
}, "personMeetingContext");
|
|
36421
36816
|
|
|
36422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
36423
36818
|
var PREPARE_BYTES = 96 * 1024;
|
|
36424
36819
|
var MEETINGS = 5;
|
|
36425
36820
|
var CUES = 3;
|
|
@@ -36464,7 +36859,8 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
36464
36859
|
}
|
|
36465
36860
|
waiting.sort((a, b) => Date.parse(b.message.timestamp) - Date.parse(a.message.timestamp));
|
|
36466
36861
|
const accounts = context2.accounts.map(({ provider, account }) => ({ provider, account }));
|
|
36467
|
-
const
|
|
36862
|
+
const scopes = await readableScopes(store, asked, options2.scopes);
|
|
36863
|
+
const held = await store.people.preparation(context2.person.uid, { accounts, scopes, limit });
|
|
36468
36864
|
const readable = await readableAccounts(store, asked, options2.scopes);
|
|
36469
36865
|
const meetings = await meetingsOf(store, context2.person.uid, readable, options2.since, () => left);
|
|
36470
36866
|
const sections = {
|
|
@@ -36491,12 +36887,18 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
36491
36887
|
tasks: {
|
|
36492
36888
|
...sections.tasks.coverage,
|
|
36493
36889
|
selection: "open, assigned to them in any role",
|
|
36494
|
-
accounts: accounts.map(accountName)
|
|
36890
|
+
accounts: accounts.map(accountName),
|
|
36891
|
+
scopes
|
|
36892
|
+
},
|
|
36893
|
+
facts: {
|
|
36894
|
+
...sections.facts.coverage,
|
|
36895
|
+
selection: "accepted, about them or a project they are a member of",
|
|
36896
|
+
scopes
|
|
36495
36897
|
},
|
|
36496
|
-
facts: { ...sections.facts.coverage, selection: "accepted, about them or a project they are a member of" },
|
|
36497
36898
|
notes: {
|
|
36498
36899
|
...sections.notes.coverage,
|
|
36499
36900
|
selection: "written by you, about them",
|
|
36901
|
+
scopes,
|
|
36500
36902
|
...options2.notes === false ? { withheld: "contacts.notes.list" } : {}
|
|
36501
36903
|
},
|
|
36502
36904
|
meetings: {
|
|
@@ -36535,7 +36937,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
36535
36937
|
}
|
|
36536
36938
|
}, "meetingsOf");
|
|
36537
36939
|
|
|
36538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
36539
36941
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
36540
36942
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
36541
36943
|
const held = await storeIfOpen(deps);
|
|
@@ -36581,7 +36983,7 @@ var activityIn = /* @__PURE__ */ __name(async (store, account, facts) => {
|
|
|
36581
36983
|
...facts.chats,
|
|
36582
36984
|
...[...stats.values()].filter(({ chatId }) => !listed2.has(chatId)).map(({ chatId, title, kind, lastAt }) => ({ id: chatId, title, kind, lastMessageAt: lastAt }))
|
|
36583
36985
|
];
|
|
36584
|
-
const
|
|
36986
|
+
const whole3 = new Set((await store.chats.chatCompleteness(account, chats.map(({ id: id2 }) => id2))).filter(({ state }) => state === "complete").map(({ chatId }) => chatId));
|
|
36585
36987
|
return chats.map(({ id: id2, title, kind }) => {
|
|
36586
36988
|
const one2 = stats.get(id2);
|
|
36587
36989
|
return {
|
|
@@ -36591,7 +36993,7 @@ var activityIn = /* @__PURE__ */ __name(async (store, account, facts) => {
|
|
|
36591
36993
|
theirMessages: one2?.messages ?? 0,
|
|
36592
36994
|
firstAt: one2?.firstAt ?? null,
|
|
36593
36995
|
lastAt: one2?.lastAt ?? null,
|
|
36594
|
-
complete:
|
|
36996
|
+
complete: whole3.has(id2)
|
|
36595
36997
|
};
|
|
36596
36998
|
});
|
|
36597
36999
|
}, "activityIn");
|
|
@@ -36605,7 +37007,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
36605
37007
|
complete: false
|
|
36606
37008
|
})), "quiet");
|
|
36607
37009
|
|
|
36608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
36609
37011
|
var TIMELINE_ITEMS = 50;
|
|
36610
37012
|
var TIMELINE_MAX = 500;
|
|
36611
37013
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -36617,11 +37019,17 @@ var boundOf = /* @__PURE__ */ __name((cursor) => {
|
|
|
36617
37019
|
throw new CliError("validation_error", `--cursor takes what page.next gave, before:<time>:<id> \u2014 not "${cursor}"`);
|
|
36618
37020
|
return bound2;
|
|
36619
37021
|
}, "boundOf");
|
|
36620
|
-
var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { scope, since, until, cursor, limit = TIMELINE_ITEMS } = {}) => {
|
|
37022
|
+
var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { scopes, scope, since, until, cursor, limit = TIMELINE_ITEMS } = {}) => {
|
|
36621
37023
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > TIMELINE_MAX)
|
|
36622
37024
|
throw new CliError("validation_error", `the limit takes 1\u2013${TIMELINE_MAX}`);
|
|
36623
37025
|
if (since !== void 0 && until !== void 0 && since > until)
|
|
36624
37026
|
throw new CliError("validation_error", "the start of the range is after its end");
|
|
37027
|
+
const allowed = await readableScopes(store, asked, scopes);
|
|
37028
|
+
if (scope !== void 0 && !allowed.includes(scope))
|
|
37029
|
+
throw new CliError("permission_error", `this profile reads ${allowed.join(" and ")}, not ${scope}`, {
|
|
37030
|
+
reason: "selection.out-of-scope"
|
|
37031
|
+
});
|
|
37032
|
+
const read2 = scope === void 0 ? [...allowed] : [scope];
|
|
36625
37033
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
36626
37034
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
36627
37035
|
if (!record2)
|
|
@@ -36629,7 +37037,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
36629
37037
|
const personId = Number(record2.uid);
|
|
36630
37038
|
const pending = store.involvements.pending();
|
|
36631
37039
|
const rows = store.involvements.forPerson(personId, {
|
|
36632
|
-
|
|
37040
|
+
scopes: read2,
|
|
36633
37041
|
...since === void 0 ? {} : { since },
|
|
36634
37042
|
...until === void 0 ? {} : { until },
|
|
36635
37043
|
only: asked,
|
|
@@ -36641,6 +37049,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
36641
37049
|
const hasMore = rows.length > limit;
|
|
36642
37050
|
return {
|
|
36643
37051
|
person: { uid: record2.uid, name: record2.name },
|
|
37052
|
+
scopes: read2,
|
|
36644
37053
|
items: shown.map((row) => ({
|
|
36645
37054
|
at: new Date(row.occurredAt).toISOString(),
|
|
36646
37055
|
subject: row.subjectType,
|
|
@@ -36660,7 +37069,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
36660
37069
|
};
|
|
36661
37070
|
}, "personTimeline");
|
|
36662
37071
|
|
|
36663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
36664
37073
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
36665
37074
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
36666
37075
|
const held = await storeIfOpen(deps);
|
|
@@ -36914,7 +37323,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
36914
37323
|
return rest;
|
|
36915
37324
|
}, "withoutPhone");
|
|
36916
37325
|
|
|
36917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
36918
37327
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
36919
37328
|
id: note2.id,
|
|
36920
37329
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -36958,7 +37367,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
36958
37367
|
};
|
|
36959
37368
|
}, "privatePeopleService");
|
|
36960
37369
|
|
|
36961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
36962
37371
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
36963
37372
|
total: 0,
|
|
36964
37373
|
population: 0,
|
|
@@ -37214,7 +37623,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37214
37623
|
}, "evidence")
|
|
37215
37624
|
}), "rankingsService");
|
|
37216
37625
|
|
|
37217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37218
37627
|
var FIELDS = ["date", "chat", "kind"];
|
|
37219
37628
|
var WAITING_TAIL = 100;
|
|
37220
37629
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37308,9 +37717,9 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37308
37717
|
}
|
|
37309
37718
|
const days = /* @__PURE__ */ new Map();
|
|
37310
37719
|
if (by === "day") {
|
|
37311
|
-
const
|
|
37720
|
+
const keyOf7 = calendarKey(timezone, "day");
|
|
37312
37721
|
for (const { repliedAt, delayMs } of delays) {
|
|
37313
|
-
const key =
|
|
37722
|
+
const key = keyOf7(repliedAt);
|
|
37314
37723
|
const list3 = days.get(key) ?? [];
|
|
37315
37724
|
list3.push(delayMs);
|
|
37316
37725
|
days.set(key, list3);
|
|
@@ -37341,7 +37750,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37341
37750
|
};
|
|
37342
37751
|
}, "replyStatsService");
|
|
37343
37752
|
|
|
37344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37345
37754
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
37346
37755
|
id: one2.id,
|
|
37347
37756
|
name: one2.name,
|
|
@@ -37470,7 +37879,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37470
37879
|
};
|
|
37471
37880
|
}, "searchesService");
|
|
37472
37881
|
|
|
37473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
37474
37883
|
var TAGGING_QUERY = {
|
|
37475
37884
|
entity: "tagging",
|
|
37476
37885
|
backend: "sql",
|
|
@@ -37554,7 +37963,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37554
37963
|
};
|
|
37555
37964
|
}, "tagsService");
|
|
37556
37965
|
|
|
37557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
37558
37967
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
37559
37968
|
var PERIOD_FIELD = "created";
|
|
37560
37969
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -37600,10 +38009,10 @@ var taskStatsOf = /* @__PURE__ */ __name(async (store, account, { by = "chat", q
|
|
|
37600
38009
|
const closed = await store.tasks.statRows(scope, where(query && { ...query, root: renamed(query.root, PERIOD_FIELD, "closed") }, [
|
|
37601
38010
|
{ sql: "t.closed_at IS NOT NULL", params: [] }
|
|
37602
38011
|
]));
|
|
37603
|
-
const
|
|
38012
|
+
const keyOf7 = /* @__PURE__ */ __name((row) => by === "project" ? String(row.projectId) : row.group ?? "", "keyOf");
|
|
37604
38013
|
const groups = /* @__PURE__ */ new Map();
|
|
37605
38014
|
const slot = /* @__PURE__ */ __name((row) => {
|
|
37606
|
-
const key =
|
|
38015
|
+
const key = keyOf7(row);
|
|
37607
38016
|
const found = groups.get(key) ?? { open: [], created: 0, closeMs: [] };
|
|
37608
38017
|
groups.set(key, found);
|
|
37609
38018
|
return found;
|
|
@@ -37657,7 +38066,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
37657
38066
|
}));
|
|
37658
38067
|
}, "meetingNames");
|
|
37659
38068
|
|
|
37660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
37661
38070
|
var TASK_QUERY = {
|
|
37662
38071
|
entity: "task",
|
|
37663
38072
|
backend: "sql",
|
|
@@ -37961,9 +38370,9 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
37961
38370
|
merge: /* @__PURE__ */ __name((dup, into, by) => inStore(async (store, account) => {
|
|
37962
38371
|
await owned(store, account, dup);
|
|
37963
38372
|
await owned(store, account, into);
|
|
37964
|
-
const
|
|
38373
|
+
const merged3 = await store.tasks.merge(dup, into, by === "owner" ? "owner" : { bot: by });
|
|
37965
38374
|
const review = await reviewAfterLink(store, into);
|
|
37966
|
-
return { ...
|
|
38375
|
+
return { ...merged3, review, task: await cardOf(store, into) };
|
|
37967
38376
|
}), "merge"),
|
|
37968
38377
|
unmerge: /* @__PURE__ */ __name((dup, by) => inStore(async (store, account) => {
|
|
37969
38378
|
await owned(store, account, dup);
|
|
@@ -38149,7 +38558,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
38149
38558
|
};
|
|
38150
38559
|
}, "taskView");
|
|
38151
38560
|
|
|
38152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38153
38562
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38154
38563
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
38155
38564
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38348,7 +38757,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38348
38757
|
};
|
|
38349
38758
|
}, "topicsService");
|
|
38350
38759
|
|
|
38351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/crm/sync.js
|
|
38352
38761
|
var CLOCK_MARGIN = 60 * 6e4;
|
|
38353
38762
|
var GAPS = "crm:gaps";
|
|
38354
38763
|
var crmGapsOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
@@ -38360,7 +38769,7 @@ var crmGapsOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
|
38360
38769
|
}
|
|
38361
38770
|
}, "crmGapsOf");
|
|
38362
38771
|
|
|
38363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/crm/writer.js
|
|
38364
38773
|
var CRM_ASSIGN_OTHERS_KEY = "crm.assign-others";
|
|
38365
38774
|
var CRM_WRITE_DEFAULTS = {
|
|
38366
38775
|
"deals.delete": "ask",
|
|
@@ -38368,7 +38777,7 @@ var CRM_WRITE_DEFAULTS = {
|
|
|
38368
38777
|
[CRM_ASSIGN_OTHERS_KEY]: "deny"
|
|
38369
38778
|
};
|
|
38370
38779
|
|
|
38371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/business-context.js
|
|
38372
38781
|
var SECTION_LIMIT = 20;
|
|
38373
38782
|
var STORE_PAGE = 500;
|
|
38374
38783
|
var sectionOf = /* @__PURE__ */ __name((all, limit, next, { more = false, total = all.length, newest = false } = {}) => {
|
|
@@ -38380,9 +38789,9 @@ var sectionOf = /* @__PURE__ */ __name((all, limit, next, { more = false, total
|
|
|
38380
38789
|
next: cut ? next : null
|
|
38381
38790
|
};
|
|
38382
38791
|
}, "sectionOf");
|
|
38383
|
-
var
|
|
38792
|
+
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "keyOf");
|
|
38384
38793
|
var scopeOf4 = /* @__PURE__ */ __name((accounts, denied = []) => {
|
|
38385
|
-
const asked = accounts && new Set(accounts.map(
|
|
38794
|
+
const asked = accounts && new Set(accounts.map(keyOf6));
|
|
38386
38795
|
const left = /* @__PURE__ */ new Set();
|
|
38387
38796
|
const kinds = new Set(denied);
|
|
38388
38797
|
return {
|
|
@@ -38392,7 +38801,7 @@ var scopeOf4 = /* @__PURE__ */ __name((accounts, denied = []) => {
|
|
|
38392
38801
|
has: /* @__PURE__ */ __name((account) => {
|
|
38393
38802
|
if (account == null)
|
|
38394
38803
|
return true;
|
|
38395
|
-
const key = typeof account === "string" ? account :
|
|
38804
|
+
const key = typeof account === "string" ? account : keyOf6(account);
|
|
38396
38805
|
if (asked === void 0 || asked.has(key))
|
|
38397
38806
|
return true;
|
|
38398
38807
|
left.add(key);
|
|
@@ -38479,20 +38888,20 @@ var coverageFor = /* @__PURE__ */ __name(async (store, base, scope) => {
|
|
|
38479
38888
|
if (scope.accounts !== void 0) {
|
|
38480
38889
|
for (const key of await store.accounts.accounts())
|
|
38481
38890
|
if (!scope.has(key))
|
|
38482
|
-
scope.left.add(
|
|
38891
|
+
scope.left.add(keyOf6(key));
|
|
38483
38892
|
}
|
|
38484
38893
|
for (const key of [...scope.left].sort())
|
|
38485
38894
|
if (!read2.has(key) && !named4.has(key))
|
|
38486
38895
|
notRead.push({ source: key, reason: "outside the accounts asked for" });
|
|
38487
38896
|
for (const key of await store.accounts.accounts())
|
|
38488
|
-
if (scope.accounts === void 0 || scope.accounts.some((one2) =>
|
|
38897
|
+
if (scope.accounts === void 0 || scope.accounts.some((one2) => keyOf6(one2) === keyOf6(key)))
|
|
38489
38898
|
for (const gap of await crmGapsOf(store, key))
|
|
38490
|
-
notRead.push({ source:
|
|
38899
|
+
notRead.push({ source: keyOf6(key), reason: gap.message });
|
|
38491
38900
|
return { accounts: [...read2].sort(), notRead };
|
|
38492
38901
|
}, "coverageFor");
|
|
38493
38902
|
var newestFirst2 = /* @__PURE__ */ __name((a, b) => (b.at ?? "").localeCompare(a.at ?? "") || a.ref.localeCompare(b.ref), "newestFirst");
|
|
38494
38903
|
|
|
38495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/communications.js
|
|
38496
38905
|
var MAIL_ROWS = 500;
|
|
38497
38906
|
var EVENT_ROWS2 = 1e3;
|
|
38498
38907
|
var calendarsOf = /* @__PURE__ */ __name(async (store, stored) => {
|
|
@@ -38517,7 +38926,7 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38517
38926
|
const owner = (await store.people.owner())?.uid;
|
|
38518
38927
|
const people = asked.filter((person) => person.uid !== owner);
|
|
38519
38928
|
const stored = await store.accounts.storedAccounts();
|
|
38520
|
-
const ids = new Map(stored.map((one2) => [
|
|
38929
|
+
const ids = new Map(stored.map((one2) => [keyOf6(one2), one2.id]));
|
|
38521
38930
|
const read2 = /* @__PURE__ */ new Set();
|
|
38522
38931
|
const dialogs = /* @__PURE__ */ new Set();
|
|
38523
38932
|
const threads = /* @__PURE__ */ new Map();
|
|
@@ -38536,10 +38945,10 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38536
38945
|
}, "touch");
|
|
38537
38946
|
for (const person of people)
|
|
38538
38947
|
for (const { key, identity } of readsIn(stored, person, scope)) {
|
|
38539
|
-
read2.add(
|
|
38948
|
+
read2.add(keyOf6(key));
|
|
38540
38949
|
if (key.provider === "email") {
|
|
38541
38950
|
const emails = await store.mail.emails({
|
|
38542
|
-
accountId: ids.get(
|
|
38951
|
+
accountId: ids.get(keyOf6(key)),
|
|
38543
38952
|
participant: identity.id,
|
|
38544
38953
|
limit: MAIL_ROWS + 1,
|
|
38545
38954
|
...since === void 0 ? {} : { since },
|
|
@@ -38566,7 +38975,7 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38566
38975
|
continue;
|
|
38567
38976
|
}
|
|
38568
38977
|
for (const chat of await store.chats.chatsWith(key, identity.id)) {
|
|
38569
|
-
const id2 = `${
|
|
38978
|
+
const id2 = `${keyOf6(key)}/${chat.id}`;
|
|
38570
38979
|
if (chat.kind !== "dialog" || dialogs.has(id2))
|
|
38571
38980
|
continue;
|
|
38572
38981
|
dialogs.add(id2);
|
|
@@ -38609,7 +39018,7 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38609
39018
|
}, person.uid);
|
|
38610
39019
|
}
|
|
38611
39020
|
for (const key of calendars)
|
|
38612
|
-
read2.add(
|
|
39021
|
+
read2.add(keyOf6(key));
|
|
38613
39022
|
return {
|
|
38614
39023
|
counts: { messages: messageCount, mail: mail.size, meetings: meetings.size },
|
|
38615
39024
|
items: [...messages.values(), ...mail.values(), ...meetings.values()].sort(newestFirst2),
|
|
@@ -38618,7 +39027,7 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38618
39027
|
};
|
|
38619
39028
|
}, "communicationsOf");
|
|
38620
39029
|
|
|
38621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/money-context.js
|
|
38622
39031
|
var invoiceLine = /* @__PURE__ */ __name((invoice, linkedBy) => ({
|
|
38623
39032
|
ref: invoice.ref,
|
|
38624
39033
|
title: invoice.title,
|
|
@@ -38641,7 +39050,7 @@ var paymentLine = /* @__PURE__ */ __name((payment, linkedBy) => ({
|
|
|
38641
39050
|
date: payment.date,
|
|
38642
39051
|
linkedBy: [linkedBy]
|
|
38643
39052
|
}), "paymentLine");
|
|
38644
|
-
var
|
|
39053
|
+
var merged2 = /* @__PURE__ */ __name((rows) => {
|
|
38645
39054
|
const byRef = /* @__PURE__ */ new Map();
|
|
38646
39055
|
for (const row of rows) {
|
|
38647
39056
|
const held = byRef.get(row.ref);
|
|
@@ -38674,8 +39083,8 @@ var totalled = /* @__PURE__ */ __name((rows) => {
|
|
|
38674
39083
|
}));
|
|
38675
39084
|
}, "totalled");
|
|
38676
39085
|
var moneyOf = /* @__PURE__ */ __name((rows, limit, next, complete) => {
|
|
38677
|
-
const invoices =
|
|
38678
|
-
const payments2 =
|
|
39086
|
+
const invoices = merged2(rows.invoices.map(([invoice, way]) => invoiceLine(invoice, way)));
|
|
39087
|
+
const payments2 = merged2(rows.payments.map(([payment, way]) => paymentLine(payment, way)));
|
|
38679
39088
|
const more = { more: !complete };
|
|
38680
39089
|
return {
|
|
38681
39090
|
invoices: sectionOf(invoices, limit, next.invoices, more),
|
|
@@ -38690,7 +39099,7 @@ var moneyOf = /* @__PURE__ */ __name((rows, limit, next, complete) => {
|
|
|
38690
39099
|
};
|
|
38691
39100
|
}, "moneyOf");
|
|
38692
39101
|
|
|
38693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/organization-context.js
|
|
38694
39103
|
var dealLine = /* @__PURE__ */ __name((deal) => ({
|
|
38695
39104
|
ref: deal.ref,
|
|
38696
39105
|
kind: deal.kind,
|
|
@@ -38830,8 +39239,8 @@ var organizationContext = /* @__PURE__ */ __name(async (store, reference, { acco
|
|
|
38830
39239
|
};
|
|
38831
39240
|
}, "organizationContext");
|
|
38832
39241
|
|
|
38833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38834
|
-
var
|
|
39242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/deal-context.js
|
|
39243
|
+
var DAY6 = 864e5;
|
|
38835
39244
|
var dealContext = /* @__PURE__ */ __name(async (store, reference, { accounts, limit = SECTION_LIMIT, now = Date.now(), deniedKinds = [] } = {}) => {
|
|
38836
39245
|
const scope = scopeOf4(accounts, deniedKinds);
|
|
38837
39246
|
const kind = /^lead:/.test(reference.trim()) ? "lead" : "deal";
|
|
@@ -38874,7 +39283,7 @@ var dealContext = /* @__PURE__ */ __name(async (store, reference, { accounts, li
|
|
|
38874
39283
|
payments: only === "project" && project2 ? `payments list project:${project2.key}` : only === "counterparty" && organization2 ? `payments list party:"${organization2.ref}"` : null
|
|
38875
39284
|
};
|
|
38876
39285
|
const since = Date.parse(deal.createdAt);
|
|
38877
|
-
const until = deal.closedDate === null ? now : Date.parse(`${deal.closedDate}T00:00:00Z`) +
|
|
39286
|
+
const until = deal.closedDate === null ? now : Date.parse(`${deal.closedDate}T00:00:00Z`) + DAY6 - 1;
|
|
38878
39287
|
const records = [];
|
|
38879
39288
|
for (const one2 of participants)
|
|
38880
39289
|
if (one2.roles.some((role) => isUsable(role.standing))) {
|
|
@@ -38939,10 +39348,10 @@ var dealBrief = /* @__PURE__ */ __name((context2) => ({
|
|
|
38939
39348
|
notRead: context2.coverage.notRead
|
|
38940
39349
|
}), "dealBrief");
|
|
38941
39350
|
|
|
38942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38943
39352
|
import { createHash as createHash12, randomUUID as randomUUID6 } from "node:crypto";
|
|
38944
39353
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38945
|
-
var
|
|
39354
|
+
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
38946
39355
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
38947
39356
|
throw new CliError("validation_error", `${name} must be a safe integer of at least ${minimum}`);
|
|
38948
39357
|
return value;
|
|
@@ -38959,8 +39368,8 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38959
39368
|
if (new Set(page.items.map(({ id: id2 }) => id2)).size !== page.items.length)
|
|
38960
39369
|
throw new CliError("validation_error", "an evidence page must not repeat a message id");
|
|
38961
39370
|
const limits = {
|
|
38962
|
-
messages:
|
|
38963
|
-
bytes:
|
|
39371
|
+
messages: positive2(requested?.messages ?? 100, "evidence message limit"),
|
|
39372
|
+
bytes: positive2(requested?.bytes ?? 64 * 1024, "evidence byte limit", 2)
|
|
38964
39373
|
};
|
|
38965
39374
|
const scope = { provider: source.provider, account: source.account, chat: source.chat };
|
|
38966
39375
|
const items = [];
|
|
@@ -39013,7 +39422,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
39013
39422
|
return { ...content, id: randomUUID6(), fingerprint: hash2(content) };
|
|
39014
39423
|
}, "prepareEvidencePacket");
|
|
39015
39424
|
|
|
39016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
39017
39426
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
39018
39427
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
39019
39428
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -39033,69 +39442,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
39033
39442
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
39034
39443
|
}, "readEvidencePacket");
|
|
39035
39444
|
|
|
39036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39037
|
-
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
39038
|
-
let before2 = Number.POSITIVE_INFINITY;
|
|
39039
|
-
for (; ; ) {
|
|
39040
|
-
signal?.throwIfAborted();
|
|
39041
|
-
const { indexed, remaining } = await meetings.indexSearch({
|
|
39042
|
-
accountId,
|
|
39043
|
-
limit: 1e3,
|
|
39044
|
-
maxReadBytes: 64 * 1024 ** 2,
|
|
39045
|
-
signal
|
|
39046
|
-
});
|
|
39047
|
-
if (remaining === 0 || indexed === 0 || remaining >= before2)
|
|
39048
|
-
return;
|
|
39049
|
-
before2 = remaining;
|
|
39050
|
-
}
|
|
39051
|
-
}, "refreshMeetingIndex");
|
|
39052
|
-
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
39053
|
-
const { project: project2, tag, topic, ...input } = request;
|
|
39054
|
-
input.signal?.throwIfAborted();
|
|
39055
|
-
if (project2 !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
|
|
39056
|
-
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
39057
|
-
const selection = [];
|
|
39058
|
-
const knowledge = store.knowledge;
|
|
39059
|
-
if (!knowledge && [project2, tag, topic].some((value) => value !== void 0))
|
|
39060
|
-
throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
|
|
39061
|
-
for (const [kind, name] of [
|
|
39062
|
-
["project", project2],
|
|
39063
|
-
["tag", tag],
|
|
39064
|
-
["topic", topic]
|
|
39065
|
-
]) {
|
|
39066
|
-
if (name === void 0)
|
|
39067
|
-
continue;
|
|
39068
|
-
if (!knowledge)
|
|
39069
|
-
continue;
|
|
39070
|
-
const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
|
|
39071
|
-
input.signal?.throwIfAborted();
|
|
39072
|
-
if (found.ambiguous || found.matches.length !== 1)
|
|
39073
|
-
throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
|
|
39074
|
-
candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
|
|
39075
|
-
});
|
|
39076
|
-
const entry = found.matches[0];
|
|
39077
|
-
const id2 = Number(entry?.id);
|
|
39078
|
-
if (!entry || entry.kind !== kind || !Number.isSafeInteger(id2) || id2 < 1)
|
|
39079
|
-
throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
|
|
39080
|
-
if (kind === "project")
|
|
39081
|
-
input.projectId = id2;
|
|
39082
|
-
else
|
|
39083
|
-
input.tagId = id2;
|
|
39084
|
-
selection.push({ kind, id: id2, name: entry.name, by: "explicit-link" });
|
|
39085
|
-
}
|
|
39086
|
-
return { input, selection };
|
|
39087
|
-
}, "resolveMeetingSelection");
|
|
39088
|
-
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options2 = {}) => {
|
|
39089
|
-
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
39090
|
-
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
39091
|
-
if (options2.refreshIndex !== false)
|
|
39092
|
-
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
39093
|
-
const result = await store.meetings.searchHits(lifted.query, input);
|
|
39094
|
-
input.signal?.throwIfAborted();
|
|
39095
|
-
return { ...result, selection };
|
|
39096
|
-
}, "searchMeetingHits");
|
|
39097
|
-
|
|
39098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_25b690dd810be59ade44e4d26e61c9f5/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
39445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
39099
39446
|
import { createHash as createHash13 } from "node:crypto";
|
|
39100
39447
|
var scopeKeys = [
|
|
39101
39448
|
"accountId",
|
|
@@ -39230,7 +39577,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
39230
39577
|
};
|
|
39231
39578
|
}, "readMeetingProjectDiscovery");
|
|
39232
39579
|
|
|
39233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/person-business.js
|
|
39234
39581
|
var personBusiness = /* @__PURE__ */ __name(async (store, uid, { limit = SECTION_LIMIT, scope = scopeOf4(void 0) } = {}) => {
|
|
39235
39582
|
const ref = `person:${uid}`;
|
|
39236
39583
|
const { edges, full } = await edgesOf(store, ref, scope);
|
|
@@ -39270,13 +39617,13 @@ var canonicalPersonContext = /* @__PURE__ */ __name(async (store, reference, { a
|
|
|
39270
39617
|
const scope = scopeOf4(accounts, deniedKinds);
|
|
39271
39618
|
const stored = await store.accounts.storedAccounts();
|
|
39272
39619
|
const readable = stored.filter((one2) => scope.has(one2));
|
|
39273
|
-
const scopes = new Map(stored.map((one2) => [
|
|
39620
|
+
const scopes = new Map(stored.map((one2) => [keyOf6(one2), one2.scope]));
|
|
39274
39621
|
const reads = readsIn(stored, record2, scope).map((one2) => ({
|
|
39275
39622
|
...one2,
|
|
39276
|
-
scope: scopes.get(
|
|
39623
|
+
scope: scopes.get(keyOf6(one2.key))
|
|
39277
39624
|
}));
|
|
39278
39625
|
const calendars = (await calendarsOf(store, stored)).filter((one2) => scope.has(one2));
|
|
39279
|
-
const read2 = [...reads.map(({ key }) =>
|
|
39626
|
+
const read2 = [...reads.map(({ key }) => keyOf6(key)), ...calendars.map(keyOf6)];
|
|
39280
39627
|
return {
|
|
39281
39628
|
person: record2,
|
|
39282
39629
|
...await recordContext(store, record2, reads, readable, {
|
|
@@ -39288,7 +39635,7 @@ var canonicalPersonContext = /* @__PURE__ */ __name(async (store, reference, { a
|
|
|
39288
39635
|
};
|
|
39289
39636
|
}, "canonicalPersonContext");
|
|
39290
39637
|
|
|
39291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
39292
39639
|
import { createHash as createHash14 } from "node:crypto";
|
|
39293
39640
|
import { existsSync as existsSync4 } from "node:fs";
|
|
39294
39641
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
@@ -39419,7 +39766,7 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
39419
39766
|
return { ...checked2.output, custom: true };
|
|
39420
39767
|
}, "addCustomTextModel");
|
|
39421
39768
|
|
|
39422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/account-groups.js
|
|
39423
39770
|
var fail4 = /* @__PURE__ */ __name((code, message) => {
|
|
39424
39771
|
throw new CliError(code, message);
|
|
39425
39772
|
}, "fail");
|
|
@@ -39496,7 +39843,7 @@ var moveGroupMember = /* @__PURE__ */ __name(async (at, move) => {
|
|
|
39496
39843
|
return listAccountGroups(at);
|
|
39497
39844
|
}, "moveGroupMember");
|
|
39498
39845
|
|
|
39499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/group-guard.js
|
|
39500
39847
|
var refOf = /* @__PURE__ */ __name((item2) => typeof item2 === "string" ? item2 : typeof item2 === "object" && item2 !== null && "ref" in item2 ? item2.ref : void 0, "refOf");
|
|
39501
39848
|
var groupGuardOf = /* @__PURE__ */ __name(async (store, app, env) => {
|
|
39502
39849
|
const group = groupLockOf(app, env);
|
|
@@ -39607,7 +39954,7 @@ var lockedRegistry = /* @__PURE__ */ __name((registry, guard) => {
|
|
|
39607
39954
|
};
|
|
39608
39955
|
}, "lockedRegistry");
|
|
39609
39956
|
|
|
39610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
39611
39958
|
import { createHash as createHash15 } from "node:crypto";
|
|
39612
39959
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
39613
39960
|
ref: cue.reference,
|
|
@@ -39725,7 +40072,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
39725
40072
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
39726
40073
|
}, "readMeetingHitContext");
|
|
39727
40074
|
|
|
39728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
39729
40076
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
39730
40077
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
39731
40078
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -39801,7 +40148,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
39801
40148
|
return { packet, content };
|
|
39802
40149
|
}, "readMeetingPassage");
|
|
39803
40150
|
|
|
39804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
39805
40152
|
var communicationFields = {
|
|
39806
40153
|
sources: pipe(array(strictObject({
|
|
39807
40154
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -39833,7 +40180,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
39833
40180
|
return { ...input, after, before: before2 };
|
|
39834
40181
|
}, "communicationRequest");
|
|
39835
40182
|
|
|
39836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
39837
40184
|
var MEETING_PREPARATION_LIMITS = {
|
|
39838
40185
|
meetings: { min: 1, max: 20, default: 5 },
|
|
39839
40186
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -39919,7 +40266,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
39919
40266
|
return { ...input, history };
|
|
39920
40267
|
}, "preparationRequest");
|
|
39921
40268
|
|
|
39922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
39923
40270
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
39924
40271
|
const section = {
|
|
39925
40272
|
readUsage: plan.reader.usage(),
|
|
@@ -39970,9 +40317,9 @@ var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal)
|
|
|
39970
40317
|
continue;
|
|
39971
40318
|
refs.add(item2.ref);
|
|
39972
40319
|
const text2 = excerpt(item2.text, plan.input.query, 300, { literal: true });
|
|
39973
|
-
const
|
|
40320
|
+
const whole3 = item2.text.replace(/\s+/g, " ").trim();
|
|
39974
40321
|
const { sender: _, ...rest } = item2;
|
|
39975
|
-
items.push({ ...rest, text: text2, selectionId: read2.id, textTruncated: text2 !==
|
|
40322
|
+
items.push({ ...rest, text: text2, selectionId: read2.id, textTruncated: text2 !== whole3 });
|
|
39976
40323
|
}
|
|
39977
40324
|
} catch (error) {
|
|
39978
40325
|
preparationCancelled(signal);
|
|
@@ -40024,7 +40371,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
40024
40371
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
40025
40372
|
}, "appendPreparationCommunications");
|
|
40026
40373
|
|
|
40027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
40028
40375
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
40029
40376
|
if (port === void 0)
|
|
40030
40377
|
return void 0;
|
|
@@ -40129,7 +40476,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
40129
40476
|
}
|
|
40130
40477
|
}, "validatePreparationCommunications");
|
|
40131
40478
|
|
|
40132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
40133
40480
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
40134
40481
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
40135
40482
|
}, "invalid");
|
|
@@ -40198,7 +40545,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
40198
40545
|
}
|
|
40199
40546
|
}, "appendKnowledgePreparation");
|
|
40200
40547
|
|
|
40201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
40202
40549
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
40203
40550
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
40204
40551
|
}, "invalid");
|
|
@@ -40272,7 +40619,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
40272
40619
|
}
|
|
40273
40620
|
}, "appendNotesPreparation");
|
|
40274
40621
|
|
|
40275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
40276
40623
|
var PAGE_LIMIT = 4;
|
|
40277
40624
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
40278
40625
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -40322,7 +40669,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
40322
40669
|
}
|
|
40323
40670
|
}, "appendProjectPreparation");
|
|
40324
40671
|
|
|
40325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
40326
40673
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
40327
40674
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
40328
40675
|
return;
|
|
@@ -40394,7 +40741,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
40394
40741
|
}
|
|
40395
40742
|
}, "appendRelatedPreparation");
|
|
40396
40743
|
|
|
40397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
40398
40745
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
40399
40746
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
40400
40747
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -40532,7 +40879,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
40532
40879
|
};
|
|
40533
40880
|
}, "createMeetingPreparationService");
|
|
40534
40881
|
|
|
40535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
40536
40883
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
40537
40884
|
const installer = ports.installer();
|
|
40538
40885
|
const argv = updateCommand(installer, packageName);
|
|
@@ -40597,7 +40944,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
40597
40944
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
40598
40945
|
}, "dayAfter");
|
|
40599
40946
|
|
|
40600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
40601
40948
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
40602
40949
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
40603
40950
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -40620,7 +40967,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
40620
40967
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
40621
40968
|
}, "approveAsTask");
|
|
40622
40969
|
|
|
40623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
40624
40971
|
var MAX_IDS = 500;
|
|
40625
40972
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
40626
40973
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -40662,7 +41009,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
40662
41009
|
return ids;
|
|
40663
41010
|
}, "parseProposalIds");
|
|
40664
41011
|
|
|
40665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
40666
41013
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
40667
41014
|
if (author.type === "person")
|
|
40668
41015
|
return { type: "person", id: author.id };
|
|
@@ -40734,7 +41081,7 @@ var reviewedKind = /* @__PURE__ */ __name((spec) => ({
|
|
|
40734
41081
|
}, "decide")
|
|
40735
41082
|
}), "reviewedKind");
|
|
40736
41083
|
|
|
40737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
40738
41085
|
var FACT_SUMMARIES = {
|
|
40739
41086
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
40740
41087
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -40806,7 +41153,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
40806
41153
|
};
|
|
40807
41154
|
}, "findingsKind");
|
|
40808
41155
|
|
|
40809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
40810
41157
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
40811
41158
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
40812
41159
|
var rowOf2 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -40862,7 +41209,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
40862
41209
|
}, "decide")
|
|
40863
41210
|
}), "organizationKind");
|
|
40864
41211
|
|
|
40865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
40866
41213
|
var rowOf3 = /* @__PURE__ */ __name((action2) => ({
|
|
40867
41214
|
id: action2.id,
|
|
40868
41215
|
kind: "action",
|
|
@@ -40902,7 +41249,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
40902
41249
|
}, "decide")
|
|
40903
41250
|
}), "actionKind");
|
|
40904
41251
|
|
|
40905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/contracts.js
|
|
40906
41253
|
var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
40907
41254
|
type: "contract",
|
|
40908
41255
|
list: /* @__PURE__ */ __name((options2) => store.contracts.list(options2), "list"),
|
|
@@ -40911,7 +41258,7 @@ var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
40911
41258
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.contracts.confirm(id2, by, reason) : await store.contracts.reject(id2, by, reason)).ref, "decide")
|
|
40912
41259
|
}), "contractKind");
|
|
40913
41260
|
|
|
40914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
40915
41262
|
var STATUS = {
|
|
40916
41263
|
proposed: "proposed",
|
|
40917
41264
|
accepted: "confirmed",
|
|
@@ -40954,7 +41301,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
40954
41301
|
}, "decide")
|
|
40955
41302
|
}), "factKind");
|
|
40956
41303
|
|
|
40957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
40958
41305
|
var invoiceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
40959
41306
|
type: "invoice",
|
|
40960
41307
|
list: /* @__PURE__ */ __name((options2) => store.finance.invoices(options2), "list"),
|
|
@@ -40970,7 +41317,7 @@ var paymentKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
40970
41317
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
40971
41318
|
}), "paymentKind");
|
|
40972
41319
|
|
|
40973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/identity-link.js
|
|
40974
41321
|
var rowOf5 = /* @__PURE__ */ __name((action2) => {
|
|
40975
41322
|
const payload = action2.payload;
|
|
40976
41323
|
const [from, to] = payload.persons;
|
|
@@ -41017,7 +41364,7 @@ var identityLinkKind = /* @__PURE__ */ __name((store) => ({
|
|
|
41017
41364
|
}, "decide")
|
|
41018
41365
|
}), "identityLinkKind");
|
|
41019
41366
|
|
|
41020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
41021
41368
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
41022
41369
|
id: `key:${link4.id}`,
|
|
41023
41370
|
kind: "key_document",
|
|
@@ -41085,7 +41432,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
41085
41432
|
};
|
|
41086
41433
|
}, "keyDocumentKind");
|
|
41087
41434
|
|
|
41088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
41089
41436
|
var words3 = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
41090
41437
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
41091
41438
|
switch (finding.kind) {
|
|
@@ -41173,7 +41520,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
41173
41520
|
};
|
|
41174
41521
|
}, "mailFindingsKind");
|
|
41175
41522
|
|
|
41176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
41177
41524
|
var rowOf7 = /* @__PURE__ */ __name((action2, batch) => {
|
|
41178
41525
|
const findings = batch.input.findings;
|
|
41179
41526
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -41237,7 +41584,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
41237
41584
|
};
|
|
41238
41585
|
}, "meetingFindingsKind");
|
|
41239
41586
|
|
|
41240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
41241
41588
|
var STATUS2 = {
|
|
41242
41589
|
proposed: "proposed",
|
|
41243
41590
|
confirmed: "confirmed",
|
|
@@ -41278,7 +41625,7 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
41278
41625
|
}, "decide")
|
|
41279
41626
|
}), "memoryKind");
|
|
41280
41627
|
|
|
41281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
41282
41629
|
var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
41283
41630
|
type: "order",
|
|
41284
41631
|
list: /* @__PURE__ */ __name((options2) => store.orders.list(options2), "list"),
|
|
@@ -41287,7 +41634,7 @@ var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
41287
41634
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason)).ref, "decide")
|
|
41288
41635
|
}), "orderKind");
|
|
41289
41636
|
|
|
41290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
41291
41638
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
41292
41639
|
id: `link:${link4.id}`,
|
|
41293
41640
|
kind: "relationship",
|
|
@@ -41362,7 +41709,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
41362
41709
|
};
|
|
41363
41710
|
}, "relationshipKind");
|
|
41364
41711
|
|
|
41365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
41366
41713
|
var KIND = "relationship_update";
|
|
41367
41714
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
41368
41715
|
var rowOf9 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -41412,7 +41759,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
41412
41759
|
}, "decide")
|
|
41413
41760
|
}), "relationshipUpdateKind");
|
|
41414
41761
|
|
|
41415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/source-review.js
|
|
41416
41763
|
var rowOf10 = /* @__PURE__ */ __name((action2) => {
|
|
41417
41764
|
const payload = action2.payload;
|
|
41418
41765
|
const sources = payload.sources.flatMap((source) => source.ref ?? []);
|
|
@@ -41455,7 +41802,7 @@ var sourceReviewKind = /* @__PURE__ */ __name((store) => ({
|
|
|
41455
41802
|
}, "decide")
|
|
41456
41803
|
}), "sourceReviewKind");
|
|
41457
41804
|
|
|
41458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/subscriptions.js
|
|
41459
41806
|
var subscriptionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
41460
41807
|
type: "subscription",
|
|
41461
41808
|
list: /* @__PURE__ */ __name((options2) => store.subscriptions.list(options2), "list"),
|
|
@@ -41474,7 +41821,7 @@ var subscriptionPriceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
41474
41821
|
}, "decide")
|
|
41475
41822
|
}), "subscriptionPriceKind");
|
|
41476
41823
|
|
|
41477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
41478
41825
|
var rowOf11 = /* @__PURE__ */ __name((task2) => {
|
|
41479
41826
|
const suggestion = task2.closeSuggestion;
|
|
41480
41827
|
if (suggestion === null)
|
|
@@ -41542,7 +41889,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
41542
41889
|
};
|
|
41543
41890
|
}, "taskCloseKind");
|
|
41544
41891
|
|
|
41545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/transactions.js
|
|
41546
41893
|
var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
41547
41894
|
type: "transaction",
|
|
41548
41895
|
list: /* @__PURE__ */ __name((options2) => store.transactions.list(options2), "list"),
|
|
@@ -41551,7 +41898,7 @@ var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
41551
41898
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.transactions.confirm(id2, by, reason) : await store.transactions.reject(id2, by, reason)).ref, "decide")
|
|
41552
41899
|
}), "transactionKind");
|
|
41553
41900
|
|
|
41554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
41555
41902
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
41556
41903
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
41557
41904
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -41602,7 +41949,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
41602
41949
|
}, "get"),
|
|
41603
41950
|
decide: /* @__PURE__ */ __name(async (ids, decision) => {
|
|
41604
41951
|
const parts = /* @__PURE__ */ new Map();
|
|
41605
|
-
const
|
|
41952
|
+
const whole3 = /* @__PURE__ */ new Set();
|
|
41606
41953
|
const order = [];
|
|
41607
41954
|
for (const id2 of ids) {
|
|
41608
41955
|
const [batch, part] = id2.split("/");
|
|
@@ -41613,7 +41960,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
41613
41960
|
order.push(batch);
|
|
41614
41961
|
}
|
|
41615
41962
|
if (part === void 0)
|
|
41616
|
-
|
|
41963
|
+
whole3.add(batch);
|
|
41617
41964
|
else
|
|
41618
41965
|
parts.get(batch)?.push(part);
|
|
41619
41966
|
}
|
|
@@ -41622,7 +41969,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
41622
41969
|
const refuseIds = /* @__PURE__ */ __name((id2, message) => refused.push({ id: id2, code: "validation_error", reason: "proposal.ids", message }), "refuseIds");
|
|
41623
41970
|
for (const id2 of order) {
|
|
41624
41971
|
const chosen = parts.get(id2) ?? [];
|
|
41625
|
-
if (chosen.length &&
|
|
41972
|
+
if (chosen.length && whole3.has(id2)) {
|
|
41626
41973
|
refuseIds(id2, `name ${id2} or some of its parts (${id2}/${chosen[0]}), not both`);
|
|
41627
41974
|
continue;
|
|
41628
41975
|
}
|
|
@@ -41685,7 +42032,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
41685
42032
|
return registry;
|
|
41686
42033
|
}, "proposalRegistry");
|
|
41687
42034
|
|
|
41688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
41689
42036
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
41690
42037
|
const pictures = picturesService(deps);
|
|
41691
42038
|
const base = {
|
|
@@ -41722,7 +42069,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
41722
42069
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
41723
42070
|
}, "servicesFor");
|
|
41724
42071
|
|
|
41725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
41726
42073
|
var COMMAND_NEEDS = {
|
|
41727
42074
|
"account update": ["updateProfile", "change the profile"],
|
|
41728
42075
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -41772,7 +42119,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
41772
42119
|
return group;
|
|
41773
42120
|
}, "hideNever");
|
|
41774
42121
|
|
|
41775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
41776
42123
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
41777
42124
|
command.allowUnknownOption();
|
|
41778
42125
|
const parse2 = command.parseOptions.bind(command);
|
|
@@ -41792,7 +42139,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
41792
42139
|
return command;
|
|
41793
42140
|
}, "queryWordsAfterOptions");
|
|
41794
42141
|
|
|
41795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
41796
42143
|
var count3 = /* @__PURE__ */ __name((value) => {
|
|
41797
42144
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
41798
42145
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -41834,7 +42181,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
41834
42181
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
41835
42182
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
41836
42183
|
|
|
41837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
41838
42185
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
41839
42186
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
41840
42187
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -41857,7 +42204,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
41857
42204
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
41858
42205
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
41859
42206
|
|
|
41860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
41861
42208
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
41862
42209
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
41863
42210
|
const zone = timezoneOf();
|
|
@@ -41943,7 +42290,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
41943
42290
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
41944
42291
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
41945
42292
|
|
|
41946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
41947
42294
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
41948
42295
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
41949
42296
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -42087,7 +42434,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
42087
42434
|
}, "addMeetingCommandsDefinition");
|
|
42088
42435
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
42089
42436
|
|
|
42090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
42091
42438
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
42092
42439
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
42093
42440
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -42220,7 +42567,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
42220
42567
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
42221
42568
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
42222
42569
|
|
|
42223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
42224
42571
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
42225
42572
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
42226
42573
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -42229,7 +42576,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
42229
42576
|
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");
|
|
42230
42577
|
var window2 = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
42231
42578
|
|
|
42232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
42233
42580
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
42234
42581
|
var chatRef2 = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
42235
42582
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -42491,7 +42838,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
42491
42838
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
42492
42839
|
}), "sessionAnswer");
|
|
42493
42840
|
|
|
42494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
42495
42842
|
import { createHash as createHash16 } from "node:crypto";
|
|
42496
42843
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync6, rmSync as rmSync2 } from "node:fs";
|
|
42497
42844
|
import { createConnection, createServer } from "node:net";
|
|
@@ -42639,7 +42986,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
42639
42986
|
}
|
|
42640
42987
|
}, "serve");
|
|
42641
42988
|
|
|
42642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.91.0_commander@15.0.0_esbuild@0.28.2_type_5a9525690cd264264c4a3180795dd7f6/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
42643
42990
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
42644
42991
|
close: /* @__PURE__ */ __name(async () => {
|
|
42645
42992
|
}, "close"),
|
|
@@ -42869,12 +43216,22 @@ export {
|
|
|
42869
43216
|
writeEnrichmentSetting,
|
|
42870
43217
|
enrichmentEndpoint,
|
|
42871
43218
|
isEnrichmentProvider,
|
|
43219
|
+
keyLookup,
|
|
43220
|
+
keyVariable,
|
|
42872
43221
|
enrichmentState,
|
|
42873
43222
|
searchNotesQuery,
|
|
42874
43223
|
embedNotes,
|
|
42875
43224
|
embedMail,
|
|
42876
43225
|
searchNotesOf,
|
|
42877
43226
|
calendarAccounts,
|
|
43227
|
+
searchMeetingHits,
|
|
43228
|
+
HARDER_PROVIDER,
|
|
43229
|
+
DEFAULT_HARDER_MODEL,
|
|
43230
|
+
HARDER_ENDPOINT,
|
|
43231
|
+
HARDER_CANDIDATES,
|
|
43232
|
+
HARDER_CHARS,
|
|
43233
|
+
readHarderSetting,
|
|
43234
|
+
writeHarderSetting,
|
|
42878
43235
|
RESOURCES_SEARCHED,
|
|
42879
43236
|
searchAll,
|
|
42880
43237
|
SERVER_SEARCH_KEY,
|
|
@@ -42926,7 +43283,6 @@ export {
|
|
|
42926
43283
|
dealContext,
|
|
42927
43284
|
dealBrief,
|
|
42928
43285
|
readEvidencePacket,
|
|
42929
|
-
searchMeetingHits,
|
|
42930
43286
|
personBusiness,
|
|
42931
43287
|
canonicalPersonContext,
|
|
42932
43288
|
useTextModel,
|