@wirecat/amo-cli 0.5.0 → 0.6.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 +16 -0
- package/dist/amo/oauth.d.ts.map +1 -1
- package/dist/amo/oauth.js +3 -4
- package/dist/amo/oauth.js.map +1 -1
- package/dist/amo/transport.d.ts.map +1 -1
- package/dist/amo/transport.js +3 -6
- package/dist/amo/transport.js.map +1 -1
- package/dist/bin/amo.js +2 -2
- package/dist/bundle/agent-VVACEKSX.js +42 -0
- package/dist/bundle/{all-profiles-PIWUQWBA.js → all-profiles-QNUKL4NA.js} +7 -7
- package/dist/bundle/amo.js +18 -18
- package/dist/bundle/{anthropic-47CMXBPQ.js → anthropic-PQN6MNP7.js} +2 -2
- package/dist/bundle/{app-server-QRBQODF2.js → app-server-Q2QEA7GP.js} +64 -63
- package/dist/bundle/{areas-QVHVU57Z.js → areas-27FRPBF3.js} +28 -20
- package/dist/bundle/{bun-OPDGMZZQ.js → bun-F4M4KCNA.js} +2 -2
- package/dist/bundle/{bun-sqlite-7I4X7CZW.js → bun-sqlite-P5IDBDVR.js} +3 -3
- package/dist/bundle/{chunk-RN6RT5CB.js → chunk-22KAQPX7.js} +3 -3
- package/dist/bundle/{chunk-43OW5NTG.js → chunk-2JGNMZ55.js} +4 -4
- package/dist/bundle/{chunk-TAVI73RW.js → chunk-2VDHC7QO.js} +2 -2
- package/dist/bundle/{chunk-3DEQUYEG.js → chunk-34ZOMVUK.js} +7 -7
- package/dist/bundle/{chunk-EHK73OSW.js → chunk-3J3EDSXF.js} +19 -97
- package/dist/bundle/{chunk-JLXXUEAM.js → chunk-3TYER5IK.js} +13 -5
- package/dist/bundle/{chunk-MDEPJZYJ.js → chunk-5NGLCDYQ.js} +2 -2
- package/dist/bundle/{chunk-63N46DJU.js → chunk-5SQTHOBI.js} +203 -168
- package/dist/bundle/{chunk-5UTB3ADZ.js → chunk-6GE36KUE.js} +10 -10
- package/dist/bundle/{chunk-DVZ75WZJ.js → chunk-6GZKY3HV.js} +10 -10
- package/dist/bundle/{chunk-CGW5R4UD.js → chunk-6OV2TRGF.js} +6 -6
- package/dist/bundle/{chunk-NSKMNIY6.js → chunk-7CPIZFOE.js} +6 -6
- package/dist/bundle/{chunk-BVVMIAQ6.js → chunk-A5K2NU3K.js} +394 -341
- package/dist/bundle/{chunk-6D4VWSJD.js → chunk-AEC4H5WZ.js} +5 -5
- package/dist/bundle/{chunk-4VN7RI4I.js → chunk-APBEDWOE.js} +4 -4
- package/dist/bundle/{chunk-VB7FZOYX.js → chunk-AQ5RIOUE.js} +1 -1
- package/dist/bundle/{chunk-FV4GQNIK.js → chunk-B7L5MSRP.js} +2 -2
- package/dist/bundle/{chunk-VZ5PPYDG.js → chunk-C7JPYWYQ.js} +1 -1
- package/dist/bundle/{chunk-H4AFNENN.js → chunk-DIZEHPS6.js} +30 -26
- package/dist/bundle/{chunk-43PMSR33.js → chunk-DUPCDJ3W.js} +7 -7
- package/dist/bundle/{chunk-ABX7BBS4.js → chunk-DWT24UVR.js} +1 -1
- package/dist/bundle/chunk-DXWJORSY.js +1703 -0
- package/dist/bundle/{chunk-G2TU5RYY.js → chunk-DY3PLWIH.js} +1 -1
- package/dist/bundle/{chunk-RIMPFMZE.js → chunk-DYWHAJRK.js} +23 -15
- package/dist/bundle/{chunk-R53XXHEI.js → chunk-EXRM3ML4.js} +2 -2
- package/dist/bundle/{chunk-JG6LCSEX.js → chunk-FFER7KJI.js} +12 -12
- package/dist/bundle/{chunk-6JTHXWPE.js → chunk-FIP2DG7W.js} +2 -2
- package/dist/bundle/{chunk-3HC5F3P7.js → chunk-FTH6WGYO.js} +1 -1
- package/dist/bundle/{chunk-3GX6KM2E.js → chunk-FWRLGIF6.js} +63 -61
- package/dist/bundle/{chunk-3PYE55JY.js → chunk-FYOPPKAN.js} +1 -1
- package/dist/bundle/{chunk-K7YY6SXR.js → chunk-G3N2RHGF.js} +12 -12
- package/dist/bundle/{chunk-NISH4UXM.js → chunk-G46PNDWL.js} +1 -1
- package/dist/bundle/{chunk-LKH3UKLO.js → chunk-G6NY7LFB.js} +3 -3
- package/dist/bundle/{chunk-M6VZXAJC.js → chunk-GOCMJBEE.js} +2 -2
- package/dist/bundle/{chunk-ADTI5RUO.js → chunk-GRGCZSES.js} +5 -5
- package/dist/bundle/{chunk-6WS6GJ4V.js → chunk-GVSKLZRD.js} +1 -1
- package/dist/bundle/{chunk-Q7ICVP25.js → chunk-GZ7WBU5Y.js} +1 -1
- package/dist/bundle/{chunk-FNV5HLHX.js → chunk-HN2LCLGT.js} +18 -18
- 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-IDCZ4LWS.js +150 -0
- package/dist/bundle/{chunk-7IR2G5XY.js → chunk-IN3VL7UU.js} +15 -14
- package/dist/bundle/{chunk-NB7EOAUZ.js → chunk-ISQ23VKV.js} +1 -1
- package/dist/bundle/{chunk-633NQY2R.js → chunk-JVBCQHCS.js} +2 -2
- package/dist/bundle/{chunk-DQ6S5TFZ.js → chunk-K5W7YEHB.js} +61 -59
- package/dist/bundle/{chunk-LZPKBN3C.js → chunk-KAFSS35C.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-V2CNGXWX.js → chunk-LBZSURLL.js} +36 -36
- package/dist/bundle/{chunk-XEQQJBBO.js → chunk-LC7ZD2RW.js} +1 -1
- package/dist/bundle/{chunk-IB55P46L.js → chunk-LH6FJYMO.js} +4 -4
- package/dist/bundle/{chunk-HSPEU6S7.js → chunk-LJKINNWC.js} +6 -6
- package/dist/bundle/{chunk-GLYWZQY4.js → chunk-M36XP74N.js} +2 -2
- package/dist/bundle/chunk-MNPGZCKE.js +361 -0
- package/dist/bundle/{chunk-U5RJJ2EC.js → chunk-MRPMORLH.js} +7 -7
- package/dist/bundle/{chunk-57HFPNMF.js → chunk-NNREILWP.js} +6 -6
- package/dist/bundle/chunk-NSOY4FMN.js +159 -0
- package/dist/bundle/{chunk-2XBDILVW.js → chunk-OEEWVKJX.js} +1 -1
- package/dist/bundle/{chunk-6QGUK3H7.js → chunk-OGJFDKDL.js} +4 -4
- package/dist/bundle/{chunk-ZLUIRFJX.js → chunk-PATZAYFZ.js} +35 -362
- package/dist/bundle/{chunk-PPSAWFJD.js → chunk-PCR6GFNP.js} +39 -161
- package/dist/bundle/{chunk-XUT7DSM5.js → chunk-Q4MH2O5E.js} +2 -2
- package/dist/bundle/{chunk-AKRIUNYP.js → chunk-QQRJEWKB.js} +5 -5
- package/dist/bundle/{chunk-KZ2FIDI3.js → chunk-RNWUCAJJ.js} +2 -2
- package/dist/bundle/{chunk-BIKOE2IW.js → chunk-SDVUGWD7.js} +4 -4
- package/dist/bundle/{chunk-GDK7ETSB.js → chunk-SEFE6PGL.js} +10 -10
- package/dist/bundle/{chunk-WUFX4TKA.js → chunk-SWCJM3YD.js} +2 -2
- package/dist/bundle/{chunk-KEKXERBE.js → chunk-SYRDEMQE.js} +3664 -2704
- package/dist/bundle/{chunk-WXJYMMEL.js → chunk-SYYQZDHJ.js} +5 -5
- 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-S4ZHQMNM.js → chunk-U6XPWCWM.js} +3 -3
- package/dist/bundle/{chunk-W5JRXIG6.js → chunk-UFKC7TIX.js} +1213 -804
- package/dist/bundle/{chunk-XCCU2E3Z.js → chunk-UNWF3TH5.js} +3 -3
- package/dist/bundle/{chunk-UDSL3MUU.js → chunk-W3BOR6AT.js} +7 -7
- package/dist/bundle/{chunk-JXT6GY4V.js → chunk-X76RS6JO.js} +29 -9
- package/dist/bundle/{chunk-DSJ6EAOA.js → chunk-YF3S26TS.js} +51 -51
- package/dist/bundle/{chunk-TLG6ECZ2.js → chunk-ZCQ4H7CA.js} +1 -1
- package/dist/bundle/{chunk-D4NE7EON.js → chunk-ZOZV32IR.js} +2 -2
- package/dist/bundle/{chunk-7IWIFVXH.js → chunk-ZTKHXDEU.js} +3 -3
- package/dist/bundle/{cli-3NXOSENF.js → cli-EAD3WZLR.js} +81 -66
- package/dist/bundle/command-contract-SMEJ2ICG.js +40 -0
- package/dist/bundle/{command-server-entry-4ZQPNUL4.js → command-server-entry-YTZP6I4T.js} +25 -24
- package/dist/bundle/{decode-K7U7X5EL.js → decode-57BE5OBT.js} +2 -2
- package/dist/bundle/{echarts-O3TNDAXJ.js → echarts-QMAA7HH5.js} +2 -2
- package/dist/bundle/{embed-SWLVG73O.js → embed-NFGFYUO4.js} +3 -3
- package/dist/bundle/{embedder-EJN75BPV.js → embedder-SRBOJMXX.js} +6 -6
- package/dist/bundle/{first-run-WPGUUC4Z.js → first-run-HWRUL2GR.js} +6 -6
- package/dist/bundle/first-screen-ATN4D3FQ.js +41 -0
- package/dist/bundle/{instructions-AMH5RWVJ.js → instructions-4H7UREH2.js} +1 -1
- package/dist/bundle/meeting-combined-BGDEHCWY.js +26 -0
- package/dist/bundle/{meeting-model-YXXNETKC.js → meeting-model-WWGVRXPL.js} +8 -8
- package/dist/bundle/{meeting-semantic-U7EUB3ET.js → meeting-semantic-ZQ47BL2Z.js} +2 -2
- package/dist/bundle/{node-EGMCBAO7.js → node-P3PUHKYH.js} +2 -2
- package/dist/bundle/{node-sqlite-YVOGMDSP.js → node-sqlite-JOTSNH3P.js} +4 -4
- package/dist/bundle/{oauth-2SNRBIJM.js → oauth-XPSAL6VO.js} +4 -4
- package/dist/bundle/{open-ABCPY5IH.js → open-PO52FVA5.js} +2 -2
- package/dist/bundle/{openai-4D6PXJR7.js → openai-WITYLMY5.js} +12 -12
- package/dist/bundle/{process-SGHEN6MQ.js → process-AFIXYXWL.js} +1 -1
- package/dist/bundle/{program-CBDQBZZ3.js → program-JODTZNBZ.js} +107 -158
- package/dist/bundle/{prompt-2QUK5QST.js → prompt-XORLAXHY.js} +2 -2
- package/dist/bundle/{recognize-QMQSJRIH.js → recognize-JKMZHDYS.js} +1 -1
- package/dist/bundle/{remote-U7TC2BLZ.js → remote-3IMEJTEH.js} +6 -6
- package/dist/bundle/{rerank-5UPVXGVV.js → rerank-3F2E6NNN.js} +4 -4
- package/dist/bundle/{serve-VX6GUM6J.js → serve-6BWU3NMB.js} +6 -6
- package/dist/bundle/{server-FOPC6DJ3.js → server-GPSB5WFG.js} +56 -55
- package/dist/bundle/server-HMCC64ZU.js +88 -0
- package/dist/bundle/source-E72OS27D.js +47 -0
- package/dist/bundle/{sqlite-runtime-77NKDEXN.js → sqlite-runtime-YHYQDUXE.js} +3 -3
- package/dist/bundle/{state-X2HU6GB2.js → state-R7W4U6T4.js} +3 -3
- package/dist/bundle/{store-3CHPHFP7.js → store-HTVRL7FB.js} +51 -40
- package/dist/bundle/store-IWW6U6QN.js +34 -0
- package/dist/bundle/{store-2U4U6KL4.js → store-TBZ3ZS6H.js} +21 -19
- package/dist/bundle/store-maintenance-command-CJM2VLMW.js +75 -0
- package/dist/bundle/surface-5GBWNYBE.js +74 -0
- package/dist/bundle/writer-TW2Q55VJ.js +49 -0
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +1 -6
- package/dist/commands/session.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-EFMUK732.js +0 -41
- package/dist/bundle/chunk-IG2TJQJ7.js +0 -79
- package/dist/bundle/chunk-KZN2BG3P.js +0 -721
- package/dist/bundle/chunk-RRTMPSQR.js +0 -29
- package/dist/bundle/command-contract-LNSAV5LA.js +0 -39
- package/dist/bundle/first-screen-JMNEUQ46.js +0 -40
- package/dist/bundle/meeting-combined-5TKG2RYD.js +0 -24
- package/dist/bundle/server-OIVNOMVK.js +0 -87
- package/dist/bundle/source-HWS5SJIV.js +0 -46
- package/dist/bundle/store-Z3747L5F.js +0 -34
- package/dist/bundle/store-maintenance-command-UOSZJTVP.js +0 -74
- package/dist/bundle/surface-MUT72QON.js +0 -73
- package/dist/bundle/writer-RBKQ64ZM.js +0 -48
|
@@ -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
|
MAIL,
|
|
14
14
|
OWNER_NOTES,
|
|
@@ -21,23 +21,23 @@ import {
|
|
|
21
21
|
newSendId,
|
|
22
22
|
refusedPlace,
|
|
23
23
|
uploadSize
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FWRLGIF6.js";
|
|
25
25
|
import {
|
|
26
26
|
isNewer,
|
|
27
27
|
updateCommand
|
|
28
28
|
} from "./chunk-HOF7GQWW.js";
|
|
29
29
|
import {
|
|
30
30
|
capability
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GVSKLZRD.js";
|
|
32
32
|
import {
|
|
33
33
|
LIST_QUERY_GUIDE,
|
|
34
34
|
dateWindow,
|
|
35
35
|
momentOf
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-G3N2RHGF.js";
|
|
37
37
|
import {
|
|
38
38
|
hide,
|
|
39
39
|
isHidden
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HUAHLO6N.js";
|
|
41
41
|
import {
|
|
42
42
|
EmptyAnswer,
|
|
43
43
|
MAX_MODEL_IMAGE_BYTES,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
range,
|
|
47
47
|
systemFor,
|
|
48
48
|
validateImages
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-EXRM3ML4.js";
|
|
50
50
|
import {
|
|
51
51
|
anyOfTerms,
|
|
52
52
|
isFunctionWord,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
questionText,
|
|
58
58
|
resolveMeetingSelection,
|
|
59
59
|
words
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-6GE36KUE.js";
|
|
61
61
|
import {
|
|
62
62
|
DEFAULT_IMAGE_MODEL,
|
|
63
63
|
LINK,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
sentIds,
|
|
80
80
|
tagging,
|
|
81
81
|
task
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-5SQTHOBI.js";
|
|
83
83
|
import {
|
|
84
84
|
CustomTextModelShape,
|
|
85
85
|
DEFAULT_RERANK_MODEL,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
textModels,
|
|
94
94
|
vectorModelKey,
|
|
95
95
|
writeTextModelsSection
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-LH6FJYMO.js";
|
|
97
97
|
import {
|
|
98
98
|
AGENDA_COLUMNS,
|
|
99
99
|
BUSINESS_FIND_MAX,
|
|
@@ -103,15 +103,13 @@ import {
|
|
|
103
103
|
CONTEXT_MAX_READ_BYTES,
|
|
104
104
|
CONVERSATION_COLUMNS,
|
|
105
105
|
MAIL_AGENDA_COLUMNS,
|
|
106
|
-
MAX_FILE_BYTES,
|
|
107
106
|
MAX_TEXT_CHARS,
|
|
108
107
|
MENTION_QUERY,
|
|
109
108
|
NOT_FILES,
|
|
110
109
|
PRESET_VERSION,
|
|
111
|
-
STOP_WORDS,
|
|
112
110
|
TASK_RELATION_KINDS,
|
|
113
111
|
TRACKED_CHAT_COLUMNS,
|
|
114
|
-
|
|
112
|
+
asBytes,
|
|
115
113
|
attachmentColumns,
|
|
116
114
|
attachmentMaxBytes,
|
|
117
115
|
calendarKey,
|
|
@@ -124,7 +122,6 @@ import {
|
|
|
124
122
|
correctWords,
|
|
125
123
|
cutChunks,
|
|
126
124
|
delayStats,
|
|
127
|
-
dueDayOf,
|
|
128
125
|
fetchedKey,
|
|
129
126
|
foldedWords,
|
|
130
127
|
googleDocumentLinks,
|
|
@@ -132,7 +129,6 @@ import {
|
|
|
132
129
|
hasText,
|
|
133
130
|
historyStartKey,
|
|
134
131
|
hitFiles,
|
|
135
|
-
inboxKey,
|
|
136
132
|
isStemmed,
|
|
137
133
|
matchDownloads,
|
|
138
134
|
messageOfEmail,
|
|
@@ -142,61 +138,69 @@ import {
|
|
|
142
138
|
profilesOn,
|
|
143
139
|
queryFilter,
|
|
144
140
|
rankingContextRange,
|
|
141
|
+
readWhole,
|
|
145
142
|
respelled,
|
|
143
|
+
sizeText,
|
|
146
144
|
threadConversation,
|
|
147
145
|
trackerBodyOf,
|
|
148
|
-
trackerTitleOf
|
|
149
|
-
|
|
150
|
-
} from "./chunk-KEKXERBE.js";
|
|
151
|
-
import {
|
|
152
|
-
DEFAULT_STEMMERS,
|
|
153
|
-
createStemmer,
|
|
154
|
-
cutsDeep
|
|
155
|
-
} from "./chunk-UDSL3MUU.js";
|
|
146
|
+
trackerTitleOf
|
|
147
|
+
} from "./chunk-SYRDEMQE.js";
|
|
156
148
|
import {
|
|
157
149
|
MINUTE,
|
|
158
150
|
YEAR,
|
|
159
151
|
aheadOf
|
|
160
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-JVBCQHCS.js";
|
|
161
153
|
import {
|
|
162
154
|
FIELD_VERSION,
|
|
163
155
|
RRF_K,
|
|
156
|
+
STOP_WORDS,
|
|
157
|
+
amountsOf,
|
|
158
|
+
dueDayOf,
|
|
164
159
|
fuseRanked,
|
|
160
|
+
inboxKey,
|
|
165
161
|
isPresence,
|
|
166
162
|
plainQuery,
|
|
167
163
|
validateAst,
|
|
168
|
-
validateFields
|
|
169
|
-
|
|
164
|
+
validateFields,
|
|
165
|
+
withoutField
|
|
166
|
+
} from "./chunk-DXWJORSY.js";
|
|
167
|
+
import {
|
|
168
|
+
DEFAULT_STEMMERS,
|
|
169
|
+
createStemmer,
|
|
170
|
+
cutsDeep
|
|
171
|
+
} from "./chunk-W3BOR6AT.js";
|
|
170
172
|
import {
|
|
171
|
-
TASK_KINDS,
|
|
172
|
-
TASK_STATES,
|
|
173
|
-
createTaskService,
|
|
174
173
|
entriesOfList,
|
|
175
174
|
fitting,
|
|
176
175
|
inSource,
|
|
177
|
-
isClosedState,
|
|
178
176
|
listedHolds,
|
|
179
177
|
sourceOf,
|
|
180
178
|
sourceOf3 as sourceOf2,
|
|
181
179
|
typedCommand,
|
|
182
180
|
withAttempt
|
|
183
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-PCR6GFNP.js";
|
|
184
182
|
import {
|
|
185
183
|
isCliFailure,
|
|
186
184
|
sqliteCode
|
|
187
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-3TYER5IK.js";
|
|
186
|
+
import {
|
|
187
|
+
TASK_KINDS,
|
|
188
|
+
TASK_STATES,
|
|
189
|
+
createTaskService,
|
|
190
|
+
isClosedState
|
|
191
|
+
} from "./chunk-IDCZ4LWS.js";
|
|
188
192
|
import {
|
|
189
193
|
localOnly,
|
|
190
194
|
refuseOffComputer,
|
|
191
195
|
remoteKey
|
|
192
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-34ZOMVUK.js";
|
|
193
197
|
import {
|
|
194
198
|
PLAIN_HTTP_REFUSED,
|
|
195
199
|
endpoint,
|
|
196
200
|
endpointFetch,
|
|
197
201
|
modelAddressAllowed,
|
|
198
202
|
onThisComputer
|
|
199
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-DY3PLWIH.js";
|
|
200
204
|
import {
|
|
201
205
|
Unzip,
|
|
202
206
|
UnzipInflate,
|
|
@@ -207,11 +211,11 @@ import {
|
|
|
207
211
|
placedText,
|
|
208
212
|
runEmbedders,
|
|
209
213
|
textModelsDirectory
|
|
210
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-GRGCZSES.js";
|
|
211
215
|
import {
|
|
212
216
|
installFiles,
|
|
213
217
|
megabytes
|
|
214
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-UNWF3TH5.js";
|
|
215
219
|
import {
|
|
216
220
|
MAX_ACTIONS,
|
|
217
221
|
ModerationRules,
|
|
@@ -225,7 +229,7 @@ import {
|
|
|
225
229
|
someUndone,
|
|
226
230
|
validateFormattedText,
|
|
227
231
|
visibleFormattedText
|
|
228
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-7CPIZFOE.js";
|
|
229
233
|
import {
|
|
230
234
|
COUNTER_FIELDS,
|
|
231
235
|
RANKING_TOKENIZER_VERSION,
|
|
@@ -242,7 +246,7 @@ import {
|
|
|
242
246
|
pickPerson,
|
|
243
247
|
rankingOptions,
|
|
244
248
|
rankingQuestion
|
|
245
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-3J3EDSXF.js";
|
|
246
250
|
import {
|
|
247
251
|
MESSAGE_PARSING,
|
|
248
252
|
QUERY_LIMITS,
|
|
@@ -252,11 +256,14 @@ import {
|
|
|
252
256
|
isQueryLimit,
|
|
253
257
|
outOfTime,
|
|
254
258
|
searchError
|
|
255
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-NSOY4FMN.js";
|
|
256
260
|
import {
|
|
257
261
|
fold,
|
|
258
262
|
normalize
|
|
259
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-HO4JGD4Q.js";
|
|
264
|
+
import {
|
|
265
|
+
isUsable
|
|
266
|
+
} from "./chunk-MNPGZCKE.js";
|
|
260
267
|
import {
|
|
261
268
|
INTERNAL_NOTES,
|
|
262
269
|
UNKNOWN_PROVIDER,
|
|
@@ -268,14 +275,11 @@ import {
|
|
|
268
275
|
isFolderProvider,
|
|
269
276
|
isImportedProvider,
|
|
270
277
|
isLocator,
|
|
271
|
-
isUsable,
|
|
272
278
|
kindIn,
|
|
279
|
+
normalizeTag,
|
|
273
280
|
parseLocator,
|
|
274
281
|
parseReference
|
|
275
|
-
} from "./chunk-
|
|
276
|
-
import {
|
|
277
|
-
normalizeTag
|
|
278
|
-
} from "./chunk-RRTMPSQR.js";
|
|
282
|
+
} from "./chunk-PATZAYFZ.js";
|
|
279
283
|
import {
|
|
280
284
|
OPERATORS_BY_TYPE,
|
|
281
285
|
READ_BUDGET_EXCEEDED,
|
|
@@ -300,17 +304,17 @@ import {
|
|
|
300
304
|
validateQuery,
|
|
301
305
|
walkQuery,
|
|
302
306
|
windowOf
|
|
303
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-YF3S26TS.js";
|
|
304
308
|
import {
|
|
305
309
|
DEFAULT_TASK_CATEGORIES,
|
|
306
310
|
FALLBACK_CATEGORY,
|
|
307
311
|
readSharedSection,
|
|
308
312
|
sharedConfigPath,
|
|
309
313
|
writeSharedSection
|
|
310
|
-
} from "./chunk-
|
|
314
|
+
} from "./chunk-QQRJEWKB.js";
|
|
311
315
|
import {
|
|
312
316
|
storePath
|
|
313
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-ZCQ4H7CA.js";
|
|
314
318
|
import {
|
|
315
319
|
Credentials,
|
|
316
320
|
pathsAreOverridden,
|
|
@@ -16966,10 +16970,26 @@ var require_lib3 = __commonJS({
|
|
|
16966
16970
|
}
|
|
16967
16971
|
});
|
|
16968
16972
|
|
|
16969
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
16973
|
+
// 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
|
|
16974
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
16975
|
+
const controller = new AbortController();
|
|
16976
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
16977
|
+
timer.unref();
|
|
16978
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
16979
|
+
}, "timeLimit");
|
|
16980
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
16981
|
+
const limit = timeLimit(ms);
|
|
16982
|
+
try {
|
|
16983
|
+
return await run2(limit.signal);
|
|
16984
|
+
} finally {
|
|
16985
|
+
limit.clear();
|
|
16986
|
+
}
|
|
16987
|
+
}, "withTimeLimit");
|
|
16988
|
+
|
|
16989
|
+
// 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
|
|
16970
16990
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16971
16991
|
|
|
16972
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
16992
|
+
// 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
|
|
16973
16993
|
var LINKS = /https?:\/\/\S+/g;
|
|
16974
16994
|
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");
|
|
16975
16995
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -16999,7 +17019,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
16999
17019
|
});
|
|
17000
17020
|
}, "questions");
|
|
17001
17021
|
|
|
17002
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17022
|
+
// 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
|
|
17003
17023
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17004
17024
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17005
17025
|
const name = typed.trim().toLowerCase();
|
|
@@ -17056,7 +17076,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
17056
17076
|
return best.name;
|
|
17057
17077
|
}, "categorize");
|
|
17058
17078
|
|
|
17059
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17079
|
+
// 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
|
|
17060
17080
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
17061
17081
|
var RULES_IN = {
|
|
17062
17082
|
dialog: "all",
|
|
@@ -17262,7 +17282,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
17262
17282
|
return passes;
|
|
17263
17283
|
}, "applyTaskRulesToChats");
|
|
17264
17284
|
|
|
17265
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17285
|
+
// 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
|
|
17266
17286
|
var RULES_VERSION = 6;
|
|
17267
17287
|
var LOOK_BACK = 50;
|
|
17268
17288
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17360,7 +17380,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
17360
17380
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17361
17381
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17362
17382
|
|
|
17363
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17383
|
+
// 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
|
|
17364
17384
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17365
17385
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17366
17386
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17422,7 +17442,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17422
17442
|
}), "storedDeps");
|
|
17423
17443
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17424
17444
|
|
|
17425
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17445
|
+
// 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
|
|
17426
17446
|
var DAY_MS = 864e5;
|
|
17427
17447
|
var NEW_DAYS = 30;
|
|
17428
17448
|
var SAME_TEXT_MIN = 20;
|
|
@@ -17499,23 +17519,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17499
17519
|
};
|
|
17500
17520
|
}, "scorePerson");
|
|
17501
17521
|
|
|
17502
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17503
|
-
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
17504
|
-
const controller = new AbortController();
|
|
17505
|
-
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
17506
|
-
timer.unref();
|
|
17507
|
-
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
17508
|
-
}, "timeLimit");
|
|
17509
|
-
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
17510
|
-
const limit = timeLimit(ms);
|
|
17511
|
-
try {
|
|
17512
|
-
return await run2(limit.signal);
|
|
17513
|
-
} finally {
|
|
17514
|
-
limit.clear();
|
|
17515
|
-
}
|
|
17516
|
-
}, "withTimeLimit");
|
|
17517
|
-
|
|
17518
|
-
// 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
|
|
17522
|
+
// 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
|
|
17519
17523
|
var REGISTRIES = {
|
|
17520
17524
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
17521
17525
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -17602,7 +17606,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
17602
17606
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
17603
17607
|
})), "notCovered");
|
|
17604
17608
|
|
|
17605
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17609
|
+
// 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
|
|
17606
17610
|
var ACTIVITY_MESSAGES = 1e3;
|
|
17607
17611
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
17608
17612
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -17690,7 +17694,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
17690
17694
|
};
|
|
17691
17695
|
}, "botCheckService");
|
|
17692
17696
|
|
|
17693
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17697
|
+
// 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
|
|
17694
17698
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
17695
17699
|
if (value === void 0)
|
|
17696
17700
|
return void 0;
|
|
@@ -17700,7 +17704,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
17700
17704
|
return id2;
|
|
17701
17705
|
}, "threadIdOf");
|
|
17702
17706
|
|
|
17703
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17707
|
+
// 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
|
|
17704
17708
|
var TOP_POSTS = 5;
|
|
17705
17709
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
17706
17710
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -17817,7 +17821,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
17817
17821
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
17818
17822
|
}, "median");
|
|
17819
17823
|
|
|
17820
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17824
|
+
// 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
|
|
17821
17825
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
17822
17826
|
const events = [];
|
|
17823
17827
|
for (const stay of stays) {
|
|
@@ -17849,7 +17853,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
17849
17853
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
17850
17854
|
}, "memberEvents");
|
|
17851
17855
|
|
|
17852
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17856
|
+
// 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
|
|
17853
17857
|
var AUDIT_PAGE = 200;
|
|
17854
17858
|
var AUDIT_BUDGET = 10;
|
|
17855
17859
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17929,7 +17933,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17929
17933
|
return found;
|
|
17930
17934
|
}, "burstJoins");
|
|
17931
17935
|
|
|
17932
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
17936
|
+
// 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
|
|
17933
17937
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
17934
17938
|
if (deps.reads !== "store")
|
|
17935
17939
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18130,7 +18134,7 @@ var chatsMatchingIn = /* @__PURE__ */ __name(async (store, accounts, pattern) =>
|
|
|
18130
18134
|
}, "chatsMatchingIn");
|
|
18131
18135
|
var isText = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "", "isText");
|
|
18132
18136
|
|
|
18133
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18137
|
+
// 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
|
|
18134
18138
|
var EVENTS_DAYS = 7;
|
|
18135
18139
|
var TRACKED_DAYS = 30;
|
|
18136
18140
|
var STATS_PAGE = 1e3;
|
|
@@ -18366,8 +18370,8 @@ var readInStore = /* @__PURE__ */ __name(async (deps, chatId, kind, until) => {
|
|
|
18366
18370
|
const store = await accountStoreIfOpen(deps);
|
|
18367
18371
|
if (!store)
|
|
18368
18372
|
return;
|
|
18369
|
-
const [
|
|
18370
|
-
if (
|
|
18373
|
+
const [newest2] = (await store.messages.messages(chatId, { limit: 1, outgoing: false })).items;
|
|
18374
|
+
if (newest2 !== void 0 && (until === void 0 || newest2.id === until))
|
|
18371
18375
|
await unlessBusy(() => store.chats.saveChats([{ id: chatId, kind, unreadCount: 0, markedUnread: false }]));
|
|
18372
18376
|
}, "readInStore");
|
|
18373
18377
|
var storedFacts = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
@@ -18425,7 +18429,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
18425
18429
|
return members.length === 0 ? null : members;
|
|
18426
18430
|
}, "storedMembers");
|
|
18427
18431
|
|
|
18428
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18432
|
+
// 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
|
|
18429
18433
|
var INBOX_CHATS = 20;
|
|
18430
18434
|
var REVIEW_DAYS = 3;
|
|
18431
18435
|
var UNANSWERED_HOURS = 24;
|
|
@@ -18437,9 +18441,9 @@ var everyChat = /* @__PURE__ */ __name((adapter) => adapter.unreadChats ? adapte
|
|
|
18437
18441
|
var leftOf = /* @__PURE__ */ __name((page) => page.left?.length ? { left: page.left } : {}, "leftOf");
|
|
18438
18442
|
var storeReader = /* @__PURE__ */ __name((deps, store, account) => ({
|
|
18439
18443
|
chats: /* @__PURE__ */ __name(async ({ limit, offset }) => {
|
|
18440
|
-
const
|
|
18444
|
+
const newest2 = new Map((await store.chats.chatStats(account)).map((one) => [one.chatId, one.newestAt]));
|
|
18441
18445
|
const all = byRecency((await store.chats.chats(account, {})).items.map((chat) => {
|
|
18442
|
-
const at =
|
|
18446
|
+
const at = newest2.get(chat.id) ?? null;
|
|
18443
18447
|
const later = at !== null && (chat.lastMessageAt === null || Date.parse(at) > Date.parse(chat.lastMessageAt));
|
|
18444
18448
|
return later ? { ...chat, lastMessageAt: at } : chat;
|
|
18445
18449
|
}));
|
|
@@ -18476,9 +18480,9 @@ var unreadIn = /* @__PURE__ */ __name(async (adapter, { limit, all = false, kind
|
|
|
18476
18480
|
for (const { id: id2, title, kind, unreadCount } of read) {
|
|
18477
18481
|
const count3 = unreadCount ?? 0;
|
|
18478
18482
|
if (count3 === 0) {
|
|
18479
|
-
const
|
|
18480
|
-
if (
|
|
18481
|
-
chats.push({ id: id2, title, kind, unreadCount, messages: [
|
|
18483
|
+
const newest2 = (await adapter.history(id2, { limit })).items.findLast((message) => !message.outgoing);
|
|
18484
|
+
if (newest2)
|
|
18485
|
+
chats.push({ id: id2, title, kind, unreadCount, messages: [newest2], more: false });
|
|
18482
18486
|
continue;
|
|
18483
18487
|
}
|
|
18484
18488
|
const wanted = Math.min(count3, limit);
|
|
@@ -18637,7 +18641,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
18637
18641
|
};
|
|
18638
18642
|
}, "inboxService");
|
|
18639
18643
|
|
|
18640
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18644
|
+
// 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
|
|
18641
18645
|
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");
|
|
18642
18646
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {}) => {
|
|
18643
18647
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -18653,7 +18657,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {})
|
|
|
18653
18657
|
}, "excerpt");
|
|
18654
18658
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
18655
18659
|
|
|
18656
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18660
|
+
// 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
|
|
18657
18661
|
var SCAN = 1e3;
|
|
18658
18662
|
var SNIPPET = 200;
|
|
18659
18663
|
var SNIPPET_ROWS = 6;
|
|
@@ -18684,9 +18688,9 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
18684
18688
|
found.set(key, held);
|
|
18685
18689
|
}
|
|
18686
18690
|
}
|
|
18687
|
-
const
|
|
18691
|
+
const newest2 = [...found.values()].sort((a, b) => b.at - a.at || b.meetingId - a.meetingId);
|
|
18688
18692
|
const items = [];
|
|
18689
|
-
for (const { accountId, meetingId, people: who } of
|
|
18693
|
+
for (const { accountId, meetingId, people: who } of newest2.slice(0, limit)) {
|
|
18690
18694
|
const meeting = await store.meetings.meetingMetadata({ accountId, meetingId }).catch(() => void 0);
|
|
18691
18695
|
if (meeting === void 0 || meeting.deletedAt !== null)
|
|
18692
18696
|
continue;
|
|
@@ -18715,10 +18719,10 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
18715
18719
|
...call ? { call } : {}
|
|
18716
18720
|
});
|
|
18717
18721
|
}
|
|
18718
|
-
return { items, total:
|
|
18722
|
+
return { items, total: newest2.length, hasMore: cut || newest2.length > limit };
|
|
18719
18723
|
}, "personMeetings");
|
|
18720
18724
|
|
|
18721
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
18725
|
+
// 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
|
|
18722
18726
|
var CONTEXT_MESSAGES = 10;
|
|
18723
18727
|
var CONTEXT_BYTES = 64 * 1024;
|
|
18724
18728
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -18865,13 +18869,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record, reads, readable
|
|
|
18865
18869
|
cut ||= page.hasMore;
|
|
18866
18870
|
if (page.hasMore)
|
|
18867
18871
|
for (const outgoing of [true, false]) {
|
|
18868
|
-
const [
|
|
18872
|
+
const [newest2] = (await store.messages.messages(key, dialog.id, {
|
|
18869
18873
|
limit: 1,
|
|
18870
18874
|
outgoing,
|
|
18871
18875
|
...since === void 0 ? {} : { since: new Date(since).toISOString() }
|
|
18872
18876
|
})).items;
|
|
18873
|
-
if (
|
|
18874
|
-
beyond.push(toContext(key,
|
|
18877
|
+
if (newest2)
|
|
18878
|
+
beyond.push(toContext(key, newest2, dialog.title));
|
|
18875
18879
|
}
|
|
18876
18880
|
}
|
|
18877
18881
|
if (key.provider === "email") {
|
|
@@ -19024,10 +19028,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
19024
19028
|
};
|
|
19025
19029
|
}, "personMessages");
|
|
19026
19030
|
|
|
19027
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19031
|
+
// 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
|
|
19028
19032
|
import { createHash } from "node:crypto";
|
|
19029
19033
|
|
|
19030
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19034
|
+
// 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
|
|
19031
19035
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
19032
19036
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options2 = {}) => {
|
|
19033
19037
|
const parsed = parseMeetingReference(reference);
|
|
@@ -19045,7 +19049,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
19045
19049
|
return { parsed, meeting };
|
|
19046
19050
|
}, "authorizedMeetingMetadata");
|
|
19047
19051
|
|
|
19048
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19052
|
+
// 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
|
|
19049
19053
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
19050
19054
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
19051
19055
|
if (signal?.aborted)
|
|
@@ -19244,7 +19248,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
19244
19248
|
return { ...packet, fingerprint: hash(packet) };
|
|
19245
19249
|
}, "readMeetingEvidence");
|
|
19246
19250
|
|
|
19247
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19251
|
+
// 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
|
|
19248
19252
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options2) => {
|
|
19249
19253
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options2;
|
|
19250
19254
|
const requestedAccounts = options2.accountIds;
|
|
@@ -19343,7 +19347,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
19343
19347
|
};
|
|
19344
19348
|
}, "personMeetingContext");
|
|
19345
19349
|
|
|
19346
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19350
|
+
// 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
|
|
19347
19351
|
var PREPARE_BYTES = 96 * 1024;
|
|
19348
19352
|
var MEETINGS = 5;
|
|
19349
19353
|
var CUES = 3;
|
|
@@ -19375,14 +19379,14 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
19375
19379
|
const waiting = [];
|
|
19376
19380
|
for (const chat of context2.shared.filter((one) => one.kind === "dialog")) {
|
|
19377
19381
|
const key = { provider: chat.provider, account: chat.account };
|
|
19378
|
-
const [
|
|
19379
|
-
if (
|
|
19382
|
+
const [newest2] = (await store.messages.messages(key, chat.chatId, { limit: 1 })).items;
|
|
19383
|
+
if (newest2?.outgoing !== false)
|
|
19380
19384
|
continue;
|
|
19381
19385
|
waiting.push({
|
|
19382
19386
|
...key,
|
|
19383
19387
|
chatId: chat.chatId,
|
|
19384
19388
|
title: chat.title,
|
|
19385
|
-
message: toContext(key,
|
|
19389
|
+
message: toContext(key, newest2, chat.title),
|
|
19386
19390
|
partial: partial.has(`${chat.provider}/${chat.account}/${chat.chatId}`)
|
|
19387
19391
|
});
|
|
19388
19392
|
}
|
|
@@ -19466,7 +19470,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
19466
19470
|
}
|
|
19467
19471
|
}, "meetingsOf");
|
|
19468
19472
|
|
|
19469
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19473
|
+
// 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
|
|
19470
19474
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
19471
19475
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
19472
19476
|
const held = await storeIfOpen(deps);
|
|
@@ -19536,7 +19540,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
19536
19540
|
complete: false
|
|
19537
19541
|
})), "quiet");
|
|
19538
19542
|
|
|
19539
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19543
|
+
// 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
|
|
19540
19544
|
var TIMELINE_ITEMS = 50;
|
|
19541
19545
|
var TIMELINE_MAX = 500;
|
|
19542
19546
|
var SCOPES = ["personal", "work"];
|
|
@@ -19598,7 +19602,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
19598
19602
|
};
|
|
19599
19603
|
}, "personTimeline");
|
|
19600
19604
|
|
|
19601
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19605
|
+
// 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
|
|
19602
19606
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
19603
19607
|
const ids = [...new Set(chatIds)];
|
|
19604
19608
|
if (ids.length === 0)
|
|
@@ -19624,7 +19628,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
19624
19628
|
}));
|
|
19625
19629
|
}, "chatCoverage");
|
|
19626
19630
|
|
|
19627
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19631
|
+
// 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
|
|
19628
19632
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19629
19633
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19630
19634
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -19688,7 +19692,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19688
19692
|
}
|
|
19689
19693
|
}, "validateContextEvidencePage");
|
|
19690
19694
|
|
|
19691
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19695
|
+
// 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
|
|
19692
19696
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19693
19697
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19694
19698
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19741,7 +19745,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19741
19745
|
};
|
|
19742
19746
|
}, "contextReadBudget");
|
|
19743
19747
|
|
|
19744
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19748
|
+
// 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
|
|
19745
19749
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19746
19750
|
if (!port || typeof port.read !== "function")
|
|
19747
19751
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19785,7 +19789,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19785
19789
|
};
|
|
19786
19790
|
}, "createContextEvidenceReader");
|
|
19787
19791
|
|
|
19788
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19792
|
+
// 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
|
|
19789
19793
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
19790
19794
|
async around(ref, window2) {
|
|
19791
19795
|
const at = parseLocator(ref);
|
|
@@ -19880,7 +19884,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19880
19884
|
};
|
|
19881
19885
|
}, "storedNeighbours");
|
|
19882
19886
|
|
|
19883
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
19887
|
+
// 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
|
|
19884
19888
|
import { createHash as createHash2 } from "node:crypto";
|
|
19885
19889
|
var DAY = 864e5;
|
|
19886
19890
|
var MAX_TIME = 864e13;
|
|
@@ -20196,7 +20200,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
20196
20200
|
return value;
|
|
20197
20201
|
}, "decodeCheckpoint");
|
|
20198
20202
|
|
|
20199
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20203
|
+
// 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
|
|
20200
20204
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
20201
20205
|
var PAGE = 20;
|
|
20202
20206
|
var PEOPLE = 20;
|
|
@@ -20600,7 +20604,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
20600
20604
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
20601
20605
|
}, "peopleOf");
|
|
20602
20606
|
|
|
20603
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20607
|
+
// 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
|
|
20604
20608
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
20605
20609
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
20606
20610
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -20644,7 +20648,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
20644
20648
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
20645
20649
|
}, "matchVocabularyTerms");
|
|
20646
20650
|
|
|
20647
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20651
|
+
// 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
|
|
20648
20652
|
var KINDS = ["project", "tag", "topic"];
|
|
20649
20653
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options2 = {}) => {
|
|
20650
20654
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -20699,7 +20703,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
20699
20703
|
};
|
|
20700
20704
|
}, "findEvidenceMentions");
|
|
20701
20705
|
|
|
20702
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20706
|
+
// 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
|
|
20703
20707
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20704
20708
|
var DEFAULT_PURPOSES = ["work"];
|
|
20705
20709
|
var LINK_PURPOSE = "work";
|
|
@@ -20729,10 +20733,10 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
20729
20733
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
20730
20734
|
], "purposeList");
|
|
20731
20735
|
|
|
20732
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
20736
|
+
// 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
|
|
20733
20737
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
20734
20738
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
20735
|
-
const [messages,
|
|
20739
|
+
const [messages, newest2, oldest] = await Promise.all([
|
|
20736
20740
|
store.messages.countMessages(account, chatId, window2),
|
|
20737
20741
|
store.messages.messages(account, chatId, { limit: 1, since: window2.since, until: until - 1 }),
|
|
20738
20742
|
store.messages.messages(account, chatId, { limit: 1, after: { time: since - 1 }, until: until - 1 })
|
|
@@ -20740,7 +20744,7 @@ var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId,
|
|
|
20740
20744
|
return {
|
|
20741
20745
|
messages,
|
|
20742
20746
|
firstAt: oldest.items[0]?.timestamp ?? null,
|
|
20743
|
-
lastAt:
|
|
20747
|
+
lastAt: newest2.items.at(-1)?.timestamp ?? null
|
|
20744
20748
|
};
|
|
20745
20749
|
}, "storedChatCount");
|
|
20746
20750
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
@@ -21040,7 +21044,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
21040
21044
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
21041
21045
|
}, "purposeHintOf");
|
|
21042
21046
|
|
|
21043
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21047
|
+
// 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
|
|
21044
21048
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21045
21049
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21046
21050
|
const held = await storeIfOpen(deps);
|
|
@@ -21305,7 +21309,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
21305
21309
|
return rest;
|
|
21306
21310
|
}, "withoutPhone");
|
|
21307
21311
|
|
|
21308
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21312
|
+
// 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
|
|
21309
21313
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
21310
21314
|
var PERIOD_FIELD = "created";
|
|
21311
21315
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -21436,7 +21440,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
21436
21440
|
}));
|
|
21437
21441
|
}, "meetingNames");
|
|
21438
21442
|
|
|
21439
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21443
|
+
// 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
|
|
21440
21444
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
21441
21445
|
const tags = /* @__PURE__ */ new Map();
|
|
21442
21446
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -21445,7 +21449,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
21445
21449
|
return tags;
|
|
21446
21450
|
}, "taskTagFilters");
|
|
21447
21451
|
|
|
21448
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21452
|
+
// 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
|
|
21449
21453
|
var TASK_QUERY = {
|
|
21450
21454
|
entity: "task",
|
|
21451
21455
|
backend: "sql",
|
|
@@ -21945,7 +21949,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
21945
21949
|
};
|
|
21946
21950
|
}, "taskView");
|
|
21947
21951
|
|
|
21948
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
21952
|
+
// 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
|
|
21949
21953
|
var COMMAND_NEEDS = {
|
|
21950
21954
|
"account update": ["updateProfile", "change the profile"],
|
|
21951
21955
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -22010,7 +22014,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
22010
22014
|
return group;
|
|
22011
22015
|
}, "hideNever");
|
|
22012
22016
|
|
|
22013
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22017
|
+
// 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
|
|
22014
22018
|
var communicationFields = {
|
|
22015
22019
|
sources: pipe(array(strictObject({
|
|
22016
22020
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -22042,16 +22046,16 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
22042
22046
|
return { ...input, after, before };
|
|
22043
22047
|
}, "communicationRequest");
|
|
22044
22048
|
|
|
22045
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22046
|
-
var mailTurn = /* @__PURE__ */ __name((
|
|
22047
|
-
if (
|
|
22049
|
+
// 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
|
|
22050
|
+
var mailTurn = /* @__PURE__ */ __name((newest2) => {
|
|
22051
|
+
if (newest2 === null)
|
|
22048
22052
|
return null;
|
|
22049
|
-
if (
|
|
22053
|
+
if (newest2.outgoing)
|
|
22050
22054
|
return "waiting";
|
|
22051
|
-
return
|
|
22055
|
+
return newest2.addressed ? "owed" : null;
|
|
22052
22056
|
}, "mailTurn");
|
|
22053
22057
|
|
|
22054
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22058
|
+
// 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
|
|
22055
22059
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
22056
22060
|
if (error instanceof CliError && error.code === "not_found")
|
|
22057
22061
|
return void 0;
|
|
@@ -22085,7 +22089,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22085
22089
|
storedAt: synced?.at ?? null,
|
|
22086
22090
|
coverage: /* @__PURE__ */ __name((ids) => ids.map((chatId) => {
|
|
22087
22091
|
const thread = byId2.get(chatId);
|
|
22088
|
-
const
|
|
22092
|
+
const newest2 = thread?.newest?.at ?? thread?.lastEmailAt;
|
|
22089
22093
|
const until = window2.until === void 0 ? Number.NaN : Date.parse(window2.until);
|
|
22090
22094
|
return {
|
|
22091
22095
|
chatId,
|
|
@@ -22094,7 +22098,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22094
22098
|
chatId,
|
|
22095
22099
|
// Sync holds a window of the mailbox, never a thread's whole history.
|
|
22096
22100
|
state: synced ? "partial" : "unknown",
|
|
22097
|
-
upToDate: window2.state === "window" &&
|
|
22101
|
+
upToDate: window2.state === "window" && newest2 !== void 0 && !Number.isNaN(until) ? newest2 <= until : null,
|
|
22098
22102
|
gaps: false,
|
|
22099
22103
|
reachesStart: false,
|
|
22100
22104
|
fetchedAt: synced?.at ?? null
|
|
@@ -22102,14 +22106,14 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22102
22106
|
held: {
|
|
22103
22107
|
messages: thread?.emails ?? 0,
|
|
22104
22108
|
oldestAt: null,
|
|
22105
|
-
newestAt:
|
|
22109
|
+
newestAt: newest2 === void 0 ? null : new Date(newest2).toISOString()
|
|
22106
22110
|
}
|
|
22107
22111
|
};
|
|
22108
22112
|
}), "coverage")
|
|
22109
22113
|
};
|
|
22110
22114
|
}, "mailActivity");
|
|
22111
22115
|
|
|
22112
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22116
|
+
// 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
|
|
22113
22117
|
var DAY2 = 864e5;
|
|
22114
22118
|
var AGENDA_DEFAULTS = { unanswered: DAY2, waiting: 7 * DAY2 };
|
|
22115
22119
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -22363,7 +22367,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
22363
22367
|
};
|
|
22364
22368
|
}, "agendaItem");
|
|
22365
22369
|
|
|
22366
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22370
|
+
// 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
|
|
22367
22371
|
import { writeFileSync } from "node:fs";
|
|
22368
22372
|
import { join } from "node:path";
|
|
22369
22373
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
@@ -22388,7 +22392,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22388
22392
|
`);
|
|
22389
22393
|
await nativeRuntime({ env, progress });
|
|
22390
22394
|
progress(`${model.id}: loading it once to check it works`);
|
|
22391
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
22395
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-NFGFYUO4.js");
|
|
22392
22396
|
const embedder = await openEmbedder2(model, directory2);
|
|
22393
22397
|
try {
|
|
22394
22398
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -22409,7 +22413,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
22409
22413
|
}
|
|
22410
22414
|
await nativeRuntime({ env, progress });
|
|
22411
22415
|
progress(`${model.id}: loading it once to check it works`);
|
|
22412
|
-
const { openReranker } = await import("./rerank-
|
|
22416
|
+
const { openReranker } = await import("./rerank-3F2E6NNN.js");
|
|
22413
22417
|
const reranker = await openReranker(model, directory2);
|
|
22414
22418
|
try {
|
|
22415
22419
|
await reranker.score("check", ["check"]);
|
|
@@ -22427,7 +22431,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22427
22431
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
22428
22432
|
}
|
|
22429
22433
|
progress(`${model.id}: loading it once to check it works`);
|
|
22430
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22434
|
+
const { openPictureEmbedder } = await import("./embedder-SRBOJMXX.js");
|
|
22431
22435
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22432
22436
|
try {
|
|
22433
22437
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22439,7 +22443,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22439
22443
|
return { model, directory: directory2 };
|
|
22440
22444
|
}, "downloadImageModel");
|
|
22441
22445
|
|
|
22442
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22446
|
+
// 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
|
|
22443
22447
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
22444
22448
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
22445
22449
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -22608,7 +22612,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22608
22612
|
};
|
|
22609
22613
|
}, "readRankingSelection");
|
|
22610
22614
|
|
|
22611
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22615
|
+
// 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
|
|
22612
22616
|
var THREADS_PAGE = 500;
|
|
22613
22617
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
22614
22618
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -22645,10 +22649,10 @@ var withMailThreads = /* @__PURE__ */ __name((store) => {
|
|
|
22645
22649
|
get: /* @__PURE__ */ __name((target2, key, receiver) => key === "chats" ? chats : Reflect.get(target2, key, receiver), "get")
|
|
22646
22650
|
});
|
|
22647
22651
|
}, "withMailThreads");
|
|
22648
|
-
var mergeMail = /* @__PURE__ */ __name((messages, mail, limit,
|
|
22652
|
+
var mergeMail = /* @__PURE__ */ __name((messages, mail, limit, newest2 = false) => {
|
|
22649
22653
|
const moved = new Set(mail.items.map(({ locator }) => locator));
|
|
22650
22654
|
const kept2 = messages.items.filter(({ locator }) => !moved.has(locator));
|
|
22651
|
-
const items =
|
|
22655
|
+
const items = newest2 ? [...kept2, ...mail.items].sort((a, b) => b.timestamp.localeCompare(a.timestamp)) : fuseRanked([kept2, mail.items], (hit) => ({
|
|
22652
22656
|
exact: hit.exact,
|
|
22653
22657
|
ranked: hit.score !== null,
|
|
22654
22658
|
at: Date.parse(hit.timestamp)
|
|
@@ -22683,9 +22687,9 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before = 0, after
|
|
|
22683
22687
|
return thread.slice(Math.max(0, at - before), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
22684
22688
|
}, "readMail");
|
|
22685
22689
|
|
|
22686
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
22690
|
+
// 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
|
|
22687
22691
|
var PERSON_FIELDS = /* @__PURE__ */ new Set(["from", "to", "cc", "bcc"]);
|
|
22688
|
-
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list"]);
|
|
22692
|
+
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list", "type", "reach"]);
|
|
22689
22693
|
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");
|
|
22690
22694
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
22691
22695
|
if (!Number.isInteger(request.limit) || request.limit < 1 || request.limit > QUERY_PAGE_LIMIT)
|
|
@@ -22931,13 +22935,13 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
22931
22935
|
};
|
|
22932
22936
|
}, "coverageOf");
|
|
22933
22937
|
var statKey = /* @__PURE__ */ __name((account, chatId) => JSON.stringify([account.provider, account.account, chatId]), "statKey");
|
|
22934
|
-
var queryOf = /* @__PURE__ */ __name((timezone,
|
|
22938
|
+
var queryOf = /* @__PURE__ */ __name((timezone, newest2, stemming) => ({
|
|
22935
22939
|
language: "lucene-v1",
|
|
22936
22940
|
version: 1,
|
|
22937
22941
|
fieldsVersion: FIELD_VERSION,
|
|
22938
22942
|
presetVersion: PRESET_VERSION,
|
|
22939
22943
|
timezone,
|
|
22940
|
-
order:
|
|
22944
|
+
order: newest2 ? "newest" : "relevance",
|
|
22941
22945
|
...stemming ? { stemming } : {}
|
|
22942
22946
|
}), "queryOf");
|
|
22943
22947
|
var searchLucene = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
@@ -23056,7 +23060,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
23056
23060
|
};
|
|
23057
23061
|
}, "statsLucene");
|
|
23058
23062
|
|
|
23059
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23063
|
+
// 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
|
|
23060
23064
|
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");
|
|
23061
23065
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
23062
23066
|
command,
|
|
@@ -23066,7 +23070,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
23066
23070
|
fieldsVersion: FIELD_VERSION
|
|
23067
23071
|
}), "searchRecordOf");
|
|
23068
23072
|
|
|
23069
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23073
|
+
// 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
|
|
23070
23074
|
function invalid2(message) {
|
|
23071
23075
|
throw new CliError("validation_error", message);
|
|
23072
23076
|
}
|
|
@@ -23360,7 +23364,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
23360
23364
|
}, "evidence")
|
|
23361
23365
|
}), "adminStatisticsService");
|
|
23362
23366
|
|
|
23363
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23367
|
+
// 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
|
|
23364
23368
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
23365
23369
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
23366
23370
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -23383,19 +23387,19 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
23383
23387
|
}
|
|
23384
23388
|
}, "patiently");
|
|
23385
23389
|
|
|
23386
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23390
|
+
// 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
|
|
23387
23391
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
23388
23392
|
|
|
23389
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23393
|
+
// 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
|
|
23390
23394
|
var REQUEST_MS = 400;
|
|
23391
|
-
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
23395
|
+
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest: newest2, page, maxPages, pauseMs }) => {
|
|
23392
23396
|
const lowest = ranges[0];
|
|
23393
23397
|
const top = ranges.at(-1);
|
|
23394
23398
|
if (!lowest || !top)
|
|
23395
23399
|
return { held, ranges, missing: null, requests: null, runs: null, seconds: null };
|
|
23396
23400
|
const covered = ranges.reduce((sum2, range2) => sum2 + range2.to - range2.from + 1, 0);
|
|
23397
23401
|
const between = ranges.slice(1).reduce((sum2, range2, index) => sum2 + range2.from - (ranges[index]?.to ?? 0) - 1, 0);
|
|
23398
|
-
const gapIds = lowest.from - 1 + between + Math.max(0, (
|
|
23402
|
+
const gapIds = lowest.from - 1 + between + Math.max(0, (newest2 ?? top.to) - top.to);
|
|
23399
23403
|
const inRanges = Math.min(held, covered);
|
|
23400
23404
|
const missing4 = gapIds === 0 ? 0 : Math.round(inRanges / covered * gapIds);
|
|
23401
23405
|
const requests = missing4 === 0 ? 0 : Math.ceil(missing4 / page) + ranges.length;
|
|
@@ -23409,13 +23413,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
23409
23413
|
};
|
|
23410
23414
|
}, "estimateBackfill");
|
|
23411
23415
|
|
|
23412
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23416
|
+
// 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
|
|
23413
23417
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
23414
23418
|
...error,
|
|
23415
23419
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
23416
23420
|
}), "withRecovery");
|
|
23417
23421
|
|
|
23418
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23422
|
+
// 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
|
|
23419
23423
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
23420
23424
|
if (isCliFailure(error))
|
|
23421
23425
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -23498,7 +23502,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
23498
23502
|
};
|
|
23499
23503
|
}, "mergeBatches");
|
|
23500
23504
|
|
|
23501
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23505
|
+
// 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
|
|
23502
23506
|
var CONTEXT_MESSAGES2 = 3;
|
|
23503
23507
|
var CONTEXT_MINUTES = 10;
|
|
23504
23508
|
var MAX_CHARS = 1200;
|
|
@@ -23522,12 +23526,12 @@ var context = {
|
|
|
23522
23526
|
}, "describe")
|
|
23523
23527
|
};
|
|
23524
23528
|
|
|
23525
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23529
|
+
// 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
|
|
23526
23530
|
var BUILT_INS = [context];
|
|
23527
23531
|
var providers = [...BUILT_INS];
|
|
23528
23532
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
23529
23533
|
|
|
23530
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23534
|
+
// 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
|
|
23531
23535
|
var READ_PAGE = 5e3;
|
|
23532
23536
|
var CHAIN = 50;
|
|
23533
23537
|
var CONVERSATION_QUERY = {
|
|
@@ -23679,7 +23683,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
23679
23683
|
return size2;
|
|
23680
23684
|
}, "sized");
|
|
23681
23685
|
|
|
23682
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
23686
|
+
// 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
|
|
23683
23687
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
23684
23688
|
var MESSAGE_PAGE = 5e3;
|
|
23685
23689
|
var PER_SESSION = 8;
|
|
@@ -23698,7 +23702,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
23698
23702
|
price: remote.price,
|
|
23699
23703
|
installed: true,
|
|
23700
23704
|
perBatch: PER_REQUEST * concurrency,
|
|
23701
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
23705
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-3IMEJTEH.js")).openRemote(remote, apiKey, {
|
|
23702
23706
|
concurrency,
|
|
23703
23707
|
env: deps.env ?? process.env
|
|
23704
23708
|
}), "open")
|
|
@@ -23718,7 +23722,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
23718
23722
|
if (!isTextModelInstalled(model, directory2))
|
|
23719
23723
|
throw notDownloaded(model.id);
|
|
23720
23724
|
if (apart) {
|
|
23721
|
-
const { openProcess } = await import("./process-
|
|
23725
|
+
const { openProcess } = await import("./process-AFIXYXWL.js");
|
|
23722
23726
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
23723
23727
|
}
|
|
23724
23728
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -24007,7 +24011,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
24007
24011
|
return { ...one, state };
|
|
24008
24012
|
}, "shaped");
|
|
24009
24013
|
|
|
24010
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24014
|
+
// 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
|
|
24011
24015
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
24012
24016
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options2) => {
|
|
24013
24017
|
for (const [key, value, maximum] of [
|
|
@@ -24060,7 +24064,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options2, signal,
|
|
|
24060
24064
|
}
|
|
24061
24065
|
}, "catchUpSearch");
|
|
24062
24066
|
|
|
24063
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24067
|
+
// 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
|
|
24064
24068
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
24065
24069
|
if (deps.reads === "store") {
|
|
24066
24070
|
throw new CliError("validation_error", `${what} asks for older history, and this messenger pushes its history instead \u2014 keep \`${typedCommand(deps.messenger.app.command, "serve")}\` running`);
|
|
@@ -24125,13 +24129,13 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
24125
24129
|
throw new CliError("validation_error", "--dry-run counts the message ids missing between what is held; this messenger's ids do not count messages");
|
|
24126
24130
|
}
|
|
24127
24131
|
const { store, account, chatId } = await found(chat);
|
|
24128
|
-
const
|
|
24132
|
+
const newest2 = Number((await store.messages.messages(account, chatId, { limit: 1 })).items[0]?.id);
|
|
24129
24133
|
return {
|
|
24130
24134
|
chat: chatId,
|
|
24131
24135
|
...estimateBackfill({
|
|
24132
24136
|
ranges: await store.sync.ranges(account, chatId),
|
|
24133
24137
|
held: (await store.chats.chatStats(account, chatId))[0]?.messages ?? 0,
|
|
24134
|
-
newest: Number.isSafeInteger(
|
|
24138
|
+
newest: Number.isSafeInteger(newest2) ? newest2 : void 0,
|
|
24135
24139
|
page: pageSize,
|
|
24136
24140
|
maxPages: Math.ceil(limit / pageSize),
|
|
24137
24141
|
pauseMs
|
|
@@ -24165,15 +24169,22 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
24165
24169
|
return { chat: limit.chatId ?? null, fetched: 0, complete: false, ranges: [], limited: "group_too_large" };
|
|
24166
24170
|
}
|
|
24167
24171
|
const windowed = limit?.keepFrom !== void 0 && !(limit.keepFrom <= (options2.sinceMs ?? Number.NEGATIVE_INFINITY));
|
|
24172
|
+
const roots = /* @__PURE__ */ new Map();
|
|
24173
|
+
const startedAt = Date.now();
|
|
24168
24174
|
const fetched = await fetchInto({
|
|
24169
|
-
history: /* @__PURE__ */ __name((window2) =>
|
|
24175
|
+
history: /* @__PURE__ */ __name(async (window2) => {
|
|
24176
|
+
const page = await history(chat, { ...window2, reactions: false });
|
|
24177
|
+
if (refreshes(connection) && !options2.window && page.items[0])
|
|
24178
|
+
pagedRoots(roots, await connection.threadRootsIn(page.items[0].chatId, page.items), window2.before);
|
|
24179
|
+
return page;
|
|
24180
|
+
}, "history"),
|
|
24170
24181
|
store,
|
|
24171
24182
|
account,
|
|
24172
24183
|
fetching: deps.messenger.fetching ?? FETCHING,
|
|
24173
24184
|
...options2,
|
|
24174
24185
|
...windowed ? { sinceMs: limit.keepFrom } : {}
|
|
24175
24186
|
});
|
|
24176
|
-
const replies = fetched.chat && !options2.window ? await savedReplies(connection, store, account, fetched.chat, options2.stop) : 0;
|
|
24187
|
+
const replies = fetched.chat && !options2.window ? await savedReplies(connection, store, account, fetched.chat, { roots, startedAt }, options2.stop) : 0;
|
|
24177
24188
|
const read = replies > 0 ? { ...fetched, fetched: fetched.fetched + replies } : fetched;
|
|
24178
24189
|
const result = windowed && read.reachedSince ? { ...read, limited: "older_than_window" } : read;
|
|
24179
24190
|
if (result.limited && limit?.keepFrom !== void 0)
|
|
@@ -24209,7 +24220,7 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
24209
24220
|
const upToDate = heldToNewest(await deps.store(), await deps.account(), deps.messenger.fetching ?? FETCHING, {
|
|
24210
24221
|
...options2,
|
|
24211
24222
|
catchUp: catchingUp ? options2.catchUp ?? {} : false,
|
|
24212
|
-
threads: connection.threadReplies !== void 0
|
|
24223
|
+
threads: connection.threadReplies !== void 0 || refreshes(connection)
|
|
24213
24224
|
});
|
|
24214
24225
|
const finished = /* @__PURE__ */ __name(() => options2.onChat?.({ chats: chats.length, done: answer.items.length, fetched: answer.fetched }), "finished");
|
|
24215
24226
|
finished();
|
|
@@ -24422,12 +24433,12 @@ var heldToNewest = /* @__PURE__ */ __name((store, account, fetching, options2) =
|
|
|
24422
24433
|
const lastAt = Date.parse(chat.lastMessageAt ?? "");
|
|
24423
24434
|
if (Number.isNaN(lastAt))
|
|
24424
24435
|
return false;
|
|
24425
|
-
const [
|
|
24426
|
-
if (!
|
|
24436
|
+
const [newest2] = (await store.messages.messages(account, chat.id, { limit: 1 }).catch(() => ({ items: [] }))).items;
|
|
24437
|
+
if (!newest2 || Date.parse(newest2.timestamp) < lastAt)
|
|
24427
24438
|
return false;
|
|
24428
24439
|
const ranges = await store.sync.ranges(account, chat.id);
|
|
24429
24440
|
const top = ranges.reduce((best, range2) => best && best.to >= range2.to ? best : range2, void 0);
|
|
24430
|
-
const key = keyOf(fetching)(
|
|
24441
|
+
const key = keyOf(fetching)(newest2);
|
|
24431
24442
|
if (!top || key > top.to || key < top.from)
|
|
24432
24443
|
return false;
|
|
24433
24444
|
if (ranges.length === 1 && await store.sync.syncState(account, historyStartKey(chat.id)) !== void 0)
|
|
@@ -24438,13 +24449,20 @@ var heldToNewest = /* @__PURE__ */ __name((store, account, fetching, options2) =
|
|
|
24438
24449
|
return !Number.isNaN(startedAt) && startedAt < options2.sinceMs;
|
|
24439
24450
|
}, "heldToNewest");
|
|
24440
24451
|
var threadsKey = /* @__PURE__ */ __name((chatId) => `threads:${chatId}`, "threadsKey");
|
|
24441
|
-
var
|
|
24442
|
-
|
|
24452
|
+
var refreshes = /* @__PURE__ */ __name((connection) => connection.threadRootsIn !== void 0 && connection.recentThreadRoots !== void 0 && connection.rootReplies !== void 0, "refreshes");
|
|
24453
|
+
var pagedRoots = /* @__PURE__ */ __name((into, roots, before) => {
|
|
24454
|
+
for (const root of roots)
|
|
24455
|
+
into.set(root.id, { ...root, whole: before !== void 0 || into.get(root.id)?.whole === true });
|
|
24456
|
+
}, "pagedRoots");
|
|
24457
|
+
var THREAD_CLOCK_SKEW_MS = 6e4;
|
|
24458
|
+
var savedReplies = /* @__PURE__ */ __name(async (connection, store, account, chatId, { roots, startedAt }, stop) => {
|
|
24459
|
+
if (stop.aborted)
|
|
24460
|
+
return 0;
|
|
24461
|
+
const stored = Number((await store.sync.syncState(account, threadsKey(chatId)))?.value);
|
|
24462
|
+
const point = Number.isFinite(stored) ? stored : void 0;
|
|
24463
|
+
const batches = refreshes(connection) ? refreshedThreads(connection, chatId, roots, point, stop) : connection.threadReplies ? await readyBatches(connection.threadReplies(chatId, point === void 0 ? {} : { since: point })) : void 0;
|
|
24464
|
+
if (!batches)
|
|
24443
24465
|
return 0;
|
|
24444
|
-
const startedAt = Date.now();
|
|
24445
|
-
const point = Number((await store.sync.syncState(account, threadsKey(chatId)))?.value);
|
|
24446
|
-
const answer = await connection.threadReplies(chatId, Number.isFinite(point) ? { since: point } : {});
|
|
24447
|
-
const batches = Symbol.asyncIterator in answer ? answer : [answer];
|
|
24448
24466
|
let saved = 0;
|
|
24449
24467
|
for await (const replies of batches) {
|
|
24450
24468
|
if (replies.length > 0)
|
|
@@ -24456,6 +24474,32 @@ var savedReplies = /* @__PURE__ */ __name(async (connection, store, account, cha
|
|
|
24456
24474
|
await store.sync.setSyncState(account, threadsKey(chatId), String(startedAt));
|
|
24457
24475
|
return saved;
|
|
24458
24476
|
}, "savedReplies");
|
|
24477
|
+
var readyBatches = /* @__PURE__ */ __name(async (answer) => {
|
|
24478
|
+
const ready = await answer;
|
|
24479
|
+
return Symbol.asyncIterator in ready ? ready : [ready];
|
|
24480
|
+
}, "readyBatches");
|
|
24481
|
+
async function* refreshedThreads(connection, chatId, roots, point, stop) {
|
|
24482
|
+
const after = point === void 0 ? void 0 : point - THREAD_CLOCK_SKEW_MS;
|
|
24483
|
+
const all = new Map(roots);
|
|
24484
|
+
for (const root of await connection.recentThreadRoots(chatId)) {
|
|
24485
|
+
const paged = all.get(root.id);
|
|
24486
|
+
all.set(root.id, {
|
|
24487
|
+
...root,
|
|
24488
|
+
lastReplyAt: newest(paged?.lastReplyAt, root.lastReplyAt),
|
|
24489
|
+
whole: paged?.whole ?? false
|
|
24490
|
+
});
|
|
24491
|
+
}
|
|
24492
|
+
for (const root of all.values()) {
|
|
24493
|
+
if (stop.aborted)
|
|
24494
|
+
return;
|
|
24495
|
+
const replied = Date.parse(root.lastReplyAt ?? "");
|
|
24496
|
+
if (after !== void 0 && !root.whole && !(replied > after))
|
|
24497
|
+
continue;
|
|
24498
|
+
yield* await readyBatches(connection.rootReplies(chatId, root.id, after === void 0 || root.whole ? {} : { after }));
|
|
24499
|
+
}
|
|
24500
|
+
}
|
|
24501
|
+
__name(refreshedThreads, "refreshedThreads");
|
|
24502
|
+
var newest = /* @__PURE__ */ __name((one, other) => one === void 0 || other !== void 0 && Date.parse(other) > Date.parse(one) ? other : one, "newest");
|
|
24459
24503
|
var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTime, fallback) => {
|
|
24460
24504
|
if (byTime)
|
|
24461
24505
|
return new Date(key).toISOString();
|
|
@@ -24463,20 +24507,20 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
24463
24507
|
return message?.timestamp ?? fallback;
|
|
24464
24508
|
}, "timeOfKey");
|
|
24465
24509
|
|
|
24466
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24510
|
+
// 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
|
|
24467
24511
|
import { extname as extname2 } from "node:path";
|
|
24468
24512
|
|
|
24469
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24513
|
+
// 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
|
|
24470
24514
|
import { readFileSync } from "node:fs";
|
|
24471
24515
|
import { dirname, extname, join as join2 } from "node:path";
|
|
24472
24516
|
import { fileURLToPath } from "node:url";
|
|
24473
24517
|
|
|
24474
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24518
|
+
// 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
|
|
24475
24519
|
import { setImmediate as tick } from "node:timers/promises";
|
|
24476
24520
|
import { crc32 } from "node:zlib";
|
|
24477
24521
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
24478
24522
|
|
|
24479
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24523
|
+
// 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
|
|
24480
24524
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
24481
24525
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
24482
24526
|
var SAMPLE = 65536;
|
|
@@ -24578,7 +24622,8 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
24578
24622
|
return result.text;
|
|
24579
24623
|
}, "decodeXml");
|
|
24580
24624
|
|
|
24581
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24625
|
+
// 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
|
|
24626
|
+
var MAX_KEPT = 50 * 1024 * 1024;
|
|
24582
24627
|
var MAX_PART = 10 * 1024 * 1024;
|
|
24583
24628
|
var MAX_ENTRIES = 1e3;
|
|
24584
24629
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -24592,7 +24637,8 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
24592
24637
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
24593
24638
|
}, "cancelled");
|
|
24594
24639
|
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character2) => character2.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
24595
|
-
var
|
|
24640
|
+
var KEPT = /* @__PURE__ */ __name((name) => /\.(xml|rels|opf|xhtml|html)$/i.test(name) || name === "mimetype", "KEPT");
|
|
24641
|
+
var directory = /* @__PURE__ */ __name((bytes2, maxExpanded) => {
|
|
24596
24642
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
24597
24643
|
let end = -1;
|
|
24598
24644
|
for (let index = bytes2.length - 22; index >= Math.max(0, bytes2.length - 65557); index--) {
|
|
@@ -24613,6 +24659,7 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
24613
24659
|
throw new Error("invalid_zip");
|
|
24614
24660
|
let offset = view.getUint32(end + 16, true);
|
|
24615
24661
|
let expanded = 0;
|
|
24662
|
+
let kept2 = 0;
|
|
24616
24663
|
const entries = /* @__PURE__ */ new Map();
|
|
24617
24664
|
for (let index = 0; index < count3; index++) {
|
|
24618
24665
|
if (offset + 46 > stop || view.getUint32(offset, true) !== 33639248)
|
|
@@ -24631,7 +24678,9 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
24631
24678
|
if ((view.getUint32(offset + 38, true) >>> 16 & 61440) === 40960)
|
|
24632
24679
|
throw new Error("invalid_zip");
|
|
24633
24680
|
expanded += size2;
|
|
24634
|
-
if (
|
|
24681
|
+
if (KEPT(name))
|
|
24682
|
+
kept2 += size2;
|
|
24683
|
+
if (expanded > maxExpanded || kept2 > MAX_KEPT)
|
|
24635
24684
|
throw new ReaderLimit();
|
|
24636
24685
|
const local = view.getUint32(offset + 42, true);
|
|
24637
24686
|
if (local + 30 > offset || view.getUint32(local, true) !== 67324752)
|
|
@@ -24649,19 +24698,20 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
24649
24698
|
throw new Error("invalid_zip");
|
|
24650
24699
|
return entries;
|
|
24651
24700
|
}, "directory");
|
|
24652
|
-
var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
24701
|
+
var readContainer = /* @__PURE__ */ __name(async (bytes2, signal, maxExpanded = attachmentMaxBytes()) => {
|
|
24653
24702
|
cancelled(signal);
|
|
24654
|
-
const entries = directory(bytes2);
|
|
24703
|
+
const entries = directory(bytes2, maxExpanded);
|
|
24655
24704
|
const result = /* @__PURE__ */ new Map();
|
|
24656
24705
|
const seen = /* @__PURE__ */ new Set();
|
|
24657
24706
|
const done2 = /* @__PURE__ */ new Set();
|
|
24658
24707
|
let expanded = 0;
|
|
24708
|
+
let kept2 = 0;
|
|
24659
24709
|
const archive = new Unzip((file) => {
|
|
24660
24710
|
const expected2 = entries.get(file.name);
|
|
24661
24711
|
if (!expected2 || seen.has(file.name))
|
|
24662
24712
|
throw new Error("invalid_zip");
|
|
24663
24713
|
seen.add(file.name);
|
|
24664
|
-
const keep2 =
|
|
24714
|
+
const keep2 = KEPT(file.name);
|
|
24665
24715
|
let size2 = 0;
|
|
24666
24716
|
let checksum = 0;
|
|
24667
24717
|
const parts = [];
|
|
@@ -24670,7 +24720,9 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
24670
24720
|
throw error;
|
|
24671
24721
|
size2 += data.length;
|
|
24672
24722
|
expanded += data.length;
|
|
24673
|
-
if (
|
|
24723
|
+
if (keep2)
|
|
24724
|
+
kept2 += data.length;
|
|
24725
|
+
if (expanded > maxExpanded || kept2 > MAX_KEPT || keep2 && size2 > MAX_PART)
|
|
24674
24726
|
throw new ReaderLimit();
|
|
24675
24727
|
checksum = crc32(data, checksum);
|
|
24676
24728
|
if (keep2)
|
|
@@ -24793,7 +24845,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
24793
24845
|
return found;
|
|
24794
24846
|
}, "elements");
|
|
24795
24847
|
|
|
24796
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24848
|
+
// 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
|
|
24797
24849
|
var BUILT_IN = ["unpdf", "mammoth", "word-extractor", "linkedom", "defuddle/node"];
|
|
24798
24850
|
var ENGINES = [...BUILT_IN, "@napi-rs/canvas"];
|
|
24799
24851
|
var isMissing = /* @__PURE__ */ __name((error, name) => error?.code === "ERR_MODULE_NOT_FOUND" && String(error.message).includes(name), "isMissing");
|
|
@@ -24851,7 +24903,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
24851
24903
|
}
|
|
24852
24904
|
}, "derived");
|
|
24853
24905
|
|
|
24854
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24906
|
+
// 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
|
|
24855
24907
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
24856
24908
|
var image = {
|
|
24857
24909
|
id: "image",
|
|
@@ -24860,7 +24912,7 @@ var image = {
|
|
|
24860
24912
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
24861
24913
|
};
|
|
24862
24914
|
|
|
24863
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24915
|
+
// 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
|
|
24864
24916
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
24865
24917
|
var doc = {
|
|
24866
24918
|
id: "doc",
|
|
@@ -24872,7 +24924,7 @@ var doc = {
|
|
|
24872
24924
|
}), "read")
|
|
24873
24925
|
};
|
|
24874
24926
|
|
|
24875
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24927
|
+
// 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
|
|
24876
24928
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
24877
24929
|
var docx = {
|
|
24878
24930
|
id: "docx",
|
|
@@ -24885,10 +24937,10 @@ var docx = {
|
|
|
24885
24937
|
}), "read")
|
|
24886
24938
|
};
|
|
24887
24939
|
|
|
24888
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24940
|
+
// 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
|
|
24889
24941
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
24890
24942
|
|
|
24891
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24943
|
+
// 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
|
|
24892
24944
|
var NAMED = {
|
|
24893
24945
|
amp: "&",
|
|
24894
24946
|
lt: "<",
|
|
@@ -24940,7 +24992,7 @@ var decodeEntities = /* @__PURE__ */ __name((text2) => text2.replace(/&(#x[0-9a-
|
|
|
24940
24992
|
return body[1] === "x" || body[1] === "X" ? character(Number.parseInt(body.slice(2), 16), entity) : character(Number(body.slice(1)), entity);
|
|
24941
24993
|
}), "decodeEntities");
|
|
24942
24994
|
|
|
24943
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
24995
|
+
// 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
|
|
24944
24996
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
24945
24997
|
"fonttbl",
|
|
24946
24998
|
"colortbl",
|
|
@@ -25106,7 +25158,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
25106
25158
|
return decodeEntities(replaceTags(blocks, /<[^>]*>/g, "")).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
25107
25159
|
}, "htmlText");
|
|
25108
25160
|
|
|
25109
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25161
|
+
// 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
|
|
25110
25162
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
25111
25163
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
25112
25164
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -25162,7 +25214,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
25162
25214
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
25163
25215
|
}, "markdownSections");
|
|
25164
25216
|
|
|
25165
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25217
|
+
// 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
|
|
25166
25218
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
25167
25219
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
25168
25220
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -25233,10 +25285,10 @@ var html = {
|
|
|
25233
25285
|
}, "read")
|
|
25234
25286
|
};
|
|
25235
25287
|
|
|
25236
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25288
|
+
// 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
|
|
25237
25289
|
import { posix } from "node:path";
|
|
25238
25290
|
|
|
25239
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25291
|
+
// 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
|
|
25240
25292
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
25241
25293
|
let name = "";
|
|
25242
25294
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -25291,7 +25343,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
25291
25343
|
return { text: parts.join("").trim(), truncated: false };
|
|
25292
25344
|
}, "sheetText");
|
|
25293
25345
|
|
|
25294
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25346
|
+
// 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
|
|
25295
25347
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
25296
25348
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
25297
25349
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -25691,7 +25743,7 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
25691
25743
|
}
|
|
25692
25744
|
}, "readDocument");
|
|
25693
25745
|
|
|
25694
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25746
|
+
// 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
|
|
25695
25747
|
var office = {
|
|
25696
25748
|
id: "office",
|
|
25697
25749
|
version: documentExtractor("odt"),
|
|
@@ -25702,7 +25754,7 @@ var office = {
|
|
|
25702
25754
|
}, "read")
|
|
25703
25755
|
};
|
|
25704
25756
|
|
|
25705
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25757
|
+
// 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
|
|
25706
25758
|
var pdf = {
|
|
25707
25759
|
id: "pdf",
|
|
25708
25760
|
version: "unpdf",
|
|
@@ -25769,7 +25821,7 @@ var pdf = {
|
|
|
25769
25821
|
}), "read")
|
|
25770
25822
|
};
|
|
25771
25823
|
|
|
25772
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25824
|
+
// 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
|
|
25773
25825
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
25774
25826
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
25775
25827
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -25789,7 +25841,7 @@ var plain = {
|
|
|
25789
25841
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
25790
25842
|
};
|
|
25791
25843
|
|
|
25792
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25844
|
+
// 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
|
|
25793
25845
|
var rtf = {
|
|
25794
25846
|
id: "rtf",
|
|
25795
25847
|
version: "v1",
|
|
@@ -25797,10 +25849,10 @@ var rtf = {
|
|
|
25797
25849
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
25798
25850
|
};
|
|
25799
25851
|
|
|
25800
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25852
|
+
// 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
|
|
25801
25853
|
import { basename } from "node:path";
|
|
25802
25854
|
|
|
25803
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25855
|
+
// 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
|
|
25804
25856
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
25805
25857
|
const cells = [];
|
|
25806
25858
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -25838,7 +25890,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
25838
25890
|
return { cells, truncated };
|
|
25839
25891
|
}, "delimitedSpans");
|
|
25840
25892
|
|
|
25841
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25893
|
+
// 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
|
|
25842
25894
|
var DELIMITED = {
|
|
25843
25895
|
".csv": ",",
|
|
25844
25896
|
".tsv": " ",
|
|
@@ -25877,7 +25929,7 @@ var sheets = {
|
|
|
25877
25929
|
}, "read")
|
|
25878
25930
|
};
|
|
25879
25931
|
|
|
25880
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25932
|
+
// 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
|
|
25881
25933
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image];
|
|
25882
25934
|
var HEAD_BYTES = 1024;
|
|
25883
25935
|
var readers = [...BUILT_INS2];
|
|
@@ -25887,7 +25939,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
25887
25939
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
25888
25940
|
}, "readWithRegistry");
|
|
25889
25941
|
|
|
25890
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25942
|
+
// 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
|
|
25891
25943
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
25892
25944
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname2(name ?? path).toLowerCase(), "extensionOf");
|
|
25893
25945
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -25925,7 +25977,7 @@ var engineStates = /* @__PURE__ */ __name((resolve6 = (name) => resolveFrom(new
|
|
|
25925
25977
|
}
|
|
25926
25978
|
})), "engineStates");
|
|
25927
25979
|
|
|
25928
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25980
|
+
// 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
|
|
25929
25981
|
var GROUP_SETTINGS = [
|
|
25930
25982
|
"allCanPin",
|
|
25931
25983
|
"onlyAdminsAdd",
|
|
@@ -25939,7 +25991,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
25939
25991
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
25940
25992
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
25941
25993
|
|
|
25942
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
25994
|
+
// 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
|
|
25943
25995
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
25944
25996
|
if (sendAs === void 0) {
|
|
25945
25997
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -25964,7 +26016,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
25964
26016
|
return sendAs;
|
|
25965
26017
|
}, "typedSendAs");
|
|
25966
26018
|
|
|
25967
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26019
|
+
// 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
|
|
25968
26020
|
var TOTAL_CAP = 1e4;
|
|
25969
26021
|
var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
25970
26022
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -25975,7 +26027,7 @@ var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
|
25975
26027
|
return { value: count3, relation: exact ? "eq" : "gte" };
|
|
25976
26028
|
}, "totalOf");
|
|
25977
26029
|
|
|
25978
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26030
|
+
// 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
|
|
25979
26031
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
25980
26032
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
25981
26033
|
let narrows = false;
|
|
@@ -26004,7 +26056,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
26004
26056
|
return wanted(root).join(" ").trim();
|
|
26005
26057
|
}, "meaningWords");
|
|
26006
26058
|
|
|
26007
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26059
|
+
// 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
|
|
26008
26060
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
26009
26061
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
26010
26062
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options2 = COMBINED_DEFAULTS) => {
|
|
@@ -26205,7 +26257,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
26205
26257
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
26206
26258
|
}, "signals");
|
|
26207
26259
|
|
|
26208
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26260
|
+
// 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
|
|
26209
26261
|
var MEANING_DEPTH = 100;
|
|
26210
26262
|
var RRF_K2 = 60;
|
|
26211
26263
|
var RERANK_DEPTH = 50;
|
|
@@ -26531,7 +26583,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
26531
26583
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
26532
26584
|
}, "mixedWithReranker");
|
|
26533
26585
|
|
|
26534
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26586
|
+
// 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
|
|
26535
26587
|
var LEAST_USES = 3;
|
|
26536
26588
|
var SAMPLE2 = 50;
|
|
26537
26589
|
var CAPITALISED = 0.8;
|
|
@@ -26585,7 +26637,7 @@ var queryWords2 = /* @__PURE__ */ __name((query) => {
|
|
|
26585
26637
|
}, "queryWords");
|
|
26586
26638
|
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");
|
|
26587
26639
|
|
|
26588
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26640
|
+
// 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
|
|
26589
26641
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
26590
26642
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
26591
26643
|
var threadBounds = /* @__PURE__ */ __name((options2 = {}) => {
|
|
@@ -26784,7 +26836,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
26784
26836
|
return result;
|
|
26785
26837
|
}, "readThreadContext");
|
|
26786
26838
|
|
|
26787
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26839
|
+
// 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
|
|
26788
26840
|
var SEARCH_FILL_MS = 200;
|
|
26789
26841
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
26790
26842
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -26892,7 +26944,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
26892
26944
|
}, "accountOf");
|
|
26893
26945
|
var keyOf2 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
26894
26946
|
|
|
26895
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26947
|
+
// 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
|
|
26896
26948
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
26897
26949
|
const host = new URL(baseUrl).host;
|
|
26898
26950
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -26925,7 +26977,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
26925
26977
|
};
|
|
26926
26978
|
}, "embeddingKeys");
|
|
26927
26979
|
|
|
26928
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
26980
|
+
// 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
|
|
26929
26981
|
var options = strictObject({
|
|
26930
26982
|
temperature: range(0, 2),
|
|
26931
26983
|
top_p: range(0, 1),
|
|
@@ -26992,7 +27044,7 @@ var openai = {
|
|
|
26992
27044
|
}), "complete")
|
|
26993
27045
|
};
|
|
26994
27046
|
|
|
26995
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27047
|
+
// 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
|
|
26996
27048
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
26997
27049
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
26998
27050
|
if (deps.signal?.aborted)
|
|
@@ -27007,7 +27059,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
27007
27059
|
if (!adapter && target2.provider === "openai")
|
|
27008
27060
|
adapter = openai;
|
|
27009
27061
|
if (!adapter && target2.provider === "anthropic")
|
|
27010
|
-
adapter = (await import("./anthropic-
|
|
27062
|
+
adapter = (await import("./anthropic-PQN6MNP7.js")).anthropic;
|
|
27011
27063
|
if (!adapter)
|
|
27012
27064
|
throw new CliError("validation_error", `no model adapter for ${target2.provider}`);
|
|
27013
27065
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -27067,7 +27119,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
27067
27119
|
}, "complete")
|
|
27068
27120
|
}), "modelGateway");
|
|
27069
27121
|
|
|
27070
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27122
|
+
// 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
|
|
27071
27123
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
27072
27124
|
id: one.id,
|
|
27073
27125
|
name: one.name,
|
|
@@ -27193,7 +27245,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
27193
27245
|
};
|
|
27194
27246
|
}, "searchesService");
|
|
27195
27247
|
|
|
27196
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27248
|
+
// 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
|
|
27197
27249
|
import { createHash as createHash3 } from "node:crypto";
|
|
27198
27250
|
import { existsSync } from "node:fs";
|
|
27199
27251
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
@@ -27324,11 +27376,11 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
27324
27376
|
return { ...checked2.output, custom: true };
|
|
27325
27377
|
}, "addCustomTextModel");
|
|
27326
27378
|
|
|
27327
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27379
|
+
// 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
|
|
27328
27380
|
var DAY3 = 864e5;
|
|
27329
27381
|
var SLOTS_EVERY = 7 * DAY3;
|
|
27330
27382
|
|
|
27331
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27383
|
+
// 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
|
|
27332
27384
|
var localDate = /* @__PURE__ */ __name((at, zone) => new Intl.DateTimeFormat("en-CA", { timeZone: zone, year: "numeric", month: "2-digit", day: "2-digit" }).format(at), "localDate");
|
|
27333
27385
|
var plusDays = /* @__PURE__ */ __name((date, days) => {
|
|
27334
27386
|
const [year, month, day2] = date.split("-").map(Number);
|
|
@@ -27392,10 +27444,10 @@ var EVENTS_QUERY = {
|
|
|
27392
27444
|
} : field)
|
|
27393
27445
|
};
|
|
27394
27446
|
|
|
27395
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27447
|
+
// 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
|
|
27396
27448
|
var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
|
|
27397
27449
|
|
|
27398
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27450
|
+
// 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
|
|
27399
27451
|
var EVENTS_NOTIFY_KEY = "events.notify";
|
|
27400
27452
|
var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
|
|
27401
27453
|
var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
|
|
@@ -27413,7 +27465,7 @@ var CALENDAR_WRITE_DEFAULTS = {
|
|
|
27413
27465
|
[EVENTS_REMIND_HOOK_KEY]: "deny"
|
|
27414
27466
|
};
|
|
27415
27467
|
|
|
27416
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27468
|
+
// 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-passage-format.js
|
|
27417
27469
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
27418
27470
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
27419
27471
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -27482,7 +27534,7 @@ ${body}`;
|
|
|
27482
27534
|
`;
|
|
27483
27535
|
}, "formatMeetingPassage");
|
|
27484
27536
|
|
|
27485
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27537
|
+
// 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
|
|
27486
27538
|
var MEETING_PREPARATION_LIMITS = {
|
|
27487
27539
|
meetings: { min: 1, max: 20, default: 5 },
|
|
27488
27540
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -27555,7 +27607,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
27555
27607
|
};
|
|
27556
27608
|
}, "validateMeetingPreparationRequest");
|
|
27557
27609
|
|
|
27558
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27610
|
+
// 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
|
|
27559
27611
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
27560
27612
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
27561
27613
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -27603,7 +27655,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
27603
27655
|
}
|
|
27604
27656
|
}, "validatePreparationCommunications");
|
|
27605
27657
|
|
|
27606
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27658
|
+
// 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
|
|
27607
27659
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
27608
27660
|
const installer = ports.installer();
|
|
27609
27661
|
const argv = updateCommand(installer, packageName);
|
|
@@ -27668,18 +27720,18 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
27668
27720
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
27669
27721
|
}, "dayAfter");
|
|
27670
27722
|
|
|
27671
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27723
|
+
// 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
|
|
27672
27724
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
27673
27725
|
|
|
27674
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27726
|
+
// 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
|
|
27675
27727
|
import { lstat } from "node:fs/promises";
|
|
27676
27728
|
|
|
27677
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27729
|
+
// 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
|
|
27678
27730
|
import { createHash as createHash5, randomUUID as randomUUID2 } from "node:crypto";
|
|
27679
27731
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
27680
27732
|
import { join as join4 } from "node:path";
|
|
27681
27733
|
|
|
27682
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27734
|
+
// 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
|
|
27683
27735
|
import { createHash as createHash4 } from "node:crypto";
|
|
27684
27736
|
var metadataLimit = 16384;
|
|
27685
27737
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -27739,7 +27791,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
27739
27791
|
}
|
|
27740
27792
|
}, "readPartialMetadata");
|
|
27741
27793
|
|
|
27742
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27794
|
+
// 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
|
|
27743
27795
|
import { randomUUID } from "node:crypto";
|
|
27744
27796
|
import { open, rename, unlink } from "node:fs/promises";
|
|
27745
27797
|
import { join as join3 } from "node:path";
|
|
@@ -27831,7 +27883,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
27831
27883
|
};
|
|
27832
27884
|
}, "partialWriter");
|
|
27833
27885
|
|
|
27834
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27886
|
+
// 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
|
|
27835
27887
|
var NativeRecordingPartialStore = class {
|
|
27836
27888
|
static {
|
|
27837
27889
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -27938,12 +27990,12 @@ var NativeRecordingPartialStore = class {
|
|
|
27938
27990
|
}
|
|
27939
27991
|
};
|
|
27940
27992
|
|
|
27941
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27993
|
+
// 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
|
|
27942
27994
|
import { createHash as createHash6 } from "node:crypto";
|
|
27943
27995
|
import { link as link2 } from "node:fs/promises";
|
|
27944
27996
|
import { basename as basename2, dirname as dirname2, join as join6, resolve } from "node:path";
|
|
27945
27997
|
|
|
27946
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
27998
|
+
// 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
|
|
27947
27999
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
27948
28000
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
27949
28001
|
signal?.throwIfAborted();
|
|
@@ -27978,7 +28030,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
27978
28030
|
signal?.throwIfAborted();
|
|
27979
28031
|
}, "commitPublication");
|
|
27980
28032
|
|
|
27981
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28033
|
+
// 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
|
|
27982
28034
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
27983
28035
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
27984
28036
|
import { join as join5 } from "node:path";
|
|
@@ -28051,7 +28103,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
28051
28103
|
}
|
|
28052
28104
|
}, "writePublicationJournal");
|
|
28053
28105
|
|
|
28054
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28106
|
+
// 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
|
|
28055
28107
|
var NativeRecordingPublication = class {
|
|
28056
28108
|
static {
|
|
28057
28109
|
__name(this, "NativeRecordingPublication");
|
|
@@ -28124,7 +28176,7 @@ var NativeRecordingPublication = class {
|
|
|
28124
28176
|
}
|
|
28125
28177
|
};
|
|
28126
28178
|
|
|
28127
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28179
|
+
// 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
|
|
28128
28180
|
import { createHash as createHash7 } from "node:crypto";
|
|
28129
28181
|
import { readdir } from "node:fs/promises";
|
|
28130
28182
|
import { isAbsolute, join as join7, resolve as resolve2 } from "node:path";
|
|
@@ -28211,7 +28263,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
28211
28263
|
beforePublish
|
|
28212
28264
|
}), "commitMediaEntry");
|
|
28213
28265
|
|
|
28214
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28266
|
+
// 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
|
|
28215
28267
|
var validator = '"media-completed-v1"';
|
|
28216
28268
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
28217
28269
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -28312,7 +28364,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
28312
28364
|
return entry;
|
|
28313
28365
|
}, "archiveMediaFile");
|
|
28314
28366
|
|
|
28315
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28367
|
+
// 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
|
|
28316
28368
|
import { mkdir, realpath } from "node:fs/promises";
|
|
28317
28369
|
import { join as join8, resolve as resolve3 } from "node:path";
|
|
28318
28370
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -28379,7 +28431,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
28379
28431
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
28380
28432
|
}, "withMediaArchiveLocks");
|
|
28381
28433
|
|
|
28382
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28434
|
+
// 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
|
|
28383
28435
|
var checkMediaArchive = /* @__PURE__ */ __name((directory2, signal) => withMediaArchiveLocks(directory2, signal, async (root) => {
|
|
28384
28436
|
const entries = await readMediaManifests(root, signal);
|
|
28385
28437
|
if (!entries.length)
|
|
@@ -28522,7 +28574,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options2) => {
|
|
|
28522
28574
|
}, { create: true });
|
|
28523
28575
|
}, "archiveMedia");
|
|
28524
28576
|
|
|
28525
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28577
|
+
// 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
|
|
28526
28578
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
28527
28579
|
import { basename as basename3, dirname as dirname3, join as join9, resolve as resolve4 } from "node:path";
|
|
28528
28580
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -28673,7 +28725,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options2) => {
|
|
|
28673
28725
|
}, { additional: [target2], createAdditional: !options2.dryRun });
|
|
28674
28726
|
}, "moveMediaArchive");
|
|
28675
28727
|
|
|
28676
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28728
|
+
// 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
|
|
28677
28729
|
var MONEY_REQUEST = "money-request";
|
|
28678
28730
|
var MONEY_DONE = "money-done";
|
|
28679
28731
|
var PROMISE = "promise";
|
|
@@ -28707,10 +28759,10 @@ var MONEY_WORDS = [
|
|
|
28707
28759
|
}
|
|
28708
28760
|
];
|
|
28709
28761
|
|
|
28710
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28762
|
+
// 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
|
|
28711
28763
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
28712
28764
|
|
|
28713
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28765
|
+
// 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
|
|
28714
28766
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
28715
28767
|
var MONEY_DONE_FORMS = words2([
|
|
28716
28768
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -28750,7 +28802,7 @@ var PROMISE_FORMS = words2([
|
|
|
28750
28802
|
"estar\xE1 listo"
|
|
28751
28803
|
]);
|
|
28752
28804
|
|
|
28753
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28805
|
+
// 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
|
|
28754
28806
|
var EXCERPT_CHARS = 80;
|
|
28755
28807
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
28756
28808
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -28772,7 +28824,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
28772
28824
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
28773
28825
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
28774
28826
|
|
|
28775
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28827
|
+
// 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
|
|
28776
28828
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
28777
28829
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
28778
28830
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -28853,7 +28905,7 @@ var amounts = {
|
|
|
28853
28905
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
28854
28906
|
};
|
|
28855
28907
|
|
|
28856
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28908
|
+
// 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
|
|
28857
28909
|
var children = {
|
|
28858
28910
|
id: "children",
|
|
28859
28911
|
version: 1,
|
|
@@ -28882,7 +28934,7 @@ var children = {
|
|
|
28882
28934
|
}, "read")
|
|
28883
28935
|
};
|
|
28884
28936
|
|
|
28885
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28937
|
+
// 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
|
|
28886
28938
|
var coverage = {
|
|
28887
28939
|
id: "coverage",
|
|
28888
28940
|
version: 1,
|
|
@@ -28911,7 +28963,7 @@ var coverage = {
|
|
|
28911
28963
|
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")
|
|
28912
28964
|
};
|
|
28913
28965
|
|
|
28914
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
28966
|
+
// 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
|
|
28915
28967
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
28916
28968
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
28917
28969
|
signal: "payments",
|
|
@@ -28961,7 +29013,7 @@ var payments = {
|
|
|
28961
29013
|
}, "read")
|
|
28962
29014
|
};
|
|
28963
29015
|
|
|
28964
|
-
// 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/project-status/signals/promises.js
|
|
28965
29017
|
var PATTERNS_PER_CHAT = 3;
|
|
28966
29018
|
var DAY4 = 864e5;
|
|
28967
29019
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -29050,7 +29102,7 @@ var promises = {
|
|
|
29050
29102
|
}, "read")
|
|
29051
29103
|
};
|
|
29052
29104
|
|
|
29053
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29105
|
+
// 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
|
|
29054
29106
|
var PER_SIDE = 5;
|
|
29055
29107
|
var WEEK = 7 * 864e5;
|
|
29056
29108
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -29081,7 +29133,7 @@ var questions2 = {
|
|
|
29081
29133
|
}, "attention")
|
|
29082
29134
|
};
|
|
29083
29135
|
|
|
29084
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29136
|
+
// 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
|
|
29085
29137
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
29086
29138
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
29087
29139
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -29149,7 +29201,7 @@ var replyNext = {
|
|
|
29149
29201
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
29150
29202
|
};
|
|
29151
29203
|
|
|
29152
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29204
|
+
// 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
|
|
29153
29205
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29154
29206
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
29155
29207
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -29174,14 +29226,14 @@ var topics = {
|
|
|
29174
29226
|
if (!yours && !theirs)
|
|
29175
29227
|
return [];
|
|
29176
29228
|
const silent = theirs && yours && Date.parse(yours.timestamp) > Date.parse(theirs.timestamp);
|
|
29177
|
-
const
|
|
29229
|
+
const newest2 = [yours, theirs].filter((one) => one !== void 0).sort((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp));
|
|
29178
29230
|
return [
|
|
29179
29231
|
{
|
|
29180
29232
|
signal: "topics",
|
|
29181
29233
|
chat: chat.ref,
|
|
29182
|
-
at:
|
|
29234
|
+
at: newest2[0]?.timestamp ?? null,
|
|
29183
29235
|
who: null,
|
|
29184
|
-
evidence: evidenceOf(chat, ...
|
|
29236
|
+
evidence: evidenceOf(chat, ...newest2),
|
|
29185
29237
|
basis: "store",
|
|
29186
29238
|
data: {
|
|
29187
29239
|
query,
|
|
@@ -29195,7 +29247,7 @@ var topics = {
|
|
|
29195
29247
|
}, "read")
|
|
29196
29248
|
};
|
|
29197
29249
|
|
|
29198
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29250
|
+
// 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
|
|
29199
29251
|
var STATUS_SIGNALS = [
|
|
29200
29252
|
replyNext,
|
|
29201
29253
|
questions2,
|
|
@@ -29207,7 +29259,7 @@ var STATUS_SIGNALS = [
|
|
|
29207
29259
|
children
|
|
29208
29260
|
];
|
|
29209
29261
|
|
|
29210
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29262
|
+
// 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
|
|
29211
29263
|
var DAY5 = 864e5;
|
|
29212
29264
|
var STATUS_WINDOW = 300;
|
|
29213
29265
|
var STATUS_CHATS = 16;
|
|
@@ -29396,7 +29448,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
29396
29448
|
};
|
|
29397
29449
|
}, "projectStatus");
|
|
29398
29450
|
|
|
29399
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29451
|
+
// 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
|
|
29400
29452
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
29401
29453
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
29402
29454
|
if (deps.offline)
|
|
@@ -29468,7 +29520,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
29468
29520
|
};
|
|
29469
29521
|
}, "accountService");
|
|
29470
29522
|
|
|
29471
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29523
|
+
// 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
|
|
29472
29524
|
var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-time", zone) => {
|
|
29473
29525
|
const at = aheadOf(value, flag, now, {
|
|
29474
29526
|
...zone === void 0 ? {} : { zone },
|
|
@@ -29479,7 +29531,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
29479
29531
|
return new Date(at - at % MINUTE).toISOString();
|
|
29480
29532
|
}, "sendTime");
|
|
29481
29533
|
|
|
29482
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29534
|
+
// 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
|
|
29483
29535
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
29484
29536
|
try {
|
|
29485
29537
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -29726,7 +29778,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
29726
29778
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
29727
29779
|
}, "linkLimits");
|
|
29728
29780
|
|
|
29729
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29781
|
+
// 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
|
|
29730
29782
|
import { createHash as createHash8, randomUUID as randomUUID4 } from "node:crypto";
|
|
29731
29783
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
29732
29784
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
@@ -29863,12 +29915,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29863
29915
|
return { plan, repair };
|
|
29864
29916
|
}, "gapsService");
|
|
29865
29917
|
|
|
29866
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29918
|
+
// 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
|
|
29867
29919
|
import { createHash as createHash11 } from "node:crypto";
|
|
29868
29920
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
29869
|
-
import { lstat as lstat5, open as open5,
|
|
29921
|
+
import { lstat as lstat5, open as open5, stat } from "node:fs/promises";
|
|
29870
29922
|
|
|
29871
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
29923
|
+
// 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
|
|
29872
29924
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
29873
29925
|
import { basename as basename4, join as join10, relative, sep } from "node:path";
|
|
29874
29926
|
var MAX_FILES = 1e4;
|
|
@@ -30980,7 +31032,7 @@ function imageSize(input) {
|
|
|
30980
31032
|
}
|
|
30981
31033
|
__name(imageSize, "imageSize");
|
|
30982
31034
|
|
|
30983
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31035
|
+
// 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
|
|
30984
31036
|
var MAX_PAGES = 20;
|
|
30985
31037
|
var MAX_PIXELS = 2e7;
|
|
30986
31038
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -31140,7 +31192,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
31140
31192
|
}
|
|
31141
31193
|
}, "ocrPdf");
|
|
31142
31194
|
|
|
31143
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31195
|
+
// 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
|
|
31144
31196
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
31145
31197
|
const limits = pdfPreviewLimits(env);
|
|
31146
31198
|
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
@@ -31217,7 +31269,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
31217
31269
|
}
|
|
31218
31270
|
}, "pdfPreview");
|
|
31219
31271
|
|
|
31220
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31272
|
+
// 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
|
|
31221
31273
|
import { spawn } from "node:child_process";
|
|
31222
31274
|
import { mkdtempSync, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
31223
31275
|
import { tmpdir } from "node:os";
|
|
@@ -31380,7 +31432,7 @@ Read the attached picture.`,
|
|
|
31380
31432
|
}
|
|
31381
31433
|
}, "readPictureWithAgent");
|
|
31382
31434
|
|
|
31383
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31435
|
+
// 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
|
|
31384
31436
|
import { createHash as createHash9 } from "node:crypto";
|
|
31385
31437
|
import { constants } from "node:fs";
|
|
31386
31438
|
import { lstat as lstat3, open as open4 } from "node:fs/promises";
|
|
@@ -31403,7 +31455,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile =
|
|
|
31403
31455
|
if (!before.isFile() || before.isSymbolicLink())
|
|
31404
31456
|
throw new CliError("validation_error", "the retained attachment must be a regular file");
|
|
31405
31457
|
if (before.size > maxBytes)
|
|
31406
|
-
throw new CliError("validation_error", `the retained attachment exceeds ${maxBytes
|
|
31458
|
+
throw new CliError("validation_error", `the retained attachment exceeds ${sizeText(maxBytes)}; configure MESSAGING_ATTACHMENT_MAX_MIB`);
|
|
31407
31459
|
if (offsetBytes > before.size)
|
|
31408
31460
|
throw new CliError("validation_error", "the byte offset is past the end of this attachment");
|
|
31409
31461
|
const handle = await open4(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
@@ -31488,7 +31540,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
31488
31540
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
31489
31541
|
}, "transferMime");
|
|
31490
31542
|
|
|
31491
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31543
|
+
// 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
|
|
31492
31544
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
31493
31545
|
import { link as link3, rm } from "node:fs/promises";
|
|
31494
31546
|
import { join as join12, resolve as resolve5 } from "node:path";
|
|
@@ -31603,7 +31655,7 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
31603
31655
|
}
|
|
31604
31656
|
}, "save");
|
|
31605
31657
|
|
|
31606
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31658
|
+
// 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
|
|
31607
31659
|
import { createHash as createHash10 } from "node:crypto";
|
|
31608
31660
|
import { lstat as lstat4, readFile } from "node:fs/promises";
|
|
31609
31661
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
@@ -31647,7 +31699,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31647
31699
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31648
31700
|
if (!isImageModelInstalled(model2, directory2))
|
|
31649
31701
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31650
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31702
|
+
const { openPictureEmbedder } = await import("./embedder-SRBOJMXX.js");
|
|
31651
31703
|
return openPictureEmbedder(model2, directory2);
|
|
31652
31704
|
}, "open");
|
|
31653
31705
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31821,7 +31873,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31821
31873
|
}, "search")
|
|
31822
31874
|
}), "withPictures");
|
|
31823
31875
|
|
|
31824
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
31876
|
+
// 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
|
|
31825
31877
|
var ATTACHMENT_QUERY = {
|
|
31826
31878
|
entity: "attachment",
|
|
31827
31879
|
backend: "sql",
|
|
@@ -31846,7 +31898,7 @@ var outcome = /* @__PURE__ */ __name(async (file, path, load, signal, noFollow =
|
|
|
31846
31898
|
status: "too-large",
|
|
31847
31899
|
issue: withRecovery({
|
|
31848
31900
|
code: "validation_error",
|
|
31849
|
-
message: `attachment exceeds ${maxBytes
|
|
31901
|
+
message: `attachment exceeds ${sizeText(maxBytes)}; configure MESSAGING_ATTACHMENT_MAX_MIB`,
|
|
31850
31902
|
setting: "MESSAGING_ATTACHMENT_MAX_MIB"
|
|
31851
31903
|
})
|
|
31852
31904
|
}), "tooLarge");
|
|
@@ -31867,7 +31919,7 @@ var outcome = /* @__PURE__ */ __name(async (file, path, load, signal, noFollow =
|
|
|
31867
31919
|
return { status: "missing" };
|
|
31868
31920
|
if (opened.size > maxBytes)
|
|
31869
31921
|
return tooLarge();
|
|
31870
|
-
bytes2 =
|
|
31922
|
+
bytes2 = asBytes(await readWhole(handle, signal));
|
|
31871
31923
|
} finally {
|
|
31872
31924
|
await handle.close();
|
|
31873
31925
|
}
|
|
@@ -32292,7 +32344,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32292
32344
|
}, "readPicture")
|
|
32293
32345
|
}), "attachmentsService");
|
|
32294
32346
|
|
|
32295
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32347
|
+
// 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
|
|
32296
32348
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32297
32349
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32298
32350
|
const store = await accountStore(deps);
|
|
@@ -32322,7 +32374,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32322
32374
|
}, "list")
|
|
32323
32375
|
}), "chatDocumentsService");
|
|
32324
32376
|
|
|
32325
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32377
|
+
// 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
|
|
32326
32378
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32327
32379
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32328
32380
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32409,7 +32461,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32409
32461
|
}
|
|
32410
32462
|
}, "isRetentionSelection");
|
|
32411
32463
|
|
|
32412
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32464
|
+
// 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
|
|
32413
32465
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32414
32466
|
const fields = text2.split(",").map((one) => one.trim());
|
|
32415
32467
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -32616,7 +32668,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32616
32668
|
};
|
|
32617
32669
|
}, "countersService");
|
|
32618
32670
|
|
|
32619
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32671
|
+
// 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
|
|
32620
32672
|
var SYNC_KEY = "messages.sync-first";
|
|
32621
32673
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
32622
32674
|
var keyOf3 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -32707,13 +32759,13 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32707
32759
|
continue;
|
|
32708
32760
|
}
|
|
32709
32761
|
try {
|
|
32710
|
-
const
|
|
32762
|
+
const newest2 = (await store.messages.messages(account, chatId, { limit: 1 })).items[0];
|
|
32711
32763
|
let counted2 = 0;
|
|
32712
32764
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
32713
32765
|
limit: options2.maxMessages - result.messages,
|
|
32714
32766
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
32715
32767
|
pauseMs: parseDuration(deps.messenger.fetching?.pause ?? "1s", "fetch pause"),
|
|
32716
|
-
...
|
|
32768
|
+
...newest2 ? { sinceMs: Date.parse(newest2.timestamp) + 1 } : {},
|
|
32717
32769
|
stop,
|
|
32718
32770
|
note,
|
|
32719
32771
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
@@ -32748,7 +32800,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
32748
32800
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
32749
32801
|
}), "withRefresh");
|
|
32750
32802
|
|
|
32751
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
32803
|
+
// 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
|
|
32752
32804
|
var CANDIDATES = 50;
|
|
32753
32805
|
var ACROSS_CHATS = 500;
|
|
32754
32806
|
var OWN_BLOCK = 5;
|
|
@@ -33209,13 +33261,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33209
33261
|
return mean2.map((value) => value / length);
|
|
33210
33262
|
}, "meanOf");
|
|
33211
33263
|
|
|
33212
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33264
|
+
// 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
|
|
33213
33265
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33214
33266
|
...embeddingsMaintenance(deps),
|
|
33215
33267
|
...embeddingsSearch(deps)
|
|
33216
33268
|
}), "embeddingsService");
|
|
33217
33269
|
|
|
33218
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33270
|
+
// 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
|
|
33219
33271
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33220
33272
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33221
33273
|
if (deps.offline)
|
|
@@ -33356,7 +33408,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33356
33408
|
};
|
|
33357
33409
|
}, "foldersService");
|
|
33358
33410
|
|
|
33359
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33411
|
+
// 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
|
|
33360
33412
|
var REVIEW_COUNT = 500;
|
|
33361
33413
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33362
33414
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33435,7 +33487,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33435
33487
|
};
|
|
33436
33488
|
}, "mentionsService");
|
|
33437
33489
|
|
|
33438
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33490
|
+
// 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
|
|
33439
33491
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33440
33492
|
position,
|
|
33441
33493
|
kind,
|
|
@@ -33484,7 +33536,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33484
33536
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33485
33537
|
}, "validatePermalink");
|
|
33486
33538
|
|
|
33487
|
-
// 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/domain/pin-duration.js
|
|
33488
33540
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33489
33541
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33490
33542
|
return `${seconds / 86400}d`;
|
|
@@ -33516,7 +33568,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33516
33568
|
return seconds;
|
|
33517
33569
|
}, "pinDurationOf");
|
|
33518
33570
|
|
|
33519
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33571
|
+
// 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
|
|
33520
33572
|
var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
33521
33573
|
const chosen = chosenTextModel(env);
|
|
33522
33574
|
if (chosen.from === "chosen" || chosen.id !== DEFAULT_TEXT_MODEL)
|
|
@@ -33531,7 +33583,7 @@ var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
|
33531
33583
|
return (counts.get(before) ?? 0) > (counts.get(now) ?? 0) ? previous.id : current.id;
|
|
33532
33584
|
}, "meaningModel");
|
|
33533
33585
|
|
|
33534
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33586
|
+
// 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
|
|
33535
33587
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
33536
33588
|
try {
|
|
33537
33589
|
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -33610,7 +33662,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
33610
33662
|
}
|
|
33611
33663
|
}, "meaningLane");
|
|
33612
33664
|
|
|
33613
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33665
|
+
// 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
|
|
33614
33666
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
33615
33667
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
33616
33668
|
if (choice === "off")
|
|
@@ -33622,9 +33674,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33622
33674
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
33623
33675
|
try {
|
|
33624
33676
|
const warm = deps.embedders;
|
|
33625
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
33677
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-AFIXYXWL.js")).openRerankerProcess(model, directory2, {
|
|
33626
33678
|
threads: defaultThreads()
|
|
33627
|
-
})) : await (await import("./rerank-
|
|
33679
|
+
})) : await (await import("./rerank-3F2E6NNN.js")).openReranker(model, directory2);
|
|
33628
33680
|
return {
|
|
33629
33681
|
model: model.id,
|
|
33630
33682
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33644,7 +33696,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33644
33696
|
};
|
|
33645
33697
|
}, "rerankLane");
|
|
33646
33698
|
|
|
33647
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33699
|
+
// 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
|
|
33648
33700
|
var DAY6 = 864e5;
|
|
33649
33701
|
var SPAN = { start: 0, end: 0 };
|
|
33650
33702
|
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
@@ -33769,17 +33821,17 @@ var questionPeriod = /* @__PURE__ */ __name((text2, now, zone) => {
|
|
|
33769
33821
|
};
|
|
33770
33822
|
}, "questionPeriod");
|
|
33771
33823
|
|
|
33772
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33824
|
+
// 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
|
|
33773
33825
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
33774
33826
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
33775
33827
|
const directory2 = imageModelsDirectory(env);
|
|
33776
33828
|
if (!isImageModelInstalled(model, directory2))
|
|
33777
33829
|
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 });
|
|
33778
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33830
|
+
const { openPictureEmbedder } = await import("./embedder-SRBOJMXX.js");
|
|
33779
33831
|
return openPictureEmbedder(model, directory2);
|
|
33780
33832
|
}, "openPictureEmbedderFor");
|
|
33781
33833
|
|
|
33782
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33834
|
+
// 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
|
|
33783
33835
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
33784
33836
|
const metadata = note.frontMatter;
|
|
33785
33837
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -33801,7 +33853,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
33801
33853
|
};
|
|
33802
33854
|
}, "documentSource");
|
|
33803
33855
|
|
|
33804
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33856
|
+
// 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
|
|
33805
33857
|
var SECTION2 = "enrichment";
|
|
33806
33858
|
var ENRICHMENT_PROVIDERS = ["openai", "anthropic"];
|
|
33807
33859
|
var DEFAULT_BASE_URLS = {
|
|
@@ -33876,7 +33928,7 @@ var costOf = /* @__PURE__ */ __name((usage, setting) => {
|
|
|
33876
33928
|
return price ? Math.round((usage.input * price.input + usage.output * price.output) * 1e6) / 1e6 : null;
|
|
33877
33929
|
}, "costOf");
|
|
33878
33930
|
|
|
33879
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
33931
|
+
// 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
|
|
33880
33932
|
var ENRICH_PER_RUN = 600;
|
|
33881
33933
|
var MAX_LINE = 400;
|
|
33882
33934
|
var line2 = pipe(unknown(), transform((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim().slice(0, MAX_LINE) : ""));
|
|
@@ -33952,7 +34004,7 @@ var enrichmentState = /* @__PURE__ */ __name(async (store, env, estimateFor, key
|
|
|
33952
34004
|
};
|
|
33953
34005
|
}, "enrichmentState");
|
|
33954
34006
|
|
|
33955
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34007
|
+
// 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
|
|
33956
34008
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33957
34009
|
let root;
|
|
33958
34010
|
try {
|
|
@@ -33979,7 +34031,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
33979
34031
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33980
34032
|
}, "titleTiers");
|
|
33981
34033
|
|
|
33982
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34034
|
+
// 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
|
|
33983
34035
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33984
34036
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33985
34037
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -34447,7 +34499,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
34447
34499
|
};
|
|
34448
34500
|
}, "searchNotesOf");
|
|
34449
34501
|
|
|
34450
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34502
|
+
// 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
|
|
34451
34503
|
var embedCrmActivities = /* @__PURE__ */ __name(async (store, options2 = {}) => {
|
|
34452
34504
|
localModel(options2.model, options2.env, options2.command);
|
|
34453
34505
|
const until = stopsAt(options2.deadline);
|
|
@@ -34471,7 +34523,7 @@ var nearestCrmActivities = /* @__PURE__ */ __name(async (store, words3, { limit,
|
|
|
34471
34523
|
})).filter(({ score }) => score > floor);
|
|
34472
34524
|
}, "nearestCrmActivities");
|
|
34473
34525
|
|
|
34474
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34526
|
+
// 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
|
|
34475
34527
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
34476
34528
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
34477
34529
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -34505,11 +34557,11 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
|
|
|
34505
34557
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
34506
34558
|
}, "nearestEvents");
|
|
34507
34559
|
var keyOf4 = /* @__PURE__ */ __name(({ event: event2 }) => event2.eventSeriesId === null ? `e${event2.id}` : `s${event2.eventSeriesId}`, "keyOf");
|
|
34508
|
-
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
34560
|
+
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest: newest2, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
34509
34561
|
if (!query.trim())
|
|
34510
34562
|
throw new CliError("validation_error", "say what to find in the events");
|
|
34511
34563
|
query = plainQuery(query);
|
|
34512
|
-
const asked = discover && !exact && !
|
|
34564
|
+
const asked = discover && !exact && !newest2 ? questionLookup(query) : void 0;
|
|
34513
34565
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
34514
34566
|
...exact ? { exact: true } : {},
|
|
34515
34567
|
...timezone === void 0 ? {} : { timezone }
|
|
@@ -34523,7 +34575,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34523
34575
|
let meaning;
|
|
34524
34576
|
if (exact)
|
|
34525
34577
|
meaningSkipped = "--exact searches words as written";
|
|
34526
|
-
else if (
|
|
34578
|
+
else if (newest2)
|
|
34527
34579
|
meaningSkipped = "newest first orders by time";
|
|
34528
34580
|
else if (words3 === void 0)
|
|
34529
34581
|
meaningSkipped = "the query has fields or operators, which meaning cannot follow";
|
|
@@ -34546,7 +34598,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34546
34598
|
limit: meaning === void 0 ? limit : Math.max(window2, CANDIDATES3),
|
|
34547
34599
|
offset: meaning === void 0 ? offset : 0,
|
|
34548
34600
|
...accountIds === void 0 ? {} : { accountIds },
|
|
34549
|
-
...
|
|
34601
|
+
...newest2 ? { newest: true } : {},
|
|
34550
34602
|
...stemmer ? { stemmer } : {},
|
|
34551
34603
|
...signal ? { signal } : {},
|
|
34552
34604
|
...candidates === void 0 ? {} : { candidates }
|
|
@@ -34589,7 +34641,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34589
34641
|
};
|
|
34590
34642
|
}, "searchEvents");
|
|
34591
34643
|
|
|
34592
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34644
|
+
// 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
|
|
34593
34645
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
34594
34646
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
34595
34647
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -34619,7 +34671,7 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words3, anyWo
|
|
|
34619
34671
|
};
|
|
34620
34672
|
}, "searchBusiness");
|
|
34621
34673
|
|
|
34622
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34674
|
+
// 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
|
|
34623
34675
|
var MOST_HITS_PER_MEETING = 3;
|
|
34624
34676
|
var PAGE_ROWS = 200;
|
|
34625
34677
|
var MOST_PAGES = 25;
|
|
@@ -34847,7 +34899,7 @@ var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
|
34847
34899
|
foundBy: ["title"]
|
|
34848
34900
|
}), "titleItem");
|
|
34849
34901
|
|
|
34850
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34902
|
+
// 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
|
|
34851
34903
|
var titleWords2 = /* @__PURE__ */ __name((text2, refused = "deals and leads are found by the words of their title, company, contacts and activities only") => {
|
|
34852
34904
|
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
34853
34905
|
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
@@ -34922,7 +34974,7 @@ var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
|
34922
34974
|
return ordered.map((item2, rank) => ({ item: item2, score: 1 - rank / PERIOD_DEPTH + (inside(item2) ? PERIOD_BOOST : 0) })).sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
34923
34975
|
}, "insidePeriodFirst");
|
|
34924
34976
|
|
|
34925
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34977
|
+
// 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
|
|
34926
34978
|
var nearestTracker = /* @__PURE__ */ __name(async (store, words3, { limit, accounts, env, command, embedders }) => {
|
|
34927
34979
|
const { model, directory: directory2, key } = localModel(await meaningModel(store, env), env, command);
|
|
34928
34980
|
if (!await store.tracker.embedded(key, accounts))
|
|
@@ -34932,7 +34984,7 @@ var nearestTracker = /* @__PURE__ */ __name(async (store, words3, { limit, accou
|
|
|
34932
34984
|
return (await store.tracker.nearest(key, vector, { limit, accounts })).filter(({ score }) => score > floor);
|
|
34933
34985
|
}, "nearestTracker");
|
|
34934
34986
|
|
|
34935
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
34987
|
+
// 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
|
|
34936
34988
|
var TRACKER_HIT_KINDS = { issue: "issue", project: "project", comment: "issue_comment" };
|
|
34937
34989
|
var trackerTitle = /* @__PURE__ */ __name(({ kind, record }) => {
|
|
34938
34990
|
const title = trackerTitleOf(kind, record);
|
|
@@ -35026,7 +35078,7 @@ var trackerLane = /* @__PURE__ */ __name(async (store, { text: text2, accounts:
|
|
|
35026
35078
|
return { hits, records, hasMore: found.hasMore, tracker, ...meaningReason ? { meaningReason } : {} };
|
|
35027
35079
|
}, "trackerLane");
|
|
35028
35080
|
|
|
35029
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35081
|
+
// 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
|
|
35030
35082
|
var SECTION3 = "search_harder";
|
|
35031
35083
|
var HARDER_MODELS = {
|
|
35032
35084
|
anthropic: "claude-haiku-5-5",
|
|
@@ -35272,7 +35324,7 @@ var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { laterPage, a
|
|
|
35272
35324
|
};
|
|
35273
35325
|
}, "reorderHarder");
|
|
35274
35326
|
|
|
35275
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35327
|
+
// 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
|
|
35276
35328
|
var RESOURCES_SEARCHED = [
|
|
35277
35329
|
"messages",
|
|
35278
35330
|
"mail",
|
|
@@ -35769,7 +35821,7 @@ var withMeetingDocuments = /* @__PURE__ */ __name(async (store, lists, read) =>
|
|
|
35769
35821
|
}));
|
|
35770
35822
|
}, "withMeetingDocuments");
|
|
35771
35823
|
|
|
35772
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
35824
|
+
// 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
|
|
35773
35825
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
35774
35826
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
35775
35827
|
var DEFAULT_BACKEND = "both";
|
|
@@ -35968,7 +36020,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
35968
36020
|
return { report, sources };
|
|
35969
36021
|
}, "searchServer");
|
|
35970
36022
|
|
|
35971
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36023
|
+
// 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
|
|
35972
36024
|
var DELETE_AT_ONCE = 10;
|
|
35973
36025
|
var atOnce = /* @__PURE__ */ __name((ids) => {
|
|
35974
36026
|
if (ids.length > DELETE_AT_ONCE)
|
|
@@ -36468,7 +36520,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
36468
36520
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
36469
36521
|
}, "checkMediaOptions");
|
|
36470
36522
|
|
|
36471
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36523
|
+
// 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
|
|
36472
36524
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
36473
36525
|
var RULES2 = {
|
|
36474
36526
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -36483,7 +36535,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2
|
|
|
36483
36535
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
36484
36536
|
}), "classifyChannel");
|
|
36485
36537
|
|
|
36486
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36538
|
+
// 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
|
|
36487
36539
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
36488
36540
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
36489
36541
|
const store = await deps.store();
|
|
@@ -36569,7 +36621,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
36569
36621
|
};
|
|
36570
36622
|
}, "metadataService");
|
|
36571
36623
|
|
|
36572
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36624
|
+
// 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
|
|
36573
36625
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
36574
36626
|
var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
36575
36627
|
const { chatId, title, rules, point, since, dryRun } = run2;
|
|
@@ -36606,7 +36658,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
|
36606
36658
|
return { chatId, rows, notes };
|
|
36607
36659
|
}, "moderateWith");
|
|
36608
36660
|
|
|
36609
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36661
|
+
// 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
|
|
36610
36662
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
36611
36663
|
const file = /* @__PURE__ */ __name(() => {
|
|
36612
36664
|
const env = deps.env ?? process.env;
|
|
@@ -36691,7 +36743,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
36691
36743
|
}, "removePerson")
|
|
36692
36744
|
}), "moderatorOf");
|
|
36693
36745
|
|
|
36694
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36746
|
+
// 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
|
|
36695
36747
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
36696
36748
|
id: note.id,
|
|
36697
36749
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -36735,7 +36787,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
36735
36787
|
};
|
|
36736
36788
|
}, "privatePeopleService");
|
|
36737
36789
|
|
|
36738
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
36790
|
+
// 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
|
|
36739
36791
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
36740
36792
|
total: 0,
|
|
36741
36793
|
population: 0,
|
|
@@ -36991,7 +37043,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
36991
37043
|
}, "evidence")
|
|
36992
37044
|
}), "rankingsService");
|
|
36993
37045
|
|
|
36994
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37046
|
+
// 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
|
|
36995
37047
|
var FIELDS = ["date", "chat", "kind", "muted"];
|
|
36996
37048
|
var WAITING_TAIL = 100;
|
|
36997
37049
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37056,12 +37108,12 @@ var figuresOf = /* @__PURE__ */ __name((delays) => {
|
|
|
37056
37108
|
};
|
|
37057
37109
|
}, "figuresOf");
|
|
37058
37110
|
var MINUTE2 = 6e4;
|
|
37059
|
-
var waitsOnOwner = /* @__PURE__ */ __name((
|
|
37060
|
-
if (
|
|
37111
|
+
var waitsOnOwner = /* @__PURE__ */ __name((newest2) => {
|
|
37112
|
+
if (newest2.mine)
|
|
37061
37113
|
return false;
|
|
37062
|
-
if (
|
|
37063
|
-
return !
|
|
37064
|
-
return
|
|
37114
|
+
if (newest2.kind === "private")
|
|
37115
|
+
return !newest2.quiet && rankingQuestion(newest2.text);
|
|
37116
|
+
return newest2.addressed || newest2.ownerUsername !== null && new RegExp(`(^|[^\\w@])@${newest2.ownerUsername.replace(/[^\w]/g, "\\$&")}(?!\\w)`, "i").test(newest2.text);
|
|
37065
37117
|
}, "waitsOnOwner");
|
|
37066
37118
|
var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
37067
37119
|
const prepared = /* @__PURE__ */ __name(async (query, command) => {
|
|
@@ -37125,7 +37177,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37125
37177
|
};
|
|
37126
37178
|
}, "replyStatsService");
|
|
37127
37179
|
|
|
37128
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37180
|
+
// 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
|
|
37129
37181
|
var TAGGING_QUERY = {
|
|
37130
37182
|
entity: "tagging",
|
|
37131
37183
|
backend: "sql",
|
|
@@ -37209,7 +37261,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37209
37261
|
};
|
|
37210
37262
|
}, "tagsService");
|
|
37211
37263
|
|
|
37212
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37264
|
+
// 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
|
|
37213
37265
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
37214
37266
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
37215
37267
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -37408,7 +37460,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37408
37460
|
};
|
|
37409
37461
|
}, "topicsService");
|
|
37410
37462
|
|
|
37411
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37463
|
+
// 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
|
|
37412
37464
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
37413
37465
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
37414
37466
|
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -37482,7 +37534,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
37482
37534
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
37483
37535
|
}, "prepareEvidencePacket");
|
|
37484
37536
|
|
|
37485
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37537
|
+
// 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
|
|
37486
37538
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before }, messenger = {}) => {
|
|
37487
37539
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
37488
37540
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -37502,7 +37554,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
37502
37554
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
37503
37555
|
}, "readEvidencePacket");
|
|
37504
37556
|
|
|
37505
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37557
|
+
// 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
|
|
37506
37558
|
var scopeKeys = [
|
|
37507
37559
|
"accountId",
|
|
37508
37560
|
"meetingId",
|
|
@@ -37524,7 +37576,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
37524
37576
|
"maxVocabularyReadBytes"
|
|
37525
37577
|
]);
|
|
37526
37578
|
|
|
37527
|
-
// node_modules/.pnpm/@wirecat+cli-core@
|
|
37579
|
+
// 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
|
|
37528
37580
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
37529
37581
|
const pictures = picturesService(deps);
|
|
37530
37582
|
const base = {
|
|
@@ -37562,12 +37614,13 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
37562
37614
|
}, "servicesFor");
|
|
37563
37615
|
|
|
37564
37616
|
export {
|
|
37617
|
+
timeLimit,
|
|
37618
|
+
withTimeLimit,
|
|
37565
37619
|
communicationFields,
|
|
37566
37620
|
OFFLINE,
|
|
37567
37621
|
onlineDeps,
|
|
37568
37622
|
storedDeps,
|
|
37569
37623
|
storeModeDeps,
|
|
37570
|
-
withTimeLimit,
|
|
37571
37624
|
REGISTRIES,
|
|
37572
37625
|
registriesCover,
|
|
37573
37626
|
chatCoverage,
|