@wirecat/mail-cli 0.37.0 → 0.38.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/CHANGELOG.md +20 -0
- package/contracts/wirecat.json +1 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/agent-U43CYLAP.js +41 -0
- package/dist/bundle/{all-profiles-ICGWDPUU.js → all-profiles-OCUZMXMI.js} +7 -7
- package/dist/bundle/{anthropic-TL4WFWGU.js → anthropic-CABWJABQ.js} +2 -2
- package/dist/bundle/{app-server-YAR5EFOO.js → app-server-TTWPIGWG.js} +63 -62
- package/dist/bundle/{bun-OPDGMZZQ.js → bun-F4M4KCNA.js} +2 -2
- package/dist/bundle/{bun-sqlite-WI3ZPANS.js → bun-sqlite-YKYG25CR.js} +3 -3
- package/dist/bundle/{chunk-YODGIMMM.js → chunk-24UGTK32.js} +7 -7
- package/dist/bundle/{chunk-IUJDWEGJ.js → chunk-2HDXD6LM.js} +4 -4
- package/dist/bundle/{chunk-UTS5NMR3.js → chunk-2SQLHBDP.js} +1 -1
- package/dist/bundle/{chunk-JLXXUEAM.js → chunk-3TYER5IK.js} +13 -5
- package/dist/bundle/{chunk-R73VWPNL.js → chunk-4FXDUXZP.js} +6 -6
- package/dist/bundle/{chunk-XWBTD2WP.js → chunk-5ICUC66S.js} +2 -2
- package/dist/bundle/{chunk-TMJLGR4A.js → chunk-725OPCHI.js} +51 -51
- package/dist/bundle/{chunk-ZSAPOC7B.js → chunk-77YTUOKN.js} +22 -14
- package/dist/bundle/{chunk-NB52JKLR.js → chunk-7EJWHADX.js} +7 -7
- package/dist/bundle/{chunk-FXNCKPQ7.js → chunk-7KO5FSAW.js} +2 -2
- package/dist/bundle/{chunk-OWPRJLHV.js → chunk-A3KNH3Q4.js} +7 -7
- package/dist/bundle/{chunk-KUX54EGR.js → chunk-AGO3OVKW.js} +441 -377
- package/dist/bundle/{chunk-VB7FZOYX.js → chunk-AQ5RIOUE.js} +1 -1
- package/dist/bundle/{chunk-NAOLBEFX.js → chunk-BA5B5ZF4.js} +203 -168
- package/dist/bundle/{chunk-CICUPYHT.js → chunk-C4PUDTGD.js} +2 -2
- package/dist/bundle/{chunk-VZ5PPYDG.js → chunk-C7JPYWYQ.js} +1 -1
- package/dist/bundle/{chunk-DJZIFZOT.js → chunk-CJJFOT7W.js} +2 -2
- package/dist/bundle/{chunk-JNP3XGJI.js → chunk-CLTFTGBP.js} +15 -14
- package/dist/bundle/{chunk-GQIMVR7C.js → chunk-DKGKPJA3.js} +10 -10
- package/dist/bundle/{chunk-DTR7JO2M.js → chunk-DYCE72XB.js} +34 -34
- package/dist/bundle/{chunk-7PDGZFXD.js → chunk-EDWY73H7.js} +3 -3
- package/dist/bundle/{chunk-3ZOOTTFW.js → chunk-EJQAP6A6.js} +5 -5
- package/dist/bundle/{chunk-7YKWFERX.js → chunk-ESNZL7SB.js} +1 -1
- package/dist/bundle/{chunk-JG6LCSEX.js → chunk-FFER7KJI.js} +12 -12
- package/dist/bundle/{chunk-3HC5F3P7.js → chunk-FTH6WGYO.js} +1 -1
- package/dist/bundle/{chunk-GPUC3FTU.js → chunk-FWGNDKJK.js} +1 -1
- package/dist/bundle/{chunk-NISH4UXM.js → chunk-G46PNDWL.js} +1 -1
- package/dist/bundle/{chunk-K4DEQAEW.js → chunk-G5HG7ZWQ.js} +42 -164
- package/dist/bundle/{chunk-LKH3UKLO.js → chunk-G6NY7LFB.js} +3 -3
- package/dist/bundle/{chunk-KCM3WSER.js → chunk-GMWKNWWY.js} +1 -1
- package/dist/bundle/{chunk-Q7ICVP25.js → chunk-GZ7WBU5Y.js} +1 -1
- package/dist/bundle/{chunk-HFY7536N.js → chunk-HFDDVGDH.js} +62 -60
- package/dist/bundle/{chunk-BYITYTRL.js → chunk-HFRH5YJ6.js} +2 -2
- package/dist/bundle/{chunk-EZQ5BYNL.js → chunk-HI6MTNID.js} +4 -4
- package/dist/bundle/{chunk-BNURKCQG.js → chunk-HIKPVWCL.js} +2 -1
- package/dist/bundle/{chunk-2JHVQMVC.js → chunk-HO4JGD4Q.js} +1 -1
- package/dist/bundle/{chunk-WOPVBRPV.js → chunk-HUAHLO6N.js} +1 -1
- package/dist/bundle/{chunk-F2D3J5DR.js → chunk-HYUUAH2N.js} +6 -6
- package/dist/bundle/chunk-I4AWLFYH.js +377 -0
- package/dist/bundle/{chunk-CUW7Y2HJ.js → chunk-I4PZOWYG.js} +4 -4
- package/dist/bundle/chunk-IDCZ4LWS.js +150 -0
- package/dist/bundle/{chunk-NB7EOAUZ.js → chunk-ISQ23VKV.js} +1 -1
- package/dist/bundle/{chunk-IA7LLLEI.js → chunk-KLRCTMES.js} +2 -2
- package/dist/bundle/{chunk-GGMAIIVE.js → chunk-KYRYD4CR.js} +1 -1
- package/dist/bundle/{chunk-4IZ6R5FS.js → chunk-LB2CF3GG.js} +13 -13
- package/dist/bundle/{chunk-XEQQJBBO.js → chunk-LC7ZD2RW.js} +1 -1
- package/dist/bundle/{chunk-4FTIHADB.js → chunk-M65NILSA.js} +5 -5
- package/dist/bundle/{chunk-IWFWWO37.js → chunk-NQFG7AES.js} +7 -7
- package/dist/bundle/chunk-OAO3JKQD.js +463 -0
- package/dist/bundle/{chunk-2XBDILVW.js → chunk-OEEWVKJX.js} +1 -1
- package/dist/bundle/{chunk-R44KVISE.js → chunk-OVHC7OV4.js} +10 -10
- package/dist/bundle/{chunk-HES6YMYN.js → chunk-PT4VLN3K.js} +4 -4
- package/dist/bundle/chunk-QETNCUWB.js +1703 -0
- package/dist/bundle/{chunk-BNVISIHP.js → chunk-QK3Z7BCC.js} +5 -5
- package/dist/bundle/{chunk-CQHLWMKK.js → chunk-QWF3TFW4.js} +34 -25
- package/dist/bundle/{chunk-FTT7UDYV.js → chunk-RHEDE7D4.js} +2 -2
- package/dist/bundle/{chunk-7HRKUKKY.js → chunk-RI5YZ23Y.js} +20 -20
- package/dist/bundle/{chunk-JZUYZ2XJ.js → chunk-ROUZN6UQ.js} +19 -98
- package/dist/bundle/{chunk-3SKTQ2HC.js → chunk-RQD7CAGF.js} +2 -2
- package/dist/bundle/{chunk-BQMJYSA4.js → chunk-SBLHQAH3.js} +10 -10
- package/dist/bundle/{chunk-NQSKI7XK.js → chunk-SXLIADMY.js} +3 -3
- package/dist/bundle/{chunk-ES2FF42M.js → chunk-SYCM6SQ5.js} +12 -12
- package/dist/bundle/{chunk-3YM4B2GT.js → chunk-T3W4V4A6.js} +1 -1
- package/dist/bundle/{chunk-4N7PP76S.js → chunk-TCT5D2X2.js} +1 -1
- package/dist/bundle/{chunk-YWDFYQOU.js → chunk-TES7MB6I.js} +1 -1
- package/dist/bundle/{chunk-HCRUGAIN.js → chunk-UGFMQWAZ.js} +29 -9
- package/dist/bundle/{chunk-3DHJF57U.js → chunk-VA6PHTMV.js} +6 -6
- package/dist/bundle/{chunk-Z4BLNAWI.js → chunk-VUHH4MQW.js} +8817 -2581
- package/dist/bundle/{chunk-UDSL3MUU.js → chunk-W3BOR6AT.js} +7 -7
- package/dist/bundle/chunk-WA53OJ7V.js +160 -0
- package/dist/bundle/{chunk-QLJGYDWG.js → chunk-XGVMQMTS.js} +5 -5
- package/dist/bundle/{chunk-ZTWTEXB2.js → chunk-YP4FYLFI.js} +2 -2
- package/dist/bundle/{chunk-KZD3H5QA.js → chunk-ZDBWBCEO.js} +2 -2
- package/dist/bundle/{chunk-EV72K4IU.js → chunk-ZKVUAH5N.js} +3 -3
- package/dist/bundle/command-contract-V2WIL6RL.js +40 -0
- package/dist/bundle/{command-server-entry-RA3ZX2KV.js → command-server-entry-ZC5YF4EC.js} +25 -24
- package/dist/bundle/{decode-QVKRSRVF.js → decode-NXAGEUAD.js} +2 -2
- package/dist/bundle/{dist-ITIXJAXK.js → dist-XN2CRP3U.js} +45 -44
- package/dist/bundle/{echarts-O3TNDAXJ.js → echarts-QMAA7HH5.js} +2 -2
- package/dist/bundle/{embed-2HOODFQT.js → embed-3P3LSM2O.js} +3 -3
- package/dist/bundle/{embedder-22AJGCZX.js → embedder-2SANUF2X.js} +6 -6
- package/dist/bundle/{first-run-FU4MFXOA.js → first-run-HEZKQLJL.js} +6 -6
- package/dist/bundle/first-screen-7TQZ4I6X.js +41 -0
- package/dist/bundle/{instructions-AMH5RWVJ.js → instructions-4H7UREH2.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/meeting-combined-HF2NL4PU.js +26 -0
- package/dist/bundle/{meeting-model-QWGAOQHL.js → meeting-model-B7RVFB7L.js} +8 -8
- package/dist/bundle/{meeting-semantic-7PVO6RNB.js → meeting-semantic-YQTL7YVQ.js} +2 -2
- package/dist/bundle/{node-EGMCBAO7.js → node-P3PUHKYH.js} +2 -2
- package/dist/bundle/{node-sqlite-JXUELLMP.js → node-sqlite-OFHTCHJH.js} +4 -4
- package/dist/bundle/{oauth-OYAYWH4K.js → oauth-IVB5RP7T.js} +4 -4
- package/dist/bundle/{open-GLEUJGNA.js → open-KDGDLCWV.js} +2 -2
- package/dist/bundle/{openai-PYTVNB6L.js → openai-NVUBKA7Z.js} +12 -12
- package/dist/bundle/{process-SGHEN6MQ.js → process-AFIXYXWL.js} +1 -1
- package/dist/bundle/{program-7CFNZ2DF.js → program-JQ7EFODJ.js} +1615 -6308
- package/dist/bundle/{prompt-CYTILD7N.js → prompt-QG7FC2SA.js} +2 -2
- package/dist/bundle/{public-XWMXEGEF.js → public-FBD7MQUM.js} +42 -34
- package/dist/bundle/{recognize-26UNETSQ.js → recognize-ZBR5KNID.js} +1 -1
- package/dist/bundle/{remote-PKXBQA5N.js → remote-QOTHNO2M.js} +6 -6
- package/dist/bundle/{rerank-LLKP7M6Q.js → rerank-JD2NIUW6.js} +4 -4
- package/dist/bundle/{serve-ZRJEAPJI.js → serve-QZT3FKK7.js} +6 -6
- package/dist/bundle/{server-4OQ4G5JY.js → server-M6JJ7IKS.js} +55 -54
- package/dist/bundle/server-TAMXMWK6.js +87 -0
- package/dist/bundle/{sqlite-runtime-667VV4VY.js → sqlite-runtime-N2PY7C7J.js} +3 -3
- package/dist/bundle/{state-V3CAAJBE.js → state-OGRUMU7P.js} +3 -3
- package/dist/bundle/{store-BJCIMIAH.js → store-7UE63OQR.js} +52 -41
- package/dist/bundle/{store-GLBBY4OZ.js → store-DGJKE4ZJ.js} +21 -19
- package/dist/bundle/store-maintenance-command-WIDKMZLK.js +74 -0
- package/dist/bundle/surface-LTEEEZU4.js +73 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +28 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -0
- package/dist/identity.js.map +1 -1
- package/dist/mail/send-as.d.ts +21 -0
- package/dist/mail/send-as.d.ts.map +1 -0
- package/dist/mail/send-as.js +66 -0
- package/dist/mail/send-as.js.map +1 -0
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +3 -1
- package/dist/mail/send.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/agent-OU4K7TKQ.js +0 -40
- package/dist/bundle/chunk-G4VJN75G.js +0 -806
- package/dist/bundle/chunk-OZKZT3ZI.js +0 -79
- package/dist/bundle/chunk-RRTMPSQR.js +0 -29
- package/dist/bundle/chunk-VYCB5EVI.js +0 -721
- package/dist/bundle/command-contract-UC6IGCCM.js +0 -39
- package/dist/bundle/first-screen-A7SEI2ON.js +0 -40
- package/dist/bundle/meeting-combined-KC6YGWA7.js +0 -24
- package/dist/bundle/server-VVRQ4A34.js +0 -86
- package/dist/bundle/store-maintenance-command-N7L5OVUE.js +0 -73
- package/dist/bundle/surface-26EUQNDT.js +0 -72
- /package/dist/bundle/{chunk-KXJ3JEDH.js → chunk-7ECP5ZQR.js} +0 -0
- /package/dist/bundle/{chunk-XXPJF2VD.js → chunk-TQDSBLQB.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FFER7KJI.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_ACTIONS,
|
|
14
14
|
ModerationRules,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
someUndone,
|
|
23
23
|
validateFormattedText,
|
|
24
24
|
visibleFormattedText
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VA6PHTMV.js";
|
|
26
26
|
import {
|
|
27
27
|
WIRECAT_TOOLS
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ISQ23VKV.js";
|
|
29
29
|
import {
|
|
30
30
|
isNewer,
|
|
31
31
|
updateCommand
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
queryTerms,
|
|
39
39
|
termField,
|
|
40
40
|
withQuery
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LB2CF3GG.js";
|
|
42
42
|
import {
|
|
43
43
|
hide,
|
|
44
44
|
isHidden
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-HUAHLO6N.js";
|
|
46
46
|
import {
|
|
47
47
|
EmptyAnswer,
|
|
48
48
|
MAX_MODEL_IMAGE_BYTES,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
range,
|
|
52
52
|
systemFor,
|
|
53
53
|
validateImages
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-5ICUC66S.js";
|
|
55
55
|
import {
|
|
56
56
|
anyOfTerms,
|
|
57
57
|
isFunctionWord,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
questionText,
|
|
63
63
|
resolveMeetingSelection,
|
|
64
64
|
words
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-SBLHQAH3.js";
|
|
66
66
|
import {
|
|
67
67
|
API_UNTRUSTED,
|
|
68
68
|
Command,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
sentIds,
|
|
105
105
|
tagging,
|
|
106
106
|
task
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-BA5B5ZF4.js";
|
|
108
108
|
import {
|
|
109
109
|
AUTHORITY_KEY,
|
|
110
110
|
CEILING_KEY,
|
|
@@ -117,11 +117,11 @@ import {
|
|
|
117
117
|
levelFor,
|
|
118
118
|
skipFlagFor,
|
|
119
119
|
stops
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-2HDXD6LM.js";
|
|
121
121
|
import {
|
|
122
122
|
providerErrorKey,
|
|
123
123
|
secretInput
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-NQFG7AES.js";
|
|
125
125
|
import {
|
|
126
126
|
CustomTextModelShape,
|
|
127
127
|
DEFAULT_RERANK_MODEL,
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
textModels,
|
|
136
136
|
vectorModelKey,
|
|
137
137
|
writeTextModelsSection
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-I4PZOWYG.js";
|
|
139
139
|
import {
|
|
140
140
|
AGENDA_COLUMNS,
|
|
141
141
|
BUSINESS_FIND_MAX,
|
|
@@ -145,15 +145,13 @@ import {
|
|
|
145
145
|
CONTEXT_MAX_READ_BYTES,
|
|
146
146
|
CONVERSATION_COLUMNS,
|
|
147
147
|
MAIL_AGENDA_COLUMNS,
|
|
148
|
-
MAX_FILE_BYTES,
|
|
149
148
|
MAX_TEXT_CHARS,
|
|
150
149
|
MENTION_QUERY,
|
|
151
150
|
NOT_FILES,
|
|
152
151
|
PRESET_VERSION,
|
|
153
|
-
STOP_WORDS,
|
|
154
152
|
TASK_RELATION_KINDS,
|
|
155
153
|
TRACKED_CHAT_COLUMNS,
|
|
156
|
-
|
|
154
|
+
asBytes,
|
|
157
155
|
attachmentColumns,
|
|
158
156
|
attachmentMaxBytes,
|
|
159
157
|
calendarKey,
|
|
@@ -167,7 +165,6 @@ import {
|
|
|
167
165
|
crmIdentityId,
|
|
168
166
|
cutChunks,
|
|
169
167
|
delayStats,
|
|
170
|
-
dueDayOf,
|
|
171
168
|
fetchedKey,
|
|
172
169
|
foldedWords,
|
|
173
170
|
googleDocumentLinks,
|
|
@@ -175,7 +172,6 @@ import {
|
|
|
175
172
|
hasText,
|
|
176
173
|
historyStartKey,
|
|
177
174
|
hitFiles,
|
|
178
|
-
inboxKey,
|
|
179
175
|
isStemmed,
|
|
180
176
|
matchDownloads,
|
|
181
177
|
messageOfEmail,
|
|
@@ -185,12 +181,13 @@ import {
|
|
|
185
181
|
profilesOn,
|
|
186
182
|
queryFilter,
|
|
187
183
|
rankingContextRange,
|
|
184
|
+
readWhole,
|
|
188
185
|
respelled,
|
|
186
|
+
sizeText,
|
|
189
187
|
threadConversation,
|
|
190
188
|
trackerBodyOf,
|
|
191
|
-
trackerTitleOf
|
|
192
|
-
|
|
193
|
-
} from "./chunk-Z4BLNAWI.js";
|
|
189
|
+
trackerTitleOf
|
|
190
|
+
} from "./chunk-VUHH4MQW.js";
|
|
194
191
|
import {
|
|
195
192
|
COUNTER_FIELDS,
|
|
196
193
|
RANKING_TOKENIZER_VERSION,
|
|
@@ -207,26 +204,26 @@ import {
|
|
|
207
204
|
pickPerson,
|
|
208
205
|
rankingOptions,
|
|
209
206
|
rankingQuestion
|
|
210
|
-
} from "./chunk-
|
|
211
|
-
import {
|
|
212
|
-
DEFAULT_STEMMERS,
|
|
213
|
-
createStemmer,
|
|
214
|
-
cutsDeep
|
|
215
|
-
} from "./chunk-UDSL3MUU.js";
|
|
207
|
+
} from "./chunk-ROUZN6UQ.js";
|
|
216
208
|
import {
|
|
217
209
|
MINUTE,
|
|
218
210
|
YEAR,
|
|
219
211
|
aheadOf
|
|
220
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-RHEDE7D4.js";
|
|
221
213
|
import {
|
|
222
214
|
FIELD_VERSION,
|
|
223
215
|
RRF_K,
|
|
216
|
+
STOP_WORDS,
|
|
217
|
+
amountsOf,
|
|
218
|
+
dueDayOf,
|
|
224
219
|
fuseRanked,
|
|
220
|
+
inboxKey,
|
|
225
221
|
isPresence,
|
|
226
222
|
plainQuery,
|
|
227
223
|
validateAst,
|
|
228
|
-
validateFields
|
|
229
|
-
|
|
224
|
+
validateFields,
|
|
225
|
+
withoutField
|
|
226
|
+
} from "./chunk-QETNCUWB.js";
|
|
230
227
|
import {
|
|
231
228
|
MESSAGE_PARSING,
|
|
232
229
|
QUERY_LIMITS,
|
|
@@ -236,17 +233,19 @@ import {
|
|
|
236
233
|
isQueryLimit,
|
|
237
234
|
outOfTime,
|
|
238
235
|
searchError
|
|
239
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-WA53OJ7V.js";
|
|
237
|
+
import {
|
|
238
|
+
DEFAULT_STEMMERS,
|
|
239
|
+
createStemmer,
|
|
240
|
+
cutsDeep
|
|
241
|
+
} from "./chunk-W3BOR6AT.js";
|
|
240
242
|
import {
|
|
241
243
|
fold,
|
|
242
244
|
normalize
|
|
243
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-HO4JGD4Q.js";
|
|
244
246
|
import {
|
|
245
247
|
LOG_ATTRIBUTES,
|
|
246
|
-
TASK_KINDS,
|
|
247
|
-
TASK_STATES,
|
|
248
248
|
accountsOfList,
|
|
249
|
-
createTaskService,
|
|
250
249
|
currentAttempt,
|
|
251
250
|
currentRun,
|
|
252
251
|
entriesOfList,
|
|
@@ -254,7 +253,6 @@ import {
|
|
|
254
253
|
fromLogAttributes,
|
|
255
254
|
inSource,
|
|
256
255
|
isAccountList,
|
|
257
|
-
isClosedState,
|
|
258
256
|
isGroupName,
|
|
259
257
|
keyOf,
|
|
260
258
|
listedHolds,
|
|
@@ -265,12 +263,26 @@ import {
|
|
|
265
263
|
sourceOf3 as sourceOf2,
|
|
266
264
|
typedCommand,
|
|
267
265
|
withAttempt
|
|
268
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-G5HG7ZWQ.js";
|
|
269
267
|
import {
|
|
270
268
|
CRM_KINDS,
|
|
271
269
|
DEAL_KINDS,
|
|
272
|
-
INTERNAL_NOTES,
|
|
273
270
|
STAGE_OUTCOMES,
|
|
271
|
+
isUsable,
|
|
272
|
+
normalCrmUserId
|
|
273
|
+
} from "./chunk-I4AWLFYH.js";
|
|
274
|
+
import {
|
|
275
|
+
isCliFailure,
|
|
276
|
+
sqliteCode
|
|
277
|
+
} from "./chunk-3TYER5IK.js";
|
|
278
|
+
import {
|
|
279
|
+
TASK_KINDS,
|
|
280
|
+
TASK_STATES,
|
|
281
|
+
createTaskService,
|
|
282
|
+
isClosedState
|
|
283
|
+
} from "./chunk-IDCZ4LWS.js";
|
|
284
|
+
import {
|
|
285
|
+
INTERNAL_NOTES,
|
|
274
286
|
UNKNOWN_PROVIDER,
|
|
275
287
|
alsoListedByKey,
|
|
276
288
|
formatLocator,
|
|
@@ -283,20 +295,12 @@ import {
|
|
|
283
295
|
isImportedProvider,
|
|
284
296
|
isKind,
|
|
285
297
|
isLocator,
|
|
286
|
-
isUsable,
|
|
287
298
|
kindIn,
|
|
288
|
-
|
|
299
|
+
normalizeTag,
|
|
289
300
|
parseLocator,
|
|
290
301
|
parseReference,
|
|
291
302
|
providerNamed
|
|
292
|
-
} from "./chunk-
|
|
293
|
-
import {
|
|
294
|
-
isCliFailure,
|
|
295
|
-
sqliteCode
|
|
296
|
-
} from "./chunk-JLXXUEAM.js";
|
|
297
|
-
import {
|
|
298
|
-
normalizeTag
|
|
299
|
-
} from "./chunk-RRTMPSQR.js";
|
|
303
|
+
} from "./chunk-OAO3JKQD.js";
|
|
300
304
|
import {
|
|
301
305
|
OPERATORS_BY_TYPE,
|
|
302
306
|
READ_BUDGET_EXCEEDED,
|
|
@@ -320,12 +324,12 @@ import {
|
|
|
320
324
|
validateQuery,
|
|
321
325
|
walkQuery,
|
|
322
326
|
windowOf
|
|
323
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-725OPCHI.js";
|
|
324
328
|
import {
|
|
325
329
|
localOnly,
|
|
326
330
|
refuseOffComputer,
|
|
327
331
|
remoteKey
|
|
328
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-24UGTK32.js";
|
|
329
333
|
import {
|
|
330
334
|
PLAIN_HTTP_REFUSED,
|
|
331
335
|
endpoint,
|
|
@@ -335,14 +339,14 @@ import {
|
|
|
335
339
|
providerWaitMs,
|
|
336
340
|
readJsonResponse,
|
|
337
341
|
statusToCode
|
|
338
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-ESNZL7SB.js";
|
|
339
343
|
import {
|
|
340
344
|
DEFAULT_TASK_CATEGORIES,
|
|
341
345
|
FALLBACK_CATEGORY,
|
|
342
346
|
readSharedSection,
|
|
343
347
|
sharedConfigPath,
|
|
344
348
|
writeSharedSection
|
|
345
|
-
} from "./chunk-
|
|
349
|
+
} from "./chunk-XGVMQMTS.js";
|
|
346
350
|
import {
|
|
347
351
|
Unzip,
|
|
348
352
|
UnzipInflate,
|
|
@@ -353,15 +357,15 @@ import {
|
|
|
353
357
|
placedText,
|
|
354
358
|
runEmbedders,
|
|
355
359
|
textModelsDirectory
|
|
356
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-EJQAP6A6.js";
|
|
357
361
|
import {
|
|
358
362
|
installFiles,
|
|
359
363
|
megabytes
|
|
360
|
-
} from "./chunk-
|
|
364
|
+
} from "./chunk-ZKVUAH5N.js";
|
|
361
365
|
import {
|
|
362
366
|
storePath,
|
|
363
367
|
wirecatDirectory
|
|
364
|
-
} from "./chunk-
|
|
368
|
+
} from "./chunk-2SQLHBDP.js";
|
|
365
369
|
import {
|
|
366
370
|
Credentials,
|
|
367
371
|
logRecordOf,
|
|
@@ -17025,10 +17029,10 @@ var require_lib3 = __commonJS({
|
|
|
17025
17029
|
}
|
|
17026
17030
|
});
|
|
17027
17031
|
|
|
17028
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17032
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17029
17033
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17030
17034
|
|
|
17031
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17035
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
17032
17036
|
var RULES_VERSION = 6;
|
|
17033
17037
|
var LOOK_BACK = 50;
|
|
17034
17038
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17126,7 +17130,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
17126
17130
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17127
17131
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind2, confidence, method) => ({ messageId: message.id, parentId, source, kind: kind2, confidence, method }), "link");
|
|
17128
17132
|
|
|
17129
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17133
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
17130
17134
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
17131
17135
|
import { open, stat } from "node:fs/promises";
|
|
17132
17136
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17342,10 +17346,10 @@ var readStickerFile = /* @__PURE__ */ __name(async (path2, maxBytes, read) => {
|
|
|
17342
17346
|
return { name, source };
|
|
17343
17347
|
}, "readStickerFile");
|
|
17344
17348
|
|
|
17345
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17349
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17346
17350
|
import { randomUUID } from "node:crypto";
|
|
17347
17351
|
|
|
17348
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17352
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
17349
17353
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
17350
17354
|
import { dirname as dirname2, join } from "node:path";
|
|
17351
17355
|
var MOST_DEADLINES = 50;
|
|
@@ -17429,11 +17433,11 @@ var FloodMemory = class {
|
|
|
17429
17433
|
}
|
|
17430
17434
|
};
|
|
17431
17435
|
|
|
17432
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17436
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17433
17437
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
17434
17438
|
import { dirname as dirname4, join as join2 } from "node:path";
|
|
17435
17439
|
|
|
17436
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17440
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
17437
17441
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
17438
17442
|
import { dirname as dirname3 } from "node:path";
|
|
17439
17443
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -17500,7 +17504,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
17500
17504
|
}
|
|
17501
17505
|
}, "lockTime");
|
|
17502
17506
|
|
|
17503
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17507
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17504
17508
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
17505
17509
|
var SendJournal = class {
|
|
17506
17510
|
static {
|
|
@@ -17577,7 +17581,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
17577
17581
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
17578
17582
|
}, "withSendId");
|
|
17579
17583
|
|
|
17580
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17584
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
17581
17585
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
17582
17586
|
import { join as join3 } from "node:path";
|
|
17583
17587
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -17689,7 +17693,7 @@ var RecipientList = class {
|
|
|
17689
17693
|
}
|
|
17690
17694
|
};
|
|
17691
17695
|
|
|
17692
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17696
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17693
17697
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
17694
17698
|
var countsTowardLimit = /* @__PURE__ */ __name(({ kind: kind2 = "message", action, notify }) => kind2 === "message" || kind2 === "forward" || kind2 === "edit" || kind2 === "delete" || kind2 === "pin" && notify === true || action === "create" || action === "members.add" || action === "requests.accept" || action === "join" || action === "contact-import", "countsTowardLimit");
|
|
17695
17699
|
var weightOf = /* @__PURE__ */ __name(({ kind: kind2 = "message", action, count: count3, people }) => kind2 === "delete" || kind2 === "message" && action === void 0 ? Math.max(1, count3 ?? 1) : action === "create" || action === "members.add" || action === "requests.accept" || action === "contact-import" ? Math.max(1, people ?? count3 ?? 1) : 1, "weightOf");
|
|
@@ -17877,7 +17881,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
17877
17881
|
}), "guardFor");
|
|
17878
17882
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
17879
17883
|
|
|
17880
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17884
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
17881
17885
|
import { openSync as openSync2 } from "node:fs";
|
|
17882
17886
|
import { createInterface } from "node:readline";
|
|
17883
17887
|
import { ReadStream } from "node:tty";
|
|
@@ -17932,7 +17936,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
17932
17936
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
17933
17937
|
}, "terminalAsker");
|
|
17934
17938
|
|
|
17935
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17939
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17936
17940
|
var COMMAND_NEEDS = {
|
|
17937
17941
|
"account update": ["updateProfile", "change the profile"],
|
|
17938
17942
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17997,7 +18001,23 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17997
18001
|
return group;
|
|
17998
18002
|
}, "hideNever");
|
|
17999
18003
|
|
|
18000
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18004
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
18005
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
18006
|
+
const controller = new AbortController();
|
|
18007
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
18008
|
+
timer.unref();
|
|
18009
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
18010
|
+
}, "timeLimit");
|
|
18011
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
18012
|
+
const limit = timeLimit(ms);
|
|
18013
|
+
try {
|
|
18014
|
+
return await run2(limit.signal);
|
|
18015
|
+
} finally {
|
|
18016
|
+
limit.clear();
|
|
18017
|
+
}
|
|
18018
|
+
}, "withTimeLimit");
|
|
18019
|
+
|
|
18020
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18001
18021
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18002
18022
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18003
18023
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18059,12 +18079,12 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18059
18079
|
}), "storedDeps");
|
|
18060
18080
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18061
18081
|
|
|
18062
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18082
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18063
18083
|
import { randomBytes } from "node:crypto";
|
|
18064
18084
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18065
18085
|
var newOperationId = newSendId;
|
|
18066
18086
|
|
|
18067
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18087
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
18068
18088
|
var LINKS = /https?:\/\/\S+/g;
|
|
18069
18089
|
var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before).map(({ question }) => question), "unanswered");
|
|
18070
18090
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -18094,7 +18114,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
18094
18114
|
});
|
|
18095
18115
|
}, "questions");
|
|
18096
18116
|
|
|
18097
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18117
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
18098
18118
|
var AUDIT_PAGE = 200;
|
|
18099
18119
|
var AUDIT_BUDGET = 10;
|
|
18100
18120
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -18174,7 +18194,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
18174
18194
|
return found;
|
|
18175
18195
|
}, "burstJoins");
|
|
18176
18196
|
|
|
18177
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18197
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
18178
18198
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
18179
18199
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
18180
18200
|
const name = typed.trim().toLowerCase();
|
|
@@ -18231,7 +18251,7 @@ var categorize = /* @__PURE__ */ __name((text3, categories = DEFAULT_TASK_CATEGO
|
|
|
18231
18251
|
return best.name;
|
|
18232
18252
|
}, "categorize");
|
|
18233
18253
|
|
|
18234
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18254
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
18235
18255
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
18236
18256
|
var RULES_IN = {
|
|
18237
18257
|
dialog: "all",
|
|
@@ -18437,7 +18457,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18437
18457
|
return passes;
|
|
18438
18458
|
}, "applyTaskRulesToChats");
|
|
18439
18459
|
|
|
18440
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18460
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18441
18461
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18442
18462
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18443
18463
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18460,19 +18480,19 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18460
18480
|
}
|
|
18461
18481
|
}, "patiently");
|
|
18462
18482
|
|
|
18463
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18483
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18464
18484
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18465
18485
|
|
|
18466
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18486
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18467
18487
|
var REQUEST_MS = 400;
|
|
18468
|
-
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18488
|
+
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest: newest2, page, maxPages, pauseMs }) => {
|
|
18469
18489
|
const lowest = ranges[0];
|
|
18470
18490
|
const top = ranges.at(-1);
|
|
18471
18491
|
if (!lowest || !top)
|
|
18472
18492
|
return { held, ranges, missing: null, requests: null, runs: null, seconds: null };
|
|
18473
18493
|
const covered = ranges.reduce((sum2, range2) => sum2 + range2.to - range2.from + 1, 0);
|
|
18474
18494
|
const between = ranges.slice(1).reduce((sum2, range2, index) => sum2 + range2.from - (ranges[index]?.to ?? 0) - 1, 0);
|
|
18475
|
-
const gapIds = lowest.from - 1 + between + Math.max(0, (
|
|
18495
|
+
const gapIds = lowest.from - 1 + between + Math.max(0, (newest2 ?? top.to) - top.to);
|
|
18476
18496
|
const inRanges = Math.min(held, covered);
|
|
18477
18497
|
const missing4 = gapIds === 0 ? 0 : Math.round(inRanges / covered * gapIds);
|
|
18478
18498
|
const requests = missing4 === 0 ? 0 : Math.ceil(missing4 / page) + ranges.length;
|
|
@@ -18486,13 +18506,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18486
18506
|
};
|
|
18487
18507
|
}, "estimateBackfill");
|
|
18488
18508
|
|
|
18489
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18509
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18490
18510
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18491
18511
|
...error,
|
|
18492
18512
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18493
18513
|
}), "withRecovery");
|
|
18494
18514
|
|
|
18495
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18515
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18496
18516
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18497
18517
|
if (isCliFailure(error))
|
|
18498
18518
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18575,7 +18595,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18575
18595
|
};
|
|
18576
18596
|
}, "mergeBatches");
|
|
18577
18597
|
|
|
18578
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18598
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/groups.js
|
|
18579
18599
|
var ALL = "all";
|
|
18580
18600
|
var OWNER_NOTES = { provider: "notes", account: INTERNAL_NOTES };
|
|
18581
18601
|
var NOT_GROUP_NAMES = /* @__PURE__ */ new Set([ALL, "bots"]);
|
|
@@ -18647,7 +18667,7 @@ var groupEntries = /* @__PURE__ */ __name((saved) => ({
|
|
|
18647
18667
|
[ALL]: [ALL]
|
|
18648
18668
|
}), "groupEntries");
|
|
18649
18669
|
|
|
18650
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18670
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
18651
18671
|
var NO_MAIL = "no_mail";
|
|
18652
18672
|
var MAIL = "email";
|
|
18653
18673
|
var groupLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
@@ -18721,7 +18741,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind2, chosen, held, explicit, comm
|
|
|
18721
18741
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
18722
18742
|
}, "accountsOfKind");
|
|
18723
18743
|
|
|
18724
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18744
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18725
18745
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18726
18746
|
if (deps.reads !== "store")
|
|
18727
18747
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18922,7 +18942,7 @@ var chatsMatchingIn = /* @__PURE__ */ __name(async (store, accounts, pattern) =>
|
|
|
18922
18942
|
}, "chatsMatchingIn");
|
|
18923
18943
|
var isText = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "", "isText");
|
|
18924
18944
|
|
|
18925
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18945
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18926
18946
|
var CONTEXT_MESSAGES = 3;
|
|
18927
18947
|
var CONTEXT_MINUTES = 10;
|
|
18928
18948
|
var MAX_CHARS = 1200;
|
|
@@ -18946,12 +18966,12 @@ var context = {
|
|
|
18946
18966
|
}, "describe")
|
|
18947
18967
|
};
|
|
18948
18968
|
|
|
18949
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18969
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18950
18970
|
var BUILT_INS = [context];
|
|
18951
18971
|
var providers = [...BUILT_INS];
|
|
18952
18972
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18953
18973
|
|
|
18954
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18974
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18955
18975
|
var READ_PAGE = 5e3;
|
|
18956
18976
|
var CHAIN = 50;
|
|
18957
18977
|
var CONVERSATION_QUERY = {
|
|
@@ -19103,7 +19123,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
19103
19123
|
return size2;
|
|
19104
19124
|
}, "sized");
|
|
19105
19125
|
|
|
19106
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19126
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
19107
19127
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
19108
19128
|
var MESSAGE_PAGE = 5e3;
|
|
19109
19129
|
var PER_SESSION = 8;
|
|
@@ -19122,7 +19142,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19122
19142
|
price: remote.price,
|
|
19123
19143
|
installed: true,
|
|
19124
19144
|
perBatch: PER_REQUEST * concurrency,
|
|
19125
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
19145
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-QOTHNO2M.js")).openRemote(remote, apiKey, {
|
|
19126
19146
|
concurrency,
|
|
19127
19147
|
env: deps.env ?? process.env
|
|
19128
19148
|
}), "open")
|
|
@@ -19142,7 +19162,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19142
19162
|
if (!isTextModelInstalled(model, directory2))
|
|
19143
19163
|
throw notDownloaded(model.id);
|
|
19144
19164
|
if (apart) {
|
|
19145
|
-
const { openProcess } = await import("./process-
|
|
19165
|
+
const { openProcess } = await import("./process-AFIXYXWL.js");
|
|
19146
19166
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
19147
19167
|
}
|
|
19148
19168
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19431,7 +19451,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19431
19451
|
return { ...one, state };
|
|
19432
19452
|
}, "shaped");
|
|
19433
19453
|
|
|
19434
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19454
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19435
19455
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19436
19456
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options2) => {
|
|
19437
19457
|
for (const [key, value, maximum] of [
|
|
@@ -19484,7 +19504,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options2, signal,
|
|
|
19484
19504
|
}
|
|
19485
19505
|
}, "catchUpSearch");
|
|
19486
19506
|
|
|
19487
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19507
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19488
19508
|
var pushed = /* @__PURE__ */ __name((deps, what2) => {
|
|
19489
19509
|
if (deps.reads === "store") {
|
|
19490
19510
|
throw new CliError("validation_error", `${what2} asks for older history, and this messenger pushes its history instead \u2014 keep \`${typedCommand(deps.messenger.app.command, "serve")}\` running`);
|
|
@@ -19549,13 +19569,13 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
19549
19569
|
throw new CliError("validation_error", "--dry-run counts the message ids missing between what is held; this messenger's ids do not count messages");
|
|
19550
19570
|
}
|
|
19551
19571
|
const { store, account, chatId } = await found(chat);
|
|
19552
|
-
const
|
|
19572
|
+
const newest2 = Number((await store.messages.messages(account, chatId, { limit: 1 })).items[0]?.id);
|
|
19553
19573
|
return {
|
|
19554
19574
|
chat: chatId,
|
|
19555
19575
|
...estimateBackfill({
|
|
19556
19576
|
ranges: await store.sync.ranges(account, chatId),
|
|
19557
19577
|
held: (await store.chats.chatStats(account, chatId))[0]?.messages ?? 0,
|
|
19558
|
-
newest: Number.isSafeInteger(
|
|
19578
|
+
newest: Number.isSafeInteger(newest2) ? newest2 : void 0,
|
|
19559
19579
|
page: pageSize,
|
|
19560
19580
|
maxPages: Math.ceil(limit / pageSize),
|
|
19561
19581
|
pauseMs
|
|
@@ -19589,15 +19609,22 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
19589
19609
|
return { chat: limit.chatId ?? null, fetched: 0, complete: false, ranges: [], limited: "group_too_large" };
|
|
19590
19610
|
}
|
|
19591
19611
|
const windowed = limit?.keepFrom !== void 0 && !(limit.keepFrom <= (options2.sinceMs ?? Number.NEGATIVE_INFINITY));
|
|
19612
|
+
const roots = /* @__PURE__ */ new Map();
|
|
19613
|
+
const startedAt = Date.now();
|
|
19592
19614
|
const fetched = await fetchInto({
|
|
19593
|
-
history: /* @__PURE__ */ __name((window2) =>
|
|
19615
|
+
history: /* @__PURE__ */ __name(async (window2) => {
|
|
19616
|
+
const page = await history(chat, { ...window2, reactions: false });
|
|
19617
|
+
if (refreshes(connection) && !options2.window && page.items[0])
|
|
19618
|
+
pagedRoots(roots, await connection.threadRootsIn(page.items[0].chatId, page.items), window2.before);
|
|
19619
|
+
return page;
|
|
19620
|
+
}, "history"),
|
|
19594
19621
|
store,
|
|
19595
19622
|
account,
|
|
19596
19623
|
fetching: deps.messenger.fetching ?? FETCHING,
|
|
19597
19624
|
...options2,
|
|
19598
19625
|
...windowed ? { sinceMs: limit.keepFrom } : {}
|
|
19599
19626
|
});
|
|
19600
|
-
const replies = fetched.chat && !options2.window ? await savedReplies(connection, store, account, fetched.chat, options2.stop) : 0;
|
|
19627
|
+
const replies = fetched.chat && !options2.window ? await savedReplies(connection, store, account, fetched.chat, { roots, startedAt }, options2.stop) : 0;
|
|
19601
19628
|
const read = replies > 0 ? { ...fetched, fetched: fetched.fetched + replies } : fetched;
|
|
19602
19629
|
const result = windowed && read.reachedSince ? { ...read, limited: "older_than_window" } : read;
|
|
19603
19630
|
if (result.limited && limit?.keepFrom !== void 0)
|
|
@@ -19633,7 +19660,7 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
19633
19660
|
const upToDate = heldToNewest(await deps.store(), await deps.account(), deps.messenger.fetching ?? FETCHING, {
|
|
19634
19661
|
...options2,
|
|
19635
19662
|
catchUp: catchingUp ? options2.catchUp ?? {} : false,
|
|
19636
|
-
threads: connection.threadReplies !== void 0
|
|
19663
|
+
threads: connection.threadReplies !== void 0 || refreshes(connection)
|
|
19637
19664
|
});
|
|
19638
19665
|
const finished = /* @__PURE__ */ __name(() => options2.onChat?.({ chats: chats.length, done: answer.items.length, fetched: answer.fetched }), "finished");
|
|
19639
19666
|
finished();
|
|
@@ -19846,12 +19873,12 @@ var heldToNewest = /* @__PURE__ */ __name((store, account, fetching, options2) =
|
|
|
19846
19873
|
const lastAt = Date.parse(chat.lastMessageAt ?? "");
|
|
19847
19874
|
if (Number.isNaN(lastAt))
|
|
19848
19875
|
return false;
|
|
19849
|
-
const [
|
|
19850
|
-
if (!
|
|
19876
|
+
const [newest2] = (await store.messages.messages(account, chat.id, { limit: 1 }).catch(() => ({ items: [] }))).items;
|
|
19877
|
+
if (!newest2 || Date.parse(newest2.timestamp) < lastAt)
|
|
19851
19878
|
return false;
|
|
19852
19879
|
const ranges = await store.sync.ranges(account, chat.id);
|
|
19853
19880
|
const top = ranges.reduce((best, range2) => best && best.to >= range2.to ? best : range2, void 0);
|
|
19854
|
-
const key = keyOf2(fetching)(
|
|
19881
|
+
const key = keyOf2(fetching)(newest2);
|
|
19855
19882
|
if (!top || key > top.to || key < top.from)
|
|
19856
19883
|
return false;
|
|
19857
19884
|
if (ranges.length === 1 && await store.sync.syncState(account, historyStartKey(chat.id)) !== void 0)
|
|
@@ -19862,13 +19889,20 @@ var heldToNewest = /* @__PURE__ */ __name((store, account, fetching, options2) =
|
|
|
19862
19889
|
return !Number.isNaN(startedAt) && startedAt < options2.sinceMs;
|
|
19863
19890
|
}, "heldToNewest");
|
|
19864
19891
|
var threadsKey = /* @__PURE__ */ __name((chatId) => `threads:${chatId}`, "threadsKey");
|
|
19865
|
-
var
|
|
19866
|
-
|
|
19892
|
+
var refreshes = /* @__PURE__ */ __name((connection) => connection.threadRootsIn !== void 0 && connection.recentThreadRoots !== void 0 && connection.rootReplies !== void 0, "refreshes");
|
|
19893
|
+
var pagedRoots = /* @__PURE__ */ __name((into, roots, before) => {
|
|
19894
|
+
for (const root of roots)
|
|
19895
|
+
into.set(root.id, { ...root, whole: before !== void 0 || into.get(root.id)?.whole === true });
|
|
19896
|
+
}, "pagedRoots");
|
|
19897
|
+
var THREAD_CLOCK_SKEW_MS = 6e4;
|
|
19898
|
+
var savedReplies = /* @__PURE__ */ __name(async (connection, store, account, chatId, { roots, startedAt }, stop) => {
|
|
19899
|
+
if (stop.aborted)
|
|
19900
|
+
return 0;
|
|
19901
|
+
const stored = Number((await store.sync.syncState(account, threadsKey(chatId)))?.value);
|
|
19902
|
+
const point = Number.isFinite(stored) ? stored : void 0;
|
|
19903
|
+
const batches = refreshes(connection) ? refreshedThreads(connection, chatId, roots, point, stop) : connection.threadReplies ? await readyBatches(connection.threadReplies(chatId, point === void 0 ? {} : { since: point })) : void 0;
|
|
19904
|
+
if (!batches)
|
|
19867
19905
|
return 0;
|
|
19868
|
-
const startedAt = Date.now();
|
|
19869
|
-
const point = Number((await store.sync.syncState(account, threadsKey(chatId)))?.value);
|
|
19870
|
-
const answer = await connection.threadReplies(chatId, Number.isFinite(point) ? { since: point } : {});
|
|
19871
|
-
const batches = Symbol.asyncIterator in answer ? answer : [answer];
|
|
19872
19906
|
let saved = 0;
|
|
19873
19907
|
for await (const replies of batches) {
|
|
19874
19908
|
if (replies.length > 0)
|
|
@@ -19880,6 +19914,32 @@ var savedReplies = /* @__PURE__ */ __name(async (connection, store, account, cha
|
|
|
19880
19914
|
await store.sync.setSyncState(account, threadsKey(chatId), String(startedAt));
|
|
19881
19915
|
return saved;
|
|
19882
19916
|
}, "savedReplies");
|
|
19917
|
+
var readyBatches = /* @__PURE__ */ __name(async (answer) => {
|
|
19918
|
+
const ready = await answer;
|
|
19919
|
+
return Symbol.asyncIterator in ready ? ready : [ready];
|
|
19920
|
+
}, "readyBatches");
|
|
19921
|
+
async function* refreshedThreads(connection, chatId, roots, point, stop) {
|
|
19922
|
+
const after = point === void 0 ? void 0 : point - THREAD_CLOCK_SKEW_MS;
|
|
19923
|
+
const all = new Map(roots);
|
|
19924
|
+
for (const root of await connection.recentThreadRoots(chatId)) {
|
|
19925
|
+
const paged = all.get(root.id);
|
|
19926
|
+
all.set(root.id, {
|
|
19927
|
+
...root,
|
|
19928
|
+
lastReplyAt: newest(paged?.lastReplyAt, root.lastReplyAt),
|
|
19929
|
+
whole: paged?.whole ?? false
|
|
19930
|
+
});
|
|
19931
|
+
}
|
|
19932
|
+
for (const root of all.values()) {
|
|
19933
|
+
if (stop.aborted)
|
|
19934
|
+
return;
|
|
19935
|
+
const replied = Date.parse(root.lastReplyAt ?? "");
|
|
19936
|
+
if (after !== void 0 && !root.whole && !(replied > after))
|
|
19937
|
+
continue;
|
|
19938
|
+
yield* await readyBatches(connection.rootReplies(chatId, root.id, after === void 0 || root.whole ? {} : { after }));
|
|
19939
|
+
}
|
|
19940
|
+
}
|
|
19941
|
+
__name(refreshedThreads, "refreshedThreads");
|
|
19942
|
+
var newest = /* @__PURE__ */ __name((one, other) => one === void 0 || other !== void 0 && Date.parse(other) > Date.parse(one) ? other : one, "newest");
|
|
19883
19943
|
var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTime, fallback) => {
|
|
19884
19944
|
if (byTime)
|
|
19885
19945
|
return new Date(key).toISOString();
|
|
@@ -19887,7 +19947,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19887
19947
|
return message?.timestamp ?? fallback;
|
|
19888
19948
|
}, "timeOfKey");
|
|
19889
19949
|
|
|
19890
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19950
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19891
19951
|
var DAY_MS = 864e5;
|
|
19892
19952
|
var NEW_DAYS = 30;
|
|
19893
19953
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19964,23 +20024,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19964
20024
|
};
|
|
19965
20025
|
}, "scorePerson");
|
|
19966
20026
|
|
|
19967
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19968
|
-
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
19969
|
-
const controller = new AbortController();
|
|
19970
|
-
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
19971
|
-
timer.unref();
|
|
19972
|
-
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
19973
|
-
}, "timeLimit");
|
|
19974
|
-
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
19975
|
-
const limit = timeLimit(ms);
|
|
19976
|
-
try {
|
|
19977
|
-
return await run2(limit.signal);
|
|
19978
|
-
} finally {
|
|
19979
|
-
limit.clear();
|
|
19980
|
-
}
|
|
19981
|
-
}, "withTimeLimit");
|
|
19982
|
-
|
|
19983
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20027
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19984
20028
|
var REGISTRIES = {
|
|
19985
20029
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19986
20030
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20067,7 +20111,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20067
20111
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20068
20112
|
})), "notCovered");
|
|
20069
20113
|
|
|
20070
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20114
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20071
20115
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20072
20116
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20073
20117
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20155,7 +20199,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20155
20199
|
};
|
|
20156
20200
|
}, "botCheckService");
|
|
20157
20201
|
|
|
20158
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20202
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20159
20203
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20160
20204
|
if (value === void 0)
|
|
20161
20205
|
return void 0;
|
|
@@ -20165,7 +20209,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20165
20209
|
return id3;
|
|
20166
20210
|
}, "threadIdOf");
|
|
20167
20211
|
|
|
20168
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20212
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20169
20213
|
var TOP_POSTS = 5;
|
|
20170
20214
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20171
20215
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20282,7 +20326,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20282
20326
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20283
20327
|
}, "median");
|
|
20284
20328
|
|
|
20285
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20329
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20286
20330
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20287
20331
|
const events = [];
|
|
20288
20332
|
for (const stay of stays) {
|
|
@@ -20314,7 +20358,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20314
20358
|
return events.filter(({ at: at2 }) => Date.parse(at2) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20315
20359
|
}, "memberEvents");
|
|
20316
20360
|
|
|
20317
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20361
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20318
20362
|
var EVENTS_DAYS = 7;
|
|
20319
20363
|
var TRACKED_DAYS = 30;
|
|
20320
20364
|
var STATS_PAGE = 1e3;
|
|
@@ -20550,8 +20594,8 @@ var readInStore = /* @__PURE__ */ __name(async (deps, chatId, kind2, until) => {
|
|
|
20550
20594
|
const store = await accountStoreIfOpen(deps);
|
|
20551
20595
|
if (!store)
|
|
20552
20596
|
return;
|
|
20553
|
-
const [
|
|
20554
|
-
if (
|
|
20597
|
+
const [newest2] = (await store.messages.messages(chatId, { limit: 1, outgoing: false })).items;
|
|
20598
|
+
if (newest2 !== void 0 && (until === void 0 || newest2.id === until))
|
|
20555
20599
|
await unlessBusy(() => store.chats.saveChats([{ id: chatId, kind: kind2, unreadCount: 0, markedUnread: false }]));
|
|
20556
20600
|
}, "readInStore");
|
|
20557
20601
|
var storedFacts = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
@@ -20609,7 +20653,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20609
20653
|
return members.length === 0 ? null : members;
|
|
20610
20654
|
}, "storedMembers");
|
|
20611
20655
|
|
|
20612
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20656
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20613
20657
|
var INBOX_CHATS = 20;
|
|
20614
20658
|
var REVIEW_DAYS = 3;
|
|
20615
20659
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20621,9 +20665,9 @@ var everyChat = /* @__PURE__ */ __name((adapter) => adapter.unreadChats ? adapte
|
|
|
20621
20665
|
var leftOf = /* @__PURE__ */ __name((page) => page.left?.length ? { left: page.left } : {}, "leftOf");
|
|
20622
20666
|
var storeReader = /* @__PURE__ */ __name((deps, store, account) => ({
|
|
20623
20667
|
chats: /* @__PURE__ */ __name(async ({ limit, offset }) => {
|
|
20624
|
-
const
|
|
20668
|
+
const newest2 = new Map((await store.chats.chatStats(account)).map((one) => [one.chatId, one.newestAt]));
|
|
20625
20669
|
const all = byRecency((await store.chats.chats(account, {})).items.map((chat) => {
|
|
20626
|
-
const at2 =
|
|
20670
|
+
const at2 = newest2.get(chat.id) ?? null;
|
|
20627
20671
|
const later = at2 !== null && (chat.lastMessageAt === null || Date.parse(at2) > Date.parse(chat.lastMessageAt));
|
|
20628
20672
|
return later ? { ...chat, lastMessageAt: at2 } : chat;
|
|
20629
20673
|
}));
|
|
@@ -20660,9 +20704,9 @@ var unreadIn = /* @__PURE__ */ __name(async (adapter, { limit, all = false, kind
|
|
|
20660
20704
|
for (const { id: id3, title, kind: kind2, unreadCount } of read) {
|
|
20661
20705
|
const count3 = unreadCount ?? 0;
|
|
20662
20706
|
if (count3 === 0) {
|
|
20663
|
-
const
|
|
20664
|
-
if (
|
|
20665
|
-
chats.push({ id: id3, title, kind: kind2, unreadCount, messages: [
|
|
20707
|
+
const newest2 = (await adapter.history(id3, { limit })).items.findLast((message) => !message.outgoing);
|
|
20708
|
+
if (newest2)
|
|
20709
|
+
chats.push({ id: id3, title, kind: kind2, unreadCount, messages: [newest2], more: false });
|
|
20666
20710
|
continue;
|
|
20667
20711
|
}
|
|
20668
20712
|
const wanted = Math.min(count3, limit);
|
|
@@ -20821,7 +20865,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20821
20865
|
};
|
|
20822
20866
|
}, "inboxService");
|
|
20823
20867
|
|
|
20824
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20868
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/bot/api-input.js
|
|
20825
20869
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
20826
20870
|
|
|
20827
20871
|
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/names.js
|
|
@@ -21590,7 +21634,7 @@ function resolveSpace(space) {
|
|
|
21590
21634
|
}
|
|
21591
21635
|
__name(resolveSpace, "resolveSpace");
|
|
21592
21636
|
|
|
21593
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21637
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/bot/api-input.js
|
|
21594
21638
|
var RENAMED = { timeout: "poll-timeout" };
|
|
21595
21639
|
var apiFlagOf = /* @__PURE__ */ __name((name) => RENAMED[name] ?? name.replace(/_/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), "apiFlagOf");
|
|
21596
21640
|
var apiOptionKey = /* @__PURE__ */ __name((name) => apiFlagOf(name).replace(/-([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "apiOptionKey");
|
|
@@ -21729,7 +21773,7 @@ var flagValue = /* @__PURE__ */ __name((operation, name, raw, type) => {
|
|
|
21729
21773
|
return raw;
|
|
21730
21774
|
}, "flagValue");
|
|
21731
21775
|
|
|
21732
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21776
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/service-api-manifest.js
|
|
21733
21777
|
var manifestBaseUrl = /* @__PURE__ */ __name((manifest, given, variables = {}) => {
|
|
21734
21778
|
const server = manifest.servers?.[0];
|
|
21735
21779
|
if (given === void 0 && !server)
|
|
@@ -21749,6 +21793,17 @@ var manifestBaseUrl = /* @__PURE__ */ __name((manifest, given, variables = {}) =
|
|
|
21749
21793
|
throw new CliError("configuration_error", `the api's server ${url} is not a URL without a user name`);
|
|
21750
21794
|
return url;
|
|
21751
21795
|
}, "manifestBaseUrl");
|
|
21796
|
+
var siteValue = /* @__PURE__ */ __name((raw) => {
|
|
21797
|
+
const text3 = raw.trim().replace(/^https:\/\//i, "").replace(/\/+$/, "");
|
|
21798
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(text3))
|
|
21799
|
+
throw new CliError("validation_error", `--site takes an https address or a host, not ${JSON.stringify(raw)}`);
|
|
21800
|
+
const [host = "", ...path2] = serverValue("site", text3, "validation_error").split("/");
|
|
21801
|
+
const site = [host.toLowerCase(), ...path2].join("/");
|
|
21802
|
+
const url = URL.canParse(`https://${site}`) ? new URL(`https://${site}`) : void 0;
|
|
21803
|
+
if (!url || url.host !== site.split("/")[0] || url.pathname.replace(/\/$/, "") !== site.slice(site.split("/")[0]?.length))
|
|
21804
|
+
throw new CliError("validation_error", `--site ${JSON.stringify(raw)} is not a plain https address`);
|
|
21805
|
+
return site;
|
|
21806
|
+
}, "siteValue");
|
|
21752
21807
|
var wholeHost = /* @__PURE__ */ __name((server, name) => server.url === `https://{${name}}` || server.url.startsWith(`https://{${name}}/`), "wholeHost");
|
|
21753
21808
|
var labelValue = /* @__PURE__ */ __name((name, value) => {
|
|
21754
21809
|
if (!/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(value))
|
|
@@ -21846,7 +21901,7 @@ var nextPage = /* @__PURE__ */ __name((pagination, input, answer, headers) => {
|
|
|
21846
21901
|
}
|
|
21847
21902
|
}, "nextPage");
|
|
21848
21903
|
|
|
21849
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21904
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/bot/api.js
|
|
21850
21905
|
var apiPathOf = /* @__PURE__ */ __name((operation) => {
|
|
21851
21906
|
const { command, group } = operation;
|
|
21852
21907
|
if (!group)
|
|
@@ -21964,7 +22019,7 @@ var generatedApiCommand = /* @__PURE__ */ __name((api) => {
|
|
|
21964
22019
|
return group;
|
|
21965
22020
|
}, "generatedApiCommand");
|
|
21966
22021
|
|
|
21967
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22022
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/command-runs.js
|
|
21968
22023
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
21969
22024
|
var parses = new AsyncLocalStorage();
|
|
21970
22025
|
var providerEvent = /* @__PURE__ */ __name((event2) => {
|
|
@@ -21997,7 +22052,7 @@ var providerRequest = /* @__PURE__ */ __name((operation, sink = providerEvent, c
|
|
|
21997
22052
|
};
|
|
21998
22053
|
}, "providerRequest");
|
|
21999
22054
|
|
|
22000
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22055
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/bot/api-http.js
|
|
22001
22056
|
var LARGEST_ANSWER = 16 * 1024 * 1024;
|
|
22002
22057
|
var segment = /* @__PURE__ */ __name((name, value) => {
|
|
22003
22058
|
if (value === void 0 || value === "" || value === "." || value === "..")
|
|
@@ -22215,7 +22270,7 @@ var refusal = /* @__PURE__ */ __name((service, operation, response, writes, inne
|
|
|
22215
22270
|
});
|
|
22216
22271
|
}, "refusal");
|
|
22217
22272
|
|
|
22218
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22273
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
22219
22274
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
22220
22275
|
"help",
|
|
22221
22276
|
"guide",
|
|
@@ -22303,7 +22358,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
22303
22358
|
throw new CliError("validation_error", `--permission ${key} names no command${now === void 0 ? "" : `: its command moved, so use ${now}`}`, { permission: key });
|
|
22304
22359
|
}, "refuseUnknownPermissionKeys");
|
|
22305
22360
|
|
|
22306
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22361
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/keyed-guard.js
|
|
22307
22362
|
var keyedGuard = /* @__PURE__ */ __name((build, ask2, levelOf, extra) => {
|
|
22308
22363
|
let question;
|
|
22309
22364
|
let answered = false;
|
|
@@ -22346,7 +22401,7 @@ var keyedGuard = /* @__PURE__ */ __name((build, ask2, levelOf, extra) => {
|
|
|
22346
22401
|
};
|
|
22347
22402
|
}, "keyedGuard");
|
|
22348
22403
|
|
|
22349
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22404
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/service-api.js
|
|
22350
22405
|
var serviceApiOperations = /* @__PURE__ */ __name((manifest) => {
|
|
22351
22406
|
const reasonOf2 = /* @__PURE__ */ __name((operation) => operation.response?.sensitive ? "it returns a credential, which is never printed" : unsendableBody(operation), "reasonOf");
|
|
22352
22407
|
return {
|
|
@@ -22649,10 +22704,10 @@ var serviceApiCommand = /* @__PURE__ */ __name((options2) => {
|
|
|
22649
22704
|
return group;
|
|
22650
22705
|
}, "serviceApiCommand");
|
|
22651
22706
|
|
|
22652
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22707
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/service-api-call.js
|
|
22653
22708
|
var NO_COMMAND = new Command("source");
|
|
22654
22709
|
|
|
22655
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22710
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
22656
22711
|
import { readFileSync as readFileSync5, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
22657
22712
|
import { join as join4 } from "node:path";
|
|
22658
22713
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -22747,7 +22802,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options2) => {
|
|
|
22747
22802
|
await (options2.sleep ?? ((ms) => new Promise((resolve7) => setTimeout(resolve7, ms))))(waitMs);
|
|
22748
22803
|
}, "waitForTurn");
|
|
22749
22804
|
|
|
22750
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22805
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
22751
22806
|
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");
|
|
22752
22807
|
var excerpt = /* @__PURE__ */ __name((text3, query, size2 = 240, options2 = {}) => {
|
|
22753
22808
|
const flat = text3.replace(/\s+/g, " ").trim();
|
|
@@ -22763,7 +22818,7 @@ var excerpt = /* @__PURE__ */ __name((text3, query, size2 = 240, options2 = {})
|
|
|
22763
22818
|
}, "excerpt");
|
|
22764
22819
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
22765
22820
|
|
|
22766
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22821
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-meetings.js
|
|
22767
22822
|
var SCAN = 1e3;
|
|
22768
22823
|
var SNIPPET = 200;
|
|
22769
22824
|
var SNIPPET_ROWS = 6;
|
|
@@ -22794,9 +22849,9 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
22794
22849
|
found.set(key, held);
|
|
22795
22850
|
}
|
|
22796
22851
|
}
|
|
22797
|
-
const
|
|
22852
|
+
const newest2 = [...found.values()].sort((a, b) => b.at - a.at || b.meetingId - a.meetingId);
|
|
22798
22853
|
const items = [];
|
|
22799
|
-
for (const { accountId, meetingId, people: who } of
|
|
22854
|
+
for (const { accountId, meetingId, people: who } of newest2.slice(0, limit)) {
|
|
22800
22855
|
const meeting = await store.meetings.meetingMetadata({ accountId, meetingId }).catch(() => void 0);
|
|
22801
22856
|
if (meeting === void 0 || meeting.deletedAt !== null)
|
|
22802
22857
|
continue;
|
|
@@ -22825,10 +22880,10 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
22825
22880
|
...call2 ? { call: call2 } : {}
|
|
22826
22881
|
});
|
|
22827
22882
|
}
|
|
22828
|
-
return { items, total:
|
|
22883
|
+
return { items, total: newest2.length, hasMore: cut || newest2.length > limit };
|
|
22829
22884
|
}, "personMeetings");
|
|
22830
22885
|
|
|
22831
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22886
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
22832
22887
|
var CONTEXT_MESSAGES2 = 10;
|
|
22833
22888
|
var CONTEXT_BYTES = 64 * 1024;
|
|
22834
22889
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -22975,13 +23030,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readabl
|
|
|
22975
23030
|
cut ||= page.hasMore;
|
|
22976
23031
|
if (page.hasMore)
|
|
22977
23032
|
for (const outgoing of [true, false]) {
|
|
22978
|
-
const [
|
|
23033
|
+
const [newest2] = (await store.messages.messages(key, dialog.id, {
|
|
22979
23034
|
limit: 1,
|
|
22980
23035
|
outgoing,
|
|
22981
23036
|
...since === void 0 ? {} : { since: new Date(since).toISOString() }
|
|
22982
23037
|
})).items;
|
|
22983
|
-
if (
|
|
22984
|
-
beyond.push(toContext(key,
|
|
23038
|
+
if (newest2)
|
|
23039
|
+
beyond.push(toContext(key, newest2, dialog.title));
|
|
22985
23040
|
}
|
|
22986
23041
|
}
|
|
22987
23042
|
if (key.provider === "email") {
|
|
@@ -23134,10 +23189,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
23134
23189
|
};
|
|
23135
23190
|
}, "personMessages");
|
|
23136
23191
|
|
|
23137
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23192
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
23138
23193
|
import { createHash } from "node:crypto";
|
|
23139
23194
|
|
|
23140
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23195
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
23141
23196
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
23142
23197
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options2 = {}) => {
|
|
23143
23198
|
const parsed = parseMeetingReference(reference);
|
|
@@ -23155,7 +23210,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
23155
23210
|
return { parsed, meeting };
|
|
23156
23211
|
}, "authorizedMeetingMetadata");
|
|
23157
23212
|
|
|
23158
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23213
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
23159
23214
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
23160
23215
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
23161
23216
|
if (signal?.aborted)
|
|
@@ -23354,7 +23409,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
23354
23409
|
return { ...packet, fingerprint: hash(packet) };
|
|
23355
23410
|
}, "readMeetingEvidence");
|
|
23356
23411
|
|
|
23357
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23412
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
23358
23413
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options2) => {
|
|
23359
23414
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options2;
|
|
23360
23415
|
const requestedAccounts = options2.accountIds;
|
|
@@ -23453,7 +23508,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
23453
23508
|
};
|
|
23454
23509
|
}, "personMeetingContext");
|
|
23455
23510
|
|
|
23456
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23511
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
23457
23512
|
var PREPARE_BYTES = 96 * 1024;
|
|
23458
23513
|
var MEETINGS = 5;
|
|
23459
23514
|
var CUES = 3;
|
|
@@ -23485,14 +23540,14 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
23485
23540
|
const waiting = [];
|
|
23486
23541
|
for (const chat of context2.shared.filter((one) => one.kind === "dialog")) {
|
|
23487
23542
|
const key = { provider: chat.provider, account: chat.account };
|
|
23488
|
-
const [
|
|
23489
|
-
if (
|
|
23543
|
+
const [newest2] = (await store.messages.messages(key, chat.chatId, { limit: 1 })).items;
|
|
23544
|
+
if (newest2?.outgoing !== false)
|
|
23490
23545
|
continue;
|
|
23491
23546
|
waiting.push({
|
|
23492
23547
|
...key,
|
|
23493
23548
|
chatId: chat.chatId,
|
|
23494
23549
|
title: chat.title,
|
|
23495
|
-
message: toContext(key,
|
|
23550
|
+
message: toContext(key, newest2, chat.title),
|
|
23496
23551
|
partial: partial.has(`${chat.provider}/${chat.account}/${chat.chatId}`)
|
|
23497
23552
|
});
|
|
23498
23553
|
}
|
|
@@ -23576,7 +23631,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
23576
23631
|
}
|
|
23577
23632
|
}, "meetingsOf");
|
|
23578
23633
|
|
|
23579
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23634
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
23580
23635
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
23581
23636
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
23582
23637
|
const held = await storeIfOpen(deps);
|
|
@@ -23646,7 +23701,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id3, title,
|
|
|
23646
23701
|
complete: false
|
|
23647
23702
|
})), "quiet");
|
|
23648
23703
|
|
|
23649
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23704
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
23650
23705
|
var TIMELINE_ITEMS = 50;
|
|
23651
23706
|
var TIMELINE_MAX = 500;
|
|
23652
23707
|
var SCOPES = ["personal", "work"];
|
|
@@ -23708,7 +23763,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
23708
23763
|
};
|
|
23709
23764
|
}, "personTimeline");
|
|
23710
23765
|
|
|
23711
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23766
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23712
23767
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23713
23768
|
const ids = [...new Set(chatIds)];
|
|
23714
23769
|
if (ids.length === 0)
|
|
@@ -23734,7 +23789,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23734
23789
|
}));
|
|
23735
23790
|
}, "chatCoverage");
|
|
23736
23791
|
|
|
23737
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23792
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
23738
23793
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
23739
23794
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
23740
23795
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -23798,7 +23853,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
23798
23853
|
}
|
|
23799
23854
|
}, "validateContextEvidencePage");
|
|
23800
23855
|
|
|
23801
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23856
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
23802
23857
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
23803
23858
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
23804
23859
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -23851,7 +23906,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
23851
23906
|
};
|
|
23852
23907
|
}, "contextReadBudget");
|
|
23853
23908
|
|
|
23854
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23909
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
23855
23910
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
23856
23911
|
if (!port || typeof port.read !== "function")
|
|
23857
23912
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -23895,7 +23950,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
23895
23950
|
};
|
|
23896
23951
|
}, "createContextEvidenceReader");
|
|
23897
23952
|
|
|
23898
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23953
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
23899
23954
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
23900
23955
|
async around(ref, window2) {
|
|
23901
23956
|
const at2 = parseLocator(ref);
|
|
@@ -23990,7 +24045,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23990
24045
|
};
|
|
23991
24046
|
}, "storedNeighbours");
|
|
23992
24047
|
|
|
23993
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24048
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23994
24049
|
import { createHash as createHash2 } from "node:crypto";
|
|
23995
24050
|
var DAY = 864e5;
|
|
23996
24051
|
var MAX_TIME = 864e13;
|
|
@@ -24306,7 +24361,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text3, plan) => {
|
|
|
24306
24361
|
return value;
|
|
24307
24362
|
}, "decodeCheckpoint");
|
|
24308
24363
|
|
|
24309
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24364
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
24310
24365
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
24311
24366
|
var PAGE2 = 20;
|
|
24312
24367
|
var PEOPLE = 20;
|
|
@@ -24710,7 +24765,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
24710
24765
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
24711
24766
|
}, "peopleOf");
|
|
24712
24767
|
|
|
24713
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24768
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
24714
24769
|
var normalizedText = /* @__PURE__ */ __name((text3) => text3.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
24715
24770
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
24716
24771
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -24754,7 +24809,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
24754
24809
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
24755
24810
|
}, "matchVocabularyTerms");
|
|
24756
24811
|
|
|
24757
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24812
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
24758
24813
|
var KINDS = ["project", "tag", "topic"];
|
|
24759
24814
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options2 = {}) => {
|
|
24760
24815
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -24809,7 +24864,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
24809
24864
|
};
|
|
24810
24865
|
}, "findEvidenceMentions");
|
|
24811
24866
|
|
|
24812
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24867
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
24813
24868
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
24814
24869
|
var DEFAULT_PURPOSES = ["work"];
|
|
24815
24870
|
var LINK_PURPOSE = "work";
|
|
@@ -24839,10 +24894,10 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
24839
24894
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
24840
24895
|
], "purposeList");
|
|
24841
24896
|
|
|
24842
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24897
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
24843
24898
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
24844
24899
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
24845
|
-
const [messages,
|
|
24900
|
+
const [messages, newest2, oldest] = await Promise.all([
|
|
24846
24901
|
store.messages.countMessages(account, chatId, window2),
|
|
24847
24902
|
store.messages.messages(account, chatId, { limit: 1, since: window2.since, until: until - 1 }),
|
|
24848
24903
|
store.messages.messages(account, chatId, { limit: 1, after: { time: since - 1 }, until: until - 1 })
|
|
@@ -24850,7 +24905,7 @@ var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId,
|
|
|
24850
24905
|
return {
|
|
24851
24906
|
messages,
|
|
24852
24907
|
firstAt: oldest.items[0]?.timestamp ?? null,
|
|
24853
|
-
lastAt:
|
|
24908
|
+
lastAt: newest2.items.at(-1)?.timestamp ?? null
|
|
24854
24909
|
};
|
|
24855
24910
|
}, "storedChatCount");
|
|
24856
24911
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
@@ -25150,7 +25205,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
25150
25205
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
25151
25206
|
}, "purposeHintOf");
|
|
25152
25207
|
|
|
25153
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25208
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
25154
25209
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
25155
25210
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
25156
25211
|
const held = await storeIfOpen(deps);
|
|
@@ -25415,7 +25470,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
25415
25470
|
return rest;
|
|
25416
25471
|
}, "withoutPhone");
|
|
25417
25472
|
|
|
25418
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25473
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
25419
25474
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
25420
25475
|
var PERIOD_FIELD = "created";
|
|
25421
25476
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -25546,7 +25601,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
25546
25601
|
}));
|
|
25547
25602
|
}, "meetingNames");
|
|
25548
25603
|
|
|
25549
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25604
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
25550
25605
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
25551
25606
|
const tags = /* @__PURE__ */ new Map();
|
|
25552
25607
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -25555,7 +25610,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
25555
25610
|
return tags;
|
|
25556
25611
|
}, "taskTagFilters");
|
|
25557
25612
|
|
|
25558
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25613
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
25559
25614
|
var TASK_QUERY = {
|
|
25560
25615
|
entity: "task",
|
|
25561
25616
|
backend: "sql",
|
|
@@ -26055,16 +26110,16 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
26055
26110
|
};
|
|
26056
26111
|
}, "taskView");
|
|
26057
26112
|
|
|
26058
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26059
|
-
var mailTurn = /* @__PURE__ */ __name((
|
|
26060
|
-
if (
|
|
26113
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
26114
|
+
var mailTurn = /* @__PURE__ */ __name((newest2) => {
|
|
26115
|
+
if (newest2 === null)
|
|
26061
26116
|
return null;
|
|
26062
|
-
if (
|
|
26117
|
+
if (newest2.outgoing)
|
|
26063
26118
|
return "waiting";
|
|
26064
|
-
return
|
|
26119
|
+
return newest2.addressed ? "owed" : null;
|
|
26065
26120
|
}, "mailTurn");
|
|
26066
26121
|
|
|
26067
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26122
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
26068
26123
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
26069
26124
|
if (error instanceof CliError && error.code === "not_found")
|
|
26070
26125
|
return void 0;
|
|
@@ -26098,7 +26153,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
26098
26153
|
storedAt: synced?.at ?? null,
|
|
26099
26154
|
coverage: /* @__PURE__ */ __name((ids) => ids.map((chatId) => {
|
|
26100
26155
|
const thread = byId2.get(chatId);
|
|
26101
|
-
const
|
|
26156
|
+
const newest2 = thread?.newest?.at ?? thread?.lastEmailAt;
|
|
26102
26157
|
const until = window2.until === void 0 ? Number.NaN : Date.parse(window2.until);
|
|
26103
26158
|
return {
|
|
26104
26159
|
chatId,
|
|
@@ -26107,7 +26162,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
26107
26162
|
chatId,
|
|
26108
26163
|
// Sync holds a window of the mailbox, never a thread's whole history.
|
|
26109
26164
|
state: synced ? "partial" : "unknown",
|
|
26110
|
-
upToDate: window2.state === "window" &&
|
|
26165
|
+
upToDate: window2.state === "window" && newest2 !== void 0 && !Number.isNaN(until) ? newest2 <= until : null,
|
|
26111
26166
|
gaps: false,
|
|
26112
26167
|
reachesStart: false,
|
|
26113
26168
|
fetchedAt: synced?.at ?? null
|
|
@@ -26115,14 +26170,14 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
26115
26170
|
held: {
|
|
26116
26171
|
messages: thread?.emails ?? 0,
|
|
26117
26172
|
oldestAt: null,
|
|
26118
|
-
newestAt:
|
|
26173
|
+
newestAt: newest2 === void 0 ? null : new Date(newest2).toISOString()
|
|
26119
26174
|
}
|
|
26120
26175
|
};
|
|
26121
26176
|
}), "coverage")
|
|
26122
26177
|
};
|
|
26123
26178
|
}, "mailActivity");
|
|
26124
26179
|
|
|
26125
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26180
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
26126
26181
|
var DAY2 = 864e5;
|
|
26127
26182
|
var AGENDA_DEFAULTS = { unanswered: DAY2, waiting: 7 * DAY2 };
|
|
26128
26183
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -26376,18 +26431,18 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
26376
26431
|
};
|
|
26377
26432
|
}, "agendaItem");
|
|
26378
26433
|
|
|
26379
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26434
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26380
26435
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
26381
26436
|
|
|
26382
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26437
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26383
26438
|
import { lstat } from "node:fs/promises";
|
|
26384
26439
|
|
|
26385
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26440
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
26386
26441
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
26387
26442
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
26388
26443
|
import { join as join6 } from "node:path";
|
|
26389
26444
|
|
|
26390
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26445
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
26391
26446
|
import { createHash as createHash3 } from "node:crypto";
|
|
26392
26447
|
var metadataLimit = 16384;
|
|
26393
26448
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -26447,7 +26502,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path2, locator, maxBytes
|
|
|
26447
26502
|
}
|
|
26448
26503
|
}, "readPartialMetadata");
|
|
26449
26504
|
|
|
26450
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26505
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
26451
26506
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
26452
26507
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
26453
26508
|
import { join as join5 } from "node:path";
|
|
@@ -26539,7 +26594,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
26539
26594
|
};
|
|
26540
26595
|
}, "partialWriter");
|
|
26541
26596
|
|
|
26542
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26597
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
26543
26598
|
var NativeRecordingPartialStore = class {
|
|
26544
26599
|
static {
|
|
26545
26600
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -26646,12 +26701,12 @@ var NativeRecordingPartialStore = class {
|
|
|
26646
26701
|
}
|
|
26647
26702
|
};
|
|
26648
26703
|
|
|
26649
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26704
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26650
26705
|
import { createHash as createHash5 } from "node:crypto";
|
|
26651
26706
|
import { link as link2 } from "node:fs/promises";
|
|
26652
26707
|
import { basename as basename2, dirname as dirname5, join as join8, resolve as resolve2 } from "node:path";
|
|
26653
26708
|
|
|
26654
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26709
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
26655
26710
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
26656
26711
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path2, expected2, signal, writable = false) => {
|
|
26657
26712
|
signal?.throwIfAborted();
|
|
@@ -26686,7 +26741,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
26686
26741
|
signal?.throwIfAborted();
|
|
26687
26742
|
}, "commitPublication");
|
|
26688
26743
|
|
|
26689
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26744
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
26690
26745
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
26691
26746
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
26692
26747
|
import { join as join7 } from "node:path";
|
|
@@ -26759,7 +26814,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path2, prefix,
|
|
|
26759
26814
|
}
|
|
26760
26815
|
}, "writePublicationJournal");
|
|
26761
26816
|
|
|
26762
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26817
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26763
26818
|
var NativeRecordingPublication = class {
|
|
26764
26819
|
static {
|
|
26765
26820
|
__name(this, "NativeRecordingPublication");
|
|
@@ -26832,7 +26887,7 @@ var NativeRecordingPublication = class {
|
|
|
26832
26887
|
}
|
|
26833
26888
|
};
|
|
26834
26889
|
|
|
26835
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26890
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26836
26891
|
import { createHash as createHash6 } from "node:crypto";
|
|
26837
26892
|
import { readdir } from "node:fs/promises";
|
|
26838
26893
|
import { isAbsolute as isAbsolute2, join as join9, resolve as resolve3 } from "node:path";
|
|
@@ -26919,7 +26974,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
26919
26974
|
beforePublish
|
|
26920
26975
|
}), "commitMediaEntry");
|
|
26921
26976
|
|
|
26922
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26977
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26923
26978
|
var validator = '"media-completed-v1"';
|
|
26924
26979
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26925
26980
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind2, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -27020,7 +27075,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind2, file
|
|
|
27020
27075
|
return entry;
|
|
27021
27076
|
}, "archiveMediaFile");
|
|
27022
27077
|
|
|
27023
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27078
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
27024
27079
|
import { mkdir, realpath } from "node:fs/promises";
|
|
27025
27080
|
import { join as join10, resolve as resolve4 } from "node:path";
|
|
27026
27081
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -27087,7 +27142,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
27087
27142
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
27088
27143
|
}, "withMediaArchiveLocks");
|
|
27089
27144
|
|
|
27090
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27145
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
27091
27146
|
var checkMediaArchive = /* @__PURE__ */ __name((directory2, signal) => withMediaArchiveLocks(directory2, signal, async (root) => {
|
|
27092
27147
|
const entries = await readMediaManifests(root, signal);
|
|
27093
27148
|
if (!entries.length)
|
|
@@ -27230,7 +27285,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options2) => {
|
|
|
27230
27285
|
}, { create: true });
|
|
27231
27286
|
}, "archiveMedia");
|
|
27232
27287
|
|
|
27233
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27288
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
27234
27289
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
27235
27290
|
import { basename as basename3, dirname as dirname6, join as join11, resolve as resolve5 } from "node:path";
|
|
27236
27291
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -27381,7 +27436,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options2) => {
|
|
|
27381
27436
|
}, { additional: [target2], createAdditional: !options2.dryRun });
|
|
27382
27437
|
}, "moveMediaArchive");
|
|
27383
27438
|
|
|
27384
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27439
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
27385
27440
|
import { writeFileSync as writeFileSync3 } from "node:fs";
|
|
27386
27441
|
import { join as join12 } from "node:path";
|
|
27387
27442
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
@@ -27406,7 +27461,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
27406
27461
|
`);
|
|
27407
27462
|
await nativeRuntime({ env, progress });
|
|
27408
27463
|
progress(`${model.id}: loading it once to check it works`);
|
|
27409
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
27464
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-3P3LSM2O.js");
|
|
27410
27465
|
const embedder = await openEmbedder2(model, directory2);
|
|
27411
27466
|
try {
|
|
27412
27467
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -27427,7 +27482,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id3, { env, progress = /
|
|
|
27427
27482
|
}
|
|
27428
27483
|
await nativeRuntime({ env, progress });
|
|
27429
27484
|
progress(`${model.id}: loading it once to check it works`);
|
|
27430
|
-
const { openReranker } = await import("./rerank-
|
|
27485
|
+
const { openReranker } = await import("./rerank-JD2NIUW6.js");
|
|
27431
27486
|
const reranker = await openReranker(model, directory2);
|
|
27432
27487
|
try {
|
|
27433
27488
|
await reranker.score("check", ["check"]);
|
|
@@ -27445,7 +27500,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
27445
27500
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
27446
27501
|
}
|
|
27447
27502
|
progress(`${model.id}: loading it once to check it works`);
|
|
27448
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
27503
|
+
const { openPictureEmbedder } = await import("./embedder-2SANUF2X.js");
|
|
27449
27504
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
27450
27505
|
try {
|
|
27451
27506
|
const vector = await embedder.embedQuery("check");
|
|
@@ -27457,7 +27512,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
27457
27512
|
return { model, directory: directory2 };
|
|
27458
27513
|
}, "downloadImageModel");
|
|
27459
27514
|
|
|
27460
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27515
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
27461
27516
|
var MONEY_REQUEST = "money-request";
|
|
27462
27517
|
var MONEY_DONE = "money-done";
|
|
27463
27518
|
var PROMISE = "promise";
|
|
@@ -27491,10 +27546,10 @@ var MONEY_WORDS = [
|
|
|
27491
27546
|
}
|
|
27492
27547
|
];
|
|
27493
27548
|
|
|
27494
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27549
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
27495
27550
|
var moneyClassesOf = /* @__PURE__ */ __name((text3) => listsHit(text3, MONEY_WORDS), "moneyClassesOf");
|
|
27496
27551
|
|
|
27497
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27552
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
27498
27553
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
27499
27554
|
var MONEY_DONE_FORMS = words2([
|
|
27500
27555
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -27534,7 +27589,7 @@ var PROMISE_FORMS = words2([
|
|
|
27534
27589
|
"estar\xE1 listo"
|
|
27535
27590
|
]);
|
|
27536
27591
|
|
|
27537
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27592
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
27538
27593
|
var EXCERPT_CHARS = 80;
|
|
27539
27594
|
var excerpt2 = /* @__PURE__ */ __name((text3) => {
|
|
27540
27595
|
const flat = text3.replace(/\s+/g, " ").trim();
|
|
@@ -27556,7 +27611,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
27556
27611
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
27557
27612
|
var day = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString().slice(0, 10), "day");
|
|
27558
27613
|
|
|
27559
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27614
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
27560
27615
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
27561
27616
|
var verbOf = /* @__PURE__ */ __name((text3) => {
|
|
27562
27617
|
if (MONEY_DONE_FORMS.test(text3))
|
|
@@ -27637,7 +27692,7 @@ var amounts = {
|
|
|
27637
27692
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
27638
27693
|
};
|
|
27639
27694
|
|
|
27640
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27695
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
27641
27696
|
var children = {
|
|
27642
27697
|
id: "children",
|
|
27643
27698
|
version: 1,
|
|
@@ -27666,7 +27721,7 @@ var children = {
|
|
|
27666
27721
|
}, "read")
|
|
27667
27722
|
};
|
|
27668
27723
|
|
|
27669
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27724
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
27670
27725
|
var coverage = {
|
|
27671
27726
|
id: "coverage",
|
|
27672
27727
|
version: 1,
|
|
@@ -27695,7 +27750,7 @@ var coverage = {
|
|
|
27695
27750
|
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")
|
|
27696
27751
|
};
|
|
27697
27752
|
|
|
27698
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27753
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
27699
27754
|
var holding2 = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
27700
27755
|
var item = /* @__PURE__ */ __name((row, at2, data) => ({
|
|
27701
27756
|
signal: "payments",
|
|
@@ -27745,7 +27800,7 @@ var payments = {
|
|
|
27745
27800
|
}, "read")
|
|
27746
27801
|
};
|
|
27747
27802
|
|
|
27748
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27803
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
27749
27804
|
var PATTERNS_PER_CHAT = 3;
|
|
27750
27805
|
var DAY3 = 864e5;
|
|
27751
27806
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -27834,7 +27889,7 @@ var promises = {
|
|
|
27834
27889
|
}, "read")
|
|
27835
27890
|
};
|
|
27836
27891
|
|
|
27837
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27892
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
27838
27893
|
var PER_SIDE = 5;
|
|
27839
27894
|
var WEEK = 7 * 864e5;
|
|
27840
27895
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -27865,7 +27920,7 @@ var questions2 = {
|
|
|
27865
27920
|
}, "attention")
|
|
27866
27921
|
};
|
|
27867
27922
|
|
|
27868
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27923
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
27869
27924
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
27870
27925
|
const byId2 = /* @__PURE__ */ __name((id3) => chat.messages.find((one) => one.id === id3), "byId");
|
|
27871
27926
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27933,7 +27988,7 @@ var replyNext = {
|
|
|
27933
27988
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27934
27989
|
};
|
|
27935
27990
|
|
|
27936
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27991
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27937
27992
|
var escaped = /* @__PURE__ */ __name((text3) => text3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27938
27993
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27939
27994
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27958,14 +28013,14 @@ var topics = {
|
|
|
27958
28013
|
if (!yours && !theirs)
|
|
27959
28014
|
return [];
|
|
27960
28015
|
const silent = theirs && yours && Date.parse(yours.timestamp) > Date.parse(theirs.timestamp);
|
|
27961
|
-
const
|
|
28016
|
+
const newest2 = [yours, theirs].filter((one) => one !== void 0).sort((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp));
|
|
27962
28017
|
return [
|
|
27963
28018
|
{
|
|
27964
28019
|
signal: "topics",
|
|
27965
28020
|
chat: chat.ref,
|
|
27966
|
-
at:
|
|
28021
|
+
at: newest2[0]?.timestamp ?? null,
|
|
27967
28022
|
who: null,
|
|
27968
|
-
evidence: evidenceOf(chat, ...
|
|
28023
|
+
evidence: evidenceOf(chat, ...newest2),
|
|
27969
28024
|
basis: "store",
|
|
27970
28025
|
data: {
|
|
27971
28026
|
query,
|
|
@@ -27979,7 +28034,7 @@ var topics = {
|
|
|
27979
28034
|
}, "read")
|
|
27980
28035
|
};
|
|
27981
28036
|
|
|
27982
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28037
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27983
28038
|
var STATUS_SIGNALS = [
|
|
27984
28039
|
replyNext,
|
|
27985
28040
|
questions2,
|
|
@@ -27991,7 +28046,7 @@ var STATUS_SIGNALS = [
|
|
|
27991
28046
|
children
|
|
27992
28047
|
];
|
|
27993
28048
|
|
|
27994
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28049
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27995
28050
|
var DAY4 = 864e5;
|
|
27996
28051
|
var STATUS_WINDOW = 300;
|
|
27997
28052
|
var STATUS_CHATS = 16;
|
|
@@ -28180,7 +28235,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28180
28235
|
};
|
|
28181
28236
|
}, "projectStatus");
|
|
28182
28237
|
|
|
28183
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28238
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
28184
28239
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
28185
28240
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
28186
28241
|
if (deps.offline)
|
|
@@ -28252,7 +28307,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
28252
28307
|
};
|
|
28253
28308
|
}, "accountService");
|
|
28254
28309
|
|
|
28255
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28310
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
28256
28311
|
var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-time", zone) => {
|
|
28257
28312
|
const at2 = aheadOf(value, flag, now, {
|
|
28258
28313
|
...zone === void 0 ? {} : { zone },
|
|
@@ -28263,7 +28318,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
28263
28318
|
return new Date(at2 - at2 % MINUTE).toISOString();
|
|
28264
28319
|
}, "sendTime");
|
|
28265
28320
|
|
|
28266
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28321
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
28267
28322
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
28268
28323
|
try {
|
|
28269
28324
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -28510,7 +28565,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
28510
28565
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
28511
28566
|
}, "linkLimits");
|
|
28512
28567
|
|
|
28513
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28568
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
28514
28569
|
var THREADS_PAGE = 500;
|
|
28515
28570
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
28516
28571
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -28547,10 +28602,10 @@ var withMailThreads = /* @__PURE__ */ __name((store) => {
|
|
|
28547
28602
|
get: /* @__PURE__ */ __name((target2, key, receiver) => key === "chats" ? chats : Reflect.get(target2, key, receiver), "get")
|
|
28548
28603
|
});
|
|
28549
28604
|
}, "withMailThreads");
|
|
28550
|
-
var mergeMail = /* @__PURE__ */ __name((messages, mail, limit,
|
|
28605
|
+
var mergeMail = /* @__PURE__ */ __name((messages, mail, limit, newest2 = false) => {
|
|
28551
28606
|
const moved = new Set(mail.items.map(({ locator }) => locator));
|
|
28552
28607
|
const kept2 = messages.items.filter(({ locator }) => !moved.has(locator));
|
|
28553
|
-
const items =
|
|
28608
|
+
const items = newest2 ? [...kept2, ...mail.items].sort((a, b) => b.timestamp.localeCompare(a.timestamp)) : fuseRanked([kept2, mail.items], (hit) => ({
|
|
28554
28609
|
exact: hit.exact,
|
|
28555
28610
|
ranked: hit.score !== null,
|
|
28556
28611
|
at: Date.parse(hit.timestamp)
|
|
@@ -28585,9 +28640,9 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before = 0, after
|
|
|
28585
28640
|
return thread.slice(Math.max(0, at2 - before), at2 + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
28586
28641
|
}, "readMail");
|
|
28587
28642
|
|
|
28588
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28643
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
28589
28644
|
var PERSON_FIELDS = /* @__PURE__ */ new Set(["from", "to", "cc", "bcc"]);
|
|
28590
|
-
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list"]);
|
|
28645
|
+
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list", "type", "reach"]);
|
|
28591
28646
|
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");
|
|
28592
28647
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
28593
28648
|
if (!Number.isInteger(request.limit) || request.limit < 1 || request.limit > QUERY_PAGE_LIMIT)
|
|
@@ -28833,13 +28888,13 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
28833
28888
|
};
|
|
28834
28889
|
}, "coverageOf");
|
|
28835
28890
|
var statKey = /* @__PURE__ */ __name((account, chatId) => JSON.stringify([account.provider, account.account, chatId]), "statKey");
|
|
28836
|
-
var queryOf = /* @__PURE__ */ __name((timezone,
|
|
28891
|
+
var queryOf = /* @__PURE__ */ __name((timezone, newest2, stemming) => ({
|
|
28837
28892
|
language: "lucene-v1",
|
|
28838
28893
|
version: 1,
|
|
28839
28894
|
fieldsVersion: FIELD_VERSION,
|
|
28840
28895
|
presetVersion: PRESET_VERSION,
|
|
28841
28896
|
timezone,
|
|
28842
|
-
order:
|
|
28897
|
+
order: newest2 ? "newest" : "relevance",
|
|
28843
28898
|
...stemming ? { stemming } : {}
|
|
28844
28899
|
}), "queryOf");
|
|
28845
28900
|
var searchLucene = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
@@ -28958,7 +29013,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28958
29013
|
};
|
|
28959
29014
|
}, "statsLucene");
|
|
28960
29015
|
|
|
28961
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29016
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28962
29017
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28963
29018
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28964
29019
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -29127,7 +29182,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
29127
29182
|
};
|
|
29128
29183
|
}, "readRankingSelection");
|
|
29129
29184
|
|
|
29130
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29185
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
29131
29186
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
|
|
29132
29187
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
29133
29188
|
command,
|
|
@@ -29137,7 +29192,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
29137
29192
|
fieldsVersion: FIELD_VERSION
|
|
29138
29193
|
}), "searchRecordOf");
|
|
29139
29194
|
|
|
29140
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29195
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
29141
29196
|
function invalid2(message) {
|
|
29142
29197
|
throw new CliError("validation_error", message);
|
|
29143
29198
|
}
|
|
@@ -29431,7 +29486,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29431
29486
|
}, "evidence")
|
|
29432
29487
|
}), "adminStatisticsService");
|
|
29433
29488
|
|
|
29434
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29489
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
29435
29490
|
import { createHash as createHash7, randomUUID as randomUUID5 } from "node:crypto";
|
|
29436
29491
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
29437
29492
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
@@ -29568,12 +29623,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29568
29623
|
return { plan, repair };
|
|
29569
29624
|
}, "gapsService");
|
|
29570
29625
|
|
|
29571
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29626
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29572
29627
|
import { createHash as createHash10 } from "node:crypto";
|
|
29573
29628
|
import { constants as constants2, mkdirSync as mkdirSync5 } from "node:fs";
|
|
29574
|
-
import { lstat as lstat5, open as open6,
|
|
29629
|
+
import { lstat as lstat5, open as open6, stat as stat2 } from "node:fs/promises";
|
|
29575
29630
|
|
|
29576
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29631
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29577
29632
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
29578
29633
|
import { basename as basename4, join as join13, relative as relative2, sep as sep2 } from "node:path";
|
|
29579
29634
|
var MAX_FILES = 1e4;
|
|
@@ -29644,15 +29699,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29644
29699
|
return choices;
|
|
29645
29700
|
}, "directoryPaths");
|
|
29646
29701
|
|
|
29647
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29702
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29648
29703
|
import { posix } from "node:path";
|
|
29649
29704
|
|
|
29650
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29705
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29651
29706
|
import { setImmediate as tick } from "node:timers/promises";
|
|
29652
29707
|
import { crc32 } from "node:zlib";
|
|
29653
29708
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
29654
29709
|
|
|
29655
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29710
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
29656
29711
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
29657
29712
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
29658
29713
|
var SAMPLE = 65536;
|
|
@@ -29754,7 +29809,8 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29754
29809
|
return result.text;
|
|
29755
29810
|
}, "decodeXml");
|
|
29756
29811
|
|
|
29757
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29812
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29813
|
+
var MAX_KEPT = 50 * 1024 * 1024;
|
|
29758
29814
|
var MAX_PART = 10 * 1024 * 1024;
|
|
29759
29815
|
var MAX_ENTRIES = 1e3;
|
|
29760
29816
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -29768,7 +29824,8 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
29768
29824
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
29769
29825
|
}, "cancelled");
|
|
29770
29826
|
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character2) => character2.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
29771
|
-
var
|
|
29827
|
+
var KEPT = /* @__PURE__ */ __name((name) => /\.(xml|rels|opf|xhtml|html)$/i.test(name) || name === "mimetype", "KEPT");
|
|
29828
|
+
var directory = /* @__PURE__ */ __name((bytes2, maxExpanded) => {
|
|
29772
29829
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
29773
29830
|
let end = -1;
|
|
29774
29831
|
for (let index = bytes2.length - 22; index >= Math.max(0, bytes2.length - 65557); index--) {
|
|
@@ -29789,6 +29846,7 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29789
29846
|
throw new Error("invalid_zip");
|
|
29790
29847
|
let offset = view.getUint32(end + 16, true);
|
|
29791
29848
|
let expanded = 0;
|
|
29849
|
+
let kept2 = 0;
|
|
29792
29850
|
const entries = /* @__PURE__ */ new Map();
|
|
29793
29851
|
for (let index = 0; index < count3; index++) {
|
|
29794
29852
|
if (offset + 46 > stop || view.getUint32(offset, true) !== 33639248)
|
|
@@ -29807,7 +29865,9 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29807
29865
|
if ((view.getUint32(offset + 38, true) >>> 16 & 61440) === 40960)
|
|
29808
29866
|
throw new Error("invalid_zip");
|
|
29809
29867
|
expanded += size2;
|
|
29810
|
-
if (
|
|
29868
|
+
if (KEPT(name))
|
|
29869
|
+
kept2 += size2;
|
|
29870
|
+
if (expanded > maxExpanded || kept2 > MAX_KEPT)
|
|
29811
29871
|
throw new ReaderLimit();
|
|
29812
29872
|
const local = view.getUint32(offset + 42, true);
|
|
29813
29873
|
if (local + 30 > offset || view.getUint32(local, true) !== 67324752)
|
|
@@ -29825,19 +29885,20 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29825
29885
|
throw new Error("invalid_zip");
|
|
29826
29886
|
return entries;
|
|
29827
29887
|
}, "directory");
|
|
29828
|
-
var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
29888
|
+
var readContainer = /* @__PURE__ */ __name(async (bytes2, signal, maxExpanded = attachmentMaxBytes()) => {
|
|
29829
29889
|
cancelled(signal);
|
|
29830
|
-
const entries = directory(bytes2);
|
|
29890
|
+
const entries = directory(bytes2, maxExpanded);
|
|
29831
29891
|
const result = /* @__PURE__ */ new Map();
|
|
29832
29892
|
const seen = /* @__PURE__ */ new Set();
|
|
29833
29893
|
const done2 = /* @__PURE__ */ new Set();
|
|
29834
29894
|
let expanded = 0;
|
|
29895
|
+
let kept2 = 0;
|
|
29835
29896
|
const archive = new Unzip((file) => {
|
|
29836
29897
|
const expected2 = entries.get(file.name);
|
|
29837
29898
|
if (!expected2 || seen.has(file.name))
|
|
29838
29899
|
throw new Error("invalid_zip");
|
|
29839
29900
|
seen.add(file.name);
|
|
29840
|
-
const keep2 =
|
|
29901
|
+
const keep2 = KEPT(file.name);
|
|
29841
29902
|
let size2 = 0;
|
|
29842
29903
|
let checksum = 0;
|
|
29843
29904
|
const parts = [];
|
|
@@ -29846,7 +29907,9 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
29846
29907
|
throw error;
|
|
29847
29908
|
size2 += data.length;
|
|
29848
29909
|
expanded += data.length;
|
|
29849
|
-
if (
|
|
29910
|
+
if (keep2)
|
|
29911
|
+
kept2 += data.length;
|
|
29912
|
+
if (expanded > maxExpanded || kept2 > MAX_KEPT || keep2 && size2 > MAX_PART)
|
|
29850
29913
|
throw new ReaderLimit();
|
|
29851
29914
|
checksum = crc32(data, checksum);
|
|
29852
29915
|
if (keep2)
|
|
@@ -29969,7 +30032,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29969
30032
|
return found;
|
|
29970
30033
|
}, "elements");
|
|
29971
30034
|
|
|
29972
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30035
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29973
30036
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29974
30037
|
let name = "";
|
|
29975
30038
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -30024,7 +30087,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
30024
30087
|
return { text: parts.join("").trim(), truncated: false };
|
|
30025
30088
|
}, "sheetText");
|
|
30026
30089
|
|
|
30027
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30090
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
30028
30091
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
30029
30092
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
30030
30093
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -30424,10 +30487,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind2, signal) => {
|
|
|
30424
30487
|
}
|
|
30425
30488
|
}, "readDocument");
|
|
30426
30489
|
|
|
30427
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30490
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30428
30491
|
import { extname as extname3 } from "node:path";
|
|
30429
30492
|
|
|
30430
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30493
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
30431
30494
|
import { readFileSync as readFileSync6 } from "node:fs";
|
|
30432
30495
|
import { dirname as dirname7, extname as extname2, join as join14 } from "node:path";
|
|
30433
30496
|
import { fileURLToPath } from "node:url";
|
|
@@ -30488,7 +30551,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
30488
30551
|
}
|
|
30489
30552
|
}, "derived");
|
|
30490
30553
|
|
|
30491
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30554
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
30492
30555
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
30493
30556
|
var image2 = {
|
|
30494
30557
|
id: "image",
|
|
@@ -30497,7 +30560,7 @@ var image2 = {
|
|
|
30497
30560
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
30498
30561
|
};
|
|
30499
30562
|
|
|
30500
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30563
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
30501
30564
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
30502
30565
|
var doc = {
|
|
30503
30566
|
id: "doc",
|
|
@@ -30509,7 +30572,7 @@ var doc = {
|
|
|
30509
30572
|
}), "read")
|
|
30510
30573
|
};
|
|
30511
30574
|
|
|
30512
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30575
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
30513
30576
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
30514
30577
|
var docx = {
|
|
30515
30578
|
id: "docx",
|
|
@@ -30522,10 +30585,10 @@ var docx = {
|
|
|
30522
30585
|
}), "read")
|
|
30523
30586
|
};
|
|
30524
30587
|
|
|
30525
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30588
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30526
30589
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
30527
30590
|
|
|
30528
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30591
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/html-entities.js
|
|
30529
30592
|
var NAMED = {
|
|
30530
30593
|
amp: "&",
|
|
30531
30594
|
lt: "<",
|
|
@@ -30577,7 +30640,7 @@ var decodeEntities = /* @__PURE__ */ __name((text3) => text3.replace(/&(#x[0-9a-
|
|
|
30577
30640
|
return body[1] === "x" || body[1] === "X" ? character(Number.parseInt(body.slice(2), 16), entity2) : character(Number(body.slice(1)), entity2);
|
|
30578
30641
|
}), "decodeEntities");
|
|
30579
30642
|
|
|
30580
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30643
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30581
30644
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
30582
30645
|
"fonttbl",
|
|
30583
30646
|
"colortbl",
|
|
@@ -30743,7 +30806,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
30743
30806
|
return decodeEntities(replaceTags(blocks, /<[^>]*>/g, "")).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
30744
30807
|
}, "htmlText");
|
|
30745
30808
|
|
|
30746
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30809
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
30747
30810
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
30748
30811
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
30749
30812
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -30799,7 +30862,7 @@ var markdownSections = /* @__PURE__ */ __name((text3) => {
|
|
|
30799
30862
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text3.length }));
|
|
30800
30863
|
}, "markdownSections");
|
|
30801
30864
|
|
|
30802
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30865
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
30803
30866
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
30804
30867
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
30805
30868
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -30870,7 +30933,7 @@ var html = {
|
|
|
30870
30933
|
}, "read")
|
|
30871
30934
|
};
|
|
30872
30935
|
|
|
30873
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30936
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
30874
30937
|
var office = {
|
|
30875
30938
|
id: "office",
|
|
30876
30939
|
version: documentExtractor("odt"),
|
|
@@ -30881,7 +30944,7 @@ var office = {
|
|
|
30881
30944
|
}, "read")
|
|
30882
30945
|
};
|
|
30883
30946
|
|
|
30884
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
30947
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
30885
30948
|
var pdf = {
|
|
30886
30949
|
id: "pdf",
|
|
30887
30950
|
version: "unpdf",
|
|
@@ -30948,7 +31011,7 @@ var pdf = {
|
|
|
30948
31011
|
}), "read")
|
|
30949
31012
|
};
|
|
30950
31013
|
|
|
30951
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31014
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30952
31015
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30953
31016
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30954
31017
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30968,7 +31031,7 @@ var plain = {
|
|
|
30968
31031
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30969
31032
|
};
|
|
30970
31033
|
|
|
30971
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31034
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30972
31035
|
var rtf = {
|
|
30973
31036
|
id: "rtf",
|
|
30974
31037
|
version: "v1",
|
|
@@ -30976,10 +31039,10 @@ var rtf = {
|
|
|
30976
31039
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30977
31040
|
};
|
|
30978
31041
|
|
|
30979
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31042
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30980
31043
|
import { basename as basename5 } from "node:path";
|
|
30981
31044
|
|
|
30982
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31045
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30983
31046
|
var delimitedSpans = /* @__PURE__ */ __name((text3, delimiter, maxCells = 1e4) => {
|
|
30984
31047
|
const cells = [];
|
|
30985
31048
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -31017,7 +31080,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text3, delimiter, maxCells = 1e4) =
|
|
|
31017
31080
|
return { cells, truncated };
|
|
31018
31081
|
}, "delimitedSpans");
|
|
31019
31082
|
|
|
31020
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31083
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
31021
31084
|
var DELIMITED = {
|
|
31022
31085
|
".csv": ",",
|
|
31023
31086
|
".tsv": " ",
|
|
@@ -31056,7 +31119,7 @@ var sheets = {
|
|
|
31056
31119
|
}, "read")
|
|
31057
31120
|
};
|
|
31058
31121
|
|
|
31059
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31122
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
31060
31123
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
31061
31124
|
var HEAD_BYTES = 1024;
|
|
31062
31125
|
var readers = [...BUILT_INS2];
|
|
@@ -31066,7 +31129,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
31066
31129
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
31067
31130
|
}, "readWithRegistry");
|
|
31068
31131
|
|
|
31069
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31132
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
31070
31133
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
31071
31134
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path: path2 }) => extname3(name ?? path2).toLowerCase(), "extensionOf");
|
|
31072
31135
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -32145,7 +32208,7 @@ function imageSize(input) {
|
|
|
32145
32208
|
}
|
|
32146
32209
|
__name(imageSize, "imageSize");
|
|
32147
32210
|
|
|
32148
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32211
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
32149
32212
|
var MAX_PAGES = 20;
|
|
32150
32213
|
var MAX_PIXELS = 2e7;
|
|
32151
32214
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -32305,7 +32368,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
32305
32368
|
}
|
|
32306
32369
|
}, "ocrPdf");
|
|
32307
32370
|
|
|
32308
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32371
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
32309
32372
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
32310
32373
|
const limits = pdfPreviewLimits(env);
|
|
32311
32374
|
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
@@ -32382,7 +32445,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
32382
32445
|
}
|
|
32383
32446
|
}, "pdfPreview");
|
|
32384
32447
|
|
|
32385
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32448
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/picture-reading.js
|
|
32386
32449
|
import { spawn } from "node:child_process";
|
|
32387
32450
|
import { mkdtempSync, readFileSync as readFileSync7, rmSync as rmSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
32388
32451
|
import { tmpdir } from "node:os";
|
|
@@ -32545,7 +32608,7 @@ Read the attached picture.`,
|
|
|
32545
32608
|
}
|
|
32546
32609
|
}, "readPictureWithAgent");
|
|
32547
32610
|
|
|
32548
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32611
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
32549
32612
|
import { createHash as createHash8 } from "node:crypto";
|
|
32550
32613
|
import { constants } from "node:fs";
|
|
32551
32614
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -32568,7 +32631,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path2, options2, captureFile =
|
|
|
32568
32631
|
if (!before.isFile() || before.isSymbolicLink())
|
|
32569
32632
|
throw new CliError("validation_error", "the retained attachment must be a regular file");
|
|
32570
32633
|
if (before.size > maxBytes)
|
|
32571
|
-
throw new CliError("validation_error", `the retained attachment exceeds ${maxBytes
|
|
32634
|
+
throw new CliError("validation_error", `the retained attachment exceeds ${sizeText(maxBytes)}; configure MESSAGING_ATTACHMENT_MAX_MIB`);
|
|
32572
32635
|
if (offsetBytes > before.size)
|
|
32573
32636
|
throw new CliError("validation_error", "the byte offset is past the end of this attachment");
|
|
32574
32637
|
const handle = await open5(path2, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
@@ -32653,7 +32716,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
32653
32716
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
32654
32717
|
}, "transferMime");
|
|
32655
32718
|
|
|
32656
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32719
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
32657
32720
|
import { createWriteStream, mkdirSync as mkdirSync4 } from "node:fs";
|
|
32658
32721
|
import { link as link3, rm } from "node:fs/promises";
|
|
32659
32722
|
import { join as join16, resolve as resolve6 } from "node:path";
|
|
@@ -32768,12 +32831,12 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
32768
32831
|
}
|
|
32769
32832
|
}, "save");
|
|
32770
32833
|
|
|
32771
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32834
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32772
32835
|
import { createHash as createHash9 } from "node:crypto";
|
|
32773
32836
|
import { lstat as lstat4, readFile } from "node:fs/promises";
|
|
32774
32837
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
32775
32838
|
|
|
32776
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32839
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
32777
32840
|
var GROUP_SETTINGS = [
|
|
32778
32841
|
"allCanPin",
|
|
32779
32842
|
"onlyAdminsAdd",
|
|
@@ -32787,7 +32850,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
32787
32850
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
32788
32851
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
32789
32852
|
|
|
32790
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32853
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32791
32854
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
32792
32855
|
var PICTURE_FLOOR = 0.25;
|
|
32793
32856
|
var PAGE3 = 50;
|
|
@@ -32828,7 +32891,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
32828
32891
|
const directory2 = imageModelsDirectory(deps.env);
|
|
32829
32892
|
if (!isImageModelInstalled(model2, directory2))
|
|
32830
32893
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
32831
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32894
|
+
const { openPictureEmbedder } = await import("./embedder-2SANUF2X.js");
|
|
32832
32895
|
return openPictureEmbedder(model2, directory2);
|
|
32833
32896
|
}, "open");
|
|
32834
32897
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33002,7 +33065,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
33002
33065
|
}, "search")
|
|
33003
33066
|
}), "withPictures");
|
|
33004
33067
|
|
|
33005
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33068
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
33006
33069
|
var ATTACHMENT_QUERY = {
|
|
33007
33070
|
entity: "attachment",
|
|
33008
33071
|
backend: "sql",
|
|
@@ -33027,7 +33090,7 @@ var outcome = /* @__PURE__ */ __name(async (file, path2, load, signal, noFollow
|
|
|
33027
33090
|
status: "too-large",
|
|
33028
33091
|
issue: withRecovery({
|
|
33029
33092
|
code: "validation_error",
|
|
33030
|
-
message: `attachment exceeds ${maxBytes
|
|
33093
|
+
message: `attachment exceeds ${sizeText(maxBytes)}; configure MESSAGING_ATTACHMENT_MAX_MIB`,
|
|
33031
33094
|
setting: "MESSAGING_ATTACHMENT_MAX_MIB"
|
|
33032
33095
|
})
|
|
33033
33096
|
}), "tooLarge");
|
|
@@ -33048,7 +33111,7 @@ var outcome = /* @__PURE__ */ __name(async (file, path2, load, signal, noFollow
|
|
|
33048
33111
|
return { status: "missing" };
|
|
33049
33112
|
if (opened.size > maxBytes)
|
|
33050
33113
|
return tooLarge();
|
|
33051
|
-
bytes2 =
|
|
33114
|
+
bytes2 = asBytes(await readWhole(handle, signal));
|
|
33052
33115
|
} finally {
|
|
33053
33116
|
await handle.close();
|
|
33054
33117
|
}
|
|
@@ -33473,7 +33536,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33473
33536
|
}, "readPicture")
|
|
33474
33537
|
}), "attachmentsService");
|
|
33475
33538
|
|
|
33476
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33539
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
33477
33540
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
33478
33541
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
33479
33542
|
const store = await accountStore(deps);
|
|
@@ -33503,7 +33566,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33503
33566
|
}, "list")
|
|
33504
33567
|
}), "chatDocumentsService");
|
|
33505
33568
|
|
|
33506
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33569
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
33507
33570
|
var observationDuration = /* @__PURE__ */ __name((text3, flag) => {
|
|
33508
33571
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text3);
|
|
33509
33572
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -33590,7 +33653,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
33590
33653
|
}
|
|
33591
33654
|
}, "isRetentionSelection");
|
|
33592
33655
|
|
|
33593
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33656
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
33594
33657
|
var counterFields = /* @__PURE__ */ __name((text3 = "views,reactions,comments") => {
|
|
33595
33658
|
const fields2 = text3.split(",").map((one) => one.trim());
|
|
33596
33659
|
if (!fields2.length || fields2.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields2).size !== fields2.length)
|
|
@@ -33797,7 +33860,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33797
33860
|
};
|
|
33798
33861
|
}, "countersService");
|
|
33799
33862
|
|
|
33800
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33863
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/named-chat.js
|
|
33801
33864
|
var LEAST_USES = 3;
|
|
33802
33865
|
var SAMPLE2 = 50;
|
|
33803
33866
|
var CAPITALISED = 0.8;
|
|
@@ -33851,7 +33914,7 @@ var queryWords2 = /* @__PURE__ */ __name((query) => {
|
|
|
33851
33914
|
}, "queryWords");
|
|
33852
33915
|
var without = /* @__PURE__ */ __name((query, word) => query.replace(new RegExp(`(?<![\\p{L}\\p{N}])${word}(?![\\p{L}\\p{N}])`, "giu"), " ").replace(/\s+/gu, " ").trim(), "without");
|
|
33853
33916
|
|
|
33854
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33917
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
33855
33918
|
var SYNC_KEY = "messages.sync-first";
|
|
33856
33919
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
33857
33920
|
var keyOf4 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -33942,13 +34005,13 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
33942
34005
|
continue;
|
|
33943
34006
|
}
|
|
33944
34007
|
try {
|
|
33945
|
-
const
|
|
34008
|
+
const newest2 = (await store.messages.messages(account, chatId, { limit: 1 })).items[0];
|
|
33946
34009
|
let counted2 = 0;
|
|
33947
34010
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
33948
34011
|
limit: options2.maxMessages - result.messages,
|
|
33949
34012
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
33950
34013
|
pauseMs: parseDuration(deps.messenger.fetching?.pause ?? "1s", "fetch pause"),
|
|
33951
|
-
...
|
|
34014
|
+
...newest2 ? { sinceMs: Date.parse(newest2.timestamp) + 1 } : {},
|
|
33952
34015
|
stop,
|
|
33953
34016
|
note,
|
|
33954
34017
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
@@ -33983,7 +34046,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
33983
34046
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
33984
34047
|
}), "withRefresh");
|
|
33985
34048
|
|
|
33986
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34049
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
33987
34050
|
var CANDIDATES = 50;
|
|
33988
34051
|
var ACROSS_CHATS = 500;
|
|
33989
34052
|
var OWN_BLOCK = 5;
|
|
@@ -34444,13 +34507,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
34444
34507
|
return mean2.map((value) => value / length);
|
|
34445
34508
|
}, "meanOf");
|
|
34446
34509
|
|
|
34447
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34510
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
34448
34511
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
34449
34512
|
...embeddingsMaintenance(deps),
|
|
34450
34513
|
...embeddingsSearch(deps)
|
|
34451
34514
|
}), "embeddingsService");
|
|
34452
34515
|
|
|
34453
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34516
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
34454
34517
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
34455
34518
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
34456
34519
|
if (deps.offline)
|
|
@@ -34591,7 +34654,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
34591
34654
|
};
|
|
34592
34655
|
}, "foldersService");
|
|
34593
34656
|
|
|
34594
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34657
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
34595
34658
|
var REVIEW_COUNT = 500;
|
|
34596
34659
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
34597
34660
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -34670,7 +34733,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34670
34733
|
};
|
|
34671
34734
|
}, "mentionsService");
|
|
34672
34735
|
|
|
34673
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34736
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
34674
34737
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind: kind2, name }) => ({
|
|
34675
34738
|
position,
|
|
34676
34739
|
kind: kind2,
|
|
@@ -34719,7 +34782,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
34719
34782
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
34720
34783
|
}, "validatePermalink");
|
|
34721
34784
|
|
|
34722
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34785
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
34723
34786
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
34724
34787
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
34725
34788
|
return `${seconds / 86400}d`;
|
|
@@ -34751,7 +34814,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
34751
34814
|
return seconds;
|
|
34752
34815
|
}, "pinDurationOf");
|
|
34753
34816
|
|
|
34754
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34817
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
34755
34818
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
34756
34819
|
if (sendAs === void 0) {
|
|
34757
34820
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -34776,7 +34839,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
34776
34839
|
return sendAs;
|
|
34777
34840
|
}, "typedSendAs");
|
|
34778
34841
|
|
|
34779
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34842
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
34780
34843
|
var TOTAL_CAP = 1e4;
|
|
34781
34844
|
var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
34782
34845
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -34787,7 +34850,7 @@ var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
|
34787
34850
|
return { value: count3, relation: exact ? "eq" : "gte" };
|
|
34788
34851
|
}, "totalOf");
|
|
34789
34852
|
|
|
34790
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34853
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
34791
34854
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
34792
34855
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
34793
34856
|
let narrows = false;
|
|
@@ -34816,7 +34879,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
34816
34879
|
return wanted(root).join(" ").trim();
|
|
34817
34880
|
}, "meaningWords");
|
|
34818
34881
|
|
|
34819
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34882
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
34820
34883
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
34821
34884
|
var tokensOf = /* @__PURE__ */ __name((text3) => normalize(text3).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
34822
34885
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options2 = COMBINED_DEFAULTS) => {
|
|
@@ -35017,7 +35080,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
35017
35080
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
35018
35081
|
}, "signals");
|
|
35019
35082
|
|
|
35020
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35083
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
35021
35084
|
var MEANING_DEPTH = 100;
|
|
35022
35085
|
var RRF_K3 = 60;
|
|
35023
35086
|
var RERANK_DEPTH = 50;
|
|
@@ -35343,7 +35406,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
35343
35406
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
35344
35407
|
}, "mixedWithReranker");
|
|
35345
35408
|
|
|
35346
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35409
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
35347
35410
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
35348
35411
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
35349
35412
|
var threadBounds = /* @__PURE__ */ __name((options2 = {}) => {
|
|
@@ -35542,7 +35605,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
35542
35605
|
return result;
|
|
35543
35606
|
}, "readThreadContext");
|
|
35544
35607
|
|
|
35545
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35608
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
35546
35609
|
var SEARCH_FILL_MS = 200;
|
|
35547
35610
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
35548
35611
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -35650,7 +35713,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
35650
35713
|
}, "accountOf");
|
|
35651
35714
|
var keyOf5 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
35652
35715
|
|
|
35653
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35716
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meaning-model.js
|
|
35654
35717
|
var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
35655
35718
|
const chosen = chosenTextModel(env);
|
|
35656
35719
|
if (chosen.from === "chosen" || chosen.id !== DEFAULT_TEXT_MODEL)
|
|
@@ -35665,7 +35728,7 @@ var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
|
35665
35728
|
return (counts.get(before) ?? 0) > (counts.get(now) ?? 0) ? previous.id : current.id;
|
|
35666
35729
|
}, "meaningModel");
|
|
35667
35730
|
|
|
35668
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35731
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
35669
35732
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
35670
35733
|
try {
|
|
35671
35734
|
const text3 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -35744,7 +35807,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35744
35807
|
}
|
|
35745
35808
|
}, "meaningLane");
|
|
35746
35809
|
|
|
35747
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35810
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
35748
35811
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
35749
35812
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
35750
35813
|
if (choice === "off")
|
|
@@ -35756,9 +35819,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35756
35819
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
35757
35820
|
try {
|
|
35758
35821
|
const warm = deps.embedders;
|
|
35759
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
35822
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-AFIXYXWL.js")).openRerankerProcess(model, directory2, {
|
|
35760
35823
|
threads: defaultThreads()
|
|
35761
|
-
})) : await (await import("./rerank-
|
|
35824
|
+
})) : await (await import("./rerank-JD2NIUW6.js")).openReranker(model, directory2);
|
|
35762
35825
|
return {
|
|
35763
35826
|
model: model.id,
|
|
35764
35827
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -35778,14 +35841,14 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35778
35841
|
};
|
|
35779
35842
|
}, "rerankLane");
|
|
35780
35843
|
|
|
35781
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35844
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/file-fetch.js
|
|
35782
35845
|
var EXCHANGE_MS = 60 * 60 * 1e3;
|
|
35783
35846
|
|
|
35784
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35847
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/files.js
|
|
35785
35848
|
var foldKey = /* @__PURE__ */ __name((key) => key.replaceAll("_", "").toLowerCase(), "foldKey");
|
|
35786
35849
|
var DOWNLOAD_KEYS = new Set(["DOWNLOAD_URL", "downloadUrl", "fileUrl", "CALL_RECORD_URL", "archiveLink", "publicUrl"].map(foldKey));
|
|
35787
35850
|
|
|
35788
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35851
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/manifest/map.js
|
|
35789
35852
|
var TIMES = { createdAt: "epoch", updatedAt: "epoch" };
|
|
35790
35853
|
var ITEM = {
|
|
35791
35854
|
externalId: "id",
|
|
@@ -35837,7 +35900,7 @@ var FIELDS = {
|
|
|
35837
35900
|
lead: ITEM
|
|
35838
35901
|
};
|
|
35839
35902
|
|
|
35840
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35903
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/manifest/manifest.js
|
|
35841
35904
|
var path = pipe(string(), regex(/^[^.\s]+(\.[^.\s]+)*$/, "a dotted path such as properties.name"));
|
|
35842
35905
|
var paths = pipe(array(path), minLength(1));
|
|
35843
35906
|
var crmRuleSchema = union([
|
|
@@ -35947,10 +36010,10 @@ var schema = strictObject({
|
|
|
35947
36010
|
writes: optional(record(kind, optional(write)))
|
|
35948
36011
|
});
|
|
35949
36012
|
|
|
35950
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36013
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/manifest/source.js
|
|
35951
36014
|
var OVERLAP_MS = 10 * 6e4;
|
|
35952
36015
|
|
|
35953
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36016
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/writer.js
|
|
35954
36017
|
var CRM_ASSIGN_OTHERS_KEY = "crm.assign-others";
|
|
35955
36018
|
var CRM_WRITE_DEFAULTS = {
|
|
35956
36019
|
"deals.delete": "ask",
|
|
@@ -35958,7 +36021,7 @@ var CRM_WRITE_DEFAULTS = {
|
|
|
35958
36021
|
[CRM_ASSIGN_OTHERS_KEY]: "deny"
|
|
35959
36022
|
};
|
|
35960
36023
|
|
|
35961
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36024
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/viewer.js
|
|
35962
36025
|
var VIEWERS = "crm:viewers";
|
|
35963
36026
|
var viewersOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
35964
36027
|
try {
|
|
@@ -35989,10 +36052,10 @@ var crmViewerOf = /* @__PURE__ */ __name(async (store, account, user) => {
|
|
|
35989
36052
|
};
|
|
35990
36053
|
}, "crmViewerOf");
|
|
35991
36054
|
|
|
35992
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36055
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/crm/sync.js
|
|
35993
36056
|
var CLOCK_MARGIN = 60 * 6e4;
|
|
35994
36057
|
|
|
35995
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36058
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/question-period.js
|
|
35996
36059
|
var DAY5 = 864e5;
|
|
35997
36060
|
var SPAN = { start: 0, end: 0 };
|
|
35998
36061
|
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
@@ -36117,17 +36180,17 @@ var questionPeriod = /* @__PURE__ */ __name((text3, now, zone) => {
|
|
|
36117
36180
|
};
|
|
36118
36181
|
}, "questionPeriod");
|
|
36119
36182
|
|
|
36120
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36183
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
36121
36184
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
36122
36185
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
36123
36186
|
const directory2 = imageModelsDirectory(env);
|
|
36124
36187
|
if (!isImageModelInstalled(model, directory2))
|
|
36125
36188
|
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 });
|
|
36126
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
36189
|
+
const { openPictureEmbedder } = await import("./embedder-2SANUF2X.js");
|
|
36127
36190
|
return openPictureEmbedder(model, directory2);
|
|
36128
36191
|
}, "openPictureEmbedderFor");
|
|
36129
36192
|
|
|
36130
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36193
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
36131
36194
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
36132
36195
|
const metadata = note.frontMatter;
|
|
36133
36196
|
const account = accounts.find(({ id: id3 }) => String(id3) === note.folderId);
|
|
@@ -36149,7 +36212,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
36149
36212
|
};
|
|
36150
36213
|
}, "documentSource");
|
|
36151
36214
|
|
|
36152
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36215
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
36153
36216
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
36154
36217
|
const host = new URL(baseUrl).host;
|
|
36155
36218
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -36182,7 +36245,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
36182
36245
|
};
|
|
36183
36246
|
}, "embeddingKeys");
|
|
36184
36247
|
|
|
36185
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36248
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
36186
36249
|
var options = strictObject({
|
|
36187
36250
|
temperature: range(0, 2),
|
|
36188
36251
|
top_p: range(0, 1),
|
|
@@ -36249,7 +36312,7 @@ var openai = {
|
|
|
36249
36312
|
}), "complete")
|
|
36250
36313
|
};
|
|
36251
36314
|
|
|
36252
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36315
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
36253
36316
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
36254
36317
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
36255
36318
|
if (deps.signal?.aborted)
|
|
@@ -36264,7 +36327,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
36264
36327
|
if (!adapter && target2.provider === "openai")
|
|
36265
36328
|
adapter = openai;
|
|
36266
36329
|
if (!adapter && target2.provider === "anthropic")
|
|
36267
|
-
adapter = (await import("./anthropic-
|
|
36330
|
+
adapter = (await import("./anthropic-CABWJABQ.js")).anthropic;
|
|
36268
36331
|
if (!adapter)
|
|
36269
36332
|
throw new CliError("validation_error", `no model adapter for ${target2.provider}`);
|
|
36270
36333
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -36324,7 +36387,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
36324
36387
|
}, "complete")
|
|
36325
36388
|
}), "modelGateway");
|
|
36326
36389
|
|
|
36327
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36390
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/enrichment-setting.js
|
|
36328
36391
|
var SECTION2 = "enrichment";
|
|
36329
36392
|
var ENRICHMENT_PROVIDERS = ["openai", "anthropic"];
|
|
36330
36393
|
var DEFAULT_BASE_URLS = {
|
|
@@ -36399,7 +36462,7 @@ var costOf = /* @__PURE__ */ __name((usage, setting) => {
|
|
|
36399
36462
|
return price ? Math.round((usage.input * price.input + usage.output * price.output) * 1e6) / 1e6 : null;
|
|
36400
36463
|
}, "costOf");
|
|
36401
36464
|
|
|
36402
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36465
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/enrichment.js
|
|
36403
36466
|
var ENRICH_PER_RUN = 600;
|
|
36404
36467
|
var MAX_LINE = 400;
|
|
36405
36468
|
var line2 = pipe(unknown(), transform((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim().slice(0, MAX_LINE) : ""));
|
|
@@ -36475,7 +36538,7 @@ var enrichmentState = /* @__PURE__ */ __name(async (store, env, estimateFor, key
|
|
|
36475
36538
|
};
|
|
36476
36539
|
}, "enrichmentState");
|
|
36477
36540
|
|
|
36478
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36541
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
36479
36542
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
36480
36543
|
let root;
|
|
36481
36544
|
try {
|
|
@@ -36502,7 +36565,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
36502
36565
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
36503
36566
|
}, "titleTiers");
|
|
36504
36567
|
|
|
36505
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36568
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
36506
36569
|
var storeQuery = /* @__PURE__ */ __name(async (store, text3, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text3, exact), timezone), "storeQuery");
|
|
36507
36570
|
var parsedQuery = /* @__PURE__ */ __name((text3, exact) => validateFields(parseLucene(text3, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
36508
36571
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -36930,7 +36993,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text3, { accou
|
|
|
36930
36993
|
};
|
|
36931
36994
|
}, "searchNotesOf");
|
|
36932
36995
|
|
|
36933
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36996
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/crm-meaning.js
|
|
36934
36997
|
var nearestCrmActivities = /* @__PURE__ */ __name(async (store, words3, { limit, accounts, kinds, viewers, env, command, embedders }) => {
|
|
36935
36998
|
const { model, directory: directory2, key } = localModel(await meaningModel(store, env), env, command);
|
|
36936
36999
|
if (!await store.crm.activityChunks.embedded(key, accounts))
|
|
@@ -36945,7 +37008,7 @@ var nearestCrmActivities = /* @__PURE__ */ __name(async (store, words3, { limit,
|
|
|
36945
37008
|
})).filter(({ score }) => score > floor);
|
|
36946
37009
|
}, "nearestCrmActivities");
|
|
36947
37010
|
|
|
36948
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37011
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
36949
37012
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
36950
37013
|
var iso3 = /* @__PURE__ */ __name((at2) => at2 === null ? null : new Date(at2).toISOString(), "iso");
|
|
36951
37014
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -36979,11 +37042,11 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
|
|
|
36979
37042
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
36980
37043
|
}, "nearestEvents");
|
|
36981
37044
|
var keyOf6 = /* @__PURE__ */ __name(({ event: event2 }) => event2.eventSeriesId === null ? `e${event2.id}` : `s${event2.eventSeriesId}`, "keyOf");
|
|
36982
|
-
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
37045
|
+
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest: newest2, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
36983
37046
|
if (!query.trim())
|
|
36984
37047
|
throw new CliError("validation_error", "say what to find in the events");
|
|
36985
37048
|
query = plainQuery(query);
|
|
36986
|
-
const asked = discover && !exact && !
|
|
37049
|
+
const asked = discover && !exact && !newest2 ? questionLookup(query) : void 0;
|
|
36987
37050
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
36988
37051
|
...exact ? { exact: true } : {},
|
|
36989
37052
|
...timezone === void 0 ? {} : { timezone }
|
|
@@ -36997,7 +37060,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
36997
37060
|
let meaning;
|
|
36998
37061
|
if (exact)
|
|
36999
37062
|
meaningSkipped = "--exact searches words as written";
|
|
37000
|
-
else if (
|
|
37063
|
+
else if (newest2)
|
|
37001
37064
|
meaningSkipped = "newest first orders by time";
|
|
37002
37065
|
else if (words3 === void 0)
|
|
37003
37066
|
meaningSkipped = "the query has fields or operators, which meaning cannot follow";
|
|
@@ -37020,7 +37083,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
37020
37083
|
limit: meaning === void 0 ? limit : Math.max(window2, CANDIDATES3),
|
|
37021
37084
|
offset: meaning === void 0 ? offset : 0,
|
|
37022
37085
|
...accountIds === void 0 ? {} : { accountIds },
|
|
37023
|
-
...
|
|
37086
|
+
...newest2 ? { newest: true } : {},
|
|
37024
37087
|
...stemmer ? { stemmer } : {},
|
|
37025
37088
|
...signal ? { signal } : {},
|
|
37026
37089
|
...candidates === void 0 ? {} : { candidates }
|
|
@@ -37063,7 +37126,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
37063
37126
|
};
|
|
37064
37127
|
}, "searchEvents");
|
|
37065
37128
|
|
|
37066
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37129
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
37067
37130
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
37068
37131
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
37069
37132
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -37093,7 +37156,7 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words3, anyWo
|
|
|
37093
37156
|
};
|
|
37094
37157
|
}, "searchBusiness");
|
|
37095
37158
|
|
|
37096
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37159
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
37097
37160
|
var MOST_HITS_PER_MEETING = 3;
|
|
37098
37161
|
var PAGE_ROWS = 200;
|
|
37099
37162
|
var MOST_PAGES2 = 25;
|
|
@@ -37321,7 +37384,7 @@ var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
|
37321
37384
|
foundBy: ["title"]
|
|
37322
37385
|
}), "titleItem");
|
|
37323
37386
|
|
|
37324
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37387
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-all-rank.js
|
|
37325
37388
|
var titleWords2 = /* @__PURE__ */ __name((text3, refused = "deals and leads are found by the words of their title, company, contacts and activities only") => {
|
|
37326
37389
|
const { root } = parseLucene(text3, SEARCH_QUERY);
|
|
37327
37390
|
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
@@ -37396,7 +37459,7 @@ var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
|
37396
37459
|
return ordered.map((item2, rank) => ({ item: item2, score: 1 - rank / PERIOD_DEPTH + (inside2(item2) ? PERIOD_BOOST : 0) })).sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
37397
37460
|
}, "insidePeriodFirst");
|
|
37398
37461
|
|
|
37399
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37462
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/tracker-meaning.js
|
|
37400
37463
|
var nearestTracker = /* @__PURE__ */ __name(async (store, words3, { limit, accounts, env, command, embedders }) => {
|
|
37401
37464
|
const { model, directory: directory2, key } = localModel(await meaningModel(store, env), env, command);
|
|
37402
37465
|
if (!await store.tracker.embedded(key, accounts))
|
|
@@ -37406,7 +37469,7 @@ var nearestTracker = /* @__PURE__ */ __name(async (store, words3, { limit, accou
|
|
|
37406
37469
|
return (await store.tracker.nearest(key, vector, { limit, accounts })).filter(({ score }) => score > floor);
|
|
37407
37470
|
}, "nearestTracker");
|
|
37408
37471
|
|
|
37409
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37472
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-all-tracker.js
|
|
37410
37473
|
var TRACKER_HIT_KINDS = { issue: "issue", project: "project", comment: "issue_comment" };
|
|
37411
37474
|
var trackerTitle = /* @__PURE__ */ __name(({ kind: kind2, record: record2 }) => {
|
|
37412
37475
|
const title = trackerTitleOf(kind2, record2);
|
|
@@ -37500,7 +37563,7 @@ var trackerLane = /* @__PURE__ */ __name(async (store, { text: text3, accounts:
|
|
|
37500
37563
|
return { hits, records, hasMore: found.hasMore, tracker, ...meaningReason ? { meaningReason } : {} };
|
|
37501
37564
|
}, "trackerLane");
|
|
37502
37565
|
|
|
37503
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37566
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-harder.js
|
|
37504
37567
|
var SECTION3 = "search_harder";
|
|
37505
37568
|
var HARDER_MODELS = {
|
|
37506
37569
|
anthropic: "claude-haiku-5-5",
|
|
@@ -37746,7 +37809,7 @@ var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { laterPage, a
|
|
|
37746
37809
|
};
|
|
37747
37810
|
}, "reorderHarder");
|
|
37748
37811
|
|
|
37749
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37812
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
37750
37813
|
var RESOURCES_SEARCHED = [
|
|
37751
37814
|
"messages",
|
|
37752
37815
|
"mail",
|
|
@@ -38243,7 +38306,7 @@ var withMeetingDocuments = /* @__PURE__ */ __name(async (store, lists, read) =>
|
|
|
38243
38306
|
}));
|
|
38244
38307
|
}, "withMeetingDocuments");
|
|
38245
38308
|
|
|
38246
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
38309
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
38247
38310
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
38248
38311
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
38249
38312
|
var DEFAULT_BACKEND = "both";
|
|
@@ -38442,7 +38505,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
38442
38505
|
return { report, sources };
|
|
38443
38506
|
}, "searchServer");
|
|
38444
38507
|
|
|
38445
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
38508
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
38446
38509
|
var DELETE_AT_ONCE = 10;
|
|
38447
38510
|
var atOnce = /* @__PURE__ */ __name((ids) => {
|
|
38448
38511
|
if (ids.length > DELETE_AT_ONCE)
|
|
@@ -38942,7 +39005,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
38942
39005
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
38943
39006
|
}, "checkMediaOptions");
|
|
38944
39007
|
|
|
38945
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39008
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
38946
39009
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
38947
39010
|
var RULES2 = {
|
|
38948
39011
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -38957,7 +39020,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2
|
|
|
38957
39020
|
return fields2.length ? [{ tag, score: fields2.length / 3, fields: fields2 }] : [];
|
|
38958
39021
|
}), "classifyChannel");
|
|
38959
39022
|
|
|
38960
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39023
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
38961
39024
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
38962
39025
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
38963
39026
|
const store = await deps.store();
|
|
@@ -39043,7 +39106,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
39043
39106
|
};
|
|
39044
39107
|
}, "metadataService");
|
|
39045
39108
|
|
|
39046
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39109
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
39047
39110
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
39048
39111
|
var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
39049
39112
|
const { chatId, title, rules, point, since, dryRun } = run2;
|
|
@@ -39080,7 +39143,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
|
39080
39143
|
return { chatId, rows, notes };
|
|
39081
39144
|
}, "moderateWith");
|
|
39082
39145
|
|
|
39083
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39146
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
39084
39147
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
39085
39148
|
const file = /* @__PURE__ */ __name(() => {
|
|
39086
39149
|
const env = deps.env ?? process.env;
|
|
@@ -39165,7 +39228,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
39165
39228
|
}, "removePerson")
|
|
39166
39229
|
}), "moderatorOf");
|
|
39167
39230
|
|
|
39168
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39231
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
39169
39232
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
39170
39233
|
id: note.id,
|
|
39171
39234
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -39209,7 +39272,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
39209
39272
|
};
|
|
39210
39273
|
}, "privatePeopleService");
|
|
39211
39274
|
|
|
39212
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39275
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
39213
39276
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
39214
39277
|
total: 0,
|
|
39215
39278
|
population: 0,
|
|
@@ -39465,7 +39528,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
39465
39528
|
}, "evidence")
|
|
39466
39529
|
}), "rankingsService");
|
|
39467
39530
|
|
|
39468
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39531
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
39469
39532
|
var FIELDS2 = ["date", "chat", "kind", "muted"];
|
|
39470
39533
|
var WAITING_TAIL = 100;
|
|
39471
39534
|
var plainOnly = /* @__PURE__ */ __name((text3, command) => {
|
|
@@ -39530,12 +39593,12 @@ var figuresOf = /* @__PURE__ */ __name((delays) => {
|
|
|
39530
39593
|
};
|
|
39531
39594
|
}, "figuresOf");
|
|
39532
39595
|
var MINUTE2 = 6e4;
|
|
39533
|
-
var waitsOnOwner = /* @__PURE__ */ __name((
|
|
39534
|
-
if (
|
|
39596
|
+
var waitsOnOwner = /* @__PURE__ */ __name((newest2) => {
|
|
39597
|
+
if (newest2.mine)
|
|
39535
39598
|
return false;
|
|
39536
|
-
if (
|
|
39537
|
-
return !
|
|
39538
|
-
return
|
|
39599
|
+
if (newest2.kind === "private")
|
|
39600
|
+
return !newest2.quiet && rankingQuestion(newest2.text);
|
|
39601
|
+
return newest2.addressed || newest2.ownerUsername !== null && new RegExp(`(^|[^\\w@])@${newest2.ownerUsername.replace(/[^\w]/g, "\\$&")}(?!\\w)`, "i").test(newest2.text);
|
|
39539
39602
|
}, "waitsOnOwner");
|
|
39540
39603
|
var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
39541
39604
|
const prepared = /* @__PURE__ */ __name(async (query, command) => {
|
|
@@ -39599,7 +39662,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
39599
39662
|
};
|
|
39600
39663
|
}, "replyStatsService");
|
|
39601
39664
|
|
|
39602
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39665
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
39603
39666
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
39604
39667
|
id: one.id,
|
|
39605
39668
|
name: one.name,
|
|
@@ -39725,7 +39788,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
39725
39788
|
};
|
|
39726
39789
|
}, "searchesService");
|
|
39727
39790
|
|
|
39728
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39791
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
39729
39792
|
var TAGGING_QUERY = {
|
|
39730
39793
|
entity: "tagging",
|
|
39731
39794
|
backend: "sql",
|
|
@@ -39809,7 +39872,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
39809
39872
|
};
|
|
39810
39873
|
}, "tagsService");
|
|
39811
39874
|
|
|
39812
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
39875
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
39813
39876
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
39814
39877
|
const set2 = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
39815
39878
|
if (title !== void 0 || icon !== void 0 || set2 !== 1)
|
|
@@ -40008,7 +40071,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
40008
40071
|
};
|
|
40009
40072
|
}, "topicsService");
|
|
40010
40073
|
|
|
40011
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40074
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
40012
40075
|
import { createHash as createHash11, randomUUID as randomUUID6 } from "node:crypto";
|
|
40013
40076
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
40014
40077
|
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -40082,7 +40145,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind: kind2, source, page,
|
|
|
40082
40145
|
return { ...content, id: randomUUID6(), fingerprint: hash2(content) };
|
|
40083
40146
|
}, "prepareEvidencePacket");
|
|
40084
40147
|
|
|
40085
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40148
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
40086
40149
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before }, messenger = {}) => {
|
|
40087
40150
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
40088
40151
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -40102,7 +40165,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
40102
40165
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
40103
40166
|
}, "readEvidencePacket");
|
|
40104
40167
|
|
|
40105
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40168
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
40106
40169
|
var scopeKeys = [
|
|
40107
40170
|
"accountId",
|
|
40108
40171
|
"meetingId",
|
|
@@ -40124,7 +40187,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
40124
40187
|
"maxVocabularyReadBytes"
|
|
40125
40188
|
]);
|
|
40126
40189
|
|
|
40127
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40190
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
40128
40191
|
import { createHash as createHash12 } from "node:crypto";
|
|
40129
40192
|
import { existsSync as existsSync2 } from "node:fs";
|
|
40130
40193
|
var useTextModel = /* @__PURE__ */ __name(async (id3, { env, command }) => {
|
|
@@ -40255,14 +40318,14 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id3, payload, { env, fetc
|
|
|
40255
40318
|
return { ...checked2.output, custom: true };
|
|
40256
40319
|
}, "addCustomTextModel");
|
|
40257
40320
|
|
|
40258
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40321
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/calendar/sync.js
|
|
40259
40322
|
var DAY6 = 864e5;
|
|
40260
40323
|
var SLOTS_EVERY = 7 * DAY6;
|
|
40261
40324
|
|
|
40262
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40325
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
|
|
40263
40326
|
var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
|
|
40264
40327
|
|
|
40265
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40328
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/calendar/reads.js
|
|
40266
40329
|
var LIST = "events list";
|
|
40267
40330
|
var EVENT_TYPES = [
|
|
40268
40331
|
"default",
|
|
@@ -40321,7 +40384,7 @@ var EVENTS_QUERY = {
|
|
|
40321
40384
|
} : field)
|
|
40322
40385
|
};
|
|
40323
40386
|
|
|
40324
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40387
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/calendar/writer.js
|
|
40325
40388
|
var EVENTS_NOTIFY_KEY = "events.notify";
|
|
40326
40389
|
var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
|
|
40327
40390
|
var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
|
|
@@ -40339,7 +40402,7 @@ var CALENDAR_WRITE_DEFAULTS = {
|
|
|
40339
40402
|
[EVENTS_REMIND_HOOK_KEY]: "deny"
|
|
40340
40403
|
};
|
|
40341
40404
|
|
|
40342
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40405
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
40343
40406
|
var communicationFields = {
|
|
40344
40407
|
sources: pipe(array(strictObject({
|
|
40345
40408
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -40371,7 +40434,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
40371
40434
|
return { ...input, after, before };
|
|
40372
40435
|
}, "communicationRequest");
|
|
40373
40436
|
|
|
40374
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40437
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
40375
40438
|
var MEETING_PREPARATION_LIMITS = {
|
|
40376
40439
|
meetings: { min: 1, max: 20, default: 5 },
|
|
40377
40440
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -40444,7 +40507,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
40444
40507
|
};
|
|
40445
40508
|
}, "validateMeetingPreparationRequest");
|
|
40446
40509
|
|
|
40447
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40510
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
40448
40511
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
40449
40512
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
40450
40513
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -40492,7 +40555,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
40492
40555
|
}
|
|
40493
40556
|
}, "validatePreparationCommunications");
|
|
40494
40557
|
|
|
40495
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40558
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
40496
40559
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
40497
40560
|
const installer = ports.installer();
|
|
40498
40561
|
const argv = updateCommand(installer, packageName);
|
|
@@ -40557,7 +40620,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
40557
40620
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
40558
40621
|
}, "dayAfter");
|
|
40559
40622
|
|
|
40560
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
40623
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
40561
40624
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
40562
40625
|
const pictures = picturesService(deps);
|
|
40563
40626
|
const base = {
|
|
@@ -40595,12 +40658,12 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
40595
40658
|
}, "servicesFor");
|
|
40596
40659
|
|
|
40597
40660
|
export {
|
|
40661
|
+
withTimeLimit,
|
|
40598
40662
|
communicationFields,
|
|
40599
40663
|
OFFLINE,
|
|
40600
40664
|
onlineDeps,
|
|
40601
40665
|
storedDeps,
|
|
40602
40666
|
storeModeDeps,
|
|
40603
|
-
withTimeLimit,
|
|
40604
40667
|
REGISTRIES,
|
|
40605
40668
|
registriesCover,
|
|
40606
40669
|
mailTurn,
|
|
@@ -40706,6 +40769,7 @@ export {
|
|
|
40706
40769
|
typedSendAs,
|
|
40707
40770
|
MAX_SEARCH_OFFSET,
|
|
40708
40771
|
searchStore,
|
|
40772
|
+
siteValue,
|
|
40709
40773
|
holdEnd,
|
|
40710
40774
|
floodPathFor,
|
|
40711
40775
|
FloodMemory,
|