@wirecat/zoom-cli 0.67.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/answer-entities.d.ts +18 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +12 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +2 -1
- package/dist/answer-policy.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-SEW2VL76.js → all-profiles-ZQWPCJEK.js} +12 -12
- package/dist/bundle/answer-policy-VBDYLUXI.js +104 -0
- package/dist/bundle/{anthropic-FSNASJML.js → anthropic-7FUQ2HYJ.js} +7 -7
- package/dist/bundle/{app-server-EVSRYJ3H.js → app-server-DNPE2EQB.js} +61 -58
- package/dist/bundle/{bun-DACL5SVO.js → bun-ZVQFCFCC.js} +2 -2
- package/dist/bundle/{bun-sqlite-HQ2KOXSI.js → bun-sqlite-EB2UMUPJ.js} +6 -6
- package/dist/bundle/{chunk-4ZR5DJ26.js → chunk-2SYWVIQJ.js} +3 -3
- package/dist/bundle/chunk-37B7A4RP.js +66 -0
- package/dist/bundle/{chunk-WHQ4ZCJI.js → chunk-3TPRYZUW.js} +214 -86
- package/dist/bundle/{chunk-L6CAUVMU.js → chunk-4APZQYCH.js} +5 -5
- package/dist/bundle/{chunk-ASCHAVNW.js → chunk-52DCABMU.js} +27 -27
- package/dist/bundle/{chunk-LM26DJOK.js → chunk-5GOE6PQK.js} +6 -6
- package/dist/bundle/{chunk-QX2MAT6I.js → chunk-5H6VTEEC.js} +3 -3
- package/dist/bundle/{chunk-V33VGWT3.js → chunk-5ZF6QVMC.js} +16 -6
- package/dist/bundle/{chunk-GP4NSYDU.js → chunk-5ZJXKASF.js} +254 -13
- package/dist/bundle/chunk-6AMMTXEA.js +12473 -0
- package/dist/bundle/{chunk-Q65SDEFN.js → chunk-6KMTQX3D.js} +2 -2
- package/dist/bundle/{chunk-TBRG2DPE.js → chunk-6N2D6JGX.js} +2 -2
- package/dist/bundle/{chunk-X67YD3QI.js → chunk-6TICX3MN.js} +2 -2
- package/dist/bundle/{chunk-4GCKDO2H.js → chunk-7AUP2WT3.js} +3 -3
- package/dist/bundle/{chunk-JVCHGI7W.js → chunk-B5D7NZI7.js} +1 -1
- package/dist/bundle/{chunk-AAZFLJSH.js → chunk-B6JMVB6R.js} +10 -10
- package/dist/bundle/{chunk-CRLBTNC4.js → chunk-BL36NSV5.js} +3 -3
- package/dist/bundle/{chunk-4UVT2QCO.js → chunk-BOAMDYLY.js} +4 -4
- package/dist/bundle/{chunk-VQTAU4DV.js → chunk-C6TEYKXV.js} +8 -8
- package/dist/bundle/{chunk-6AJDVJVZ.js → chunk-CKK6JOC4.js} +2 -2
- package/dist/bundle/{chunk-4U2555EQ.js → chunk-CUZHKYC2.js} +30 -28
- package/dist/bundle/{chunk-7LLUUXJB.js → chunk-DHD25JII.js} +1 -1
- package/dist/bundle/{chunk-RYKG6AEH.js → chunk-EPPSMCEV.js} +4 -2
- package/dist/bundle/chunk-F5DYBWH7.js +299 -0
- package/dist/bundle/{chunk-KIJLM5UL.js → chunk-FBLUKCIR.js} +1 -1
- package/dist/bundle/{chunk-WZ5XK74U.js → chunk-FEM2JQN2.js} +1 -1
- package/dist/bundle/{chunk-SSXCOUP3.js → chunk-G6IX2MD2.js} +500 -227
- package/dist/bundle/{chunk-OTMGAKUM.js → chunk-GR3QDHBU.js} +7 -7
- package/dist/bundle/{chunk-QEI55M2F.js → chunk-GXDOTUUO.js} +10 -10
- package/dist/bundle/chunk-H3MFBYTQ.js +261 -0
- package/dist/bundle/{chunk-DFUPETW7.js → chunk-HC56J5LB.js} +135 -76
- package/dist/bundle/{chunk-D6OXI2NV.js → chunk-HSI7YOYK.js} +229 -67
- package/dist/bundle/{chunk-FGTPREAZ.js → chunk-HW5QTRFF.js} +35 -35
- package/dist/bundle/{chunk-VNIBTNV4.js → chunk-IEC4E65G.js} +2 -2
- package/dist/bundle/{chunk-EUPZSR2G.js → chunk-IPBZKUC3.js} +4 -4
- package/dist/bundle/{chunk-EQ7XRRKV.js → chunk-JHFP3Z5S.js} +11 -11
- package/dist/bundle/{chunk-3GO3KME7.js → chunk-JX5JJZC3.js} +3 -3
- package/dist/bundle/{chunk-7HAIM7GV.js → chunk-JZ4YOAHA.js} +963 -622
- package/dist/bundle/{chunk-B3KWAULD.js → chunk-KAPJQGHE.js} +2 -2
- package/dist/bundle/{chunk-T6CZWSHF.js → chunk-KNE6VFHZ.js} +21 -21
- package/dist/bundle/{chunk-I7SOXH64.js → chunk-KX5MZVPX.js} +66 -39
- package/dist/bundle/chunk-L62EJDNZ.js +64 -0
- package/dist/bundle/{chunk-EPDRF66S.js → chunk-LDRQ5NAP.js} +22 -14
- package/dist/bundle/{chunk-7VU5UGRR.js → chunk-LEA4BGK7.js} +16 -16
- package/dist/bundle/{chunk-ZMPTO2WB.js → chunk-LQX74VKG.js} +1 -1
- package/dist/bundle/{chunk-LKJXTACE.js → chunk-MJMVIFSC.js} +7 -7
- package/dist/bundle/{chunk-KWRSC6O6.js → chunk-MNOVYS43.js} +18 -4
- package/dist/bundle/{chunk-M43MBWJX.js → chunk-MOTKS7XG.js} +20741 -14882
- package/dist/bundle/{chunk-MWEOVTIF.js → chunk-MSDCZ6GT.js} +4 -4
- package/dist/bundle/{chunk-SOZVC3SV.js → chunk-MVDPZRFE.js} +1 -1
- package/dist/bundle/{chunk-NTZDM5SJ.js → chunk-NRRI37NJ.js} +9 -9
- package/dist/bundle/{chunk-BKY4XVB4.js → chunk-O7L44JK2.js} +2632 -1870
- package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-OE7EIP5L.js} +1 -1
- package/dist/bundle/{chunk-RAMPYIO2.js → chunk-OSBHEM2A.js} +11 -11
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-DG4DWAU7.js → chunk-QLGG7S6F.js} +3 -3
- package/dist/bundle/{chunk-6UFWFKFH.js → chunk-QW5VPZEH.js} +2 -2
- package/dist/bundle/{chunk-C6UKW7JO.js → chunk-QXM7S3Y3.js} +6 -6
- package/dist/bundle/{chunk-ESFMHBHH.js → chunk-R2ULMWB4.js} +62 -53
- package/dist/bundle/{chunk-L6WUAGPN.js → chunk-R3JYPY3J.js} +3 -3
- package/dist/bundle/{chunk-2UW533HQ.js → chunk-RGJ7OWHU.js} +4 -4
- package/dist/bundle/{chunk-7K5TDTZY.js → chunk-RPQ3JOD3.js} +7 -7
- package/dist/bundle/{chunk-L643D4RJ.js → chunk-S2EAGDS7.js} +12 -12
- package/dist/bundle/{chunk-4KDZ22RA.js → chunk-SQT47CFW.js} +1 -1
- package/dist/bundle/{chunk-CLEZE65P.js → chunk-SZ3Z4ZNO.js} +1 -1
- package/dist/bundle/chunk-T5X4LGXE.js +380 -0
- package/dist/bundle/{chunk-SMVO5R3T.js → chunk-TFFEFEG2.js} +39 -26
- package/dist/bundle/{chunk-LFQ73UFK.js → chunk-TKXLWFM2.js} +3 -3
- package/dist/bundle/{chunk-SCFFCIIP.js → chunk-TN77LX6W.js} +2 -2
- package/dist/bundle/{chunk-VFIEYRYD.js → chunk-TWIC6JJG.js} +8 -8
- package/dist/bundle/{chunk-FXQPK742.js → chunk-UEZ6URJR.js} +29 -15
- package/dist/bundle/{chunk-OZEYFJX2.js → chunk-V4MM6GST.js} +1 -1
- package/dist/bundle/chunk-V74QFMSL.js +31 -0
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-6TZF2JP7.js → chunk-WY4NYPPS.js} +13 -13
- package/dist/bundle/{chunk-B5Z4XPVS.js → chunk-XITUFTON.js} +2 -2
- package/dist/bundle/{chunk-FWU3ZYHE.js → chunk-XJBYGMZ4.js} +776 -134
- package/dist/bundle/{chunk-KANH7GBB.js → chunk-XRZDYWF6.js} +2 -2
- package/dist/bundle/{chunk-ZRMZBMOF.js → chunk-Z6TTGTMU.js} +156 -9
- package/dist/bundle/{chunk-IFDO3YPJ.js → chunk-ZRHMB3LQ.js} +1 -1
- package/dist/bundle/{cli-YUATSOLA.js → cli-P3BZUE6S.js} +106 -64
- package/dist/bundle/command-contract-TOLB32NJ.js +41 -0
- package/dist/bundle/config-4KLLIADY.js +90 -0
- package/dist/bundle/{decode-IL44LNC3.js → decode-QWOQXM7M.js} +6 -6
- package/dist/bundle/{dispatch-3BGIXSJR.js → dispatch-5MGDLOK4.js} +9 -9
- package/dist/bundle/{dist-3W27UQ2S.js → dist-OUE4MF37.js} +108 -28
- package/dist/bundle/{echarts-CO4D26JF.js → echarts-65IMPY43.js} +2 -2
- package/dist/bundle/{embed-XH2X4DFM.js → embed-4IULBCKL.js} +7 -7
- package/dist/bundle/{embedder-WTFWDXBJ.js → embedder-JW4W6IZI.js} +10 -10
- package/dist/bundle/{failure-HTIS3NLS.js → failure-CR64C4XA.js} +3 -3
- package/dist/bundle/{first-run-5RBH7FDO.js → first-run-CH6C674R.js} +12 -12
- package/dist/bundle/first-screen-OCAW5ZN6.js +39 -0
- package/dist/bundle/{folders-F4DNQPIY.js → folders-VU4IN35Y.js} +5 -5
- package/dist/bundle/{instructions-EPPBL6TT.js → instructions-G5QIH2TM.js} +1 -1
- package/dist/bundle/{main-LVQTCDZS.js → main-O4ZJIEWP.js} +21 -23
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{meetings-BMELXRTR.js → meetings-77CCAVYD.js} +13 -7
- package/dist/bundle/{node-CQVMWVIG.js → node-E6VQHU4Y.js} +2 -2
- package/dist/bundle/{node-sqlite-QQEX7LZT.js → node-sqlite-RJZ4PGLD.js} +7 -7
- package/dist/bundle/{oauth-AYGX7CQS.js → oauth-F4JKNRW4.js} +8 -8
- package/dist/bundle/{open-MIL2TOT6.js → open-NYOGMIAA.js} +6 -6
- package/dist/bundle/openai-5U6EQTFQ.js +25 -0
- package/dist/bundle/{output-file-4XADZPYH.js → output-file-6COFGPUL.js} +6 -6
- package/dist/bundle/{process-NJVQK6GB.js → process-OBWUKBMX.js} +1 -1
- package/dist/bundle/{program-WUYRS6H7.js → program-MU7DEJTO.js} +115 -187
- package/dist/bundle/{prompt-J4QPFLEA.js → prompt-2QWQTHWT.js} +6 -6
- package/dist/bundle/{recognize-OLJZVNWW.js → recognize-SNUNTUC3.js} +5 -5
- package/dist/bundle/{remote-JPUXNYLV.js → remote-2CTCIQGF.js} +8 -8
- package/dist/bundle/{rerank-XVV3X5TT.js → rerank-XDA7NJNH.js} +8 -8
- package/dist/bundle/{run-log-DJXBEVS5.js → run-log-NSG3DJVX.js} +59 -59
- package/dist/bundle/{serve-NYYUO3MR.js → serve-TWQFHOV2.js} +10 -10
- package/dist/bundle/{server-4Z5E4YTT.js → server-RIQ6HMH2.js} +47 -47
- package/dist/bundle/server-XO6XQQTJ.js +72 -0
- package/dist/bundle/{services-EKWM76HP.js → services-NKZQJQIV.js} +49 -33
- package/dist/bundle/{speech-WFJ44ACJ.js → speech-ZOB76SXA.js} +14 -14
- package/dist/bundle/{state-VIRCT4VW.js → state-7YYEIXQ5.js} +7 -7
- package/dist/bundle/{store-ZTDZ6UY5.js → store-E6RTSSNR.js} +29 -18
- package/dist/bundle/{store-2Q4GEZJS.js → store-OX4HRBLO.js} +80 -29
- package/dist/bundle/store-connection-55QPNUDS.js +83 -0
- package/dist/bundle/store-maintenance-command-Q5MSU6OK.js +62 -0
- package/dist/bundle/{streaming-7BPKIGAS.js → streaming-O53PIORL.js} +7 -7
- package/dist/bundle/{tokens-CQHMMKNX.js → tokens-QKNEP2GJ.js} +7 -7
- package/dist/bundle/zm.js +9 -10
- package/dist/bundle/zoom-app-TSI2MGVK.js +41 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +1 -0
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -3
- package/dist/config.js.map +1 -1
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -0
- package/dist/identity.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +7 -2
- package/dist/program-bindings.js.map +1 -1
- package/dist/setup-commands.d.ts +6 -0
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +24 -9
- package/dist/setup-commands.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts +32 -0
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +61 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +3 -3
- package/dist/bundle/answer-policy-5OYUL6UF.js +0 -103
- package/dist/bundle/chunk-3ZIHUSMM.js +0 -22
- package/dist/bundle/chunk-54RTMQL6.js +0 -132
- package/dist/bundle/chunk-6VFORXL3.js +0 -101
- package/dist/bundle/chunk-D4KBD63W.js +0 -19
- package/dist/bundle/chunk-J3ZBEWQY.js +0 -880
- package/dist/bundle/chunk-SXFODCYK.js +0 -9
- package/dist/bundle/chunk-YRNZT4GQ.js +0 -176
- package/dist/bundle/chunk-Z3WXI4DK.js +0 -31
- package/dist/bundle/command-contract-UWHY55UE.js +0 -41
- package/dist/bundle/config-TGF6E6ZD.js +0 -89
- package/dist/bundle/first-screen-PGFIXJAX.js +0 -39
- package/dist/bundle/openai-7QZZXQW5.js +0 -25
- package/dist/bundle/server-VW5UVCH7.js +0 -72
- package/dist/bundle/store-connection-FKVVQLEF.js +0 -83
- package/dist/bundle/store-maintenance-command-AU73UVUQ.js +0 -62
- package/dist/bundle/zoom-app-OEKFMJS6.js +0 -25
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WY4NYPPS.js";
|
|
12
12
|
import {
|
|
13
13
|
isNewer,
|
|
14
14
|
updateCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BOAMDYLY.js";
|
|
16
16
|
import {
|
|
17
17
|
MAX_ACTIONS,
|
|
18
18
|
ModerationRules,
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
chatReferenceOf,
|
|
21
21
|
defaultRules,
|
|
22
22
|
ensureAccount,
|
|
23
|
+
envelopeOfVcard,
|
|
23
24
|
gather,
|
|
24
25
|
isId,
|
|
25
26
|
judge,
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
someUndone,
|
|
31
32
|
validateFormattedText,
|
|
32
33
|
visibleFormattedText
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5ZJXKASF.js";
|
|
34
35
|
import {
|
|
35
36
|
DEFAULT_IMAGE_MODEL,
|
|
36
37
|
DEFAULT_RERANK_MODEL,
|
|
@@ -58,10 +59,7 @@ import {
|
|
|
58
59
|
typedCommand,
|
|
59
60
|
vectorModelKey,
|
|
60
61
|
withAttempt
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
isCliFailure
|
|
64
|
-
} from "./chunk-3ZIHUSMM.js";
|
|
62
|
+
} from "./chunk-CUZHKYC2.js";
|
|
65
63
|
import {
|
|
66
64
|
AGENDA_COLUMNS,
|
|
67
65
|
CHAT_COLUMNS,
|
|
@@ -82,6 +80,7 @@ import {
|
|
|
82
80
|
QUERY_LIMITS,
|
|
83
81
|
QUERY_VERSION,
|
|
84
82
|
SEARCH_QUERY,
|
|
83
|
+
SOURCE_REVIEW_KIND,
|
|
85
84
|
TASK_CLOSE_KIND,
|
|
86
85
|
TASK_RELATION_KINDS,
|
|
87
86
|
TRACKED_CHAT_COLUMNS,
|
|
@@ -106,10 +105,7 @@ import {
|
|
|
106
105
|
entriesOfList,
|
|
107
106
|
exhausted,
|
|
108
107
|
fetchedKey,
|
|
109
|
-
findMentions,
|
|
110
108
|
fitting,
|
|
111
|
-
googleDocumentId,
|
|
112
|
-
googleDocumentLinks,
|
|
113
109
|
hasStems,
|
|
114
110
|
hasText,
|
|
115
111
|
historyStartKey,
|
|
@@ -120,12 +116,14 @@ import {
|
|
|
120
116
|
isOwnerOnlyKind,
|
|
121
117
|
isQueryLimit,
|
|
122
118
|
isStemmed,
|
|
119
|
+
listedHolds,
|
|
123
120
|
matchDownloads,
|
|
124
121
|
mayDecide,
|
|
125
122
|
messageOfEmail,
|
|
126
123
|
normalizeVocabularyName,
|
|
127
124
|
outOfTime,
|
|
128
125
|
pdfPreviewLimits,
|
|
126
|
+
plainQuery,
|
|
129
127
|
proposerOfAction,
|
|
130
128
|
queryFilter,
|
|
131
129
|
rankingContextRange,
|
|
@@ -134,14 +132,15 @@ import {
|
|
|
134
132
|
threadConversation,
|
|
135
133
|
validateAst,
|
|
136
134
|
validateFields,
|
|
135
|
+
waitingPointer,
|
|
137
136
|
withoutField
|
|
138
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-MOTKS7XG.js";
|
|
139
138
|
import {
|
|
140
139
|
DEFAULT_STEMMERS,
|
|
141
140
|
createStemmer,
|
|
142
141
|
fold,
|
|
143
142
|
normalize
|
|
144
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-TWIC6JJG.js";
|
|
145
144
|
import {
|
|
146
145
|
COUNTER_FIELDS,
|
|
147
146
|
INTERNAL_NOTES,
|
|
@@ -150,13 +149,20 @@ import {
|
|
|
150
149
|
counterFreshness,
|
|
151
150
|
counterObservationTime,
|
|
152
151
|
envelopeErrors,
|
|
152
|
+
findMentions,
|
|
153
153
|
formatLocator,
|
|
154
154
|
formatReference,
|
|
155
|
+
googleDocumentId,
|
|
156
|
+
googleDocumentLinks,
|
|
157
|
+
headerErrors,
|
|
158
|
+
holdsKind,
|
|
159
|
+
holdsKindOf,
|
|
155
160
|
isFolderProvider,
|
|
161
|
+
isImportedProvider,
|
|
156
162
|
isKind,
|
|
157
163
|
isLocator,
|
|
164
|
+
jsonLine,
|
|
158
165
|
kindIn,
|
|
159
|
-
kindOf,
|
|
160
166
|
parseLocator,
|
|
161
167
|
parseReference,
|
|
162
168
|
pointerOf,
|
|
@@ -164,30 +170,35 @@ import {
|
|
|
164
170
|
rankingOptions,
|
|
165
171
|
rankingQuestion,
|
|
166
172
|
recordErrors
|
|
167
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-6AMMTXEA.js";
|
|
168
174
|
import {
|
|
169
175
|
TASK_KINDS,
|
|
170
176
|
TASK_ORIGINS,
|
|
171
177
|
TASK_STATES,
|
|
172
178
|
createTaskService,
|
|
173
179
|
isClosedState
|
|
174
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-T5X4LGXE.js";
|
|
181
|
+
import {
|
|
182
|
+
isCliFailure,
|
|
183
|
+
sqliteCode
|
|
184
|
+
} from "./chunk-37B7A4RP.js";
|
|
175
185
|
import {
|
|
176
186
|
DEFAULT_TASK_CATEGORIES,
|
|
177
187
|
FALLBACK_CATEGORY
|
|
178
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-GR3QDHBU.js";
|
|
179
189
|
import {
|
|
190
|
+
isUsable,
|
|
180
191
|
normalizeTag
|
|
181
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-F5DYBWH7.js";
|
|
182
193
|
import {
|
|
183
194
|
MAX_MODEL_IMAGE_BYTES
|
|
184
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-QW5VPZEH.js";
|
|
185
196
|
import {
|
|
186
197
|
OPENAI_URL,
|
|
187
198
|
openRemote,
|
|
188
199
|
remoteKey,
|
|
189
200
|
remoteModel
|
|
190
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-JX5JJZC3.js";
|
|
191
202
|
import {
|
|
192
203
|
Unzip,
|
|
193
204
|
UnzipInflate,
|
|
@@ -198,16 +209,17 @@ import {
|
|
|
198
209
|
placedText,
|
|
199
210
|
runEmbedders,
|
|
200
211
|
textModelsDirectory
|
|
201
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-5GOE6PQK.js";
|
|
202
213
|
import {
|
|
203
214
|
installFiles,
|
|
204
215
|
megabytes
|
|
205
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-LDRQ5NAP.js";
|
|
206
217
|
import {
|
|
207
218
|
storePath,
|
|
208
219
|
wirecatDirectory
|
|
209
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-CKK6JOC4.js";
|
|
210
221
|
import {
|
|
222
|
+
MEETING_FIELD_NAMES,
|
|
211
223
|
MEETING_FINDINGS_KIND,
|
|
212
224
|
canonicalMeetingReference,
|
|
213
225
|
createMeetingContext,
|
|
@@ -225,7 +237,7 @@ import {
|
|
|
225
237
|
validateMeetingHitSearch,
|
|
226
238
|
validateMeetingPassage,
|
|
227
239
|
validateMeetingSeriesHistory
|
|
228
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-HC56J5LB.js";
|
|
229
241
|
import {
|
|
230
242
|
OPERATORS_BY_TYPE,
|
|
231
243
|
dateRange,
|
|
@@ -236,10 +248,10 @@ import {
|
|
|
236
248
|
timezoneOf,
|
|
237
249
|
validateQuery,
|
|
238
250
|
walkQuery
|
|
239
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-B6JMVB6R.js";
|
|
240
252
|
import {
|
|
241
253
|
resolvePaths
|
|
242
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-KNE6VFHZ.js";
|
|
243
255
|
import {
|
|
244
256
|
array,
|
|
245
257
|
maxLength,
|
|
@@ -253,7 +265,7 @@ import {
|
|
|
253
265
|
safeParse,
|
|
254
266
|
strictObject,
|
|
255
267
|
string
|
|
256
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-NRRI37NJ.js";
|
|
257
269
|
import {
|
|
258
270
|
importFrom,
|
|
259
271
|
resolveFrom
|
|
@@ -261,10 +273,10 @@ import {
|
|
|
261
273
|
import {
|
|
262
274
|
CliError,
|
|
263
275
|
isCliError
|
|
264
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-FEM2JQN2.js";
|
|
265
277
|
import {
|
|
266
278
|
singleLine
|
|
267
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-OE7EIP5L.js";
|
|
268
280
|
import {
|
|
269
281
|
__commonJS,
|
|
270
282
|
__name,
|
|
@@ -16880,7 +16892,7 @@ var require_lib3 = __commonJS({
|
|
|
16880
16892
|
}
|
|
16881
16893
|
});
|
|
16882
16894
|
|
|
16883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
16884
16896
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
16885
16897
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
16886
16898
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -16888,9 +16900,7 @@ var SQLITE_BUSY = 5;
|
|
|
16888
16900
|
var storeAbsent = /* @__PURE__ */ __name((error) => {
|
|
16889
16901
|
if (isCliFailure(error))
|
|
16890
16902
|
return error.code === "validation_error" && error.message === NO_LOCAL_STORE;
|
|
16891
|
-
|
|
16892
|
-
const code = errcode ?? errno;
|
|
16893
|
-
return error instanceof Error && typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
16903
|
+
return error instanceof Error && sqliteCode(error) === SQLITE_BUSY;
|
|
16894
16904
|
}, "storeAbsent");
|
|
16895
16905
|
var accountUnknown = /* @__PURE__ */ __name((error) => isCliFailure(error) && (error.code === "not_found" || error.code === "authentication_error"), "accountUnknown");
|
|
16896
16906
|
var unless = /* @__PURE__ */ __name(async (work, expected2) => {
|
|
@@ -16957,7 +16967,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
16957
16967
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
16958
16968
|
}, "storeOnlyDeps");
|
|
16959
16969
|
|
|
16960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
16961
16971
|
var DAY_MS = 864e5;
|
|
16962
16972
|
var NEW_DAYS = 30;
|
|
16963
16973
|
var SAME_TEXT_MIN = 20;
|
|
@@ -17034,7 +17044,23 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17034
17044
|
};
|
|
17035
17045
|
}, "scorePerson");
|
|
17036
17046
|
|
|
17037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
17048
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
17049
|
+
const controller = new AbortController();
|
|
17050
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
17051
|
+
timer.unref();
|
|
17052
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
17053
|
+
}, "timeLimit");
|
|
17054
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
17055
|
+
const limit = timeLimit(ms);
|
|
17056
|
+
try {
|
|
17057
|
+
return await run(limit.signal);
|
|
17058
|
+
} finally {
|
|
17059
|
+
limit.clear();
|
|
17060
|
+
}
|
|
17061
|
+
}, "withTimeLimit");
|
|
17062
|
+
|
|
17063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
17038
17064
|
var REGISTRIES = {
|
|
17039
17065
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
17040
17066
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -17043,16 +17069,18 @@ var TIMEOUT_MS = 1e4;
|
|
|
17043
17069
|
var askRegistries = /* @__PURE__ */ __name(async (id2, options = {}) => Promise.all([askCas(id2, options), askLols(id2, options)]), "askRegistries");
|
|
17044
17070
|
var getJson = /* @__PURE__ */ __name(async (url, headers, { fetch: fetchFn = fetch, timeoutMs = TIMEOUT_MS }) => {
|
|
17045
17071
|
try {
|
|
17046
|
-
const
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17072
|
+
const { status, text: text2 } = await withTimeLimit(timeoutMs, async (signal) => {
|
|
17073
|
+
const response = await fetchFn(url, {
|
|
17074
|
+
headers: { accept: "application/json", ...headers },
|
|
17075
|
+
signal,
|
|
17076
|
+
redirect: "error"
|
|
17077
|
+
});
|
|
17078
|
+
return { status: response.status, text: await response.text() };
|
|
17050
17079
|
});
|
|
17051
|
-
const text2 = await response.text();
|
|
17052
17080
|
try {
|
|
17053
|
-
return { status
|
|
17081
|
+
return { status, body: JSON.parse(text2) };
|
|
17054
17082
|
} catch {
|
|
17055
|
-
return { failed: `answered ${
|
|
17083
|
+
return { failed: `answered ${status} with something that is not JSON` };
|
|
17056
17084
|
}
|
|
17057
17085
|
} catch (error) {
|
|
17058
17086
|
return {
|
|
@@ -17119,7 +17147,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
17119
17147
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
17120
17148
|
})), "notCovered");
|
|
17121
17149
|
|
|
17122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
17123
17151
|
var ACTIVITY_MESSAGES = 1e3;
|
|
17124
17152
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
17125
17153
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -17207,7 +17235,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
17207
17235
|
};
|
|
17208
17236
|
}, "botCheckService");
|
|
17209
17237
|
|
|
17210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
17211
17239
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
17212
17240
|
if (newest === null)
|
|
17213
17241
|
return null;
|
|
@@ -17216,7 +17244,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
17216
17244
|
return newest.addressed ? "owed" : null;
|
|
17217
17245
|
}, "mailTurn");
|
|
17218
17246
|
|
|
17219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
17220
17248
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
17221
17249
|
if (error instanceof CliError && error.code === "not_found")
|
|
17222
17250
|
return void 0;
|
|
@@ -17274,7 +17302,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account2, since, chats)
|
|
|
17274
17302
|
};
|
|
17275
17303
|
}, "mailActivity");
|
|
17276
17304
|
|
|
17277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
17278
17306
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
17279
17307
|
const ids = [...new Set(chatIds)];
|
|
17280
17308
|
if (ids.length === 0)
|
|
@@ -17300,7 +17328,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
17300
17328
|
}));
|
|
17301
17329
|
}, "chatCoverage");
|
|
17302
17330
|
|
|
17303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
17304
17332
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
17305
17333
|
if (value === void 0)
|
|
17306
17334
|
return void 0;
|
|
@@ -17310,7 +17338,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
17310
17338
|
return id2;
|
|
17311
17339
|
}, "threadIdOf");
|
|
17312
17340
|
|
|
17313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17314
17342
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17315
17343
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17316
17344
|
if (key in own)
|
|
@@ -17327,15 +17355,15 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17327
17355
|
return found.bind(adapter);
|
|
17328
17356
|
}, "capability");
|
|
17329
17357
|
|
|
17330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17331
17359
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17332
17360
|
|
|
17333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17334
17362
|
import { randomBytes } from "node:crypto";
|
|
17335
17363
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17336
17364
|
var newOperationId = newSendId;
|
|
17337
17365
|
|
|
17338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17339
17367
|
var LINKS = /https?:\/\/\S+/g;
|
|
17340
17368
|
var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before: before2 }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before2).map(({ question }) => question), "unanswered");
|
|
17341
17369
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -17365,7 +17393,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
17365
17393
|
});
|
|
17366
17394
|
}, "questions");
|
|
17367
17395
|
|
|
17368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
17369
17397
|
var TOP_POSTS = 5;
|
|
17370
17398
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
17371
17399
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -17482,7 +17510,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
17482
17510
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
17483
17511
|
}, "median");
|
|
17484
17512
|
|
|
17485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
17486
17514
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
17487
17515
|
const events = [];
|
|
17488
17516
|
for (const stay of stays) {
|
|
@@ -17514,7 +17542,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
17514
17542
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
17515
17543
|
}, "memberEvents");
|
|
17516
17544
|
|
|
17517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17518
17546
|
var AUDIT_PAGE = 200;
|
|
17519
17547
|
var AUDIT_BUDGET = 10;
|
|
17520
17548
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17594,7 +17622,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17594
17622
|
return found;
|
|
17595
17623
|
}, "burstJoins");
|
|
17596
17624
|
|
|
17597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
17598
17626
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
17599
17627
|
if (deps.reads !== "store")
|
|
17600
17628
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -17753,7 +17781,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
17753
17781
|
}
|
|
17754
17782
|
}, "senderAmong");
|
|
17755
17783
|
|
|
17756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
17757
17785
|
var EVENTS_DAYS = 7;
|
|
17758
17786
|
var TRACKED_DAYS = 30;
|
|
17759
17787
|
var STATS_PAGE = 1e3;
|
|
@@ -17871,8 +17899,8 @@ var chatsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
17871
17899
|
});
|
|
17872
17900
|
const counts = await store.roster.memberCounts(chatId, { since: new Date(from).toISOString().slice(0, 10) });
|
|
17873
17901
|
const known2 = unrecorded ? { ...stats, complete: false, membersUnrecorded: true } : stats;
|
|
17874
|
-
const
|
|
17875
|
-
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ?
|
|
17902
|
+
const counted2 = counts.length > 0 ? { ...known2, memberCounts: counts } : known2;
|
|
17903
|
+
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ? counted2 : { ...counted2, fetch: typedCommand(deps.messenger.app.command, `messages sync ${chatId}`) };
|
|
17876
17904
|
}, "stats"),
|
|
17877
17905
|
sendAs: /* @__PURE__ */ __name(async (chat) => {
|
|
17878
17906
|
if (deps.offline) {
|
|
@@ -18048,7 +18076,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
18048
18076
|
return members.length === 0 ? null : members;
|
|
18049
18077
|
}, "storedMembers");
|
|
18050
18078
|
|
|
18051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
18052
18080
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
18053
18081
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
18054
18082
|
const name = typed.trim().toLowerCase();
|
|
@@ -18072,7 +18100,7 @@ var triggerStems = /* @__PURE__ */ __name((categories) => {
|
|
|
18072
18100
|
const { english, spanish } = stemmersOf();
|
|
18073
18101
|
const built = categories.map(({ name, triggers }) => ({
|
|
18074
18102
|
name,
|
|
18075
|
-
english: new Set(Object.values(triggers).flatMap((
|
|
18103
|
+
english: new Set(Object.values(triggers).flatMap((words4) => words4.flatMap((word) => english.stemTokens(word)))),
|
|
18076
18104
|
spanish: new Set(triggers.es.flatMap((word) => spanish.stemTokens(word)))
|
|
18077
18105
|
}));
|
|
18078
18106
|
stemsByList.set(categories, built);
|
|
@@ -18082,7 +18110,7 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
18082
18110
|
const stem = stemmersOf();
|
|
18083
18111
|
const english = stem.english.stemTokens(text2);
|
|
18084
18112
|
const spanish = readsSpanish(text2) ? stem.spanish.stemTokens(text2) : [];
|
|
18085
|
-
const
|
|
18113
|
+
const counted2 = [];
|
|
18086
18114
|
for (const triggers of triggerStems(categories)) {
|
|
18087
18115
|
const hit = /* @__PURE__ */ new Set();
|
|
18088
18116
|
english.forEach((word, at) => {
|
|
@@ -18092,20 +18120,20 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
18092
18120
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
18093
18121
|
hit.add(other);
|
|
18094
18122
|
});
|
|
18095
|
-
|
|
18123
|
+
counted2.push({ name: triggers.name, hits: hit.size });
|
|
18096
18124
|
}
|
|
18097
|
-
return
|
|
18125
|
+
return counted2;
|
|
18098
18126
|
}, "hitsByList");
|
|
18099
18127
|
var listsHit = /* @__PURE__ */ __name((text2, categories) => hitsByList(text2, categories).filter(({ hits }) => hits > 0).map(({ name }) => name), "listsHit");
|
|
18100
18128
|
var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGORIES) => {
|
|
18101
18129
|
let best = { name: FALLBACK_CATEGORY, hits: 0 };
|
|
18102
|
-
for (const
|
|
18103
|
-
if (
|
|
18104
|
-
best =
|
|
18130
|
+
for (const counted2 of hitsByList(text2, categories))
|
|
18131
|
+
if (counted2.hits > best.hits)
|
|
18132
|
+
best = counted2;
|
|
18105
18133
|
return best.name;
|
|
18106
18134
|
}, "categorize");
|
|
18107
18135
|
|
|
18108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
18109
18137
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
18110
18138
|
var RULES_IN = {
|
|
18111
18139
|
dialog: "all",
|
|
@@ -18202,7 +18230,7 @@ var applyTaskRules = /* @__PURE__ */ __name(async (review, { store, account: acc
|
|
|
18202
18230
|
return result;
|
|
18203
18231
|
}, "applyTaskRules");
|
|
18204
18232
|
var ARRIVAL_WINDOW = 50;
|
|
18205
|
-
var
|
|
18233
|
+
var kindOf = /* @__PURE__ */ __name(async (store, account2, chat) => await store.chats.chatKind(account2, chat) ?? "unknown", "kindOf");
|
|
18206
18234
|
var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account2, message) => {
|
|
18207
18235
|
const page = await store.messages.messages(account2, message.chatId, { limit: ARRIVAL_WINDOW });
|
|
18208
18236
|
const messages = [...page.items.filter((one2) => one2.id !== message.id), message].sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp));
|
|
@@ -18211,7 +18239,7 @@ var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account2, mes
|
|
|
18211
18239
|
{
|
|
18212
18240
|
id: message.chatId,
|
|
18213
18241
|
messages,
|
|
18214
|
-
kind: await
|
|
18242
|
+
kind: await kindOf(store, account2, message.chatId),
|
|
18215
18243
|
watched: (await watchedChats(store, account2)).has(message.chatId)
|
|
18216
18244
|
}
|
|
18217
18245
|
]
|
|
@@ -18303,7 +18331,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
18303
18331
|
const tasks = [];
|
|
18304
18332
|
const pass = await applyTaskRules({
|
|
18305
18333
|
chats: [
|
|
18306
|
-
{ id: chat, messages: page.items, kind: await
|
|
18334
|
+
{ id: chat, messages: page.items, kind: await kindOf(store, account2, chat), watched: watched.has(chat) }
|
|
18307
18335
|
]
|
|
18308
18336
|
}, { store: store.tasks, account: account2, categories, dryRun: !yes, onHeld: /* @__PURE__ */ __name((task2) => tasks.push(task2), "onHeld") });
|
|
18309
18337
|
passes.push({ chat, messages: page.items.length, ...pass, tasks });
|
|
@@ -18311,7 +18339,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
18311
18339
|
return passes;
|
|
18312
18340
|
}, "applyTaskRulesToChats");
|
|
18313
18341
|
|
|
18314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
18315
18343
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
18316
18344
|
const tags = /* @__PURE__ */ new Map();
|
|
18317
18345
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -18320,7 +18348,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
18320
18348
|
return tags;
|
|
18321
18349
|
}, "taskTagFilters");
|
|
18322
18350
|
|
|
18323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
18324
18352
|
var DAY = 864e5;
|
|
18325
18353
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
18326
18354
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -18567,7 +18595,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
18567
18595
|
};
|
|
18568
18596
|
}, "agendaItem");
|
|
18569
18597
|
|
|
18570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
18571
18599
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
18572
18600
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
18573
18601
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -18631,7 +18659,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
18631
18659
|
}
|
|
18632
18660
|
}, "validateContextEvidencePage");
|
|
18633
18661
|
|
|
18634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
18635
18663
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
18636
18664
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
18637
18665
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -18684,7 +18712,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
18684
18712
|
};
|
|
18685
18713
|
}, "contextReadBudget");
|
|
18686
18714
|
|
|
18687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
18688
18716
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
18689
18717
|
if (!port || typeof port.read !== "function")
|
|
18690
18718
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -18728,7 +18756,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
18728
18756
|
};
|
|
18729
18757
|
}, "createContextEvidenceReader");
|
|
18730
18758
|
|
|
18731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
18732
18760
|
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");
|
|
18733
18761
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
18734
18762
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -18744,8 +18772,9 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
18744
18772
|
}, "excerpt");
|
|
18745
18773
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
18746
18774
|
|
|
18747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18748
|
-
|
|
18775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
18776
|
+
import { createInterface } from "node:readline";
|
|
18777
|
+
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
18749
18778
|
dryRun,
|
|
18750
18779
|
source: null,
|
|
18751
18780
|
created: 0,
|
|
@@ -18756,70 +18785,91 @@ var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
|
18756
18785
|
proposed: [],
|
|
18757
18786
|
waiting: [],
|
|
18758
18787
|
flagged: [],
|
|
18759
|
-
|
|
18788
|
+
unmatched: [],
|
|
18789
|
+
ignored: [],
|
|
18790
|
+
errors,
|
|
18791
|
+
truncated: false
|
|
18760
18792
|
}), "emptyReceipt");
|
|
18761
|
-
var
|
|
18762
|
-
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18767
|
-
|
|
18768
|
-
|
|
18769
|
-
|
|
18770
|
-
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
const valid = record;
|
|
18774
|
-
if (errors.length === 0 && keys.has(valid.key))
|
|
18775
|
-
errors.push({
|
|
18776
|
-
pointer: pointerOf("records", index, "key"),
|
|
18777
|
-
code: "record.duplicate-key",
|
|
18778
|
-
message: "another record of this envelope has this key",
|
|
18779
|
-
key: valid.key
|
|
18780
|
-
});
|
|
18781
|
-
const identity = errors.length === 0 ? `${valid.type}\0${valid.external_id}` : "";
|
|
18782
|
-
if (errors.length === 0 && identities.has(identity))
|
|
18783
|
-
errors.push({
|
|
18784
|
-
pointer: pointerOf("records", index, "external_id"),
|
|
18785
|
-
code: "record.duplicate",
|
|
18786
|
-
message: `another record of this envelope is ${valid.type} ${valid.external_id}`,
|
|
18787
|
-
key: valid.key
|
|
18788
|
-
});
|
|
18789
|
-
if (errors.length > 0) {
|
|
18790
|
-
receipt.refused += 1;
|
|
18791
|
-
for (const error of errors)
|
|
18792
|
-
receipt.errors.push(error);
|
|
18793
|
-
continue;
|
|
18794
|
-
}
|
|
18795
|
-
keys.add(valid.key);
|
|
18796
|
-
identities.add(identity);
|
|
18797
|
-
taken.push({ index, record: valid });
|
|
18798
|
-
}
|
|
18799
|
-
const written = await store.records.write(source, taken, { dryRun, chunk });
|
|
18800
|
-
for (const outcome2 of written.outcomes) {
|
|
18801
|
-
receipt[outcome2.status] += 1;
|
|
18802
|
-
if (outcome2.error)
|
|
18803
|
-
receipt.errors.push(outcome2.error);
|
|
18804
|
-
}
|
|
18805
|
-
for (const error of written.laterErrors)
|
|
18806
|
-
receipt.errors.push(error);
|
|
18807
|
-
receipt.errors.sort((a, b) => a.pointer.localeCompare(b.pointer, "en", { numeric: true }));
|
|
18808
|
-
receipt.proposed = written.proposed;
|
|
18809
|
-
receipt.waiting = written.waiting.map(({ index, key, missing: missing4 }) => ({
|
|
18793
|
+
var receiptOf = /* @__PURE__ */ __name((dryRun, source, run) => ({
|
|
18794
|
+
dryRun,
|
|
18795
|
+
source: { provider: source.provider, account: source.account, batchId: source.batch_id },
|
|
18796
|
+
created: run.created,
|
|
18797
|
+
updated: run.updated,
|
|
18798
|
+
unchanged: run.unchanged,
|
|
18799
|
+
deleted: run.deleted,
|
|
18800
|
+
refused: run.refused,
|
|
18801
|
+
proposed: run.proposed,
|
|
18802
|
+
waiting: run.waiting.map(({ index, key, missing: missing4 }) => ({ key, pointer: waitingPointer(index, missing4), missing: missing4 })),
|
|
18803
|
+
flagged: run.flagged.map(({ index, ...flag }) => ({ ...flag, pointer: pointerOf("records", index) })),
|
|
18804
|
+
unmatched: run.unmatched.map(({ index, key, reason, candidates }) => ({
|
|
18810
18805
|
key,
|
|
18811
|
-
pointer: pointerOf("records", index, "
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18806
|
+
pointer: pointerOf("records", index, "fields"),
|
|
18807
|
+
reason,
|
|
18808
|
+
candidates
|
|
18809
|
+
})),
|
|
18810
|
+
ignored: run.ignored.map(({ index, key, at, reason }) => ({
|
|
18815
18811
|
key,
|
|
18816
|
-
pointer: pointerOf("records", index),
|
|
18817
|
-
|
|
18818
|
-
}))
|
|
18819
|
-
|
|
18812
|
+
pointer: pointerOf("records", index, ...at),
|
|
18813
|
+
reason
|
|
18814
|
+
})),
|
|
18815
|
+
errors: run.errors,
|
|
18816
|
+
truncated: run.truncated
|
|
18817
|
+
}), "receiptOf");
|
|
18818
|
+
var itemOf = /* @__PURE__ */ __name((record, index) => {
|
|
18819
|
+
const errors = recordErrors(record, index);
|
|
18820
|
+
return { index, record, ...errors.length > 0 ? { errors } : {} };
|
|
18821
|
+
}, "itemOf");
|
|
18822
|
+
var refusedAll = /* @__PURE__ */ __name((dryRun, errors, onIssue) => {
|
|
18823
|
+
for (const error of errors)
|
|
18824
|
+
onIssue?.(error);
|
|
18825
|
+
return emptyReceipt(dryRun, errors);
|
|
18826
|
+
}, "refusedAll");
|
|
18827
|
+
var ingest = /* @__PURE__ */ __name(async (store, envelope, { account: account2, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
18828
|
+
const broken = envelopeErrors(envelope, account2);
|
|
18829
|
+
if (broken.length > 0)
|
|
18830
|
+
return refusedAll(dryRun, broken, onIssue);
|
|
18831
|
+
const { source, records, options } = envelope;
|
|
18832
|
+
const items = records.map(itemOf);
|
|
18833
|
+
return receiptOf(dryRun, source, await store.records.run(source, items, { dryRun, chunk, options, onIssue }));
|
|
18820
18834
|
}, "ingest");
|
|
18835
|
+
var jsonlLines = /* @__PURE__ */ __name((stream) => createInterface({ input: stream, crlfDelay: Number.POSITIVE_INFINITY }), "jsonlLines");
|
|
18836
|
+
var ingestLines = /* @__PURE__ */ __name(async (store, lines, { account: account2, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
18837
|
+
const iterator = lines[Symbol.asyncIterator]();
|
|
18838
|
+
let header = {};
|
|
18839
|
+
for (let next = await iterator.next(); !next.done; next = await iterator.next())
|
|
18840
|
+
if (next.value.trim() !== "" && next.value !== "\uFEFF") {
|
|
18841
|
+
header = jsonLine(next.value);
|
|
18842
|
+
break;
|
|
18843
|
+
}
|
|
18844
|
+
const broken = headerErrors(header, account2);
|
|
18845
|
+
if (broken.length > 0) {
|
|
18846
|
+
await iterator.return?.();
|
|
18847
|
+
return refusedAll(dryRun, broken, onIssue);
|
|
18848
|
+
}
|
|
18849
|
+
const { source, options } = header;
|
|
18850
|
+
async function* items() {
|
|
18851
|
+
let index = 0;
|
|
18852
|
+
for (let next = await iterator.next(); !next.done; next = await iterator.next()) {
|
|
18853
|
+
if (next.value.trim() === "")
|
|
18854
|
+
continue;
|
|
18855
|
+
yield itemOf(jsonLine(next.value), index);
|
|
18856
|
+
index += 1;
|
|
18857
|
+
}
|
|
18858
|
+
}
|
|
18859
|
+
__name(items, "items");
|
|
18860
|
+
return receiptOf(dryRun, source, await store.records.run(source, items(), { dryRun, chunk, options, onIssue }));
|
|
18861
|
+
}, "ingestLines");
|
|
18862
|
+
var ingestVcard = /* @__PURE__ */ __name(async (store, text2, { provider, batchId, region, ...options }) => {
|
|
18863
|
+
const { envelope, issues } = envelopeOfVcard(text2, {
|
|
18864
|
+
provider,
|
|
18865
|
+
account: options.account,
|
|
18866
|
+
batchId,
|
|
18867
|
+
...region === void 0 ? {} : { region }
|
|
18868
|
+
});
|
|
18869
|
+
return { ...await ingest(store, envelope, options), vcard: issues };
|
|
18870
|
+
}, "ingestVcard");
|
|
18821
18871
|
|
|
18822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
18823
18873
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18824
18874
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
18825
18875
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -18846,7 +18896,10 @@ var personRefOf = /* @__PURE__ */ __name(async (store, provider, id2) => {
|
|
|
18846
18896
|
const person = await store.people.personOf({ provider, id: id2 });
|
|
18847
18897
|
return person ? `person:${person.uid}` : void 0;
|
|
18848
18898
|
}, "personRefOf");
|
|
18849
|
-
var projectsOf = /* @__PURE__ */ __name(async (store, person
|
|
18899
|
+
var projectsOf = /* @__PURE__ */ __name(async (store, person, project) => (/* @__PURE__ */ new Set([
|
|
18900
|
+
project,
|
|
18901
|
+
...(await store.knowledge.relations(null, person)).filter((one2) => isUsable(one2.standing) && one2.kind === "member-of" && one2.from === person && one2.to.startsWith("project:")).map((one2) => one2.to)
|
|
18902
|
+
])).size, "projectsOf");
|
|
18850
18903
|
var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
18851
18904
|
const found = [];
|
|
18852
18905
|
for (const person of people) {
|
|
@@ -18858,7 +18911,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
18858
18911
|
return found;
|
|
18859
18912
|
}, "identitiesIn");
|
|
18860
18913
|
|
|
18861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
18862
18915
|
var SEARCH_LIMIT = 500;
|
|
18863
18916
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
18864
18917
|
var aliasHits = {
|
|
@@ -18907,15 +18960,17 @@ var aliasHits = {
|
|
|
18907
18960
|
}, "candidates")
|
|
18908
18961
|
};
|
|
18909
18962
|
|
|
18910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
18911
18964
|
var WEIGHT = 0.5;
|
|
18912
18965
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
18913
18966
|
var LARGE_GROUP = 30;
|
|
18967
|
+
var SMALL_CHAT = 10;
|
|
18914
18968
|
var MIN_MESSAGES = 5;
|
|
18915
18969
|
var READ_LIMIT = 2e3;
|
|
18916
18970
|
var chatSenders = {
|
|
18917
18971
|
id: "chat-senders",
|
|
18918
|
-
version:
|
|
18972
|
+
version: 2,
|
|
18973
|
+
spreads: true,
|
|
18919
18974
|
candidates: /* @__PURE__ */ __name(async ({ store, project, confirmed, sources, since, owner, signal }) => {
|
|
18920
18975
|
if (!project)
|
|
18921
18976
|
return [];
|
|
@@ -18939,7 +18994,7 @@ var chatSenders = {
|
|
|
18939
18994
|
const size4 = Math.max((await store.roster.members(key, reference.chat)).length, senders.size);
|
|
18940
18995
|
const weight = size4 > LARGE_GROUP ? LARGE_GROUP_WEIGHT : WEIGHT;
|
|
18941
18996
|
for (const [id2, { count: count3, last }] of senders) {
|
|
18942
|
-
if (count3 < MIN_MESSAGES)
|
|
18997
|
+
if (size4 > SMALL_CHAT && count3 < MIN_MESSAGES)
|
|
18943
18998
|
continue;
|
|
18944
18999
|
const person = await personRefOf(store, key.provider, id2);
|
|
18945
19000
|
if (!person || person === owner)
|
|
@@ -18959,7 +19014,7 @@ var chatSenders = {
|
|
|
18959
19014
|
}, "candidates")
|
|
18960
19015
|
};
|
|
18961
19016
|
|
|
18962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
18963
19018
|
var WEIGHT2 = 0.7;
|
|
18964
19019
|
var chatTitle = {
|
|
18965
19020
|
id: "chat-title",
|
|
@@ -18998,7 +19053,7 @@ var chatTitle = {
|
|
|
18998
19053
|
}, "candidates")
|
|
18999
19054
|
};
|
|
19000
19055
|
|
|
19001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
19002
19057
|
var WEIGHT3 = 0.3;
|
|
19003
19058
|
var CONTACTS = 500;
|
|
19004
19059
|
var MOST_PAIRS = 200;
|
|
@@ -19059,13 +19114,14 @@ var emailDomain = {
|
|
|
19059
19114
|
}, "candidates")
|
|
19060
19115
|
};
|
|
19061
19116
|
|
|
19062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
19063
19118
|
var NAMED = 0.7;
|
|
19064
19119
|
var MEMBER_ONLY = 0.3;
|
|
19065
19120
|
var READ_LIMIT2 = 500;
|
|
19066
19121
|
var mailThread = {
|
|
19067
19122
|
id: "mail-thread",
|
|
19068
19123
|
version: 1,
|
|
19124
|
+
spreads: true,
|
|
19069
19125
|
candidates: /* @__PURE__ */ __name(async ({ store, project, confirmed, sources, since, owner, signal }) => {
|
|
19070
19126
|
if (!project)
|
|
19071
19127
|
return [];
|
|
@@ -19132,11 +19188,12 @@ var mailThread = {
|
|
|
19132
19188
|
}, "candidates")
|
|
19133
19189
|
};
|
|
19134
19190
|
|
|
19135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
19136
19192
|
var WEIGHT4 = 0.5;
|
|
19137
19193
|
var memberChats = {
|
|
19138
19194
|
id: "member-chats",
|
|
19139
19195
|
version: 1,
|
|
19196
|
+
spreads: true,
|
|
19140
19197
|
candidates: /* @__PURE__ */ __name(async ({ store, project, confirmed, sources, owner, signal }) => {
|
|
19141
19198
|
if (!project)
|
|
19142
19199
|
return [];
|
|
@@ -19172,11 +19229,12 @@ var memberChats = {
|
|
|
19172
19229
|
}, "candidates")
|
|
19173
19230
|
};
|
|
19174
19231
|
|
|
19175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
19176
19233
|
var WEIGHT5 = 0.6;
|
|
19177
19234
|
var memberDialog = {
|
|
19178
19235
|
id: "member-dialog",
|
|
19179
|
-
version:
|
|
19236
|
+
version: 2,
|
|
19237
|
+
spreads: true,
|
|
19180
19238
|
candidates: /* @__PURE__ */ __name(async ({ store, project, confirmed, sources, owner, signal }) => {
|
|
19181
19239
|
if (!project)
|
|
19182
19240
|
return [];
|
|
@@ -19190,7 +19248,7 @@ var memberDialog = {
|
|
|
19190
19248
|
if (chat.kind !== "dialog")
|
|
19191
19249
|
continue;
|
|
19192
19250
|
if (!projects.has(person))
|
|
19193
|
-
projects.set(person,
|
|
19251
|
+
projects.set(person, await projectsOf(store, person, project.ref));
|
|
19194
19252
|
const shared = projects.get(person) ?? 1;
|
|
19195
19253
|
found.push({
|
|
19196
19254
|
from: chatRef(key, chat.id),
|
|
@@ -19206,7 +19264,7 @@ var memberDialog = {
|
|
|
19206
19264
|
}, "candidates")
|
|
19207
19265
|
};
|
|
19208
19266
|
|
|
19209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
19210
19268
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
19211
19269
|
var DEFAULT_PURPOSES = ["work"];
|
|
19212
19270
|
var LINK_PURPOSE = "work";
|
|
@@ -19217,15 +19275,15 @@ var unknown = /* @__PURE__ */ __name((asked, config) => {
|
|
|
19217
19275
|
throw new CliError("validation_error", `unknown purpose ${wrong.join(", ")}; the configured ones are ${config.purposes.join(", ")}, or all`, { param: "purpose", purposes: [...config.purposes] });
|
|
19218
19276
|
}, "unknown");
|
|
19219
19277
|
var purposesOf = /* @__PURE__ */ __name((asked, config = BUILT_IN_PURPOSE_CONFIG, project) => {
|
|
19220
|
-
const
|
|
19221
|
-
if (
|
|
19222
|
-
if (
|
|
19278
|
+
const words4 = (asked ?? []).map((one2) => one2.trim()).filter(Boolean);
|
|
19279
|
+
if (words4.includes("all")) {
|
|
19280
|
+
if (words4.length > 1)
|
|
19223
19281
|
throw new CliError("validation_error", "--purpose all reads every purpose; give it alone");
|
|
19224
19282
|
return "all";
|
|
19225
19283
|
}
|
|
19226
|
-
if (
|
|
19227
|
-
unknown(
|
|
19228
|
-
return new Set(
|
|
19284
|
+
if (words4.length) {
|
|
19285
|
+
unknown(words4, config);
|
|
19286
|
+
return new Set(words4);
|
|
19229
19287
|
}
|
|
19230
19288
|
const own = (project?.key ? config.projects?.[project.key] : void 0) ?? (project?.ref ? config.projects?.[project.ref] : void 0);
|
|
19231
19289
|
return new Set(own ?? config.defaults);
|
|
@@ -19236,7 +19294,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
19236
19294
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
19237
19295
|
], "purposeList");
|
|
19238
19296
|
|
|
19239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
19240
19298
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
19241
19299
|
async around(ref, window2) {
|
|
19242
19300
|
const at = parseLocator(ref);
|
|
@@ -19255,8 +19313,8 @@ var wordsOf = /* @__PURE__ */ __name((text2) => (text2.match(/[\p{L}\p{N}\p{M}]+
|
|
|
19255
19313
|
var documentMatches = /* @__PURE__ */ __name((text2, queries, window2) => {
|
|
19256
19314
|
const paragraphs = text2.split(/\n\s*\n/).map((part) => part.replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
19257
19315
|
const query = queries.join(" ");
|
|
19258
|
-
const
|
|
19259
|
-
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) =>
|
|
19316
|
+
const words4 = new Set(wordsOf(query));
|
|
19317
|
+
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) => words4.has(word)) ? [index] : []);
|
|
19260
19318
|
const hit = matching2[0];
|
|
19261
19319
|
if (hit === void 0 || paragraphs.length < 2)
|
|
19262
19320
|
return { around: [], moreMatches: 0 };
|
|
@@ -19332,7 +19390,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19332
19390
|
};
|
|
19333
19391
|
}, "storedNeighbours");
|
|
19334
19392
|
|
|
19335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
19336
19394
|
import { createHash } from "node:crypto";
|
|
19337
19395
|
var DAY2 = 864e5;
|
|
19338
19396
|
var MAX_TIME = 864e13;
|
|
@@ -19366,10 +19424,10 @@ var text = /* @__PURE__ */ __name((value, name, max) => typeof value === "string
|
|
|
19366
19424
|
var whole = /* @__PURE__ */ __name((value, name, low, high) => Number.isSafeInteger(value) && value >= low && value <= high ? value : fail(`${name} must be a whole number from ${low} to ${high}`, name), "whole");
|
|
19367
19425
|
var laneQuery = /* @__PURE__ */ __name((value, name) => {
|
|
19368
19426
|
const query = text(value, name, 2048);
|
|
19369
|
-
const
|
|
19370
|
-
if (!
|
|
19427
|
+
const words4 = query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
19428
|
+
if (!words4.length || words4.length > 16)
|
|
19371
19429
|
fail(`${name} needs 1\u201316 literal words`, name);
|
|
19372
|
-
return
|
|
19430
|
+
return words4.join(" ");
|
|
19373
19431
|
}, "laneQuery");
|
|
19374
19432
|
var list = /* @__PURE__ */ __name((value, name, max) => {
|
|
19375
19433
|
if (value === void 0)
|
|
@@ -19648,7 +19706,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
19648
19706
|
return value;
|
|
19649
19707
|
}, "decodeCheckpoint");
|
|
19650
19708
|
|
|
19651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
19652
19710
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
19653
19711
|
var PAGE = 20;
|
|
19654
19712
|
var PEOPLE = 20;
|
|
@@ -20052,7 +20110,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
20052
20110
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
20053
20111
|
}, "peopleOf");
|
|
20054
20112
|
|
|
20055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
20056
20114
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
20057
20115
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
20058
20116
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -20117,7 +20175,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
20117
20175
|
omittedMatches: omitted
|
|
20118
20176
|
})), "matchProjectCandidates");
|
|
20119
20177
|
|
|
20120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
20121
20179
|
var KINDS = ["project", "tag", "topic"];
|
|
20122
20180
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
20123
20181
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -20172,7 +20230,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
20172
20230
|
};
|
|
20173
20231
|
}, "findEvidenceMentions");
|
|
20174
20232
|
|
|
20175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
20176
20234
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account2, chatId, { since, until }) => {
|
|
20177
20235
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
20178
20236
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -20267,7 +20325,7 @@ var proposedLinksOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
|
20267
20325
|
}
|
|
20268
20326
|
];
|
|
20269
20327
|
}).sort((a, b) => Number(a.id) - Number(b.id));
|
|
20270
|
-
const legacy = (await store.knowledge.relations(null, project)).filter((one2) =>
|
|
20328
|
+
const legacy = (await store.knowledge.relations(null, project)).filter((one2) => one2.standing === "proposed" && one2.kind === "member-of" && one2.to === project).map((one2) => ({ from: one2.from, id: `link:${one2.id}`, role: one2.role, purpose: one2.purpose }));
|
|
20271
20329
|
return [...proposals, ...legacy];
|
|
20272
20330
|
}, "proposedLinksOf");
|
|
20273
20331
|
var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed) => {
|
|
@@ -20275,7 +20333,7 @@ var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed
|
|
|
20275
20333
|
return [];
|
|
20276
20334
|
const confirmed = /* @__PURE__ */ new Set();
|
|
20277
20335
|
for (const relation of await store.knowledge.relations(null, project))
|
|
20278
|
-
if (relation.
|
|
20336
|
+
if (isUsable(relation.standing) && relation.kind === "member-of" && relation.to === project && /^person:.+/.test(relation.from))
|
|
20279
20337
|
confirmed.add(relation.from);
|
|
20280
20338
|
const members = [...confirmed].sort().map((ref) => ({ ref }));
|
|
20281
20339
|
if (!includeProposed)
|
|
@@ -20313,7 +20371,7 @@ var linkedChatsOf = /* @__PURE__ */ __name(async (store, project, options = {})
|
|
|
20313
20371
|
return [];
|
|
20314
20372
|
const chats = [];
|
|
20315
20373
|
for (const relation of await store.knowledge.relations(null, project)) {
|
|
20316
|
-
if (!relation.
|
|
20374
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== project)
|
|
20317
20375
|
continue;
|
|
20318
20376
|
const reference = chatOf2(relation.from);
|
|
20319
20377
|
if (reference)
|
|
@@ -20440,7 +20498,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20440
20498
|
const leftOut = [];
|
|
20441
20499
|
for (const one2 of all.filter((chat) => !purposeRead(purposes, chat.purpose))) {
|
|
20442
20500
|
const account2 = { provider: one2.provider, account: one2.account };
|
|
20443
|
-
const [
|
|
20501
|
+
const [counted2, [held]] = await Promise.all([
|
|
20444
20502
|
count3(account2, one2.chat, { since: gathered.window.after, until: gathered.window.before }),
|
|
20445
20503
|
chatCoverage(store, account2, [one2.chat])
|
|
20446
20504
|
]);
|
|
@@ -20453,7 +20511,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20453
20511
|
purpose: one2.purpose ?? LINK_PURPOSE,
|
|
20454
20512
|
relationship: one2.relationship,
|
|
20455
20513
|
...one2.proposed ? { proposed: one2.proposed } : {},
|
|
20456
|
-
...
|
|
20514
|
+
...counted2
|
|
20457
20515
|
});
|
|
20458
20516
|
}
|
|
20459
20517
|
return {
|
|
@@ -20478,13 +20536,14 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
20478
20536
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
20479
20537
|
}, "purposeHintOf");
|
|
20480
20538
|
|
|
20481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
20482
20540
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
20483
20541
|
var PERSON_SCORERS = [emailDomain];
|
|
20484
20542
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
20485
20543
|
var DEFAULT_THRESHOLD = 0.5;
|
|
20486
20544
|
var PERSON_THRESHOLD = 0.3;
|
|
20487
20545
|
var DEFAULT_LIMIT = 20;
|
|
20546
|
+
var MAX_HOPS = 4;
|
|
20488
20547
|
var projectOf2 = /* @__PURE__ */ __name(async (store, reference) => {
|
|
20489
20548
|
const ref = await canonicalProjectRef(store, reference);
|
|
20490
20549
|
const entry = (await store.knowledge.vocabulary({ kind: "project" })).entries.find((one2) => one2.id === ref.slice(8));
|
|
@@ -20495,7 +20554,7 @@ var projectOf2 = /* @__PURE__ */ __name(async (store, reference) => {
|
|
|
20495
20554
|
var confirmedOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
20496
20555
|
if (!project)
|
|
20497
20556
|
return { chats: [], people: [] };
|
|
20498
|
-
const members = (await store.knowledge.relations(null, project.ref)).filter((one2) => one2.
|
|
20557
|
+
const members = (await store.knowledge.relations(null, project.ref)).filter((one2) => isUsable(one2.standing) && one2.kind === "member-of" && one2.to === project.ref);
|
|
20499
20558
|
return {
|
|
20500
20559
|
chats: [...new Set(members.map((one2) => one2.from).filter((ref) => ref.startsWith("chat:")))].sort(),
|
|
20501
20560
|
people: [...new Set(members.map((one2) => one2.from).filter((ref) => ref.startsWith("person:")))].sort()
|
|
@@ -20551,56 +20610,28 @@ var scanProjectLinks = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20551
20610
|
nameOnly: 0,
|
|
20552
20611
|
unresolved: 0
|
|
20553
20612
|
};
|
|
20554
|
-
const
|
|
20555
|
-
const
|
|
20556
|
-
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
skipped.unresolved++;
|
|
20571
|
-
continue;
|
|
20572
|
-
}
|
|
20573
|
-
const weight = Math.min(1, Math.max(0, candidate.weight));
|
|
20574
|
-
const held = pairs.get(key) ?? { candidate, signals: /* @__PURE__ */ new Map() };
|
|
20575
|
-
const scorerId = `${scorer.id}@${scorer.version}`;
|
|
20576
|
-
const before2 = held.signals.get(scorerId);
|
|
20577
|
-
if (!before2 || before2.weight < weight)
|
|
20578
|
-
held.signals.set(scorerId, {
|
|
20579
|
-
scorer: scorerId,
|
|
20580
|
-
weight,
|
|
20581
|
-
why: candidate.why.slice(0, 500),
|
|
20582
|
-
...candidate.purpose && scorerInput.purposes.includes(candidate.purpose) ? { purpose: candidate.purpose } : {}
|
|
20583
|
-
});
|
|
20584
|
-
held.candidate = {
|
|
20585
|
-
...held.candidate,
|
|
20586
|
-
evidence: [.../* @__PURE__ */ new Set([...held.candidate.evidence, ...candidate.evidence])]
|
|
20587
|
-
};
|
|
20588
|
-
pairs.set(key, held);
|
|
20589
|
-
}
|
|
20613
|
+
const fixed = /* @__PURE__ */ new Map();
|
|
20614
|
+
const candidatesOf = /* @__PURE__ */ __name(async (scorer, seeds2) => {
|
|
20615
|
+
if (scorer.spreads)
|
|
20616
|
+
return scorer.candidates({ ...scorerInput, confirmed: seeds2 });
|
|
20617
|
+
const held = fixed.get(scorer) ?? await scorer.candidates(scorerInput);
|
|
20618
|
+
fixed.set(scorer, held);
|
|
20619
|
+
return held;
|
|
20620
|
+
}, "candidatesOf");
|
|
20621
|
+
let seeds = scorerInput.confirmed;
|
|
20622
|
+
let collected = await collect(store, scorerInput, scorers, (scorer) => candidatesOf(scorer, seeds));
|
|
20623
|
+
for (let hop = 0; hop < MAX_HOPS && scorers.some((one2) => one2.spreads); hop++) {
|
|
20624
|
+
const grown = await seedsOf(store, seeds, collected.scored, threshold);
|
|
20625
|
+
if (!grown)
|
|
20626
|
+
break;
|
|
20627
|
+
seeds = grown;
|
|
20628
|
+
collected = await collect(store, scorerInput, scorers, (scorer) => candidatesOf(scorer, seeds));
|
|
20590
20629
|
}
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
const purpose = list2.find((one2) => one2.purpose)?.purpose;
|
|
20594
|
-
return {
|
|
20595
|
-
candidate,
|
|
20596
|
-
purpose,
|
|
20597
|
-
signals: list2.map(({ scorer, weight, why }) => ({ scorer, weight, why })),
|
|
20598
|
-
score: combinedScore(list2.map((one2) => one2.weight))
|
|
20599
|
-
};
|
|
20600
|
-
}).sort((a, b) => b.score - a.score || a.candidate.from.localeCompare(b.candidate.from));
|
|
20630
|
+
skipped.nameOnly = collected.nameOnly;
|
|
20631
|
+
skipped.unresolved = collected.unresolved;
|
|
20601
20632
|
const proposals = [];
|
|
20602
20633
|
let fresh = 0;
|
|
20603
|
-
for (const { candidate, purpose, signals: signals2, score } of scored) {
|
|
20634
|
+
for (const { candidate, purpose, signals: signals2, score } of collected.scored) {
|
|
20604
20635
|
const state = await store.knowledge.relationState(null, candidate);
|
|
20605
20636
|
if (!state) {
|
|
20606
20637
|
skipped.unresolved++;
|
|
@@ -20657,6 +20688,73 @@ var scanProjectLinks = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20657
20688
|
}
|
|
20658
20689
|
return { project: project?.ref ?? null, proposals, skipped };
|
|
20659
20690
|
}, "scanProjectLinks");
|
|
20691
|
+
var collect = /* @__PURE__ */ __name(async (store, input, scorers, candidatesOf) => {
|
|
20692
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
20693
|
+
const nameOnly = /* @__PURE__ */ new Set();
|
|
20694
|
+
let unresolved = 0;
|
|
20695
|
+
for (const scorer of scorers) {
|
|
20696
|
+
input.signal?.throwIfAborted();
|
|
20697
|
+
for (const candidate of await candidatesOf(scorer)) {
|
|
20698
|
+
const key = pairKey(candidate);
|
|
20699
|
+
const verdict = await admissible(store, input, candidate);
|
|
20700
|
+
if (verdict === "owner")
|
|
20701
|
+
continue;
|
|
20702
|
+
if (verdict === "name-only") {
|
|
20703
|
+
nameOnly.add(key);
|
|
20704
|
+
continue;
|
|
20705
|
+
}
|
|
20706
|
+
if (verdict !== "ok") {
|
|
20707
|
+
unresolved++;
|
|
20708
|
+
continue;
|
|
20709
|
+
}
|
|
20710
|
+
const weight = Math.min(1, Math.max(0, candidate.weight));
|
|
20711
|
+
const held = pairs.get(key) ?? { candidate, signals: /* @__PURE__ */ new Map() };
|
|
20712
|
+
const scorerId = `${scorer.id}@${scorer.version}`;
|
|
20713
|
+
const before2 = held.signals.get(scorerId);
|
|
20714
|
+
if (!before2 || before2.weight < weight)
|
|
20715
|
+
held.signals.set(scorerId, {
|
|
20716
|
+
scorer: scorerId,
|
|
20717
|
+
weight,
|
|
20718
|
+
why: candidate.why.slice(0, 500),
|
|
20719
|
+
...candidate.purpose && input.purposes.includes(candidate.purpose) ? { purpose: candidate.purpose } : {}
|
|
20720
|
+
});
|
|
20721
|
+
held.candidate = {
|
|
20722
|
+
...held.candidate,
|
|
20723
|
+
evidence: [.../* @__PURE__ */ new Set([...held.candidate.evidence, ...candidate.evidence])]
|
|
20724
|
+
};
|
|
20725
|
+
pairs.set(key, held);
|
|
20726
|
+
}
|
|
20727
|
+
}
|
|
20728
|
+
const scored = [...pairs.values()].map(({ candidate, signals: signals2 }) => {
|
|
20729
|
+
const list2 = [...signals2.values()].sort((a, b) => b.weight - a.weight || a.scorer.localeCompare(b.scorer));
|
|
20730
|
+
const purpose = list2.find((one2) => one2.purpose)?.purpose;
|
|
20731
|
+
return {
|
|
20732
|
+
candidate,
|
|
20733
|
+
purpose,
|
|
20734
|
+
signals: list2.map(({ scorer, weight, why }) => ({ scorer, weight, why })),
|
|
20735
|
+
score: combinedScore(list2.map((one2) => one2.weight))
|
|
20736
|
+
};
|
|
20737
|
+
}).sort((a, b) => b.score - a.score || a.candidate.from.localeCompare(b.candidate.from));
|
|
20738
|
+
return { scored, nameOnly: nameOnly.size, unresolved };
|
|
20739
|
+
}, "collect");
|
|
20740
|
+
var seedsOf = /* @__PURE__ */ __name(async (store, seeds, scored, threshold) => {
|
|
20741
|
+
const chats = new Set(seeds.chats);
|
|
20742
|
+
const people = new Set(seeds.people);
|
|
20743
|
+
const size4 = chats.size + people.size;
|
|
20744
|
+
for (const { candidate, score } of scored) {
|
|
20745
|
+
if (score < threshold || candidate.kind !== "member-of")
|
|
20746
|
+
continue;
|
|
20747
|
+
if (chats.has(candidate.from) || people.has(candidate.from))
|
|
20748
|
+
continue;
|
|
20749
|
+
if ((await store.knowledge.relationState(null, candidate))?.rejected !== false)
|
|
20750
|
+
continue;
|
|
20751
|
+
if (candidate.from.startsWith("chat:"))
|
|
20752
|
+
chats.add(candidate.from);
|
|
20753
|
+
else if (candidate.from.startsWith("person:"))
|
|
20754
|
+
people.add(candidate.from);
|
|
20755
|
+
}
|
|
20756
|
+
return chats.size + people.size === size4 ? void 0 : { chats: [...chats].sort(), people: [...people].sort() };
|
|
20757
|
+
}, "seedsOf");
|
|
20660
20758
|
var admissible = /* @__PURE__ */ __name(async (store, input, candidate) => {
|
|
20661
20759
|
if (candidate.from === candidate.to || !Number.isFinite(candidate.weight))
|
|
20662
20760
|
return "unresolved";
|
|
@@ -20686,18 +20784,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
20686
20784
|
}, "referenceOf");
|
|
20687
20785
|
var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
|
|
20688
20786
|
|
|
20689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
20690
20788
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
20691
20789
|
|
|
20692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
20693
20791
|
import { lstat } from "node:fs/promises";
|
|
20694
20792
|
|
|
20695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20696
20794
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
20697
20795
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
20698
20796
|
import { join as join2 } from "node:path";
|
|
20699
20797
|
|
|
20700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
20701
20799
|
import { createHash as createHash2 } from "node:crypto";
|
|
20702
20800
|
var metadataLimit = 16384;
|
|
20703
20801
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -20757,7 +20855,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
20757
20855
|
}
|
|
20758
20856
|
}, "readPartialMetadata");
|
|
20759
20857
|
|
|
20760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
20761
20859
|
import { randomUUID } from "node:crypto";
|
|
20762
20860
|
import { open, rename, unlink } from "node:fs/promises";
|
|
20763
20861
|
import { join } from "node:path";
|
|
@@ -20849,7 +20947,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
20849
20947
|
};
|
|
20850
20948
|
}, "partialWriter");
|
|
20851
20949
|
|
|
20852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20853
20951
|
var NativeRecordingPartialStore = class {
|
|
20854
20952
|
static {
|
|
20855
20953
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -20956,12 +21054,12 @@ var NativeRecordingPartialStore = class {
|
|
|
20956
21054
|
}
|
|
20957
21055
|
};
|
|
20958
21056
|
|
|
20959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
20960
21058
|
import { createHash as createHash4 } from "node:crypto";
|
|
20961
21059
|
import { link } from "node:fs/promises";
|
|
20962
21060
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
20963
21061
|
|
|
20964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
20965
21063
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
20966
21064
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
20967
21065
|
signal?.throwIfAborted();
|
|
@@ -20996,7 +21094,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
20996
21094
|
signal?.throwIfAborted();
|
|
20997
21095
|
}, "commitPublication");
|
|
20998
21096
|
|
|
20999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21000
21098
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21001
21099
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21002
21100
|
import { join as join3 } from "node:path";
|
|
@@ -21069,7 +21167,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21069
21167
|
}
|
|
21070
21168
|
}, "writePublicationJournal");
|
|
21071
21169
|
|
|
21072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21073
21171
|
var NativeRecordingPublication = class {
|
|
21074
21172
|
static {
|
|
21075
21173
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21142,7 +21240,7 @@ var NativeRecordingPublication = class {
|
|
|
21142
21240
|
}
|
|
21143
21241
|
};
|
|
21144
21242
|
|
|
21145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21146
21244
|
import { createHash as createHash5 } from "node:crypto";
|
|
21147
21245
|
import { readdir } from "node:fs/promises";
|
|
21148
21246
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -21229,7 +21327,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
21229
21327
|
beforePublish
|
|
21230
21328
|
}), "commitMediaEntry");
|
|
21231
21329
|
|
|
21232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21233
21331
|
var validator = '"media-completed-v1"';
|
|
21234
21332
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21235
21333
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21330,7 +21428,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
21330
21428
|
return entry;
|
|
21331
21429
|
}, "archiveMediaFile");
|
|
21332
21430
|
|
|
21333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21334
21432
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21335
21433
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
21336
21434
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -21397,7 +21495,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21397
21495
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21398
21496
|
}, "withMediaArchiveLocks");
|
|
21399
21497
|
|
|
21400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21401
21499
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
21402
21500
|
if (value === void 0)
|
|
21403
21501
|
return void 0;
|
|
@@ -21550,7 +21648,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
21550
21648
|
}, { create: true });
|
|
21551
21649
|
}, "archiveMedia");
|
|
21552
21650
|
|
|
21553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
21554
21652
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
21555
21653
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
21556
21654
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -21703,7 +21801,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
21703
21801
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
21704
21802
|
}, "moveMediaArchive");
|
|
21705
21803
|
|
|
21706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
21707
21805
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
21708
21806
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
21709
21807
|
}, "progress") }) => {
|
|
@@ -21714,7 +21812,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
21714
21812
|
}
|
|
21715
21813
|
}, "nativeRuntime");
|
|
21716
21814
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21717
|
-
}, "progress"), acceptTerms = false }) => {
|
|
21815
|
+
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
21718
21816
|
const model = textModel(id2);
|
|
21719
21817
|
if (model.terms && !acceptTerms) {
|
|
21720
21818
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
@@ -21722,11 +21820,11 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21722
21820
|
const directory2 = textModelsDirectory(env);
|
|
21723
21821
|
if (!isTextModelInstalled(model, directory2)) {
|
|
21724
21822
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21725
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
21823
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21726
21824
|
}
|
|
21727
21825
|
await nativeRuntime({ env, progress });
|
|
21728
21826
|
progress(`${model.id}: loading it once to check it works`);
|
|
21729
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
21827
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-4IULBCKL.js");
|
|
21730
21828
|
const embedder = await openEmbedder2(model, directory2);
|
|
21731
21829
|
try {
|
|
21732
21830
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -21738,16 +21836,16 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21738
21836
|
return { model, directory: directory2 };
|
|
21739
21837
|
}, "downloadTextModel");
|
|
21740
21838
|
var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21741
|
-
}, "progress") }) => {
|
|
21839
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
21742
21840
|
const model = rerankModel(id2);
|
|
21743
21841
|
const directory2 = textModelsDirectory(env);
|
|
21744
21842
|
if (!isTextModelInstalled(model, directory2)) {
|
|
21745
21843
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21746
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
21844
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21747
21845
|
}
|
|
21748
21846
|
await nativeRuntime({ env, progress });
|
|
21749
21847
|
progress(`${model.id}: loading it once to check it works`);
|
|
21750
|
-
const { openReranker } = await import("./rerank-
|
|
21848
|
+
const { openReranker } = await import("./rerank-XDA7NJNH.js");
|
|
21751
21849
|
const reranker = await openReranker(model, directory2);
|
|
21752
21850
|
try {
|
|
21753
21851
|
await reranker.score("check", ["check"]);
|
|
@@ -21757,15 +21855,15 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
21757
21855
|
return { model, directory: directory2 };
|
|
21758
21856
|
}, "downloadRerankModel");
|
|
21759
21857
|
var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21760
|
-
}, "progress") }) => {
|
|
21858
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
21761
21859
|
const model = imageModel(id2);
|
|
21762
21860
|
const directory2 = imageModelsDirectory(env);
|
|
21763
21861
|
if (!isImageModelInstalled(model, directory2)) {
|
|
21764
21862
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21765
|
-
await installFiles(placedImage(model, directory2), { progress });
|
|
21863
|
+
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21766
21864
|
}
|
|
21767
21865
|
progress(`${model.id}: loading it once to check it works`);
|
|
21768
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
21866
|
+
const { openPictureEmbedder } = await import("./embedder-JW4W6IZI.js");
|
|
21769
21867
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
21770
21868
|
try {
|
|
21771
21869
|
const vector = await embedder.embedQuery("check");
|
|
@@ -21777,7 +21875,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21777
21875
|
return { model, directory: directory2 };
|
|
21778
21876
|
}, "downloadImageModel");
|
|
21779
21877
|
|
|
21780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
21781
21879
|
var MONEY_REQUEST = "money-request";
|
|
21782
21880
|
var MONEY_DONE = "money-done";
|
|
21783
21881
|
var PROMISE = "promise";
|
|
@@ -21811,10 +21909,10 @@ var MONEY_WORDS = [
|
|
|
21811
21909
|
}
|
|
21812
21910
|
];
|
|
21813
21911
|
|
|
21814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
21815
21913
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
21816
21914
|
|
|
21817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
21818
21916
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
21819
21917
|
var MONEY_DONE_FORMS = words([
|
|
21820
21918
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -21854,7 +21952,7 @@ var PROMISE_FORMS = words([
|
|
|
21854
21952
|
"estar\xE1 listo"
|
|
21855
21953
|
]);
|
|
21856
21954
|
|
|
21857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
21858
21956
|
var EXCERPT_CHARS = 80;
|
|
21859
21957
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
21860
21958
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -21876,7 +21974,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
21876
21974
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
21877
21975
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
21878
21976
|
|
|
21879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
21880
21978
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
21881
21979
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
21882
21980
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -21916,10 +22014,10 @@ var rowsOf = /* @__PURE__ */ __name((chat) => chat.messages.flatMap((message) =>
|
|
|
21916
22014
|
var centsText = /* @__PURE__ */ __name((cents) => `${Math.floor(cents / 100)}.${String(cents % 100).padStart(2, "0")}`, "centsText");
|
|
21917
22015
|
var amounts = {
|
|
21918
22016
|
id: "amounts",
|
|
21919
|
-
version:
|
|
22017
|
+
version: 3,
|
|
21920
22018
|
scope: "chat",
|
|
21921
|
-
read: /* @__PURE__ */ __name(async (
|
|
21922
|
-
if (!chat)
|
|
22019
|
+
read: /* @__PURE__ */ __name(async (context2, chat) => {
|
|
22020
|
+
if (!chat || context2.books)
|
|
21923
22021
|
return [];
|
|
21924
22022
|
const groups = /* @__PURE__ */ new Map();
|
|
21925
22023
|
for (const row of rowsOf(chat)) {
|
|
@@ -21932,7 +22030,8 @@ var amounts = {
|
|
|
21932
22030
|
const lastAsk = asks.at(-1);
|
|
21933
22031
|
const first2 = asks[0] ?? done2[0] ?? rows[0];
|
|
21934
22032
|
const paidAfter = done2.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
|
|
21935
|
-
const
|
|
22033
|
+
const paid2 = asks.length ? paidAfter : done2.length > 0;
|
|
22034
|
+
const state = paid2 ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
|
|
21936
22035
|
const cited2 = asks.length ? [...asks, ...paidAfter ? done2.slice(-1) : []] : rows;
|
|
21937
22036
|
return {
|
|
21938
22037
|
signal: "amounts",
|
|
@@ -21953,10 +22052,10 @@ var amounts = {
|
|
|
21953
22052
|
};
|
|
21954
22053
|
});
|
|
21955
22054
|
}, "read"),
|
|
21956
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "
|
|
22055
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
21957
22056
|
};
|
|
21958
22057
|
|
|
21959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
21960
22059
|
var children = {
|
|
21961
22060
|
id: "children",
|
|
21962
22061
|
version: 1,
|
|
@@ -21985,7 +22084,7 @@ var children = {
|
|
|
21985
22084
|
}, "read")
|
|
21986
22085
|
};
|
|
21987
22086
|
|
|
21988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
21989
22088
|
var coverage = {
|
|
21990
22089
|
id: "coverage",
|
|
21991
22090
|
version: 1,
|
|
@@ -22014,29 +22113,7 @@ var coverage = {
|
|
|
22014
22113
|
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")
|
|
22015
22114
|
};
|
|
22016
22115
|
|
|
22017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22018
|
-
var lastMessage = {
|
|
22019
|
-
id: "last-message",
|
|
22020
|
-
version: 1,
|
|
22021
|
-
scope: "chat",
|
|
22022
|
-
read: /* @__PURE__ */ __name(async (_context, chat) => {
|
|
22023
|
-
const last = chat?.messages.at(-1);
|
|
22024
|
-
if (!chat || !last)
|
|
22025
|
-
return [];
|
|
22026
|
-
const item2 = {
|
|
22027
|
-
signal: "last-message",
|
|
22028
|
-
chat: chat.ref,
|
|
22029
|
-
at: last.timestamp,
|
|
22030
|
-
who: whoOf(last),
|
|
22031
|
-
evidence: evidenceOf(chat, last),
|
|
22032
|
-
basis: "store",
|
|
22033
|
-
data: {}
|
|
22034
|
-
};
|
|
22035
|
-
return [item2];
|
|
22036
|
-
}, "read")
|
|
22037
|
-
};
|
|
22038
|
-
|
|
22039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
22116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
22040
22117
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
22041
22118
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
22042
22119
|
signal: "payments",
|
|
@@ -22086,7 +22163,7 @@ var payments = {
|
|
|
22086
22163
|
}, "read")
|
|
22087
22164
|
};
|
|
22088
22165
|
|
|
22089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
22090
22167
|
var PATTERNS_PER_CHAT = 3;
|
|
22091
22168
|
var DAY3 = 864e5;
|
|
22092
22169
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -22175,7 +22252,7 @@ var promises = {
|
|
|
22175
22252
|
}, "read")
|
|
22176
22253
|
};
|
|
22177
22254
|
|
|
22178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
22179
22256
|
var PER_SIDE = 5;
|
|
22180
22257
|
var WEEK = 7 * 864e5;
|
|
22181
22258
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -22206,7 +22283,7 @@ var questions2 = {
|
|
|
22206
22283
|
}, "attention")
|
|
22207
22284
|
};
|
|
22208
22285
|
|
|
22209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
22210
22287
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
22211
22288
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
22212
22289
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -22274,14 +22351,14 @@ var replyNext = {
|
|
|
22274
22351
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
22275
22352
|
};
|
|
22276
22353
|
|
|
22277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
22278
22355
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
22279
22356
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
22280
22357
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
22281
|
-
const
|
|
22358
|
+
const words4 = normalize(query).split(" ").filter(Boolean).map(wholeWord);
|
|
22282
22359
|
return (text2) => {
|
|
22283
22360
|
const folded2 = normalize(text2);
|
|
22284
|
-
return
|
|
22361
|
+
return words4.length > 0 && words4.every((word) => word.test(folded2));
|
|
22285
22362
|
};
|
|
22286
22363
|
}, "matcherOf");
|
|
22287
22364
|
var topics = {
|
|
@@ -22320,9 +22397,8 @@ var topics = {
|
|
|
22320
22397
|
}, "read")
|
|
22321
22398
|
};
|
|
22322
22399
|
|
|
22323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
22324
22401
|
var STATUS_SIGNALS = [
|
|
22325
|
-
lastMessage,
|
|
22326
22402
|
replyNext,
|
|
22327
22403
|
questions2,
|
|
22328
22404
|
promises,
|
|
@@ -22333,7 +22409,7 @@ var STATUS_SIGNALS = [
|
|
|
22333
22409
|
children
|
|
22334
22410
|
];
|
|
22335
22411
|
|
|
22336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
22337
22413
|
var DAY4 = 864e5;
|
|
22338
22414
|
var STATUS_WINDOW = 300;
|
|
22339
22415
|
var STATUS_CHATS = 16;
|
|
@@ -22349,7 +22425,7 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
22349
22425
|
const below = [];
|
|
22350
22426
|
for (const parent of level)
|
|
22351
22427
|
for (const relation of await store.knowledge.relations(null, parent)) {
|
|
22352
|
-
if (!relation.
|
|
22428
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== parent)
|
|
22353
22429
|
continue;
|
|
22354
22430
|
if (!relation.from.startsWith("project:"))
|
|
22355
22431
|
continue;
|
|
@@ -22378,17 +22454,23 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
22378
22454
|
}, "childrenOf");
|
|
22379
22455
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account2) => accounts === void 0 || accounts.some((one2) => one2.provider === provider && one2.account === account2), "inAccounts");
|
|
22380
22456
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
22381
|
-
var
|
|
22382
|
-
const
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22457
|
+
var owed = /* @__PURE__ */ __name((item2) => {
|
|
22458
|
+
const data = item2.data;
|
|
22459
|
+
return item2.signal === "payments" && data.state === "expected" && data.status === "confirmed";
|
|
22460
|
+
}, "owed");
|
|
22461
|
+
var keepsBooks = /* @__PURE__ */ __name(async (store, projects) => {
|
|
22462
|
+
for (const project of projects) {
|
|
22463
|
+
const filter = { project, review: "confirmed", limit: 1 };
|
|
22464
|
+
if ((await store.finance.invoices(filter)).length || (await store.finance.payments(filter)).length)
|
|
22465
|
+
return true;
|
|
22466
|
+
}
|
|
22467
|
+
return false;
|
|
22468
|
+
}, "keepsBooks");
|
|
22386
22469
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
22387
22470
|
const totals = /* @__PURE__ */ new Map();
|
|
22388
|
-
const open7 = counted2(items);
|
|
22389
22471
|
for (const item2 of items) {
|
|
22390
22472
|
const data = item2.data;
|
|
22391
|
-
if (!
|
|
22473
|
+
if (!owed(item2) || data.amount === void 0)
|
|
22392
22474
|
continue;
|
|
22393
22475
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
22394
22476
|
const total = totals.get(key) ?? {
|
|
@@ -22471,6 +22553,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22471
22553
|
chats,
|
|
22472
22554
|
project: { ...root, children: children2, cut },
|
|
22473
22555
|
store,
|
|
22556
|
+
books: await keepsBooks(store, [root.ref, ...children2.map((child) => child.ref)]),
|
|
22474
22557
|
contextQueries: input.contextQueries ?? []
|
|
22475
22558
|
};
|
|
22476
22559
|
const items = [];
|
|
@@ -22515,7 +22598,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22515
22598
|
};
|
|
22516
22599
|
}, "projectStatus");
|
|
22517
22600
|
|
|
22518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
22519
22602
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
22520
22603
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
22521
22604
|
if (deps.offline)
|
|
@@ -22587,7 +22670,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
22587
22670
|
};
|
|
22588
22671
|
}, "accountService");
|
|
22589
22672
|
|
|
22590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
22591
22674
|
var MINUTE = 6e4;
|
|
22592
22675
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
22593
22676
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -22606,7 +22689,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
22606
22689
|
return new Date(at - at % MINUTE).toISOString();
|
|
22607
22690
|
}, "sendTime");
|
|
22608
22691
|
|
|
22609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
22610
22693
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
22611
22694
|
try {
|
|
22612
22695
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -22752,21 +22835,21 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
22752
22835
|
const answerAll = capability(connection, "answerAllJoinRequests", "answer every join request at once");
|
|
22753
22836
|
const { id: chatId } = await connection.resolve(chat);
|
|
22754
22837
|
const page = await list2(chatId, { limit: 100, ...link4 === void 0 ? {} : { link: link4 } });
|
|
22755
|
-
const
|
|
22838
|
+
const counted2 = page.total ?? page.items.length;
|
|
22756
22839
|
if (page.total === void 0 && page.hasMore)
|
|
22757
22840
|
throw new CliError("validation_error", "too many requests to count; answer them by person, or by --link");
|
|
22758
|
-
if (
|
|
22759
|
-
return { chatId, accepted: accept, counted:
|
|
22841
|
+
if (counted2 === 0)
|
|
22842
|
+
return { chatId, accepted: accept, counted: counted2 };
|
|
22760
22843
|
const operationId = newOperationId();
|
|
22761
22844
|
await guardedWrite(deps.guard, {
|
|
22762
22845
|
operationId,
|
|
22763
22846
|
chatId,
|
|
22764
22847
|
kind: "chat",
|
|
22765
22848
|
action: accept ? "requests.accept" : "requests.decline",
|
|
22766
|
-
count:
|
|
22767
|
-
people:
|
|
22849
|
+
count: counted2,
|
|
22850
|
+
people: counted2
|
|
22768
22851
|
}, () => answerAll(chatId, accept, link4));
|
|
22769
|
-
return { operationId, chatId, accepted: accept, counted:
|
|
22852
|
+
return { operationId, chatId, accepted: accept, counted: counted2 };
|
|
22770
22853
|
}, "answerAllRequests"),
|
|
22771
22854
|
links: /* @__PURE__ */ __name(async (chat, window2) => {
|
|
22772
22855
|
if (deps.offline)
|
|
@@ -22853,7 +22936,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
22853
22936
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
22854
22937
|
}, "linkLimits");
|
|
22855
22938
|
|
|
22856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
22857
22940
|
var THREADS_PAGE = 500;
|
|
22858
22941
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
22859
22942
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -22932,7 +23015,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
22932
23015
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
22933
23016
|
}, "readMail");
|
|
22934
23017
|
|
|
22935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
22936
23019
|
var NO_MAIL = "no_mail";
|
|
22937
23020
|
var MAIL = "email";
|
|
22938
23021
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -22963,11 +23046,11 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
22963
23046
|
if (kind === "messages") {
|
|
22964
23047
|
if (explicit === MAIL)
|
|
22965
23048
|
throw new CliError("validation_error", "mail is searched with `memo search mail`, not search messages");
|
|
22966
|
-
return chosen.filter(({ provider }) =>
|
|
23049
|
+
return chosen.filter(({ provider }) => holdsKindOf(provider, "messages"));
|
|
22967
23050
|
}
|
|
22968
23051
|
if (explicit !== void 0 && explicit !== MAIL && explicit !== "all")
|
|
22969
23052
|
throw new CliError("validation_error", `search mail reads mail only \u2014 \`${command === void 0 ? "" : `${command} `}search messages\` searches ${explicit}`);
|
|
22970
|
-
const mail = (listed ? chosen : held).filter(({ provider }) =>
|
|
23053
|
+
const mail = (listed ? chosen : held).filter(({ provider }) => holdsKindOf(provider, "mail"));
|
|
22971
23054
|
if (mail.length === 0)
|
|
22972
23055
|
throw new CliError("not_found", "no mail in the store yet \u2014 `memo sync --only mail --since-time <time>` imports it", {
|
|
22973
23056
|
reason: NO_MAIL
|
|
@@ -22979,7 +23062,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
22979
23062
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
22980
23063
|
}, "accountsOfKind");
|
|
22981
23064
|
|
|
22982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
22983
23066
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
22984
23067
|
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");
|
|
22985
23068
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -23162,7 +23245,7 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
23162
23245
|
const completeness = [];
|
|
23163
23246
|
const stats = /* @__PURE__ */ new Map();
|
|
23164
23247
|
let inventoryComplete = scopeAccounts.length > 0;
|
|
23165
|
-
for (const selected of scopeAccounts) {
|
|
23248
|
+
for (const selected of scopeAccounts.filter(({ provider }) => !isImportedProvider(provider))) {
|
|
23166
23249
|
if (!await store.sync.syncState(selected, CHAT_LIST_KEY)) {
|
|
23167
23250
|
inventoryComplete = false;
|
|
23168
23251
|
}
|
|
@@ -23327,7 +23410,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
23327
23410
|
};
|
|
23328
23411
|
}, "statsLucene");
|
|
23329
23412
|
|
|
23330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
23331
23414
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
23332
23415
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
23333
23416
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -23367,7 +23450,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
23367
23450
|
};
|
|
23368
23451
|
}, "dateWindow");
|
|
23369
23452
|
|
|
23370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
23371
23454
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
23372
23455
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
23373
23456
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -23536,7 +23619,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23536
23619
|
};
|
|
23537
23620
|
}, "readRankingSelection");
|
|
23538
23621
|
|
|
23539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
23540
23623
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
|
|
23541
23624
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
23542
23625
|
command,
|
|
@@ -23546,7 +23629,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
23546
23629
|
fieldsVersion: FIELD_VERSION
|
|
23547
23630
|
}), "searchRecordOf");
|
|
23548
23631
|
|
|
23549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
23550
23633
|
function invalid2(message) {
|
|
23551
23634
|
throw new CliError("validation_error", message);
|
|
23552
23635
|
}
|
|
@@ -23840,10 +23923,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
23840
23923
|
}, "evidence")
|
|
23841
23924
|
}), "adminStatisticsService");
|
|
23842
23925
|
|
|
23843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
23844
23927
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
23845
23928
|
|
|
23846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
23847
23930
|
var REQUEST_MS = 400;
|
|
23848
23931
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
23849
23932
|
const lowest = ranges[0];
|
|
@@ -23866,13 +23949,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
23866
23949
|
};
|
|
23867
23950
|
}, "estimateBackfill");
|
|
23868
23951
|
|
|
23869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
23870
23953
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
23871
23954
|
...error,
|
|
23872
23955
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
23873
23956
|
}), "withRecovery");
|
|
23874
23957
|
|
|
23875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
23876
23959
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
23877
23960
|
if (isCliFailure(error))
|
|
23878
23961
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -23955,7 +24038,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
23955
24038
|
};
|
|
23956
24039
|
}, "mergeBatches");
|
|
23957
24040
|
|
|
23958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
23959
24042
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
23960
24043
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
23961
24044
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -23978,7 +24061,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
23978
24061
|
}
|
|
23979
24062
|
}, "patiently");
|
|
23980
24063
|
|
|
23981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
23982
24065
|
var RULES_VERSION = 5;
|
|
23983
24066
|
var LOOK_BACK = 50;
|
|
23984
24067
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -24068,7 +24151,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
24068
24151
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
24069
24152
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
24070
24153
|
|
|
24071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
24072
24155
|
var CONTEXT_MESSAGES = 3;
|
|
24073
24156
|
var CONTEXT_MINUTES = 10;
|
|
24074
24157
|
var MAX_CHARS = 1200;
|
|
@@ -24092,12 +24175,12 @@ var context = {
|
|
|
24092
24175
|
}, "describe")
|
|
24093
24176
|
};
|
|
24094
24177
|
|
|
24095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
24096
24179
|
var BUILT_INS = [context];
|
|
24097
24180
|
var providers = [...BUILT_INS];
|
|
24098
24181
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
24099
24182
|
|
|
24100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
24101
24184
|
var READ_PAGE = 5e3;
|
|
24102
24185
|
var CHAIN = 50;
|
|
24103
24186
|
var CONVERSATION_QUERY = {
|
|
@@ -24249,7 +24332,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
24249
24332
|
return size4;
|
|
24250
24333
|
}, "sized");
|
|
24251
24334
|
|
|
24252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
24253
24336
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
24254
24337
|
var MESSAGE_PAGE = 5e3;
|
|
24255
24338
|
var PER_SESSION = 8;
|
|
@@ -24268,7 +24351,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24268
24351
|
price: remote.price,
|
|
24269
24352
|
installed: true,
|
|
24270
24353
|
perBatch: PER_REQUEST * concurrency,
|
|
24271
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
24354
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-2CTCIQGF.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
24272
24355
|
};
|
|
24273
24356
|
}
|
|
24274
24357
|
const model = textModel(choice);
|
|
@@ -24285,7 +24368,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24285
24368
|
if (!isTextModelInstalled(model, directory2))
|
|
24286
24369
|
throw notDownloaded(model.id);
|
|
24287
24370
|
if (apart) {
|
|
24288
|
-
const { openProcess } = await import("./process-
|
|
24371
|
+
const { openProcess } = await import("./process-OBWUKBMX.js");
|
|
24289
24372
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
24290
24373
|
}
|
|
24291
24374
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -24574,7 +24657,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
24574
24657
|
return { ...one2, state };
|
|
24575
24658
|
}, "shaped");
|
|
24576
24659
|
|
|
24577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
24578
24661
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
24579
24662
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
24580
24663
|
for (const [key, value, maximum] of [
|
|
@@ -24627,7 +24710,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
24627
24710
|
}
|
|
24628
24711
|
}, "catchUpSearch");
|
|
24629
24712
|
|
|
24630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24631
24714
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
24632
24715
|
if (deps.reads === "store") {
|
|
24633
24716
|
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`);
|
|
@@ -24993,7 +25076,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
24993
25076
|
return message?.timestamp ?? fallback;
|
|
24994
25077
|
}, "timeOfKey");
|
|
24995
25078
|
|
|
24996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
24997
25080
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
24998
25081
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
24999
25082
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -25130,16 +25213,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
25130
25213
|
return { plan, repair };
|
|
25131
25214
|
}, "gapsService");
|
|
25132
25215
|
|
|
25133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
25134
25217
|
import { createHash as createHash8 } from "node:crypto";
|
|
25135
25218
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
25136
25219
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
25137
25220
|
|
|
25138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25139
25222
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
25140
25223
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
25141
25224
|
|
|
25142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
25143
25226
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
25144
25227
|
import { open as open4, stat } from "node:fs/promises";
|
|
25145
25228
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -25341,7 +25424,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
25341
25424
|
return { name, source };
|
|
25342
25425
|
}, "readStickerFile");
|
|
25343
25426
|
|
|
25344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25345
25428
|
var MAX_FILES = 1e4;
|
|
25346
25429
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
25347
25430
|
if (refusedPlace(directory2, app, env))
|
|
@@ -25410,15 +25493,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
25410
25493
|
return choices;
|
|
25411
25494
|
}, "directoryPaths");
|
|
25412
25495
|
|
|
25413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25414
25497
|
import { posix } from "node:path";
|
|
25415
25498
|
|
|
25416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25417
25500
|
import { setImmediate as tick } from "node:timers/promises";
|
|
25418
25501
|
import { crc32 } from "node:zlib";
|
|
25419
25502
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
25420
25503
|
|
|
25421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
25422
25505
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
25423
25506
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
25424
25507
|
var SAMPLE = 65536;
|
|
@@ -25520,7 +25603,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
25520
25603
|
return result.text;
|
|
25521
25604
|
}, "decodeXml");
|
|
25522
25605
|
|
|
25523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25524
25607
|
var MAX_PART = 10 * 1024 * 1024;
|
|
25525
25608
|
var MAX_ENTRIES = 1e3;
|
|
25526
25609
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -25735,7 +25818,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
25735
25818
|
return found;
|
|
25736
25819
|
}, "elements");
|
|
25737
25820
|
|
|
25738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
25739
25822
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
25740
25823
|
let name = "";
|
|
25741
25824
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -25790,7 +25873,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
25790
25873
|
return { text: parts.join("").trim(), truncated: false };
|
|
25791
25874
|
}, "sheetText");
|
|
25792
25875
|
|
|
25793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25794
25877
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
25795
25878
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
25796
25879
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26190,10 +26273,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26190
26273
|
}
|
|
26191
26274
|
}, "readDocument");
|
|
26192
26275
|
|
|
26193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26194
26277
|
import { extname as extname3 } from "node:path";
|
|
26195
26278
|
|
|
26196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26197
26280
|
import { readFileSync } from "node:fs";
|
|
26198
26281
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
26199
26282
|
import { fileURLToPath } from "node:url";
|
|
@@ -26254,7 +26337,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26254
26337
|
}
|
|
26255
26338
|
}, "derived");
|
|
26256
26339
|
|
|
26257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26258
26341
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26259
26342
|
var image2 = {
|
|
26260
26343
|
id: "image",
|
|
@@ -26263,7 +26346,7 @@ var image2 = {
|
|
|
26263
26346
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26264
26347
|
};
|
|
26265
26348
|
|
|
26266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26267
26350
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26268
26351
|
var doc = {
|
|
26269
26352
|
id: "doc",
|
|
@@ -26275,7 +26358,7 @@ var doc = {
|
|
|
26275
26358
|
}), "read")
|
|
26276
26359
|
};
|
|
26277
26360
|
|
|
26278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26279
26362
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26280
26363
|
var docx = {
|
|
26281
26364
|
id: "docx",
|
|
@@ -26288,7 +26371,7 @@ var docx = {
|
|
|
26288
26371
|
}), "read")
|
|
26289
26372
|
};
|
|
26290
26373
|
|
|
26291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26292
26375
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26293
26376
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26294
26377
|
"fonttbl",
|
|
@@ -26464,7 +26547,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
26464
26547
|
}, "htmlText");
|
|
26465
26548
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
26466
26549
|
|
|
26467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
26468
26551
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
26469
26552
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
26470
26553
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -26520,7 +26603,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
26520
26603
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
26521
26604
|
}, "markdownSections");
|
|
26522
26605
|
|
|
26523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
26524
26607
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
26525
26608
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
26526
26609
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -26591,7 +26674,7 @@ var html = {
|
|
|
26591
26674
|
}, "read")
|
|
26592
26675
|
};
|
|
26593
26676
|
|
|
26594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
26595
26678
|
var office = {
|
|
26596
26679
|
id: "office",
|
|
26597
26680
|
version: documentExtractor("odt"),
|
|
@@ -26602,7 +26685,7 @@ var office = {
|
|
|
26602
26685
|
}, "read")
|
|
26603
26686
|
};
|
|
26604
26687
|
|
|
26605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
26606
26689
|
var pdf = {
|
|
26607
26690
|
id: "pdf",
|
|
26608
26691
|
version: "unpdf",
|
|
@@ -26669,7 +26752,7 @@ var pdf = {
|
|
|
26669
26752
|
}), "read")
|
|
26670
26753
|
};
|
|
26671
26754
|
|
|
26672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
26673
26756
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
26674
26757
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
26675
26758
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -26689,7 +26772,7 @@ var plain = {
|
|
|
26689
26772
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
26690
26773
|
};
|
|
26691
26774
|
|
|
26692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
26693
26776
|
var rtf = {
|
|
26694
26777
|
id: "rtf",
|
|
26695
26778
|
version: "v1",
|
|
@@ -26697,10 +26780,10 @@ var rtf = {
|
|
|
26697
26780
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
26698
26781
|
};
|
|
26699
26782
|
|
|
26700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26701
26784
|
import { basename as basename5 } from "node:path";
|
|
26702
26785
|
|
|
26703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
26704
26787
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
26705
26788
|
const cells = [];
|
|
26706
26789
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -26738,7 +26821,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
26738
26821
|
return { cells, truncated };
|
|
26739
26822
|
}, "delimitedSpans");
|
|
26740
26823
|
|
|
26741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26742
26825
|
var DELIMITED = {
|
|
26743
26826
|
".csv": ",",
|
|
26744
26827
|
".tsv": " ",
|
|
@@ -26777,7 +26860,7 @@ var sheets = {
|
|
|
26777
26860
|
}, "read")
|
|
26778
26861
|
};
|
|
26779
26862
|
|
|
26780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
26781
26864
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
26782
26865
|
var HEAD_BYTES = 1024;
|
|
26783
26866
|
var readers = [...BUILT_INS2];
|
|
@@ -26787,7 +26870,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
26787
26870
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
26788
26871
|
}, "readWithRegistry");
|
|
26789
26872
|
|
|
26790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26791
26874
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
26792
26875
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
26793
26876
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -27866,7 +27949,7 @@ function imageSize(input) {
|
|
|
27866
27949
|
}
|
|
27867
27950
|
__name(imageSize, "imageSize");
|
|
27868
27951
|
|
|
27869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
27870
27953
|
var MAX_PAGES = 20;
|
|
27871
27954
|
var MAX_PIXELS = 2e7;
|
|
27872
27955
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28017,7 +28100,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28017
28100
|
}
|
|
28018
28101
|
}, "ocrPdf");
|
|
28019
28102
|
|
|
28020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28021
28104
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28022
28105
|
const limits = pdfPreviewLimits(env);
|
|
28023
28106
|
const cancelled5 = /* @__PURE__ */ __name(() => {
|
|
@@ -28094,7 +28177,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28094
28177
|
}
|
|
28095
28178
|
}, "pdfPreview");
|
|
28096
28179
|
|
|
28097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28098
28181
|
import { createHash as createHash7 } from "node:crypto";
|
|
28099
28182
|
import { constants } from "node:fs";
|
|
28100
28183
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28202,7 +28285,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28202
28285
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28203
28286
|
}, "transferMime");
|
|
28204
28287
|
|
|
28205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
28206
28289
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
28207
28290
|
import { link as link3, rm } from "node:fs/promises";
|
|
28208
28291
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -28316,7 +28399,7 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
28316
28399
|
}
|
|
28317
28400
|
}, "save");
|
|
28318
28401
|
|
|
28319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28320
28403
|
var ATTACHMENT_QUERY = {
|
|
28321
28404
|
entity: "attachment",
|
|
28322
28405
|
backend: "sql",
|
|
@@ -28405,7 +28488,7 @@ var keep = /* @__PURE__ */ __name(async (store, file, extraction, bytes2, sha) =
|
|
|
28405
28488
|
});
|
|
28406
28489
|
}
|
|
28407
28490
|
}, "keep");
|
|
28408
|
-
var
|
|
28491
|
+
var itemOf2 = /* @__PURE__ */ __name((account2, view) => ({
|
|
28409
28492
|
message: formatLocator({ ...account2, chat: view.chatId, message: view.messageId }),
|
|
28410
28493
|
kind: view.kind,
|
|
28411
28494
|
position: view.position + 1,
|
|
@@ -28617,7 +28700,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28617
28700
|
}
|
|
28618
28701
|
const where = query ? queryFilter(query, attachmentColumns(chats), { command: "attachments list" }) : void 0;
|
|
28619
28702
|
const views = await store.attachments.attachments({ ...where ? { where } : {}, offset, limit: limit + 1 });
|
|
28620
|
-
return { items: views.slice(0, limit).map((view) =>
|
|
28703
|
+
return { items: views.slice(0, limit).map((view) => itemOf2(account2, view)), has_more: views.length > limit };
|
|
28621
28704
|
}, "list"),
|
|
28622
28705
|
show: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, page, load, ...window2 }) => {
|
|
28623
28706
|
validateWindow(window2);
|
|
@@ -28739,7 +28822,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28739
28822
|
}, "setText")
|
|
28740
28823
|
}), "attachmentsService");
|
|
28741
28824
|
|
|
28742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
28743
28826
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
28744
28827
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
28745
28828
|
const store = await accountStore(deps);
|
|
@@ -28769,7 +28852,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28769
28852
|
}, "list")
|
|
28770
28853
|
}), "chatDocumentsService");
|
|
28771
28854
|
|
|
28772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
28773
28856
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
28774
28857
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
28775
28858
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -28856,7 +28939,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
28856
28939
|
}
|
|
28857
28940
|
}, "isRetentionSelection");
|
|
28858
28941
|
|
|
28859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
28860
28943
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
28861
28944
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
28862
28945
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -29063,7 +29146,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29063
29146
|
};
|
|
29064
29147
|
}, "countersService");
|
|
29065
29148
|
|
|
29066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29067
29150
|
var SYNC_KEY = "messages.sync-first";
|
|
29068
29151
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29069
29152
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29155,7 +29238,7 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
29155
29238
|
}
|
|
29156
29239
|
try {
|
|
29157
29240
|
const newest = (await store.messages.messages(account2, chatId, { limit: 1 })).items[0];
|
|
29158
|
-
let
|
|
29241
|
+
let counted2 = 0;
|
|
29159
29242
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
29160
29243
|
limit: options.maxMessages - result.messages,
|
|
29161
29244
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
@@ -29164,11 +29247,11 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
29164
29247
|
stop,
|
|
29165
29248
|
note,
|
|
29166
29249
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
29167
|
-
result.messages += fetched2 -
|
|
29168
|
-
|
|
29250
|
+
result.messages += fetched2 - counted2;
|
|
29251
|
+
counted2 = fetched2;
|
|
29169
29252
|
}, "onPage")
|
|
29170
29253
|
});
|
|
29171
|
-
result.messages += fetched.fetched -
|
|
29254
|
+
result.messages += fetched.fetched - counted2;
|
|
29172
29255
|
if (fetched.stopped || !fetched.complete && !fetched.reachedSince) {
|
|
29173
29256
|
result.complete = false;
|
|
29174
29257
|
result.failed.push({
|
|
@@ -29195,20 +29278,20 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29195
29278
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29196
29279
|
}), "withRefresh");
|
|
29197
29280
|
|
|
29198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29199
29282
|
var CANDIDATES = 50;
|
|
29200
29283
|
var WORD_HITS = 200;
|
|
29201
29284
|
var RRF_K = 60;
|
|
29202
29285
|
var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
29203
29286
|
const command = deps.messenger.app.command;
|
|
29204
29287
|
const byWords = /* @__PURE__ */ __name(async (query, prepared, conversations, since) => {
|
|
29205
|
-
const
|
|
29288
|
+
const words4 = [...new Set(query.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [])];
|
|
29206
29289
|
const outside = /* @__PURE__ */ new Map();
|
|
29207
|
-
if (!
|
|
29290
|
+
if (!words4.length || !prepared.scopeAccounts.length)
|
|
29208
29291
|
return { hits: [], outside, sources: /* @__PURE__ */ new Map() };
|
|
29209
29292
|
const store = await deps.store();
|
|
29210
29293
|
const lexical = await prepareLucene(store, await deps.account(), {
|
|
29211
|
-
text:
|
|
29294
|
+
text: words4.map((word) => word.length >= 3 ? `${word}*` : `"${word}"`).join(" OR "),
|
|
29212
29295
|
accounts: prepared.scopeAccounts,
|
|
29213
29296
|
limit: WORD_HITS
|
|
29214
29297
|
}, deps.messenger);
|
|
@@ -29314,9 +29397,9 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29314
29397
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
29315
29398
|
const selected = prepared.selectedChat;
|
|
29316
29399
|
const scopeOf4 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
29317
|
-
const
|
|
29400
|
+
const words4 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
29318
29401
|
const meaning = [];
|
|
29319
|
-
const sources =
|
|
29402
|
+
const sources = words4.sources;
|
|
29320
29403
|
if (target2.installed && prepared.scopeAccounts.length && eligibility?.conversations.length !== 0) {
|
|
29321
29404
|
await withEmbedder(deps, target2, choice, {}, async (embedder) => {
|
|
29322
29405
|
const [vector] = await embedder.embed([query], "query");
|
|
@@ -29360,7 +29443,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29360
29443
|
continue;
|
|
29361
29444
|
const eligibleChats = eligibility?.chats.filter(({ account: account3 }) => account3.provider === one2.provider && account3.account === one2.account).map(({ chat: chat2 }) => chat2);
|
|
29362
29445
|
const rows = eligibleChats === void 0 ? await store.vectors.readiness(one2, { ...scope, model: target2.key, searchableOnly: true }) : (await Promise.all(eligibleChats.map((chatId) => store.vectors.readiness(one2, { chatId, model: target2.key })))).flat();
|
|
29363
|
-
const readiness2 = searchReadiness(rows.map(shaped), target2.installed,
|
|
29446
|
+
const readiness2 = searchReadiness(rows.map(shaped), target2.installed, words4.outside.get(JSON.stringify(one2))?.chats ?? /* @__PURE__ */ new Set());
|
|
29364
29447
|
scoped.push({ source: one2, readiness: readiness2 });
|
|
29365
29448
|
const other = await store.vectors.embeddedOnlyElsewhere(one2, { ...scope, model: target2.key });
|
|
29366
29449
|
elsewhere.push(...other.filter((id2) => eligibleChats === void 0 || eligibleChats.includes(id2)).map((id2) => prepared.scopeAccounts.length > 1 ? [one2.provider, one2.account, id2].map(encodeURIComponent).join("/") : id2));
|
|
@@ -29376,7 +29459,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29376
29459
|
accounts: prepared.scopeAccounts,
|
|
29377
29460
|
model: target2.id,
|
|
29378
29461
|
meaning: target2.installed ? "searched" : "unavailable",
|
|
29379
|
-
hits: fused(meaning,
|
|
29462
|
+
hits: fused(meaning, words4.hits, meaningFloor(target2.key)).slice(0, limit).map((hit) => {
|
|
29380
29463
|
const source2 = sources.get(hit.summary.id);
|
|
29381
29464
|
return {
|
|
29382
29465
|
...hit,
|
|
@@ -29422,7 +29505,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29422
29505
|
}, "related")
|
|
29423
29506
|
};
|
|
29424
29507
|
}, "embeddingsSearch");
|
|
29425
|
-
var fused = /* @__PURE__ */ __name((meaning,
|
|
29508
|
+
var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
29426
29509
|
const merged = /* @__PURE__ */ new Map();
|
|
29427
29510
|
meaning.filter(({ score }) => score > minimumCosine).forEach(({ summary, chunk, score, stale, matchedIn }, index) => {
|
|
29428
29511
|
merged.set(matchedIn ? `${summary.id}#${chunk.firstMessageId}` : summary.id, {
|
|
@@ -29435,7 +29518,7 @@ var fused = /* @__PURE__ */ __name((meaning, words3, minimumCosine) => {
|
|
|
29435
29518
|
fused: 1 / (RRF_K + index + 1)
|
|
29436
29519
|
});
|
|
29437
29520
|
});
|
|
29438
|
-
|
|
29521
|
+
words4.forEach(({ summary, chunk }, index) => {
|
|
29439
29522
|
const share = 1 / (RRF_K + index + 1);
|
|
29440
29523
|
const held = merged.get(summary.id);
|
|
29441
29524
|
if (held) {
|
|
@@ -29470,13 +29553,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
29470
29553
|
return mean2.map((value) => value / length);
|
|
29471
29554
|
}, "meanOf");
|
|
29472
29555
|
|
|
29473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
29474
29557
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
29475
29558
|
...embeddingsMaintenance(deps),
|
|
29476
29559
|
...embeddingsSearch(deps)
|
|
29477
29560
|
}), "embeddingsService");
|
|
29478
29561
|
|
|
29479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
29480
29563
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
29481
29564
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
29482
29565
|
if (deps.offline)
|
|
@@ -29617,7 +29700,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29617
29700
|
};
|
|
29618
29701
|
}, "foldersService");
|
|
29619
29702
|
|
|
29620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
29621
29704
|
var INBOX_CHATS = 20;
|
|
29622
29705
|
var REVIEW_DAYS = 3;
|
|
29623
29706
|
var UNANSWERED_HOURS = 24;
|
|
@@ -29825,7 +29908,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
29825
29908
|
};
|
|
29826
29909
|
}, "inboxService");
|
|
29827
29910
|
|
|
29828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
29829
29912
|
var REVIEW_COUNT = 500;
|
|
29830
29913
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
29831
29914
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -29904,7 +29987,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29904
29987
|
};
|
|
29905
29988
|
}, "mentionsService");
|
|
29906
29989
|
|
|
29907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
29908
29991
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
29909
29992
|
position,
|
|
29910
29993
|
kind,
|
|
@@ -29953,7 +30036,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
29953
30036
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
29954
30037
|
}, "validatePermalink");
|
|
29955
30038
|
|
|
29956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
29957
30040
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
29958
30041
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
29959
30042
|
return `${seconds / 86400}d`;
|
|
@@ -29964,8 +30047,8 @@ var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
|
29964
30047
|
return `${seconds}s`;
|
|
29965
30048
|
}, "spokenSeconds");
|
|
29966
30049
|
var pinDurationsText = /* @__PURE__ */ __name((allowed) => {
|
|
29967
|
-
const
|
|
29968
|
-
return
|
|
30050
|
+
const words4 = allowed.map(spokenSeconds);
|
|
30051
|
+
return words4.length > 1 ? `${words4.slice(0, -1).join(", ")} or ${words4.at(-1)}` : words4[0] ?? "";
|
|
29969
30052
|
}, "pinDurationsText");
|
|
29970
30053
|
var pinLengthHelp = /* @__PURE__ */ __name((allowed, fallback) => `how long the pin lasts: ${pinDurationsText(allowed)}` + (fallback === void 0 ? "" : `; ${spokenSeconds(fallback)} by default`), "pinLengthHelp");
|
|
29971
30054
|
var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-time") => {
|
|
@@ -29985,7 +30068,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
29985
30068
|
return seconds;
|
|
29986
30069
|
}, "pinDurationOf");
|
|
29987
30070
|
|
|
29988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
29989
30072
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
29990
30073
|
if (sendAs === void 0) {
|
|
29991
30074
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30010,7 +30093,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30010
30093
|
return sendAs;
|
|
30011
30094
|
}, "typedSendAs");
|
|
30012
30095
|
|
|
30013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
30014
30097
|
var TOTAL_CAP = 1e4;
|
|
30015
30098
|
var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
30016
30099
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -30021,7 +30104,7 @@ var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
|
30021
30104
|
return { value: count3, relation: exact ? "eq" : "gte" };
|
|
30022
30105
|
}, "totalOf");
|
|
30023
30106
|
|
|
30024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
30025
30108
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
30026
30109
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
30027
30110
|
let narrows = false;
|
|
@@ -30050,7 +30133,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
30050
30133
|
return wanted(root).join(" ").trim();
|
|
30051
30134
|
}, "meaningWords");
|
|
30052
30135
|
|
|
30053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
30054
30137
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
30055
30138
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
30056
30139
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -30183,7 +30266,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
30183
30266
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
30184
30267
|
}, "questionLookup");
|
|
30185
30268
|
|
|
30186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30187
30270
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30188
30271
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30189
30272
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30376,7 +30459,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30376
30459
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
30377
30460
|
}, "signals");
|
|
30378
30461
|
|
|
30379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30380
30463
|
var MEANING_DEPTH = 100;
|
|
30381
30464
|
var RRF_K2 = 60;
|
|
30382
30465
|
var RERANK_DEPTH = 50;
|
|
@@ -30661,10 +30744,10 @@ var nearEligible = /* @__PURE__ */ __name(async (store, account2, request, messe
|
|
|
30661
30744
|
return hit ? [{ ...hit, cosine: m.score }] : [];
|
|
30662
30745
|
});
|
|
30663
30746
|
}, "nearEligible");
|
|
30664
|
-
var fusedWithMeaning = /* @__PURE__ */ __name((
|
|
30747
|
+
var fusedWithMeaning = /* @__PURE__ */ __name((words4, near2, described) => {
|
|
30665
30748
|
const merged = /* @__PURE__ */ new Map();
|
|
30666
30749
|
const by = /* @__PURE__ */ __name((hit, foundBy) => hit.discovery ? { ...hit, discovery: { ...hit.discovery, foundBy } } : hit, "by");
|
|
30667
|
-
|
|
30750
|
+
words4.forEach((hit, rank) => {
|
|
30668
30751
|
merged.set(hit.locator, { hit: by(hit, ["words"]), rrf: 1 / (RRF_K2 + rank + 1) });
|
|
30669
30752
|
});
|
|
30670
30753
|
near2.forEach(({ cosine: _, ...m }, rank) => {
|
|
@@ -30701,7 +30784,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
30701
30784
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
30702
30785
|
}, "mixedWithReranker");
|
|
30703
30786
|
|
|
30704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
30705
30788
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
30706
30789
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
30707
30790
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -30900,7 +30983,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
30900
30983
|
return result;
|
|
30901
30984
|
}, "readThreadContext");
|
|
30902
30985
|
|
|
30903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
30904
30987
|
var SEARCH_FILL_MS = 200;
|
|
30905
30988
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
30906
30989
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -30931,6 +31014,8 @@ var topUp = /* @__PURE__ */ __name(async (store) => {
|
|
|
30931
31014
|
}, "topUp");
|
|
30932
31015
|
var MAX_SEARCH_OFFSET = 1e3;
|
|
30933
31016
|
var searchStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, meaning, rerank) => {
|
|
31017
|
+
if (request.text !== void 0)
|
|
31018
|
+
request = { ...request, text: plainQuery(request.text) };
|
|
30934
31019
|
const offset = request.offset ?? 0;
|
|
30935
31020
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
30936
31021
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -30967,12 +31052,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
30967
31052
|
}, "accountOf");
|
|
30968
31053
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
30969
31054
|
|
|
30970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30971
31056
|
import { createHash as createHash9 } from "node:crypto";
|
|
30972
31057
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
30973
31058
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
30974
31059
|
|
|
30975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
30976
31061
|
var GROUP_SETTINGS = [
|
|
30977
31062
|
"allCanPin",
|
|
30978
31063
|
"onlyAdminsAdd",
|
|
@@ -30986,7 +31071,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
30986
31071
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
30987
31072
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
30988
31073
|
|
|
30989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30990
31075
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
30991
31076
|
var PICTURE_FLOOR = 0.25;
|
|
30992
31077
|
var PAGE4 = 50;
|
|
@@ -31003,7 +31088,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31003
31088
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31004
31089
|
if (!isImageModelInstalled(model2, directory2))
|
|
31005
31090
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31006
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31091
|
+
const { openPictureEmbedder } = await import("./embedder-JW4W6IZI.js");
|
|
31007
31092
|
return openPictureEmbedder(model2, directory2);
|
|
31008
31093
|
}, "open");
|
|
31009
31094
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31134,8 +31219,8 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31134
31219
|
lane: /* @__PURE__ */ __name(async (query, { chat, since, limit = 5 } = {}) => {
|
|
31135
31220
|
if (!deps.pictures)
|
|
31136
31221
|
return {};
|
|
31137
|
-
const
|
|
31138
|
-
if (
|
|
31222
|
+
const words4 = plainWords(query);
|
|
31223
|
+
if (words4 === "")
|
|
31139
31224
|
return {};
|
|
31140
31225
|
const store = await deps.store();
|
|
31141
31226
|
const account2 = await deps.account();
|
|
@@ -31143,7 +31228,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31143
31228
|
let vector;
|
|
31144
31229
|
try {
|
|
31145
31230
|
const use = await embedder();
|
|
31146
|
-
vector = await use.embedQuery(
|
|
31231
|
+
vector = await use.embedQuery(words4);
|
|
31147
31232
|
} catch (error) {
|
|
31148
31233
|
if (error instanceof CliError && error.code === "not_found")
|
|
31149
31234
|
return { picturesSkipped: error.message, picturesModel: model.id };
|
|
@@ -31200,7 +31285,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31200
31285
|
}, "search")
|
|
31201
31286
|
}), "withPictures");
|
|
31202
31287
|
|
|
31203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31204
31289
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
31205
31290
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
31206
31291
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31222,13 +31307,13 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31222
31307
|
}
|
|
31223
31308
|
if (ready.length === 0 && mail.size === 0)
|
|
31224
31309
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
31225
|
-
const
|
|
31310
|
+
const words4 = plainWords(question);
|
|
31226
31311
|
try {
|
|
31227
31312
|
const ranked = [];
|
|
31228
|
-
if (
|
|
31313
|
+
if (words4) {
|
|
31229
31314
|
const pks = await within?.();
|
|
31230
31315
|
const lookUp = /* @__PURE__ */ __name(async (embedder) => {
|
|
31231
|
-
const [query] = await embedder.embed([
|
|
31316
|
+
const [query] = await embedder.embed([words4], "query");
|
|
31232
31317
|
for (const one2 of ready) {
|
|
31233
31318
|
const near2 = pks ? await store.vectors.scoreMessages(one2, { model: target2.key, query, pks }) : await store.vectors.nearestMessages(one2, {
|
|
31234
31319
|
model: target2.key,
|
|
@@ -31268,7 +31353,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31268
31353
|
}
|
|
31269
31354
|
}, "meaningLane");
|
|
31270
31355
|
|
|
31271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31272
31357
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31273
31358
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31274
31359
|
if (choice === "off")
|
|
@@ -31280,9 +31365,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31280
31365
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31281
31366
|
try {
|
|
31282
31367
|
const warm = deps.embedders;
|
|
31283
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31368
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-OBWUKBMX.js")).openRerankerProcess(model, directory2, {
|
|
31284
31369
|
threads: defaultThreads()
|
|
31285
|
-
})) : await (await import("./rerank-
|
|
31370
|
+
})) : await (await import("./rerank-XDA7NJNH.js")).openReranker(model, directory2);
|
|
31286
31371
|
return {
|
|
31287
31372
|
model: model.id,
|
|
31288
31373
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31302,7 +31387,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31302
31387
|
};
|
|
31303
31388
|
}, "rerankLane");
|
|
31304
31389
|
|
|
31305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31306
31391
|
import { createHash as createHash10 } from "node:crypto";
|
|
31307
31392
|
var refOf = /* @__PURE__ */ __name((target2) => target2.ref ?? `document:${target2.documentId}`, "refOf");
|
|
31308
31393
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -31310,7 +31395,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
31310
31395
|
const directory2 = imageModelsDirectory(env);
|
|
31311
31396
|
if (!isImageModelInstalled(model, directory2))
|
|
31312
31397
|
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 });
|
|
31313
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31398
|
+
const { openPictureEmbedder } = await import("./embedder-JW4W6IZI.js");
|
|
31314
31399
|
return openPictureEmbedder(model, directory2);
|
|
31315
31400
|
}, "openPictureEmbedderFor");
|
|
31316
31401
|
var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options = {}) => {
|
|
@@ -31331,7 +31416,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options
|
|
|
31331
31416
|
}, "savePicture");
|
|
31332
31417
|
var removePicture = /* @__PURE__ */ __name((store, target2) => store.notes.removePicture(refOf(target2)), "removePicture");
|
|
31333
31418
|
|
|
31334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31335
31420
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
31336
31421
|
const metadata = note.frontMatter;
|
|
31337
31422
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31346,7 +31431,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
31346
31431
|
};
|
|
31347
31432
|
}, "documentSource");
|
|
31348
31433
|
|
|
31349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31350
31435
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31351
31436
|
let root;
|
|
31352
31437
|
try {
|
|
@@ -31361,19 +31446,19 @@ var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
|
31361
31446
|
return void 0;
|
|
31362
31447
|
values.push(leaf.value);
|
|
31363
31448
|
}
|
|
31364
|
-
const
|
|
31365
|
-
return
|
|
31449
|
+
const words4 = normalize(values.join(" "));
|
|
31450
|
+
return words4 === "" || /["\\]/u.test(words4) ? void 0 : words4;
|
|
31366
31451
|
}, "plainQueryWords");
|
|
31367
|
-
var titleQuery = /* @__PURE__ */ __name((
|
|
31368
|
-
var titleTiers = /* @__PURE__ */ __name((hits,
|
|
31452
|
+
var titleQuery = /* @__PURE__ */ __name((words4) => words4.split(" ").map((word) => `title:"${word}"`).join(" AND "), "titleQuery");
|
|
31453
|
+
var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
31369
31454
|
const rank = /* @__PURE__ */ __name(({ note }) => {
|
|
31370
31455
|
const title = normalize(note.title ?? "");
|
|
31371
|
-
return title ===
|
|
31456
|
+
return title === words4 ? 0 : title.includes(words4) ? 1 : 2;
|
|
31372
31457
|
}, "rank");
|
|
31373
31458
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31374
31459
|
}, "titleTiers");
|
|
31375
31460
|
|
|
31376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31377
31462
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
31378
31463
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
31379
31464
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -31496,14 +31581,14 @@ var MAX_NOTES_OFFSET = 1e3;
|
|
|
31496
31581
|
var CANDIDATES2 = 50;
|
|
31497
31582
|
var RRF_K3 = 60;
|
|
31498
31583
|
var firstLine = /* @__PURE__ */ __name((text2, query) => {
|
|
31499
|
-
const
|
|
31584
|
+
const words4 = query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word));
|
|
31500
31585
|
const lines = text2.split("\n");
|
|
31501
|
-
const found = lines.find((line2) =>
|
|
31586
|
+
const found = lines.find((line2) => words4.some((word) => line2.toLowerCase().includes(word)));
|
|
31502
31587
|
return (found ?? lines.find((line2) => line2.trim() !== "") ?? "").trim().slice(0, MAX_LINE);
|
|
31503
31588
|
}, "firstLine");
|
|
31504
31589
|
var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, source, limit, env, command, embedder }) => {
|
|
31505
|
-
const
|
|
31506
|
-
if (
|
|
31590
|
+
const words4 = plainWords(query);
|
|
31591
|
+
if (words4 === "" || source === "internal")
|
|
31507
31592
|
return {};
|
|
31508
31593
|
let vector;
|
|
31509
31594
|
try {
|
|
@@ -31512,7 +31597,7 @@ var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, sourc
|
|
|
31512
31597
|
...command === void 0 ? {} : { command }
|
|
31513
31598
|
});
|
|
31514
31599
|
try {
|
|
31515
|
-
vector = await use.embedQuery(
|
|
31600
|
+
vector = await use.embedQuery(words4);
|
|
31516
31601
|
} finally {
|
|
31517
31602
|
if (!embedder)
|
|
31518
31603
|
await use.close();
|
|
@@ -31593,13 +31678,13 @@ var filterRefs = /* @__PURE__ */ __name(async (store, narrowing, scope) => {
|
|
|
31593
31678
|
}
|
|
31594
31679
|
}, "filterRefs");
|
|
31595
31680
|
var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, shown, hasMore }, others, othersComplete) => {
|
|
31596
|
-
let
|
|
31681
|
+
let words4;
|
|
31597
31682
|
try {
|
|
31598
31683
|
const { root, stemmer } = await storeQuery(store, text2, {
|
|
31599
31684
|
exact,
|
|
31600
31685
|
...scope.timezone ? { timezone: scope.timezone } : {}
|
|
31601
31686
|
});
|
|
31602
|
-
|
|
31687
|
+
words4 = await store.notes.matchingRefs({
|
|
31603
31688
|
root,
|
|
31604
31689
|
limit: TOTAL_CAP,
|
|
31605
31690
|
...scope.folderIds ? { folderIds: scope.folderIds } : {},
|
|
@@ -31612,10 +31697,11 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
31612
31697
|
return totalOf(void 0, shown, hasMore);
|
|
31613
31698
|
throw error;
|
|
31614
31699
|
}
|
|
31615
|
-
const count3 = (/* @__PURE__ */ new Set([...
|
|
31700
|
+
const count3 = (/* @__PURE__ */ new Set([...words4.refs, ...others])).size + (words4.hasMore ? 1 : 0);
|
|
31616
31701
|
return totalOf(count3, shown, hasMore, othersComplete);
|
|
31617
31702
|
}, "notesTotal");
|
|
31618
31703
|
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
31704
|
+
query = plainQuery(query);
|
|
31619
31705
|
const typed = noteSourceOfQuery(query);
|
|
31620
31706
|
const source = given ?? typed.source;
|
|
31621
31707
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
@@ -31623,7 +31709,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31623
31709
|
const filter = [expression ? `(${expression})` : "", label === void 0 ? "" : `tag:${label}`].filter(Boolean).join(" AND ") || void 0;
|
|
31624
31710
|
const lookup = discover && !exact ? questionLookup(query) : void 0;
|
|
31625
31711
|
const parsed = query.trim() ? parsedQuery(lookup === void 0 ? query : questionText(query), exact) : void 0;
|
|
31626
|
-
const
|
|
31712
|
+
const words4 = parsed === void 0 ? "" : meaningWords(parsed);
|
|
31627
31713
|
const narrowing = allOf([
|
|
31628
31714
|
...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
|
|
31629
31715
|
...filter === void 0 ? [] : [parsedQuery(filter)]
|
|
@@ -31644,7 +31730,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31644
31730
|
let meaningComplete = true;
|
|
31645
31731
|
if (exact)
|
|
31646
31732
|
meaningSkipped = "--exact searches words as written";
|
|
31647
|
-
else if (
|
|
31733
|
+
else if (words4) {
|
|
31648
31734
|
const lane2 = {
|
|
31649
31735
|
command,
|
|
31650
31736
|
...env === void 0 ? {} : { env },
|
|
@@ -31658,10 +31744,10 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31658
31744
|
const within = narrowing === void 0 ? void 0 : await filterRefs(store, narrowing, scope);
|
|
31659
31745
|
let nearest;
|
|
31660
31746
|
if (within === void 0) {
|
|
31661
|
-
nearest = await nearestNotes(store,
|
|
31747
|
+
nearest = await nearestNotes(store, words4, { ...lane2, limit: depth });
|
|
31662
31748
|
meaningComplete = nearest.length < depth;
|
|
31663
31749
|
} else {
|
|
31664
|
-
const ranked2 = within.length ? await nearestAmong(store,
|
|
31750
|
+
const ranked2 = within.length ? await nearestAmong(store, words4, within, lane2) : [];
|
|
31665
31751
|
meaningRefs = new Set(ranked2.map(({ ref }) => ref));
|
|
31666
31752
|
nearest = ranked2.slice(0, depth);
|
|
31667
31753
|
}
|
|
@@ -31679,13 +31765,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31679
31765
|
meaningSkipped = error.message;
|
|
31680
31766
|
}
|
|
31681
31767
|
}
|
|
31682
|
-
const
|
|
31683
|
-
const titled =
|
|
31684
|
-
text: [titleQuery(
|
|
31768
|
+
const titleWords2 = plainQueryWords(rest);
|
|
31769
|
+
const titled = titleWords2 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
31770
|
+
text: [titleQuery(titleWords2), filter ?? ""].filter(Boolean).join(" AND "),
|
|
31685
31771
|
limit: Math.max(window2, CANDIDATES2),
|
|
31686
31772
|
...scope
|
|
31687
31773
|
});
|
|
31688
|
-
const tier =
|
|
31774
|
+
const tier = titleWords2 === void 0 ? [] : titleTiers(titled.items, titleWords2);
|
|
31689
31775
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
31690
31776
|
const slice = meaning === void 0 && tier.length === 0;
|
|
31691
31777
|
const matched = await searchNotesQuery(store, {
|
|
@@ -31702,9 +31788,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31702
31788
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
31703
31789
|
held.foundBy.push(by);
|
|
31704
31790
|
ranked.set(ref, held);
|
|
31791
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
31705
31792
|
if (by === "meaning" && lookup !== void 0 && held.foundBy.includes("words"))
|
|
31706
|
-
|
|
31707
|
-
|
|
31793
|
+
held.score = Math.max(held.score, vote);
|
|
31794
|
+
else
|
|
31795
|
+
held.score += vote;
|
|
31708
31796
|
}), "add");
|
|
31709
31797
|
add(matched.items, "words");
|
|
31710
31798
|
if (meaning !== void 0)
|
|
@@ -31735,7 +31823,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31735
31823
|
title: note.title,
|
|
31736
31824
|
...documentSource(note, accounts, profiles, note.source === "file" ? (await store.files.ofDocument(note.ref))[0] : void 0),
|
|
31737
31825
|
updated_at: at,
|
|
31738
|
-
excerpt: firstLine(note.text,
|
|
31826
|
+
excerpt: firstLine(note.text, words4),
|
|
31739
31827
|
links,
|
|
31740
31828
|
found_by: foundBy,
|
|
31741
31829
|
...cosines.has(ref) ? { meaning_score: cosines.get(ref) } : {}
|
|
@@ -31759,7 +31847,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31759
31847
|
if (record.ref?.startsWith("note:") || record.ref?.startsWith("document:"))
|
|
31760
31848
|
record.name = (await store.notes.note(record.ref).catch(() => void 0))?.title ?? record.name;
|
|
31761
31849
|
}
|
|
31762
|
-
const lane = withPictures2 ? await pictureLane(store,
|
|
31850
|
+
const lane = withPictures2 ? await pictureLane(store, words4, {
|
|
31763
31851
|
folderIds,
|
|
31764
31852
|
source,
|
|
31765
31853
|
limit: pictureLimit,
|
|
@@ -31792,12 +31880,14 @@ var notesScopeOf = /* @__PURE__ */ __name((accounts) => {
|
|
|
31792
31880
|
return { folderIds, ...accounts.length > folderIds.length ? { withInternal: true } : {} };
|
|
31793
31881
|
}, "notesScopeOf");
|
|
31794
31882
|
var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { accounts: list2, app, ...query }) => {
|
|
31883
|
+
text2 = plainQuery(text2);
|
|
31795
31884
|
const own = app?.command ?? query.command;
|
|
31796
31885
|
const what = `${own === void 0 ? "" : `${own} `}search notes`;
|
|
31797
31886
|
const held = [
|
|
31798
31887
|
{ provider: "notes", account: INTERNAL_NOTES },
|
|
31799
31888
|
...(await store.notes.folders()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
31800
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 }))
|
|
31889
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
31890
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [{ provider: "notes", account: added.id }] : [])
|
|
31801
31891
|
];
|
|
31802
31892
|
const named2 = list2 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list2, await listContextOf(store, account2, app)), ["notes", "documents"], what);
|
|
31803
31893
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
@@ -31817,14 +31907,14 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
31817
31907
|
};
|
|
31818
31908
|
}, "searchNotesOf");
|
|
31819
31909
|
|
|
31820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
31821
31911
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
31822
31912
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
31823
31913
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
31824
31914
|
const held = await store.accounts.storedAccounts();
|
|
31825
31915
|
return held.filter((one2) => accounts.some(({ provider, account: account2 }) => one2.provider === provider && one2.account === account2)).map(({ id: id2 }) => String(id2));
|
|
31826
31916
|
}, "accountIdsOf");
|
|
31827
|
-
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) =>
|
|
31917
|
+
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) => holdsKind(provider, "events")).map(({ provider, account: account2 }) => ({ provider, account: account2 })), "calendarAccounts");
|
|
31828
31918
|
var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
31829
31919
|
ref: hit.ref,
|
|
31830
31920
|
provider: hit.account?.provider ?? null,
|
|
@@ -31842,11 +31932,11 @@ var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
|
31842
31932
|
found_by: foundBy
|
|
31843
31933
|
}), "foundEvent");
|
|
31844
31934
|
var CANDIDATES3 = 50;
|
|
31845
|
-
var nearestEvents = /* @__PURE__ */ __name(async (store,
|
|
31935
|
+
var nearestEvents = /* @__PURE__ */ __name(async (store, words4, { limit, accountIds, env, command, embedders }) => {
|
|
31846
31936
|
const { model, directory: directory2, key } = localModel(void 0, env, command);
|
|
31847
31937
|
if (!await store.calendar.embedded(key, accountIds ? { accountIds } : {}))
|
|
31848
31938
|
throw new CliError("not_found", `no event has vectors of ${model.id} yet, so only words were matched`);
|
|
31849
|
-
const [vector] = await withLocal(model, directory2, void 0, (embedder) => embedder.embed([
|
|
31939
|
+
const [vector] = await withLocal(model, directory2, void 0, (embedder) => embedder.embed([words4], "query"), embedders);
|
|
31850
31940
|
const floor = meaningFloor(key);
|
|
31851
31941
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
31852
31942
|
}, "nearestEvents");
|
|
@@ -31854,6 +31944,7 @@ var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null
|
|
|
31854
31944
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
31855
31945
|
if (!query.trim())
|
|
31856
31946
|
throw new CliError("validation_error", "say what to find in the events");
|
|
31947
|
+
query = plainQuery(query);
|
|
31857
31948
|
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
31858
31949
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
31859
31950
|
...exact ? { exact: true } : {},
|
|
@@ -31862,7 +31953,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31862
31953
|
const accountIds = accounts === void 0 ? void 0 : await accountIdsOf(store, accounts);
|
|
31863
31954
|
if (accountIds?.length === 0)
|
|
31864
31955
|
return { query, by: "words", hits: [], has_more: false };
|
|
31865
|
-
const
|
|
31956
|
+
const words4 = plainQueryWords(asked === void 0 ? query : questionText(query));
|
|
31866
31957
|
const window2 = offset + limit;
|
|
31867
31958
|
let meaningSkipped;
|
|
31868
31959
|
let meaning;
|
|
@@ -31870,11 +31961,11 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31870
31961
|
meaningSkipped = "--exact searches words as written";
|
|
31871
31962
|
else if (newest)
|
|
31872
31963
|
meaningSkipped = "newest first orders by time";
|
|
31873
|
-
else if (
|
|
31964
|
+
else if (words4 === void 0)
|
|
31874
31965
|
meaningSkipped = "the query has fields or operators, which meaning cannot follow";
|
|
31875
31966
|
else
|
|
31876
31967
|
try {
|
|
31877
|
-
meaning = await nearestEvents(store,
|
|
31968
|
+
meaning = await nearestEvents(store, words4, {
|
|
31878
31969
|
limit: Math.max(window2, CANDIDATES3),
|
|
31879
31970
|
...accountIds ? { accountIds } : {},
|
|
31880
31971
|
...env === void 0 ? {} : { env },
|
|
@@ -31934,8 +32025,14 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31934
32025
|
};
|
|
31935
32026
|
}, "searchEvents");
|
|
31936
32027
|
|
|
31937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31938
|
-
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
32028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
32029
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
32030
|
+
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
32031
|
+
const { reason, span } = error.details ?? {};
|
|
32032
|
+
const why = typeof reason === "string" ? reason : void 0;
|
|
32033
|
+
const token = span && Number.isInteger(span.start) && Number.isInteger(span.end) ? text2.slice(span.start, span.end).trim() : "";
|
|
32034
|
+
return { ...why ? { why } : {}, ...token ? { token } : {} };
|
|
32035
|
+
}, "refusal");
|
|
31939
32036
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
31940
32037
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
31941
32038
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -31943,9 +32040,22 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
31943
32040
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
31944
32041
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
31945
32042
|
}, "filtersBeside");
|
|
31946
|
-
var
|
|
31947
|
-
|
|
32043
|
+
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
32044
|
+
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
32045
|
+
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
32046
|
+
const words4 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
32047
|
+
// A title holds "invoice", not the question mark of "invoice?".
|
|
32048
|
+
node.value.replace(/\?+$/u, "") || node.value
|
|
32049
|
+
) : (() => {
|
|
32050
|
+
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
32051
|
+
})());
|
|
32052
|
+
return { words: words4, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
32053
|
+
}, "titleWords");
|
|
32054
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm")), "crmAccounts");
|
|
32055
|
+
var searchAll = /* @__PURE__ */ __name(async (store, account2, asked, messenger = {}, searchMessages = (query) => searchStore(store, account2, query, messenger), meaning) => {
|
|
32056
|
+
if (!asked.text.trim())
|
|
31948
32057
|
throw new CliError("validation_error", "say what to find");
|
|
32058
|
+
const request = { ...asked, text: plainQuery(asked.text) };
|
|
31949
32059
|
const offset = request.offset ?? 0;
|
|
31950
32060
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
31951
32061
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -31989,12 +32099,12 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
31989
32099
|
if (kind === "messages" && found.coverage)
|
|
31990
32100
|
coverage2 = found.coverage;
|
|
31991
32101
|
hasMore ||= found.hasMore;
|
|
31992
|
-
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) =>
|
|
32102
|
+
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, kind));
|
|
31993
32103
|
for (const one2 of found.skipped ?? [])
|
|
31994
32104
|
if (!skipped.some(({ source }) => source === one2.source))
|
|
31995
32105
|
skipped.push(one2);
|
|
31996
32106
|
accounts.push(...read.map(({ provider, account: account3 }) => ({ resource: kind, provider, account: account3 })));
|
|
31997
|
-
const
|
|
32107
|
+
const itemOf3 = /* @__PURE__ */ __name((hit, foundBy) => {
|
|
31998
32108
|
const at = parseLocator(hit.locator);
|
|
31999
32109
|
return {
|
|
32000
32110
|
kind: kind === "mail" ? "mail" : "message",
|
|
@@ -32011,7 +32121,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32011
32121
|
foundBy
|
|
32012
32122
|
};
|
|
32013
32123
|
}, "itemOf");
|
|
32014
|
-
const byWords = found.items.map((hit) =>
|
|
32124
|
+
const byWords = found.items.map((hit) => itemOf3(hit, ["words"]));
|
|
32015
32125
|
if (!meaning || request.exact || kind === "messages" && request.backend === "server")
|
|
32016
32126
|
return byWords;
|
|
32017
32127
|
const filters = filtersBeside(request.text);
|
|
@@ -32036,12 +32146,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32036
32146
|
const held = fused2.get(hit.locator);
|
|
32037
32147
|
if (held)
|
|
32038
32148
|
held.item.foundBy = ["words", "meaning"];
|
|
32149
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
32039
32150
|
if (held && discovers)
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
item: held?.item ??
|
|
32043
|
-
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
32044
|
-
});
|
|
32151
|
+
held.score = Math.max(held.score, vote);
|
|
32152
|
+
else
|
|
32153
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf3(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
32045
32154
|
});
|
|
32046
32155
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
32047
32156
|
}, "messagesOf");
|
|
@@ -32083,7 +32192,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32083
32192
|
const read = chosen?.map(({ account: account3 }) => account3) ?? [
|
|
32084
32193
|
INTERNAL_NOTES,
|
|
32085
32194
|
...(await store.notes.folders()).map(({ id: id2 }) => id2),
|
|
32086
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2)
|
|
32195
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2),
|
|
32196
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [added.id] : [])
|
|
32087
32197
|
];
|
|
32088
32198
|
accounts.push(...read.map((account3) => ({ resource, provider: "notes", account: account3 })));
|
|
32089
32199
|
} else if (resource === "events") {
|
|
@@ -32121,13 +32231,37 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32121
32231
|
foundBy: hit.found_by
|
|
32122
32232
|
})));
|
|
32123
32233
|
accounts.push(...read.map(({ provider, account: account3 }) => ({ resource, provider, account: account3 })));
|
|
32234
|
+
} else if (resource === "crm") {
|
|
32235
|
+
const { words: words4, anyWord } = titleWords(request.text);
|
|
32236
|
+
const chosen = request.scope?.crm;
|
|
32237
|
+
const found = await store.deals.find({
|
|
32238
|
+
words: words4,
|
|
32239
|
+
anyWord: anyWord || discover,
|
|
32240
|
+
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
32241
|
+
limit: Math.min(window2 + 1, 500),
|
|
32242
|
+
...chosen === void 0 ? {} : { accounts: chosen }
|
|
32243
|
+
});
|
|
32244
|
+
hasMore ||= found.length > window2;
|
|
32245
|
+
lists.push(found.slice(0, window2).map((deal) => ({
|
|
32246
|
+
kind: deal.kind,
|
|
32247
|
+
ref: deal.ref,
|
|
32248
|
+
provider: deal.account?.provider ?? "crm",
|
|
32249
|
+
account: deal.account?.account ?? INTERNAL_NOTES,
|
|
32250
|
+
title: deal.title,
|
|
32251
|
+
timestamp: deal.updatedAt,
|
|
32252
|
+
text: deal.summary,
|
|
32253
|
+
foundBy: ["title"]
|
|
32254
|
+
})));
|
|
32255
|
+
const read = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
32256
|
+
for (const { provider, account: account3 } of read)
|
|
32257
|
+
accounts.push({ resource, provider, account: account3 });
|
|
32124
32258
|
} else
|
|
32125
32259
|
lists.push(await messagesOf(resource));
|
|
32126
32260
|
searched.push(resource);
|
|
32127
32261
|
} catch (error) {
|
|
32128
32262
|
if (!skippable(error))
|
|
32129
32263
|
throw error;
|
|
32130
|
-
skipped.push({ resource, code: error.code, reason: error.message });
|
|
32264
|
+
skipped.push({ resource, code: error.code, reason: error.message, ...refusal(error, request.text) });
|
|
32131
32265
|
}
|
|
32132
32266
|
}
|
|
32133
32267
|
} finally {
|
|
@@ -32136,7 +32270,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32136
32270
|
const ordered = oneList(lists, cosines);
|
|
32137
32271
|
const more = hasMore || ordered.length > window2;
|
|
32138
32272
|
return {
|
|
32139
|
-
query:
|
|
32273
|
+
query: asked.text,
|
|
32140
32274
|
items: ordered.slice(offset, window2),
|
|
32141
32275
|
hasMore: more,
|
|
32142
32276
|
...more && window2 <= MAX_SEARCH_OFFSET ? { nextOffset: window2 } : {},
|
|
@@ -32163,7 +32297,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
32163
32297
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
32164
32298
|
}, "oneList");
|
|
32165
32299
|
|
|
32166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
32167
32301
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
32168
32302
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
32169
32303
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32388,7 +32522,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
32388
32522
|
const entries = entriesOfList(source, await listContextOf(store, account2, messenger.app));
|
|
32389
32523
|
const { skipped } = fitting(entries, only, "search all", (kind) => `--only leaves ${kind} out`);
|
|
32390
32524
|
const named2 = /* @__PURE__ */ __name((resource) => [
|
|
32391
|
-
...new Map(entries.flatMap(({ accounts }) => accounts).filter((
|
|
32525
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one2) => listedHolds(one2, resource)).map(({ provider, account: account3 }) => [`${provider}\0${account3}`, { provider, account: account3 }])).values()
|
|
32392
32526
|
], "named");
|
|
32393
32527
|
const meetings = await holdingMeetings(store, named2("meetings"));
|
|
32394
32528
|
const empty2 = named2("meetings").filter((one2) => !meetings.some(({ provider, account: account3 }) => provider === one2.provider && account3 === one2.account)).map(({ provider, account: account3 }) => ({
|
|
@@ -32408,7 +32542,8 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
32408
32542
|
messages: named2("messages"),
|
|
32409
32543
|
mail: named2("mail"),
|
|
32410
32544
|
notes: named2("notes"),
|
|
32411
|
-
events: named2("events")
|
|
32545
|
+
events: named2("events"),
|
|
32546
|
+
crm: named2("crm")
|
|
32412
32547
|
},
|
|
32413
32548
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
32414
32549
|
}, messenger, searchMessages, meaning);
|
|
@@ -32416,7 +32551,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
32416
32551
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32417
32552
|
}, "searchAllOfSource");
|
|
32418
32553
|
|
|
32419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32420
32555
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32421
32556
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
32422
32557
|
var DEFAULT_BACKEND = "both";
|
|
@@ -32464,12 +32599,12 @@ var branchesOf = /* @__PURE__ */ __name((node, account2) => {
|
|
|
32464
32599
|
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
32465
32600
|
return should.length ? should.flatMap(({ node: node2 }) => branchesOf(node2, account2)) : [{ words: [] }];
|
|
32466
32601
|
}, "branchesOf");
|
|
32467
|
-
var asQuery = /* @__PURE__ */ __name(({ words:
|
|
32468
|
-
text:
|
|
32602
|
+
var asQuery = /* @__PURE__ */ __name(({ words: words4, from, ...rest }) => ({
|
|
32603
|
+
text: words4.join(" "),
|
|
32469
32604
|
...rest,
|
|
32470
32605
|
...from !== void 0 && rest.chat !== void 0 ? { from } : {}
|
|
32471
32606
|
}), "asQuery");
|
|
32472
|
-
var
|
|
32607
|
+
var refusal2 = {
|
|
32473
32608
|
unsupported: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
32474
32609
|
pushed_history: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
32475
32610
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -32493,7 +32628,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32493
32628
|
if (quiet2)
|
|
32494
32629
|
return void 0;
|
|
32495
32630
|
if (backend === "server")
|
|
32496
|
-
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error",
|
|
32631
|
+
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error", refusal2[reason], {
|
|
32497
32632
|
reason
|
|
32498
32633
|
});
|
|
32499
32634
|
return { report: { ...report, skipped: reason, complete: false }, sources };
|
|
@@ -32522,7 +32657,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32522
32657
|
return skip("other_accounts");
|
|
32523
32658
|
const all = branchesOf(execution.root, account2).flatMap((branch) => merge(scoped, branch) ?? []);
|
|
32524
32659
|
const unique = [
|
|
32525
|
-
...new Map(all.filter(({ words:
|
|
32660
|
+
...new Map(all.filter(({ words: words4 }) => words4.length).map((branch) => [JSON.stringify(branch), branch])).values()
|
|
32526
32661
|
];
|
|
32527
32662
|
if (!unique.length)
|
|
32528
32663
|
return skip("no_words");
|
|
@@ -32605,7 +32740,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32605
32740
|
return { report, sources };
|
|
32606
32741
|
}, "searchServer");
|
|
32607
32742
|
|
|
32608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32609
32744
|
var DELETE_AT_ONCE = 10;
|
|
32610
32745
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
32611
32746
|
const files = fileLinks(attachments);
|
|
@@ -33046,7 +33181,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
33046
33181
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
33047
33182
|
}, "checkMediaOptions");
|
|
33048
33183
|
|
|
33049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
33050
33185
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
33051
33186
|
var RULES = {
|
|
33052
33187
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -33061,7 +33196,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
33061
33196
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
33062
33197
|
}), "classifyChannel");
|
|
33063
33198
|
|
|
33064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
33065
33200
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
33066
33201
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
33067
33202
|
const store = await deps.store();
|
|
@@ -33147,7 +33282,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
33147
33282
|
};
|
|
33148
33283
|
}, "metadataService");
|
|
33149
33284
|
|
|
33150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
33151
33286
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
33152
33287
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
33153
33288
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -33184,7 +33319,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
33184
33319
|
return { chatId, rows, notes };
|
|
33185
33320
|
}, "moderateWith");
|
|
33186
33321
|
|
|
33187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
33188
33323
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
33189
33324
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
33190
33325
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -33262,7 +33397,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
33262
33397
|
}, "removePerson")
|
|
33263
33398
|
}), "moderatorOf");
|
|
33264
33399
|
|
|
33265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
33266
33401
|
var CONTEXT_MESSAGES2 = 10;
|
|
33267
33402
|
var CONTEXT_BYTES = 64 * 1024;
|
|
33268
33403
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -33338,18 +33473,34 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
33338
33473
|
}
|
|
33339
33474
|
return { items, cut: true };
|
|
33340
33475
|
}, "eventsOnce");
|
|
33341
|
-
var
|
|
33476
|
+
var nameOf = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "nameOf");
|
|
33477
|
+
var readableAccounts = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
33478
|
+
const stored = await store.accounts.storedAccounts();
|
|
33479
|
+
const own = stored.find((one2) => nameOf(one2) === nameOf(asked));
|
|
33480
|
+
if (!own || asked.scope !== void 0 && asked.scope !== own.scope)
|
|
33481
|
+
throw new CliError("not_found", `no ${asked.provider} account ${asked.account} in the store`);
|
|
33482
|
+
const allowed = scopes ?? [own.scope];
|
|
33483
|
+
return stored.filter((one2) => allowed.includes(one2.scope));
|
|
33484
|
+
}, "readableAccounts");
|
|
33485
|
+
var readsOf = /* @__PURE__ */ __name((record, asked, readable) => {
|
|
33486
|
+
const scopeOf4 = new Map(readable.map((one2) => [nameOf(one2), one2.scope]));
|
|
33487
|
+
return record.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).flatMap((account2) => {
|
|
33488
|
+
const scope = scopeOf4.get(nameOf({ provider: identity.provider, account: account2 }));
|
|
33489
|
+
return identity.accounts.includes(account2) && scope !== void 0 ? [{ key: { provider: identity.provider, account: account2 }, scope, identity }] : [];
|
|
33490
|
+
}));
|
|
33491
|
+
}, "readsOf");
|
|
33342
33492
|
var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
|
|
33343
33493
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
33344
33494
|
const record = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
33345
33495
|
if (!record)
|
|
33346
33496
|
throw new CliError("not_found", `no person ${found.id} in the store`);
|
|
33497
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
33347
33498
|
return {
|
|
33348
33499
|
person: { ...record, provider: asked.provider, id: found.id },
|
|
33349
|
-
...await recordContext(store, record, readsOf(record, asked), options)
|
|
33500
|
+
...await recordContext(store, record, readsOf(record, asked, readable), readable, options)
|
|
33350
33501
|
};
|
|
33351
33502
|
}, "personContext");
|
|
33352
|
-
var recordContext = /* @__PURE__ */ __name(async (store, record, reads, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
33503
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
33353
33504
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
33354
33505
|
const shared = [];
|
|
33355
33506
|
const notRead = [];
|
|
@@ -33407,9 +33558,15 @@ var recordContext = /* @__PURE__ */ __name(async (store, record, reads, { messag
|
|
|
33407
33558
|
cut ||= named2.hasMore;
|
|
33408
33559
|
}
|
|
33409
33560
|
const personId = Number(record.uid);
|
|
33410
|
-
const
|
|
33561
|
+
const calendars = [];
|
|
33562
|
+
for (const one2 of readable)
|
|
33563
|
+
if ((await store.calendar.calendars(one2.id)).length)
|
|
33564
|
+
calendars.push(one2);
|
|
33565
|
+
const accountIds = calendars.map(({ id: id2 }) => id2);
|
|
33566
|
+
const nothing = { items: [], cut: false };
|
|
33567
|
+
const upcoming = accountIds.length ? await eventsOnce(store, { personId, accountIds, from: now }, messages) : nothing;
|
|
33411
33568
|
const upcomingIds = new Set(upcoming.items.map(({ id: id2 }) => id2));
|
|
33412
|
-
const past = await eventsOnce(store, { personId, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages);
|
|
33569
|
+
const past = accountIds.length ? await eventsOnce(store, { personId, accountIds, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages) : nothing;
|
|
33413
33570
|
cut ||= upcoming.cut || past.cut;
|
|
33414
33571
|
direct.sort(newestFirst);
|
|
33415
33572
|
const each = [...direct, ...beyond].sort(newestFirst);
|
|
@@ -33425,7 +33582,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record, reads, { messag
|
|
|
33425
33582
|
};
|
|
33426
33583
|
cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
|
|
33427
33584
|
const kept2 = withinBytes(lists, bytes2);
|
|
33585
|
+
const read = [
|
|
33586
|
+
...reads.map(({ key, scope }) => ({ ...key, scope })),
|
|
33587
|
+
...calendars.map(({ provider, account: account2, scope }) => ({ provider, account: account2, scope }))
|
|
33588
|
+
];
|
|
33589
|
+
const accounts = [...new Map(read.map((one2) => [nameOf(one2), one2])).values()].sort((a, b) => nameOf(a).localeCompare(nameOf(b)));
|
|
33428
33590
|
return {
|
|
33591
|
+
accounts,
|
|
33429
33592
|
shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
|
|
33430
33593
|
last: {
|
|
33431
33594
|
fromThem: each.find((message) => !message.outgoing) ?? null,
|
|
@@ -33497,7 +33660,7 @@ var lean = /* @__PURE__ */ __name((key, message, detail) => {
|
|
|
33497
33660
|
replyTo: message.replyTo?.id ?? message.replyToId ?? null
|
|
33498
33661
|
};
|
|
33499
33662
|
}, "lean");
|
|
33500
|
-
var
|
|
33663
|
+
var kindOf2 = /* @__PURE__ */ __name((chat, chatId, person) => chat && chat.kind !== "unknown" ? chat.kind : chatId === person ? "dialog" : chat?.kind ?? "unknown", "kindOf");
|
|
33501
33664
|
var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { chats, limit = CHAT_MESSAGES, detail = 0 }) => {
|
|
33502
33665
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
33503
33666
|
const record = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
@@ -33510,7 +33673,7 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
33510
33673
|
const chat = stored.find((one2) => one2.id === chatId);
|
|
33511
33674
|
const page = await store.messages.find({ account: asked, senders: [found.id], chatId, limit });
|
|
33512
33675
|
answer.push({
|
|
33513
|
-
chat: { id: chatId, title: chat?.title ?? null, kind:
|
|
33676
|
+
chat: { id: chatId, title: chat?.title ?? null, kind: kindOf2(chat, chatId, found.id) },
|
|
33514
33677
|
messages: page.items.toSorted((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((message) => lean(asked, message, detail)),
|
|
33515
33678
|
complete: held.get(chatId) === "complete",
|
|
33516
33679
|
more: page.hasMore
|
|
@@ -33523,10 +33686,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
33523
33686
|
};
|
|
33524
33687
|
}, "personMessages");
|
|
33525
33688
|
|
|
33526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
33527
33690
|
import { createHash as createHash11 } from "node:crypto";
|
|
33528
33691
|
|
|
33529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
33530
33693
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
33531
33694
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
33532
33695
|
const parsed = parseMeetingReference(reference);
|
|
@@ -33574,7 +33737,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
33574
33737
|
};
|
|
33575
33738
|
}, "resolveMeetingReference");
|
|
33576
33739
|
|
|
33577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
33578
33741
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
33579
33742
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
33580
33743
|
if (signal?.aborted)
|
|
@@ -33773,7 +33936,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
33773
33936
|
return { ...packet, fingerprint: hash(packet) };
|
|
33774
33937
|
}, "readMeetingEvidence");
|
|
33775
33938
|
|
|
33776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
33777
33940
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
33778
33941
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
33779
33942
|
const requestedAccounts = options.accountIds;
|
|
@@ -33872,7 +34035,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
33872
34035
|
};
|
|
33873
34036
|
}, "personMeetingContext");
|
|
33874
34037
|
|
|
33875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
33876
34039
|
var PREPARE_BYTES = 96 * 1024;
|
|
33877
34040
|
var MEETINGS = 5;
|
|
33878
34041
|
var CUES = 3;
|
|
@@ -33900,7 +34063,6 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
33900
34063
|
coverage: { included: items.length, hasMore: over || cut, cutBy: cut ? "bytes" : over ? "limit" : null }
|
|
33901
34064
|
};
|
|
33902
34065
|
}, "budgeted");
|
|
33903
|
-
const reads = readsOf(context2.person, asked);
|
|
33904
34066
|
const partial = new Set(context2.notRead.map((chat) => `${chat.provider}/${chat.account}/${chat.chatId}`));
|
|
33905
34067
|
const waiting = [];
|
|
33906
34068
|
for (const chat of context2.shared.filter((one2) => one2.kind === "dialog")) {
|
|
@@ -33917,10 +34079,10 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
33917
34079
|
});
|
|
33918
34080
|
}
|
|
33919
34081
|
waiting.sort((a, b) => Date.parse(b.message.timestamp) - Date.parse(a.message.timestamp));
|
|
33920
|
-
const accounts =
|
|
34082
|
+
const accounts = context2.accounts.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
33921
34083
|
const held = await store.people.preparation(context2.person.uid, { accounts, limit });
|
|
33922
|
-
const
|
|
33923
|
-
const meetings = await meetingsOf(store, context2.person.uid,
|
|
34084
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
34085
|
+
const meetings = await meetingsOf(store, context2.person.uid, readable, options.since, () => left);
|
|
33924
34086
|
const sections = {
|
|
33925
34087
|
waiting: budgeted({ items: waiting, hasMore: false }),
|
|
33926
34088
|
tasks: budgeted(held.tasks),
|
|
@@ -33989,7 +34151,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
33989
34151
|
}
|
|
33990
34152
|
}, "meetingsOf");
|
|
33991
34153
|
|
|
33992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
33993
34155
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
33994
34156
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
33995
34157
|
const held = await storeIfOpen(deps);
|
|
@@ -34059,7 +34221,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
34059
34221
|
complete: false
|
|
34060
34222
|
})), "quiet");
|
|
34061
34223
|
|
|
34062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
34063
34225
|
var TIMELINE_ITEMS = 50;
|
|
34064
34226
|
var TIMELINE_MAX = 500;
|
|
34065
34227
|
var SCOPES = ["personal", "work"];
|
|
@@ -34114,7 +34276,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
34114
34276
|
};
|
|
34115
34277
|
}, "personTimeline");
|
|
34116
34278
|
|
|
34117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
34118
34280
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
34119
34281
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
34120
34282
|
const held = await storeIfOpen(deps);
|
|
@@ -34341,7 +34503,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
34341
34503
|
return rest;
|
|
34342
34504
|
}, "withoutPhone");
|
|
34343
34505
|
|
|
34344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
34345
34507
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
34346
34508
|
id: note.id,
|
|
34347
34509
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -34385,7 +34547,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
34385
34547
|
};
|
|
34386
34548
|
}, "privatePeopleService");
|
|
34387
34549
|
|
|
34388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
34389
34551
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
34390
34552
|
total: 0,
|
|
34391
34553
|
population: 0,
|
|
@@ -34641,7 +34803,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
34641
34803
|
}, "evidence")
|
|
34642
34804
|
}), "rankingsService");
|
|
34643
34805
|
|
|
34644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
34645
34807
|
var FIELDS = ["date", "chat", "kind"];
|
|
34646
34808
|
var WAITING_TAIL = 100;
|
|
34647
34809
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -34768,7 +34930,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34768
34930
|
};
|
|
34769
34931
|
}, "replyStatsService");
|
|
34770
34932
|
|
|
34771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
34772
34934
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
34773
34935
|
id: one2.id,
|
|
34774
34936
|
name: one2.name,
|
|
@@ -34789,7 +34951,7 @@ var MESSAGE_SEARCH_COMMANDS = [
|
|
|
34789
34951
|
"admin-statistics"
|
|
34790
34952
|
];
|
|
34791
34953
|
var NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
34792
|
-
var
|
|
34954
|
+
var nameOf2 = /* @__PURE__ */ __name((value) => {
|
|
34793
34955
|
const name = value.trim().toLowerCase();
|
|
34794
34956
|
if (!NAME.test(name) || /^\d+$/.test(name))
|
|
34795
34957
|
throw new CliError("validation_error", `"${singleLine(value)}" cannot name a saved search \u2014 use up to 64 letters a\u2013z, digits and hyphens, not only digits`, { reason: "name.invalid" });
|
|
@@ -34814,14 +34976,14 @@ var named = /* @__PURE__ */ __name((search, check) => {
|
|
|
34814
34976
|
throw new CliError(error.code, `${label}: ${error.message}`, error.details);
|
|
34815
34977
|
}
|
|
34816
34978
|
}, "named");
|
|
34817
|
-
var both = /* @__PURE__ */ __name((stored,
|
|
34979
|
+
var both = /* @__PURE__ */ __name((stored, words4) => ({
|
|
34818
34980
|
version: 1,
|
|
34819
34981
|
language: "lucene-v1",
|
|
34820
34982
|
root: {
|
|
34821
34983
|
kind: "boolean",
|
|
34822
34984
|
clauses: [
|
|
34823
34985
|
{ occur: "must", node: stored.root },
|
|
34824
|
-
{ occur: "must", node: parseLucene(
|
|
34986
|
+
{ occur: "must", node: parseLucene(words4, MESSAGE_PARSING).root }
|
|
34825
34987
|
],
|
|
34826
34988
|
span: { start: 0, end: 0 }
|
|
34827
34989
|
}
|
|
@@ -34844,13 +35006,13 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34844
35006
|
if (isAdminSelection(params.selection)) {
|
|
34845
35007
|
const selected = await readAdminSelection(store, params.selection);
|
|
34846
35008
|
const normalized2 = typeof params.selection === "string" ? JSON.parse(params.selection) : params.selection;
|
|
34847
|
-
return store.searches.saveSearch(
|
|
35009
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf("admin-statistics", {
|
|
34848
35010
|
adminReport: selected.options.report,
|
|
34849
35011
|
selection: normalized2,
|
|
34850
35012
|
timezone: selected.base.timezone
|
|
34851
35013
|
}), { replace });
|
|
34852
35014
|
}
|
|
34853
|
-
return store.searches.saveSearch(
|
|
35015
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf(params.target ? params.target === "messages" ? "message-top" : "author-top" : params.by === void 0 ? "search" : "stats", checked(params)), {
|
|
34854
35016
|
replace
|
|
34855
35017
|
});
|
|
34856
35018
|
}), "create"),
|
|
@@ -34862,7 +35024,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34862
35024
|
}), "history"),
|
|
34863
35025
|
delete: /* @__PURE__ */ __name((reference) => inStore(async (store) => store.searches.deleteSearch((await found(store, reference)).id)), "delete"),
|
|
34864
35026
|
clear: /* @__PURE__ */ __name(() => inStore(async (store) => ({ cleared: await store.searches.clearSearchHistory(MESSAGE_SEARCH_COMMANDS) })), "clear"),
|
|
34865
|
-
resolve: /* @__PURE__ */ __name((reference, { text:
|
|
35027
|
+
resolve: /* @__PURE__ */ __name((reference, { text: words4, ...typed }) => inStore(async (store) => {
|
|
34866
35028
|
const search = await found(store, reference);
|
|
34867
35029
|
const stored = search.params;
|
|
34868
35030
|
const inherited = { ...stored };
|
|
@@ -34883,7 +35045,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34883
35045
|
throw new CliError("validation_error", "the legacy search and --regex are gone; save it again as Lucene");
|
|
34884
35046
|
checked(stored);
|
|
34885
35047
|
});
|
|
34886
|
-
const extra =
|
|
35048
|
+
const extra = words4?.trim() ? words4.trim() : void 0;
|
|
34887
35049
|
if (extra !== void 0) {
|
|
34888
35050
|
if (params.ast !== void 0)
|
|
34889
35051
|
params.ast = both(validateAst(params.ast), extra);
|
|
@@ -34897,7 +35059,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34897
35059
|
};
|
|
34898
35060
|
}, "searchesService");
|
|
34899
35061
|
|
|
34900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
34901
35063
|
var TAGGING_QUERY = {
|
|
34902
35064
|
entity: "tagging",
|
|
34903
35065
|
backend: "sql",
|
|
@@ -34981,7 +35143,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34981
35143
|
};
|
|
34982
35144
|
}, "tagsService");
|
|
34983
35145
|
|
|
34984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
34985
35147
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
34986
35148
|
var PERIOD_FIELD = "created";
|
|
34987
35149
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -35084,7 +35246,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
35084
35246
|
}));
|
|
35085
35247
|
}, "meetingNames");
|
|
35086
35248
|
|
|
35087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
35088
35250
|
var TASK_QUERY = {
|
|
35089
35251
|
entity: "task",
|
|
35090
35252
|
backend: "sql",
|
|
@@ -35576,7 +35738,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
35576
35738
|
};
|
|
35577
35739
|
}, "taskView");
|
|
35578
35740
|
|
|
35579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
35580
35742
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
35581
35743
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
35582
35744
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -35775,7 +35937,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35775
35937
|
};
|
|
35776
35938
|
}, "topicsService");
|
|
35777
35939
|
|
|
35778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
35779
35941
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
35780
35942
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
35781
35943
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -35849,7 +36011,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
35849
36011
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
35850
36012
|
}, "prepareEvidencePacket");
|
|
35851
36013
|
|
|
35852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
35853
36015
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
35854
36016
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
35855
36017
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -35869,7 +36031,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
35869
36031
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
35870
36032
|
}, "readEvidencePacket");
|
|
35871
36033
|
|
|
35872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
35873
36035
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
35874
36036
|
let before2 = Number.POSITIVE_INFINITY;
|
|
35875
36037
|
for (; ; ) {
|
|
@@ -35922,7 +36084,7 @@ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35922
36084
|
return { input, selection };
|
|
35923
36085
|
}, "resolveMeetingSelection");
|
|
35924
36086
|
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
|
|
35925
|
-
const lifted = liftMeetingFields(query, request);
|
|
36087
|
+
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
35926
36088
|
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
35927
36089
|
if (options.refreshIndex !== false)
|
|
35928
36090
|
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
@@ -35931,7 +36093,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
35931
36093
|
return { ...result, selection };
|
|
35932
36094
|
}, "searchMeetingHits");
|
|
35933
36095
|
|
|
35934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
35935
36097
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
35936
36098
|
const { maxMessages, url, ...selecting } = request;
|
|
35937
36099
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -35970,10 +36132,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35970
36132
|
};
|
|
35971
36133
|
}, "readMeetingLinks");
|
|
35972
36134
|
|
|
35973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
35974
36136
|
import { createHash as createHash13 } from "node:crypto";
|
|
35975
36137
|
|
|
35976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
35977
36139
|
function invalid3(field, response = false) {
|
|
35978
36140
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
35979
36141
|
}
|
|
@@ -36092,7 +36254,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
36092
36254
|
}
|
|
36093
36255
|
}, "candidateCatalog");
|
|
36094
36256
|
|
|
36095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
36096
36258
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
36097
36259
|
const fixed = snapshotMeetingScope(scope);
|
|
36098
36260
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -36145,7 +36307,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
36145
36307
|
};
|
|
36146
36308
|
}, "createMeetingProjectCandidateReader");
|
|
36147
36309
|
|
|
36148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36149
36311
|
import { createHash as createHash14 } from "node:crypto";
|
|
36150
36312
|
var scopeKeys = [
|
|
36151
36313
|
"accountId",
|
|
@@ -36280,7 +36442,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
36280
36442
|
};
|
|
36281
36443
|
}, "readMeetingProjectDiscovery");
|
|
36282
36444
|
|
|
36283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
36284
36446
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
36285
36447
|
const { limit, ...selecting } = request;
|
|
36286
36448
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -36288,7 +36450,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
36288
36450
|
return { ...review, selection };
|
|
36289
36451
|
}, "readMeetingReview");
|
|
36290
36452
|
|
|
36291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
36292
36454
|
var KIND = ["meetings-search"];
|
|
36293
36455
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
36294
36456
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -36304,7 +36466,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
36304
36466
|
}, "found");
|
|
36305
36467
|
const record = /* @__PURE__ */ __name(({ query, options }) => searchRecordOf("meetings-search", { ...options, text: query }), "record");
|
|
36306
36468
|
return {
|
|
36307
|
-
create: /* @__PURE__ */ __name(async (name, params, { replace = false } = {}) => (await searches()).saveSearch(
|
|
36469
|
+
create: /* @__PURE__ */ __name(async (name, params, { replace = false } = {}) => (await searches()).saveSearch(nameOf2(name), record(params), { replace }), "create"),
|
|
36308
36470
|
list: /* @__PURE__ */ __name(async () => (await searches()).savedSearches(KIND), "list"),
|
|
36309
36471
|
show: found,
|
|
36310
36472
|
delete: /* @__PURE__ */ __name(async (reference) => (await searches()).deleteSearch((await found(reference)).id), "delete"),
|
|
@@ -36318,7 +36480,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
36318
36480
|
};
|
|
36319
36481
|
}, "meetingSearchesService");
|
|
36320
36482
|
|
|
36321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
36322
36484
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
36323
36485
|
const { timeZone, maxRows, ...selecting } = request;
|
|
36324
36486
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -36341,7 +36503,7 @@ var readMeetingCounts = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
36341
36503
|
return { ...counts, selection };
|
|
36342
36504
|
}, "readMeetingCounts");
|
|
36343
36505
|
|
|
36344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
36345
36507
|
import { createHash as createHash15 } from "node:crypto";
|
|
36346
36508
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
36347
36509
|
ref: cue.reference,
|
|
@@ -36459,7 +36621,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
36459
36621
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
36460
36622
|
}, "readMeetingHitContext");
|
|
36461
36623
|
|
|
36462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
36463
36625
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
36464
36626
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
36465
36627
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -36536,7 +36698,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
36536
36698
|
return { packet, content };
|
|
36537
36699
|
}, "readMeetingPassage");
|
|
36538
36700
|
|
|
36539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
36540
36702
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
36541
36703
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
36542
36704
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -36550,10 +36712,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
36550
36712
|
};
|
|
36551
36713
|
}, "createMeetingBatchReader");
|
|
36552
36714
|
|
|
36553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
36554
36716
|
import { createHash as createHash16 } from "node:crypto";
|
|
36555
36717
|
|
|
36556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
36557
36719
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
36558
36720
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
36559
36721
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -36705,7 +36867,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
36705
36867
|
};
|
|
36706
36868
|
}, "applyMeetingEmbedding");
|
|
36707
36869
|
|
|
36708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
36709
36871
|
var DEPTH = 200;
|
|
36710
36872
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
36711
36873
|
if (value === void 0)
|
|
@@ -36722,8 +36884,8 @@ var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
|
36722
36884
|
}, "cursorOf");
|
|
36723
36885
|
var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
|
|
36724
36886
|
const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
|
|
36725
|
-
const { query, request:
|
|
36726
|
-
const { input, selection } = await resolveMeetingSelection(store,
|
|
36887
|
+
const { query, request: words4 } = liftMeetingFields(typed, chosen);
|
|
36888
|
+
const { input, selection } = await resolveMeetingSelection(store, words4);
|
|
36727
36889
|
const { after, limit = 20, maxReadBytes, ...filters } = input;
|
|
36728
36890
|
const terms = questionTerms(query);
|
|
36729
36891
|
const wordQuery = terms === null ? query : terms.join(" ");
|
|
@@ -36842,7 +37004,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
36842
37004
|
};
|
|
36843
37005
|
}, "searchMeetingsCombined");
|
|
36844
37006
|
|
|
36845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
36846
37008
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
36847
37009
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
36848
37010
|
if (!signal?.aborted)
|
|
@@ -36947,7 +37109,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
36947
37109
|
};
|
|
36948
37110
|
}, "createMeetingContextService");
|
|
36949
37111
|
|
|
36950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
36951
37113
|
var integer = /* @__PURE__ */ __name((value, name, max) => {
|
|
36952
37114
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
36953
37115
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -37174,7 +37336,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
37174
37336
|
};
|
|
37175
37337
|
}, "openMeetingEmbedder");
|
|
37176
37338
|
|
|
37177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
37178
37340
|
var communicationFields = {
|
|
37179
37341
|
sources: pipe(array(strictObject({
|
|
37180
37342
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -37194,8 +37356,8 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
37194
37356
|
throw new CliError("validation_error", `invalid communications.${field}`);
|
|
37195
37357
|
}
|
|
37196
37358
|
const input = parsed.output;
|
|
37197
|
-
const
|
|
37198
|
-
if (Buffer.byteLength(input.query) > 2048 || !
|
|
37359
|
+
const words4 = input.query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
37360
|
+
if (Buffer.byteLength(input.query) > 2048 || !words4.length || words4.length > 16)
|
|
37199
37361
|
throw new CliError("validation_error", "communications.query needs 1\u201316 literal words within 2048 UTF-8 bytes");
|
|
37200
37362
|
const before2 = input.before ?? preparationAfter;
|
|
37201
37363
|
const after = input.after ?? Math.max(0, before2 - 14 * 864e5);
|
|
@@ -37206,7 +37368,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
37206
37368
|
return { ...input, after, before: before2 };
|
|
37207
37369
|
}, "communicationRequest");
|
|
37208
37370
|
|
|
37209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
37210
37372
|
var MEETING_PREPARATION_LIMITS = {
|
|
37211
37373
|
meetings: { min: 1, max: 20, default: 5 },
|
|
37212
37374
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -37292,7 +37454,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
37292
37454
|
return { ...input, history };
|
|
37293
37455
|
}, "preparationRequest");
|
|
37294
37456
|
|
|
37295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
37296
37458
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
37297
37459
|
const section = {
|
|
37298
37460
|
readUsage: plan.reader.usage(),
|
|
@@ -37397,7 +37559,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
37397
37559
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
37398
37560
|
}, "appendPreparationCommunications");
|
|
37399
37561
|
|
|
37400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
37401
37563
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
37402
37564
|
if (port === void 0)
|
|
37403
37565
|
return void 0;
|
|
@@ -37502,7 +37664,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
37502
37664
|
}
|
|
37503
37665
|
}, "validatePreparationCommunications");
|
|
37504
37666
|
|
|
37505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
37506
37668
|
var invalid4 = /* @__PURE__ */ __name(() => {
|
|
37507
37669
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
37508
37670
|
}, "invalid");
|
|
@@ -37571,7 +37733,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
37571
37733
|
}
|
|
37572
37734
|
}, "appendKnowledgePreparation");
|
|
37573
37735
|
|
|
37574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
37575
37737
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
37576
37738
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
37577
37739
|
}, "invalid");
|
|
@@ -37645,7 +37807,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
37645
37807
|
}
|
|
37646
37808
|
}, "appendNotesPreparation");
|
|
37647
37809
|
|
|
37648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
37649
37811
|
var PAGE_LIMIT = 4;
|
|
37650
37812
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37651
37813
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -37695,7 +37857,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
37695
37857
|
}
|
|
37696
37858
|
}, "appendProjectPreparation");
|
|
37697
37859
|
|
|
37698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
37699
37861
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
37700
37862
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
37701
37863
|
return;
|
|
@@ -37767,7 +37929,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
37767
37929
|
}
|
|
37768
37930
|
}, "appendRelatedPreparation");
|
|
37769
37931
|
|
|
37770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
37771
37933
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37772
37934
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
37773
37935
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -37905,7 +38067,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
37905
38067
|
};
|
|
37906
38068
|
}, "createMeetingPreparationService");
|
|
37907
38069
|
|
|
37908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
37909
38071
|
import { createHash as createHash17 } from "node:crypto";
|
|
37910
38072
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
37911
38073
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -37925,7 +38087,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
37925
38087
|
};
|
|
37926
38088
|
}, "proposeMeetingTask");
|
|
37927
38089
|
|
|
37928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
37929
38091
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
37930
38092
|
const { provider, account: account2, scope } = key;
|
|
37931
38093
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -37988,7 +38150,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
37988
38150
|
}
|
|
37989
38151
|
}, "readMeetingTask");
|
|
37990
38152
|
|
|
37991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
37992
38154
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
37993
38155
|
const installer = ports.installer();
|
|
37994
38156
|
const argv = updateCommand(installer, packageName);
|
|
@@ -38053,7 +38215,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
38053
38215
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
38054
38216
|
}, "dayAfter");
|
|
38055
38217
|
|
|
38056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
38057
38219
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
38058
38220
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
38059
38221
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -38076,7 +38238,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
38076
38238
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
38077
38239
|
}, "approveAsTask");
|
|
38078
38240
|
|
|
38079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
38080
38242
|
var MAX_IDS = 500;
|
|
38081
38243
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
38082
38244
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -38118,7 +38280,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
38118
38280
|
return ids;
|
|
38119
38281
|
}, "parseProposalIds");
|
|
38120
38282
|
|
|
38121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
38122
38284
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
38123
38285
|
if (author.type === "person")
|
|
38124
38286
|
return { type: "person", id: author.id };
|
|
@@ -38159,8 +38321,38 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
38159
38321
|
const status = filter.status ?? "proposed";
|
|
38160
38322
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
38161
38323
|
}, "storedStatus");
|
|
38324
|
+
var reviewedRow = /* @__PURE__ */ __name((kind, entry, object3) => ({
|
|
38325
|
+
id: entry.ref,
|
|
38326
|
+
kind,
|
|
38327
|
+
status: entry.review,
|
|
38328
|
+
project: entry.project,
|
|
38329
|
+
subject: entry.ref,
|
|
38330
|
+
object: object3,
|
|
38331
|
+
summary: entry.title,
|
|
38332
|
+
proposedBy: proposerOfAuthor(entry.author),
|
|
38333
|
+
reason: entry.reason,
|
|
38334
|
+
evidence: [],
|
|
38335
|
+
score: null,
|
|
38336
|
+
signals: null,
|
|
38337
|
+
parts: null,
|
|
38338
|
+
createdAt: entry.createdAt
|
|
38339
|
+
}), "reviewedRow");
|
|
38340
|
+
var reviewedKind = /* @__PURE__ */ __name((spec) => ({
|
|
38341
|
+
kind: spec.type,
|
|
38342
|
+
prefix: spec.type,
|
|
38343
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
38344
|
+
const status = filter.status ?? "proposed";
|
|
38345
|
+
const entries = await spec.list({ ...pushed2(filter), ...status === "all" ? {} : { review: status } });
|
|
38346
|
+
return kept(entries.map(spec.row), filter);
|
|
38347
|
+
}, "list"),
|
|
38348
|
+
get: /* @__PURE__ */ __name(async (id2) => spec.row(await spec.get(id2)), "get"),
|
|
38349
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38350
|
+
const made = await spec.decide(id2, confirm, { by, reason });
|
|
38351
|
+
return { id: id2, kind: spec.type, status: confirm ? "confirmed" : "rejected", made: confirm ? [made] : [] };
|
|
38352
|
+
}, "decide")
|
|
38353
|
+
}), "reviewedKind");
|
|
38162
38354
|
|
|
38163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
38164
38356
|
var FACT_SUMMARIES = {
|
|
38165
38357
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
38166
38358
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -38232,8 +38424,64 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38232
38424
|
};
|
|
38233
38425
|
}, "findingsKind");
|
|
38234
38426
|
|
|
38235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38236
|
-
var
|
|
38427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
38428
|
+
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
38429
|
+
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
38430
|
+
var rowOf2 = /* @__PURE__ */ __name((action) => {
|
|
38431
|
+
const renamed2 = action.kind === ORGANIZATION_RENAME_KIND;
|
|
38432
|
+
const { name, kind } = action.payload;
|
|
38433
|
+
const { organization } = action.payload;
|
|
38434
|
+
return {
|
|
38435
|
+
id: action.id,
|
|
38436
|
+
kind: "organization",
|
|
38437
|
+
status: actionStatus(action.status),
|
|
38438
|
+
project: null,
|
|
38439
|
+
subject: renamed2 ? organization : "organization:new",
|
|
38440
|
+
object: null,
|
|
38441
|
+
summary: renamed2 ? `rename ${organization} to ${name}` : `add ${kind} ${name}`,
|
|
38442
|
+
proposedBy: proposerOfAction(action),
|
|
38443
|
+
reason: action.reason,
|
|
38444
|
+
evidence: [],
|
|
38445
|
+
score: null,
|
|
38446
|
+
signals: null,
|
|
38447
|
+
parts: null,
|
|
38448
|
+
createdAt: action.createdAt
|
|
38449
|
+
};
|
|
38450
|
+
}, "rowOf");
|
|
38451
|
+
var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
38452
|
+
kind: "organization",
|
|
38453
|
+
stored: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
38454
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
38455
|
+
const status = storedStatus(filter);
|
|
38456
|
+
const actions = await store.proposedActions.list({
|
|
38457
|
+
kinds: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
38458
|
+
...status === void 0 ? {} : { status },
|
|
38459
|
+
...pushed2(filter)
|
|
38460
|
+
});
|
|
38461
|
+
return kept(actions.map(rowOf2), filter);
|
|
38462
|
+
}, "list"),
|
|
38463
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf2(await store.proposedActions.get(id2)), "get"),
|
|
38464
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38465
|
+
if (!confirm) {
|
|
38466
|
+
await store.proposedActions.reject(id2, by, reason);
|
|
38467
|
+
return { id: id2, kind: "organization", status: "rejected", made: [] };
|
|
38468
|
+
}
|
|
38469
|
+
const action = await store.proposedActions.get(id2);
|
|
38470
|
+
if (action.kind === ORGANIZATION_RENAME_KIND) {
|
|
38471
|
+
const { organization, name: name2 } = action.payload;
|
|
38472
|
+
const renamed2 = await store.knowledge.updateOrganization(organization, { name: name2 });
|
|
38473
|
+
await store.proposedActions.approve(id2, by, { organization: renamed2.ref });
|
|
38474
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [] };
|
|
38475
|
+
}
|
|
38476
|
+
const { name, kind, scope } = action.payload;
|
|
38477
|
+
const made = await store.knowledge.addOrganization({ name, kind, ...scope === void 0 ? {} : { scope } });
|
|
38478
|
+
await store.proposedActions.approve(id2, by, { organization: made.ref });
|
|
38479
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [made.ref] };
|
|
38480
|
+
}, "decide")
|
|
38481
|
+
}), "organizationKind");
|
|
38482
|
+
|
|
38483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
38484
|
+
var rowOf3 = /* @__PURE__ */ __name((action) => ({
|
|
38237
38485
|
id: action.id,
|
|
38238
38486
|
kind: "action",
|
|
38239
38487
|
status: actionStatus(action.status),
|
|
@@ -38259,9 +38507,9 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
38259
38507
|
...status === void 0 ? {} : { status },
|
|
38260
38508
|
...pushed2(filter)
|
|
38261
38509
|
});
|
|
38262
|
-
return kept(actions.map(
|
|
38510
|
+
return kept(actions.map(rowOf3), filter);
|
|
38263
38511
|
}, "list"),
|
|
38264
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38512
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf3(await store.proposedActions.get(id2)), "get"),
|
|
38265
38513
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38266
38514
|
if (!confirm) {
|
|
38267
38515
|
await store.proposedActions.reject(id2, by, reason);
|
|
@@ -38272,7 +38520,16 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
38272
38520
|
}, "decide")
|
|
38273
38521
|
}), "actionKind");
|
|
38274
38522
|
|
|
38275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/contracts.js
|
|
38524
|
+
var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
38525
|
+
type: "contract",
|
|
38526
|
+
list: /* @__PURE__ */ __name((options) => store.contracts.list(options), "list"),
|
|
38527
|
+
get: /* @__PURE__ */ __name((id2) => store.contracts.get(id2), "get"),
|
|
38528
|
+
row: /* @__PURE__ */ __name((contract) => reviewedRow("contract", contract, contract.deal), "row"),
|
|
38529
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.contracts.confirm(id2, by, reason) : await store.contracts.reject(id2, by, reason)).ref, "decide")
|
|
38530
|
+
}), "contractKind");
|
|
38531
|
+
|
|
38532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
38276
38533
|
var STATUS = {
|
|
38277
38534
|
proposed: "proposed",
|
|
38278
38535
|
accepted: "confirmed",
|
|
@@ -38280,7 +38537,7 @@ var STATUS = {
|
|
|
38280
38537
|
reversed: "confirmed",
|
|
38281
38538
|
rejected: "rejected"
|
|
38282
38539
|
};
|
|
38283
|
-
var
|
|
38540
|
+
var rowOf4 = /* @__PURE__ */ __name((fact) => ({
|
|
38284
38541
|
id: fact.ref,
|
|
38285
38542
|
kind: "fact",
|
|
38286
38543
|
status: STATUS[fact.status],
|
|
@@ -38306,51 +38563,32 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38306
38563
|
...status === "all" ? {} : { status: status === "confirmed" ? "accepted" : status },
|
|
38307
38564
|
order: "created"
|
|
38308
38565
|
});
|
|
38309
|
-
return kept(facts.map(
|
|
38566
|
+
return kept(facts.map(rowOf4), filter);
|
|
38310
38567
|
}, "list"),
|
|
38311
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38568
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf4(await store.facts.get(id2)), "get"),
|
|
38312
38569
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38313
38570
|
const fact = confirm ? await store.facts.accept(id2, by, reason) : await store.facts.reject(id2, by, reason);
|
|
38314
38571
|
return { id: id2, kind: "fact", status: confirm ? "confirmed" : "rejected", made: confirm ? [fact.ref] : [] };
|
|
38315
38572
|
}, "decide")
|
|
38316
38573
|
}), "factKind");
|
|
38317
38574
|
|
|
38318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38319
|
-
var
|
|
38320
|
-
|
|
38321
|
-
|
|
38322
|
-
|
|
38323
|
-
|
|
38324
|
-
|
|
38325
|
-
|
|
38326
|
-
|
|
38327
|
-
|
|
38328
|
-
|
|
38329
|
-
|
|
38330
|
-
|
|
38331
|
-
|
|
38332
|
-
|
|
38333
|
-
|
|
38334
|
-
|
|
38335
|
-
var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
38336
|
-
kind,
|
|
38337
|
-
prefix: kind,
|
|
38338
|
-
list: /* @__PURE__ */ __name(async (filter) => {
|
|
38339
|
-
const status = filter.status ?? "proposed";
|
|
38340
|
-
const options = { ...pushed2(filter), ...status === "all" ? {} : { review: status } };
|
|
38341
|
-
const entries = kind === "invoice" ? await store.finance.invoices(options) : await store.finance.payments(options);
|
|
38342
|
-
return kept(entries.map((entry) => rowOf4(kind, entry)), filter);
|
|
38343
|
-
}, "list"),
|
|
38344
|
-
get: /* @__PURE__ */ __name(async (id2) => rowOf4(kind, kind === "invoice" ? await store.finance.invoice(id2) : await store.finance.payment(id2)), "get"),
|
|
38345
|
-
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38346
|
-
const entry = confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason);
|
|
38347
|
-
return { id: id2, kind, status: confirm ? "confirmed" : "rejected", made: confirm ? [entry.ref] : [] };
|
|
38348
|
-
}, "decide")
|
|
38349
|
-
}), "financeKind");
|
|
38350
|
-
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
38351
|
-
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
38352
|
-
|
|
38353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
38575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
38576
|
+
var invoiceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
38577
|
+
type: "invoice",
|
|
38578
|
+
list: /* @__PURE__ */ __name((options) => store.finance.invoices(options), "list"),
|
|
38579
|
+
get: /* @__PURE__ */ __name((id2) => store.finance.invoice(id2), "get"),
|
|
38580
|
+
row: /* @__PURE__ */ __name((invoice) => reviewedRow("invoice", invoice, invoice.counterparty.ref), "row"),
|
|
38581
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
38582
|
+
}), "invoiceKind");
|
|
38583
|
+
var paymentKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
38584
|
+
type: "payment",
|
|
38585
|
+
list: /* @__PURE__ */ __name((options) => store.finance.payments(options), "list"),
|
|
38586
|
+
get: /* @__PURE__ */ __name((id2) => store.finance.payment(id2), "get"),
|
|
38587
|
+
row: /* @__PURE__ */ __name((payment) => reviewedRow("payment", payment, (payment.direction === "in" ? payment.payer : payment.payee)?.ref ?? null), "row"),
|
|
38588
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
38589
|
+
}), "paymentKind");
|
|
38590
|
+
|
|
38591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
38354
38592
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
38355
38593
|
id: `key:${link4.id}`,
|
|
38356
38594
|
kind: "key_document",
|
|
@@ -38418,7 +38656,8 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
38418
38656
|
};
|
|
38419
38657
|
}, "keyDocumentKind");
|
|
38420
38658
|
|
|
38421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
38660
|
+
var words3 = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
38422
38661
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
38423
38662
|
switch (finding.kind) {
|
|
38424
38663
|
case "task":
|
|
@@ -38433,6 +38672,14 @@ var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
|
38433
38672
|
return `${finding.from} \u2192 ${finding.to}`;
|
|
38434
38673
|
case "new_contact":
|
|
38435
38674
|
return `${finding.name} <${finding.address}>`;
|
|
38675
|
+
case "invoice":
|
|
38676
|
+
return words3("invoice", finding.number, finding.total, finding.currency, finding.counterpartyName, `\xB7 ${finding.reason}`);
|
|
38677
|
+
case "payment":
|
|
38678
|
+
return words3("payment", finding.amount, finding.currency, finding.date, `\xB7 ${finding.reason}`);
|
|
38679
|
+
case "order":
|
|
38680
|
+
return words3("order", finding.number, finding.supplierName, finding.status ?? "placed", `\xB7 ${finding.reason}`);
|
|
38681
|
+
case "order_update":
|
|
38682
|
+
return words3("order", finding.number, finding.supplierName, finding.status, `\xB7 ${finding.reason}`);
|
|
38436
38683
|
}
|
|
38437
38684
|
}, "summaryOf");
|
|
38438
38685
|
var rowOf5 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
@@ -38497,7 +38744,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38497
38744
|
};
|
|
38498
38745
|
}, "mailFindingsKind");
|
|
38499
38746
|
|
|
38500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
38501
38748
|
var rowOf6 = /* @__PURE__ */ __name((action, batch) => {
|
|
38502
38749
|
const findings = batch.input.findings;
|
|
38503
38750
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -38561,7 +38808,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38561
38808
|
};
|
|
38562
38809
|
}, "meetingFindingsKind");
|
|
38563
38810
|
|
|
38564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
38565
38812
|
var STATUS2 = {
|
|
38566
38813
|
proposed: "proposed",
|
|
38567
38814
|
confirmed: "confirmed",
|
|
@@ -38602,7 +38849,16 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38602
38849
|
}, "decide")
|
|
38603
38850
|
}), "memoryKind");
|
|
38604
38851
|
|
|
38605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
38853
|
+
var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
38854
|
+
type: "order",
|
|
38855
|
+
list: /* @__PURE__ */ __name((options) => store.orders.list(options), "list"),
|
|
38856
|
+
get: /* @__PURE__ */ __name((id2) => store.orders.get(id2), "get"),
|
|
38857
|
+
row: /* @__PURE__ */ __name((order) => reviewedRow("order", order, order.supplier?.ref ?? null), "row"),
|
|
38858
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason)).ref, "decide")
|
|
38859
|
+
}), "orderKind");
|
|
38860
|
+
|
|
38861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
38606
38862
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
38607
38863
|
id: `link:${link4.id}`,
|
|
38608
38864
|
kind: "relationship",
|
|
@@ -38676,7 +38932,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
38676
38932
|
};
|
|
38677
38933
|
}, "relationshipKind");
|
|
38678
38934
|
|
|
38679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
38680
38936
|
var KIND2 = "relationship_update";
|
|
38681
38937
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
38682
38938
|
var rowOf8 = /* @__PURE__ */ __name((action) => {
|
|
@@ -38726,8 +38982,70 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38726
38982
|
}, "decide")
|
|
38727
38983
|
}), "relationshipUpdateKind");
|
|
38728
38984
|
|
|
38729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38730
|
-
var rowOf9 = /* @__PURE__ */ __name((
|
|
38985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/source-review.js
|
|
38986
|
+
var rowOf9 = /* @__PURE__ */ __name((action) => {
|
|
38987
|
+
const payload = action.payload;
|
|
38988
|
+
const sources = payload.sources.flatMap((source) => source.ref ?? []);
|
|
38989
|
+
const contradicting = payload.challenges.flatMap((challenge) => challenge.evidence);
|
|
38990
|
+
const replacement = payload.sources.find((source) => source.replacement !== void 0)?.replacement ?? null;
|
|
38991
|
+
return {
|
|
38992
|
+
id: action.id,
|
|
38993
|
+
kind: SOURCE_REVIEW_KIND,
|
|
38994
|
+
status: actionStatus(action.status),
|
|
38995
|
+
project: null,
|
|
38996
|
+
subject: action.target ?? payload.target,
|
|
38997
|
+
object: replacement,
|
|
38998
|
+
summary: `${payload.cause}: ${payload.sources.length} source(s), ${payload.challenges.length} challenge(s)`,
|
|
38999
|
+
proposedBy: proposerOfAction(action),
|
|
39000
|
+
reason: payload.challenges.at(-1)?.reason ?? action.reason,
|
|
39001
|
+
evidence: [.../* @__PURE__ */ new Set([...sources, ...contradicting])].slice(0, 5),
|
|
39002
|
+
score: null,
|
|
39003
|
+
signals: null,
|
|
39004
|
+
parts: null,
|
|
39005
|
+
createdAt: payload.raisedAt
|
|
39006
|
+
};
|
|
39007
|
+
}, "rowOf");
|
|
39008
|
+
var sourceReviewKind = /* @__PURE__ */ __name((store) => ({
|
|
39009
|
+
kind: SOURCE_REVIEW_KIND,
|
|
39010
|
+
stored: [SOURCE_REVIEW_KIND],
|
|
39011
|
+
ownerOnly: true,
|
|
39012
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
39013
|
+
const status = storedStatus(filter);
|
|
39014
|
+
const stored = await store.proposedActions.list({
|
|
39015
|
+
kinds: [SOURCE_REVIEW_KIND],
|
|
39016
|
+
...status === void 0 ? {} : { status },
|
|
39017
|
+
...pushed2(filter)
|
|
39018
|
+
});
|
|
39019
|
+
return kept(stored.map(rowOf9), filter);
|
|
39020
|
+
}, "list"),
|
|
39021
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf9(await store.proposedActions.get(id2)), "get"),
|
|
39022
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
39023
|
+
await store.knowledge.decideSourceReview(id2, { confirm, by, ...reason === void 0 ? {} : { reason } });
|
|
39024
|
+
return { id: id2, kind: SOURCE_REVIEW_KIND, status: confirm ? "confirmed" : "rejected", made: [] };
|
|
39025
|
+
}, "decide")
|
|
39026
|
+
}), "sourceReviewKind");
|
|
39027
|
+
|
|
39028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/subscriptions.js
|
|
39029
|
+
var subscriptionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
39030
|
+
type: "subscription",
|
|
39031
|
+
list: /* @__PURE__ */ __name((options) => store.subscriptions.list(options), "list"),
|
|
39032
|
+
get: /* @__PURE__ */ __name((id2) => store.subscriptions.get(id2), "get"),
|
|
39033
|
+
row: /* @__PURE__ */ __name((subscription) => reviewedRow("subscription", subscription, (subscription.direction === "receivable" ? subscription.customer : subscription.supplier).ref), "row"),
|
|
39034
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.subscriptions.confirm(id2, by, reason) : await store.subscriptions.reject(id2, by, reason)).ref, "decide")
|
|
39035
|
+
}), "subscriptionKind");
|
|
39036
|
+
var subscriptionPriceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
39037
|
+
type: "subscription_price",
|
|
39038
|
+
list: /* @__PURE__ */ __name(({ review, proposedBy, limit }) => store.subscriptions.prices({ review, proposedBy, limit }), "list"),
|
|
39039
|
+
get: /* @__PURE__ */ __name((id2) => store.subscriptions.price(id2), "get"),
|
|
39040
|
+
row: /* @__PURE__ */ __name((price) => reviewedRow("subscription_price", price, price.subscription), "row"),
|
|
39041
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => {
|
|
39042
|
+
await (confirm ? store.subscriptions.confirm(id2, by, reason) : store.subscriptions.reject(id2, by, reason));
|
|
39043
|
+
return id2;
|
|
39044
|
+
}, "decide")
|
|
39045
|
+
}), "subscriptionPriceKind");
|
|
39046
|
+
|
|
39047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
39048
|
+
var rowOf10 = /* @__PURE__ */ __name((task2) => {
|
|
38731
39049
|
const suggestion = task2.closeSuggestion;
|
|
38732
39050
|
if (suggestion === null)
|
|
38733
39051
|
return void 0;
|
|
@@ -38752,7 +39070,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38752
39070
|
const taskOf = /* @__PURE__ */ __name(async (id2) => {
|
|
38753
39071
|
const key = id2.slice("close:".length);
|
|
38754
39072
|
const task2 = await store.tasks.details(key).catch(() => void 0);
|
|
38755
|
-
const row = task2 &&
|
|
39073
|
+
const row = task2 && rowOf10(task2);
|
|
38756
39074
|
if (!task2 || !row)
|
|
38757
39075
|
throw new CliError("not_found", `no close waits on task ${key}`);
|
|
38758
39076
|
return { task: task2, row };
|
|
@@ -38769,7 +39087,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38769
39087
|
where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
|
|
38770
39088
|
limit: filter.offset + filter.limit
|
|
38771
39089
|
});
|
|
38772
|
-
return kept(tasks.flatMap((task2) =>
|
|
39090
|
+
return kept(tasks.flatMap((task2) => rowOf10(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
|
|
38773
39091
|
}, "list"),
|
|
38774
39092
|
get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
|
|
38775
39093
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
@@ -38794,7 +39112,16 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38794
39112
|
};
|
|
38795
39113
|
}, "taskCloseKind");
|
|
38796
39114
|
|
|
38797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/transactions.js
|
|
39116
|
+
var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
39117
|
+
type: "transaction",
|
|
39118
|
+
list: /* @__PURE__ */ __name((options) => store.transactions.list(options), "list"),
|
|
39119
|
+
get: /* @__PURE__ */ __name((id2) => store.transactions.get(id2), "get"),
|
|
39120
|
+
row: /* @__PURE__ */ __name((transaction) => reviewedRow("transaction", transaction, transaction.counterparty?.ref ?? transaction.wallet), "row"),
|
|
39121
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.transactions.confirm(id2, by, reason) : await store.transactions.reject(id2, by, reason)).ref, "decide")
|
|
39122
|
+
}), "transactionKind");
|
|
39123
|
+
|
|
39124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
38798
39125
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
38799
39126
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
38800
39127
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -38808,7 +39135,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38808
39135
|
const policy = store.decisionPolicy;
|
|
38809
39136
|
const kinds = [];
|
|
38810
39137
|
const claimed = /* @__PURE__ */ __name(() => kinds.flatMap((kind) => kind.stored ?? []), "claimed");
|
|
38811
|
-
const
|
|
39138
|
+
const kindOf3 = /* @__PURE__ */ __name(async (id2) => {
|
|
38812
39139
|
const prefix = PREFIX.exec(id2)?.[1];
|
|
38813
39140
|
const found = prefix !== void 0 ? kinds.find((kind) => kind.prefix === prefix) : await (async () => {
|
|
38814
39141
|
const stored = (await store.proposedActions.get(id2)).kind;
|
|
@@ -38840,7 +39167,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38840
39167
|
return { items: page.slice(0, filter.limit), hasMore: page.length > filter.limit };
|
|
38841
39168
|
}, "list"),
|
|
38842
39169
|
get: /* @__PURE__ */ __name(async (id2) => {
|
|
38843
|
-
const kind = await
|
|
39170
|
+
const kind = await kindOf3(id2);
|
|
38844
39171
|
return marked(kind, await kind.get(id2));
|
|
38845
39172
|
}, "get"),
|
|
38846
39173
|
decide: /* @__PURE__ */ __name(async (ids, decision) => {
|
|
@@ -38870,7 +39197,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38870
39197
|
continue;
|
|
38871
39198
|
}
|
|
38872
39199
|
try {
|
|
38873
|
-
const kind = await
|
|
39200
|
+
const kind = await kindOf3(id2);
|
|
38874
39201
|
if (chosen.length && !kind.parts) {
|
|
38875
39202
|
refuseIds(id2, `a ${kind.kind} proposal has no parts; name ${id2} alone`);
|
|
38876
39203
|
continue;
|
|
@@ -38885,9 +39212,9 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38885
39212
|
});
|
|
38886
39213
|
continue;
|
|
38887
39214
|
}
|
|
38888
|
-
const
|
|
38889
|
-
if (
|
|
38890
|
-
refused.push(
|
|
39215
|
+
const refusal3 = mayDecide(row, decision.by, policy);
|
|
39216
|
+
if (refusal3) {
|
|
39217
|
+
refused.push(refusal3);
|
|
38891
39218
|
continue;
|
|
38892
39219
|
}
|
|
38893
39220
|
decided.push(await kind.decide(id2, chosen.length ? { ...decision, parts: chosen } : decision));
|
|
@@ -38909,18 +39236,25 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38909
39236
|
factKind(store),
|
|
38910
39237
|
invoiceKind(store),
|
|
38911
39238
|
paymentKind(store),
|
|
39239
|
+
orderKind(store),
|
|
39240
|
+
contractKind(store),
|
|
39241
|
+
subscriptionKind(store),
|
|
39242
|
+
subscriptionPriceKind(store),
|
|
39243
|
+
transactionKind(store),
|
|
39244
|
+
organizationKind(store),
|
|
38912
39245
|
memoryKind(store),
|
|
38913
39246
|
findingsKind(store),
|
|
38914
39247
|
mailFindingsKind(store),
|
|
38915
39248
|
meetingFindingsKind(store),
|
|
38916
|
-
taskCloseKind(store)
|
|
39249
|
+
taskCloseKind(store),
|
|
39250
|
+
sourceReviewKind(store)
|
|
38917
39251
|
])
|
|
38918
39252
|
registry.register(kind);
|
|
38919
39253
|
registry.register(actionKind(store, registry.claimed));
|
|
38920
39254
|
return registry;
|
|
38921
39255
|
}, "proposalRegistry");
|
|
38922
39256
|
|
|
38923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
38924
39258
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
38925
39259
|
const invalid6 = /* @__PURE__ */ __name((field) => {
|
|
38926
39260
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -38962,7 +39296,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
38962
39296
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
38963
39297
|
}, "storedCandidateRequest");
|
|
38964
39298
|
|
|
38965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
38966
39300
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
38967
39301
|
const fixed = snapshotMeetingScope(scope);
|
|
38968
39302
|
const store = ports?.meetings;
|
|
@@ -39054,7 +39388,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
39054
39388
|
};
|
|
39055
39389
|
}, "createStoredMeetingProjectCandidateReader");
|
|
39056
39390
|
|
|
39057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39058
39392
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39059
39393
|
const pictures = picturesService(deps);
|
|
39060
39394
|
const base = {
|
|
@@ -39096,6 +39430,7 @@ export {
|
|
|
39096
39430
|
syncsOneChat,
|
|
39097
39431
|
throughWrapper,
|
|
39098
39432
|
capability,
|
|
39433
|
+
withTimeLimit,
|
|
39099
39434
|
newSendId,
|
|
39100
39435
|
newOperationId,
|
|
39101
39436
|
batchProgress,
|
|
@@ -39152,6 +39487,9 @@ export {
|
|
|
39152
39487
|
createContextEvidenceReader,
|
|
39153
39488
|
excerpt,
|
|
39154
39489
|
ingest,
|
|
39490
|
+
jsonlLines,
|
|
39491
|
+
ingestLines,
|
|
39492
|
+
ingestVcard,
|
|
39155
39493
|
aliasHits,
|
|
39156
39494
|
chatSenders,
|
|
39157
39495
|
chatTitle,
|
|
@@ -39253,6 +39591,7 @@ export {
|
|
|
39253
39591
|
sendAsCheck,
|
|
39254
39592
|
typedSendAs,
|
|
39255
39593
|
TOTAL_CAP,
|
|
39594
|
+
questionLookup,
|
|
39256
39595
|
THREAD_BOUNDS,
|
|
39257
39596
|
readThreadContext,
|
|
39258
39597
|
MAX_SEARCH_OFFSET,
|
|
@@ -39364,6 +39703,8 @@ export {
|
|
|
39364
39703
|
approveAsTask,
|
|
39365
39704
|
parseProposalIds,
|
|
39366
39705
|
FACT_SUMMARIES,
|
|
39706
|
+
ORGANIZATION_ADD_KIND,
|
|
39707
|
+
ORGANIZATION_RENAME_KIND,
|
|
39367
39708
|
emptyProposalRegistry,
|
|
39368
39709
|
proposalRegistry,
|
|
39369
39710
|
createStoredMeetingProjectCandidateReader,
|