@wirecat/drive-cli 0.60.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/bin/drive.js +2 -2
- package/dist/browse.d.ts +20 -0
- package/dist/browse.d.ts.map +1 -0
- package/dist/browse.js +146 -0
- package/dist/browse.js.map +1 -0
- package/dist/bundle/{all-profiles-537I27Z4.js → all-profiles-CKD2DWUK.js} +14 -14
- package/dist/bundle/{anthropic-X4NWVHDF.js → anthropic-E3T4USLA.js} +9 -9
- package/dist/bundle/{app-server-KSHJKKS7.js → app-server-JB2AEWWL.js} +58 -55
- package/dist/bundle/{bun-WTBGGCUC.js → bun-CC44AAND.js} +2 -2
- package/dist/bundle/{bun-sqlite-T7Y3JFFD.js → bun-sqlite-AUMFKYVR.js} +8 -8
- package/dist/bundle/{chunk-2AXA5SKP.js → chunk-27YUUGXQ.js} +1 -1
- package/dist/bundle/{chunk-HIP43OGZ.js → chunk-2HF2MRXI.js} +1 -1
- package/dist/bundle/{chunk-AXWXQNTC.js → chunk-2KN35F32.js} +10 -10
- package/dist/bundle/{chunk-EBLA7GXY.js → chunk-4OSSOWDM.js} +2 -1
- package/dist/bundle/{chunk-XFXRGQXJ.js → chunk-4SIZEJ3M.js} +2 -2
- package/dist/bundle/{chunk-LQSRVQ3V.js → chunk-67ZQCWBV.js} +3 -3
- package/dist/bundle/{chunk-FO4TCH6P.js → chunk-6EY46GAN.js} +2 -2
- package/dist/bundle/{chunk-4XZXH2NM.js → chunk-7W5HYGVW.js} +4 -2
- package/dist/bundle/{chunk-FZOCQQ66.js → chunk-7ZXIWZQ6.js} +12 -12
- package/dist/bundle/{chunk-YGG7UA3C.js → chunk-AH5C3D3D.js} +5 -5
- package/dist/bundle/{chunk-YDN2RH5S.js → chunk-AQVUEZEP.js} +2 -2
- package/dist/bundle/{chunk-N7S2UPF3.js → chunk-CJHY5YIF.js} +494 -227
- package/dist/bundle/{chunk-MXP35VPO.js → chunk-CZ2GJHLL.js} +2 -2
- package/dist/bundle/{chunk-HQVIK6PM.js → chunk-DJOAMGF4.js} +262 -368
- package/dist/bundle/{chunk-HCJG7ENG.js → chunk-DRZZBN3V.js} +3 -3
- package/dist/bundle/{chunk-TXMTMEHW.js → chunk-DWJHL6DV.js} +4 -4
- package/dist/bundle/{chunk-S36HRPNS.js → chunk-E43ENLJJ.js} +1 -1
- package/dist/bundle/{chunk-4VHBDVY2.js → chunk-EOOGWUTP.js} +14 -10
- package/dist/bundle/{chunk-5XHLQZAG.js → chunk-EW7PKB4M.js} +58 -49
- package/dist/bundle/{chunk-TKW4QWCY.js → chunk-FEZF3TII.js} +12 -6
- package/dist/bundle/{chunk-KEXTTZJM.js → chunk-FNWIJ6EJ.js} +2 -2
- package/dist/bundle/{chunk-OYNUBWD2.js → chunk-FUITWY7O.js} +1 -1
- package/dist/bundle/{chunk-TVQDMP2F.js → chunk-HCNQT3QE.js} +1440 -771
- package/dist/bundle/{chunk-FTZNUZO7.js → chunk-HG6CAYJH.js} +3 -3
- package/dist/bundle/{chunk-SZXI4OXX.js → chunk-IR4SQLBR.js} +2 -2
- package/dist/bundle/{chunk-UTFATA4K.js → chunk-JK3U25QZ.js} +1 -1
- package/dist/bundle/{chunk-SBHSNOU4.js → chunk-JN5TVEEL.js} +96 -27
- package/dist/bundle/{chunk-IXN7Y6JA.js → chunk-KLFSRKHB.js} +1 -1
- package/dist/bundle/{chunk-57QVQGBE.js → chunk-L7K2MOIC.js} +22 -22
- package/dist/bundle/{chunk-JGUJJNGZ.js → chunk-LQKD257P.js} +582 -424
- package/dist/bundle/{chunk-GVRS5AIH.js → chunk-LWE4JGRN.js} +2 -2
- package/dist/bundle/{chunk-D6WIWOQC.js → chunk-MN4VXU3M.js} +4 -4
- package/dist/bundle/{chunk-QIJWSKZL.js → chunk-N7OZPKU7.js} +4 -4
- package/dist/bundle/{chunk-W62CON5K.js → chunk-O2XOX4HB.js} +34 -10
- package/dist/bundle/{chunk-PDYHEWKG.js → chunk-O7ALBI2I.js} +5 -5
- package/dist/bundle/{chunk-PETFPXLU.js → chunk-OBH5BA62.js} +3 -3
- package/dist/bundle/{chunk-246P2DCT.js → chunk-OD4U7GUY.js} +113 -51
- package/dist/bundle/{chunk-67QXMO2G.js → chunk-ONP2IBHY.js} +26 -26
- package/dist/bundle/{chunk-JQLIM6BH.js → chunk-OTROVC4E.js} +1 -1
- package/dist/bundle/{chunk-73TTP6ET.js → chunk-PEQA6LA5.js} +617 -243
- package/dist/bundle/{chunk-ALWTUDZF.js → chunk-Q2LRPOKL.js} +22 -14
- package/dist/bundle/{chunk-CKGHRWVR.js → chunk-QCKZ3GAA.js} +4 -4
- package/dist/bundle/chunk-QCX6XZLA.js +415 -0
- package/dist/bundle/{chunk-UVLSWLPZ.js → chunk-QH7DOVO3.js} +204 -58
- package/dist/bundle/{chunk-OMKUBCNN.js → chunk-QTI6IVHZ.js} +8 -8
- package/dist/bundle/{chunk-6HTKB4WC.js → chunk-R347FPYU.js} +1 -1
- package/dist/bundle/chunk-RIDQNVZM.js +64 -0
- package/dist/bundle/{chunk-ZPQS7XJA.js → chunk-RPMKG63Z.js} +18 -4
- package/dist/bundle/{chunk-XDIEQ2CE.js → chunk-RWSXVCSG.js} +3 -3
- package/dist/bundle/{chunk-3TQHIHZI.js → chunk-SVPCHFKI.js} +2 -2
- package/dist/bundle/{chunk-V2VMBM7O.js → chunk-SW4I5BR7.js} +2 -2
- package/dist/bundle/{chunk-EHAI773E.js → chunk-T5NWWXS2.js} +2 -2
- package/dist/bundle/{chunk-4CBZEAQ7.js → chunk-T7X53FCJ.js} +34 -34
- package/dist/bundle/{chunk-77C5XRH3.js → chunk-TDX4GZFO.js} +7 -7
- package/dist/bundle/{chunk-PPL5ASW2.js → chunk-U2BFYSQV.js} +14158 -2039
- package/dist/bundle/{chunk-DQDKLZAK.js → chunk-UGXN5D7U.js} +719 -128
- package/dist/bundle/{chunk-UNJE63JK.js → chunk-UOXOLGNG.js} +2 -2
- package/dist/bundle/{chunk-LJ77Y3TK.js → chunk-UQLWMGSD.js} +6 -5
- package/dist/bundle/{chunk-HFGR33KD.js → chunk-VAYB52HF.js} +33 -31
- package/dist/bundle/{chunk-GD6TQ6U4.js → chunk-VQDD64A4.js} +8 -8
- package/dist/bundle/{chunk-22ATLSNK.js → chunk-W4RTIL7S.js} +5 -5
- package/dist/bundle/{chunk-UVYVIHEA.js → chunk-WZKEU7WR.js} +4 -2
- package/dist/bundle/{chunk-5AMRCBMP.js → chunk-XEW2EN6F.js} +51 -37
- package/dist/bundle/{chunk-O37ESNAP.js → chunk-XFRRKZHQ.js} +242 -90
- package/dist/bundle/{chunk-K6XVRA6U.js → chunk-XS5POQST.js} +1 -1
- package/dist/bundle/{chunk-IRZ7OF3F.js → chunk-XZUS7XRO.js} +1 -1
- package/dist/bundle/{chunk-V7QMHMR3.js → chunk-YALI4C7C.js} +6 -6
- package/dist/bundle/{chunk-73MNUSP3.js → chunk-YMWENGKH.js} +1 -1
- package/dist/bundle/{chunk-MVNPE5FZ.js → chunk-YOJDGAPT.js} +8 -8
- package/dist/bundle/{chunk-DMHGWL5D.js → chunk-YPFUYQDP.js} +13 -13
- package/dist/bundle/{chunk-VVCZS42A.js → chunk-YUWPNG7B.js} +1 -1
- package/dist/bundle/{chunk-VRW6ZDTH.js → chunk-YXYTY4GF.js} +39 -26
- package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-ZMOUUOT2.js} +1 -1
- package/dist/bundle/command-contract-OB5BRABN.js +39 -0
- package/dist/bundle/{decode-35N57AFW.js → decode-WIIX3Y2X.js} +8 -8
- package/dist/bundle/{dispatch-CWXZW3PL.js → dispatch-GEFIXA6X.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-3P3QZWMU.js → echarts-OYINM4C4.js} +2 -2
- package/dist/bundle/{embed-Q6Q5IOJQ.js → embed-DWZIYMBX.js} +9 -9
- package/dist/bundle/{embedder-D44JDTAA.js → embedder-ILWH7ZRM.js} +12 -12
- package/dist/bundle/entry-V5V3TOTY.js +22 -0
- package/dist/bundle/{failure-GRMMSDCZ.js → failure-GV77W3CD.js} +4 -4
- package/dist/bundle/first-run-V3VVLQF4.js +30 -0
- package/dist/bundle/first-screen-Y3RIN7FU.js +37 -0
- package/dist/bundle/{google-6ZZDKFBN.js → google-KLZSUAVY.js} +13 -13
- package/dist/bundle/{google-api-E6MOJ4ZD.js → google-api-HZQ5R4ZO.js} +83 -64
- package/dist/bundle/grants-L7XLHLUT.js +105 -0
- package/dist/bundle/{identity-TID7S5NE.js → identity-J2DON4IO.js} +6 -6
- package/dist/bundle/{instructions-ANJN4HV3.js → instructions-HGOJ23AJ.js} +1 -1
- package/dist/bundle/{login-BGMK2ABH.js → login-BD2TS4GY.js} +64 -64
- package/dist/bundle/{mcp-WBHKX5E3.js → mcp-GWDA3HOA.js} +2 -2
- package/dist/bundle/{node-VOB45ES2.js → node-CPKTDPH7.js} +2 -2
- package/dist/bundle/{node-sqlite-TSX6XQY2.js → node-sqlite-IXDCRLSX.js} +9 -9
- package/dist/bundle/oauth-HOGY4YBB.js +22 -0
- package/dist/bundle/{open-3USWHGNR.js → open-O7P3ZV3Y.js} +8 -8
- package/dist/bundle/{openai-YZ5VGPIP.js → openai-RCFQKCXC.js} +17 -17
- package/dist/bundle/{process-44JS2W7L.js → process-KXDRJO22.js} +1 -1
- package/dist/bundle/{program-TZLAFKJV.js → program-UCHFC7JQ.js} +266 -104
- package/dist/bundle/prompt-EVPPBN5W.js +17 -0
- package/dist/bundle/{reasons-ZK3U3CIN.js → reasons-57J2D77K.js} +5 -5
- package/dist/bundle/{recognize-OFW7HWTM.js → recognize-MRCYGP2J.js} +7 -7
- package/dist/bundle/{remote-YBDRZQZ5.js → remote-L3L4PHKF.js} +10 -10
- package/dist/bundle/{rerank-TQQNS5FJ.js → rerank-PSOE6XFT.js} +10 -10
- package/dist/bundle/{serve-OPZXMVLH.js → serve-72OGS3BF.js} +12 -12
- package/dist/bundle/server-C5TGNFXW.js +70 -0
- package/dist/bundle/{server-2D6DDIK5.js → server-SCXKYHBO.js} +44 -44
- package/dist/bundle/{services-34WKT3NN.js → services-YAFTELBI.js} +42 -32
- package/dist/bundle/{sqlite-runtime-WPUMKLUV.js → sqlite-runtime-DLK4SU33.js} +9 -9
- package/dist/bundle/{start-ZXUJZ4JV.js → start-AFFA3LKM.js} +9 -7
- package/dist/bundle/{state-AV2RB3AQ.js → state-T5VNAJSZ.js} +9 -9
- package/dist/bundle/{store-YKV4GAMS.js → store-4OFK7PKQ.js} +48 -28
- package/dist/bundle/{store-3M7N2Q5T.js → store-R6MSY2IM.js} +20 -18
- package/dist/bundle/store-maintenance-command-QDMCXGV6.js +60 -0
- package/dist/bundle/tokens-HIG36RNS.js +103 -0
- package/dist/commands/config.js +1 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/folders.d.ts +2 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +16 -3
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +16 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -17
- package/dist/config.js.map +1 -1
- package/dist/download.d.ts +3 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/download.js +21 -9
- package/dist/download.js.map +1 -1
- package/dist/google-api.d.ts +3 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +27 -7
- package/dist/google-api.js.map +1 -1
- package/dist/login.js +1 -1
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +7 -7
- package/dist/program.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +15 -6
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-77YTRBL6.js +0 -249
- package/dist/bundle/chunk-YYHKVOVK.js +0 -132
- package/dist/bundle/command-contract-NUIWUVYB.js +0 -39
- package/dist/bundle/entry-ZHCNI7XO.js +0 -22
- package/dist/bundle/first-run-3DC2SDWM.js +0 -30
- package/dist/bundle/first-screen-YJF4YODC.js +0 -37
- package/dist/bundle/grants-GWXDH5GM.js +0 -105
- package/dist/bundle/oauth-CEOYXW6C.js +0 -22
- package/dist/bundle/prompt-SG7LAOXW.js +0 -17
- package/dist/bundle/server-R6G2O772.js +0 -70
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +0 -60
- package/dist/bundle/tokens-F63RXXEF.js +0 -103
- package/dist/oauth-application.d.ts +0 -5
- package/dist/oauth-application.d.ts.map +0 -1
- package/dist/oauth-application.js +0 -9
- package/dist/oauth-application.js.map +0 -1
- /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
engineMissing,
|
|
8
8
|
extractText,
|
|
9
9
|
importEngine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ONP2IBHY.js";
|
|
11
11
|
import {
|
|
12
12
|
acquireLock,
|
|
13
13
|
openOrdinaryFile,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
sameOrdinaryFile,
|
|
17
17
|
syncDirectory,
|
|
18
18
|
writeFileAtomic
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YPFUYQDP.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_IMAGE_MODEL,
|
|
22
22
|
DEFAULT_RERANK_MODEL,
|
|
@@ -45,23 +45,23 @@ import {
|
|
|
45
45
|
typedCommand,
|
|
46
46
|
vectorModelKey,
|
|
47
47
|
withAttempt
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VAYB52HF.js";
|
|
49
49
|
import {
|
|
50
50
|
isCliFailure
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-AQVUEZEP.js";
|
|
52
52
|
import {
|
|
53
53
|
isNewer,
|
|
54
54
|
updateCommand
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-QCKZ3GAA.js";
|
|
56
56
|
import {
|
|
57
57
|
MAX_MODEL_IMAGE_BYTES
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-T5NWWXS2.js";
|
|
59
59
|
import {
|
|
60
60
|
OPENAI_URL,
|
|
61
61
|
openRemote,
|
|
62
62
|
remoteKey,
|
|
63
63
|
remoteModel
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-OBH5BA62.js";
|
|
65
65
|
import {
|
|
66
66
|
defaultThreads,
|
|
67
67
|
installNativeRuntime,
|
|
@@ -70,11 +70,11 @@ import {
|
|
|
70
70
|
placedText,
|
|
71
71
|
runEmbedders,
|
|
72
72
|
textModelsDirectory
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-AH5C3D3D.js";
|
|
74
74
|
import {
|
|
75
75
|
installFiles,
|
|
76
76
|
megabytes
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-Q2LRPOKL.js";
|
|
78
78
|
import {
|
|
79
79
|
AGENDA_COLUMNS,
|
|
80
80
|
CHAT_COLUMNS,
|
|
@@ -152,6 +152,7 @@ import {
|
|
|
152
152
|
outOfTime,
|
|
153
153
|
parseLocator,
|
|
154
154
|
parseReference,
|
|
155
|
+
plainQuery,
|
|
155
156
|
pointerOf,
|
|
156
157
|
proposerOfAction,
|
|
157
158
|
providerLabel,
|
|
@@ -167,13 +168,14 @@ import {
|
|
|
167
168
|
validateAst,
|
|
168
169
|
validateFields,
|
|
169
170
|
withoutField
|
|
170
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-U2BFYSQV.js";
|
|
171
172
|
import {
|
|
172
173
|
MAX_TEXT_CHARS,
|
|
173
174
|
attachmentMaxBytes,
|
|
174
175
|
pdfPreviewLimits
|
|
175
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-UOXOLGNG.js";
|
|
176
177
|
import {
|
|
178
|
+
MEETING_FIELD_NAMES,
|
|
177
179
|
MEETING_FINDINGS_KIND,
|
|
178
180
|
TASK_KINDS,
|
|
179
181
|
TASK_ORIGINS,
|
|
@@ -197,7 +199,7 @@ import {
|
|
|
197
199
|
validateMeetingHitSearch,
|
|
198
200
|
validateMeetingPassage,
|
|
199
201
|
validateMeetingSeriesHistory
|
|
200
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-CJHY5YIF.js";
|
|
201
203
|
import {
|
|
202
204
|
OPERATORS_BY_TYPE,
|
|
203
205
|
dateRange,
|
|
@@ -208,29 +210,29 @@ import {
|
|
|
208
210
|
timezoneOf,
|
|
209
211
|
validateQuery,
|
|
210
212
|
walkQuery
|
|
211
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-EOOGWUTP.js";
|
|
212
214
|
import {
|
|
213
215
|
DEFAULT_STEMMERS,
|
|
214
216
|
createStemmer,
|
|
215
217
|
fold,
|
|
216
218
|
normalize
|
|
217
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-YOJDGAPT.js";
|
|
218
220
|
import {
|
|
219
221
|
DEFAULT_TASK_CATEGORIES,
|
|
220
222
|
FALLBACK_CATEGORY
|
|
221
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-TDX4GZFO.js";
|
|
222
224
|
import {
|
|
223
225
|
storePath,
|
|
224
226
|
wirecatDirectory
|
|
225
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-FNWIJ6EJ.js";
|
|
226
228
|
import {
|
|
227
229
|
resolvePaths,
|
|
228
230
|
writeSecurely
|
|
229
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-OD4U7GUY.js";
|
|
230
232
|
import {
|
|
231
233
|
singleLine,
|
|
232
234
|
visibleControls
|
|
233
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-2HF2MRXI.js";
|
|
234
236
|
import {
|
|
235
237
|
array,
|
|
236
238
|
getDotPath,
|
|
@@ -251,16 +253,16 @@ import {
|
|
|
251
253
|
string,
|
|
252
254
|
transform,
|
|
253
255
|
unknown
|
|
254
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-FEZF3TII.js";
|
|
255
257
|
import {
|
|
256
258
|
CliError,
|
|
257
259
|
isCliError
|
|
258
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-4OSSOWDM.js";
|
|
259
261
|
import {
|
|
260
262
|
__name
|
|
261
263
|
} from "./chunk-ZVVMGPBJ.js";
|
|
262
264
|
|
|
263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
264
266
|
var TAKES = {
|
|
265
267
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
266
268
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -320,9 +322,9 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
320
322
|
throw wrongAccount(reference, scope, profiles);
|
|
321
323
|
}, "ensureAccount");
|
|
322
324
|
|
|
323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
324
326
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
325
|
-
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
327
|
+
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
326
328
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
327
329
|
const wanted = foldName(reference.trim());
|
|
328
330
|
const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
|
|
@@ -365,7 +367,7 @@ ${lines}`, { candidates });
|
|
|
365
367
|
}, "ambiguous");
|
|
366
368
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
367
369
|
|
|
368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
369
371
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
370
372
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
371
373
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -442,7 +444,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
442
444
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
443
445
|
}, "storeOnlyDeps");
|
|
444
446
|
|
|
445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
446
448
|
var DAY_MS = 864e5;
|
|
447
449
|
var NEW_DAYS = 30;
|
|
448
450
|
var SAME_TEXT_MIN = 20;
|
|
@@ -519,7 +521,23 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
519
521
|
};
|
|
520
522
|
}, "scorePerson");
|
|
521
523
|
|
|
522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
525
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
526
|
+
const controller = new AbortController();
|
|
527
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
528
|
+
timer.unref();
|
|
529
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
530
|
+
}, "timeLimit");
|
|
531
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
532
|
+
const limit = timeLimit(ms);
|
|
533
|
+
try {
|
|
534
|
+
return await run(limit.signal);
|
|
535
|
+
} finally {
|
|
536
|
+
limit.clear();
|
|
537
|
+
}
|
|
538
|
+
}, "withTimeLimit");
|
|
539
|
+
|
|
540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
523
541
|
var REGISTRIES = {
|
|
524
542
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
525
543
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -528,16 +546,18 @@ var TIMEOUT_MS = 1e4;
|
|
|
528
546
|
var askRegistries = /* @__PURE__ */ __name(async (id2, options = {}) => Promise.all([askCas(id2, options), askLols(id2, options)]), "askRegistries");
|
|
529
547
|
var getJson = /* @__PURE__ */ __name(async (url, headers, { fetch: fetchFn = fetch, timeoutMs = TIMEOUT_MS }) => {
|
|
530
548
|
try {
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
549
|
+
const { status, text: text2 } = await withTimeLimit(timeoutMs, async (signal) => {
|
|
550
|
+
const response = await fetchFn(url, {
|
|
551
|
+
headers: { accept: "application/json", ...headers },
|
|
552
|
+
signal,
|
|
553
|
+
redirect: "error"
|
|
554
|
+
});
|
|
555
|
+
return { status: response.status, text: await response.text() };
|
|
535
556
|
});
|
|
536
|
-
const text2 = await response.text();
|
|
537
557
|
try {
|
|
538
|
-
return { status
|
|
558
|
+
return { status, body: JSON.parse(text2) };
|
|
539
559
|
} catch {
|
|
540
|
-
return { failed: `answered ${
|
|
560
|
+
return { failed: `answered ${status} with something that is not JSON` };
|
|
541
561
|
}
|
|
542
562
|
} catch (error) {
|
|
543
563
|
return {
|
|
@@ -604,7 +624,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
604
624
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
605
625
|
})), "notCovered");
|
|
606
626
|
|
|
607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
608
628
|
var ACTIVITY_MESSAGES = 1e3;
|
|
609
629
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
610
630
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -692,7 +712,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
692
712
|
};
|
|
693
713
|
}, "botCheckService");
|
|
694
714
|
|
|
695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
696
716
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
697
717
|
if (newest === null)
|
|
698
718
|
return null;
|
|
@@ -701,7 +721,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
701
721
|
return newest.addressed ? "owed" : null;
|
|
702
722
|
}, "mailTurn");
|
|
703
723
|
|
|
704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
705
725
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
706
726
|
if (error instanceof CliError && error.code === "not_found")
|
|
707
727
|
return void 0;
|
|
@@ -759,7 +779,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account2, since, chats)
|
|
|
759
779
|
};
|
|
760
780
|
}, "mailActivity");
|
|
761
781
|
|
|
762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
763
783
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
764
784
|
const ids = [...new Set(chatIds)];
|
|
765
785
|
if (ids.length === 0)
|
|
@@ -785,7 +805,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
785
805
|
}));
|
|
786
806
|
}, "chatCoverage");
|
|
787
807
|
|
|
788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
789
809
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
790
810
|
if (value === void 0)
|
|
791
811
|
return void 0;
|
|
@@ -795,7 +815,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
795
815
|
return id2;
|
|
796
816
|
}, "threadIdOf");
|
|
797
817
|
|
|
798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
799
819
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
800
820
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
801
821
|
if (key in own)
|
|
@@ -812,15 +832,15 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
812
832
|
return found.bind(adapter);
|
|
813
833
|
}, "capability");
|
|
814
834
|
|
|
815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
816
836
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
817
837
|
|
|
818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
819
839
|
import { randomBytes } from "node:crypto";
|
|
820
840
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
821
841
|
var newOperationId = newSendId;
|
|
822
842
|
|
|
823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
824
844
|
var LINKS = /https?:\/\/\S+/g;
|
|
825
845
|
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");
|
|
826
846
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -850,7 +870,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
850
870
|
});
|
|
851
871
|
}, "questions");
|
|
852
872
|
|
|
853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
854
874
|
var TOP_POSTS = 5;
|
|
855
875
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
856
876
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -967,7 +987,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
967
987
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
968
988
|
}, "median");
|
|
969
989
|
|
|
970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
971
991
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
972
992
|
const events = [];
|
|
973
993
|
for (const stay of stays) {
|
|
@@ -999,7 +1019,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
999
1019
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
1000
1020
|
}, "memberEvents");
|
|
1001
1021
|
|
|
1002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
1003
1023
|
var AUDIT_PAGE = 200;
|
|
1004
1024
|
var AUDIT_BUDGET = 10;
|
|
1005
1025
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -1079,7 +1099,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
1079
1099
|
return found;
|
|
1080
1100
|
}, "burstJoins");
|
|
1081
1101
|
|
|
1082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
1083
1103
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
1084
1104
|
if (deps.reads !== "store")
|
|
1085
1105
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -1238,7 +1258,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
1238
1258
|
}
|
|
1239
1259
|
}, "senderAmong");
|
|
1240
1260
|
|
|
1241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
1242
1262
|
var EVENTS_DAYS = 7;
|
|
1243
1263
|
var TRACKED_DAYS = 30;
|
|
1244
1264
|
var STATS_PAGE = 1e3;
|
|
@@ -1356,8 +1376,8 @@ var chatsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
1356
1376
|
});
|
|
1357
1377
|
const counts = await store.roster.memberCounts(chatId, { since: new Date(from).toISOString().slice(0, 10) });
|
|
1358
1378
|
const known2 = unrecorded ? { ...stats, complete: false, membersUnrecorded: true } : stats;
|
|
1359
|
-
const
|
|
1360
|
-
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ?
|
|
1379
|
+
const counted2 = counts.length > 0 ? { ...known2, memberCounts: counts } : known2;
|
|
1380
|
+
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ? counted2 : { ...counted2, fetch: typedCommand(deps.messenger.app.command, `messages sync ${chatId}`) };
|
|
1361
1381
|
}, "stats"),
|
|
1362
1382
|
sendAs: /* @__PURE__ */ __name(async (chat) => {
|
|
1363
1383
|
if (deps.offline) {
|
|
@@ -1533,7 +1553,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
1533
1553
|
return members.length === 0 ? null : members;
|
|
1534
1554
|
}, "storedMembers");
|
|
1535
1555
|
|
|
1536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
1537
1557
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
1538
1558
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
1539
1559
|
const name = typed.trim().toLowerCase();
|
|
@@ -1557,7 +1577,7 @@ var triggerStems = /* @__PURE__ */ __name((categories) => {
|
|
|
1557
1577
|
const { english, spanish } = stemmersOf();
|
|
1558
1578
|
const built = categories.map(({ name, triggers }) => ({
|
|
1559
1579
|
name,
|
|
1560
|
-
english: new Set(Object.values(triggers).flatMap((
|
|
1580
|
+
english: new Set(Object.values(triggers).flatMap((words4) => words4.flatMap((word) => english.stemTokens(word)))),
|
|
1561
1581
|
spanish: new Set(triggers.es.flatMap((word) => spanish.stemTokens(word)))
|
|
1562
1582
|
}));
|
|
1563
1583
|
stemsByList.set(categories, built);
|
|
@@ -1567,7 +1587,7 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
1567
1587
|
const stem = stemmersOf();
|
|
1568
1588
|
const english = stem.english.stemTokens(text2);
|
|
1569
1589
|
const spanish = readsSpanish(text2) ? stem.spanish.stemTokens(text2) : [];
|
|
1570
|
-
const
|
|
1590
|
+
const counted2 = [];
|
|
1571
1591
|
for (const triggers of triggerStems(categories)) {
|
|
1572
1592
|
const hit = /* @__PURE__ */ new Set();
|
|
1573
1593
|
english.forEach((word, at) => {
|
|
@@ -1577,20 +1597,20 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
1577
1597
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
1578
1598
|
hit.add(other);
|
|
1579
1599
|
});
|
|
1580
|
-
|
|
1600
|
+
counted2.push({ name: triggers.name, hits: hit.size });
|
|
1581
1601
|
}
|
|
1582
|
-
return
|
|
1602
|
+
return counted2;
|
|
1583
1603
|
}, "hitsByList");
|
|
1584
1604
|
var listsHit = /* @__PURE__ */ __name((text2, categories) => hitsByList(text2, categories).filter(({ hits }) => hits > 0).map(({ name }) => name), "listsHit");
|
|
1585
1605
|
var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGORIES) => {
|
|
1586
1606
|
let best = { name: FALLBACK_CATEGORY, hits: 0 };
|
|
1587
|
-
for (const
|
|
1588
|
-
if (
|
|
1589
|
-
best =
|
|
1607
|
+
for (const counted2 of hitsByList(text2, categories))
|
|
1608
|
+
if (counted2.hits > best.hits)
|
|
1609
|
+
best = counted2;
|
|
1590
1610
|
return best.name;
|
|
1591
1611
|
}, "categorize");
|
|
1592
1612
|
|
|
1593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
1594
1614
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
1595
1615
|
var RULES_IN = {
|
|
1596
1616
|
dialog: "all",
|
|
@@ -1796,7 +1816,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
1796
1816
|
return passes;
|
|
1797
1817
|
}, "applyTaskRulesToChats");
|
|
1798
1818
|
|
|
1799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
1800
1820
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
1801
1821
|
const tags = /* @__PURE__ */ new Map();
|
|
1802
1822
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -1805,7 +1825,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
1805
1825
|
return tags;
|
|
1806
1826
|
}, "taskTagFilters");
|
|
1807
1827
|
|
|
1808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
1809
1829
|
var DAY = 864e5;
|
|
1810
1830
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
1811
1831
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -2052,7 +2072,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
2052
2072
|
};
|
|
2053
2073
|
}, "agendaItem");
|
|
2054
2074
|
|
|
2055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
2056
2076
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
2057
2077
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
2058
2078
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -2116,7 +2136,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
2116
2136
|
}
|
|
2117
2137
|
}, "validateContextEvidencePage");
|
|
2118
2138
|
|
|
2119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
2120
2140
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
2121
2141
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
2122
2142
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -2169,7 +2189,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
2169
2189
|
};
|
|
2170
2190
|
}, "contextReadBudget");
|
|
2171
2191
|
|
|
2172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
2173
2193
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
2174
2194
|
if (!port || typeof port.read !== "function")
|
|
2175
2195
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -2213,7 +2233,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
2213
2233
|
};
|
|
2214
2234
|
}, "createContextEvidenceReader");
|
|
2215
2235
|
|
|
2216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
2217
2237
|
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");
|
|
2218
2238
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
2219
2239
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -2229,7 +2249,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
2229
2249
|
}, "excerpt");
|
|
2230
2250
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
2231
2251
|
|
|
2232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
2233
2253
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
2234
2254
|
dryRun,
|
|
2235
2255
|
source: null,
|
|
@@ -2304,7 +2324,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account: account2,
|
|
|
2304
2324
|
return receipt;
|
|
2305
2325
|
}, "ingest");
|
|
2306
2326
|
|
|
2307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
2308
2328
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
2309
2329
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
2310
2330
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -2343,7 +2363,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
2343
2363
|
return found;
|
|
2344
2364
|
}, "identitiesIn");
|
|
2345
2365
|
|
|
2346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
2347
2367
|
var SEARCH_LIMIT = 500;
|
|
2348
2368
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
2349
2369
|
var aliasHits = {
|
|
@@ -2392,7 +2412,7 @@ var aliasHits = {
|
|
|
2392
2412
|
}, "candidates")
|
|
2393
2413
|
};
|
|
2394
2414
|
|
|
2395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
2396
2416
|
var WEIGHT = 0.5;
|
|
2397
2417
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
2398
2418
|
var LARGE_GROUP = 30;
|
|
@@ -2444,7 +2464,7 @@ var chatSenders = {
|
|
|
2444
2464
|
}, "candidates")
|
|
2445
2465
|
};
|
|
2446
2466
|
|
|
2447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
2448
2468
|
var WEIGHT2 = 0.7;
|
|
2449
2469
|
var chatTitle = {
|
|
2450
2470
|
id: "chat-title",
|
|
@@ -2483,7 +2503,7 @@ var chatTitle = {
|
|
|
2483
2503
|
}, "candidates")
|
|
2484
2504
|
};
|
|
2485
2505
|
|
|
2486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
2487
2507
|
var WEIGHT3 = 0.3;
|
|
2488
2508
|
var CONTACTS = 500;
|
|
2489
2509
|
var MOST_PAIRS = 200;
|
|
@@ -2544,7 +2564,7 @@ var emailDomain = {
|
|
|
2544
2564
|
}, "candidates")
|
|
2545
2565
|
};
|
|
2546
2566
|
|
|
2547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
2548
2568
|
var NAMED = 0.7;
|
|
2549
2569
|
var MEMBER_ONLY = 0.3;
|
|
2550
2570
|
var READ_LIMIT2 = 500;
|
|
@@ -2617,7 +2637,7 @@ var mailThread = {
|
|
|
2617
2637
|
}, "candidates")
|
|
2618
2638
|
};
|
|
2619
2639
|
|
|
2620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
2621
2641
|
var WEIGHT4 = 0.5;
|
|
2622
2642
|
var memberChats = {
|
|
2623
2643
|
id: "member-chats",
|
|
@@ -2657,7 +2677,7 @@ var memberChats = {
|
|
|
2657
2677
|
}, "candidates")
|
|
2658
2678
|
};
|
|
2659
2679
|
|
|
2660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
2661
2681
|
var WEIGHT5 = 0.6;
|
|
2662
2682
|
var memberDialog = {
|
|
2663
2683
|
id: "member-dialog",
|
|
@@ -2691,7 +2711,7 @@ var memberDialog = {
|
|
|
2691
2711
|
}, "candidates")
|
|
2692
2712
|
};
|
|
2693
2713
|
|
|
2694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
2695
2715
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
2696
2716
|
var DEFAULT_PURPOSES = ["work"];
|
|
2697
2717
|
var LINK_PURPOSE = "work";
|
|
@@ -2702,15 +2722,15 @@ var unknown2 = /* @__PURE__ */ __name((asked, config) => {
|
|
|
2702
2722
|
throw new CliError("validation_error", `unknown purpose ${wrong.join(", ")}; the configured ones are ${config.purposes.join(", ")}, or all`, { param: "purpose", purposes: [...config.purposes] });
|
|
2703
2723
|
}, "unknown");
|
|
2704
2724
|
var purposesOf = /* @__PURE__ */ __name((asked, config = BUILT_IN_PURPOSE_CONFIG, project) => {
|
|
2705
|
-
const
|
|
2706
|
-
if (
|
|
2707
|
-
if (
|
|
2725
|
+
const words4 = (asked ?? []).map((one2) => one2.trim()).filter(Boolean);
|
|
2726
|
+
if (words4.includes("all")) {
|
|
2727
|
+
if (words4.length > 1)
|
|
2708
2728
|
throw new CliError("validation_error", "--purpose all reads every purpose; give it alone");
|
|
2709
2729
|
return "all";
|
|
2710
2730
|
}
|
|
2711
|
-
if (
|
|
2712
|
-
unknown2(
|
|
2713
|
-
return new Set(
|
|
2731
|
+
if (words4.length) {
|
|
2732
|
+
unknown2(words4, config);
|
|
2733
|
+
return new Set(words4);
|
|
2714
2734
|
}
|
|
2715
2735
|
const own = (project?.key ? config.projects?.[project.key] : void 0) ?? (project?.ref ? config.projects?.[project.ref] : void 0);
|
|
2716
2736
|
return new Set(own ?? config.defaults);
|
|
@@ -2721,7 +2741,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
2721
2741
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
2722
2742
|
], "purposeList");
|
|
2723
2743
|
|
|
2724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
2725
2745
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
2726
2746
|
async around(ref, window2) {
|
|
2727
2747
|
const at = parseLocator(ref);
|
|
@@ -2740,8 +2760,8 @@ var wordsOf = /* @__PURE__ */ __name((text2) => (text2.match(/[\p{L}\p{N}\p{M}]+
|
|
|
2740
2760
|
var documentMatches = /* @__PURE__ */ __name((text2, queries, window2) => {
|
|
2741
2761
|
const paragraphs = text2.split(/\n\s*\n/).map((part) => part.replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
2742
2762
|
const query = queries.join(" ");
|
|
2743
|
-
const
|
|
2744
|
-
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) =>
|
|
2763
|
+
const words4 = new Set(wordsOf(query));
|
|
2764
|
+
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) => words4.has(word)) ? [index] : []);
|
|
2745
2765
|
const hit = matching2[0];
|
|
2746
2766
|
if (hit === void 0 || paragraphs.length < 2)
|
|
2747
2767
|
return { around: [], moreMatches: 0 };
|
|
@@ -2817,7 +2837,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
2817
2837
|
};
|
|
2818
2838
|
}, "storedNeighbours");
|
|
2819
2839
|
|
|
2820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
2821
2841
|
import { createHash } from "node:crypto";
|
|
2822
2842
|
var DAY2 = 864e5;
|
|
2823
2843
|
var MAX_TIME = 864e13;
|
|
@@ -2851,10 +2871,10 @@ var text = /* @__PURE__ */ __name((value, name, max) => typeof value === "string
|
|
|
2851
2871
|
var whole = /* @__PURE__ */ __name((value, name, low, high) => Number.isSafeInteger(value) && value >= low && value <= high ? value : fail(`${name} must be a whole number from ${low} to ${high}`, name), "whole");
|
|
2852
2872
|
var laneQuery = /* @__PURE__ */ __name((value, name) => {
|
|
2853
2873
|
const query = text(value, name, 2048);
|
|
2854
|
-
const
|
|
2855
|
-
if (!
|
|
2874
|
+
const words4 = query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
2875
|
+
if (!words4.length || words4.length > 16)
|
|
2856
2876
|
fail(`${name} needs 1\u201316 literal words`, name);
|
|
2857
|
-
return
|
|
2877
|
+
return words4.join(" ");
|
|
2858
2878
|
}, "laneQuery");
|
|
2859
2879
|
var list = /* @__PURE__ */ __name((value, name, max) => {
|
|
2860
2880
|
if (value === void 0)
|
|
@@ -3133,7 +3153,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
3133
3153
|
return value;
|
|
3134
3154
|
}, "decodeCheckpoint");
|
|
3135
3155
|
|
|
3136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
3137
3157
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
3138
3158
|
var PAGE = 20;
|
|
3139
3159
|
var PEOPLE = 20;
|
|
@@ -3537,7 +3557,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
3537
3557
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
3538
3558
|
}, "peopleOf");
|
|
3539
3559
|
|
|
3540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
3541
3561
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
3542
3562
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
3543
3563
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -3602,7 +3622,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
3602
3622
|
omittedMatches: omitted
|
|
3603
3623
|
})), "matchProjectCandidates");
|
|
3604
3624
|
|
|
3605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
3606
3626
|
var KINDS = ["project", "tag", "topic"];
|
|
3607
3627
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
3608
3628
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -3657,7 +3677,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
3657
3677
|
};
|
|
3658
3678
|
}, "findEvidenceMentions");
|
|
3659
3679
|
|
|
3660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
3661
3681
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account2, chatId, { since, until }) => {
|
|
3662
3682
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
3663
3683
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -3925,7 +3945,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
3925
3945
|
const leftOut = [];
|
|
3926
3946
|
for (const one2 of all.filter((chat) => !purposeRead(purposes, chat.purpose))) {
|
|
3927
3947
|
const account2 = { provider: one2.provider, account: one2.account };
|
|
3928
|
-
const [
|
|
3948
|
+
const [counted2, [held]] = await Promise.all([
|
|
3929
3949
|
count2(account2, one2.chat, { since: gathered.window.after, until: gathered.window.before }),
|
|
3930
3950
|
chatCoverage(store, account2, [one2.chat])
|
|
3931
3951
|
]);
|
|
@@ -3938,7 +3958,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
3938
3958
|
purpose: one2.purpose ?? LINK_PURPOSE,
|
|
3939
3959
|
relationship: one2.relationship,
|
|
3940
3960
|
...one2.proposed ? { proposed: one2.proposed } : {},
|
|
3941
|
-
...
|
|
3961
|
+
...counted2
|
|
3942
3962
|
});
|
|
3943
3963
|
}
|
|
3944
3964
|
return {
|
|
@@ -3963,7 +3983,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
3963
3983
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
3964
3984
|
}, "purposeHintOf");
|
|
3965
3985
|
|
|
3966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
3967
3987
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
3968
3988
|
var PERSON_SCORERS = [emailDomain];
|
|
3969
3989
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -4171,18 +4191,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
4171
4191
|
}, "referenceOf");
|
|
4172
4192
|
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");
|
|
4173
4193
|
|
|
4174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
4175
4195
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
4176
4196
|
|
|
4177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
4178
4198
|
import { lstat } from "node:fs/promises";
|
|
4179
4199
|
|
|
4180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
4181
4201
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
4182
4202
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
4183
4203
|
import { join as join2 } from "node:path";
|
|
4184
4204
|
|
|
4185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
4186
4206
|
import { createHash as createHash2 } from "node:crypto";
|
|
4187
4207
|
var metadataLimit = 16384;
|
|
4188
4208
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -4242,7 +4262,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
4242
4262
|
}
|
|
4243
4263
|
}, "readPartialMetadata");
|
|
4244
4264
|
|
|
4245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
4246
4266
|
import { randomUUID } from "node:crypto";
|
|
4247
4267
|
import { open, rename, unlink } from "node:fs/promises";
|
|
4248
4268
|
import { join } from "node:path";
|
|
@@ -4334,7 +4354,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
4334
4354
|
};
|
|
4335
4355
|
}, "partialWriter");
|
|
4336
4356
|
|
|
4337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
4338
4358
|
var NativeRecordingPartialStore = class {
|
|
4339
4359
|
static {
|
|
4340
4360
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -4441,12 +4461,12 @@ var NativeRecordingPartialStore = class {
|
|
|
4441
4461
|
}
|
|
4442
4462
|
};
|
|
4443
4463
|
|
|
4444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
4445
4465
|
import { createHash as createHash4 } from "node:crypto";
|
|
4446
4466
|
import { link } from "node:fs/promises";
|
|
4447
4467
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
4448
4468
|
|
|
4449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
4450
4470
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
4451
4471
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
4452
4472
|
signal?.throwIfAborted();
|
|
@@ -4481,7 +4501,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
4481
4501
|
signal?.throwIfAborted();
|
|
4482
4502
|
}, "commitPublication");
|
|
4483
4503
|
|
|
4484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
4485
4505
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
4486
4506
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
4487
4507
|
import { join as join3 } from "node:path";
|
|
@@ -4554,7 +4574,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
4554
4574
|
}
|
|
4555
4575
|
}, "writePublicationJournal");
|
|
4556
4576
|
|
|
4557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
4558
4578
|
var NativeRecordingPublication = class {
|
|
4559
4579
|
static {
|
|
4560
4580
|
__name(this, "NativeRecordingPublication");
|
|
@@ -4627,7 +4647,7 @@ var NativeRecordingPublication = class {
|
|
|
4627
4647
|
}
|
|
4628
4648
|
};
|
|
4629
4649
|
|
|
4630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
4631
4651
|
import { createHash as createHash5 } from "node:crypto";
|
|
4632
4652
|
import { readdir } from "node:fs/promises";
|
|
4633
4653
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -4714,7 +4734,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
4714
4734
|
beforePublish
|
|
4715
4735
|
}), "commitMediaEntry");
|
|
4716
4736
|
|
|
4717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
4718
4738
|
var validator = '"media-completed-v1"';
|
|
4719
4739
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
4720
4740
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -4815,7 +4835,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
4815
4835
|
return entry;
|
|
4816
4836
|
}, "archiveMediaFile");
|
|
4817
4837
|
|
|
4818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
4819
4839
|
import { mkdir, realpath } from "node:fs/promises";
|
|
4820
4840
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
4821
4841
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -4882,7 +4902,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory, signal, run
|
|
|
4882
4902
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
4883
4903
|
}, "withMediaArchiveLocks");
|
|
4884
4904
|
|
|
4885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
4886
4906
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
4887
4907
|
if (value === void 0)
|
|
4888
4908
|
return void 0;
|
|
@@ -5035,7 +5055,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
5035
5055
|
}, { create: true });
|
|
5036
5056
|
}, "archiveMedia");
|
|
5037
5057
|
|
|
5038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
5039
5059
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
5040
5060
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
5041
5061
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory) => {
|
|
@@ -5188,7 +5208,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
5188
5208
|
}, { additional: [target], createAdditional: !options.dryRun });
|
|
5189
5209
|
}, "moveMediaArchive");
|
|
5190
5210
|
|
|
5191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
5192
5212
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
5193
5213
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
5194
5214
|
}, "progress") }) => {
|
|
@@ -5199,7 +5219,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
5199
5219
|
}
|
|
5200
5220
|
}, "nativeRuntime");
|
|
5201
5221
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
5202
|
-
}, "progress"), acceptTerms = false }) => {
|
|
5222
|
+
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
5203
5223
|
const model = textModel(id2);
|
|
5204
5224
|
if (model.terms && !acceptTerms) {
|
|
5205
5225
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
@@ -5207,11 +5227,11 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5207
5227
|
const directory = textModelsDirectory(env);
|
|
5208
5228
|
if (!isTextModelInstalled(model, directory)) {
|
|
5209
5229
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
5210
|
-
await installFiles(placedText(model, directory), { progress });
|
|
5230
|
+
await installFiles(placedText(model, directory), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
5211
5231
|
}
|
|
5212
5232
|
await nativeRuntime({ env, progress });
|
|
5213
5233
|
progress(`${model.id}: loading it once to check it works`);
|
|
5214
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
5234
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-DWZIYMBX.js");
|
|
5215
5235
|
const embedder = await openEmbedder2(model, directory);
|
|
5216
5236
|
try {
|
|
5217
5237
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -5223,16 +5243,16 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5223
5243
|
return { model, directory };
|
|
5224
5244
|
}, "downloadTextModel");
|
|
5225
5245
|
var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
5226
|
-
}, "progress") }) => {
|
|
5246
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
5227
5247
|
const model = rerankModel(id2);
|
|
5228
5248
|
const directory = textModelsDirectory(env);
|
|
5229
5249
|
if (!isTextModelInstalled(model, directory)) {
|
|
5230
5250
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
5231
|
-
await installFiles(placedText(model, directory), { progress });
|
|
5251
|
+
await installFiles(placedText(model, directory), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
5232
5252
|
}
|
|
5233
5253
|
await nativeRuntime({ env, progress });
|
|
5234
5254
|
progress(`${model.id}: loading it once to check it works`);
|
|
5235
|
-
const { openReranker } = await import("./rerank-
|
|
5255
|
+
const { openReranker } = await import("./rerank-PSOE6XFT.js");
|
|
5236
5256
|
const reranker = await openReranker(model, directory);
|
|
5237
5257
|
try {
|
|
5238
5258
|
await reranker.score("check", ["check"]);
|
|
@@ -5242,15 +5262,15 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
5242
5262
|
return { model, directory };
|
|
5243
5263
|
}, "downloadRerankModel");
|
|
5244
5264
|
var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
5245
|
-
}, "progress") }) => {
|
|
5265
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
5246
5266
|
const model = imageModel(id2);
|
|
5247
5267
|
const directory = imageModelsDirectory(env);
|
|
5248
5268
|
if (!isImageModelInstalled(model, directory)) {
|
|
5249
5269
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
5250
|
-
await installFiles(placedImage(model, directory), { progress });
|
|
5270
|
+
await installFiles(placedImage(model, directory), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
5251
5271
|
}
|
|
5252
5272
|
progress(`${model.id}: loading it once to check it works`);
|
|
5253
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
5273
|
+
const { openPictureEmbedder } = await import("./embedder-ILWH7ZRM.js");
|
|
5254
5274
|
const embedder = await openPictureEmbedder(model, directory);
|
|
5255
5275
|
try {
|
|
5256
5276
|
const vector = await embedder.embedQuery("check");
|
|
@@ -5262,7 +5282,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5262
5282
|
return { model, directory };
|
|
5263
5283
|
}, "downloadImageModel");
|
|
5264
5284
|
|
|
5265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
5266
5286
|
var MONEY_REQUEST = "money-request";
|
|
5267
5287
|
var MONEY_DONE = "money-done";
|
|
5268
5288
|
var PROMISE = "promise";
|
|
@@ -5296,10 +5316,10 @@ var MONEY_WORDS = [
|
|
|
5296
5316
|
}
|
|
5297
5317
|
];
|
|
5298
5318
|
|
|
5299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
5300
5320
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
5301
5321
|
|
|
5302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
5303
5323
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
5304
5324
|
var MONEY_DONE_FORMS = words([
|
|
5305
5325
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -5339,7 +5359,7 @@ var PROMISE_FORMS = words([
|
|
|
5339
5359
|
"estar\xE1 listo"
|
|
5340
5360
|
]);
|
|
5341
5361
|
|
|
5342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
5343
5363
|
var EXCERPT_CHARS = 80;
|
|
5344
5364
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
5345
5365
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -5361,7 +5381,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
5361
5381
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
5362
5382
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
5363
5383
|
|
|
5364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
5365
5385
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
5366
5386
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
5367
5387
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -5401,10 +5421,10 @@ var rowsOf = /* @__PURE__ */ __name((chat) => chat.messages.flatMap((message) =>
|
|
|
5401
5421
|
var centsText = /* @__PURE__ */ __name((cents) => `${Math.floor(cents / 100)}.${String(cents % 100).padStart(2, "0")}`, "centsText");
|
|
5402
5422
|
var amounts = {
|
|
5403
5423
|
id: "amounts",
|
|
5404
|
-
version:
|
|
5424
|
+
version: 3,
|
|
5405
5425
|
scope: "chat",
|
|
5406
|
-
read: /* @__PURE__ */ __name(async (
|
|
5407
|
-
if (!chat)
|
|
5426
|
+
read: /* @__PURE__ */ __name(async (context2, chat) => {
|
|
5427
|
+
if (!chat || context2.books)
|
|
5408
5428
|
return [];
|
|
5409
5429
|
const groups = /* @__PURE__ */ new Map();
|
|
5410
5430
|
for (const row of rowsOf(chat)) {
|
|
@@ -5417,7 +5437,8 @@ var amounts = {
|
|
|
5417
5437
|
const lastAsk = asks.at(-1);
|
|
5418
5438
|
const first = asks[0] ?? done2[0] ?? rows[0];
|
|
5419
5439
|
const paidAfter = done2.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
|
|
5420
|
-
const
|
|
5440
|
+
const paid2 = asks.length ? paidAfter : done2.length > 0;
|
|
5441
|
+
const state = paid2 ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
|
|
5421
5442
|
const cited2 = asks.length ? [...asks, ...paidAfter ? done2.slice(-1) : []] : rows;
|
|
5422
5443
|
return {
|
|
5423
5444
|
signal: "amounts",
|
|
@@ -5438,10 +5459,10 @@ var amounts = {
|
|
|
5438
5459
|
};
|
|
5439
5460
|
});
|
|
5440
5461
|
}, "read"),
|
|
5441
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "
|
|
5462
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
5442
5463
|
};
|
|
5443
5464
|
|
|
5444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
5445
5466
|
var children = {
|
|
5446
5467
|
id: "children",
|
|
5447
5468
|
version: 1,
|
|
@@ -5470,7 +5491,7 @@ var children = {
|
|
|
5470
5491
|
}, "read")
|
|
5471
5492
|
};
|
|
5472
5493
|
|
|
5473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
5474
5495
|
var coverage = {
|
|
5475
5496
|
id: "coverage",
|
|
5476
5497
|
version: 1,
|
|
@@ -5499,29 +5520,7 @@ var coverage = {
|
|
|
5499
5520
|
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")
|
|
5500
5521
|
};
|
|
5501
5522
|
|
|
5502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5503
|
-
var lastMessage = {
|
|
5504
|
-
id: "last-message",
|
|
5505
|
-
version: 1,
|
|
5506
|
-
scope: "chat",
|
|
5507
|
-
read: /* @__PURE__ */ __name(async (_context, chat) => {
|
|
5508
|
-
const last = chat?.messages.at(-1);
|
|
5509
|
-
if (!chat || !last)
|
|
5510
|
-
return [];
|
|
5511
|
-
const item2 = {
|
|
5512
|
-
signal: "last-message",
|
|
5513
|
-
chat: chat.ref,
|
|
5514
|
-
at: last.timestamp,
|
|
5515
|
-
who: whoOf(last),
|
|
5516
|
-
evidence: evidenceOf(chat, last),
|
|
5517
|
-
basis: "store",
|
|
5518
|
-
data: {}
|
|
5519
|
-
};
|
|
5520
|
-
return [item2];
|
|
5521
|
-
}, "read")
|
|
5522
|
-
};
|
|
5523
|
-
|
|
5524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
5523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
5525
5524
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
5526
5525
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
5527
5526
|
signal: "payments",
|
|
@@ -5571,7 +5570,7 @@ var payments = {
|
|
|
5571
5570
|
}, "read")
|
|
5572
5571
|
};
|
|
5573
5572
|
|
|
5574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
5575
5574
|
var PATTERNS_PER_CHAT = 3;
|
|
5576
5575
|
var DAY3 = 864e5;
|
|
5577
5576
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -5660,7 +5659,7 @@ var promises = {
|
|
|
5660
5659
|
}, "read")
|
|
5661
5660
|
};
|
|
5662
5661
|
|
|
5663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
5664
5663
|
var PER_SIDE = 5;
|
|
5665
5664
|
var WEEK = 7 * 864e5;
|
|
5666
5665
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -5691,7 +5690,7 @@ var questions2 = {
|
|
|
5691
5690
|
}, "attention")
|
|
5692
5691
|
};
|
|
5693
5692
|
|
|
5694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
5695
5694
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
5696
5695
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
5697
5696
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -5759,14 +5758,14 @@ var replyNext = {
|
|
|
5759
5758
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
5760
5759
|
};
|
|
5761
5760
|
|
|
5762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
5763
5762
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
5764
5763
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
5765
5764
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
5766
|
-
const
|
|
5765
|
+
const words4 = normalize(query).split(" ").filter(Boolean).map(wholeWord);
|
|
5767
5766
|
return (text2) => {
|
|
5768
5767
|
const folded2 = normalize(text2);
|
|
5769
|
-
return
|
|
5768
|
+
return words4.length > 0 && words4.every((word) => word.test(folded2));
|
|
5770
5769
|
};
|
|
5771
5770
|
}, "matcherOf");
|
|
5772
5771
|
var topics = {
|
|
@@ -5805,9 +5804,8 @@ var topics = {
|
|
|
5805
5804
|
}, "read")
|
|
5806
5805
|
};
|
|
5807
5806
|
|
|
5808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
5809
5808
|
var STATUS_SIGNALS = [
|
|
5810
|
-
lastMessage,
|
|
5811
5809
|
replyNext,
|
|
5812
5810
|
questions2,
|
|
5813
5811
|
promises,
|
|
@@ -5818,7 +5816,7 @@ var STATUS_SIGNALS = [
|
|
|
5818
5816
|
children
|
|
5819
5817
|
];
|
|
5820
5818
|
|
|
5821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
5822
5820
|
var DAY4 = 864e5;
|
|
5823
5821
|
var STATUS_WINDOW = 300;
|
|
5824
5822
|
var STATUS_CHATS = 16;
|
|
@@ -5863,17 +5861,23 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
5863
5861
|
}, "childrenOf");
|
|
5864
5862
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account2) => accounts === void 0 || accounts.some((one2) => one2.provider === provider && one2.account === account2), "inAccounts");
|
|
5865
5863
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
5866
|
-
var
|
|
5867
|
-
const
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5864
|
+
var owed = /* @__PURE__ */ __name((item2) => {
|
|
5865
|
+
const data = item2.data;
|
|
5866
|
+
return item2.signal === "payments" && data.state === "expected" && data.status === "confirmed";
|
|
5867
|
+
}, "owed");
|
|
5868
|
+
var keepsBooks = /* @__PURE__ */ __name(async (store, projects) => {
|
|
5869
|
+
for (const project of projects) {
|
|
5870
|
+
const filter = { project, review: "confirmed", limit: 1 };
|
|
5871
|
+
if ((await store.finance.invoices(filter)).length || (await store.finance.payments(filter)).length)
|
|
5872
|
+
return true;
|
|
5873
|
+
}
|
|
5874
|
+
return false;
|
|
5875
|
+
}, "keepsBooks");
|
|
5871
5876
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
5872
5877
|
const totals = /* @__PURE__ */ new Map();
|
|
5873
|
-
const open7 = counted2(items);
|
|
5874
5878
|
for (const item2 of items) {
|
|
5875
5879
|
const data = item2.data;
|
|
5876
|
-
if (!
|
|
5880
|
+
if (!owed(item2) || data.amount === void 0)
|
|
5877
5881
|
continue;
|
|
5878
5882
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
5879
5883
|
const total = totals.get(key) ?? {
|
|
@@ -5956,6 +5960,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
5956
5960
|
chats,
|
|
5957
5961
|
project: { ...root, children: children2, cut },
|
|
5958
5962
|
store,
|
|
5963
|
+
books: await keepsBooks(store, [root.ref, ...children2.map((child) => child.ref)]),
|
|
5959
5964
|
contextQueries: input.contextQueries ?? []
|
|
5960
5965
|
};
|
|
5961
5966
|
const items = [];
|
|
@@ -6000,7 +6005,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
6000
6005
|
};
|
|
6001
6006
|
}, "projectStatus");
|
|
6002
6007
|
|
|
6003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
6004
6009
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
6005
6010
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
6006
6011
|
if (deps.offline)
|
|
@@ -6072,7 +6077,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
6072
6077
|
};
|
|
6073
6078
|
}, "accountService");
|
|
6074
6079
|
|
|
6075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
6076
6081
|
var MINUTE = 6e4;
|
|
6077
6082
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
6078
6083
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -6091,7 +6096,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
6091
6096
|
return new Date(at - at % MINUTE).toISOString();
|
|
6092
6097
|
}, "sendTime");
|
|
6093
6098
|
|
|
6094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
6095
6100
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
6096
6101
|
try {
|
|
6097
6102
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -6237,21 +6242,21 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
6237
6242
|
const answerAll = capability(connection, "answerAllJoinRequests", "answer every join request at once");
|
|
6238
6243
|
const { id: chatId } = await connection.resolve(chat);
|
|
6239
6244
|
const page = await list3(chatId, { limit: 100, ...link4 === void 0 ? {} : { link: link4 } });
|
|
6240
|
-
const
|
|
6245
|
+
const counted2 = page.total ?? page.items.length;
|
|
6241
6246
|
if (page.total === void 0 && page.hasMore)
|
|
6242
6247
|
throw new CliError("validation_error", "too many requests to count; answer them by person, or by --link");
|
|
6243
|
-
if (
|
|
6244
|
-
return { chatId, accepted: accept, counted:
|
|
6248
|
+
if (counted2 === 0)
|
|
6249
|
+
return { chatId, accepted: accept, counted: counted2 };
|
|
6245
6250
|
const operationId = newOperationId();
|
|
6246
6251
|
await guardedWrite(deps.guard, {
|
|
6247
6252
|
operationId,
|
|
6248
6253
|
chatId,
|
|
6249
6254
|
kind: "chat",
|
|
6250
6255
|
action: accept ? "requests.accept" : "requests.decline",
|
|
6251
|
-
count:
|
|
6252
|
-
people:
|
|
6256
|
+
count: counted2,
|
|
6257
|
+
people: counted2
|
|
6253
6258
|
}, () => answerAll(chatId, accept, link4));
|
|
6254
|
-
return { operationId, chatId, accepted: accept, counted:
|
|
6259
|
+
return { operationId, chatId, accepted: accept, counted: counted2 };
|
|
6255
6260
|
}, "answerAllRequests"),
|
|
6256
6261
|
links: /* @__PURE__ */ __name(async (chat, window2) => {
|
|
6257
6262
|
if (deps.offline)
|
|
@@ -6338,7 +6343,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
6338
6343
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
6339
6344
|
}, "linkLimits");
|
|
6340
6345
|
|
|
6341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
6342
6347
|
var THREADS_PAGE = 500;
|
|
6343
6348
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
6344
6349
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -6417,7 +6422,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
6417
6422
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
6418
6423
|
}, "readMail");
|
|
6419
6424
|
|
|
6420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
6421
6426
|
var NO_MAIL = "no_mail";
|
|
6422
6427
|
var MAIL = "email";
|
|
6423
6428
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -6464,7 +6469,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
6464
6469
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
6465
6470
|
}, "accountsOfKind");
|
|
6466
6471
|
|
|
6467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
6468
6473
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
6469
6474
|
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");
|
|
6470
6475
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -6812,7 +6817,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
6812
6817
|
};
|
|
6813
6818
|
}, "statsLucene");
|
|
6814
6819
|
|
|
6815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
6816
6821
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
6817
6822
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
6818
6823
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -6852,7 +6857,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
6852
6857
|
};
|
|
6853
6858
|
}, "dateWindow");
|
|
6854
6859
|
|
|
6855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
6856
6861
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
6857
6862
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
6858
6863
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -7021,7 +7026,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
7021
7026
|
};
|
|
7022
7027
|
}, "readRankingSelection");
|
|
7023
7028
|
|
|
7024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
7025
7030
|
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");
|
|
7026
7031
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
7027
7032
|
command,
|
|
@@ -7031,7 +7036,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
7031
7036
|
fieldsVersion: FIELD_VERSION
|
|
7032
7037
|
}), "searchRecordOf");
|
|
7033
7038
|
|
|
7034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
7035
7040
|
function invalid2(message) {
|
|
7036
7041
|
throw new CliError("validation_error", message);
|
|
7037
7042
|
}
|
|
@@ -7325,10 +7330,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
7325
7330
|
}, "evidence")
|
|
7326
7331
|
}), "adminStatisticsService");
|
|
7327
7332
|
|
|
7328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
7329
7334
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
7330
7335
|
|
|
7331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
7332
7337
|
var REQUEST_MS = 400;
|
|
7333
7338
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
7334
7339
|
const lowest = ranges[0];
|
|
@@ -7351,13 +7356,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
7351
7356
|
};
|
|
7352
7357
|
}, "estimateBackfill");
|
|
7353
7358
|
|
|
7354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
7355
7360
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
7356
7361
|
...error,
|
|
7357
7362
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
7358
7363
|
}), "withRecovery");
|
|
7359
7364
|
|
|
7360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
7361
7366
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
7362
7367
|
if (isCliFailure(error))
|
|
7363
7368
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -7440,7 +7445,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
7440
7445
|
};
|
|
7441
7446
|
}, "mergeBatches");
|
|
7442
7447
|
|
|
7443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
7444
7449
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
7445
7450
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
7446
7451
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -7463,7 +7468,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
7463
7468
|
}
|
|
7464
7469
|
}, "patiently");
|
|
7465
7470
|
|
|
7466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
7467
7472
|
var RULES_VERSION = 5;
|
|
7468
7473
|
var LOOK_BACK = 50;
|
|
7469
7474
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -7553,7 +7558,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
7553
7558
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
7554
7559
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
7555
7560
|
|
|
7556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
7557
7562
|
var CONTEXT_MESSAGES = 3;
|
|
7558
7563
|
var CONTEXT_MINUTES = 10;
|
|
7559
7564
|
var MAX_CHARS = 1200;
|
|
@@ -7577,12 +7582,12 @@ var context = {
|
|
|
7577
7582
|
}, "describe")
|
|
7578
7583
|
};
|
|
7579
7584
|
|
|
7580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
7581
7586
|
var BUILT_INS = [context];
|
|
7582
7587
|
var providers = [...BUILT_INS];
|
|
7583
7588
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
7584
7589
|
|
|
7585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
7586
7591
|
var READ_PAGE = 5e3;
|
|
7587
7592
|
var CHAIN = 50;
|
|
7588
7593
|
var CONVERSATION_QUERY = {
|
|
@@ -7734,7 +7739,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
7734
7739
|
return size4;
|
|
7735
7740
|
}, "sized");
|
|
7736
7741
|
|
|
7737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
7738
7743
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
7739
7744
|
var MESSAGE_PAGE = 5e3;
|
|
7740
7745
|
var PER_SESSION = 8;
|
|
@@ -7753,7 +7758,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
7753
7758
|
price: remote.price,
|
|
7754
7759
|
installed: true,
|
|
7755
7760
|
perBatch: PER_REQUEST * concurrency,
|
|
7756
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
7761
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-L3L4PHKF.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
7757
7762
|
};
|
|
7758
7763
|
}
|
|
7759
7764
|
const model = textModel(choice);
|
|
@@ -7770,7 +7775,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
7770
7775
|
if (!isTextModelInstalled(model, directory))
|
|
7771
7776
|
throw notDownloaded(model.id);
|
|
7772
7777
|
if (apart) {
|
|
7773
|
-
const { openProcess } = await import("./process-
|
|
7778
|
+
const { openProcess } = await import("./process-KXDRJO22.js");
|
|
7774
7779
|
return openProcess(model, directory, { threads: threads ?? defaultThreads() });
|
|
7775
7780
|
}
|
|
7776
7781
|
return openEmbedder(model, directory, { threads: threads ?? defaultThreads() });
|
|
@@ -8059,7 +8064,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
8059
8064
|
return { ...one2, state };
|
|
8060
8065
|
}, "shaped");
|
|
8061
8066
|
|
|
8062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
8063
8068
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
8064
8069
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
8065
8070
|
for (const [key, value, maximum] of [
|
|
@@ -8112,7 +8117,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
8112
8117
|
}
|
|
8113
8118
|
}, "catchUpSearch");
|
|
8114
8119
|
|
|
8115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
8116
8121
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
8117
8122
|
if (deps.reads === "store") {
|
|
8118
8123
|
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`);
|
|
@@ -8478,7 +8483,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
8478
8483
|
return message?.timestamp ?? fallback;
|
|
8479
8484
|
}, "timeOfKey");
|
|
8480
8485
|
|
|
8481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
8482
8487
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
8483
8488
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
8484
8489
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -8615,16 +8620,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
8615
8620
|
return { plan, repair };
|
|
8616
8621
|
}, "gapsService");
|
|
8617
8622
|
|
|
8618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
8619
8624
|
import { createHash as createHash8 } from "node:crypto";
|
|
8620
8625
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8621
8626
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
8622
8627
|
|
|
8623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
8624
8629
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
8625
8630
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
8626
8631
|
|
|
8627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
8628
8633
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
8629
8634
|
import { open as open4, stat } from "node:fs/promises";
|
|
8630
8635
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -8826,7 +8831,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
8826
8831
|
return { name, source };
|
|
8827
8832
|
}, "readStickerFile");
|
|
8828
8833
|
|
|
8829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
8830
8835
|
var MAX_FILES = 1e4;
|
|
8831
8836
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory, app, env) => {
|
|
8832
8837
|
if (refusedPlace(directory, app, env))
|
|
@@ -9936,7 +9941,7 @@ function imageSize(input) {
|
|
|
9936
9941
|
}
|
|
9937
9942
|
__name(imageSize, "imageSize");
|
|
9938
9943
|
|
|
9939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
9940
9945
|
var MAX_PAGES = 20;
|
|
9941
9946
|
var MAX_PIXELS = 2e7;
|
|
9942
9947
|
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
@@ -10087,7 +10092,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
10087
10092
|
}
|
|
10088
10093
|
}, "ocrPdf");
|
|
10089
10094
|
|
|
10090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
10091
10096
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
10092
10097
|
const limits = pdfPreviewLimits(env);
|
|
10093
10098
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -10164,7 +10169,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
10164
10169
|
}
|
|
10165
10170
|
}, "pdfPreview");
|
|
10166
10171
|
|
|
10167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
10168
10173
|
import { createHash as createHash7 } from "node:crypto";
|
|
10169
10174
|
import { constants } from "node:fs";
|
|
10170
10175
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -10272,7 +10277,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
10272
10277
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
10273
10278
|
}, "transferMime");
|
|
10274
10279
|
|
|
10275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
10276
10281
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
10277
10282
|
import { link as link3, rm } from "node:fs/promises";
|
|
10278
10283
|
import { join as join9, resolve as resolve6 } from "node:path";
|
|
@@ -10386,7 +10391,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory, fallbackName, { uniqu
|
|
|
10386
10391
|
}
|
|
10387
10392
|
}, "save");
|
|
10388
10393
|
|
|
10389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
10390
10395
|
var ATTACHMENT_QUERY = {
|
|
10391
10396
|
entity: "attachment",
|
|
10392
10397
|
backend: "sql",
|
|
@@ -10809,7 +10814,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
10809
10814
|
}, "setText")
|
|
10810
10815
|
}), "attachmentsService");
|
|
10811
10816
|
|
|
10812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
10813
10818
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
10814
10819
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
10815
10820
|
const store = await accountStore(deps);
|
|
@@ -10839,7 +10844,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
10839
10844
|
}, "list")
|
|
10840
10845
|
}), "chatDocumentsService");
|
|
10841
10846
|
|
|
10842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
10843
10848
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
10844
10849
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
10845
10850
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -10926,7 +10931,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
10926
10931
|
}
|
|
10927
10932
|
}, "isRetentionSelection");
|
|
10928
10933
|
|
|
10929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
10930
10935
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
10931
10936
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
10932
10937
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -11133,7 +11138,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
11133
11138
|
};
|
|
11134
11139
|
}, "countersService");
|
|
11135
11140
|
|
|
11136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
11137
11142
|
var SYNC_KEY = "messages.sync-first";
|
|
11138
11143
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
11139
11144
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -11225,7 +11230,7 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
11225
11230
|
}
|
|
11226
11231
|
try {
|
|
11227
11232
|
const newest = (await store.messages.messages(account2, chatId, { limit: 1 })).items[0];
|
|
11228
|
-
let
|
|
11233
|
+
let counted2 = 0;
|
|
11229
11234
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
11230
11235
|
limit: options.maxMessages - result.messages,
|
|
11231
11236
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
@@ -11234,11 +11239,11 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
11234
11239
|
stop,
|
|
11235
11240
|
note,
|
|
11236
11241
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
11237
|
-
result.messages += fetched2 -
|
|
11238
|
-
|
|
11242
|
+
result.messages += fetched2 - counted2;
|
|
11243
|
+
counted2 = fetched2;
|
|
11239
11244
|
}, "onPage")
|
|
11240
11245
|
});
|
|
11241
|
-
result.messages += fetched.fetched -
|
|
11246
|
+
result.messages += fetched.fetched - counted2;
|
|
11242
11247
|
if (fetched.stopped || !fetched.complete && !fetched.reachedSince) {
|
|
11243
11248
|
result.complete = false;
|
|
11244
11249
|
result.failed.push({
|
|
@@ -11265,20 +11270,20 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
11265
11270
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
11266
11271
|
}), "withRefresh");
|
|
11267
11272
|
|
|
11268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
11269
11274
|
var CANDIDATES = 50;
|
|
11270
11275
|
var WORD_HITS = 200;
|
|
11271
11276
|
var RRF_K = 60;
|
|
11272
11277
|
var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
11273
11278
|
const command = deps.messenger.app.command;
|
|
11274
11279
|
const byWords = /* @__PURE__ */ __name(async (query, prepared, conversations, since) => {
|
|
11275
|
-
const
|
|
11280
|
+
const words4 = [...new Set(query.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [])];
|
|
11276
11281
|
const outside = /* @__PURE__ */ new Map();
|
|
11277
|
-
if (!
|
|
11282
|
+
if (!words4.length || !prepared.scopeAccounts.length)
|
|
11278
11283
|
return { hits: [], outside, sources: /* @__PURE__ */ new Map() };
|
|
11279
11284
|
const store = await deps.store();
|
|
11280
11285
|
const lexical = await prepareLucene(store, await deps.account(), {
|
|
11281
|
-
text:
|
|
11286
|
+
text: words4.map((word) => word.length >= 3 ? `${word}*` : `"${word}"`).join(" OR "),
|
|
11282
11287
|
accounts: prepared.scopeAccounts,
|
|
11283
11288
|
limit: WORD_HITS
|
|
11284
11289
|
}, deps.messenger);
|
|
@@ -11384,9 +11389,9 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11384
11389
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
11385
11390
|
const selected = prepared.selectedChat;
|
|
11386
11391
|
const scopeOf4 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
11387
|
-
const
|
|
11392
|
+
const words4 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
11388
11393
|
const meaning = [];
|
|
11389
|
-
const sources =
|
|
11394
|
+
const sources = words4.sources;
|
|
11390
11395
|
if (target.installed && prepared.scopeAccounts.length && eligibility?.conversations.length !== 0) {
|
|
11391
11396
|
await withEmbedder(deps, target, choice, {}, async (embedder) => {
|
|
11392
11397
|
const [vector] = await embedder.embed([query], "query");
|
|
@@ -11430,7 +11435,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11430
11435
|
continue;
|
|
11431
11436
|
const eligibleChats = eligibility?.chats.filter(({ account: account3 }) => account3.provider === one2.provider && account3.account === one2.account).map(({ chat: chat2 }) => chat2);
|
|
11432
11437
|
const rows = eligibleChats === void 0 ? await store.vectors.readiness(one2, { ...scope, model: target.key, searchableOnly: true }) : (await Promise.all(eligibleChats.map((chatId) => store.vectors.readiness(one2, { chatId, model: target.key })))).flat();
|
|
11433
|
-
const readiness2 = searchReadiness(rows.map(shaped), target.installed,
|
|
11438
|
+
const readiness2 = searchReadiness(rows.map(shaped), target.installed, words4.outside.get(JSON.stringify(one2))?.chats ?? /* @__PURE__ */ new Set());
|
|
11434
11439
|
scoped.push({ source: one2, readiness: readiness2 });
|
|
11435
11440
|
const other = await store.vectors.embeddedOnlyElsewhere(one2, { ...scope, model: target.key });
|
|
11436
11441
|
elsewhere.push(...other.filter((id2) => eligibleChats === void 0 || eligibleChats.includes(id2)).map((id2) => prepared.scopeAccounts.length > 1 ? [one2.provider, one2.account, id2].map(encodeURIComponent).join("/") : id2));
|
|
@@ -11446,7 +11451,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11446
11451
|
accounts: prepared.scopeAccounts,
|
|
11447
11452
|
model: target.id,
|
|
11448
11453
|
meaning: target.installed ? "searched" : "unavailable",
|
|
11449
|
-
hits: fused(meaning,
|
|
11454
|
+
hits: fused(meaning, words4.hits, meaningFloor(target.key)).slice(0, limit).map((hit) => {
|
|
11450
11455
|
const source2 = sources.get(hit.summary.id);
|
|
11451
11456
|
return {
|
|
11452
11457
|
...hit,
|
|
@@ -11492,7 +11497,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11492
11497
|
}, "related")
|
|
11493
11498
|
};
|
|
11494
11499
|
}, "embeddingsSearch");
|
|
11495
|
-
var fused = /* @__PURE__ */ __name((meaning,
|
|
11500
|
+
var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
11496
11501
|
const merged = /* @__PURE__ */ new Map();
|
|
11497
11502
|
meaning.filter(({ score }) => score > minimumCosine).forEach(({ summary, chunk, score, stale, matchedIn }, index) => {
|
|
11498
11503
|
merged.set(matchedIn ? `${summary.id}#${chunk.firstMessageId}` : summary.id, {
|
|
@@ -11505,7 +11510,7 @@ var fused = /* @__PURE__ */ __name((meaning, words3, minimumCosine) => {
|
|
|
11505
11510
|
fused: 1 / (RRF_K + index + 1)
|
|
11506
11511
|
});
|
|
11507
11512
|
});
|
|
11508
|
-
|
|
11513
|
+
words4.forEach(({ summary, chunk }, index) => {
|
|
11509
11514
|
const share = 1 / (RRF_K + index + 1);
|
|
11510
11515
|
const held = merged.get(summary.id);
|
|
11511
11516
|
if (held) {
|
|
@@ -11540,13 +11545,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
11540
11545
|
return mean2.map((value) => value / length);
|
|
11541
11546
|
}, "meanOf");
|
|
11542
11547
|
|
|
11543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
11544
11549
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
11545
11550
|
...embeddingsMaintenance(deps),
|
|
11546
11551
|
...embeddingsSearch(deps)
|
|
11547
11552
|
}), "embeddingsService");
|
|
11548
11553
|
|
|
11549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
11550
11555
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
11551
11556
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
11552
11557
|
if (deps.offline)
|
|
@@ -11687,7 +11692,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
11687
11692
|
};
|
|
11688
11693
|
}, "foldersService");
|
|
11689
11694
|
|
|
11690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
11691
11696
|
var INBOX_CHATS = 20;
|
|
11692
11697
|
var REVIEW_DAYS = 3;
|
|
11693
11698
|
var UNANSWERED_HOURS = 24;
|
|
@@ -11895,7 +11900,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
11895
11900
|
};
|
|
11896
11901
|
}, "inboxService");
|
|
11897
11902
|
|
|
11898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
11899
11904
|
var REVIEW_COUNT = 500;
|
|
11900
11905
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
11901
11906
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -11974,7 +11979,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
11974
11979
|
};
|
|
11975
11980
|
}, "mentionsService");
|
|
11976
11981
|
|
|
11977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
11978
11983
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
11979
11984
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
11980
11985
|
const { text: text2, spans } = formatted2;
|
|
@@ -12034,7 +12039,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
12034
12039
|
};
|
|
12035
12040
|
}, "visibleFormattedText");
|
|
12036
12041
|
|
|
12037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
12038
12043
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
12039
12044
|
position,
|
|
12040
12045
|
kind,
|
|
@@ -12083,7 +12088,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
12083
12088
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
12084
12089
|
}, "validatePermalink");
|
|
12085
12090
|
|
|
12086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
12087
12092
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
12088
12093
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
12089
12094
|
return `${seconds / 86400}d`;
|
|
@@ -12094,8 +12099,8 @@ var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
|
12094
12099
|
return `${seconds}s`;
|
|
12095
12100
|
}, "spokenSeconds");
|
|
12096
12101
|
var pinDurationsText = /* @__PURE__ */ __name((allowed) => {
|
|
12097
|
-
const
|
|
12098
|
-
return
|
|
12102
|
+
const words4 = allowed.map(spokenSeconds);
|
|
12103
|
+
return words4.length > 1 ? `${words4.slice(0, -1).join(", ")} or ${words4.at(-1)}` : words4[0] ?? "";
|
|
12099
12104
|
}, "pinDurationsText");
|
|
12100
12105
|
var pinLengthHelp = /* @__PURE__ */ __name((allowed, fallback) => `how long the pin lasts: ${pinDurationsText(allowed)}` + (fallback === void 0 ? "" : `; ${spokenSeconds(fallback)} by default`), "pinLengthHelp");
|
|
12101
12106
|
var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-time") => {
|
|
@@ -12115,7 +12120,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
12115
12120
|
return seconds;
|
|
12116
12121
|
}, "pinDurationOf");
|
|
12117
12122
|
|
|
12118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
12119
12124
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
12120
12125
|
if (sendAs === void 0) {
|
|
12121
12126
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -12140,7 +12145,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
12140
12145
|
return sendAs;
|
|
12141
12146
|
}, "typedSendAs");
|
|
12142
12147
|
|
|
12143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
12144
12149
|
var TOTAL_CAP = 1e4;
|
|
12145
12150
|
var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
12146
12151
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -12151,7 +12156,7 @@ var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
|
12151
12156
|
return { value: count2, relation: exact ? "eq" : "gte" };
|
|
12152
12157
|
}, "totalOf");
|
|
12153
12158
|
|
|
12154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
12155
12160
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
12156
12161
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
12157
12162
|
let narrows = false;
|
|
@@ -12180,7 +12185,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
12180
12185
|
return wanted(root).join(" ").trim();
|
|
12181
12186
|
}, "meaningWords");
|
|
12182
12187
|
|
|
12183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
12184
12189
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
12185
12190
|
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"));
|
|
12186
12191
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -12313,7 +12318,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
12313
12318
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
12314
12319
|
}, "questionLookup");
|
|
12315
12320
|
|
|
12316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
12317
12322
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
12318
12323
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
12319
12324
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -12506,7 +12511,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
12506
12511
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
12507
12512
|
}, "signals");
|
|
12508
12513
|
|
|
12509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
12510
12515
|
var MEANING_DEPTH = 100;
|
|
12511
12516
|
var RRF_K2 = 60;
|
|
12512
12517
|
var RERANK_DEPTH = 50;
|
|
@@ -12791,10 +12796,10 @@ var nearEligible = /* @__PURE__ */ __name(async (store, account2, request, messe
|
|
|
12791
12796
|
return hit ? [{ ...hit, cosine: m.score }] : [];
|
|
12792
12797
|
});
|
|
12793
12798
|
}, "nearEligible");
|
|
12794
|
-
var fusedWithMeaning = /* @__PURE__ */ __name((
|
|
12799
|
+
var fusedWithMeaning = /* @__PURE__ */ __name((words4, near2, described) => {
|
|
12795
12800
|
const merged = /* @__PURE__ */ new Map();
|
|
12796
12801
|
const by = /* @__PURE__ */ __name((hit, foundBy) => hit.discovery ? { ...hit, discovery: { ...hit.discovery, foundBy } } : hit, "by");
|
|
12797
|
-
|
|
12802
|
+
words4.forEach((hit, rank) => {
|
|
12798
12803
|
merged.set(hit.locator, { hit: by(hit, ["words"]), rrf: 1 / (RRF_K2 + rank + 1) });
|
|
12799
12804
|
});
|
|
12800
12805
|
near2.forEach(({ cosine: _, ...m }, rank) => {
|
|
@@ -12831,7 +12836,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
12831
12836
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
12832
12837
|
}, "mixedWithReranker");
|
|
12833
12838
|
|
|
12834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
12835
12840
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
12836
12841
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
12837
12842
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -13030,7 +13035,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
13030
13035
|
return result;
|
|
13031
13036
|
}, "readThreadContext");
|
|
13032
13037
|
|
|
13033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
13034
13039
|
var SEARCH_FILL_MS = 200;
|
|
13035
13040
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
13036
13041
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -13061,6 +13066,8 @@ var topUp = /* @__PURE__ */ __name(async (store) => {
|
|
|
13061
13066
|
}, "topUp");
|
|
13062
13067
|
var MAX_SEARCH_OFFSET = 1e3;
|
|
13063
13068
|
var searchStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, meaning, rerank) => {
|
|
13069
|
+
if (request.text !== void 0)
|
|
13070
|
+
request = { ...request, text: plainQuery(request.text) };
|
|
13064
13071
|
const offset = request.offset ?? 0;
|
|
13065
13072
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
13066
13073
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -13097,12 +13104,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
13097
13104
|
}, "accountOf");
|
|
13098
13105
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
13099
13106
|
|
|
13100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
13101
13108
|
import { createHash as createHash9 } from "node:crypto";
|
|
13102
13109
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
13103
13110
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
13104
13111
|
|
|
13105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
13106
13113
|
var GROUP_SETTINGS = [
|
|
13107
13114
|
"allCanPin",
|
|
13108
13115
|
"onlyAdminsAdd",
|
|
@@ -13116,7 +13123,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
13116
13123
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
13117
13124
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
13118
13125
|
|
|
13119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
13120
13127
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
13121
13128
|
var PICTURE_FLOOR = 0.25;
|
|
13122
13129
|
var PAGE4 = 50;
|
|
@@ -13133,7 +13140,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
13133
13140
|
const directory = imageModelsDirectory(deps.env);
|
|
13134
13141
|
if (!isImageModelInstalled(model2, directory))
|
|
13135
13142
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
13136
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
13143
|
+
const { openPictureEmbedder } = await import("./embedder-ILWH7ZRM.js");
|
|
13137
13144
|
return openPictureEmbedder(model2, directory);
|
|
13138
13145
|
}, "open");
|
|
13139
13146
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -13264,8 +13271,8 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
13264
13271
|
lane: /* @__PURE__ */ __name(async (query, { chat, since, limit = 5 } = {}) => {
|
|
13265
13272
|
if (!deps.pictures)
|
|
13266
13273
|
return {};
|
|
13267
|
-
const
|
|
13268
|
-
if (
|
|
13274
|
+
const words4 = plainWords(query);
|
|
13275
|
+
if (words4 === "")
|
|
13269
13276
|
return {};
|
|
13270
13277
|
const store = await deps.store();
|
|
13271
13278
|
const account2 = await deps.account();
|
|
@@ -13273,7 +13280,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
13273
13280
|
let vector;
|
|
13274
13281
|
try {
|
|
13275
13282
|
const use = await embedder();
|
|
13276
|
-
vector = await use.embedQuery(
|
|
13283
|
+
vector = await use.embedQuery(words4);
|
|
13277
13284
|
} catch (error) {
|
|
13278
13285
|
if (error instanceof CliError && error.code === "not_found")
|
|
13279
13286
|
return { picturesSkipped: error.message, picturesModel: model.id };
|
|
@@ -13330,7 +13337,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
13330
13337
|
}, "search")
|
|
13331
13338
|
}), "withPictures");
|
|
13332
13339
|
|
|
13333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
13334
13341
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
13335
13342
|
const target = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
13336
13343
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -13352,13 +13359,13 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
13352
13359
|
}
|
|
13353
13360
|
if (ready.length === 0 && mail.size === 0)
|
|
13354
13361
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
13355
|
-
const
|
|
13362
|
+
const words4 = plainWords(question);
|
|
13356
13363
|
try {
|
|
13357
13364
|
const ranked = [];
|
|
13358
|
-
if (
|
|
13365
|
+
if (words4) {
|
|
13359
13366
|
const pks = await within?.();
|
|
13360
13367
|
const lookUp = /* @__PURE__ */ __name(async (embedder) => {
|
|
13361
|
-
const [query] = await embedder.embed([
|
|
13368
|
+
const [query] = await embedder.embed([words4], "query");
|
|
13362
13369
|
for (const one2 of ready) {
|
|
13363
13370
|
const near2 = pks ? await store.vectors.scoreMessages(one2, { model: target.key, query, pks }) : await store.vectors.nearestMessages(one2, {
|
|
13364
13371
|
model: target.key,
|
|
@@ -13398,7 +13405,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
13398
13405
|
}
|
|
13399
13406
|
}, "meaningLane");
|
|
13400
13407
|
|
|
13401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
13402
13409
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
13403
13410
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
13404
13411
|
if (choice === "off")
|
|
@@ -13410,9 +13417,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
13410
13417
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
13411
13418
|
try {
|
|
13412
13419
|
const warm = deps.embedders;
|
|
13413
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
13420
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-KXDRJO22.js")).openRerankerProcess(model, directory, {
|
|
13414
13421
|
threads: defaultThreads()
|
|
13415
|
-
})) : await (await import("./rerank-
|
|
13422
|
+
})) : await (await import("./rerank-PSOE6XFT.js")).openReranker(model, directory);
|
|
13416
13423
|
return {
|
|
13417
13424
|
model: model.id,
|
|
13418
13425
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -13432,7 +13439,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
13432
13439
|
};
|
|
13433
13440
|
}, "rerankLane");
|
|
13434
13441
|
|
|
13435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
13436
13443
|
import { createHash as createHash10 } from "node:crypto";
|
|
13437
13444
|
var refOf = /* @__PURE__ */ __name((target) => target.ref ?? `document:${target.documentId}`, "refOf");
|
|
13438
13445
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -13440,7 +13447,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
13440
13447
|
const directory = imageModelsDirectory(env);
|
|
13441
13448
|
if (!isImageModelInstalled(model, directory))
|
|
13442
13449
|
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 });
|
|
13443
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
13450
|
+
const { openPictureEmbedder } = await import("./embedder-ILWH7ZRM.js");
|
|
13444
13451
|
return openPictureEmbedder(model, directory);
|
|
13445
13452
|
}, "openPictureEmbedderFor");
|
|
13446
13453
|
var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options = {}) => {
|
|
@@ -13461,7 +13468,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options =
|
|
|
13461
13468
|
}, "savePicture");
|
|
13462
13469
|
var removePicture = /* @__PURE__ */ __name((store, target) => store.notes.removePicture(refOf(target)), "removePicture");
|
|
13463
13470
|
|
|
13464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
13465
13472
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
13466
13473
|
const metadata = note.frontMatter;
|
|
13467
13474
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -13476,7 +13483,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
13476
13483
|
};
|
|
13477
13484
|
}, "documentSource");
|
|
13478
13485
|
|
|
13479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
13480
13487
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
13481
13488
|
let root;
|
|
13482
13489
|
try {
|
|
@@ -13491,19 +13498,19 @@ var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
|
13491
13498
|
return void 0;
|
|
13492
13499
|
values.push(leaf.value);
|
|
13493
13500
|
}
|
|
13494
|
-
const
|
|
13495
|
-
return
|
|
13501
|
+
const words4 = normalize(values.join(" "));
|
|
13502
|
+
return words4 === "" || /["\\]/u.test(words4) ? void 0 : words4;
|
|
13496
13503
|
}, "plainQueryWords");
|
|
13497
|
-
var titleQuery = /* @__PURE__ */ __name((
|
|
13498
|
-
var titleTiers = /* @__PURE__ */ __name((hits,
|
|
13504
|
+
var titleQuery = /* @__PURE__ */ __name((words4) => words4.split(" ").map((word) => `title:"${word}"`).join(" AND "), "titleQuery");
|
|
13505
|
+
var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
13499
13506
|
const rank = /* @__PURE__ */ __name(({ note }) => {
|
|
13500
13507
|
const title = normalize(note.title ?? "");
|
|
13501
|
-
return title ===
|
|
13508
|
+
return title === words4 ? 0 : title.includes(words4) ? 1 : 2;
|
|
13502
13509
|
}, "rank");
|
|
13503
13510
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
13504
13511
|
}, "titleTiers");
|
|
13505
13512
|
|
|
13506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
13507
13514
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
13508
13515
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
13509
13516
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -13626,14 +13633,14 @@ var MAX_NOTES_OFFSET = 1e3;
|
|
|
13626
13633
|
var CANDIDATES2 = 50;
|
|
13627
13634
|
var RRF_K3 = 60;
|
|
13628
13635
|
var firstLine = /* @__PURE__ */ __name((text2, query) => {
|
|
13629
|
-
const
|
|
13636
|
+
const words4 = query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word));
|
|
13630
13637
|
const lines = text2.split("\n");
|
|
13631
|
-
const found = lines.find((line2) =>
|
|
13638
|
+
const found = lines.find((line2) => words4.some((word) => line2.toLowerCase().includes(word)));
|
|
13632
13639
|
return (found ?? lines.find((line2) => line2.trim() !== "") ?? "").trim().slice(0, MAX_LINE);
|
|
13633
13640
|
}, "firstLine");
|
|
13634
13641
|
var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, source, limit, env, command, embedder }) => {
|
|
13635
|
-
const
|
|
13636
|
-
if (
|
|
13642
|
+
const words4 = plainWords(query);
|
|
13643
|
+
if (words4 === "" || source === "internal")
|
|
13637
13644
|
return {};
|
|
13638
13645
|
let vector;
|
|
13639
13646
|
try {
|
|
@@ -13642,7 +13649,7 @@ var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, sourc
|
|
|
13642
13649
|
...command === void 0 ? {} : { command }
|
|
13643
13650
|
});
|
|
13644
13651
|
try {
|
|
13645
|
-
vector = await use.embedQuery(
|
|
13652
|
+
vector = await use.embedQuery(words4);
|
|
13646
13653
|
} finally {
|
|
13647
13654
|
if (!embedder)
|
|
13648
13655
|
await use.close();
|
|
@@ -13723,13 +13730,13 @@ var filterRefs = /* @__PURE__ */ __name(async (store, narrowing, scope) => {
|
|
|
13723
13730
|
}
|
|
13724
13731
|
}, "filterRefs");
|
|
13725
13732
|
var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, shown, hasMore }, others, othersComplete) => {
|
|
13726
|
-
let
|
|
13733
|
+
let words4;
|
|
13727
13734
|
try {
|
|
13728
13735
|
const { root, stemmer } = await storeQuery(store, text2, {
|
|
13729
13736
|
exact,
|
|
13730
13737
|
...scope.timezone ? { timezone: scope.timezone } : {}
|
|
13731
13738
|
});
|
|
13732
|
-
|
|
13739
|
+
words4 = await store.notes.matchingRefs({
|
|
13733
13740
|
root,
|
|
13734
13741
|
limit: TOTAL_CAP,
|
|
13735
13742
|
...scope.folderIds ? { folderIds: scope.folderIds } : {},
|
|
@@ -13742,10 +13749,11 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
13742
13749
|
return totalOf(void 0, shown, hasMore);
|
|
13743
13750
|
throw error;
|
|
13744
13751
|
}
|
|
13745
|
-
const count2 = (/* @__PURE__ */ new Set([...
|
|
13752
|
+
const count2 = (/* @__PURE__ */ new Set([...words4.refs, ...others])).size + (words4.hasMore ? 1 : 0);
|
|
13746
13753
|
return totalOf(count2, shown, hasMore, othersComplete);
|
|
13747
13754
|
}, "notesTotal");
|
|
13748
13755
|
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
13756
|
+
query = plainQuery(query);
|
|
13749
13757
|
const typed = noteSourceOfQuery(query);
|
|
13750
13758
|
const source = given ?? typed.source;
|
|
13751
13759
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
@@ -13753,7 +13761,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13753
13761
|
const filter = [expression ? `(${expression})` : "", label === void 0 ? "" : `tag:${label}`].filter(Boolean).join(" AND ") || void 0;
|
|
13754
13762
|
const lookup2 = discover && !exact ? questionLookup(query) : void 0;
|
|
13755
13763
|
const parsed = query.trim() ? parsedQuery(lookup2 === void 0 ? query : questionText(query), exact) : void 0;
|
|
13756
|
-
const
|
|
13764
|
+
const words4 = parsed === void 0 ? "" : meaningWords(parsed);
|
|
13757
13765
|
const narrowing = allOf([
|
|
13758
13766
|
...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
|
|
13759
13767
|
...filter === void 0 ? [] : [parsedQuery(filter)]
|
|
@@ -13774,7 +13782,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13774
13782
|
let meaningComplete = true;
|
|
13775
13783
|
if (exact)
|
|
13776
13784
|
meaningSkipped = "--exact searches words as written";
|
|
13777
|
-
else if (
|
|
13785
|
+
else if (words4) {
|
|
13778
13786
|
const lane2 = {
|
|
13779
13787
|
command,
|
|
13780
13788
|
...env === void 0 ? {} : { env },
|
|
@@ -13788,10 +13796,10 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13788
13796
|
const within = narrowing === void 0 ? void 0 : await filterRefs(store, narrowing, scope);
|
|
13789
13797
|
let nearest;
|
|
13790
13798
|
if (within === void 0) {
|
|
13791
|
-
nearest = await nearestNotes(store,
|
|
13799
|
+
nearest = await nearestNotes(store, words4, { ...lane2, limit: depth });
|
|
13792
13800
|
meaningComplete = nearest.length < depth;
|
|
13793
13801
|
} else {
|
|
13794
|
-
const ranked2 = within.length ? await nearestAmong(store,
|
|
13802
|
+
const ranked2 = within.length ? await nearestAmong(store, words4, within, lane2) : [];
|
|
13795
13803
|
meaningRefs = new Set(ranked2.map(({ ref }) => ref));
|
|
13796
13804
|
nearest = ranked2.slice(0, depth);
|
|
13797
13805
|
}
|
|
@@ -13809,13 +13817,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13809
13817
|
meaningSkipped = error.message;
|
|
13810
13818
|
}
|
|
13811
13819
|
}
|
|
13812
|
-
const
|
|
13813
|
-
const titled =
|
|
13814
|
-
text: [titleQuery(
|
|
13820
|
+
const titleWords2 = plainQueryWords(rest);
|
|
13821
|
+
const titled = titleWords2 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
13822
|
+
text: [titleQuery(titleWords2), filter ?? ""].filter(Boolean).join(" AND "),
|
|
13815
13823
|
limit: Math.max(window2, CANDIDATES2),
|
|
13816
13824
|
...scope
|
|
13817
13825
|
});
|
|
13818
|
-
const tier =
|
|
13826
|
+
const tier = titleWords2 === void 0 ? [] : titleTiers(titled.items, titleWords2);
|
|
13819
13827
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
13820
13828
|
const slice = meaning === void 0 && tier.length === 0;
|
|
13821
13829
|
const matched = await searchNotesQuery(store, {
|
|
@@ -13832,9 +13840,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13832
13840
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
13833
13841
|
held.foundBy.push(by);
|
|
13834
13842
|
ranked.set(ref, held);
|
|
13843
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
13835
13844
|
if (by === "meaning" && lookup2 !== void 0 && held.foundBy.includes("words"))
|
|
13836
|
-
|
|
13837
|
-
|
|
13845
|
+
held.score = Math.max(held.score, vote);
|
|
13846
|
+
else
|
|
13847
|
+
held.score += vote;
|
|
13838
13848
|
}), "add");
|
|
13839
13849
|
add(matched.items, "words");
|
|
13840
13850
|
if (meaning !== void 0)
|
|
@@ -13865,7 +13875,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13865
13875
|
title: note.title,
|
|
13866
13876
|
...documentSource(note, accounts, profiles, note.source === "file" ? (await store.files.ofDocument(note.ref))[0] : void 0),
|
|
13867
13877
|
updated_at: at,
|
|
13868
|
-
excerpt: firstLine(note.text,
|
|
13878
|
+
excerpt: firstLine(note.text, words4),
|
|
13869
13879
|
links,
|
|
13870
13880
|
found_by: foundBy,
|
|
13871
13881
|
...cosines.has(ref) ? { meaning_score: cosines.get(ref) } : {}
|
|
@@ -13889,7 +13899,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13889
13899
|
if (record2.ref?.startsWith("note:") || record2.ref?.startsWith("document:"))
|
|
13890
13900
|
record2.name = (await store.notes.note(record2.ref).catch(() => void 0))?.title ?? record2.name;
|
|
13891
13901
|
}
|
|
13892
|
-
const lane = withPictures2 ? await pictureLane(store,
|
|
13902
|
+
const lane = withPictures2 ? await pictureLane(store, words4, {
|
|
13893
13903
|
folderIds,
|
|
13894
13904
|
source,
|
|
13895
13905
|
limit: pictureLimit,
|
|
@@ -13922,6 +13932,7 @@ var notesScopeOf = /* @__PURE__ */ __name((accounts) => {
|
|
|
13922
13932
|
return { folderIds, ...accounts.length > folderIds.length ? { withInternal: true } : {} };
|
|
13923
13933
|
}, "notesScopeOf");
|
|
13924
13934
|
var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { accounts: list3, app, ...query }) => {
|
|
13935
|
+
text2 = plainQuery(text2);
|
|
13925
13936
|
const own = app?.command ?? query.command;
|
|
13926
13937
|
const what = `${own === void 0 ? "" : `${own} `}search notes`;
|
|
13927
13938
|
const held = [
|
|
@@ -13947,7 +13958,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
13947
13958
|
};
|
|
13948
13959
|
}, "searchNotesOf");
|
|
13949
13960
|
|
|
13950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
13951
13962
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
13952
13963
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
13953
13964
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -13972,11 +13983,11 @@ var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
|
13972
13983
|
found_by: foundBy
|
|
13973
13984
|
}), "foundEvent");
|
|
13974
13985
|
var CANDIDATES3 = 50;
|
|
13975
|
-
var nearestEvents = /* @__PURE__ */ __name(async (store,
|
|
13986
|
+
var nearestEvents = /* @__PURE__ */ __name(async (store, words4, { limit, accountIds, env, command, embedders }) => {
|
|
13976
13987
|
const { model, directory, key } = localModel(void 0, env, command);
|
|
13977
13988
|
if (!await store.calendar.embedded(key, accountIds ? { accountIds } : {}))
|
|
13978
13989
|
throw new CliError("not_found", `no event has vectors of ${model.id} yet, so only words were matched`);
|
|
13979
|
-
const [vector] = await withLocal(model, directory, void 0, (embedder) => embedder.embed([
|
|
13990
|
+
const [vector] = await withLocal(model, directory, void 0, (embedder) => embedder.embed([words4], "query"), embedders);
|
|
13980
13991
|
const floor = meaningFloor(key);
|
|
13981
13992
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
13982
13993
|
}, "nearestEvents");
|
|
@@ -13984,6 +13995,7 @@ var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null
|
|
|
13984
13995
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
13985
13996
|
if (!query.trim())
|
|
13986
13997
|
throw new CliError("validation_error", "say what to find in the events");
|
|
13998
|
+
query = plainQuery(query);
|
|
13987
13999
|
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
13988
14000
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
13989
14001
|
...exact ? { exact: true } : {},
|
|
@@ -13992,7 +14004,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
13992
14004
|
const accountIds = accounts === void 0 ? void 0 : await accountIdsOf(store, accounts);
|
|
13993
14005
|
if (accountIds?.length === 0)
|
|
13994
14006
|
return { query, by: "words", hits: [], has_more: false };
|
|
13995
|
-
const
|
|
14007
|
+
const words4 = plainQueryWords(asked === void 0 ? query : questionText(query));
|
|
13996
14008
|
const window2 = offset + limit;
|
|
13997
14009
|
let meaningSkipped;
|
|
13998
14010
|
let meaning;
|
|
@@ -14000,11 +14012,11 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
14000
14012
|
meaningSkipped = "--exact searches words as written";
|
|
14001
14013
|
else if (newest)
|
|
14002
14014
|
meaningSkipped = "newest first orders by time";
|
|
14003
|
-
else if (
|
|
14015
|
+
else if (words4 === void 0)
|
|
14004
14016
|
meaningSkipped = "the query has fields or operators, which meaning cannot follow";
|
|
14005
14017
|
else
|
|
14006
14018
|
try {
|
|
14007
|
-
meaning = await nearestEvents(store,
|
|
14019
|
+
meaning = await nearestEvents(store, words4, {
|
|
14008
14020
|
limit: Math.max(window2, CANDIDATES3),
|
|
14009
14021
|
...accountIds ? { accountIds } : {},
|
|
14010
14022
|
...env === void 0 ? {} : { env },
|
|
@@ -14064,8 +14076,14 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
14064
14076
|
};
|
|
14065
14077
|
}, "searchEvents");
|
|
14066
14078
|
|
|
14067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14068
|
-
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
14079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
14080
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
14081
|
+
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
14082
|
+
const { reason, span } = error.details ?? {};
|
|
14083
|
+
const why = typeof reason === "string" ? reason : void 0;
|
|
14084
|
+
const token = span && Number.isInteger(span.start) && Number.isInteger(span.end) ? text2.slice(span.start, span.end).trim() : "";
|
|
14085
|
+
return { ...why ? { why } : {}, ...token ? { token } : {} };
|
|
14086
|
+
}, "refusal");
|
|
14069
14087
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
14070
14088
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
14071
14089
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -14073,9 +14091,22 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
14073
14091
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
14074
14092
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
14075
14093
|
}, "filtersBeside");
|
|
14076
|
-
var
|
|
14077
|
-
|
|
14094
|
+
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
14095
|
+
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
14096
|
+
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
14097
|
+
const words4 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
14098
|
+
// A title holds "invoice", not the question mark of "invoice?".
|
|
14099
|
+
node.value.replace(/\?+$/u, "") || node.value
|
|
14100
|
+
) : (() => {
|
|
14101
|
+
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
14102
|
+
})());
|
|
14103
|
+
return { words: words4, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
14104
|
+
}, "titleWords");
|
|
14105
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => kindIn(provider) === "crm"), "crmAccounts");
|
|
14106
|
+
var searchAll = /* @__PURE__ */ __name(async (store, account2, asked, messenger = {}, searchMessages = (query) => searchStore(store, account2, query, messenger), meaning) => {
|
|
14107
|
+
if (!asked.text.trim())
|
|
14078
14108
|
throw new CliError("validation_error", "say what to find");
|
|
14109
|
+
const request = { ...asked, text: plainQuery(asked.text) };
|
|
14079
14110
|
const offset = request.offset ?? 0;
|
|
14080
14111
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
14081
14112
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -14166,12 +14197,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14166
14197
|
const held = fused2.get(hit.locator);
|
|
14167
14198
|
if (held)
|
|
14168
14199
|
held.item.foundBy = ["words", "meaning"];
|
|
14200
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
14169
14201
|
if (held && discovers)
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
item: held?.item ?? itemOf2(hit, ["meaning"]),
|
|
14173
|
-
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
14174
|
-
});
|
|
14202
|
+
held.score = Math.max(held.score, vote);
|
|
14203
|
+
else
|
|
14204
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf2(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
14175
14205
|
});
|
|
14176
14206
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
14177
14207
|
}, "messagesOf");
|
|
@@ -14251,13 +14281,37 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14251
14281
|
foundBy: hit.found_by
|
|
14252
14282
|
})));
|
|
14253
14283
|
accounts.push(...read.map(({ provider, account: account3 }) => ({ resource, provider, account: account3 })));
|
|
14284
|
+
} else if (resource === "crm") {
|
|
14285
|
+
const { words: words4, anyWord } = titleWords(request.text);
|
|
14286
|
+
const chosen = request.scope?.crm;
|
|
14287
|
+
const found = await store.deals.find({
|
|
14288
|
+
words: words4,
|
|
14289
|
+
anyWord: anyWord || discover,
|
|
14290
|
+
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
14291
|
+
limit: Math.min(window2 + 1, 500),
|
|
14292
|
+
...chosen === void 0 ? {} : { accounts: chosen }
|
|
14293
|
+
});
|
|
14294
|
+
hasMore ||= found.length > window2;
|
|
14295
|
+
lists.push(found.slice(0, window2).map((deal) => ({
|
|
14296
|
+
kind: deal.kind,
|
|
14297
|
+
ref: deal.ref,
|
|
14298
|
+
provider: deal.account?.provider ?? "crm",
|
|
14299
|
+
account: deal.account?.account ?? INTERNAL_NOTES,
|
|
14300
|
+
title: deal.title,
|
|
14301
|
+
timestamp: deal.updatedAt,
|
|
14302
|
+
text: deal.summary,
|
|
14303
|
+
foundBy: ["title"]
|
|
14304
|
+
})));
|
|
14305
|
+
const read = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
14306
|
+
for (const { provider, account: account3 } of read)
|
|
14307
|
+
accounts.push({ resource, provider, account: account3 });
|
|
14254
14308
|
} else
|
|
14255
14309
|
lists.push(await messagesOf(resource));
|
|
14256
14310
|
searched.push(resource);
|
|
14257
14311
|
} catch (error) {
|
|
14258
14312
|
if (!skippable(error))
|
|
14259
14313
|
throw error;
|
|
14260
|
-
skipped.push({ resource, code: error.code, reason: error.message });
|
|
14314
|
+
skipped.push({ resource, code: error.code, reason: error.message, ...refusal(error, request.text) });
|
|
14261
14315
|
}
|
|
14262
14316
|
}
|
|
14263
14317
|
} finally {
|
|
@@ -14266,7 +14320,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14266
14320
|
const ordered = oneList(lists, cosines);
|
|
14267
14321
|
const more = hasMore || ordered.length > window2;
|
|
14268
14322
|
return {
|
|
14269
|
-
query:
|
|
14323
|
+
query: asked.text,
|
|
14270
14324
|
items: ordered.slice(offset, window2),
|
|
14271
14325
|
hasMore: more,
|
|
14272
14326
|
...more && window2 <= MAX_SEARCH_OFFSET ? { nextOffset: window2 } : {},
|
|
@@ -14293,7 +14347,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
14293
14347
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
14294
14348
|
}, "oneList");
|
|
14295
14349
|
|
|
14296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
14297
14351
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
14298
14352
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
14299
14353
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -14538,7 +14592,8 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
14538
14592
|
messages: named2("messages"),
|
|
14539
14593
|
mail: named2("mail"),
|
|
14540
14594
|
notes: named2("notes"),
|
|
14541
|
-
events: named2("events")
|
|
14595
|
+
events: named2("events"),
|
|
14596
|
+
crm: named2("crm")
|
|
14542
14597
|
},
|
|
14543
14598
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
14544
14599
|
}, messenger, searchMessages, meaning);
|
|
@@ -14546,7 +14601,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
14546
14601
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
14547
14602
|
}, "searchAllOfSource");
|
|
14548
14603
|
|
|
14549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
14550
14605
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
14551
14606
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
14552
14607
|
var DEFAULT_BACKEND = "both";
|
|
@@ -14594,12 +14649,12 @@ var branchesOf = /* @__PURE__ */ __name((node, account2) => {
|
|
|
14594
14649
|
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
14595
14650
|
return should.length ? should.flatMap(({ node: node2 }) => branchesOf(node2, account2)) : [{ words: [] }];
|
|
14596
14651
|
}, "branchesOf");
|
|
14597
|
-
var asQuery = /* @__PURE__ */ __name(({ words:
|
|
14598
|
-
text:
|
|
14652
|
+
var asQuery = /* @__PURE__ */ __name(({ words: words4, from, ...rest }) => ({
|
|
14653
|
+
text: words4.join(" "),
|
|
14599
14654
|
...rest,
|
|
14600
14655
|
...from !== void 0 && rest.chat !== void 0 ? { from } : {}
|
|
14601
14656
|
}), "asQuery");
|
|
14602
|
-
var
|
|
14657
|
+
var refusal2 = {
|
|
14603
14658
|
unsupported: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
14604
14659
|
pushed_history: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
14605
14660
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -14623,7 +14678,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
14623
14678
|
if (quiet2)
|
|
14624
14679
|
return void 0;
|
|
14625
14680
|
if (backend === "server")
|
|
14626
|
-
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error",
|
|
14681
|
+
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error", refusal2[reason], {
|
|
14627
14682
|
reason
|
|
14628
14683
|
});
|
|
14629
14684
|
return { report: { ...report, skipped: reason, complete: false }, sources };
|
|
@@ -14652,7 +14707,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
14652
14707
|
return skip("other_accounts");
|
|
14653
14708
|
const all = branchesOf(execution.root, account2).flatMap((branch) => merge(scoped, branch) ?? []);
|
|
14654
14709
|
const unique = [
|
|
14655
|
-
...new Map(all.filter(({ words:
|
|
14710
|
+
...new Map(all.filter(({ words: words4 }) => words4.length).map((branch) => [JSON.stringify(branch), branch])).values()
|
|
14656
14711
|
];
|
|
14657
14712
|
if (!unique.length)
|
|
14658
14713
|
return skip("no_words");
|
|
@@ -14735,7 +14790,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
14735
14790
|
return { report, sources };
|
|
14736
14791
|
}, "searchServer");
|
|
14737
14792
|
|
|
14738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
14739
14794
|
var DELETE_AT_ONCE = 10;
|
|
14740
14795
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
14741
14796
|
const files = fileLinks(attachments);
|
|
@@ -15176,7 +15231,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
15176
15231
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first]} needs a --photo or --file`);
|
|
15177
15232
|
}, "checkMediaOptions");
|
|
15178
15233
|
|
|
15179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
15180
15235
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
15181
15236
|
var RULES = {
|
|
15182
15237
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -15191,7 +15246,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
15191
15246
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
15192
15247
|
}), "classifyChannel");
|
|
15193
15248
|
|
|
15194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
15195
15250
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
15196
15251
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
15197
15252
|
const store = await deps.store();
|
|
@@ -15277,7 +15332,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
15277
15332
|
};
|
|
15278
15333
|
}, "metadataService");
|
|
15279
15334
|
|
|
15280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
15281
15336
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
15282
15337
|
var LINK2 = /https?:\/\/\S+/i;
|
|
15283
15338
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -15465,7 +15520,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
15465
15520
|
}, "nextPoint");
|
|
15466
15521
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
15467
15522
|
|
|
15468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
15469
15524
|
import { existsSync, readFileSync } from "node:fs";
|
|
15470
15525
|
import { join as join10 } from "node:path";
|
|
15471
15526
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -15608,7 +15663,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
15608
15663
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
15609
15664
|
}, "assign");
|
|
15610
15665
|
|
|
15611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
15612
15667
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
15613
15668
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
15614
15669
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -15645,7 +15700,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
15645
15700
|
return { chatId, rows, notes };
|
|
15646
15701
|
}, "moderateWith");
|
|
15647
15702
|
|
|
15648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
15649
15704
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
15650
15705
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
15651
15706
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -15723,7 +15778,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
15723
15778
|
}, "removePerson")
|
|
15724
15779
|
}), "moderatorOf");
|
|
15725
15780
|
|
|
15726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
15727
15782
|
var CONTEXT_MESSAGES2 = 10;
|
|
15728
15783
|
var CONTEXT_BYTES = 64 * 1024;
|
|
15729
15784
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -15984,10 +16039,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
15984
16039
|
};
|
|
15985
16040
|
}, "personMessages");
|
|
15986
16041
|
|
|
15987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
15988
16043
|
import { createHash as createHash11 } from "node:crypto";
|
|
15989
16044
|
|
|
15990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
15991
16046
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
15992
16047
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
15993
16048
|
const parsed = parseMeetingReference(reference);
|
|
@@ -16035,7 +16090,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
16035
16090
|
};
|
|
16036
16091
|
}, "resolveMeetingReference");
|
|
16037
16092
|
|
|
16038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
16039
16094
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
16040
16095
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
16041
16096
|
if (signal?.aborted)
|
|
@@ -16234,7 +16289,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
16234
16289
|
return { ...packet, fingerprint: hash(packet) };
|
|
16235
16290
|
}, "readMeetingEvidence");
|
|
16236
16291
|
|
|
16237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
16238
16293
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
16239
16294
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
16240
16295
|
const requestedAccounts = options.accountIds;
|
|
@@ -16333,7 +16388,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
16333
16388
|
};
|
|
16334
16389
|
}, "personMeetingContext");
|
|
16335
16390
|
|
|
16336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
16337
16392
|
var PREPARE_BYTES = 96 * 1024;
|
|
16338
16393
|
var MEETINGS = 5;
|
|
16339
16394
|
var CUES = 3;
|
|
@@ -16450,7 +16505,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
16450
16505
|
}
|
|
16451
16506
|
}, "meetingsOf");
|
|
16452
16507
|
|
|
16453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
16454
16509
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
16455
16510
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
16456
16511
|
const held = await storeIfOpen(deps);
|
|
@@ -16520,7 +16575,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
16520
16575
|
complete: false
|
|
16521
16576
|
})), "quiet");
|
|
16522
16577
|
|
|
16523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
16524
16579
|
var TIMELINE_ITEMS = 50;
|
|
16525
16580
|
var TIMELINE_MAX = 500;
|
|
16526
16581
|
var SCOPES = ["personal", "work"];
|
|
@@ -16575,7 +16630,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
16575
16630
|
};
|
|
16576
16631
|
}, "personTimeline");
|
|
16577
16632
|
|
|
16578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
16579
16634
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
16580
16635
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
16581
16636
|
const held = await storeIfOpen(deps);
|
|
@@ -16802,7 +16857,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
16802
16857
|
return rest;
|
|
16803
16858
|
}, "withoutPhone");
|
|
16804
16859
|
|
|
16805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
16806
16861
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
16807
16862
|
id: note.id,
|
|
16808
16863
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -16846,7 +16901,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
16846
16901
|
};
|
|
16847
16902
|
}, "privatePeopleService");
|
|
16848
16903
|
|
|
16849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
16850
16905
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
16851
16906
|
total: 0,
|
|
16852
16907
|
population: 0,
|
|
@@ -17102,7 +17157,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
17102
17157
|
}, "evidence")
|
|
17103
17158
|
}), "rankingsService");
|
|
17104
17159
|
|
|
17105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
17106
17161
|
var FIELDS = ["date", "chat", "kind"];
|
|
17107
17162
|
var WAITING_TAIL = 100;
|
|
17108
17163
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -17229,7 +17284,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
17229
17284
|
};
|
|
17230
17285
|
}, "replyStatsService");
|
|
17231
17286
|
|
|
17232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
17233
17288
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
17234
17289
|
id: one2.id,
|
|
17235
17290
|
name: one2.name,
|
|
@@ -17275,14 +17330,14 @@ var named = /* @__PURE__ */ __name((search, check) => {
|
|
|
17275
17330
|
throw new CliError(error.code, `${label}: ${error.message}`, error.details);
|
|
17276
17331
|
}
|
|
17277
17332
|
}, "named");
|
|
17278
|
-
var both = /* @__PURE__ */ __name((stored,
|
|
17333
|
+
var both = /* @__PURE__ */ __name((stored, words4) => ({
|
|
17279
17334
|
version: 1,
|
|
17280
17335
|
language: "lucene-v1",
|
|
17281
17336
|
root: {
|
|
17282
17337
|
kind: "boolean",
|
|
17283
17338
|
clauses: [
|
|
17284
17339
|
{ occur: "must", node: stored.root },
|
|
17285
|
-
{ occur: "must", node: parseLucene(
|
|
17340
|
+
{ occur: "must", node: parseLucene(words4, MESSAGE_PARSING).root }
|
|
17286
17341
|
],
|
|
17287
17342
|
span: { start: 0, end: 0 }
|
|
17288
17343
|
}
|
|
@@ -17323,7 +17378,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
17323
17378
|
}), "history"),
|
|
17324
17379
|
delete: /* @__PURE__ */ __name((reference) => inStore(async (store) => store.searches.deleteSearch((await found(store, reference)).id)), "delete"),
|
|
17325
17380
|
clear: /* @__PURE__ */ __name(() => inStore(async (store) => ({ cleared: await store.searches.clearSearchHistory(MESSAGE_SEARCH_COMMANDS) })), "clear"),
|
|
17326
|
-
resolve: /* @__PURE__ */ __name((reference, { text:
|
|
17381
|
+
resolve: /* @__PURE__ */ __name((reference, { text: words4, ...typed }) => inStore(async (store) => {
|
|
17327
17382
|
const search = await found(store, reference);
|
|
17328
17383
|
const stored = search.params;
|
|
17329
17384
|
const inherited = { ...stored };
|
|
@@ -17344,7 +17399,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
17344
17399
|
throw new CliError("validation_error", "the legacy search and --regex are gone; save it again as Lucene");
|
|
17345
17400
|
checked(stored);
|
|
17346
17401
|
});
|
|
17347
|
-
const extra =
|
|
17402
|
+
const extra = words4?.trim() ? words4.trim() : void 0;
|
|
17348
17403
|
if (extra !== void 0) {
|
|
17349
17404
|
if (params.ast !== void 0)
|
|
17350
17405
|
params.ast = both(validateAst(params.ast), extra);
|
|
@@ -17358,7 +17413,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
17358
17413
|
};
|
|
17359
17414
|
}, "searchesService");
|
|
17360
17415
|
|
|
17361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
17362
17417
|
var TAGGING_QUERY = {
|
|
17363
17418
|
entity: "tagging",
|
|
17364
17419
|
backend: "sql",
|
|
@@ -17442,7 +17497,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
17442
17497
|
};
|
|
17443
17498
|
}, "tagsService");
|
|
17444
17499
|
|
|
17445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
17446
17501
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
17447
17502
|
var PERIOD_FIELD = "created";
|
|
17448
17503
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -17545,7 +17600,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
17545
17600
|
}));
|
|
17546
17601
|
}, "meetingNames");
|
|
17547
17602
|
|
|
17548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
17549
17604
|
var TASK_QUERY = {
|
|
17550
17605
|
entity: "task",
|
|
17551
17606
|
backend: "sql",
|
|
@@ -18037,7 +18092,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
18037
18092
|
};
|
|
18038
18093
|
}, "taskView");
|
|
18039
18094
|
|
|
18040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
18041
18096
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
18042
18097
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
18043
18098
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -18236,7 +18291,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
18236
18291
|
};
|
|
18237
18292
|
}, "topicsService");
|
|
18238
18293
|
|
|
18239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
18240
18295
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
18241
18296
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
18242
18297
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -18310,7 +18365,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
18310
18365
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
18311
18366
|
}, "prepareEvidencePacket");
|
|
18312
18367
|
|
|
18313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
18314
18369
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
18315
18370
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
18316
18371
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -18330,7 +18385,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
18330
18385
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
18331
18386
|
}, "readEvidencePacket");
|
|
18332
18387
|
|
|
18333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
18334
18389
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
18335
18390
|
let before2 = Number.POSITIVE_INFINITY;
|
|
18336
18391
|
for (; ; ) {
|
|
@@ -18383,7 +18438,7 @@ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18383
18438
|
return { input, selection };
|
|
18384
18439
|
}, "resolveMeetingSelection");
|
|
18385
18440
|
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
|
|
18386
|
-
const lifted = liftMeetingFields(query, request);
|
|
18441
|
+
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
18387
18442
|
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
18388
18443
|
if (options.refreshIndex !== false)
|
|
18389
18444
|
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
@@ -18392,7 +18447,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
18392
18447
|
return { ...result, selection };
|
|
18393
18448
|
}, "searchMeetingHits");
|
|
18394
18449
|
|
|
18395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
18396
18451
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
18397
18452
|
const { maxMessages, url, ...selecting } = request;
|
|
18398
18453
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18431,10 +18486,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18431
18486
|
};
|
|
18432
18487
|
}, "readMeetingLinks");
|
|
18433
18488
|
|
|
18434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
18435
18490
|
import { createHash as createHash13 } from "node:crypto";
|
|
18436
18491
|
|
|
18437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
18438
18493
|
function invalid5(field, response = false) {
|
|
18439
18494
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
18440
18495
|
}
|
|
@@ -18553,7 +18608,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
18553
18608
|
}
|
|
18554
18609
|
}, "candidateCatalog");
|
|
18555
18610
|
|
|
18556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
18557
18612
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
18558
18613
|
const fixed = snapshotMeetingScope(scope);
|
|
18559
18614
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -18606,7 +18661,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
18606
18661
|
};
|
|
18607
18662
|
}, "createMeetingProjectCandidateReader");
|
|
18608
18663
|
|
|
18609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
18610
18665
|
import { createHash as createHash14 } from "node:crypto";
|
|
18611
18666
|
var scopeKeys = [
|
|
18612
18667
|
"accountId",
|
|
@@ -18741,7 +18796,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
18741
18796
|
};
|
|
18742
18797
|
}, "readMeetingProjectDiscovery");
|
|
18743
18798
|
|
|
18744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
18745
18800
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
18746
18801
|
const { limit, ...selecting } = request;
|
|
18747
18802
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18749,7 +18804,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18749
18804
|
return { ...review, selection };
|
|
18750
18805
|
}, "readMeetingReview");
|
|
18751
18806
|
|
|
18752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
18753
18808
|
var KIND = ["meetings-search"];
|
|
18754
18809
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
18755
18810
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18779,7 +18834,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
18779
18834
|
};
|
|
18780
18835
|
}, "meetingSearchesService");
|
|
18781
18836
|
|
|
18782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
18783
18838
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
18784
18839
|
const { timeZone, maxRows, ...selecting } = request;
|
|
18785
18840
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18802,7 +18857,7 @@ var readMeetingCounts = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18802
18857
|
return { ...counts, selection };
|
|
18803
18858
|
}, "readMeetingCounts");
|
|
18804
18859
|
|
|
18805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
18806
18861
|
import { createHash as createHash15 } from "node:crypto";
|
|
18807
18862
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
18808
18863
|
ref: cue.reference,
|
|
@@ -18920,7 +18975,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
18920
18975
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
18921
18976
|
}, "readMeetingHitContext");
|
|
18922
18977
|
|
|
18923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
18924
18979
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
18925
18980
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
18926
18981
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -18996,7 +19051,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
18996
19051
|
return { packet, content };
|
|
18997
19052
|
}, "readMeetingPassage");
|
|
18998
19053
|
|
|
18999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
19000
19055
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
19001
19056
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
19002
19057
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -19010,10 +19065,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
19010
19065
|
};
|
|
19011
19066
|
}, "createMeetingBatchReader");
|
|
19012
19067
|
|
|
19013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
19014
19069
|
import { createHash as createHash16 } from "node:crypto";
|
|
19015
19070
|
|
|
19016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
19017
19072
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
19018
19073
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
19019
19074
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -19165,7 +19220,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
19165
19220
|
};
|
|
19166
19221
|
}, "applyMeetingEmbedding");
|
|
19167
19222
|
|
|
19168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
19169
19224
|
var DEPTH = 200;
|
|
19170
19225
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
19171
19226
|
if (value === void 0)
|
|
@@ -19182,8 +19237,8 @@ var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
|
19182
19237
|
}, "cursorOf");
|
|
19183
19238
|
var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
|
|
19184
19239
|
const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
|
|
19185
|
-
const { query, request:
|
|
19186
|
-
const { input, selection } = await resolveMeetingSelection(store,
|
|
19240
|
+
const { query, request: words4 } = liftMeetingFields(typed, chosen);
|
|
19241
|
+
const { input, selection } = await resolveMeetingSelection(store, words4);
|
|
19187
19242
|
const { after, limit = 20, maxReadBytes, ...filters } = input;
|
|
19188
19243
|
const terms = questionTerms(query);
|
|
19189
19244
|
const wordQuery = terms === null ? query : terms.join(" ");
|
|
@@ -19302,7 +19357,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
19302
19357
|
};
|
|
19303
19358
|
}, "searchMeetingsCombined");
|
|
19304
19359
|
|
|
19305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
19306
19361
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
19307
19362
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
19308
19363
|
if (!signal?.aborted)
|
|
@@ -19407,7 +19462,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
19407
19462
|
};
|
|
19408
19463
|
}, "createMeetingContextService");
|
|
19409
19464
|
|
|
19410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
19411
19466
|
var integer2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
19412
19467
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
19413
19468
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -19634,7 +19689,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
19634
19689
|
};
|
|
19635
19690
|
}, "openMeetingEmbedder");
|
|
19636
19691
|
|
|
19637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
19638
19693
|
var communicationFields = {
|
|
19639
19694
|
sources: pipe(array(strictObject({
|
|
19640
19695
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -19654,8 +19709,8 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
19654
19709
|
throw new CliError("validation_error", `invalid communications.${field}`);
|
|
19655
19710
|
}
|
|
19656
19711
|
const input = parsed.output;
|
|
19657
|
-
const
|
|
19658
|
-
if (Buffer.byteLength(input.query) > 2048 || !
|
|
19712
|
+
const words4 = input.query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
19713
|
+
if (Buffer.byteLength(input.query) > 2048 || !words4.length || words4.length > 16)
|
|
19659
19714
|
throw new CliError("validation_error", "communications.query needs 1\u201316 literal words within 2048 UTF-8 bytes");
|
|
19660
19715
|
const before2 = input.before ?? preparationAfter;
|
|
19661
19716
|
const after = input.after ?? Math.max(0, before2 - 14 * 864e5);
|
|
@@ -19666,7 +19721,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
19666
19721
|
return { ...input, after, before: before2 };
|
|
19667
19722
|
}, "communicationRequest");
|
|
19668
19723
|
|
|
19669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
19670
19725
|
var MEETING_PREPARATION_LIMITS = {
|
|
19671
19726
|
meetings: { min: 1, max: 20, default: 5 },
|
|
19672
19727
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -19752,7 +19807,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
19752
19807
|
return { ...input, history };
|
|
19753
19808
|
}, "preparationRequest");
|
|
19754
19809
|
|
|
19755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
19756
19811
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
19757
19812
|
const section = {
|
|
19758
19813
|
readUsage: plan.reader.usage(),
|
|
@@ -19857,7 +19912,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
19857
19912
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
19858
19913
|
}, "appendPreparationCommunications");
|
|
19859
19914
|
|
|
19860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
19861
19916
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
19862
19917
|
if (port === void 0)
|
|
19863
19918
|
return void 0;
|
|
@@ -19962,7 +20017,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
19962
20017
|
}
|
|
19963
20018
|
}, "validatePreparationCommunications");
|
|
19964
20019
|
|
|
19965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
19966
20021
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
19967
20022
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
19968
20023
|
}, "invalid");
|
|
@@ -20031,7 +20086,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
20031
20086
|
}
|
|
20032
20087
|
}, "appendKnowledgePreparation");
|
|
20033
20088
|
|
|
20034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
20035
20090
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
20036
20091
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
20037
20092
|
}, "invalid");
|
|
@@ -20105,7 +20160,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
20105
20160
|
}
|
|
20106
20161
|
}, "appendNotesPreparation");
|
|
20107
20162
|
|
|
20108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
20109
20164
|
var PAGE_LIMIT = 4;
|
|
20110
20165
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
20111
20166
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -20155,7 +20210,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
20155
20210
|
}
|
|
20156
20211
|
}, "appendProjectPreparation");
|
|
20157
20212
|
|
|
20158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
20159
20214
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
20160
20215
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
20161
20216
|
return;
|
|
@@ -20227,7 +20282,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
20227
20282
|
}
|
|
20228
20283
|
}, "appendRelatedPreparation");
|
|
20229
20284
|
|
|
20230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
20231
20286
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
20232
20287
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
20233
20288
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -20365,7 +20420,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
20365
20420
|
};
|
|
20366
20421
|
}, "createMeetingPreparationService");
|
|
20367
20422
|
|
|
20368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
20369
20424
|
import { createHash as createHash17 } from "node:crypto";
|
|
20370
20425
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
20371
20426
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -20385,7 +20440,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
20385
20440
|
};
|
|
20386
20441
|
}, "proposeMeetingTask");
|
|
20387
20442
|
|
|
20388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
20389
20444
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
20390
20445
|
const { provider, account: account2, scope } = key;
|
|
20391
20446
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -20448,7 +20503,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
20448
20503
|
}
|
|
20449
20504
|
}, "readMeetingTask");
|
|
20450
20505
|
|
|
20451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
20452
20507
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
20453
20508
|
const installer = ports.installer();
|
|
20454
20509
|
const argv = updateCommand(installer, packageName);
|
|
@@ -20513,7 +20568,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
20513
20568
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
20514
20569
|
}, "dayAfter");
|
|
20515
20570
|
|
|
20516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
20517
20572
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
20518
20573
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
20519
20574
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -20536,7 +20591,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
20536
20591
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
20537
20592
|
}, "approveAsTask");
|
|
20538
20593
|
|
|
20539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
20540
20595
|
var MAX_IDS = 500;
|
|
20541
20596
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
20542
20597
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -20578,7 +20633,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
20578
20633
|
return ids;
|
|
20579
20634
|
}, "parseProposalIds");
|
|
20580
20635
|
|
|
20581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
20582
20637
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
20583
20638
|
if (author.type === "person")
|
|
20584
20639
|
return { type: "person", id: author.id };
|
|
@@ -20620,7 +20675,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
20620
20675
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
20621
20676
|
}, "storedStatus");
|
|
20622
20677
|
|
|
20623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
20624
20679
|
var FACT_SUMMARIES = {
|
|
20625
20680
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
20626
20681
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -20692,8 +20747,64 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
20692
20747
|
};
|
|
20693
20748
|
}, "findingsKind");
|
|
20694
20749
|
|
|
20695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20696
|
-
var
|
|
20750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
20751
|
+
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
20752
|
+
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
20753
|
+
var rowOf2 = /* @__PURE__ */ __name((action2) => {
|
|
20754
|
+
const renamed2 = action2.kind === ORGANIZATION_RENAME_KIND;
|
|
20755
|
+
const { name, kind } = action2.payload;
|
|
20756
|
+
const { organization } = action2.payload;
|
|
20757
|
+
return {
|
|
20758
|
+
id: action2.id,
|
|
20759
|
+
kind: "organization",
|
|
20760
|
+
status: actionStatus(action2.status),
|
|
20761
|
+
project: null,
|
|
20762
|
+
subject: renamed2 ? organization : "organization:new",
|
|
20763
|
+
object: null,
|
|
20764
|
+
summary: renamed2 ? `rename ${organization} to ${name}` : `add ${kind} ${name}`,
|
|
20765
|
+
proposedBy: proposerOfAction(action2),
|
|
20766
|
+
reason: action2.reason,
|
|
20767
|
+
evidence: [],
|
|
20768
|
+
score: null,
|
|
20769
|
+
signals: null,
|
|
20770
|
+
parts: null,
|
|
20771
|
+
createdAt: action2.createdAt
|
|
20772
|
+
};
|
|
20773
|
+
}, "rowOf");
|
|
20774
|
+
var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
20775
|
+
kind: "organization",
|
|
20776
|
+
stored: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
20777
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
20778
|
+
const status = storedStatus(filter);
|
|
20779
|
+
const actions = await store.proposedActions.list({
|
|
20780
|
+
kinds: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
20781
|
+
...status === void 0 ? {} : { status },
|
|
20782
|
+
...pushed2(filter)
|
|
20783
|
+
});
|
|
20784
|
+
return kept(actions.map(rowOf2), filter);
|
|
20785
|
+
}, "list"),
|
|
20786
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf2(await store.proposedActions.get(id2)), "get"),
|
|
20787
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
20788
|
+
if (!confirm) {
|
|
20789
|
+
await store.proposedActions.reject(id2, by, reason);
|
|
20790
|
+
return { id: id2, kind: "organization", status: "rejected", made: [] };
|
|
20791
|
+
}
|
|
20792
|
+
const action2 = await store.proposedActions.get(id2);
|
|
20793
|
+
if (action2.kind === ORGANIZATION_RENAME_KIND) {
|
|
20794
|
+
const { organization, name: name2 } = action2.payload;
|
|
20795
|
+
const renamed2 = await store.knowledge.updateOrganization(organization, { name: name2 });
|
|
20796
|
+
await store.proposedActions.approve(id2, by, { organization: renamed2.ref });
|
|
20797
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [] };
|
|
20798
|
+
}
|
|
20799
|
+
const { name, kind, scope } = action2.payload;
|
|
20800
|
+
const made = await store.knowledge.addOrganization({ name, kind, ...scope === void 0 ? {} : { scope } });
|
|
20801
|
+
await store.proposedActions.approve(id2, by, { organization: made.ref });
|
|
20802
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [made.ref] };
|
|
20803
|
+
}, "decide")
|
|
20804
|
+
}), "organizationKind");
|
|
20805
|
+
|
|
20806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
20807
|
+
var rowOf3 = /* @__PURE__ */ __name((action2) => ({
|
|
20697
20808
|
id: action2.id,
|
|
20698
20809
|
kind: "action",
|
|
20699
20810
|
status: actionStatus(action2.status),
|
|
@@ -20719,9 +20830,9 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
20719
20830
|
...status === void 0 ? {} : { status },
|
|
20720
20831
|
...pushed2(filter)
|
|
20721
20832
|
});
|
|
20722
|
-
return kept(actions.map(
|
|
20833
|
+
return kept(actions.map(rowOf3), filter);
|
|
20723
20834
|
}, "list"),
|
|
20724
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
20835
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf3(await store.proposedActions.get(id2)), "get"),
|
|
20725
20836
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
20726
20837
|
if (!confirm) {
|
|
20727
20838
|
await store.proposedActions.reject(id2, by, reason);
|
|
@@ -20732,7 +20843,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
20732
20843
|
}, "decide")
|
|
20733
20844
|
}), "actionKind");
|
|
20734
20845
|
|
|
20735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
20736
20847
|
var STATUS = {
|
|
20737
20848
|
proposed: "proposed",
|
|
20738
20849
|
accepted: "confirmed",
|
|
@@ -20740,7 +20851,7 @@ var STATUS = {
|
|
|
20740
20851
|
reversed: "confirmed",
|
|
20741
20852
|
rejected: "rejected"
|
|
20742
20853
|
};
|
|
20743
|
-
var
|
|
20854
|
+
var rowOf4 = /* @__PURE__ */ __name((fact) => ({
|
|
20744
20855
|
id: fact.ref,
|
|
20745
20856
|
kind: "fact",
|
|
20746
20857
|
status: STATUS[fact.status],
|
|
@@ -20766,17 +20877,17 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
20766
20877
|
...status === "all" ? {} : { status: status === "confirmed" ? "accepted" : status },
|
|
20767
20878
|
order: "created"
|
|
20768
20879
|
});
|
|
20769
|
-
return kept(facts.map(
|
|
20880
|
+
return kept(facts.map(rowOf4), filter);
|
|
20770
20881
|
}, "list"),
|
|
20771
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
20882
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf4(await store.facts.get(id2)), "get"),
|
|
20772
20883
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
20773
20884
|
const fact = confirm ? await store.facts.accept(id2, by, reason) : await store.facts.reject(id2, by, reason);
|
|
20774
20885
|
return { id: id2, kind: "fact", status: confirm ? "confirmed" : "rejected", made: confirm ? [fact.ref] : [] };
|
|
20775
20886
|
}, "decide")
|
|
20776
20887
|
}), "factKind");
|
|
20777
20888
|
|
|
20778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20779
|
-
var
|
|
20889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
20890
|
+
var rowOf5 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
20780
20891
|
id: entry.ref,
|
|
20781
20892
|
kind,
|
|
20782
20893
|
status: entry.review,
|
|
@@ -20799,9 +20910,9 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
20799
20910
|
const status = filter.status ?? "proposed";
|
|
20800
20911
|
const options = { ...pushed2(filter), ...status === "all" ? {} : { review: status } };
|
|
20801
20912
|
const entries = kind === "invoice" ? await store.finance.invoices(options) : await store.finance.payments(options);
|
|
20802
|
-
return kept(entries.map((entry) =>
|
|
20913
|
+
return kept(entries.map((entry) => rowOf5(kind, entry)), filter);
|
|
20803
20914
|
}, "list"),
|
|
20804
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
20915
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf5(kind, kind === "invoice" ? await store.finance.invoice(id2) : await store.finance.payment(id2)), "get"),
|
|
20805
20916
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
20806
20917
|
const entry = confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason);
|
|
20807
20918
|
return { id: id2, kind, status: confirm ? "confirmed" : "rejected", made: confirm ? [entry.ref] : [] };
|
|
@@ -20810,7 +20921,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
20810
20921
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
20811
20922
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
20812
20923
|
|
|
20813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
20814
20925
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
20815
20926
|
id: `key:${link4.id}`,
|
|
20816
20927
|
kind: "key_document",
|
|
@@ -20878,7 +20989,8 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
20878
20989
|
};
|
|
20879
20990
|
}, "keyDocumentKind");
|
|
20880
20991
|
|
|
20881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
20993
|
+
var words3 = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
20882
20994
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
20883
20995
|
switch (finding.kind) {
|
|
20884
20996
|
case "task":
|
|
@@ -20893,9 +21005,17 @@ var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
|
20893
21005
|
return `${finding.from} \u2192 ${finding.to}`;
|
|
20894
21006
|
case "new_contact":
|
|
20895
21007
|
return `${finding.name} <${finding.address}>`;
|
|
21008
|
+
case "invoice":
|
|
21009
|
+
return words3("invoice", finding.number, finding.total, finding.currency, finding.counterpartyName, `\xB7 ${finding.reason}`);
|
|
21010
|
+
case "payment":
|
|
21011
|
+
return words3("payment", finding.amount, finding.currency, finding.date, `\xB7 ${finding.reason}`);
|
|
21012
|
+
case "order":
|
|
21013
|
+
return words3("order", finding.number, finding.supplierName, finding.status ?? "placed", `\xB7 ${finding.reason}`);
|
|
21014
|
+
case "order_update":
|
|
21015
|
+
return words3("order", finding.number, finding.supplierName, finding.status, `\xB7 ${finding.reason}`);
|
|
20896
21016
|
}
|
|
20897
21017
|
}, "summaryOf");
|
|
20898
|
-
var
|
|
21018
|
+
var rowOf6 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
20899
21019
|
const findings = batch.input.findings;
|
|
20900
21020
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
20901
21021
|
const project = findings.flatMap((finding) => "project" in finding && finding.project ? [finding.project] : [])[0] ?? null;
|
|
@@ -20922,7 +21042,7 @@ var rowOf5 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
|
20922
21042
|
};
|
|
20923
21043
|
}, "rowOf");
|
|
20924
21044
|
var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
20925
|
-
const created = /* @__PURE__ */ __name(async (batch) =>
|
|
21045
|
+
const created = /* @__PURE__ */ __name(async (batch) => rowOf6(batch, (await store.proposedActions.get(batch.id)).createdAt), "created");
|
|
20926
21046
|
return {
|
|
20927
21047
|
kind: "mail_findings",
|
|
20928
21048
|
stored: [MAIL_FINDINGS_KIND],
|
|
@@ -20957,8 +21077,8 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
20957
21077
|
};
|
|
20958
21078
|
}, "mailFindingsKind");
|
|
20959
21079
|
|
|
20960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20961
|
-
var
|
|
21080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
21081
|
+
var rowOf7 = /* @__PURE__ */ __name((action2, batch) => {
|
|
20962
21082
|
const findings = batch.input.findings;
|
|
20963
21083
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
20964
21084
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
@@ -21003,12 +21123,12 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
21003
21123
|
...filter.by === void 0 ? {} : { proposedBy: filter.by },
|
|
21004
21124
|
limit: Math.min(filter.offset + filter.limit, 500)
|
|
21005
21125
|
});
|
|
21006
|
-
const rows = await Promise.all(actions.map(async (action2) =>
|
|
21126
|
+
const rows = await Promise.all(actions.map(async (action2) => rowOf7(action2, (await batchOf(action2)).batch)));
|
|
21007
21127
|
return kept(rows, { ...filter, limit: filter.offset + filter.limit });
|
|
21008
21128
|
}, "list"),
|
|
21009
21129
|
get: /* @__PURE__ */ __name(async (id2) => {
|
|
21010
21130
|
const action2 = await store.proposedActions.get(id2);
|
|
21011
|
-
return
|
|
21131
|
+
return rowOf7(action2, (await batchOf(action2)).batch);
|
|
21012
21132
|
}, "get"),
|
|
21013
21133
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
|
|
21014
21134
|
const { account: account2, batch } = await batchOf(await store.proposedActions.get(id2));
|
|
@@ -21021,14 +21141,14 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
21021
21141
|
};
|
|
21022
21142
|
}, "meetingFindingsKind");
|
|
21023
21143
|
|
|
21024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
21025
21145
|
var STATUS2 = {
|
|
21026
21146
|
proposed: "proposed",
|
|
21027
21147
|
confirmed: "confirmed",
|
|
21028
21148
|
superseded: "confirmed",
|
|
21029
21149
|
stale: "rejected"
|
|
21030
21150
|
};
|
|
21031
|
-
var
|
|
21151
|
+
var rowOf8 = /* @__PURE__ */ __name((memory) => ({
|
|
21032
21152
|
id: memory.ref,
|
|
21033
21153
|
kind: "memory",
|
|
21034
21154
|
status: STATUS2[memory.status],
|
|
@@ -21053,16 +21173,48 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
21053
21173
|
...pushed2(filter),
|
|
21054
21174
|
...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
|
|
21055
21175
|
});
|
|
21056
|
-
return kept(memories.map(
|
|
21176
|
+
return kept(memories.map(rowOf8), filter);
|
|
21057
21177
|
}, "list"),
|
|
21058
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
21178
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.memories.get(id2)), "get"),
|
|
21059
21179
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
|
|
21060
21180
|
const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
|
|
21061
21181
|
return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
|
|
21062
21182
|
}, "decide")
|
|
21063
21183
|
}), "memoryKind");
|
|
21064
21184
|
|
|
21065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
21186
|
+
var rowOf9 = /* @__PURE__ */ __name((order) => ({
|
|
21187
|
+
id: order.ref,
|
|
21188
|
+
kind: "order",
|
|
21189
|
+
status: order.review,
|
|
21190
|
+
project: order.project,
|
|
21191
|
+
subject: order.ref,
|
|
21192
|
+
object: order.supplier?.ref ?? null,
|
|
21193
|
+
summary: order.title,
|
|
21194
|
+
proposedBy: proposerOfAuthor(order.author),
|
|
21195
|
+
reason: order.reason,
|
|
21196
|
+
evidence: [],
|
|
21197
|
+
score: null,
|
|
21198
|
+
signals: null,
|
|
21199
|
+
parts: null,
|
|
21200
|
+
createdAt: order.createdAt
|
|
21201
|
+
}), "rowOf");
|
|
21202
|
+
var orderKind = /* @__PURE__ */ __name((store) => ({
|
|
21203
|
+
kind: "order",
|
|
21204
|
+
prefix: "order",
|
|
21205
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
21206
|
+
const status = filter.status ?? "proposed";
|
|
21207
|
+
const orders = await store.orders.list({ ...pushed2(filter), ...status === "all" ? {} : { review: status } });
|
|
21208
|
+
return kept(orders.map(rowOf9), filter);
|
|
21209
|
+
}, "list"),
|
|
21210
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf9(await store.orders.get(id2)), "get"),
|
|
21211
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
21212
|
+
const order = confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason);
|
|
21213
|
+
return { id: id2, kind: "order", status: confirm ? "confirmed" : "rejected", made: confirm ? [order.ref] : [] };
|
|
21214
|
+
}, "decide")
|
|
21215
|
+
}), "orderKind");
|
|
21216
|
+
|
|
21217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
21066
21218
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
21067
21219
|
id: `link:${link4.id}`,
|
|
21068
21220
|
kind: "relationship",
|
|
@@ -21136,10 +21288,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
21136
21288
|
};
|
|
21137
21289
|
}, "relationshipKind");
|
|
21138
21290
|
|
|
21139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
21140
21292
|
var KIND2 = "relationship_update";
|
|
21141
21293
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
21142
|
-
var
|
|
21294
|
+
var rowOf10 = /* @__PURE__ */ __name((action2) => {
|
|
21143
21295
|
const payload = action2.payload;
|
|
21144
21296
|
return {
|
|
21145
21297
|
id: action2.id,
|
|
@@ -21168,9 +21320,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
21168
21320
|
...status === void 0 ? {} : { status },
|
|
21169
21321
|
...pushed2(filter)
|
|
21170
21322
|
});
|
|
21171
|
-
return kept(stored.map(
|
|
21323
|
+
return kept(stored.map(rowOf10), filter);
|
|
21172
21324
|
}, "list"),
|
|
21173
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
21325
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf10(await store.proposedActions.get(id2)), "get"),
|
|
21174
21326
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
21175
21327
|
const { relation } = await store.knowledge.decideRelationUpdate(id2, {
|
|
21176
21328
|
confirm,
|
|
@@ -21186,8 +21338,8 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
21186
21338
|
}, "decide")
|
|
21187
21339
|
}), "relationshipUpdateKind");
|
|
21188
21340
|
|
|
21189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21190
|
-
var
|
|
21341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
21342
|
+
var rowOf11 = /* @__PURE__ */ __name((task2) => {
|
|
21191
21343
|
const suggestion = task2.closeSuggestion;
|
|
21192
21344
|
if (suggestion === null)
|
|
21193
21345
|
return void 0;
|
|
@@ -21212,7 +21364,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
21212
21364
|
const taskOf = /* @__PURE__ */ __name(async (id2) => {
|
|
21213
21365
|
const key = id2.slice("close:".length);
|
|
21214
21366
|
const task2 = await store.tasks.details(key).catch(() => void 0);
|
|
21215
|
-
const row = task2 &&
|
|
21367
|
+
const row = task2 && rowOf11(task2);
|
|
21216
21368
|
if (!task2 || !row)
|
|
21217
21369
|
throw new CliError("not_found", `no close waits on task ${key}`);
|
|
21218
21370
|
return { task: task2, row };
|
|
@@ -21229,7 +21381,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
21229
21381
|
where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
|
|
21230
21382
|
limit: filter.offset + filter.limit
|
|
21231
21383
|
});
|
|
21232
|
-
return kept(tasks.flatMap((task2) =>
|
|
21384
|
+
return kept(tasks.flatMap((task2) => rowOf11(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
|
|
21233
21385
|
}, "list"),
|
|
21234
21386
|
get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
|
|
21235
21387
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
@@ -21254,7 +21406,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
21254
21406
|
};
|
|
21255
21407
|
}, "taskCloseKind");
|
|
21256
21408
|
|
|
21257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
21258
21410
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
21259
21411
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
21260
21412
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -21345,9 +21497,9 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
21345
21497
|
});
|
|
21346
21498
|
continue;
|
|
21347
21499
|
}
|
|
21348
|
-
const
|
|
21349
|
-
if (
|
|
21350
|
-
refused.push(
|
|
21500
|
+
const refusal3 = mayDecide(row, decision.by, policy);
|
|
21501
|
+
if (refusal3) {
|
|
21502
|
+
refused.push(refusal3);
|
|
21351
21503
|
continue;
|
|
21352
21504
|
}
|
|
21353
21505
|
decided.push(await kind.decide(id2, chosen.length ? { ...decision, parts: chosen } : decision));
|
|
@@ -21369,6 +21521,8 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
21369
21521
|
factKind(store),
|
|
21370
21522
|
invoiceKind(store),
|
|
21371
21523
|
paymentKind(store),
|
|
21524
|
+
orderKind(store),
|
|
21525
|
+
organizationKind(store),
|
|
21372
21526
|
memoryKind(store),
|
|
21373
21527
|
findingsKind(store),
|
|
21374
21528
|
mailFindingsKind(store),
|
|
@@ -21380,7 +21534,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
21380
21534
|
return registry;
|
|
21381
21535
|
}, "proposalRegistry");
|
|
21382
21536
|
|
|
21383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
21384
21538
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
21385
21539
|
const invalid8 = /* @__PURE__ */ __name((field) => {
|
|
21386
21540
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -21422,7 +21576,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
21422
21576
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
21423
21577
|
}, "storedCandidateRequest");
|
|
21424
21578
|
|
|
21425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
21426
21580
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
21427
21581
|
const fixed = snapshotMeetingScope(scope);
|
|
21428
21582
|
const store = ports?.meetings;
|
|
@@ -21514,7 +21668,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
21514
21668
|
};
|
|
21515
21669
|
}, "createStoredMeetingProjectCandidateReader");
|
|
21516
21670
|
|
|
21517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
21518
21672
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
21519
21673
|
const pictures = picturesService(deps);
|
|
21520
21674
|
const base = {
|
|
@@ -21556,6 +21710,7 @@ export {
|
|
|
21556
21710
|
syncsOneChat,
|
|
21557
21711
|
throughWrapper,
|
|
21558
21712
|
capability,
|
|
21713
|
+
withTimeLimit,
|
|
21559
21714
|
newSendId,
|
|
21560
21715
|
newOperationId,
|
|
21561
21716
|
batchProgress,
|
|
@@ -21711,6 +21866,7 @@ export {
|
|
|
21711
21866
|
sendAsCheck,
|
|
21712
21867
|
typedSendAs,
|
|
21713
21868
|
TOTAL_CAP,
|
|
21869
|
+
questionLookup,
|
|
21714
21870
|
THREAD_BOUNDS,
|
|
21715
21871
|
readThreadContext,
|
|
21716
21872
|
MAX_SEARCH_OFFSET,
|
|
@@ -21828,6 +21984,8 @@ export {
|
|
|
21828
21984
|
approveAsTask,
|
|
21829
21985
|
parseProposalIds,
|
|
21830
21986
|
FACT_SUMMARIES,
|
|
21987
|
+
ORGANIZATION_ADD_KIND,
|
|
21988
|
+
ORGANIZATION_RENAME_KIND,
|
|
21831
21989
|
emptyProposalRegistry,
|
|
21832
21990
|
proposalRegistry,
|
|
21833
21991
|
createStoredMeetingProjectCandidateReader,
|