@wirecat/drive-cli 0.59.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-CVISDGMF.js → all-profiles-537I27Z4.js} +11 -11
- package/dist/bundle/{anthropic-WLNQC23G.js → anthropic-X4NWVHDF.js} +7 -7
- package/dist/bundle/{app-server-P2VOONXF.js → app-server-KSHJKKS7.js} +47 -47
- package/dist/bundle/{bun-CDFBNTKV.js → bun-WTBGGCUC.js} +2 -2
- package/dist/bundle/{bun-sqlite-MNZICITP.js → bun-sqlite-T7Y3JFFD.js} +6 -6
- package/dist/bundle/{chunk-YV4ABH6J.js → chunk-22ATLSNK.js} +3 -3
- package/dist/bundle/{chunk-CBM2XAEZ.js → chunk-246P2DCT.js} +3 -3
- package/dist/bundle/{chunk-H2BKXPBL.js → chunk-3TQHIHZI.js} +2 -2
- package/dist/bundle/{chunk-IGF6EXBR.js → chunk-4CBZEAQ7.js} +32 -32
- package/dist/bundle/{chunk-L5SE2XZP.js → chunk-4VHBDVY2.js} +1 -1
- package/dist/bundle/{chunk-IIP43FQJ.js → chunk-4XZXH2NM.js} +1 -1
- package/dist/bundle/{chunk-UWVNRPT7.js → chunk-57QVQGBE.js} +21 -21
- package/dist/bundle/{chunk-A6SLYOP2.js → chunk-5AMRCBMP.js} +67 -34
- package/dist/bundle/{chunk-ZSMCJKGP.js → chunk-5XHLQZAG.js} +27 -26
- package/dist/bundle/{chunk-YADXWQHV.js → chunk-67QXMO2G.js} +25 -25
- package/dist/bundle/{chunk-36B7AIGP.js → chunk-6HTKB4WC.js} +1 -1
- package/dist/bundle/{chunk-5C7K6XIT.js → chunk-73MNUSP3.js} +1 -1
- package/dist/bundle/{chunk-3KNZADHJ.js → chunk-73TTP6ET.js} +431 -187
- package/dist/bundle/{chunk-IBZ3IBO4.js → chunk-77C5XRH3.js} +5 -5
- package/dist/bundle/{chunk-PGKIOSN3.js → chunk-77YTRBL6.js} +10 -10
- package/dist/bundle/{chunk-TI55J3BA.js → chunk-ALWTUDZF.js} +3 -3
- package/dist/bundle/{chunk-HWLLVLAB.js → chunk-AXWXQNTC.js} +13 -10
- package/dist/bundle/{chunk-P7WPYKSB.js → chunk-CKGHRWVR.js} +2 -2
- package/dist/bundle/{chunk-JW2CVCUH.js → chunk-D6WIWOQC.js} +3 -3
- package/dist/bundle/{chunk-A6EG7ZDS.js → chunk-DMHGWL5D.js} +12 -12
- package/dist/bundle/{chunk-FICVPYE4.js → chunk-DQDKLZAK.js} +47 -47
- package/dist/bundle/{chunk-JSDVK3JA.js → chunk-EHAI773E.js} +1 -1
- package/dist/bundle/{chunk-UQPKAY6I.js → chunk-FO4TCH6P.js} +1 -1
- package/dist/bundle/{chunk-GJ4ZCIOP.js → chunk-FTZNUZO7.js} +3 -3
- package/dist/bundle/{chunk-6C6255U6.js → chunk-FZOCQQ66.js} +11 -11
- package/dist/bundle/{chunk-EHEZSV6I.js → chunk-GD6TQ6U4.js} +8 -8
- package/dist/bundle/{chunk-XCOCPXCM.js → chunk-GVRS5AIH.js} +2 -2
- package/dist/bundle/{chunk-DI5Z4SH5.js → chunk-HCJG7ENG.js} +2 -2
- package/dist/bundle/{chunk-AD62XJKO.js → chunk-HFGR33KD.js} +24 -24
- package/dist/bundle/{chunk-K4LXGZTE.js → chunk-HQVIK6PM.js} +36 -18
- package/dist/bundle/{chunk-YU3PTU3D.js → chunk-IRZ7OF3F.js} +1 -1
- package/dist/bundle/{chunk-LJ7E4HLQ.js → chunk-IXN7Y6JA.js} +1 -1
- package/dist/bundle/{chunk-7QTVIZII.js → chunk-JGUJJNGZ.js} +790 -325
- package/dist/bundle/{chunk-FVQCM7IQ.js → chunk-JQLIM6BH.js} +4 -4
- package/dist/bundle/{chunk-BSGOM3BD.js → chunk-K6XVRA6U.js} +1 -1
- package/dist/bundle/{chunk-3VSUT6BD.js → chunk-KEXTTZJM.js} +2 -2
- package/dist/bundle/{chunk-V36RIXFA.js → chunk-LJ77Y3TK.js} +1 -1
- package/dist/bundle/{chunk-II7LST64.js → chunk-LQSRVQ3V.js} +3 -2
- package/dist/bundle/{chunk-OKXSTWKW.js → chunk-MVNPE5FZ.js} +7 -7
- package/dist/bundle/{chunk-M6I2SQN7.js → chunk-MXP35VPO.js} +2 -2
- package/dist/bundle/{chunk-TJXPJ3A5.js → chunk-N7S2UPF3.js} +135 -60
- package/dist/bundle/{chunk-3KJTJDDT.js → chunk-O37ESNAP.js} +17 -17
- package/dist/bundle/{chunk-EVETU3TF.js → chunk-OMKUBCNN.js} +7 -7
- package/dist/bundle/{chunk-MUUHUHWC.js → chunk-OYNUBWD2.js} +1 -22
- package/dist/bundle/{chunk-PAEVBAM3.js → chunk-PDYHEWKG.js} +4 -4
- package/dist/bundle/{chunk-EORMZCVF.js → chunk-PETFPXLU.js} +2 -2
- package/dist/bundle/{chunk-GI5JBGXH.js → chunk-PPL5ASW2.js} +613 -372
- package/dist/bundle/{chunk-B5GBJ35N.js → chunk-QIJWSKZL.js} +2 -2
- package/dist/bundle/{chunk-OZH4ALTI.js → chunk-S36HRPNS.js} +1 -1
- package/dist/bundle/{chunk-KFZUODXB.js → chunk-SBHSNOU4.js} +34 -18
- package/dist/bundle/{chunk-F3FOL42A.js → chunk-SZXI4OXX.js} +1 -1
- package/dist/bundle/{chunk-3U22QTU6.js → chunk-TKW4QWCY.js} +12 -0
- package/dist/bundle/{chunk-6CQO2FIN.js → chunk-TVQDMP2F.js} +391 -282
- package/dist/bundle/{chunk-GT5KTGCN.js → chunk-TXMTMEHW.js} +4 -4
- package/dist/bundle/{chunk-IADOBOKB.js → chunk-UNJE63JK.js} +1 -1
- package/dist/bundle/{chunk-HIOJRPCT.js → chunk-UTFATA4K.js} +1 -1
- package/dist/bundle/{chunk-LPHMAQJQ.js → chunk-UVLSWLPZ.js} +15 -15
- package/dist/bundle/{chunk-KPRGTTJH.js → chunk-UVYVIHEA.js} +1 -1
- package/dist/bundle/{chunk-MKCNUI72.js → chunk-V2VMBM7O.js} +1 -1
- package/dist/bundle/{chunk-QTM7USFA.js → chunk-V7QMHMR3.js} +5 -5
- package/dist/bundle/{chunk-TFH5X46A.js → chunk-VRW6ZDTH.js} +18 -18
- package/dist/bundle/{chunk-OMMEQJOB.js → chunk-XDIEQ2CE.js} +2 -2
- package/dist/bundle/{chunk-MEAPA4EZ.js → chunk-XFXRGQXJ.js} +2 -2
- package/dist/bundle/{chunk-HMZAMHKN.js → chunk-YDN2RH5S.js} +1 -1
- package/dist/bundle/{chunk-P3ZTW2ZM.js → chunk-YGG7UA3C.js} +4 -4
- package/dist/bundle/{chunk-VT6GZAF4.js → chunk-YYHKVOVK.js} +4 -4
- package/dist/bundle/{chunk-V42KAPU3.js → chunk-ZPQS7XJA.js} +3 -3
- package/dist/bundle/command-contract-NUIWUVYB.js +39 -0
- package/dist/bundle/{decode-XTOMXMGN.js → decode-35N57AFW.js} +6 -6
- package/dist/bundle/{dispatch-T6TW2JJB.js → dispatch-CWXZW3PL.js} +1 -1
- package/dist/bundle/drive.js +10 -10
- package/dist/bundle/{echarts-RKKIOYVV.js → echarts-3P3QZWMU.js} +2 -2
- package/dist/bundle/{embed-STHKKA6G.js → embed-Q6Q5IOJQ.js} +7 -7
- package/dist/bundle/{embedder-3XZEWHRO.js → embedder-D44JDTAA.js} +10 -10
- package/dist/bundle/{entry-CNOYSSSD.js → entry-ZHCNI7XO.js} +9 -9
- package/dist/bundle/{failure-DNQYXP2T.js → failure-GRMMSDCZ.js} +2 -2
- package/dist/bundle/{first-run-F2SI24PK.js → first-run-3DC2SDWM.js} +10 -10
- package/dist/bundle/first-screen-YJF4YODC.js +37 -0
- package/dist/bundle/{google-BYNSAIQI.js → google-6ZZDKFBN.js} +10 -10
- package/dist/bundle/{google-api-4VTZH7OP.js → google-api-E6MOJ4ZD.js} +52 -52
- package/dist/bundle/grants-GWXDH5GM.js +105 -0
- package/dist/bundle/{identity-ARDPFYV5.js → identity-TID7S5NE.js} +4 -4
- package/dist/bundle/{instructions-N3OH5X2Y.js → instructions-ANJN4HV3.js} +1 -1
- package/dist/bundle/{login-4VQEC7VI.js → login-BGMK2ABH.js} +59 -61
- package/dist/bundle/{node-YU5JBNAA.js → node-VOB45ES2.js} +2 -2
- package/dist/bundle/{node-sqlite-3C6PSBIW.js → node-sqlite-TSX6XQY2.js} +7 -7
- package/dist/bundle/{oauth-D6NJFPYU.js → oauth-CEOYXW6C.js} +8 -8
- package/dist/bundle/{open-M2V2VYXO.js → open-3USWHGNR.js} +6 -6
- package/dist/bundle/{openai-ST2IWNUX.js → openai-YZ5VGPIP.js} +14 -14
- package/dist/bundle/{process-PYNNBBTV.js → process-44JS2W7L.js} +1 -1
- package/dist/bundle/{program-Q4VWV2MR.js → program-TZLAFKJV.js} +99 -82
- package/dist/bundle/{prompt-MFIOJMAF.js → prompt-SG7LAOXW.js} +6 -6
- package/dist/bundle/{reasons-LOQ5J73F.js → reasons-ZK3U3CIN.js} +3 -3
- package/dist/bundle/{recognize-FBLMWXNE.js → recognize-OFW7HWTM.js} +5 -5
- package/dist/bundle/{remote-XC3OXE4T.js → remote-YBDRZQZ5.js} +8 -8
- package/dist/bundle/{rerank-2XMKKF4S.js → rerank-TQQNS5FJ.js} +8 -8
- package/dist/bundle/{serve-Q2BQHNZB.js → serve-OPZXMVLH.js} +10 -10
- package/dist/bundle/{server-42HPV3AH.js → server-2D6DDIK5.js} +39 -39
- package/dist/bundle/server-R6G2O772.js +70 -0
- package/dist/bundle/{services-WU22S2MU.js → services-34WKT3NN.js} +29 -27
- package/dist/bundle/{sqlite-runtime-CSO6K6B2.js → sqlite-runtime-WPUMKLUV.js} +7 -7
- package/dist/bundle/{start-TZWKM4AH.js → start-ZXUJZ4JV.js} +1 -1
- package/dist/bundle/{state-FLUT7U7R.js → state-AV2RB3AQ.js} +7 -7
- package/dist/bundle/{store-TG6622NG.js → store-3M7N2Q5T.js} +15 -15
- package/dist/bundle/{store-HDWMJ44E.js → store-YKV4GAMS.js} +25 -19
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +60 -0
- package/dist/bundle/tokens-F63RXXEF.js +103 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +14 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +4 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -3
- package/dist/config.js.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +3 -5
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +5 -1
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +1 -22
- package/dist/reasons.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -1
- package/dist/registry.js.map +1 -1
- package/dist/tokens.js +5 -5
- package/dist/tokens.js.map +1 -1
- package/dist/upload.js +1 -1
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/command-contract-LQDNHZJU.js +0 -39
- package/dist/bundle/first-screen-TYYF6VXY.js +0 -37
- package/dist/bundle/grants-EUQXSICG.js +0 -105
- package/dist/bundle/server-EWZYN323.js +0 -70
- package/dist/bundle/store-maintenance-command-RHWRUREJ.js +0 -60
- package/dist/bundle/tokens-TXYURU4S.js +0 -103
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
engineMissing,
|
|
8
8
|
extractText,
|
|
9
9
|
importEngine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-67QXMO2G.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-DMHGWL5D.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-HFGR33KD.js";
|
|
49
49
|
import {
|
|
50
50
|
isCliFailure
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-YDN2RH5S.js";
|
|
52
52
|
import {
|
|
53
53
|
isNewer,
|
|
54
54
|
updateCommand
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-CKGHRWVR.js";
|
|
56
56
|
import {
|
|
57
57
|
MAX_MODEL_IMAGE_BYTES
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-EHAI773E.js";
|
|
59
59
|
import {
|
|
60
60
|
OPENAI_URL,
|
|
61
61
|
openRemote,
|
|
62
62
|
remoteKey,
|
|
63
63
|
remoteModel
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-PETFPXLU.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-YGG7UA3C.js";
|
|
74
74
|
import {
|
|
75
75
|
installFiles,
|
|
76
76
|
megabytes
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-ALWTUDZF.js";
|
|
78
78
|
import {
|
|
79
79
|
AGENDA_COLUMNS,
|
|
80
80
|
CHAT_COLUMNS,
|
|
@@ -96,10 +96,12 @@ import {
|
|
|
96
96
|
QUERY_VERSION,
|
|
97
97
|
RANKING_TOKENIZER_VERSION,
|
|
98
98
|
SEARCH_QUERY,
|
|
99
|
+
TASK_CLOSE_KIND,
|
|
99
100
|
TASK_RELATION_KINDS,
|
|
100
101
|
TRACKED_CHAT_COLUMNS,
|
|
101
102
|
UNKNOWN_PROVIDER,
|
|
102
103
|
amountsOf,
|
|
104
|
+
assertGenericAction,
|
|
103
105
|
assertMayDecide,
|
|
104
106
|
attachmentColumns,
|
|
105
107
|
calendarKey,
|
|
@@ -114,6 +116,8 @@ import {
|
|
|
114
116
|
counterFreshness,
|
|
115
117
|
counterObservationTime,
|
|
116
118
|
cutChunks,
|
|
119
|
+
deciderAuthor,
|
|
120
|
+
delayStats,
|
|
117
121
|
dueDayOf,
|
|
118
122
|
entriesOfList,
|
|
119
123
|
envelopeErrors,
|
|
@@ -135,6 +139,7 @@ import {
|
|
|
135
139
|
isFolderProvider,
|
|
136
140
|
isKind,
|
|
137
141
|
isLocator,
|
|
142
|
+
isOwnerOnlyKind,
|
|
138
143
|
isQueryLimit,
|
|
139
144
|
isStemmed,
|
|
140
145
|
kindIn,
|
|
@@ -154,18 +159,20 @@ import {
|
|
|
154
159
|
queryFilter,
|
|
155
160
|
rankingContextRange,
|
|
156
161
|
rankingOptions,
|
|
162
|
+
rankingQuestion,
|
|
157
163
|
recordErrors,
|
|
158
164
|
searchError,
|
|
159
165
|
sourceOf,
|
|
160
166
|
threadConversation,
|
|
161
167
|
validateAst,
|
|
162
|
-
validateFields
|
|
163
|
-
|
|
168
|
+
validateFields,
|
|
169
|
+
withoutField
|
|
170
|
+
} from "./chunk-PPL5ASW2.js";
|
|
164
171
|
import {
|
|
165
172
|
MAX_TEXT_CHARS,
|
|
166
173
|
attachmentMaxBytes,
|
|
167
174
|
pdfPreviewLimits
|
|
168
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-UNJE63JK.js";
|
|
169
176
|
import {
|
|
170
177
|
MEETING_FINDINGS_KIND,
|
|
171
178
|
TASK_KINDS,
|
|
@@ -190,8 +197,9 @@ import {
|
|
|
190
197
|
validateMeetingHitSearch,
|
|
191
198
|
validateMeetingPassage,
|
|
192
199
|
validateMeetingSeriesHistory
|
|
193
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-N7S2UPF3.js";
|
|
194
201
|
import {
|
|
202
|
+
OPERATORS_BY_TYPE,
|
|
195
203
|
dateRange,
|
|
196
204
|
implicitTextTerms,
|
|
197
205
|
parseLucene,
|
|
@@ -200,25 +208,25 @@ import {
|
|
|
200
208
|
timezoneOf,
|
|
201
209
|
validateQuery,
|
|
202
210
|
walkQuery
|
|
203
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-4VHBDVY2.js";
|
|
204
212
|
import {
|
|
205
213
|
DEFAULT_STEMMERS,
|
|
206
214
|
createStemmer,
|
|
207
215
|
fold,
|
|
208
216
|
normalize
|
|
209
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-MVNPE5FZ.js";
|
|
210
218
|
import {
|
|
211
219
|
DEFAULT_TASK_CATEGORIES,
|
|
212
220
|
FALLBACK_CATEGORY
|
|
213
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-77C5XRH3.js";
|
|
214
222
|
import {
|
|
215
223
|
storePath,
|
|
216
224
|
wirecatDirectory
|
|
217
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-KEXTTZJM.js";
|
|
218
226
|
import {
|
|
219
227
|
resolvePaths,
|
|
220
228
|
writeSecurely
|
|
221
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-246P2DCT.js";
|
|
222
230
|
import {
|
|
223
231
|
singleLine,
|
|
224
232
|
visibleControls
|
|
@@ -243,7 +251,7 @@ import {
|
|
|
243
251
|
string,
|
|
244
252
|
transform,
|
|
245
253
|
unknown
|
|
246
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-TKW4QWCY.js";
|
|
247
255
|
import {
|
|
248
256
|
CliError,
|
|
249
257
|
isCliError
|
|
@@ -252,7 +260,7 @@ import {
|
|
|
252
260
|
__name
|
|
253
261
|
} from "./chunk-ZVVMGPBJ.js";
|
|
254
262
|
|
|
255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
263
|
+
// 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/domain/ref-arguments.js
|
|
256
264
|
var TAKES = {
|
|
257
265
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
258
266
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -312,7 +320,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
312
320
|
throw wrongAccount(reference, scope, profiles);
|
|
313
321
|
}, "ensureAccount");
|
|
314
322
|
|
|
315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
323
|
+
// 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/resolve.js
|
|
316
324
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
317
325
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
318
326
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -357,7 +365,7 @@ ${lines}`, { candidates });
|
|
|
357
365
|
}, "ambiguous");
|
|
358
366
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
359
367
|
|
|
360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
368
|
+
// 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/deps.js
|
|
361
369
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
362
370
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
363
371
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -434,7 +442,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
434
442
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
435
443
|
}, "storeOnlyDeps");
|
|
436
444
|
|
|
437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
445
|
+
// 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/botcheck/check.js
|
|
438
446
|
var DAY_MS = 864e5;
|
|
439
447
|
var NEW_DAYS = 30;
|
|
440
448
|
var SAME_TEXT_MIN = 20;
|
|
@@ -511,7 +519,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
511
519
|
};
|
|
512
520
|
}, "scorePerson");
|
|
513
521
|
|
|
514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
522
|
+
// 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/botcheck/registries.js
|
|
515
523
|
var REGISTRIES = {
|
|
516
524
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
517
525
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -596,7 +604,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
596
604
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
597
605
|
})), "notCovered");
|
|
598
606
|
|
|
599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
607
|
+
// 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/botcheck/service.js
|
|
600
608
|
var ACTIVITY_MESSAGES = 1e3;
|
|
601
609
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
602
610
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -684,7 +692,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
684
692
|
};
|
|
685
693
|
}, "botCheckService");
|
|
686
694
|
|
|
687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
695
|
+
// 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/mail/owed.js
|
|
688
696
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
689
697
|
if (newest === null)
|
|
690
698
|
return null;
|
|
@@ -693,7 +701,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
693
701
|
return newest.addressed ? "owed" : null;
|
|
694
702
|
}, "mailTurn");
|
|
695
703
|
|
|
696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
704
|
+
// 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/agenda-mail.js
|
|
697
705
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
698
706
|
if (error instanceof CliError && error.code === "not_found")
|
|
699
707
|
return void 0;
|
|
@@ -751,7 +759,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account2, since, chats)
|
|
|
751
759
|
};
|
|
752
760
|
}, "mailActivity");
|
|
753
761
|
|
|
754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
762
|
+
// 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/chat-coverage.js
|
|
755
763
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
756
764
|
const ids = [...new Set(chatIds)];
|
|
757
765
|
if (ids.length === 0)
|
|
@@ -777,7 +785,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
777
785
|
}));
|
|
778
786
|
}, "chatCoverage");
|
|
779
787
|
|
|
780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
788
|
+
// 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/domain/thread.js
|
|
781
789
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
782
790
|
if (value === void 0)
|
|
783
791
|
return void 0;
|
|
@@ -787,7 +795,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
787
795
|
return id2;
|
|
788
796
|
}, "threadIdOf");
|
|
789
797
|
|
|
790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
798
|
+
// 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/ports/messenger.js
|
|
791
799
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
792
800
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
793
801
|
if (key in own)
|
|
@@ -804,15 +812,15 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
804
812
|
return found.bind(adapter);
|
|
805
813
|
}, "capability");
|
|
806
814
|
|
|
807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
815
|
+
// 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/ports/traits.js
|
|
808
816
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
809
817
|
|
|
810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
818
|
+
// 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/sends/send-id.js
|
|
811
819
|
import { randomBytes } from "node:crypto";
|
|
812
820
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
813
821
|
var newOperationId = newSendId;
|
|
814
822
|
|
|
815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
823
|
+
// 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/questions.js
|
|
816
824
|
var LINKS = /https?:\/\/\S+/g;
|
|
817
825
|
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");
|
|
818
826
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -842,7 +850,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
842
850
|
});
|
|
843
851
|
}, "questions");
|
|
844
852
|
|
|
845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
853
|
+
// 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/chat-stats.js
|
|
846
854
|
var TOP_POSTS = 5;
|
|
847
855
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
848
856
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -959,7 +967,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
959
967
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
960
968
|
}, "median");
|
|
961
969
|
|
|
962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
970
|
+
// 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/member-history.js
|
|
963
971
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
964
972
|
const events = [];
|
|
965
973
|
for (const stay of stays) {
|
|
@@ -991,7 +999,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
991
999
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
992
1000
|
}, "memberEvents");
|
|
993
1001
|
|
|
994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1002
|
+
// 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/members-audit.js
|
|
995
1003
|
var AUDIT_PAGE = 200;
|
|
996
1004
|
var AUDIT_BUDGET = 10;
|
|
997
1005
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -1071,7 +1079,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
1071
1079
|
return found;
|
|
1072
1080
|
}, "burstJoins");
|
|
1073
1081
|
|
|
1074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1082
|
+
// 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/message-resolution.js
|
|
1075
1083
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
1076
1084
|
if (deps.reads !== "store")
|
|
1077
1085
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -1089,11 +1097,11 @@ var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2)
|
|
|
1089
1097
|
}, "readChatId");
|
|
1090
1098
|
var LEFT_EMPTY = "you left this chat, and the store holds none of its messages";
|
|
1091
1099
|
var storedChatId = /* @__PURE__ */ __name((messenger, reference, store, account2, { includeLeft = false } = {}) => {
|
|
1092
|
-
const
|
|
1100
|
+
const renamed2 = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(account2, id2), "renamed");
|
|
1093
1101
|
const profilesOn = profilesOnAccount(store, messenger.app?.command, account2.provider);
|
|
1094
1102
|
const among = chatIdAmong(messenger, reference, account2, {
|
|
1095
1103
|
held: /* @__PURE__ */ __name(() => store.chats.chats(account2, {}), "held"),
|
|
1096
|
-
renamed,
|
|
1104
|
+
renamed: renamed2,
|
|
1097
1105
|
left: /* @__PURE__ */ __name(async (id2) => leftIn(await store.chats.chats(account2, byId(id2))), "left"),
|
|
1098
1106
|
profilesOn
|
|
1099
1107
|
});
|
|
@@ -1104,17 +1112,17 @@ var storedChatId = /* @__PURE__ */ __name((messenger, reference, store, account2
|
|
|
1104
1112
|
throw error;
|
|
1105
1113
|
return chatIdAmong(messenger, reference, account2, {
|
|
1106
1114
|
held: /* @__PURE__ */ __name(() => store.chats.chats(account2, { includeLeft: true }), "held"),
|
|
1107
|
-
renamed,
|
|
1115
|
+
renamed: renamed2,
|
|
1108
1116
|
profilesOn
|
|
1109
1117
|
});
|
|
1110
1118
|
});
|
|
1111
1119
|
}, "storedChatId");
|
|
1112
1120
|
var keptChatId = /* @__PURE__ */ __name((messenger, reference, store, account2) => storedChatId(messenger, reference, store, account2, { includeLeft: true }), "keptChatId");
|
|
1113
1121
|
var chatIdIn = /* @__PURE__ */ __name((messenger, reference, store, { includeLeft = false } = {}) => {
|
|
1114
|
-
const
|
|
1122
|
+
const renamed2 = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(id2), "renamed");
|
|
1115
1123
|
const among = chatIdAmong(messenger, reference, store.account, {
|
|
1116
1124
|
held: /* @__PURE__ */ __name(() => store.chats.chats({}), "held"),
|
|
1117
|
-
renamed,
|
|
1125
|
+
renamed: renamed2,
|
|
1118
1126
|
left: /* @__PURE__ */ __name(async (id2) => leftIn(await store.chats.chats(byId(id2))), "left")
|
|
1119
1127
|
});
|
|
1120
1128
|
if (!includeLeft)
|
|
@@ -1124,7 +1132,7 @@ var chatIdIn = /* @__PURE__ */ __name((messenger, reference, store, { includeLef
|
|
|
1124
1132
|
throw error;
|
|
1125
1133
|
return chatIdAmong(messenger, reference, store.account, {
|
|
1126
1134
|
held: /* @__PURE__ */ __name(() => store.chats.chats({ includeLeft: true }), "held"),
|
|
1127
|
-
renamed
|
|
1135
|
+
renamed: renamed2
|
|
1128
1136
|
});
|
|
1129
1137
|
});
|
|
1130
1138
|
}, "chatIdIn");
|
|
@@ -1139,7 +1147,7 @@ var profilesOnAccount = /* @__PURE__ */ __name((store, app, provider) => async (
|
|
|
1139
1147
|
return void 0;
|
|
1140
1148
|
return Object.entries((await store.accounts.profiles())[app] ?? {}).filter(([, key]) => key.provider === provider && key.account === account2).map(([name]) => name);
|
|
1141
1149
|
}, "profilesOnAccount");
|
|
1142
|
-
var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account2, { held, renamed, left, profilesOn }) => {
|
|
1150
|
+
var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account2, { held, renamed: renamed2, left, profilesOn }) => {
|
|
1143
1151
|
const trimmed = reference.trim();
|
|
1144
1152
|
if (messenger.savedChatId && ["me", "self", "saved"].includes(trimmed.toLowerCase())) {
|
|
1145
1153
|
return messenger.savedChatId(account2);
|
|
@@ -1149,7 +1157,7 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account2,
|
|
|
1149
1157
|
await ensureAccount(named2, { account: account2.account }, profilesOn);
|
|
1150
1158
|
if (named2 || /^-?\d+$/.test(trimmed)) {
|
|
1151
1159
|
const typed = named2?.chat ?? trimmed;
|
|
1152
|
-
const id2 = await
|
|
1160
|
+
const id2 = await renamed2(typed) ?? typed;
|
|
1153
1161
|
if (await left?.(id2))
|
|
1154
1162
|
throw new CliError("not_found", `you left chat ${id2}`);
|
|
1155
1163
|
return id2;
|
|
@@ -1158,7 +1166,7 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account2,
|
|
|
1158
1166
|
const exact = chats.find((one2) => one2.id === trimmed);
|
|
1159
1167
|
if (exact)
|
|
1160
1168
|
return exact.id;
|
|
1161
|
-
const moved = await
|
|
1169
|
+
const moved = await renamed2(trimmed);
|
|
1162
1170
|
if (moved !== void 0 && chats.some((one2) => one2.id === moved))
|
|
1163
1171
|
return moved;
|
|
1164
1172
|
if (trimmed.startsWith("@")) {
|
|
@@ -1230,7 +1238,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
1230
1238
|
}
|
|
1231
1239
|
}, "senderAmong");
|
|
1232
1240
|
|
|
1233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1241
|
+
// 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/chats.js
|
|
1234
1242
|
var EVENTS_DAYS = 7;
|
|
1235
1243
|
var TRACKED_DAYS = 30;
|
|
1236
1244
|
var STATS_PAGE = 1e3;
|
|
@@ -1525,7 +1533,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
1525
1533
|
return members.length === 0 ? null : members;
|
|
1526
1534
|
}, "storedMembers");
|
|
1527
1535
|
|
|
1528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1536
|
+
// 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/task-categories.js
|
|
1529
1537
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
1530
1538
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
1531
1539
|
const name = typed.trim().toLowerCase();
|
|
@@ -1582,7 +1590,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
1582
1590
|
return best.name;
|
|
1583
1591
|
}, "categorize");
|
|
1584
1592
|
|
|
1585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1593
|
+
// 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/task-rules.js
|
|
1586
1594
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
1587
1595
|
var RULES_IN = {
|
|
1588
1596
|
dialog: "all",
|
|
@@ -1788,7 +1796,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
1788
1796
|
return passes;
|
|
1789
1797
|
}, "applyTaskRulesToChats");
|
|
1790
1798
|
|
|
1791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1799
|
+
// 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/task-tag-filters.js
|
|
1792
1800
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
1793
1801
|
const tags = /* @__PURE__ */ new Map();
|
|
1794
1802
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -1797,7 +1805,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
1797
1805
|
return tags;
|
|
1798
1806
|
}, "taskTagFilters");
|
|
1799
1807
|
|
|
1800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1808
|
+
// 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/agenda.js
|
|
1801
1809
|
var DAY = 864e5;
|
|
1802
1810
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
1803
1811
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -2044,7 +2052,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
2044
2052
|
};
|
|
2045
2053
|
}, "agendaItem");
|
|
2046
2054
|
|
|
2047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2055
|
+
// 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/context/evidence-response.js
|
|
2048
2056
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
2049
2057
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
2050
2058
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -2108,7 +2116,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
2108
2116
|
}
|
|
2109
2117
|
}, "validateContextEvidencePage");
|
|
2110
2118
|
|
|
2111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2119
|
+
// 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/context/read-budget.js
|
|
2112
2120
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
2113
2121
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
2114
2122
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -2161,7 +2169,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
2161
2169
|
};
|
|
2162
2170
|
}, "contextReadBudget");
|
|
2163
2171
|
|
|
2164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2172
|
+
// 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/context-evidence.js
|
|
2165
2173
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
2166
2174
|
if (!port || typeof port.read !== "function")
|
|
2167
2175
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -2205,7 +2213,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
2205
2213
|
};
|
|
2206
2214
|
}, "createContextEvidenceReader");
|
|
2207
2215
|
|
|
2208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2216
|
+
// 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/excerpt.js
|
|
2209
2217
|
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");
|
|
2210
2218
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
2211
2219
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -2221,7 +2229,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
2221
2229
|
}, "excerpt");
|
|
2222
2230
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
2223
2231
|
|
|
2224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2232
|
+
// 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/ingest.js
|
|
2225
2233
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
2226
2234
|
dryRun,
|
|
2227
2235
|
source: null,
|
|
@@ -2296,7 +2304,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account: account2,
|
|
|
2296
2304
|
return receipt;
|
|
2297
2305
|
}, "ingest");
|
|
2298
2306
|
|
|
2299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2307
|
+
// 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/link-scorers/shared.js
|
|
2300
2308
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
2301
2309
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
2302
2310
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -2335,7 +2343,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
2335
2343
|
return found;
|
|
2336
2344
|
}, "identitiesIn");
|
|
2337
2345
|
|
|
2338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2346
|
+
// 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/link-scorers/alias-hits.js
|
|
2339
2347
|
var SEARCH_LIMIT = 500;
|
|
2340
2348
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
2341
2349
|
var aliasHits = {
|
|
@@ -2384,7 +2392,7 @@ var aliasHits = {
|
|
|
2384
2392
|
}, "candidates")
|
|
2385
2393
|
};
|
|
2386
2394
|
|
|
2387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2395
|
+
// 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/link-scorers/chat-senders.js
|
|
2388
2396
|
var WEIGHT = 0.5;
|
|
2389
2397
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
2390
2398
|
var LARGE_GROUP = 30;
|
|
@@ -2436,7 +2444,7 @@ var chatSenders = {
|
|
|
2436
2444
|
}, "candidates")
|
|
2437
2445
|
};
|
|
2438
2446
|
|
|
2439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2447
|
+
// 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/link-scorers/chat-title.js
|
|
2440
2448
|
var WEIGHT2 = 0.7;
|
|
2441
2449
|
var chatTitle = {
|
|
2442
2450
|
id: "chat-title",
|
|
@@ -2475,7 +2483,7 @@ var chatTitle = {
|
|
|
2475
2483
|
}, "candidates")
|
|
2476
2484
|
};
|
|
2477
2485
|
|
|
2478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2486
|
+
// 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/link-scorers/email-domain.js
|
|
2479
2487
|
var WEIGHT3 = 0.3;
|
|
2480
2488
|
var CONTACTS = 500;
|
|
2481
2489
|
var MOST_PAIRS = 200;
|
|
@@ -2536,7 +2544,7 @@ var emailDomain = {
|
|
|
2536
2544
|
}, "candidates")
|
|
2537
2545
|
};
|
|
2538
2546
|
|
|
2539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2547
|
+
// 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/link-scorers/mail-thread.js
|
|
2540
2548
|
var NAMED = 0.7;
|
|
2541
2549
|
var MEMBER_ONLY = 0.3;
|
|
2542
2550
|
var READ_LIMIT2 = 500;
|
|
@@ -2609,7 +2617,7 @@ var mailThread = {
|
|
|
2609
2617
|
}, "candidates")
|
|
2610
2618
|
};
|
|
2611
2619
|
|
|
2612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2620
|
+
// 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/link-scorers/member-chats.js
|
|
2613
2621
|
var WEIGHT4 = 0.5;
|
|
2614
2622
|
var memberChats = {
|
|
2615
2623
|
id: "member-chats",
|
|
@@ -2649,7 +2657,7 @@ var memberChats = {
|
|
|
2649
2657
|
}, "candidates")
|
|
2650
2658
|
};
|
|
2651
2659
|
|
|
2652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2660
|
+
// 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/link-scorers/member-dialog.js
|
|
2653
2661
|
var WEIGHT5 = 0.6;
|
|
2654
2662
|
var memberDialog = {
|
|
2655
2663
|
id: "member-dialog",
|
|
@@ -2683,7 +2691,7 @@ var memberDialog = {
|
|
|
2683
2691
|
}, "candidates")
|
|
2684
2692
|
};
|
|
2685
2693
|
|
|
2686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2694
|
+
// 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-purposes.js
|
|
2687
2695
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
2688
2696
|
var DEFAULT_PURPOSES = ["work"];
|
|
2689
2697
|
var LINK_PURPOSE = "work";
|
|
@@ -2713,7 +2721,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
2713
2721
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
2714
2722
|
], "purposeList");
|
|
2715
2723
|
|
|
2716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2724
|
+
// 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-gathering-around.js
|
|
2717
2725
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
2718
2726
|
async around(ref, window2) {
|
|
2719
2727
|
const at = parseLocator(ref);
|
|
@@ -2809,7 +2817,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
2809
2817
|
};
|
|
2810
2818
|
}, "storedNeighbours");
|
|
2811
2819
|
|
|
2812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2820
|
+
// 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-gathering-request.js
|
|
2813
2821
|
import { createHash } from "node:crypto";
|
|
2814
2822
|
var DAY2 = 864e5;
|
|
2815
2823
|
var MAX_TIME = 864e13;
|
|
@@ -3125,7 +3133,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
3125
3133
|
return value;
|
|
3126
3134
|
}, "decodeCheckpoint");
|
|
3127
3135
|
|
|
3128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3136
|
+
// 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-gathering.js
|
|
3129
3137
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
3130
3138
|
var PAGE = 20;
|
|
3131
3139
|
var PEOPLE = 20;
|
|
@@ -3529,7 +3537,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
3529
3537
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
3530
3538
|
}, "peopleOf");
|
|
3531
3539
|
|
|
3532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3540
|
+
// 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/meeting-project-candidate-matching.js
|
|
3533
3541
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
3534
3542
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
3535
3543
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -3594,7 +3602,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
3594
3602
|
omittedMatches: omitted
|
|
3595
3603
|
})), "matchProjectCandidates");
|
|
3596
3604
|
|
|
3597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3605
|
+
// 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-gathering-mentions.js
|
|
3598
3606
|
var KINDS = ["project", "tag", "topic"];
|
|
3599
3607
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
3600
3608
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -3649,7 +3657,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
3649
3657
|
};
|
|
3650
3658
|
}, "findEvidenceMentions");
|
|
3651
3659
|
|
|
3652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3660
|
+
// 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/stored-project-gathering.js
|
|
3653
3661
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account2, chatId, { since, until }) => {
|
|
3654
3662
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
3655
3663
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -3955,7 +3963,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
3955
3963
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
3956
3964
|
}, "purposeHintOf");
|
|
3957
3965
|
|
|
3958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3966
|
+
// 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/link-scorers/scan.js
|
|
3959
3967
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
3960
3968
|
var PERSON_SCORERS = [emailDomain];
|
|
3961
3969
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -4163,18 +4171,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
4163
4171
|
}, "referenceOf");
|
|
4164
4172
|
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");
|
|
4165
4173
|
|
|
4166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4174
|
+
// 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/media-archive.js
|
|
4167
4175
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
4168
4176
|
|
|
4169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4177
|
+
// 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/media-archive-files.js
|
|
4170
4178
|
import { lstat } from "node:fs/promises";
|
|
4171
4179
|
|
|
4172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4180
|
+
// 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/persistence/native/recording-partial-store.js
|
|
4173
4181
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
4174
4182
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
4175
4183
|
import { join as join2 } from "node:path";
|
|
4176
4184
|
|
|
4177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4185
|
+
// 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/persistence/native/recording-partial-metadata.js
|
|
4178
4186
|
import { createHash as createHash2 } from "node:crypto";
|
|
4179
4187
|
var metadataLimit = 16384;
|
|
4180
4188
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -4234,7 +4242,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
4234
4242
|
}
|
|
4235
4243
|
}, "readPartialMetadata");
|
|
4236
4244
|
|
|
4237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4245
|
+
// 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/persistence/native/recording-partial-writer.js
|
|
4238
4246
|
import { randomUUID } from "node:crypto";
|
|
4239
4247
|
import { open, rename, unlink } from "node:fs/promises";
|
|
4240
4248
|
import { join } from "node:path";
|
|
@@ -4326,7 +4334,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
4326
4334
|
};
|
|
4327
4335
|
}, "partialWriter");
|
|
4328
4336
|
|
|
4329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4337
|
+
// 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/persistence/native/recording-partial-store.js
|
|
4330
4338
|
var NativeRecordingPartialStore = class {
|
|
4331
4339
|
static {
|
|
4332
4340
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -4433,12 +4441,12 @@ var NativeRecordingPartialStore = class {
|
|
|
4433
4441
|
}
|
|
4434
4442
|
};
|
|
4435
4443
|
|
|
4436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4444
|
+
// 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/persistence/native/recording-publication.js
|
|
4437
4445
|
import { createHash as createHash4 } from "node:crypto";
|
|
4438
4446
|
import { link } from "node:fs/promises";
|
|
4439
4447
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
4440
4448
|
|
|
4441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4449
|
+
// 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/persistence/native/recording-publication-files.js
|
|
4442
4450
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
4443
4451
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
4444
4452
|
signal?.throwIfAborted();
|
|
@@ -4473,7 +4481,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
4473
4481
|
signal?.throwIfAborted();
|
|
4474
4482
|
}, "commitPublication");
|
|
4475
4483
|
|
|
4476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4484
|
+
// 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/persistence/native/recording-publication-journal.js
|
|
4477
4485
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
4478
4486
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
4479
4487
|
import { join as join3 } from "node:path";
|
|
@@ -4546,7 +4554,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
4546
4554
|
}
|
|
4547
4555
|
}, "writePublicationJournal");
|
|
4548
4556
|
|
|
4549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4557
|
+
// 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/persistence/native/recording-publication.js
|
|
4550
4558
|
var NativeRecordingPublication = class {
|
|
4551
4559
|
static {
|
|
4552
4560
|
__name(this, "NativeRecordingPublication");
|
|
@@ -4619,7 +4627,7 @@ var NativeRecordingPublication = class {
|
|
|
4619
4627
|
}
|
|
4620
4628
|
};
|
|
4621
4629
|
|
|
4622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4630
|
+
// 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/media-archive-manifest.js
|
|
4623
4631
|
import { createHash as createHash5 } from "node:crypto";
|
|
4624
4632
|
import { readdir } from "node:fs/promises";
|
|
4625
4633
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -4706,7 +4714,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
4706
4714
|
beforePublish
|
|
4707
4715
|
}), "commitMediaEntry");
|
|
4708
4716
|
|
|
4709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4717
|
+
// 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/media-archive-files.js
|
|
4710
4718
|
var validator = '"media-completed-v1"';
|
|
4711
4719
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
4712
4720
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -4807,7 +4815,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
4807
4815
|
return entry;
|
|
4808
4816
|
}, "archiveMediaFile");
|
|
4809
4817
|
|
|
4810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4818
|
+
// 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/media-archive-locks.js
|
|
4811
4819
|
import { mkdir, realpath } from "node:fs/promises";
|
|
4812
4820
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
4813
4821
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -4874,7 +4882,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory, signal, run
|
|
|
4874
4882
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
4875
4883
|
}, "withMediaArchiveLocks");
|
|
4876
4884
|
|
|
4877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4885
|
+
// 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/media-archive.js
|
|
4878
4886
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
4879
4887
|
if (value === void 0)
|
|
4880
4888
|
return void 0;
|
|
@@ -5027,7 +5035,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
5027
5035
|
}, { create: true });
|
|
5028
5036
|
}, "archiveMedia");
|
|
5029
5037
|
|
|
5030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5038
|
+
// 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/media-archive-move.js
|
|
5031
5039
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
5032
5040
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
5033
5041
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory) => {
|
|
@@ -5180,7 +5188,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
5180
5188
|
}, { additional: [target], createAdditional: !options.dryRun });
|
|
5181
5189
|
}, "moveMediaArchive");
|
|
5182
5190
|
|
|
5183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5191
|
+
// 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/model-downloads.js
|
|
5184
5192
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
5185
5193
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
5186
5194
|
}, "progress") }) => {
|
|
@@ -5203,7 +5211,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5203
5211
|
}
|
|
5204
5212
|
await nativeRuntime({ env, progress });
|
|
5205
5213
|
progress(`${model.id}: loading it once to check it works`);
|
|
5206
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
5214
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-Q6Q5IOJQ.js");
|
|
5207
5215
|
const embedder = await openEmbedder2(model, directory);
|
|
5208
5216
|
try {
|
|
5209
5217
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -5224,7 +5232,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
5224
5232
|
}
|
|
5225
5233
|
await nativeRuntime({ env, progress });
|
|
5226
5234
|
progress(`${model.id}: loading it once to check it works`);
|
|
5227
|
-
const { openReranker } = await import("./rerank-
|
|
5235
|
+
const { openReranker } = await import("./rerank-TQQNS5FJ.js");
|
|
5228
5236
|
const reranker = await openReranker(model, directory);
|
|
5229
5237
|
try {
|
|
5230
5238
|
await reranker.score("check", ["check"]);
|
|
@@ -5242,7 +5250,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5242
5250
|
await installFiles(placedImage(model, directory), { progress });
|
|
5243
5251
|
}
|
|
5244
5252
|
progress(`${model.id}: loading it once to check it works`);
|
|
5245
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
5253
|
+
const { openPictureEmbedder } = await import("./embedder-D44JDTAA.js");
|
|
5246
5254
|
const embedder = await openPictureEmbedder(model, directory);
|
|
5247
5255
|
try {
|
|
5248
5256
|
const vector = await embedder.embedQuery("check");
|
|
@@ -5254,7 +5262,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
5254
5262
|
return { model, directory };
|
|
5255
5263
|
}, "downloadImageModel");
|
|
5256
5264
|
|
|
5257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5265
|
+
// 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/domain/money-words.js
|
|
5258
5266
|
var MONEY_REQUEST = "money-request";
|
|
5259
5267
|
var MONEY_DONE = "money-done";
|
|
5260
5268
|
var PROMISE = "promise";
|
|
@@ -5288,10 +5296,10 @@ var MONEY_WORDS = [
|
|
|
5288
5296
|
}
|
|
5289
5297
|
];
|
|
5290
5298
|
|
|
5291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5299
|
+
// 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/money-words.js
|
|
5292
5300
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
5293
5301
|
|
|
5294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5302
|
+
// 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/domain/status-words.js
|
|
5295
5303
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
5296
5304
|
var MONEY_DONE_FORMS = words([
|
|
5297
5305
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -5331,7 +5339,7 @@ var PROMISE_FORMS = words([
|
|
|
5331
5339
|
"estar\xE1 listo"
|
|
5332
5340
|
]);
|
|
5333
5341
|
|
|
5334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5342
|
+
// 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/items.js
|
|
5335
5343
|
var EXCERPT_CHARS = 80;
|
|
5336
5344
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
5337
5345
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -5353,7 +5361,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
5353
5361
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
5354
5362
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
5355
5363
|
|
|
5356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5364
|
+
// 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/amounts.js
|
|
5357
5365
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
5358
5366
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
5359
5367
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -5433,7 +5441,7 @@ var amounts = {
|
|
|
5433
5441
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "open" ? [{ chat: item2.chat, weight: 2, why: "money open" }] : []), "attention")
|
|
5434
5442
|
};
|
|
5435
5443
|
|
|
5436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5444
|
+
// 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/children.js
|
|
5437
5445
|
var children = {
|
|
5438
5446
|
id: "children",
|
|
5439
5447
|
version: 1,
|
|
@@ -5462,7 +5470,7 @@ var children = {
|
|
|
5462
5470
|
}, "read")
|
|
5463
5471
|
};
|
|
5464
5472
|
|
|
5465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5473
|
+
// 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/coverage.js
|
|
5466
5474
|
var coverage = {
|
|
5467
5475
|
id: "coverage",
|
|
5468
5476
|
version: 1,
|
|
@@ -5491,7 +5499,7 @@ var coverage = {
|
|
|
5491
5499
|
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")
|
|
5492
5500
|
};
|
|
5493
5501
|
|
|
5494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5502
|
+
// 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/last-message.js
|
|
5495
5503
|
var lastMessage = {
|
|
5496
5504
|
id: "last-message",
|
|
5497
5505
|
version: 1,
|
|
@@ -5513,7 +5521,7 @@ var lastMessage = {
|
|
|
5513
5521
|
}, "read")
|
|
5514
5522
|
};
|
|
5515
5523
|
|
|
5516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
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
|
|
5517
5525
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
5518
5526
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
5519
5527
|
signal: "payments",
|
|
@@ -5563,7 +5571,7 @@ var payments = {
|
|
|
5563
5571
|
}, "read")
|
|
5564
5572
|
};
|
|
5565
5573
|
|
|
5566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5574
|
+
// 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/promises.js
|
|
5567
5575
|
var PATTERNS_PER_CHAT = 3;
|
|
5568
5576
|
var DAY3 = 864e5;
|
|
5569
5577
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -5652,7 +5660,7 @@ var promises = {
|
|
|
5652
5660
|
}, "read")
|
|
5653
5661
|
};
|
|
5654
5662
|
|
|
5655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5663
|
+
// 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/questions.js
|
|
5656
5664
|
var PER_SIDE = 5;
|
|
5657
5665
|
var WEEK = 7 * 864e5;
|
|
5658
5666
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -5683,7 +5691,7 @@ var questions2 = {
|
|
|
5683
5691
|
}, "attention")
|
|
5684
5692
|
};
|
|
5685
5693
|
|
|
5686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5694
|
+
// 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/reply-next.js
|
|
5687
5695
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
5688
5696
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
5689
5697
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -5751,7 +5759,7 @@ var replyNext = {
|
|
|
5751
5759
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
5752
5760
|
};
|
|
5753
5761
|
|
|
5754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5762
|
+
// 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/topics.js
|
|
5755
5763
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
5756
5764
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
5757
5765
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -5797,7 +5805,7 @@ var topics = {
|
|
|
5797
5805
|
}, "read")
|
|
5798
5806
|
};
|
|
5799
5807
|
|
|
5800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5808
|
+
// 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/index.js
|
|
5801
5809
|
var STATUS_SIGNALS = [
|
|
5802
5810
|
lastMessage,
|
|
5803
5811
|
replyNext,
|
|
@@ -5810,7 +5818,7 @@ var STATUS_SIGNALS = [
|
|
|
5810
5818
|
children
|
|
5811
5819
|
];
|
|
5812
5820
|
|
|
5813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5821
|
+
// 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/index.js
|
|
5814
5822
|
var DAY4 = 864e5;
|
|
5815
5823
|
var STATUS_WINDOW = 300;
|
|
5816
5824
|
var STATUS_CHATS = 16;
|
|
@@ -5992,7 +6000,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
5992
6000
|
};
|
|
5993
6001
|
}, "projectStatus");
|
|
5994
6002
|
|
|
5995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6003
|
+
// 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/account.js
|
|
5996
6004
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
5997
6005
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
5998
6006
|
if (deps.offline)
|
|
@@ -6064,7 +6072,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
6064
6072
|
};
|
|
6065
6073
|
}, "accountService");
|
|
6066
6074
|
|
|
6067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6075
|
+
// 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/domain/send-time.js
|
|
6068
6076
|
var MINUTE = 6e4;
|
|
6069
6077
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
6070
6078
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -6083,7 +6091,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
6083
6091
|
return new Date(at - at % MINUTE).toISOString();
|
|
6084
6092
|
}, "sendTime");
|
|
6085
6093
|
|
|
6086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6094
|
+
// 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/admin.js
|
|
6087
6095
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
6088
6096
|
try {
|
|
6089
6097
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -6330,7 +6338,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
6330
6338
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
6331
6339
|
}, "linkLimits");
|
|
6332
6340
|
|
|
6333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6341
|
+
// 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/mail-search.js
|
|
6334
6342
|
var THREADS_PAGE = 500;
|
|
6335
6343
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
6336
6344
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -6409,7 +6417,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
6409
6417
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
6410
6418
|
}, "readMail");
|
|
6411
6419
|
|
|
6412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6420
|
+
// 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/search-kind.js
|
|
6413
6421
|
var NO_MAIL = "no_mail";
|
|
6414
6422
|
var MAIL = "email";
|
|
6415
6423
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -6456,7 +6464,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
6456
6464
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
6457
6465
|
}, "accountsOfKind");
|
|
6458
6466
|
|
|
6459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6467
|
+
// 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/messages-search.js
|
|
6460
6468
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
6461
6469
|
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");
|
|
6462
6470
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -6804,7 +6812,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
6804
6812
|
};
|
|
6805
6813
|
}, "statsLucene");
|
|
6806
6814
|
|
|
6807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6815
|
+
// 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/moment.js
|
|
6808
6816
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
6809
6817
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
6810
6818
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -6844,7 +6852,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
6844
6852
|
};
|
|
6845
6853
|
}, "dateWindow");
|
|
6846
6854
|
|
|
6847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6855
|
+
// 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/rankings-selection.js
|
|
6848
6856
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
6849
6857
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
6850
6858
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -7013,7 +7021,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
7013
7021
|
};
|
|
7014
7022
|
}, "readRankingSelection");
|
|
7015
7023
|
|
|
7016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7024
|
+
// 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/search-record.js
|
|
7017
7025
|
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");
|
|
7018
7026
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
7019
7027
|
command,
|
|
@@ -7023,7 +7031,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
7023
7031
|
fieldsVersion: FIELD_VERSION
|
|
7024
7032
|
}), "searchRecordOf");
|
|
7025
7033
|
|
|
7026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7034
|
+
// 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/admin-statistics.js
|
|
7027
7035
|
function invalid2(message) {
|
|
7028
7036
|
throw new CliError("validation_error", message);
|
|
7029
7037
|
}
|
|
@@ -7317,10 +7325,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
7317
7325
|
}, "evidence")
|
|
7318
7326
|
}), "adminStatisticsService");
|
|
7319
7327
|
|
|
7320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7328
|
+
// 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/archive.js
|
|
7321
7329
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
7322
7330
|
|
|
7323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7331
|
+
// 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/backfill-estimate.js
|
|
7324
7332
|
var REQUEST_MS = 400;
|
|
7325
7333
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
7326
7334
|
const lowest = ranges[0];
|
|
@@ -7343,13 +7351,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
7343
7351
|
};
|
|
7344
7352
|
}, "estimateBackfill");
|
|
7345
7353
|
|
|
7346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7354
|
+
// 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/domain/recovery.js
|
|
7347
7355
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
7348
7356
|
...error,
|
|
7349
7357
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
7350
7358
|
}), "withRecovery");
|
|
7351
7359
|
|
|
7352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7360
|
+
// 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/batch.js
|
|
7353
7361
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
7354
7362
|
if (isCliFailure(error))
|
|
7355
7363
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -7432,7 +7440,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
7432
7440
|
};
|
|
7433
7441
|
}, "mergeBatches");
|
|
7434
7442
|
|
|
7435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7443
|
+
// 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/patience.js
|
|
7436
7444
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
7437
7445
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
7438
7446
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -7455,7 +7463,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
7455
7463
|
}
|
|
7456
7464
|
}, "patiently");
|
|
7457
7465
|
|
|
7458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7466
|
+
// 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/conversations/link.js
|
|
7459
7467
|
var RULES_VERSION = 5;
|
|
7460
7468
|
var LOOK_BACK = 50;
|
|
7461
7469
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -7545,7 +7553,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
7545
7553
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
7546
7554
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
7547
7555
|
|
|
7548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7556
|
+
// 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/images/context/index.js
|
|
7549
7557
|
var CONTEXT_MESSAGES = 3;
|
|
7550
7558
|
var CONTEXT_MINUTES = 10;
|
|
7551
7559
|
var MAX_CHARS = 1200;
|
|
@@ -7569,12 +7577,12 @@ var context = {
|
|
|
7569
7577
|
}, "describe")
|
|
7570
7578
|
};
|
|
7571
7579
|
|
|
7572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7580
|
+
// 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/images/registry.js
|
|
7573
7581
|
var BUILT_INS = [context];
|
|
7574
7582
|
var providers = [...BUILT_INS];
|
|
7575
7583
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
7576
7584
|
|
|
7577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7585
|
+
// 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/conversations.js
|
|
7578
7586
|
var READ_PAGE = 5e3;
|
|
7579
7587
|
var CHAIN = 50;
|
|
7580
7588
|
var CONVERSATION_QUERY = {
|
|
@@ -7726,7 +7734,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
7726
7734
|
return size4;
|
|
7727
7735
|
}, "sized");
|
|
7728
7736
|
|
|
7729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7737
|
+
// 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/embeddings-maintenance.js
|
|
7730
7738
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
7731
7739
|
var MESSAGE_PAGE = 5e3;
|
|
7732
7740
|
var PER_SESSION = 8;
|
|
@@ -7745,7 +7753,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
7745
7753
|
price: remote.price,
|
|
7746
7754
|
installed: true,
|
|
7747
7755
|
perBatch: PER_REQUEST * concurrency,
|
|
7748
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
7756
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-YBDRZQZ5.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
7749
7757
|
};
|
|
7750
7758
|
}
|
|
7751
7759
|
const model = textModel(choice);
|
|
@@ -7762,7 +7770,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
7762
7770
|
if (!isTextModelInstalled(model, directory))
|
|
7763
7771
|
throw notDownloaded(model.id);
|
|
7764
7772
|
if (apart) {
|
|
7765
|
-
const { openProcess } = await import("./process-
|
|
7773
|
+
const { openProcess } = await import("./process-44JS2W7L.js");
|
|
7766
7774
|
return openProcess(model, directory, { threads: threads ?? defaultThreads() });
|
|
7767
7775
|
}
|
|
7768
7776
|
return openEmbedder(model, directory, { threads: threads ?? defaultThreads() });
|
|
@@ -8051,7 +8059,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
8051
8059
|
return { ...one2, state };
|
|
8052
8060
|
}, "shaped");
|
|
8053
8061
|
|
|
8054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8062
|
+
// 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/search-catchup.js
|
|
8055
8063
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
8056
8064
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
8057
8065
|
for (const [key, value, maximum] of [
|
|
@@ -8104,7 +8112,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
8104
8112
|
}
|
|
8105
8113
|
}, "catchUpSearch");
|
|
8106
8114
|
|
|
8107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8115
|
+
// 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/archive.js
|
|
8108
8116
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
8109
8117
|
if (deps.reads === "store") {
|
|
8110
8118
|
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`);
|
|
@@ -8470,7 +8478,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
8470
8478
|
return message?.timestamp ?? fallback;
|
|
8471
8479
|
}, "timeOfKey");
|
|
8472
8480
|
|
|
8473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8481
|
+
// 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/archive-gaps.js
|
|
8474
8482
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
8475
8483
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
8476
8484
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -8607,16 +8615,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
8607
8615
|
return { plan, repair };
|
|
8608
8616
|
}, "gapsService");
|
|
8609
8617
|
|
|
8610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8618
|
+
// 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/attachments.js
|
|
8611
8619
|
import { createHash as createHash8 } from "node:crypto";
|
|
8612
8620
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8613
8621
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
8614
8622
|
|
|
8615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8623
|
+
// 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/attachments/directory.js
|
|
8616
8624
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
8617
8625
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
8618
8626
|
|
|
8619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8627
|
+
// 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/sends/upload.js
|
|
8620
8628
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
8621
8629
|
import { open as open4, stat } from "node:fs/promises";
|
|
8622
8630
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -8818,7 +8826,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
8818
8826
|
return { name, source };
|
|
8819
8827
|
}, "readStickerFile");
|
|
8820
8828
|
|
|
8821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8829
|
+
// 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/attachments/directory.js
|
|
8822
8830
|
var MAX_FILES = 1e4;
|
|
8823
8831
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory, app, env) => {
|
|
8824
8832
|
if (refusedPlace(directory, app, env))
|
|
@@ -9928,7 +9936,7 @@ function imageSize(input) {
|
|
|
9928
9936
|
}
|
|
9929
9937
|
__name(imageSize, "imageSize");
|
|
9930
9938
|
|
|
9931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9939
|
+
// 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/attachments/ocr.js
|
|
9932
9940
|
var MAX_PAGES = 20;
|
|
9933
9941
|
var MAX_PIXELS = 2e7;
|
|
9934
9942
|
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
@@ -10079,7 +10087,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
10079
10087
|
}
|
|
10080
10088
|
}, "ocrPdf");
|
|
10081
10089
|
|
|
10082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10090
|
+
// 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/attachments/pdf-preview.js
|
|
10083
10091
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
10084
10092
|
const limits = pdfPreviewLimits(env);
|
|
10085
10093
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -10156,7 +10164,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
10156
10164
|
}
|
|
10157
10165
|
}, "pdfPreview");
|
|
10158
10166
|
|
|
10159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10167
|
+
// 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/attachments/transfer.js
|
|
10160
10168
|
import { createHash as createHash7 } from "node:crypto";
|
|
10161
10169
|
import { constants } from "node:fs";
|
|
10162
10170
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -10264,7 +10272,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
10264
10272
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
10265
10273
|
}, "transferMime");
|
|
10266
10274
|
|
|
10267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10275
|
+
// 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/file-download.js
|
|
10268
10276
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
10269
10277
|
import { link as link3, rm } from "node:fs/promises";
|
|
10270
10278
|
import { join as join9, resolve as resolve6 } from "node:path";
|
|
@@ -10378,7 +10386,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory, fallbackName, { uniqu
|
|
|
10378
10386
|
}
|
|
10379
10387
|
}, "save");
|
|
10380
10388
|
|
|
10381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10389
|
+
// 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/attachments.js
|
|
10382
10390
|
var ATTACHMENT_QUERY = {
|
|
10383
10391
|
entity: "attachment",
|
|
10384
10392
|
backend: "sql",
|
|
@@ -10801,7 +10809,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
10801
10809
|
}, "setText")
|
|
10802
10810
|
}), "attachmentsService");
|
|
10803
10811
|
|
|
10804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10812
|
+
// 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/chat-documents.js
|
|
10805
10813
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
10806
10814
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
10807
10815
|
const store = await accountStore(deps);
|
|
@@ -10831,7 +10839,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
10831
10839
|
}, "list")
|
|
10832
10840
|
}), "chatDocumentsService");
|
|
10833
10841
|
|
|
10834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10842
|
+
// 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/retention.js
|
|
10835
10843
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
10836
10844
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
10837
10845
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -10918,7 +10926,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
10918
10926
|
}
|
|
10919
10927
|
}, "isRetentionSelection");
|
|
10920
10928
|
|
|
10921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10929
|
+
// 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/counters.js
|
|
10922
10930
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
10923
10931
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
10924
10932
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -11125,7 +11133,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
11125
11133
|
};
|
|
11126
11134
|
}, "countersService");
|
|
11127
11135
|
|
|
11128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11136
|
+
// 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/search-refresh.js
|
|
11129
11137
|
var SYNC_KEY = "messages.sync-first";
|
|
11130
11138
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
11131
11139
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -11257,7 +11265,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
11257
11265
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
11258
11266
|
}), "withRefresh");
|
|
11259
11267
|
|
|
11260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11268
|
+
// 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/embeddings-search.js
|
|
11261
11269
|
var CANDIDATES = 50;
|
|
11262
11270
|
var WORD_HITS = 200;
|
|
11263
11271
|
var RRF_K = 60;
|
|
@@ -11375,7 +11383,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11375
11383
|
}, deps.messenger);
|
|
11376
11384
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
11377
11385
|
const selected = prepared.selectedChat;
|
|
11378
|
-
const
|
|
11386
|
+
const scopeOf4 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
11379
11387
|
const words3 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
11380
11388
|
const meaning = [];
|
|
11381
11389
|
const sources = words3.sources;
|
|
@@ -11383,7 +11391,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11383
11391
|
await withEmbedder(deps, target, choice, {}, async (embedder) => {
|
|
11384
11392
|
const [vector] = await embedder.embed([query], "query");
|
|
11385
11393
|
for (const one2 of prepared.scopeAccounts) {
|
|
11386
|
-
const scope =
|
|
11394
|
+
const scope = scopeOf4(one2);
|
|
11387
11395
|
if (scope === null)
|
|
11388
11396
|
continue;
|
|
11389
11397
|
const hits = await store.vectors.nearestConversations(one2, {
|
|
@@ -11417,7 +11425,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
11417
11425
|
const scoped = [];
|
|
11418
11426
|
const elsewhere = [];
|
|
11419
11427
|
for (const one2 of prepared.scopeAccounts) {
|
|
11420
|
-
const scope =
|
|
11428
|
+
const scope = scopeOf4(one2);
|
|
11421
11429
|
if (scope === null)
|
|
11422
11430
|
continue;
|
|
11423
11431
|
const eligibleChats = eligibility?.chats.filter(({ account: account3 }) => account3.provider === one2.provider && account3.account === one2.account).map(({ chat: chat2 }) => chat2);
|
|
@@ -11523,22 +11531,22 @@ var searchReadiness = /* @__PURE__ */ __name((chats, meaning, outside) => {
|
|
|
11523
11531
|
};
|
|
11524
11532
|
}, "searchReadiness");
|
|
11525
11533
|
var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
11526
|
-
const
|
|
11534
|
+
const mean2 = new Float32Array(vectors[0]?.length ?? 0);
|
|
11527
11535
|
for (const vector of vectors) {
|
|
11528
|
-
for (let index = 0; index <
|
|
11529
|
-
|
|
11536
|
+
for (let index = 0; index < mean2.length; index++)
|
|
11537
|
+
mean2[index] = mean2[index] + vector[index];
|
|
11530
11538
|
}
|
|
11531
|
-
const length = Math.hypot(...
|
|
11532
|
-
return
|
|
11539
|
+
const length = Math.hypot(...mean2) || 1;
|
|
11540
|
+
return mean2.map((value) => value / length);
|
|
11533
11541
|
}, "meanOf");
|
|
11534
11542
|
|
|
11535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11543
|
+
// 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/embeddings.js
|
|
11536
11544
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
11537
11545
|
...embeddingsMaintenance(deps),
|
|
11538
11546
|
...embeddingsSearch(deps)
|
|
11539
11547
|
}), "embeddingsService");
|
|
11540
11548
|
|
|
11541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11549
|
+
// 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/folders.js
|
|
11542
11550
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
11543
11551
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
11544
11552
|
if (deps.offline)
|
|
@@ -11679,7 +11687,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
11679
11687
|
};
|
|
11680
11688
|
}, "foldersService");
|
|
11681
11689
|
|
|
11682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11690
|
+
// 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/inbox.js
|
|
11683
11691
|
var INBOX_CHATS = 20;
|
|
11684
11692
|
var REVIEW_DAYS = 3;
|
|
11685
11693
|
var UNANSWERED_HOURS = 24;
|
|
@@ -11887,7 +11895,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
11887
11895
|
};
|
|
11888
11896
|
}, "inboxService");
|
|
11889
11897
|
|
|
11890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11898
|
+
// 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/mentions.js
|
|
11891
11899
|
var REVIEW_COUNT = 500;
|
|
11892
11900
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
11893
11901
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -11966,7 +11974,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
11966
11974
|
};
|
|
11967
11975
|
}, "mentionsService");
|
|
11968
11976
|
|
|
11969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11977
|
+
// 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/domain/formatting.js
|
|
11970
11978
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
11971
11979
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
11972
11980
|
const { text: text2, spans } = formatted2;
|
|
@@ -12026,7 +12034,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
12026
12034
|
};
|
|
12027
12035
|
}, "visibleFormattedText");
|
|
12028
12036
|
|
|
12029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12037
|
+
// 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/domain/message-link.js
|
|
12030
12038
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
12031
12039
|
position,
|
|
12032
12040
|
kind,
|
|
@@ -12075,7 +12083,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
12075
12083
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
12076
12084
|
}, "validatePermalink");
|
|
12077
12085
|
|
|
12078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12086
|
+
// 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/domain/pin-duration.js
|
|
12079
12087
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
12080
12088
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
12081
12089
|
return `${seconds / 86400}d`;
|
|
@@ -12107,7 +12115,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
12107
12115
|
return seconds;
|
|
12108
12116
|
}, "pinDurationOf");
|
|
12109
12117
|
|
|
12110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12118
|
+
// 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/sends/send-as.js
|
|
12111
12119
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
12112
12120
|
if (sendAs === void 0) {
|
|
12113
12121
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -12132,7 +12140,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
12132
12140
|
return sendAs;
|
|
12133
12141
|
}, "typedSendAs");
|
|
12134
12142
|
|
|
12135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12143
|
+
// 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/search/total.js
|
|
12136
12144
|
var TOTAL_CAP = 1e4;
|
|
12137
12145
|
var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
12138
12146
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -12143,7 +12151,7 @@ var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
|
12143
12151
|
return { value: count2, relation: exact ? "eq" : "gte" };
|
|
12144
12152
|
}, "totalOf");
|
|
12145
12153
|
|
|
12146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12154
|
+
// 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/search/lucene/meaning-parts.js
|
|
12147
12155
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
12148
12156
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
12149
12157
|
let narrows = false;
|
|
@@ -12172,7 +12180,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
12172
12180
|
return wanted(root).join(" ").trim();
|
|
12173
12181
|
}, "meaningWords");
|
|
12174
12182
|
|
|
12175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12183
|
+
// 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/search/question-plan.js
|
|
12176
12184
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
12177
12185
|
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"));
|
|
12178
12186
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -12287,8 +12295,25 @@ function planQuestion(text2, strict = false) {
|
|
|
12287
12295
|
return { changed: true, natural: true, queries, scope, terms, rankingTerms: original, removed, aliases: changes };
|
|
12288
12296
|
}
|
|
12289
12297
|
__name(planQuestion, "planQuestion");
|
|
12298
|
+
var questionText = /* @__PURE__ */ __name((text2) => text2.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found), "questionText");
|
|
12299
|
+
var lookupTerms = /* @__PURE__ */ __name((plan) => [
|
|
12300
|
+
...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words2(alias.split(" -> ")[1] ?? ""))))
|
|
12301
|
+
], "lookupTerms");
|
|
12302
|
+
var anyOfTerms = /* @__PURE__ */ __name((terms, scope) => `(${terms.join(" OR ")})${scope ? ` ${scope}` : ""}`, "anyOfTerms");
|
|
12303
|
+
var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
12304
|
+
let plan;
|
|
12305
|
+
try {
|
|
12306
|
+
plan = planQuestion(questionText(text2));
|
|
12307
|
+
} catch (error) {
|
|
12308
|
+
if (error instanceof CliError)
|
|
12309
|
+
return void 0;
|
|
12310
|
+
throw error;
|
|
12311
|
+
}
|
|
12312
|
+
const terms = plan.changed ? lookupTerms(plan) : [];
|
|
12313
|
+
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
12314
|
+
}, "questionLookup");
|
|
12290
12315
|
|
|
12291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12316
|
+
// 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/messages-combined.js
|
|
12292
12317
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
12293
12318
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
12294
12319
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -12481,7 +12506,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
12481
12506
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
12482
12507
|
}, "signals");
|
|
12483
12508
|
|
|
12484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12509
|
+
// 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/messages-discovery.js
|
|
12485
12510
|
var MEANING_DEPTH = 100;
|
|
12486
12511
|
var RRF_K2 = 60;
|
|
12487
12512
|
var RERANK_DEPTH = 50;
|
|
@@ -12503,10 +12528,7 @@ var EVERY_MESSAGE = {
|
|
|
12503
12528
|
upper_inclusive: true
|
|
12504
12529
|
};
|
|
12505
12530
|
var scopeOf2 = /* @__PURE__ */ __name((root) => root === void 0 ? {} : { ast: { version: 1, language: "lucene-v1", root } }, "scopeOf");
|
|
12506
|
-
var discoveryRequest = /* @__PURE__ */ __name((asked) => asked.ast !== void 0 || asked.exact || !asked.text ? asked : {
|
|
12507
|
-
...asked,
|
|
12508
|
-
text: asked.text.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found)
|
|
12509
|
-
}, "discoveryRequest");
|
|
12531
|
+
var discoveryRequest = /* @__PURE__ */ __name((asked) => asked.ast !== void 0 || asked.exact || !asked.text ? asked : { ...asked, text: questionText(asked.text) }, "discoveryRequest");
|
|
12510
12532
|
var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, messenger = {}, meaning, rerank) => {
|
|
12511
12533
|
const request = discoveryRequest(asked);
|
|
12512
12534
|
const original = await prepareLucene(store, account2, request, messenger);
|
|
@@ -12520,7 +12542,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
12520
12542
|
const question = root === void 0 ? text2 : meaningWords(root);
|
|
12521
12543
|
if (!question)
|
|
12522
12544
|
return searchLucene(store, account2, request, messenger);
|
|
12523
|
-
const terms = root === void 0 ?
|
|
12545
|
+
const terms = root === void 0 ? lookupTerms(plan) : [...new Set(words2(question))];
|
|
12524
12546
|
if (!terms.length)
|
|
12525
12547
|
return searchLucene(store, account2, request, messenger);
|
|
12526
12548
|
if (terms.length > 64)
|
|
@@ -12557,7 +12579,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
12557
12579
|
truncated ||= found.hasMore || found.query.combined.truncated;
|
|
12558
12580
|
}
|
|
12559
12581
|
check();
|
|
12560
|
-
const relaxed = root === void 0 ?
|
|
12582
|
+
const relaxed = root === void 0 ? anyOfTerms(terms, plan.scope) : text2;
|
|
12561
12583
|
const partialRequest = { ...request, text: relaxed, ast: void 0, limit: 300, context: 0, thread: void 0 };
|
|
12562
12584
|
const partial = await searchLucene(store, account2, partialRequest, messenger);
|
|
12563
12585
|
add(partial.items);
|
|
@@ -12809,7 +12831,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
12809
12831
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
12810
12832
|
}, "mixedWithReranker");
|
|
12811
12833
|
|
|
12812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12834
|
+
// 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/thread-context.js
|
|
12813
12835
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
12814
12836
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
12815
12837
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -13008,7 +13030,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
13008
13030
|
return result;
|
|
13009
13031
|
}, "readThreadContext");
|
|
13010
13032
|
|
|
13011
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13033
|
+
// 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/messages-archive-search.js
|
|
13012
13034
|
var SEARCH_FILL_MS = 200;
|
|
13013
13035
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
13014
13036
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -13075,12 +13097,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
13075
13097
|
}, "accountOf");
|
|
13076
13098
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
13077
13099
|
|
|
13078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13100
|
+
// 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/pictures.js
|
|
13079
13101
|
import { createHash as createHash9 } from "node:crypto";
|
|
13080
13102
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
13081
13103
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
13082
13104
|
|
|
13083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13105
|
+
// 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/domain/models.js
|
|
13084
13106
|
var GROUP_SETTINGS = [
|
|
13085
13107
|
"allCanPin",
|
|
13086
13108
|
"onlyAdminsAdd",
|
|
@@ -13094,7 +13116,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
13094
13116
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
13095
13117
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
13096
13118
|
|
|
13097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13119
|
+
// 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/pictures.js
|
|
13098
13120
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
13099
13121
|
var PICTURE_FLOOR = 0.25;
|
|
13100
13122
|
var PAGE4 = 50;
|
|
@@ -13111,7 +13133,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
13111
13133
|
const directory = imageModelsDirectory(deps.env);
|
|
13112
13134
|
if (!isImageModelInstalled(model2, directory))
|
|
13113
13135
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
13114
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
13136
|
+
const { openPictureEmbedder } = await import("./embedder-D44JDTAA.js");
|
|
13115
13137
|
return openPictureEmbedder(model2, directory);
|
|
13116
13138
|
}, "open");
|
|
13117
13139
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -13308,7 +13330,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
13308
13330
|
}, "search")
|
|
13309
13331
|
}), "withPictures");
|
|
13310
13332
|
|
|
13311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13333
|
+
// 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/messages-meaning.js
|
|
13312
13334
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
13313
13335
|
const target = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
13314
13336
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -13319,9 +13341,16 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
13319
13341
|
const store = await deps.store();
|
|
13320
13342
|
const ready = [];
|
|
13321
13343
|
const without = [];
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13344
|
+
const mail = /* @__PURE__ */ new Map();
|
|
13345
|
+
const stored = await store.accounts.storedAccounts();
|
|
13346
|
+
for (const one2 of accounts) {
|
|
13347
|
+
const id2 = one2.provider === "email" ? stored.find(({ provider, account: account2 }) => provider === one2.provider && account2 === one2.account)?.id : void 0;
|
|
13348
|
+
if (id2 !== void 0)
|
|
13349
|
+
mail.set(one2, Number(id2));
|
|
13350
|
+
else
|
|
13351
|
+
(await store.vectors.hasMessageVectors(one2, target.key) ? ready : without).push(one2);
|
|
13352
|
+
}
|
|
13353
|
+
if (ready.length === 0 && mail.size === 0)
|
|
13325
13354
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
13326
13355
|
const words3 = plainWords(question);
|
|
13327
13356
|
try {
|
|
@@ -13339,12 +13368,24 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
13339
13368
|
for (const { chatId, messageId, score } of near2)
|
|
13340
13369
|
ranked.push({ ...one2, chatId, id: messageId, score });
|
|
13341
13370
|
}
|
|
13371
|
+
for (const [one2, accountId] of mail) {
|
|
13372
|
+
const near2 = await store.mail.nearest(target.key, query, {
|
|
13373
|
+
accountId,
|
|
13374
|
+
limit: MEANING_DEPTH
|
|
13375
|
+
});
|
|
13376
|
+
if (near2.length === 0)
|
|
13377
|
+
without.push(one2);
|
|
13378
|
+
for (const { threadExternalId, externalId, score } of near2)
|
|
13379
|
+
ranked.push({ ...one2, chatId: threadExternalId, id: externalId, score });
|
|
13380
|
+
}
|
|
13342
13381
|
}, "lookUp");
|
|
13343
13382
|
if (shared && !deps.embedders)
|
|
13344
13383
|
await lookUp(await shared.get(target.key, () => target.open()));
|
|
13345
13384
|
else
|
|
13346
13385
|
await withEmbedder(deps, target, DEFAULT_TEXT_MODEL, {}, lookUp);
|
|
13347
13386
|
}
|
|
13387
|
+
if (ranked.length === 0 && without.length === accounts.length)
|
|
13388
|
+
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
13348
13389
|
return {
|
|
13349
13390
|
model: target.id,
|
|
13350
13391
|
ranked: ranked.sort((a, b) => b.score - a.score).slice(0, MEANING_DEPTH),
|
|
@@ -13357,7 +13398,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
13357
13398
|
}
|
|
13358
13399
|
}, "meaningLane");
|
|
13359
13400
|
|
|
13360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13401
|
+
// 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/messages-rerank.js
|
|
13361
13402
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
13362
13403
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
13363
13404
|
if (choice === "off")
|
|
@@ -13369,9 +13410,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
13369
13410
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
13370
13411
|
try {
|
|
13371
13412
|
const warm = deps.embedders;
|
|
13372
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
13413
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-44JS2W7L.js")).openRerankerProcess(model, directory, {
|
|
13373
13414
|
threads: defaultThreads()
|
|
13374
|
-
})) : await (await import("./rerank-
|
|
13415
|
+
})) : await (await import("./rerank-TQQNS5FJ.js")).openReranker(model, directory);
|
|
13375
13416
|
return {
|
|
13376
13417
|
model: model.id,
|
|
13377
13418
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -13391,7 +13432,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
13391
13432
|
};
|
|
13392
13433
|
}, "rerankLane");
|
|
13393
13434
|
|
|
13394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13435
|
+
// 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/document-pictures.js
|
|
13395
13436
|
import { createHash as createHash10 } from "node:crypto";
|
|
13396
13437
|
var refOf = /* @__PURE__ */ __name((target) => target.ref ?? `document:${target.documentId}`, "refOf");
|
|
13397
13438
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -13399,7 +13440,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
13399
13440
|
const directory = imageModelsDirectory(env);
|
|
13400
13441
|
if (!isImageModelInstalled(model, directory))
|
|
13401
13442
|
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 });
|
|
13402
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
13443
|
+
const { openPictureEmbedder } = await import("./embedder-D44JDTAA.js");
|
|
13403
13444
|
return openPictureEmbedder(model, directory);
|
|
13404
13445
|
}, "openPictureEmbedderFor");
|
|
13405
13446
|
var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options = {}) => {
|
|
@@ -13420,7 +13461,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options =
|
|
|
13420
13461
|
}, "savePicture");
|
|
13421
13462
|
var removePicture = /* @__PURE__ */ __name((store, target) => store.notes.removePicture(refOf(target)), "removePicture");
|
|
13422
13463
|
|
|
13423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13464
|
+
// 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/document-source.js
|
|
13424
13465
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
13425
13466
|
const metadata = note.frontMatter;
|
|
13426
13467
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -13435,7 +13476,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
13435
13476
|
};
|
|
13436
13477
|
}, "documentSource");
|
|
13437
13478
|
|
|
13438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13479
|
+
// 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/notes-title-tier.js
|
|
13439
13480
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
13440
13481
|
let root;
|
|
13441
13482
|
try {
|
|
@@ -13462,7 +13503,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
13462
13503
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
13463
13504
|
}, "titleTiers");
|
|
13464
13505
|
|
|
13465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13506
|
+
// 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/notes-search.js
|
|
13466
13507
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
13467
13508
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
13468
13509
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -13704,19 +13745,21 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
13704
13745
|
const count2 = (/* @__PURE__ */ new Set([...words3.refs, ...others])).size + (words3.hasMore ? 1 : 0);
|
|
13705
13746
|
return totalOf(count2, shown, hasMore, othersComplete);
|
|
13706
13747
|
}, "notesTotal");
|
|
13707
|
-
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
13748
|
+
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 } = {}) => {
|
|
13708
13749
|
const typed = noteSourceOfQuery(query);
|
|
13709
13750
|
const source = given ?? typed.source;
|
|
13710
13751
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
13711
13752
|
const label = tag === void 0 ? void 0 : normalizeTag(tag);
|
|
13712
13753
|
const filter = [expression ? `(${expression})` : "", label === void 0 ? "" : `tag:${label}`].filter(Boolean).join(" AND ") || void 0;
|
|
13713
|
-
const
|
|
13754
|
+
const lookup2 = discover && !exact ? questionLookup(query) : void 0;
|
|
13755
|
+
const parsed = query.trim() ? parsedQuery(lookup2 === void 0 ? query : questionText(query), exact) : void 0;
|
|
13714
13756
|
const words3 = parsed === void 0 ? "" : meaningWords(parsed);
|
|
13715
13757
|
const narrowing = allOf([
|
|
13716
13758
|
...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
|
|
13717
13759
|
...filter === void 0 ? [] : [parsedQuery(filter)]
|
|
13718
13760
|
]);
|
|
13719
|
-
const
|
|
13761
|
+
const asked = lookup2 ?? query;
|
|
13762
|
+
const text2 = [asked.trim() ? `(${asked})` : "", filter ?? ""].filter(Boolean).join(" AND ");
|
|
13720
13763
|
const window2 = offset + limit;
|
|
13721
13764
|
const scope = {
|
|
13722
13765
|
...folderIds === void 0 ? {} : { folderIds },
|
|
@@ -13726,6 +13769,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13726
13769
|
};
|
|
13727
13770
|
let meaningSkipped;
|
|
13728
13771
|
let meaning;
|
|
13772
|
+
const cosines = /* @__PURE__ */ new Map();
|
|
13729
13773
|
let meaningRefs;
|
|
13730
13774
|
let meaningComplete = true;
|
|
13731
13775
|
if (exact)
|
|
@@ -13752,8 +13796,10 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13752
13796
|
nearest = ranked2.slice(0, depth);
|
|
13753
13797
|
}
|
|
13754
13798
|
const allowed = await matching(store, nearest.map(({ ref }) => ref), narrowing, scope);
|
|
13755
|
-
meaning = nearest.flatMap(({ ref }) => {
|
|
13799
|
+
meaning = nearest.flatMap(({ ref, score }) => {
|
|
13756
13800
|
const found = allowed.get(ref);
|
|
13801
|
+
if (found)
|
|
13802
|
+
cosines.set(ref, score);
|
|
13757
13803
|
return found ? [{ ref, ...found }] : [];
|
|
13758
13804
|
});
|
|
13759
13805
|
meaningRefs ??= new Set(meaning.map(({ ref }) => ref));
|
|
@@ -13784,9 +13830,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13784
13830
|
if (tierRefs.has(ref))
|
|
13785
13831
|
return;
|
|
13786
13832
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
13787
|
-
held.score += 1 / (RRF_K3 + rank + 1);
|
|
13788
13833
|
held.foundBy.push(by);
|
|
13789
13834
|
ranked.set(ref, held);
|
|
13835
|
+
if (by === "meaning" && lookup2 !== void 0 && held.foundBy.includes("words"))
|
|
13836
|
+
return;
|
|
13837
|
+
held.score += 1 / (RRF_K3 + rank + 1);
|
|
13790
13838
|
}), "add");
|
|
13791
13839
|
add(matched.items, "words");
|
|
13792
13840
|
if (meaning !== void 0)
|
|
@@ -13819,7 +13867,8 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
13819
13867
|
updated_at: at,
|
|
13820
13868
|
excerpt: firstLine(note.text, words3),
|
|
13821
13869
|
links,
|
|
13822
|
-
found_by: foundBy
|
|
13870
|
+
found_by: foundBy,
|
|
13871
|
+
...cosines.has(ref) ? { meaning_score: cosines.get(ref) } : {}
|
|
13823
13872
|
});
|
|
13824
13873
|
for (const link4 of new Map(links.map((link5) => [link5.to ?? `?${link5.target_text}`, link5])).values()) {
|
|
13825
13874
|
const key = link4.to ?? `?${link4.target_text}`;
|
|
@@ -13898,7 +13947,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
13898
13947
|
};
|
|
13899
13948
|
}, "searchNotesOf");
|
|
13900
13949
|
|
|
13901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13950
|
+
// 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/events-search.js
|
|
13902
13951
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
13903
13952
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
13904
13953
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -13932,17 +13981,18 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
|
|
|
13932
13981
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
13933
13982
|
}, "nearestEvents");
|
|
13934
13983
|
var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null ? `e${event.id}` : `s${event.eventSeriesId}`, "keyOf");
|
|
13935
|
-
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
13984
|
+
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
13936
13985
|
if (!query.trim())
|
|
13937
13986
|
throw new CliError("validation_error", "say what to find in the events");
|
|
13938
|
-
const
|
|
13987
|
+
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
13988
|
+
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
13939
13989
|
...exact ? { exact: true } : {},
|
|
13940
13990
|
...timezone === void 0 ? {} : { timezone }
|
|
13941
13991
|
});
|
|
13942
13992
|
const accountIds = accounts === void 0 ? void 0 : await accountIdsOf(store, accounts);
|
|
13943
13993
|
if (accountIds?.length === 0)
|
|
13944
13994
|
return { query, by: "words", hits: [], has_more: false };
|
|
13945
|
-
const words3 = plainQueryWords(query);
|
|
13995
|
+
const words3 = plainQueryWords(asked === void 0 ? query : questionText(query));
|
|
13946
13996
|
const window2 = offset + limit;
|
|
13947
13997
|
let meaningSkipped;
|
|
13948
13998
|
let meaning;
|
|
@@ -13998,19 +14048,23 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
13998
14048
|
}), "add");
|
|
13999
14049
|
add(found.items, "words");
|
|
14000
14050
|
add(meaning, "meaning");
|
|
14051
|
+
const cosines = new Map(meaning.map((hit) => [keyOf4(hit), hit.score]));
|
|
14001
14052
|
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score);
|
|
14002
14053
|
const hasMore = ordered.length > window2 || found.hasMore;
|
|
14003
14054
|
return {
|
|
14004
14055
|
query,
|
|
14005
14056
|
by,
|
|
14006
|
-
hits: ordered.slice(offset, window2).map(({ hit, by: halves }) =>
|
|
14057
|
+
hits: ordered.slice(offset, window2).map(({ hit, by: halves }) => {
|
|
14058
|
+
const cosine = cosines.get(keyOf4(hit));
|
|
14059
|
+
return { ...foundEvent(hit, query, halves), ...cosine === void 0 ? {} : { meaning_score: cosine } };
|
|
14060
|
+
}),
|
|
14007
14061
|
has_more: hasMore,
|
|
14008
14062
|
...hasMore && window2 <= MAX_EVENTS_OFFSET ? { next_offset: window2 } : {},
|
|
14009
14063
|
...truncated
|
|
14010
14064
|
};
|
|
14011
14065
|
}, "searchEvents");
|
|
14012
14066
|
|
|
14013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14067
|
+
// 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/search-all.js
|
|
14014
14068
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
14015
14069
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
14016
14070
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -14035,11 +14089,14 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14035
14089
|
let hasMore = false;
|
|
14036
14090
|
let notes;
|
|
14037
14091
|
let events;
|
|
14038
|
-
|
|
14092
|
+
const by = {};
|
|
14039
14093
|
let server;
|
|
14094
|
+
const discover = !request.exact && questionLookup(request.text) !== void 0;
|
|
14095
|
+
const cosines = /* @__PURE__ */ new Map();
|
|
14040
14096
|
let coverage2;
|
|
14041
14097
|
const messagesOf = /* @__PURE__ */ __name(async (kind) => {
|
|
14042
14098
|
const given = request.scope?.[kind];
|
|
14099
|
+
const discovers = discover && (kind === "mail" || request.backend !== "server");
|
|
14043
14100
|
const query = {
|
|
14044
14101
|
text: request.text,
|
|
14045
14102
|
kind,
|
|
@@ -14052,6 +14109,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14052
14109
|
} : {},
|
|
14053
14110
|
limit: window2,
|
|
14054
14111
|
...request.exact ? { exact: true } : {},
|
|
14112
|
+
...discovers ? { discover: true } : {},
|
|
14055
14113
|
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
14056
14114
|
...request.signal === void 0 ? {} : { signal: request.signal }
|
|
14057
14115
|
};
|
|
@@ -14084,7 +14142,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14084
14142
|
};
|
|
14085
14143
|
}, "itemOf");
|
|
14086
14144
|
const byWords = found.items.map((hit) => itemOf2(hit, ["words"]));
|
|
14087
|
-
if (
|
|
14145
|
+
if (!meaning || request.exact || kind === "messages" && request.backend === "server")
|
|
14088
14146
|
return byWords;
|
|
14089
14147
|
const filters = filtersBeside(request.text);
|
|
14090
14148
|
const lane = filters === void 0 ? {
|
|
@@ -14094,19 +14152,22 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14094
14152
|
}
|
|
14095
14153
|
} : await meaning(request.text, read, embedders);
|
|
14096
14154
|
if ("skipped" in lane) {
|
|
14097
|
-
|
|
14155
|
+
by[kind] = { by: "words", meaningSkipped: lane.skipped };
|
|
14098
14156
|
return byWords;
|
|
14099
14157
|
}
|
|
14100
|
-
|
|
14158
|
+
by[kind] = { by: "words and meaning", ...lane.partly ? { meaningSkipped: lane.partly } : {} };
|
|
14101
14159
|
const near2 = await nearEligible(store, account2, query, messenger, lane.ranked, filters ? { text: filters } : {});
|
|
14102
14160
|
const fused2 = /* @__PURE__ */ new Map();
|
|
14103
14161
|
byWords.forEach((item2, rank) => {
|
|
14104
14162
|
fused2.set(item2.ref, { item: item2, score: 1 / (RRF_K3 + rank + 1) });
|
|
14105
14163
|
});
|
|
14106
14164
|
near2.forEach((hit, rank) => {
|
|
14165
|
+
cosines.set(hit.locator, hit.cosine);
|
|
14107
14166
|
const held = fused2.get(hit.locator);
|
|
14108
14167
|
if (held)
|
|
14109
14168
|
held.item.foundBy = ["words", "meaning"];
|
|
14169
|
+
if (held && discovers)
|
|
14170
|
+
return;
|
|
14110
14171
|
fused2.set(hit.locator, {
|
|
14111
14172
|
item: held?.item ?? itemOf2(hit, ["meaning"]),
|
|
14112
14173
|
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
@@ -14126,6 +14187,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14126
14187
|
embedders,
|
|
14127
14188
|
...chosen === void 0 ? {} : notesScopeOf(chosen),
|
|
14128
14189
|
...request.exact ? { exact: true } : {},
|
|
14190
|
+
...discover ? { discover: true } : {},
|
|
14129
14191
|
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
14130
14192
|
...request.env === void 0 ? {} : { env: request.env }
|
|
14131
14193
|
});
|
|
@@ -14134,6 +14196,9 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14134
14196
|
by: found.by,
|
|
14135
14197
|
...found.meaning_skipped === void 0 ? {} : { meaningSkipped: found.meaning_skipped }
|
|
14136
14198
|
};
|
|
14199
|
+
for (const hit of found.hits)
|
|
14200
|
+
if (hit.meaning_score !== void 0)
|
|
14201
|
+
cosines.set(hit.ref, hit.meaning_score);
|
|
14137
14202
|
lists.push(found.hits.map((hit) => ({
|
|
14138
14203
|
kind: hit.kind ?? "note",
|
|
14139
14204
|
ref: hit.ref,
|
|
@@ -14162,6 +14227,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14162
14227
|
...command === void 0 ? {} : { command },
|
|
14163
14228
|
...request.env === void 0 ? {} : { env: request.env },
|
|
14164
14229
|
...request.exact ? { exact: true } : {},
|
|
14230
|
+
...discover ? { discover: true } : {},
|
|
14165
14231
|
...request.timezone === void 0 ? {} : { timezone: request.timezone },
|
|
14166
14232
|
...request.signal === void 0 ? {} : { signal: request.signal }
|
|
14167
14233
|
});
|
|
@@ -14170,6 +14236,9 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14170
14236
|
by: found.by,
|
|
14171
14237
|
...found.meaning_skipped === void 0 ? {} : { meaningSkipped: found.meaning_skipped }
|
|
14172
14238
|
};
|
|
14239
|
+
for (const hit of found.hits)
|
|
14240
|
+
if (hit.meaning_score !== void 0)
|
|
14241
|
+
cosines.set(hit.ref, hit.meaning_score);
|
|
14173
14242
|
lists.push(found.hits.map((hit) => ({
|
|
14174
14243
|
kind: "event",
|
|
14175
14244
|
ref: hit.ref,
|
|
@@ -14194,14 +14263,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14194
14263
|
} finally {
|
|
14195
14264
|
await embedders.close();
|
|
14196
14265
|
}
|
|
14197
|
-
const
|
|
14198
|
-
for (const list3 of lists)
|
|
14199
|
-
list3.forEach((item2, rank) => {
|
|
14200
|
-
const held = ranked.get(item2.ref) ?? { item: item2, score: 0 };
|
|
14201
|
-
held.score += 1 / (RRF_K3 + rank + 1);
|
|
14202
|
-
ranked.set(item2.ref, held);
|
|
14203
|
-
});
|
|
14204
|
-
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
14266
|
+
const ordered = oneList(lists, cosines);
|
|
14205
14267
|
const more = hasMore || ordered.length > window2;
|
|
14206
14268
|
return {
|
|
14207
14269
|
query: request.text,
|
|
@@ -14213,13 +14275,25 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
14213
14275
|
skipped,
|
|
14214
14276
|
...notes === void 0 ? {} : { notes },
|
|
14215
14277
|
...events === void 0 ? {} : { events },
|
|
14216
|
-
...
|
|
14278
|
+
...by.messages === void 0 ? {} : { messages: by.messages },
|
|
14279
|
+
...by.mail === void 0 ? {} : { mail: by.mail },
|
|
14217
14280
|
...server === void 0 ? {} : { server },
|
|
14218
14281
|
...coverage2 === void 0 ? {} : { coverage: coverage2 }
|
|
14219
14282
|
};
|
|
14220
14283
|
}, "searchAll");
|
|
14284
|
+
var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
14285
|
+
const place = /* @__PURE__ */ new Map();
|
|
14286
|
+
for (const list3 of lists)
|
|
14287
|
+
list3.forEach((item2, rank) => {
|
|
14288
|
+
const held = place.get(item2.ref);
|
|
14289
|
+
if (!held || rank < held.rank)
|
|
14290
|
+
place.set(item2.ref, { item: item2, rank });
|
|
14291
|
+
});
|
|
14292
|
+
const cosine = /* @__PURE__ */ __name((ref) => cosines.get(ref) ?? Number.NEGATIVE_INFINITY, "cosine");
|
|
14293
|
+
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
14294
|
+
}, "oneList");
|
|
14221
14295
|
|
|
14222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14296
|
+
// 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/search-all-meetings.js
|
|
14223
14297
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
14224
14298
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
14225
14299
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -14472,7 +14546,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
14472
14546
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
14473
14547
|
}, "searchAllOfSource");
|
|
14474
14548
|
|
|
14475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14549
|
+
// 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/server-search.js
|
|
14476
14550
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
14477
14551
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
14478
14552
|
var DEFAULT_BACKEND = "both";
|
|
@@ -14661,7 +14735,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
14661
14735
|
return { report, sources };
|
|
14662
14736
|
}, "searchServer");
|
|
14663
14737
|
|
|
14664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14738
|
+
// 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/messages.js
|
|
14665
14739
|
var DELETE_AT_ONCE = 10;
|
|
14666
14740
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
14667
14741
|
const files = fileLinks(attachments);
|
|
@@ -14677,18 +14751,18 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
14677
14751
|
return;
|
|
14678
14752
|
await ensureAccount({ text: target.text, account: target.account }, { account: account2.account, ...deps.profile === void 0 ? {} : { profile: deps.profile } });
|
|
14679
14753
|
}, "ownTarget");
|
|
14680
|
-
const serverThenStore = /* @__PURE__ */ __name(async (store, account2, query) => {
|
|
14754
|
+
const serverThenStore = /* @__PURE__ */ __name(async (store, account2, query, lanes = true) => {
|
|
14681
14755
|
const server = await searchServer(deps, query);
|
|
14682
14756
|
const only = query.backend === "server" && server ? [...server.sources.keys()].map((key) => {
|
|
14683
14757
|
const [chatId, id2] = JSON.parse(key);
|
|
14684
14758
|
return { ...account2, chatId, id: id2 };
|
|
14685
14759
|
}) : void 0;
|
|
14686
|
-
const found = await searchStore(store, account2, only ? { ...query, only } : query, deps.messenger, query.discover && query.kind !== "mail" ? meaningLane(deps) : void 0, query.discover && query.kind !== "mail" ? rerankLane(deps) : void 0);
|
|
14760
|
+
const found = await searchStore(store, account2, only ? { ...query, only } : query, deps.messenger, lanes && query.discover && query.kind !== "mail" ? meaningLane(deps) : void 0, lanes && query.discover && query.kind !== "mail" ? rerankLane(deps) : void 0);
|
|
14687
14761
|
return { found, server };
|
|
14688
14762
|
}, "serverThenStore");
|
|
14689
14763
|
const unifiedMessages = /* @__PURE__ */ __name((store, account2) => async (query) => {
|
|
14690
14764
|
await topUp(store);
|
|
14691
|
-
const { found, server } = await serverThenStore(store, account2, query);
|
|
14765
|
+
const { found, server } = await serverThenStore(store, account2, query, false);
|
|
14692
14766
|
return withServer(found, account2, server);
|
|
14693
14767
|
}, "unifiedMessages");
|
|
14694
14768
|
const remember = /* @__PURE__ */ __name(async (store, command, query) => {
|
|
@@ -15102,7 +15176,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
15102
15176
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first]} needs a --photo or --file`);
|
|
15103
15177
|
}, "checkMediaOptions");
|
|
15104
15178
|
|
|
15105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15179
|
+
// 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/domain/channel-tags.js
|
|
15106
15180
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
15107
15181
|
var RULES = {
|
|
15108
15182
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -15117,7 +15191,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
15117
15191
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
15118
15192
|
}), "classifyChannel");
|
|
15119
15193
|
|
|
15120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15194
|
+
// 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/metadata.js
|
|
15121
15195
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
15122
15196
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
15123
15197
|
const store = await deps.store();
|
|
@@ -15203,7 +15277,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
15203
15277
|
};
|
|
15204
15278
|
}, "metadataService");
|
|
15205
15279
|
|
|
15206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15280
|
+
// 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/moderation/check.js
|
|
15207
15281
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
15208
15282
|
var LINK2 = /https?:\/\/\S+/i;
|
|
15209
15283
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -15391,7 +15465,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
15391
15465
|
}, "nextPoint");
|
|
15392
15466
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
15393
15467
|
|
|
15394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15468
|
+
// 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/moderation/rules.js
|
|
15395
15469
|
import { existsSync, readFileSync } from "node:fs";
|
|
15396
15470
|
import { join as join10 } from "node:path";
|
|
15397
15471
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -15534,7 +15608,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
15534
15608
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
15535
15609
|
}, "assign");
|
|
15536
15610
|
|
|
15537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15611
|
+
// 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/moderation/run.js
|
|
15538
15612
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
15539
15613
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
15540
15614
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -15571,7 +15645,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
15571
15645
|
return { chatId, rows, notes };
|
|
15572
15646
|
}, "moderateWith");
|
|
15573
15647
|
|
|
15574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15648
|
+
// 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/moderation.js
|
|
15575
15649
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
15576
15650
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
15577
15651
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -15649,7 +15723,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
15649
15723
|
}, "removePerson")
|
|
15650
15724
|
}), "moderatorOf");
|
|
15651
15725
|
|
|
15652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15726
|
+
// 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/person-context.js
|
|
15653
15727
|
var CONTEXT_MESSAGES2 = 10;
|
|
15654
15728
|
var CONTEXT_BYTES = 64 * 1024;
|
|
15655
15729
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -15910,10 +15984,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
15910
15984
|
};
|
|
15911
15985
|
}, "personMessages");
|
|
15912
15986
|
|
|
15913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15987
|
+
// 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/meeting-evidence.js
|
|
15914
15988
|
import { createHash as createHash11 } from "node:crypto";
|
|
15915
15989
|
|
|
15916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15990
|
+
// 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/meeting-reference.js
|
|
15917
15991
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
15918
15992
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
15919
15993
|
const parsed = parseMeetingReference(reference);
|
|
@@ -15961,7 +16035,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
15961
16035
|
};
|
|
15962
16036
|
}, "resolveMeetingReference");
|
|
15963
16037
|
|
|
15964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16038
|
+
// 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/meeting-evidence.js
|
|
15965
16039
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
15966
16040
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
15967
16041
|
if (signal?.aborted)
|
|
@@ -16160,7 +16234,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
16160
16234
|
return { ...packet, fingerprint: hash(packet) };
|
|
16161
16235
|
}, "readMeetingEvidence");
|
|
16162
16236
|
|
|
16163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16237
|
+
// 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/person-meeting-context.js
|
|
16164
16238
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
16165
16239
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
16166
16240
|
const requestedAccounts = options.accountIds;
|
|
@@ -16259,7 +16333,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
16259
16333
|
};
|
|
16260
16334
|
}, "personMeetingContext");
|
|
16261
16335
|
|
|
16262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16336
|
+
// 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/person-preparation.js
|
|
16263
16337
|
var PREPARE_BYTES = 96 * 1024;
|
|
16264
16338
|
var MEETINGS = 5;
|
|
16265
16339
|
var CUES = 3;
|
|
@@ -16376,7 +16450,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
16376
16450
|
}
|
|
16377
16451
|
}, "meetingsOf");
|
|
16378
16452
|
|
|
16379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16453
|
+
// 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/person-profile.js
|
|
16380
16454
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
16381
16455
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
16382
16456
|
const held = await storeIfOpen(deps);
|
|
@@ -16446,7 +16520,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
16446
16520
|
complete: false
|
|
16447
16521
|
})), "quiet");
|
|
16448
16522
|
|
|
16449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16523
|
+
// 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/person-timeline.js
|
|
16450
16524
|
var TIMELINE_ITEMS = 50;
|
|
16451
16525
|
var TIMELINE_MAX = 500;
|
|
16452
16526
|
var SCOPES = ["personal", "work"];
|
|
@@ -16501,7 +16575,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
16501
16575
|
};
|
|
16502
16576
|
}, "personTimeline");
|
|
16503
16577
|
|
|
16504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16578
|
+
// 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/people.js
|
|
16505
16579
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
16506
16580
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
16507
16581
|
const held = await storeIfOpen(deps);
|
|
@@ -16728,7 +16802,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
16728
16802
|
return rest;
|
|
16729
16803
|
}, "withoutPhone");
|
|
16730
16804
|
|
|
16731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16805
|
+
// 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/private-people.js
|
|
16732
16806
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
16733
16807
|
id: note.id,
|
|
16734
16808
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -16772,7 +16846,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
16772
16846
|
};
|
|
16773
16847
|
}, "privatePeopleService");
|
|
16774
16848
|
|
|
16775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16849
|
+
// 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/rankings.js
|
|
16776
16850
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
16777
16851
|
total: 0,
|
|
16778
16852
|
population: 0,
|
|
@@ -17028,7 +17102,134 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
17028
17102
|
}, "evidence")
|
|
17029
17103
|
}), "rankingsService");
|
|
17030
17104
|
|
|
17031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17105
|
+
// 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/reply-stats.js
|
|
17106
|
+
var FIELDS = ["date", "chat", "kind"];
|
|
17107
|
+
var WAITING_TAIL = 100;
|
|
17108
|
+
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
17109
|
+
if (text2 === void 0)
|
|
17110
|
+
return;
|
|
17111
|
+
const refuse2 = /* @__PURE__ */ __name(() => {
|
|
17112
|
+
throw new CliError("validation_error", `${command} reads date:, chat: and kind: terms, AND-ed \u2014 not words, other fields, OR or NOT`, { reason: "query.unsupported-field" });
|
|
17113
|
+
}, "refuse");
|
|
17114
|
+
const visit = /* @__PURE__ */ __name((node) => {
|
|
17115
|
+
if (node.kind === "boolean")
|
|
17116
|
+
for (const clause of node.clauses) {
|
|
17117
|
+
if (clause.occur !== "must")
|
|
17118
|
+
refuse2();
|
|
17119
|
+
visit(clause.node);
|
|
17120
|
+
}
|
|
17121
|
+
else if (!FIELDS.includes(node.field) || !["term", "phrase", "range"].includes(node.operator))
|
|
17122
|
+
refuse2();
|
|
17123
|
+
}, "visit");
|
|
17124
|
+
visit(parseLucene(text2, { ...MESSAGE_PARSING, defaultField: "text" }).root);
|
|
17125
|
+
}, "plainOnly");
|
|
17126
|
+
var scopeOf3 = /* @__PURE__ */ __name((root, accounts) => {
|
|
17127
|
+
const scope = { accounts, chats: [], kinds: [] };
|
|
17128
|
+
const visit = /* @__PURE__ */ __name((node) => {
|
|
17129
|
+
if (node.kind === "boolean") {
|
|
17130
|
+
for (const clause of node.clauses)
|
|
17131
|
+
visit(clause.node);
|
|
17132
|
+
return;
|
|
17133
|
+
}
|
|
17134
|
+
const { chat, date } = node.resolution ?? {};
|
|
17135
|
+
if (chat)
|
|
17136
|
+
scope.chats.push(chat);
|
|
17137
|
+
else if (node.field === "kind")
|
|
17138
|
+
scope.kinds.push(node.value.toLowerCase());
|
|
17139
|
+
else if (date) {
|
|
17140
|
+
if (date.lower !== void 0) {
|
|
17141
|
+
const lower = date.lower + (date.lower_inclusive ? 0 : 1);
|
|
17142
|
+
scope.since = Math.max(scope.since ?? lower, lower);
|
|
17143
|
+
}
|
|
17144
|
+
if (date.upper !== void 0) {
|
|
17145
|
+
const upper = date.upper - (date.upper_inclusive ? 0 : 1);
|
|
17146
|
+
scope.until = Math.min(scope.until ?? upper, upper);
|
|
17147
|
+
}
|
|
17148
|
+
}
|
|
17149
|
+
}, "visit");
|
|
17150
|
+
visit(root);
|
|
17151
|
+
return scope;
|
|
17152
|
+
}, "scopeOf");
|
|
17153
|
+
var figuresOf = /* @__PURE__ */ __name((delays) => {
|
|
17154
|
+
const { medianMilliseconds, p90Milliseconds } = delayStats(delays);
|
|
17155
|
+
return {
|
|
17156
|
+
replies: delays.length,
|
|
17157
|
+
medianMs: medianMilliseconds,
|
|
17158
|
+
p90Ms: p90Milliseconds,
|
|
17159
|
+
meanMs: delays.length ? Math.round(delays.reduce((sum2, one2) => sum2 + one2, 0) / delays.length) : null
|
|
17160
|
+
};
|
|
17161
|
+
}, "figuresOf");
|
|
17162
|
+
var MINUTE2 = 6e4;
|
|
17163
|
+
var waitsOnOwner = /* @__PURE__ */ __name((newest) => {
|
|
17164
|
+
if (newest.mine)
|
|
17165
|
+
return false;
|
|
17166
|
+
if (newest.kind === "private")
|
|
17167
|
+
return !newest.quiet && rankingQuestion(newest.text);
|
|
17168
|
+
return newest.addressed || newest.ownerUsername !== null && new RegExp(`(^|[^\\w@])@${newest.ownerUsername.replace(/[^\w]/g, "\\$&")}(?!\\w)`, "i").test(newest.text);
|
|
17169
|
+
}, "waitsOnOwner");
|
|
17170
|
+
var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
17171
|
+
const prepared = /* @__PURE__ */ __name(async (query, command) => {
|
|
17172
|
+
plainOnly(query.text, command);
|
|
17173
|
+
const store = await deps.store();
|
|
17174
|
+
const found = await prepareLucene(store, await deps.account(), {
|
|
17175
|
+
...query.text === void 0 ? {} : { text: query.text },
|
|
17176
|
+
...query.source === void 0 ? {} : { source: query.source },
|
|
17177
|
+
timezone: timezoneOf(query.timezone),
|
|
17178
|
+
limit: 1
|
|
17179
|
+
}, deps.messenger);
|
|
17180
|
+
return { store, timezone: found.timezone, scope: scopeOf3(found.execution.root, found.scopeAccounts) };
|
|
17181
|
+
}, "prepared");
|
|
17182
|
+
return {
|
|
17183
|
+
responses: /* @__PURE__ */ __name(async ({ who: who2, by, ...query }) => {
|
|
17184
|
+
const { store, timezone, scope } = await prepared(query, "stats messages responses");
|
|
17185
|
+
const delays = scope.accounts.length ? await store.queries.replyDelays(scope, who2) : [];
|
|
17186
|
+
const buckets = { under5m: 0, under1h: 0, under1d: 0, over1d: 0 };
|
|
17187
|
+
for (const { delayMs } of delays) {
|
|
17188
|
+
if (delayMs < 5 * MINUTE2)
|
|
17189
|
+
buckets.under5m++;
|
|
17190
|
+
else if (delayMs < 60 * MINUTE2)
|
|
17191
|
+
buckets.under1h++;
|
|
17192
|
+
else if (delayMs < 24 * 60 * MINUTE2)
|
|
17193
|
+
buckets.under1d++;
|
|
17194
|
+
else
|
|
17195
|
+
buckets.over1d++;
|
|
17196
|
+
}
|
|
17197
|
+
const days = /* @__PURE__ */ new Map();
|
|
17198
|
+
if (by === "day") {
|
|
17199
|
+
const keyOf5 = calendarKey(timezone, "day");
|
|
17200
|
+
for (const { repliedAt, delayMs } of delays) {
|
|
17201
|
+
const key = keyOf5(repliedAt);
|
|
17202
|
+
const list3 = days.get(key) ?? [];
|
|
17203
|
+
list3.push(delayMs);
|
|
17204
|
+
days.set(key, list3);
|
|
17205
|
+
}
|
|
17206
|
+
}
|
|
17207
|
+
return {
|
|
17208
|
+
who: who2,
|
|
17209
|
+
by,
|
|
17210
|
+
...figuresOf(delays.map(({ delayMs }) => delayMs)),
|
|
17211
|
+
buckets,
|
|
17212
|
+
rows: [...days].sort(([a], [b]) => a.localeCompare(b)).map(([key, list3]) => ({ key, ...figuresOf(list3) }))
|
|
17213
|
+
};
|
|
17214
|
+
}, "responses"),
|
|
17215
|
+
waiting: /* @__PURE__ */ __name(async (query) => {
|
|
17216
|
+
const { store, scope } = await prepared(query, "stats messages waiting");
|
|
17217
|
+
const chats = scope.accounts.length ? await store.queries.waitingChats(scope, waitsOnOwner, WAITING_TAIL) : [];
|
|
17218
|
+
const firsts = chats.flatMap(({ unanswered: unanswered2 }) => unanswered2.at(-1) ?? []);
|
|
17219
|
+
return {
|
|
17220
|
+
chats: chats.length,
|
|
17221
|
+
messages: chats.reduce((sum2, { unanswered: unanswered2 }) => sum2 + unanswered2.length, 0),
|
|
17222
|
+
oldestAt: firsts.length ? new Date(firsts.reduce((low, one2) => Math.min(low, one2))).toISOString() : null,
|
|
17223
|
+
byKind: {
|
|
17224
|
+
private: chats.filter(({ kind }) => kind === "private").length,
|
|
17225
|
+
group: chats.filter(({ kind }) => kind === "group").length
|
|
17226
|
+
}
|
|
17227
|
+
};
|
|
17228
|
+
}, "waiting")
|
|
17229
|
+
};
|
|
17230
|
+
}, "replyStatsService");
|
|
17231
|
+
|
|
17232
|
+
// 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/searches.js
|
|
17032
17233
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
17033
17234
|
id: one2.id,
|
|
17034
17235
|
name: one2.name,
|
|
@@ -17157,7 +17358,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
17157
17358
|
};
|
|
17158
17359
|
}, "searchesService");
|
|
17159
17360
|
|
|
17160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17361
|
+
// 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/tags.js
|
|
17161
17362
|
var TAGGING_QUERY = {
|
|
17162
17363
|
entity: "tagging",
|
|
17163
17364
|
backend: "sql",
|
|
@@ -17241,7 +17442,110 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
17241
17442
|
};
|
|
17242
17443
|
}, "tagsService");
|
|
17243
17444
|
|
|
17244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17445
|
+
// 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/task-stats.js
|
|
17446
|
+
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
17447
|
+
var PERIOD_FIELD = "created";
|
|
17448
|
+
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
17449
|
+
if (node.kind === "predicate")
|
|
17450
|
+
return;
|
|
17451
|
+
const optional2 = node.clauses.some(({ occur }) => occur === "should");
|
|
17452
|
+
for (const { occur, node: inner } of node.clauses) {
|
|
17453
|
+
if (!walkQuery(inner).some(({ field }) => field === PERIOD_FIELD))
|
|
17454
|
+
continue;
|
|
17455
|
+
if (!top || optional2 || occur !== "must")
|
|
17456
|
+
throw new CliError("validation_error", `${PERIOD_FIELD}: sets the period of stats tasks show: give it as a required term, not inside OR or NOT`);
|
|
17457
|
+
refuseNestedPeriod(inner, top);
|
|
17458
|
+
}
|
|
17459
|
+
}, "refuseNestedPeriod");
|
|
17460
|
+
var renamed = /* @__PURE__ */ __name((node, from, to) => node.kind === "predicate" ? node.field === from ? { ...node, field: to } : node : { ...node, clauses: node.clauses.map((clause) => ({ ...clause, node: renamed(clause.node, from, to) })) }, "renamed");
|
|
17461
|
+
var median2 = /* @__PURE__ */ __name((values) => {
|
|
17462
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
17463
|
+
const middle = Math.floor(sorted.length / 2);
|
|
17464
|
+
const upper = sorted[middle] ?? 0;
|
|
17465
|
+
return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
|
|
17466
|
+
}, "median");
|
|
17467
|
+
var mean = /* @__PURE__ */ __name((values) => Math.round(values.reduce((sum2, one2) => sum2 + one2, 0) / values.length), "mean");
|
|
17468
|
+
var spread = /* @__PURE__ */ __name((open7, closeMs, now) => ({
|
|
17469
|
+
...closeMs.length > 0 ? { medianCloseMs: median2(closeMs) } : {},
|
|
17470
|
+
...open7.length > 0 ? { meanOpenAgeMs: mean(open7.map(({ createdAt }) => now - createdAt)) } : {}
|
|
17471
|
+
}), "spread");
|
|
17472
|
+
var and = /* @__PURE__ */ __name((parts) => parts.length === 0 ? void 0 : { sql: parts.map(({ sql }) => `(${sql})`).join(" AND "), params: parts.flatMap(({ params }) => params) }, "and");
|
|
17473
|
+
var taskStatsOf = /* @__PURE__ */ __name(async (store, account2, { by = "chat", query, timezone, group, kind }, columns, now = Date.now()) => {
|
|
17474
|
+
if (query)
|
|
17475
|
+
refuseNestedPeriod(query.root);
|
|
17476
|
+
const time = /* @__PURE__ */ __name((sql) => ({ type: "time", sql }), "time");
|
|
17477
|
+
const read = { ...columns, [PERIOD_FIELD]: time("t.created_at"), closed: time("t.closed_at") };
|
|
17478
|
+
const fixed = [
|
|
17479
|
+
...group === void 0 ? [] : [{ sql: "t.source_group = ?", params: [group] }],
|
|
17480
|
+
...kind === void 0 ? [] : [{ sql: "t.type = ?", params: [kind] }],
|
|
17481
|
+
...by === "meeting" ? [{ sql: "t.source_kind = 'meeting'", params: [] }] : []
|
|
17482
|
+
];
|
|
17483
|
+
const options = { command: "stats tasks show", now, ...timezone === void 0 ? {} : { zone: timezone } };
|
|
17484
|
+
const where = /* @__PURE__ */ __name((ast, more = []) => and([...fixed, ...more, ...ast ? [queryFilter(ast, read, options)] : []]), "where");
|
|
17485
|
+
const scope = by === "project" ? { board: true } : { account: taskAccount(account2) };
|
|
17486
|
+
const all = await store.tasks.statRows(scope, where(withoutField(query, PERIOD_FIELD)));
|
|
17487
|
+
const created = await store.tasks.statRows(scope, where(query));
|
|
17488
|
+
const closed = await store.tasks.statRows(scope, where(query && { ...query, root: renamed(query.root, PERIOD_FIELD, "closed") }, [
|
|
17489
|
+
{ sql: "t.closed_at IS NOT NULL", params: [] }
|
|
17490
|
+
]));
|
|
17491
|
+
const keyOf5 = /* @__PURE__ */ __name((row) => by === "project" ? String(row.projectId) : row.group ?? "", "keyOf");
|
|
17492
|
+
const groups = /* @__PURE__ */ new Map();
|
|
17493
|
+
const slot = /* @__PURE__ */ __name((row) => {
|
|
17494
|
+
const key = keyOf5(row);
|
|
17495
|
+
const found = groups.get(key) ?? { open: [], created: 0, closeMs: [] };
|
|
17496
|
+
groups.set(key, found);
|
|
17497
|
+
return found;
|
|
17498
|
+
}, "slot");
|
|
17499
|
+
for (const row of all)
|
|
17500
|
+
if (!isClosedState(row.state))
|
|
17501
|
+
slot(row).open.push(row);
|
|
17502
|
+
for (const row of created)
|
|
17503
|
+
slot(row).created++;
|
|
17504
|
+
for (const row of closed)
|
|
17505
|
+
slot(row).closeMs.push((row.closedAt ?? row.createdAt) - row.createdAt);
|
|
17506
|
+
const kept2 = [...groups].filter(([, one2]) => one2.open.length + one2.created + one2.closeMs.length > 0);
|
|
17507
|
+
const ids = kept2.map(([key]) => key);
|
|
17508
|
+
const names2 = by === "chat" ? await store.tasks.statNames("chat", ids, taskAccount(account2)) : by === "project" ? await store.tasks.statNames("project", ids) : await meetingNames(store, ids);
|
|
17509
|
+
const rows = kept2.map(([key, one2]) => ({
|
|
17510
|
+
group: key,
|
|
17511
|
+
name: names2.get(key) ?? null,
|
|
17512
|
+
open: one2.open.length,
|
|
17513
|
+
created: one2.created,
|
|
17514
|
+
closed: one2.closeMs.length,
|
|
17515
|
+
...one2.open[0] ? { oldestOpenAt: new Date(one2.open[0].createdAt) } : {},
|
|
17516
|
+
...spread(one2.open, one2.closeMs, now)
|
|
17517
|
+
}));
|
|
17518
|
+
const open7 = kept2.flatMap(([, one2]) => one2.open);
|
|
17519
|
+
const closeMs = kept2.flatMap(([, one2]) => one2.closeMs);
|
|
17520
|
+
return {
|
|
17521
|
+
by,
|
|
17522
|
+
open: open7.length,
|
|
17523
|
+
created: created.length,
|
|
17524
|
+
closed: closeMs.length,
|
|
17525
|
+
...spread(open7, closeMs, now),
|
|
17526
|
+
rows
|
|
17527
|
+
};
|
|
17528
|
+
}, "taskStatsOf");
|
|
17529
|
+
var meetingIdOf = /* @__PURE__ */ __name((group) => {
|
|
17530
|
+
try {
|
|
17531
|
+
return String(parseMeetingReference(group).meetingId);
|
|
17532
|
+
} catch {
|
|
17533
|
+
return void 0;
|
|
17534
|
+
}
|
|
17535
|
+
}, "meetingIdOf");
|
|
17536
|
+
var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
17537
|
+
const meetingOf = new Map(groups.flatMap((group) => {
|
|
17538
|
+
const id2 = meetingIdOf(group);
|
|
17539
|
+
return id2 === void 0 ? [] : [[group, id2]];
|
|
17540
|
+
}));
|
|
17541
|
+
const titles = await store.tasks.statNames("meeting", [...new Set(meetingOf.values())]);
|
|
17542
|
+
return new Map([...meetingOf].flatMap(([group, id2]) => {
|
|
17543
|
+
const title = titles.get(id2);
|
|
17544
|
+
return title === void 0 ? [] : [[group, title]];
|
|
17545
|
+
}));
|
|
17546
|
+
}, "meetingNames");
|
|
17547
|
+
|
|
17548
|
+
// 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/tasks.js
|
|
17245
17549
|
var TASK_QUERY = {
|
|
17246
17550
|
entity: "task",
|
|
17247
17551
|
backend: "sql",
|
|
@@ -17272,6 +17576,20 @@ var TASK_QUERY = {
|
|
|
17272
17576
|
}
|
|
17273
17577
|
})
|
|
17274
17578
|
};
|
|
17579
|
+
var TASK_STATS_QUERY = {
|
|
17580
|
+
entity: "task",
|
|
17581
|
+
backend: "sql",
|
|
17582
|
+
fields: [
|
|
17583
|
+
...TASK_QUERY.fields.filter(({ name }) => name !== "created_at" && name !== "closed_at"),
|
|
17584
|
+
{
|
|
17585
|
+
name: PERIOD_FIELD,
|
|
17586
|
+
type: "time",
|
|
17587
|
+
operators: OPERATORS_BY_TYPE.time,
|
|
17588
|
+
example: `${PERIOD_FIELD}>=30d`,
|
|
17589
|
+
relation: "the period: created counts the tasks opened in it, closed the tasks done or dismissed in it; open is open now"
|
|
17590
|
+
}
|
|
17591
|
+
]
|
|
17592
|
+
};
|
|
17275
17593
|
var PAIR_DECISIONS = ["review", "unsure"];
|
|
17276
17594
|
var TASK_PAIR_QUERY = {
|
|
17277
17595
|
entity: "task_pair",
|
|
@@ -17358,6 +17676,13 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
17358
17676
|
const inStore = /* @__PURE__ */ __name(async (work) => work(await deps.store(), await deps.account()), "inStore");
|
|
17359
17677
|
const service = /* @__PURE__ */ __name((store) => createTaskService({ store: store.tasks }), "service");
|
|
17360
17678
|
const groupOf = /* @__PURE__ */ __name(async (store, account2, chat) => chat === void 0 ? void 0 : storedChatId(deps.messenger, chat, store, account2, { includeLeft: true }), "groupOf");
|
|
17679
|
+
const queryColumns = /* @__PURE__ */ __name(async (store, account2, query) => {
|
|
17680
|
+
const groups = /* @__PURE__ */ new Map();
|
|
17681
|
+
for (const node of query ? walkQuery(query.root) : [])
|
|
17682
|
+
if (node.field === "chat" && node.operator !== "wildcard" && !groups.has(node.value))
|
|
17683
|
+
groups.set(node.value, await storedChatId(deps.messenger, node.value, store, account2, { includeLeft: true }));
|
|
17684
|
+
return taskColumns2(groups, await taskTagFilters(store, query));
|
|
17685
|
+
}, "queryColumns");
|
|
17361
17686
|
const refuseBare = /* @__PURE__ */ __name((target) => {
|
|
17362
17687
|
throw new CliError("validation_error", `no task ${singleLine(target)} \u2014 write task:${singleLine(target)} for a task`);
|
|
17363
17688
|
}, "refuseBare");
|
|
@@ -17412,12 +17737,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
17412
17737
|
const reviewAfterLink = /* @__PURE__ */ __name(async (store, id2) => !isClosedState((await store.tasks.get(id2))?.state ?? "done") ? store.tasks.reviewDuplicates(id2, { linked: true }) : 0, "reviewAfterLink");
|
|
17413
17738
|
return {
|
|
17414
17739
|
list: /* @__PURE__ */ __name(({ query, limit, offset, previews }) => inStore(async (store, account2) => {
|
|
17415
|
-
const
|
|
17416
|
-
for (const node of query ? walkQuery(query.root) : [])
|
|
17417
|
-
if (node.field === "chat" && node.operator !== "wildcard" && !groups.has(node.value))
|
|
17418
|
-
groups.set(node.value, await storedChatId(deps.messenger, node.value, store, account2, { includeLeft: true }));
|
|
17419
|
-
const tags = await taskTagFilters(store, query);
|
|
17420
|
-
const where = query ? queryFilter(query, taskColumns2(groups, tags), { command: "tasks list" }) : void 0;
|
|
17740
|
+
const where = query ? queryFilter(query, await queryColumns(store, account2, query), { command: "tasks list" }) : void 0;
|
|
17421
17741
|
const rows = await store.tasks.query(taskAccount(account2), where, { limit: limit + 1, offset });
|
|
17422
17742
|
const shown = rows.slice(0, limit);
|
|
17423
17743
|
return {
|
|
@@ -17664,13 +17984,9 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
17664
17984
|
await owned(store, account2, subject);
|
|
17665
17985
|
return store.tasks.similar({ task: subject }, options);
|
|
17666
17986
|
}), "similar"),
|
|
17667
|
-
stats: /* @__PURE__ */ __name((
|
|
17668
|
-
const group = await groupOf(store, account2,
|
|
17669
|
-
|
|
17670
|
-
account: taskAccount(account2),
|
|
17671
|
-
...filter.type === void 0 ? {} : { kind: filter.type }
|
|
17672
|
-
});
|
|
17673
|
-
return group === void 0 ? rows : rows.filter((one2) => one2.group === group);
|
|
17987
|
+
stats: /* @__PURE__ */ __name(({ chat, ...request } = {}) => inStore(async (store, account2) => {
|
|
17988
|
+
const group = await groupOf(store, account2, chat);
|
|
17989
|
+
return taskStatsOf(store, account2, { ...request, ...group === void 0 ? {} : { group } }, await queryColumns(store, account2, request.query));
|
|
17674
17990
|
}), "stats")
|
|
17675
17991
|
};
|
|
17676
17992
|
}, "tasksService");
|
|
@@ -17721,7 +18037,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
17721
18037
|
};
|
|
17722
18038
|
}, "taskView");
|
|
17723
18039
|
|
|
17724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18040
|
+
// 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/topics.js
|
|
17725
18041
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
17726
18042
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
17727
18043
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -17920,7 +18236,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
17920
18236
|
};
|
|
17921
18237
|
}, "topicsService");
|
|
17922
18238
|
|
|
17923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18239
|
+
// 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/evidence.js
|
|
17924
18240
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
17925
18241
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
17926
18242
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -17994,7 +18310,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
17994
18310
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
17995
18311
|
}, "prepareEvidencePacket");
|
|
17996
18312
|
|
|
17997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18313
|
+
// 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/evidence-read.js
|
|
17998
18314
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
17999
18315
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
18000
18316
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -18014,7 +18330,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
18014
18330
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
18015
18331
|
}, "readEvidencePacket");
|
|
18016
18332
|
|
|
18017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18333
|
+
// 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/meeting-hit-search.js
|
|
18018
18334
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
18019
18335
|
let before2 = Number.POSITIVE_INFINITY;
|
|
18020
18336
|
for (; ; ) {
|
|
@@ -18076,7 +18392,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
18076
18392
|
return { ...result, selection };
|
|
18077
18393
|
}, "searchMeetingHits");
|
|
18078
18394
|
|
|
18079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18395
|
+
// 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/meeting-links.js
|
|
18080
18396
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
18081
18397
|
const { maxMessages, url, ...selecting } = request;
|
|
18082
18398
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18115,10 +18431,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18115
18431
|
};
|
|
18116
18432
|
}, "readMeetingLinks");
|
|
18117
18433
|
|
|
18118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18434
|
+
// 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/meeting-project-candidates.js
|
|
18119
18435
|
import { createHash as createHash13 } from "node:crypto";
|
|
18120
18436
|
|
|
18121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18437
|
+
// 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/meeting-project-candidate-validation.js
|
|
18122
18438
|
function invalid5(field, response = false) {
|
|
18123
18439
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
18124
18440
|
}
|
|
@@ -18237,7 +18553,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
18237
18553
|
}
|
|
18238
18554
|
}, "candidateCatalog");
|
|
18239
18555
|
|
|
18240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18556
|
+
// 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/meeting-project-candidates.js
|
|
18241
18557
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
18242
18558
|
const fixed = snapshotMeetingScope(scope);
|
|
18243
18559
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -18290,7 +18606,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
18290
18606
|
};
|
|
18291
18607
|
}, "createMeetingProjectCandidateReader");
|
|
18292
18608
|
|
|
18293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18609
|
+
// 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/meeting-project-discovery.js
|
|
18294
18610
|
import { createHash as createHash14 } from "node:crypto";
|
|
18295
18611
|
var scopeKeys = [
|
|
18296
18612
|
"accountId",
|
|
@@ -18425,7 +18741,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
18425
18741
|
};
|
|
18426
18742
|
}, "readMeetingProjectDiscovery");
|
|
18427
18743
|
|
|
18428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18744
|
+
// 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/meeting-review.js
|
|
18429
18745
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
18430
18746
|
const { limit, ...selecting } = request;
|
|
18431
18747
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18433,7 +18749,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18433
18749
|
return { ...review, selection };
|
|
18434
18750
|
}, "readMeetingReview");
|
|
18435
18751
|
|
|
18436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18752
|
+
// 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/meeting-searches.js
|
|
18437
18753
|
var KIND = ["meetings-search"];
|
|
18438
18754
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
18439
18755
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18463,7 +18779,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
18463
18779
|
};
|
|
18464
18780
|
}, "meetingSearchesService");
|
|
18465
18781
|
|
|
18466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18782
|
+
// 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/meeting-stats.js
|
|
18467
18783
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
18468
18784
|
const { timeZone, maxRows, ...selecting } = request;
|
|
18469
18785
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -18474,8 +18790,19 @@ var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
18474
18790
|
});
|
|
18475
18791
|
return { ...stats, selection };
|
|
18476
18792
|
}, "readMeetingStats");
|
|
18793
|
+
var readMeetingCounts = /* @__PURE__ */ __name(async (store, request) => {
|
|
18794
|
+
const { by, timeZone, limit, ...selecting } = request;
|
|
18795
|
+
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
18796
|
+
const counts = await store.meetings.meetingCounts({
|
|
18797
|
+
...input,
|
|
18798
|
+
by,
|
|
18799
|
+
...timeZone === void 0 ? {} : { timeZone },
|
|
18800
|
+
...limit === void 0 ? {} : { limit }
|
|
18801
|
+
});
|
|
18802
|
+
return { ...counts, selection };
|
|
18803
|
+
}, "readMeetingCounts");
|
|
18477
18804
|
|
|
18478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18805
|
+
// 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/meeting-hit-context.js
|
|
18479
18806
|
import { createHash as createHash15 } from "node:crypto";
|
|
18480
18807
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
18481
18808
|
ref: cue.reference,
|
|
@@ -18593,7 +18920,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
18593
18920
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
18594
18921
|
}, "readMeetingHitContext");
|
|
18595
18922
|
|
|
18596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18923
|
+
// 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/meeting-passage-format.js
|
|
18597
18924
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
18598
18925
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
18599
18926
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -18669,7 +18996,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
18669
18996
|
return { packet, content };
|
|
18670
18997
|
}, "readMeetingPassage");
|
|
18671
18998
|
|
|
18672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18999
|
+
// 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/meeting-batch.js
|
|
18673
19000
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
18674
19001
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
18675
19002
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -18683,10 +19010,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
18683
19010
|
};
|
|
18684
19011
|
}, "createMeetingBatchReader");
|
|
18685
19012
|
|
|
18686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19013
|
+
// 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/meeting-combined.js
|
|
18687
19014
|
import { createHash as createHash16 } from "node:crypto";
|
|
18688
19015
|
|
|
18689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19016
|
+
// 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/meeting-semantic.js
|
|
18690
19017
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
18691
19018
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
18692
19019
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -18838,7 +19165,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
18838
19165
|
};
|
|
18839
19166
|
}, "applyMeetingEmbedding");
|
|
18840
19167
|
|
|
18841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19168
|
+
// 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/meeting-combined.js
|
|
18842
19169
|
var DEPTH = 200;
|
|
18843
19170
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
18844
19171
|
if (value === void 0)
|
|
@@ -18975,7 +19302,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
18975
19302
|
};
|
|
18976
19303
|
}, "searchMeetingsCombined");
|
|
18977
19304
|
|
|
18978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19305
|
+
// 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/meeting-context.js
|
|
18979
19306
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
18980
19307
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
18981
19308
|
if (!signal?.aborted)
|
|
@@ -19080,7 +19407,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
19080
19407
|
};
|
|
19081
19408
|
}, "createMeetingContextService");
|
|
19082
19409
|
|
|
19083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19410
|
+
// 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/meeting-model.js
|
|
19084
19411
|
var integer2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
19085
19412
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
19086
19413
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -19307,7 +19634,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
19307
19634
|
};
|
|
19308
19635
|
}, "openMeetingEmbedder");
|
|
19309
19636
|
|
|
19310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19637
|
+
// 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/context/communication-selection.js
|
|
19311
19638
|
var communicationFields = {
|
|
19312
19639
|
sources: pipe(array(strictObject({
|
|
19313
19640
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -19339,7 +19666,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
19339
19666
|
return { ...input, after, before: before2 };
|
|
19340
19667
|
}, "communicationRequest");
|
|
19341
19668
|
|
|
19342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19669
|
+
// 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/meeting-preparation-validation.js
|
|
19343
19670
|
var MEETING_PREPARATION_LIMITS = {
|
|
19344
19671
|
meetings: { min: 1, max: 20, default: 5 },
|
|
19345
19672
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -19425,7 +19752,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
19425
19752
|
return { ...input, history };
|
|
19426
19753
|
}, "preparationRequest");
|
|
19427
19754
|
|
|
19428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19755
|
+
// 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/meeting-communications-preparation.js
|
|
19429
19756
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
19430
19757
|
const section = {
|
|
19431
19758
|
readUsage: plan.reader.usage(),
|
|
@@ -19530,7 +19857,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
19530
19857
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
19531
19858
|
}, "appendPreparationCommunications");
|
|
19532
19859
|
|
|
19533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19860
|
+
// 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/meeting-communications-selection.js
|
|
19534
19861
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
19535
19862
|
if (port === void 0)
|
|
19536
19863
|
return void 0;
|
|
@@ -19635,7 +19962,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
19635
19962
|
}
|
|
19636
19963
|
}, "validatePreparationCommunications");
|
|
19637
19964
|
|
|
19638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19965
|
+
// 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/meeting-knowledge-preparation.js
|
|
19639
19966
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
19640
19967
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
19641
19968
|
}, "invalid");
|
|
@@ -19704,7 +20031,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
19704
20031
|
}
|
|
19705
20032
|
}, "appendKnowledgePreparation");
|
|
19706
20033
|
|
|
19707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20034
|
+
// 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/meeting-notes-preparation.js
|
|
19708
20035
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
19709
20036
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
19710
20037
|
}, "invalid");
|
|
@@ -19778,7 +20105,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
19778
20105
|
}
|
|
19779
20106
|
}, "appendNotesPreparation");
|
|
19780
20107
|
|
|
19781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20108
|
+
// 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/meeting-project-preparation.js
|
|
19782
20109
|
var PAGE_LIMIT = 4;
|
|
19783
20110
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
19784
20111
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -19828,7 +20155,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
19828
20155
|
}
|
|
19829
20156
|
}, "appendProjectPreparation");
|
|
19830
20157
|
|
|
19831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20158
|
+
// 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/meeting-related-preparation.js
|
|
19832
20159
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
19833
20160
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
19834
20161
|
return;
|
|
@@ -19900,7 +20227,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
19900
20227
|
}
|
|
19901
20228
|
}, "appendRelatedPreparation");
|
|
19902
20229
|
|
|
19903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20230
|
+
// 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/meeting-preparation.js
|
|
19904
20231
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
19905
20232
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
19906
20233
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -20038,7 +20365,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
20038
20365
|
};
|
|
20039
20366
|
}, "createMeetingPreparationService");
|
|
20040
20367
|
|
|
20041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20368
|
+
// 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/meeting-task-proposal.js
|
|
20042
20369
|
import { createHash as createHash17 } from "node:crypto";
|
|
20043
20370
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
20044
20371
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -20058,7 +20385,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
20058
20385
|
};
|
|
20059
20386
|
}, "proposeMeetingTask");
|
|
20060
20387
|
|
|
20061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20388
|
+
// 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/meeting-tasks.js
|
|
20062
20389
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
20063
20390
|
const { provider, account: account2, scope } = key;
|
|
20064
20391
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -20121,7 +20448,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
20121
20448
|
}
|
|
20122
20449
|
}, "readMeetingTask");
|
|
20123
20450
|
|
|
20124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20451
|
+
// 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/package-upgrade.js
|
|
20125
20452
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
20126
20453
|
const installer = ports.installer();
|
|
20127
20454
|
const argv = updateCommand(installer, packageName);
|
|
@@ -20186,23 +20513,16 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
20186
20513
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
20187
20514
|
}, "dayAfter");
|
|
20188
20515
|
|
|
20189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20516
|
+
// 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/proposal-tasks.js
|
|
20190
20517
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
20191
20518
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
20192
20519
|
const proposal = await store.proposedActions.get(id2);
|
|
20193
|
-
|
|
20194
|
-
throw new CliError("validation_error", "review meeting findings through the dedicated findings command", {
|
|
20195
|
-
reason: "meeting-findings.dedicated-review"
|
|
20196
|
-
});
|
|
20197
|
-
if (proposal.kind === EVIDENCE_FINDINGS_KIND)
|
|
20198
|
-
throw new CliError("validation_error", "review evidence findings through the dedicated findings command", {
|
|
20199
|
-
reason: "evidence-findings.dedicated-review"
|
|
20200
|
-
});
|
|
20520
|
+
assertGenericAction(proposal.kind);
|
|
20201
20521
|
if (proposal.status !== "proposed")
|
|
20202
20522
|
throw new CliError("validation_error", `a ${proposal.status} action cannot be approved`, {
|
|
20203
20523
|
reason: "proposal.wrong-state"
|
|
20204
20524
|
});
|
|
20205
|
-
assertMayDecide({ id: proposal.id, proposedBy: proposerOfAction(proposal) }, by, store.decisionPolicy);
|
|
20525
|
+
assertMayDecide({ id: proposal.id, kind: proposal.kind, proposedBy: proposerOfAction(proposal) }, by, store.decisionPolicy);
|
|
20206
20526
|
if (proposal.account === null)
|
|
20207
20527
|
throw new CliError("validation_error", "a proposal names the account that would act; this one names none");
|
|
20208
20528
|
const { task: task2 } = await createTaskService({ store: store.tasks }).add({
|
|
@@ -20216,7 +20536,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
20216
20536
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
20217
20537
|
}, "approveAsTask");
|
|
20218
20538
|
|
|
20219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20539
|
+
// 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/proposals/ids.js
|
|
20220
20540
|
var MAX_IDS = 500;
|
|
20221
20541
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
20222
20542
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -20236,6 +20556,8 @@ var one = /* @__PURE__ */ __name((token) => {
|
|
|
20236
20556
|
const part = /^([1-9]\d*)\/([A-Za-z0-9_-]{1,64})$/.exec(token);
|
|
20237
20557
|
if (part)
|
|
20238
20558
|
return [token];
|
|
20559
|
+
if (/^[a-z][a-z_]*:[A-Za-z][A-Za-z0-9]*-[1-9]\d*$/.test(token))
|
|
20560
|
+
return [token];
|
|
20239
20561
|
const prefixed = /^([a-z][a-z_]*):([1-9]\d*)(?:-(?:([a-z][a-z_]*):)?([1-9]\d*))?$/.exec(token);
|
|
20240
20562
|
if (prefixed?.[1] && prefixed[2]) {
|
|
20241
20563
|
const [, prefix, from, other, to] = prefixed;
|
|
@@ -20245,7 +20567,7 @@ var one = /* @__PURE__ */ __name((token) => {
|
|
|
20245
20567
|
}
|
|
20246
20568
|
if (/^[1-9]\d*-[a-z]/.test(token))
|
|
20247
20569
|
return refuse(`a range stays inside one prefix: ${token}`);
|
|
20248
|
-
return refuse(`not a proposal id: ${token}; use 17070, 17070-17079, fact:512 or 17080/f2`);
|
|
20570
|
+
return refuse(`not a proposal id: ${token}; use 17070, 17070-17079, fact:512, close:Q-15 or 17080/f2`);
|
|
20249
20571
|
}, "one");
|
|
20250
20572
|
var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
20251
20573
|
const ids = [...new Set(text2.flatMap((arg) => arg.split(",")).flatMap((token) => one(token.trim())))];
|
|
@@ -20256,7 +20578,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
20256
20578
|
return ids;
|
|
20257
20579
|
}, "parseProposalIds");
|
|
20258
20580
|
|
|
20259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20581
|
+
// 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/proposals/kinds/shared.js
|
|
20260
20582
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
20261
20583
|
if (author.type === "person")
|
|
20262
20584
|
return { type: "person", id: author.id };
|
|
@@ -20298,7 +20620,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
20298
20620
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
20299
20621
|
}, "storedStatus");
|
|
20300
20622
|
|
|
20301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20623
|
+
// 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/proposals/kinds/findings.js
|
|
20302
20624
|
var FACT_SUMMARIES = {
|
|
20303
20625
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
20304
20626
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -20370,7 +20692,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
20370
20692
|
};
|
|
20371
20693
|
}, "findingsKind");
|
|
20372
20694
|
|
|
20373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20695
|
+
// 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/proposals/kinds/action.js
|
|
20374
20696
|
var rowOf2 = /* @__PURE__ */ __name((action2) => ({
|
|
20375
20697
|
id: action2.id,
|
|
20376
20698
|
kind: "action",
|
|
@@ -20385,14 +20707,15 @@ var rowOf2 = /* @__PURE__ */ __name((action2) => ({
|
|
|
20385
20707
|
score: null,
|
|
20386
20708
|
signals: null,
|
|
20387
20709
|
parts: null,
|
|
20388
|
-
createdAt: action2.createdAt
|
|
20710
|
+
createdAt: action2.createdAt,
|
|
20711
|
+
...isOwnerOnlyKind(action2.kind) ? { ownerOnly: true } : {}
|
|
20389
20712
|
}), "rowOf");
|
|
20390
20713
|
var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
20391
20714
|
kind: "action",
|
|
20392
20715
|
list: /* @__PURE__ */ __name(async (filter) => {
|
|
20393
20716
|
const status = storedStatus(filter);
|
|
20394
20717
|
const actions = await store.proposedActions.list({
|
|
20395
|
-
except: [...claimed(), MEETING_FINDINGS_KIND],
|
|
20718
|
+
except: [...claimed(), MEETING_FINDINGS_KIND, EVIDENCE_FINDINGS_KIND, MAIL_FINDINGS_KIND],
|
|
20396
20719
|
...status === void 0 ? {} : { status },
|
|
20397
20720
|
...pushed2(filter)
|
|
20398
20721
|
});
|
|
@@ -20409,7 +20732,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
20409
20732
|
}, "decide")
|
|
20410
20733
|
}), "actionKind");
|
|
20411
20734
|
|
|
20412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20735
|
+
// 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/proposals/kinds/fact.js
|
|
20413
20736
|
var STATUS = {
|
|
20414
20737
|
proposed: "proposed",
|
|
20415
20738
|
accepted: "confirmed",
|
|
@@ -20452,7 +20775,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
20452
20775
|
}, "decide")
|
|
20453
20776
|
}), "factKind");
|
|
20454
20777
|
|
|
20455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20778
|
+
// 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/proposals/kinds/finance.js
|
|
20456
20779
|
var rowOf4 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
20457
20780
|
id: entry.ref,
|
|
20458
20781
|
kind,
|
|
@@ -20487,7 +20810,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
20487
20810
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
20488
20811
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
20489
20812
|
|
|
20490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20813
|
+
// 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/proposals/kinds/key-document.js
|
|
20491
20814
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
20492
20815
|
id: `key:${link4.id}`,
|
|
20493
20816
|
kind: "key_document",
|
|
@@ -20555,7 +20878,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
20555
20878
|
};
|
|
20556
20879
|
}, "keyDocumentKind");
|
|
20557
20880
|
|
|
20558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20881
|
+
// 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/proposals/kinds/mail-findings.js
|
|
20559
20882
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
20560
20883
|
switch (finding.kind) {
|
|
20561
20884
|
case "task":
|
|
@@ -20634,14 +20957,78 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
20634
20957
|
};
|
|
20635
20958
|
}, "mailFindingsKind");
|
|
20636
20959
|
|
|
20637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20960
|
+
// 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/proposals/kinds/meeting-findings.js
|
|
20961
|
+
var rowOf6 = /* @__PURE__ */ __name((action2, batch) => {
|
|
20962
|
+
const findings = batch.input.findings;
|
|
20963
|
+
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
20964
|
+
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
20965
|
+
const references = [...new Set(findings.flatMap((finding) => finding.evidence.map((one2) => one2.reference)))];
|
|
20966
|
+
return {
|
|
20967
|
+
id: action2.id,
|
|
20968
|
+
kind: "meeting_findings",
|
|
20969
|
+
status: batch.status === "proposed" ? "proposed" : batch.receipt?.accepted.length ? "confirmed" : "rejected",
|
|
20970
|
+
project: projects.length === 1 && typeof projects[0] === "string" ? projects[0] : null,
|
|
20971
|
+
subject: references[0] ?? `meeting_findings:${action2.id}`,
|
|
20972
|
+
object: null,
|
|
20973
|
+
summary: `${findings.length} finding${findings.length === 1 ? "" : "s"}`,
|
|
20974
|
+
proposedBy: proposerOfAction(action2),
|
|
20975
|
+
reason: action2.reason,
|
|
20976
|
+
evidence: references.slice(0, 5),
|
|
20977
|
+
score: null,
|
|
20978
|
+
signals: null,
|
|
20979
|
+
parts: findings.map((finding) => ({
|
|
20980
|
+
id: finding.id,
|
|
20981
|
+
kind: finding.kind,
|
|
20982
|
+
summary: FACT_SUMMARIES[finding.kind]?.(finding) ?? finding.kind,
|
|
20983
|
+
outcome: outcome2(finding.id)
|
|
20984
|
+
})),
|
|
20985
|
+
createdAt: action2.createdAt
|
|
20986
|
+
};
|
|
20987
|
+
}, "rowOf");
|
|
20988
|
+
var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
20989
|
+
const batchOf = /* @__PURE__ */ __name(async (action2) => {
|
|
20990
|
+
if (action2.account === null)
|
|
20991
|
+
throw new CliError("not_found", `meeting findings ${action2.id} name no account`);
|
|
20992
|
+
return { account: action2.account, batch: await store.meetingFindings.get(action2.account, action2.id) };
|
|
20993
|
+
}, "batchOf");
|
|
20994
|
+
return {
|
|
20995
|
+
kind: "meeting_findings",
|
|
20996
|
+
stored: [MEETING_FINDINGS_KIND],
|
|
20997
|
+
parts: true,
|
|
20998
|
+
ownerOnly: true,
|
|
20999
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
21000
|
+
const actions = await store.proposedActions.list({
|
|
21001
|
+
kinds: [MEETING_FINDINGS_KIND],
|
|
21002
|
+
...(filter.status ?? "proposed") === "proposed" ? { status: "proposed" } : {},
|
|
21003
|
+
...filter.by === void 0 ? {} : { proposedBy: filter.by },
|
|
21004
|
+
limit: Math.min(filter.offset + filter.limit, 500)
|
|
21005
|
+
});
|
|
21006
|
+
const rows = await Promise.all(actions.map(async (action2) => rowOf6(action2, (await batchOf(action2)).batch)));
|
|
21007
|
+
return kept(rows, { ...filter, limit: filter.offset + filter.limit });
|
|
21008
|
+
}, "list"),
|
|
21009
|
+
get: /* @__PURE__ */ __name(async (id2) => {
|
|
21010
|
+
const action2 = await store.proposedActions.get(id2);
|
|
21011
|
+
return rowOf6(action2, (await batchOf(action2)).batch);
|
|
21012
|
+
}, "get"),
|
|
21013
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
|
|
21014
|
+
const { account: account2, batch } = await batchOf(await store.proposedActions.get(id2));
|
|
21015
|
+
const turnedDown = new Set(batch.previous.filter((one2) => one2.status === "rejected").map((one2) => one2.id));
|
|
21016
|
+
const accept = !confirm ? [] : parts ?? batch.input.findings.map((finding) => finding.id).filter((one2) => !turnedDown.has(one2));
|
|
21017
|
+
const reviewed = await store.meetingFindings.review(account2, id2, { fingerprint: batch.fingerprint, accept, by });
|
|
21018
|
+
const made = (reviewed.receipt?.items ?? []).flatMap((item2) => item2.status === "accepted" && item2.reference && !item2.reused ? [item2.reference] : []);
|
|
21019
|
+
return { id: id2, kind: "meeting_findings", status: accept.length ? "confirmed" : "rejected", made };
|
|
21020
|
+
}, "decide")
|
|
21021
|
+
};
|
|
21022
|
+
}, "meetingFindingsKind");
|
|
21023
|
+
|
|
21024
|
+
// 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/proposals/kinds/memory.js
|
|
20638
21025
|
var STATUS2 = {
|
|
20639
21026
|
proposed: "proposed",
|
|
20640
21027
|
confirmed: "confirmed",
|
|
20641
21028
|
superseded: "confirmed",
|
|
20642
21029
|
stale: "rejected"
|
|
20643
21030
|
};
|
|
20644
|
-
var
|
|
21031
|
+
var rowOf7 = /* @__PURE__ */ __name((memory) => ({
|
|
20645
21032
|
id: memory.ref,
|
|
20646
21033
|
kind: "memory",
|
|
20647
21034
|
status: STATUS2[memory.status],
|
|
@@ -20666,16 +21053,16 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
20666
21053
|
...pushed2(filter),
|
|
20667
21054
|
...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
|
|
20668
21055
|
});
|
|
20669
|
-
return kept(memories.map(
|
|
21056
|
+
return kept(memories.map(rowOf7), filter);
|
|
20670
21057
|
}, "list"),
|
|
20671
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
21058
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf7(await store.memories.get(id2)), "get"),
|
|
20672
21059
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
|
|
20673
21060
|
const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
|
|
20674
21061
|
return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
|
|
20675
21062
|
}, "decide")
|
|
20676
21063
|
}), "memoryKind");
|
|
20677
21064
|
|
|
20678
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21065
|
+
// 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/proposals/kinds/relationship.js
|
|
20679
21066
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
20680
21067
|
id: `link:${link4.id}`,
|
|
20681
21068
|
kind: "relationship",
|
|
@@ -20749,10 +21136,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
20749
21136
|
};
|
|
20750
21137
|
}, "relationshipKind");
|
|
20751
21138
|
|
|
20752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21139
|
+
// 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/proposals/kinds/relationship-update.js
|
|
20753
21140
|
var KIND2 = "relationship_update";
|
|
20754
21141
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
20755
|
-
var
|
|
21142
|
+
var rowOf8 = /* @__PURE__ */ __name((action2) => {
|
|
20756
21143
|
const payload = action2.payload;
|
|
20757
21144
|
return {
|
|
20758
21145
|
id: action2.id,
|
|
@@ -20781,9 +21168,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
20781
21168
|
...status === void 0 ? {} : { status },
|
|
20782
21169
|
...pushed2(filter)
|
|
20783
21170
|
});
|
|
20784
|
-
return kept(stored.map(
|
|
21171
|
+
return kept(stored.map(rowOf8), filter);
|
|
20785
21172
|
}, "list"),
|
|
20786
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
21173
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.proposedActions.get(id2)), "get"),
|
|
20787
21174
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
20788
21175
|
const { relation } = await store.knowledge.decideRelationUpdate(id2, {
|
|
20789
21176
|
confirm,
|
|
@@ -20799,8 +21186,77 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
20799
21186
|
}, "decide")
|
|
20800
21187
|
}), "relationshipUpdateKind");
|
|
20801
21188
|
|
|
20802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21189
|
+
// 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/proposals/kinds/task-close.js
|
|
21190
|
+
var rowOf9 = /* @__PURE__ */ __name((task2) => {
|
|
21191
|
+
const suggestion = task2.closeSuggestion;
|
|
21192
|
+
if (suggestion === null)
|
|
21193
|
+
return void 0;
|
|
21194
|
+
return {
|
|
21195
|
+
id: `close:${task2.key}`,
|
|
21196
|
+
kind: TASK_CLOSE_KIND,
|
|
21197
|
+
status: "proposed",
|
|
21198
|
+
project: task2.project,
|
|
21199
|
+
subject: task2.ref,
|
|
21200
|
+
object: null,
|
|
21201
|
+
summary: `close as ${suggestion.as}: ${task2.title}`,
|
|
21202
|
+
proposedBy: { type: "bot", id: suggestion.by, name: suggestion.by, kind: "agent" },
|
|
21203
|
+
reason: suggestion.reason,
|
|
21204
|
+
evidence: task2.source === null ? [] : [task2.source],
|
|
21205
|
+
score: suggestion.certainty,
|
|
21206
|
+
signals: null,
|
|
21207
|
+
parts: null,
|
|
21208
|
+
createdAt: suggestion.at
|
|
21209
|
+
};
|
|
21210
|
+
}, "rowOf");
|
|
21211
|
+
var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
21212
|
+
const taskOf = /* @__PURE__ */ __name(async (id2) => {
|
|
21213
|
+
const key = id2.slice("close:".length);
|
|
21214
|
+
const task2 = await store.tasks.details(key).catch(() => void 0);
|
|
21215
|
+
const row = task2 && rowOf9(task2);
|
|
21216
|
+
if (!task2 || !row)
|
|
21217
|
+
throw new CliError("not_found", `no close waits on task ${key}`);
|
|
21218
|
+
return { task: task2, row };
|
|
21219
|
+
}, "taskOf");
|
|
21220
|
+
return {
|
|
21221
|
+
kind: TASK_CLOSE_KIND,
|
|
21222
|
+
prefix: "close",
|
|
21223
|
+
ownerOnly: true,
|
|
21224
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
21225
|
+
if ((filter.status ?? "proposed") !== "proposed" && filter.status !== "all")
|
|
21226
|
+
return [];
|
|
21227
|
+
const tasks = await store.tasks.find({
|
|
21228
|
+
status: "open",
|
|
21229
|
+
where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
|
|
21230
|
+
limit: filter.offset + filter.limit
|
|
21231
|
+
});
|
|
21232
|
+
return kept(tasks.flatMap((task2) => rowOf9(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
|
|
21233
|
+
}, "list"),
|
|
21234
|
+
get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
|
|
21235
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
21236
|
+
const { task: task2 } = await taskOf(id2);
|
|
21237
|
+
const suggestion = task2.closeSuggestion;
|
|
21238
|
+
if (!confirm || suggestion === null) {
|
|
21239
|
+
await store.tasks.suggestClose(task2.id, null, "owner");
|
|
21240
|
+
return { id: id2, kind: TASK_CLOSE_KIND, status: "rejected", made: [] };
|
|
21241
|
+
}
|
|
21242
|
+
if (await store.tasks.get(task2.id) === void 0)
|
|
21243
|
+
await store.tasks.edit(task2.id, { status: suggestion.as, ...reason === void 0 ? {} : { reason } }, deciderAuthor(by));
|
|
21244
|
+
else {
|
|
21245
|
+
const why = reason ?? suggestion.reason ?? void 0;
|
|
21246
|
+
await createTaskService({ store: store.tasks }).close(task2.id, {
|
|
21247
|
+
as: suggestion.as,
|
|
21248
|
+
by: "owner",
|
|
21249
|
+
...why === void 0 ? {} : { reason: why }
|
|
21250
|
+
});
|
|
21251
|
+
}
|
|
21252
|
+
return { id: id2, kind: TASK_CLOSE_KIND, status: "confirmed", made: [task2.ref] };
|
|
21253
|
+
}, "decide")
|
|
21254
|
+
};
|
|
21255
|
+
}, "taskCloseKind");
|
|
21256
|
+
|
|
21257
|
+
// 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/proposals/registry.js
|
|
20803
21258
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
21259
|
+
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
20804
21260
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
20805
21261
|
if (!(error instanceof CliError))
|
|
20806
21262
|
throw error;
|
|
@@ -20838,12 +21294,15 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
20838
21294
|
throw new CliError("validation_error", "a proposal list takes a nonnegative offset");
|
|
20839
21295
|
const asked = filter.kinds === void 0 ? kinds : kinds.filter((kind) => filter.kinds?.includes(kind.kind));
|
|
20840
21296
|
const wide = { ...filter, offset: 0, limit: filter.offset + filter.limit + 1 };
|
|
20841
|
-
const rows = (await Promise.all(asked.map((kind) => kind.list(wide)))).flat();
|
|
21297
|
+
const rows = (await Promise.all(asked.map(async (kind) => (await kind.list(wide)).map((row) => marked(kind, row))))).flat();
|
|
20842
21298
|
rows.sort((a, b) => b.createdAt.localeCompare(a.createdAt) || b.id.localeCompare(a.id));
|
|
20843
21299
|
const page = rows.slice(filter.offset, filter.offset + filter.limit + 1);
|
|
20844
21300
|
return { items: page.slice(0, filter.limit), hasMore: page.length > filter.limit };
|
|
20845
21301
|
}, "list"),
|
|
20846
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
21302
|
+
get: /* @__PURE__ */ __name(async (id2) => {
|
|
21303
|
+
const kind = await kindOf4(id2);
|
|
21304
|
+
return marked(kind, await kind.get(id2));
|
|
21305
|
+
}, "get"),
|
|
20847
21306
|
decide: /* @__PURE__ */ __name(async (ids, decision) => {
|
|
20848
21307
|
const parts = /* @__PURE__ */ new Map();
|
|
20849
21308
|
const whole4 = /* @__PURE__ */ new Set();
|
|
@@ -20876,7 +21335,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
20876
21335
|
refuseIds(id2, `a ${kind.kind} proposal has no parts; name ${id2} alone`);
|
|
20877
21336
|
continue;
|
|
20878
21337
|
}
|
|
20879
|
-
const row = await kind.get(id2);
|
|
21338
|
+
const row = marked(kind, await kind.get(id2));
|
|
20880
21339
|
if (row.status !== "proposed") {
|
|
20881
21340
|
refused.push({
|
|
20882
21341
|
id: id2,
|
|
@@ -20886,7 +21345,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
20886
21345
|
});
|
|
20887
21346
|
continue;
|
|
20888
21347
|
}
|
|
20889
|
-
const refusal2 = mayDecide(
|
|
21348
|
+
const refusal2 = mayDecide(row, decision.by, policy);
|
|
20890
21349
|
if (refusal2) {
|
|
20891
21350
|
refused.push(refusal2);
|
|
20892
21351
|
continue;
|
|
@@ -20912,14 +21371,16 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
20912
21371
|
paymentKind(store),
|
|
20913
21372
|
memoryKind(store),
|
|
20914
21373
|
findingsKind(store),
|
|
20915
|
-
mailFindingsKind(store)
|
|
21374
|
+
mailFindingsKind(store),
|
|
21375
|
+
meetingFindingsKind(store),
|
|
21376
|
+
taskCloseKind(store)
|
|
20916
21377
|
])
|
|
20917
21378
|
registry.register(kind);
|
|
20918
21379
|
registry.register(actionKind(store, registry.claimed));
|
|
20919
21380
|
return registry;
|
|
20920
21381
|
}, "proposalRegistry");
|
|
20921
21382
|
|
|
20922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21383
|
+
// 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/stored-meeting-project-candidate-validation.js
|
|
20923
21384
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
20924
21385
|
const invalid8 = /* @__PURE__ */ __name((field) => {
|
|
20925
21386
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -20961,7 +21422,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
20961
21422
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
20962
21423
|
}, "storedCandidateRequest");
|
|
20963
21424
|
|
|
20964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21425
|
+
// 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/stored-meeting-project-candidates.js
|
|
20965
21426
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
20966
21427
|
const fixed = snapshotMeetingScope(scope);
|
|
20967
21428
|
const store = ports?.meetings;
|
|
@@ -21053,7 +21514,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
21053
21514
|
};
|
|
21054
21515
|
}, "createStoredMeetingProjectCandidateReader");
|
|
21055
21516
|
|
|
21056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21517
|
+
// 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/index.js
|
|
21057
21518
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
21058
21519
|
const pictures = picturesService(deps);
|
|
21059
21520
|
const base = {
|
|
@@ -21063,6 +21524,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
21063
21524
|
counters: countersService(deps),
|
|
21064
21525
|
retention: retentionService(deps),
|
|
21065
21526
|
rankings: rankingsService(deps),
|
|
21527
|
+
replyStats: replyStatsService(deps),
|
|
21066
21528
|
topics: topicsService(deps),
|
|
21067
21529
|
messages: withPictures(messagesService(deps), pictures),
|
|
21068
21530
|
chats: chatsService(deps),
|
|
@@ -21318,7 +21780,9 @@ export {
|
|
|
21318
21780
|
searchesService,
|
|
21319
21781
|
TAGGING_QUERY,
|
|
21320
21782
|
tagsService,
|
|
21783
|
+
TASK_STATS_BY,
|
|
21321
21784
|
TASK_QUERY,
|
|
21785
|
+
TASK_STATS_QUERY,
|
|
21322
21786
|
TASK_PAIR_QUERY,
|
|
21323
21787
|
CLAIM_LEASE_MS,
|
|
21324
21788
|
taskTypeOf,
|
|
@@ -21338,6 +21802,7 @@ export {
|
|
|
21338
21802
|
readMeetingReview,
|
|
21339
21803
|
meetingSearchesService,
|
|
21340
21804
|
readMeetingStats,
|
|
21805
|
+
readMeetingCounts,
|
|
21341
21806
|
readMeetingHitContext,
|
|
21342
21807
|
formatMeetingPassage,
|
|
21343
21808
|
readMeetingPassage,
|