@wirecat/zoom-cli 0.62.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-CGGNBINU.js → all-profiles-W2OVBZ7S.js} +8 -8
- package/dist/bundle/answer-policy-HOA43GNA.js +96 -0
- package/dist/bundle/{anthropic-KVWPIHFG.js → anthropic-P4BKQNBO.js} +4 -4
- package/dist/bundle/{app-server-NKKFBTQN.js → app-server-AYUW45ND.js} +50 -50
- package/dist/bundle/{bun-XRO6XJHQ.js → bun-MNGPTYDQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-FWNCLOAR.js → bun-sqlite-PTPUSXAO.js} +3 -3
- package/dist/bundle/{chunk-ECXRRW7J.js → chunk-23LOMA2I.js} +30 -20
- package/dist/bundle/{chunk-YI6ZNDPC.js → chunk-24WCZURP.js} +2 -2
- package/dist/bundle/{chunk-Q4ZE2LXE.js → chunk-2UONVSJQ.js} +2 -2
- package/dist/bundle/{chunk-7LQLJ7LW.js → chunk-3AAO5N4L.js} +2 -2
- package/dist/bundle/{chunk-TQFCPUIM.js → chunk-3DGQJASQ.js} +1 -1
- package/dist/bundle/{chunk-7CNRZSAV.js → chunk-3IMEAZIM.js} +4 -4
- package/dist/bundle/{chunk-EOEDICIE.js → chunk-4XVRA6P5.js} +1 -1
- package/dist/bundle/{chunk-MLNC5N7H.js → chunk-54UEJGYB.js} +3 -3
- package/dist/bundle/{chunk-4OTXE6CF.js → chunk-5BCNJB2A.js} +72 -57
- package/dist/bundle/{chunk-IK2OSV5C.js → chunk-5FN4Q5H5.js} +6 -6
- package/dist/bundle/{chunk-7AY3ADNV.js → chunk-5YLR24D5.js} +5 -5
- package/dist/bundle/{chunk-EJFSS65P.js → chunk-63MRRNDL.js} +6 -6
- package/dist/bundle/{chunk-SEH7DBAM.js → chunk-6NBQJJT6.js} +7 -7
- package/dist/bundle/{chunk-HIZQYFY3.js → chunk-7D56BQZL.js} +8 -2
- package/dist/bundle/{chunk-UD4FKICZ.js → chunk-7EOW47PV.js} +4 -4
- package/dist/bundle/{chunk-SB47UAW2.js → chunk-7NDSBTKR.js} +26 -26
- package/dist/bundle/{chunk-6R3GMSLR.js → chunk-7SWNZ44U.js} +2 -2
- package/dist/bundle/{chunk-IR73ZZY6.js → chunk-7VJIKJNW.js} +8 -8
- package/dist/bundle/{chunk-4OQVRDTG.js → chunk-A2FOW3ZC.js} +39 -20
- package/dist/bundle/{chunk-YFIUXE25.js → chunk-AAC6VNSL.js} +3 -3
- package/dist/bundle/{chunk-5NLFQ644.js → chunk-AF4HONAZ.js} +443 -370
- package/dist/bundle/{chunk-QLQ7VVLK.js → chunk-BMYZWBAX.js} +4 -4
- package/dist/bundle/{chunk-6URISMGR.js → chunk-BO5YVG3X.js} +26 -26
- package/dist/bundle/{chunk-IOUPXUFH.js → chunk-BWPKSUXW.js} +37 -37
- package/dist/bundle/{chunk-JDJDVYGS.js → chunk-C3RRIJ5C.js} +6 -6
- package/dist/bundle/{chunk-UIPT6IAU.js → chunk-COTC7HF3.js} +1 -1
- package/dist/bundle/{chunk-KMQUZ4YM.js → chunk-CZFV6XTW.js} +3 -3
- package/dist/bundle/{chunk-M6FCCVYZ.js → chunk-CZKV4USJ.js} +16 -3
- package/dist/bundle/{chunk-BPMKLWHV.js → chunk-EQYPTGCT.js} +4 -4
- package/dist/bundle/{chunk-YJN4XYNA.js → chunk-FSYO3PUW.js} +2 -2
- package/dist/bundle/{chunk-N3KQ7XND.js → chunk-H3DMYF3W.js} +2 -2
- package/dist/bundle/{chunk-JBBZCTTF.js → chunk-H5LLZ5XA.js} +1 -1
- package/dist/bundle/{chunk-NQCFUYC2.js → chunk-H65B6A7Y.js} +10 -9
- package/dist/bundle/{chunk-BNTAQADF.js → chunk-HIGFBTEI.js} +12 -3
- package/dist/bundle/{chunk-TZE6WXID.js → chunk-HQHUPTZR.js} +9744 -9580
- package/dist/bundle/{chunk-5MYLM6SU.js → chunk-HQHYPKSU.js} +89 -35
- package/dist/bundle/{chunk-MIUPH3WA.js → chunk-I5QX2HAT.js} +6 -6
- package/dist/bundle/{chunk-CXPHUOJR.js → chunk-IIGXCYEL.js} +26 -13
- package/dist/bundle/{chunk-3YBDRVOG.js → chunk-IIP4J3PD.js} +6 -6
- package/dist/bundle/{chunk-72S5TXFN.js → chunk-J25UNZIL.js} +9 -9
- package/dist/bundle/{chunk-XAXXEZZ5.js → chunk-JJZAGKUK.js} +2 -2
- package/dist/bundle/{chunk-TILW3EJY.js → chunk-JM43EKTY.js} +1258 -562
- package/dist/bundle/{chunk-BJPFWPKH.js → chunk-JMSKDW5G.js} +2 -2
- package/dist/bundle/{chunk-2T7MUSDB.js → chunk-JRPAZ2WD.js} +126 -96
- package/dist/bundle/{chunk-DIXC56OU.js → chunk-JRPYHDCO.js} +4 -4
- package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-JZKNHA44.js} +1 -1
- package/dist/bundle/{chunk-LXYC75D3.js → chunk-K6OSD6DG.js} +150 -134
- package/dist/bundle/{chunk-2DPMYUWQ.js → chunk-KJCCT3QY.js} +10 -10
- package/dist/bundle/{chunk-73BAQ7PH.js → chunk-L4JGVSBN.js} +24 -24
- package/dist/bundle/{chunk-FDCGTODC.js → chunk-LEQCRVPD.js} +1 -1
- package/dist/bundle/{chunk-YF2PT5KA.js → chunk-OPP5CWAX.js} +35 -34
- package/dist/bundle/{chunk-4UUQEQ5D.js → chunk-OWXMQVVN.js} +1 -1
- package/dist/bundle/{chunk-JYVFFUIX.js → chunk-PBJY5VR6.js} +1 -1
- package/dist/bundle/{chunk-M7YNOK4D.js → chunk-Q3EDUZ5R.js} +10 -10
- package/dist/bundle/{chunk-QUWMFBMS.js → chunk-QK54GOGE.js} +49 -9
- package/dist/bundle/{chunk-6SK5SHCR.js → chunk-R4NTPYXZ.js} +2 -2
- package/dist/bundle/{chunk-GOESXUJQ.js → chunk-RJLNVHIU.js} +3 -3
- package/dist/bundle/{chunk-EG7HC4EC.js → chunk-RK3JBC4U.js} +2 -2
- package/dist/bundle/{chunk-D6FTCPXA.js → chunk-SJIBJQJN.js} +10 -9
- package/dist/bundle/{chunk-2NAM2XQG.js → chunk-SMT6SFBK.js} +2 -2
- package/dist/bundle/{chunk-2LLNPNMB.js → chunk-TJH5IQVZ.js} +1 -1
- package/dist/bundle/{chunk-SPJJCD2A.js → chunk-TJODNJKE.js} +13 -13
- package/dist/bundle/{chunk-RWG44LQD.js → chunk-TYKZCJD7.js} +4 -4
- package/dist/bundle/{chunk-IOCS5FXW.js → chunk-UABUBDYB.js} +2 -2
- package/dist/bundle/{chunk-FAOLCUKV.js → chunk-UCPL55YP.js} +17 -17
- package/dist/bundle/{chunk-6SPWQCJF.js → chunk-UFI5SX3F.js} +11 -11
- package/dist/bundle/{chunk-5LMQTEU5.js → chunk-UNO4G5NX.js} +5 -5
- package/dist/bundle/{chunk-URJZK4GX.js → chunk-WFIJOFS5.js} +1 -1
- package/dist/bundle/{chunk-MI3JK6MW.js → chunk-X6M5DK66.js} +10 -10
- package/dist/bundle/{chunk-YBMOFCY5.js → chunk-XZSQLVED.js} +2 -2
- package/dist/bundle/{chunk-M2WQWF3I.js → chunk-Y7TWNMTW.js} +48 -48
- package/dist/bundle/{chunk-AMIIU3UZ.js → chunk-YNYMWXXH.js} +4 -4
- package/dist/bundle/{chunk-VFJ3MOIR.js → chunk-ZW4N73FO.js} +3 -3
- package/dist/bundle/{cli-AHPIESAC.js → cli-Y2ZO3D5U.js} +73 -55
- package/dist/bundle/command-contract-DGTZIH2F.js +38 -0
- package/dist/bundle/config-N2UHDKGG.js +78 -0
- package/dist/bundle/{decode-ZU7WLMMV.js → decode-GO6GAYH2.js} +3 -3
- package/dist/bundle/{dist-LTS7VI3S.js → dist-MIJKAGXW.js} +14 -14
- package/dist/bundle/{echarts-YNGCOYHW.js → echarts-NWK7LALR.js} +2 -2
- package/dist/bundle/{embed-VWWOW7PP.js → embed-2DOSN4DV.js} +4 -4
- package/dist/bundle/{embedder-T5GJC7M2.js → embedder-3Q3C2WKC.js} +7 -7
- package/dist/bundle/{first-run-PX3SHPUU.js → first-run-S75VKIT3.js} +8 -8
- package/dist/bundle/first-screen-DQNRT6GH.js +36 -0
- package/dist/bundle/{folders-VXMDFC2D.js → folders-RSWEBHDZ.js} +2 -2
- package/dist/bundle/{instructions-GJHHFV64.js → instructions-M3FZPQVI.js} +1 -1
- package/dist/bundle/{main-IYCD6MBH.js → main-R77BPRRS.js} +16 -16
- package/dist/bundle/{mcp-EMNFFY4N.js → mcp-YJEQYYTR.js} +2 -2
- package/dist/bundle/{meetings-GHYNIOHG.js → meetings-IV4Y4WRH.js} +4 -4
- package/dist/bundle/{node-GFOH6FKP.js → node-I3GEHYGL.js} +2 -2
- package/dist/bundle/{node-sqlite-QXKSPHTP.js → node-sqlite-W6MR2TVQ.js} +3 -3
- package/dist/bundle/{oauth-A6I2OMDD.js → oauth-M6YL4QXP.js} +5 -5
- package/dist/bundle/{open-TQKCU447.js → open-2VITLJAN.js} +2 -2
- package/dist/bundle/{openai-XE3BJXOI.js → openai-OG6B3JCU.js} +9 -9
- package/dist/bundle/{output-file-FQNFCUKE.js → output-file-XJJ3XMLQ.js} +3 -3
- package/dist/bundle/{process-XVDX4SPD.js → process-UBA4L4B2.js} +1 -1
- package/dist/bundle/{program-UYK4AD2W.js → program-5R5MRXUM.js} +70 -69
- package/dist/bundle/{prompt-ISYG5RWM.js → prompt-AVIXIM7Z.js} +3 -3
- package/dist/bundle/{recognize-KENPECLZ.js → recognize-DJKTJOYU.js} +2 -2
- package/dist/bundle/{remote-ZP5XTDCC.js → remote-S3DTNYRP.js} +5 -5
- package/dist/bundle/{rerank-SG653RHT.js → rerank-FMCDP6VF.js} +5 -5
- package/dist/bundle/{run-log-HYKGQ42E.js → run-log-T4MV2VEH.js} +53 -53
- package/dist/bundle/{serve-6UJCZD7Z.js → serve-5SGFJFMC.js} +7 -7
- package/dist/bundle/server-EYGZLKKQ.js +66 -0
- package/dist/bundle/{server-ZAYEDPFR.js → server-PCMCY7WK.js} +42 -42
- package/dist/bundle/{services-KMH7XZPY.js → services-SKRQ2POT.js} +27 -27
- package/dist/bundle/{speech-LINBLG5E.js → speech-FSDICIKO.js} +11 -11
- package/dist/bundle/{state-4RKZNHE7.js → state-KPUSPWO6.js} +4 -4
- package/dist/bundle/{store-253N7NUC.js → store-7MP2ZGQ7.js} +34 -16
- package/dist/bundle/{store-JTBHRQZK.js → store-W7LFPKG2.js} +15 -13
- package/dist/bundle/store-connection-3HNZFJC4.js +76 -0
- package/dist/bundle/store-maintenance-command-6WBLTUZP.js +55 -0
- package/dist/bundle/{streaming-YW64OKKQ.js → streaming-Q44ESD3E.js} +4 -4
- package/dist/bundle/{tokens-DPBC2P3I.js → tokens-TAFCHANI.js} +4 -4
- package/dist/bundle/zm.js +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -0
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/answer-policy-D46SGQ35.js +0 -96
- package/dist/bundle/command-contract-HVLI3OKU.js +0 -38
- package/dist/bundle/config-UW6W34I2.js +0 -78
- package/dist/bundle/first-screen-RAPEZG57.js +0 -36
- package/dist/bundle/server-AXE37E6Q.js +0 -66
- package/dist/bundle/store-connection-PWLUMCP7.js +0 -76
- package/dist/bundle/store-maintenance-command-XRNECVDU.js +0 -55
- /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-WJWLHLQ7.js} +0 -0
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
acquireLock,
|
|
5
5
|
openOrdinaryFile,
|
|
6
6
|
readBoundedUtf8File,
|
|
7
|
+
safeName,
|
|
7
8
|
sameOrdinaryFile,
|
|
8
9
|
syncDirectory,
|
|
9
10
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IIGXCYEL.js";
|
|
11
12
|
import {
|
|
12
13
|
DEFAULT_IMAGE_MODEL,
|
|
13
14
|
DEFAULT_RERANK_MODEL,
|
|
@@ -34,14 +35,14 @@ import {
|
|
|
34
35
|
typedCommand,
|
|
35
36
|
vectorModelKey,
|
|
36
37
|
withAttempt
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-A2FOW3ZC.js";
|
|
38
39
|
import {
|
|
39
40
|
isCliFailure
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3AAO5N4L.js";
|
|
41
42
|
import {
|
|
42
43
|
isNewer,
|
|
43
44
|
updateCommand
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3IMEAZIM.js";
|
|
45
46
|
import {
|
|
46
47
|
MAX_ACTIONS,
|
|
47
48
|
ModerationRules,
|
|
@@ -57,16 +58,16 @@ import {
|
|
|
57
58
|
someUndone,
|
|
58
59
|
validateFormattedText,
|
|
59
60
|
visibleFormattedText
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-IIP4J3PD.js";
|
|
61
62
|
import {
|
|
62
63
|
MAX_MODEL_IMAGE_BYTES
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-SMT6SFBK.js";
|
|
64
65
|
import {
|
|
65
66
|
OPENAI_URL,
|
|
66
67
|
openRemote,
|
|
67
68
|
remoteKey,
|
|
68
69
|
remoteModel
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-CZFV6XTW.js";
|
|
70
71
|
import {
|
|
71
72
|
Unzip,
|
|
72
73
|
UnzipInflate,
|
|
@@ -77,11 +78,11 @@ import {
|
|
|
77
78
|
placedText,
|
|
78
79
|
runEmbedders,
|
|
79
80
|
textModelsDirectory
|
|
80
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-63MRRNDL.js";
|
|
81
82
|
import {
|
|
82
83
|
installFiles,
|
|
83
84
|
megabytes
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-EQYPTGCT.js";
|
|
85
86
|
import {
|
|
86
87
|
AGENDA_COLUMNS,
|
|
87
88
|
CHAT_COLUMNS,
|
|
@@ -124,6 +125,7 @@ import {
|
|
|
124
125
|
hasStems,
|
|
125
126
|
hasText,
|
|
126
127
|
historyStartKey,
|
|
128
|
+
hitFiles,
|
|
127
129
|
inSource,
|
|
128
130
|
inboxKey,
|
|
129
131
|
isAccountList,
|
|
@@ -139,23 +141,24 @@ import {
|
|
|
139
141
|
threadConversation,
|
|
140
142
|
validateAst,
|
|
141
143
|
validateFields
|
|
142
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-JM43EKTY.js";
|
|
143
145
|
import {
|
|
144
146
|
TASK_KINDS,
|
|
145
147
|
TASK_ORIGINS,
|
|
146
148
|
TASK_STATES,
|
|
147
|
-
createTaskService
|
|
148
|
-
|
|
149
|
+
createTaskService,
|
|
150
|
+
isClosedState
|
|
151
|
+
} from "./chunk-QK54GOGE.js";
|
|
149
152
|
import {
|
|
150
153
|
DEFAULT_STEMMERS,
|
|
151
154
|
createStemmer,
|
|
152
155
|
fold,
|
|
153
156
|
normalize
|
|
154
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-7VJIKJNW.js";
|
|
155
158
|
import {
|
|
156
159
|
DEFAULT_TASK_CATEGORIES,
|
|
157
160
|
FALLBACK_CATEGORY
|
|
158
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-UNO4G5NX.js";
|
|
159
162
|
import {
|
|
160
163
|
COUNTER_FIELDS,
|
|
161
164
|
INTERNAL_NOTES,
|
|
@@ -174,14 +177,14 @@ import {
|
|
|
174
177
|
parseReference,
|
|
175
178
|
providerNamed,
|
|
176
179
|
rankingOptions
|
|
177
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-I5QX2HAT.js";
|
|
178
181
|
import {
|
|
179
182
|
normalizeTag
|
|
180
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-XZSQLVED.js";
|
|
181
184
|
import {
|
|
182
185
|
storePath,
|
|
183
186
|
wirecatDirectory
|
|
184
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-RK3JBC4U.js";
|
|
185
188
|
import {
|
|
186
189
|
MEETING_FINDINGS_KIND,
|
|
187
190
|
canonicalMeetingReference,
|
|
@@ -199,7 +202,7 @@ import {
|
|
|
199
202
|
validateMeetingHitSearch,
|
|
200
203
|
validateMeetingPassage,
|
|
201
204
|
validateMeetingSeriesHistory
|
|
202
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-5BCNJB2A.js";
|
|
203
206
|
import {
|
|
204
207
|
dateRange,
|
|
205
208
|
implicitTextTerms,
|
|
@@ -209,7 +212,7 @@ import {
|
|
|
209
212
|
timezoneOf,
|
|
210
213
|
validateQuery,
|
|
211
214
|
walkQuery
|
|
212
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-SJIBJQJN.js";
|
|
213
216
|
import {
|
|
214
217
|
CliError,
|
|
215
218
|
array,
|
|
@@ -227,7 +230,7 @@ import {
|
|
|
227
230
|
singleLine,
|
|
228
231
|
strictObject,
|
|
229
232
|
string
|
|
230
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-7NDSBTKR.js";
|
|
231
234
|
import {
|
|
232
235
|
importFrom,
|
|
233
236
|
resolveFrom
|
|
@@ -16847,7 +16850,7 @@ var require_lib3 = __commonJS({
|
|
|
16847
16850
|
}
|
|
16848
16851
|
});
|
|
16849
16852
|
|
|
16850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
16851
16854
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
16852
16855
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
16853
16856
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -16882,7 +16885,7 @@ var storeIfOpen = /* @__PURE__ */ __name(async (deps) => {
|
|
|
16882
16885
|
var fromStore = /* @__PURE__ */ __name((deps) => deps.offline || deps.reads === "store", "fromStore");
|
|
16883
16886
|
var nothingStored = /* @__PURE__ */ __name((messenger) => `nothing stored for this chat yet \u2014 keep \`${typedCommand(messenger.app.command, "serve")}\` running`, "nothingStored");
|
|
16884
16887
|
var PUSHED = "this messenger's history is read from the local store";
|
|
16885
|
-
var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context`, `contacts list|show` and `review`";
|
|
16888
|
+
var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context|download`, `contacts list|show` and `review`";
|
|
16886
16889
|
var onlineDeps = /* @__PURE__ */ __name((messenger, adapter, guard, where = {}) => ({
|
|
16887
16890
|
messenger,
|
|
16888
16891
|
...where,
|
|
@@ -16925,7 +16928,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
16925
16928
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
16926
16929
|
}, "storeOnlyDeps");
|
|
16927
16930
|
|
|
16928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
16929
16932
|
var DAY_MS = 864e5;
|
|
16930
16933
|
var NEW_DAYS = 30;
|
|
16931
16934
|
var SAME_TEXT_MIN = 20;
|
|
@@ -17002,7 +17005,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17002
17005
|
};
|
|
17003
17006
|
}, "scorePerson");
|
|
17004
17007
|
|
|
17005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
17006
17009
|
var REGISTRIES = {
|
|
17007
17010
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
17008
17011
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -17087,7 +17090,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
17087
17090
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
17088
17091
|
})), "notCovered");
|
|
17089
17092
|
|
|
17090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
17091
17094
|
var ACTIVITY_MESSAGES = 1e3;
|
|
17092
17095
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
17093
17096
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -17175,7 +17178,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
17175
17178
|
};
|
|
17176
17179
|
}, "botCheckService");
|
|
17177
17180
|
|
|
17178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
17179
17182
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
17180
17183
|
const ids = [...new Set(chatIds)];
|
|
17181
17184
|
if (ids.length === 0)
|
|
@@ -17201,7 +17204,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
17201
17204
|
}));
|
|
17202
17205
|
}, "chatCoverage");
|
|
17203
17206
|
|
|
17204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
17205
17208
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
17206
17209
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
17207
17210
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -17265,7 +17268,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
17265
17268
|
}
|
|
17266
17269
|
}, "validateContextEvidencePage");
|
|
17267
17270
|
|
|
17268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
17269
17272
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
17270
17273
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
17271
17274
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -17318,7 +17321,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
17318
17321
|
};
|
|
17319
17322
|
}, "contextReadBudget");
|
|
17320
17323
|
|
|
17321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
17322
17325
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
17323
17326
|
if (!port || typeof port.read !== "function")
|
|
17324
17327
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -17362,7 +17365,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
17362
17365
|
};
|
|
17363
17366
|
}, "createContextEvidenceReader");
|
|
17364
17367
|
|
|
17365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
17366
17369
|
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");
|
|
17367
17370
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
17368
17371
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -17378,18 +17381,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
17378
17381
|
}, "excerpt");
|
|
17379
17382
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
17380
17383
|
|
|
17381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
17382
17385
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
17383
17386
|
|
|
17384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
17385
17388
|
import { lstat } from "node:fs/promises";
|
|
17386
17389
|
|
|
17387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
17388
17391
|
import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
|
|
17389
17392
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
17390
17393
|
import { join as join2 } from "node:path";
|
|
17391
17394
|
|
|
17392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
17393
17396
|
import { createHash } from "node:crypto";
|
|
17394
17397
|
var metadataLimit = 16384;
|
|
17395
17398
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -17449,7 +17452,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
17449
17452
|
}
|
|
17450
17453
|
}, "readPartialMetadata");
|
|
17451
17454
|
|
|
17452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
17453
17456
|
import { randomUUID } from "node:crypto";
|
|
17454
17457
|
import { open, rename, unlink } from "node:fs/promises";
|
|
17455
17458
|
import { join } from "node:path";
|
|
@@ -17541,7 +17544,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
17541
17544
|
};
|
|
17542
17545
|
}, "partialWriter");
|
|
17543
17546
|
|
|
17544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
17545
17548
|
var NativeRecordingPartialStore = class {
|
|
17546
17549
|
static {
|
|
17547
17550
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -17648,12 +17651,12 @@ var NativeRecordingPartialStore = class {
|
|
|
17648
17651
|
}
|
|
17649
17652
|
};
|
|
17650
17653
|
|
|
17651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
17652
17655
|
import { createHash as createHash3 } from "node:crypto";
|
|
17653
17656
|
import { link } from "node:fs/promises";
|
|
17654
17657
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
17655
17658
|
|
|
17656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
17657
17660
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
17658
17661
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
17659
17662
|
signal?.throwIfAborted();
|
|
@@ -17688,7 +17691,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
17688
17691
|
signal?.throwIfAborted();
|
|
17689
17692
|
}, "commitPublication");
|
|
17690
17693
|
|
|
17691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
17692
17695
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
17693
17696
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
17694
17697
|
import { join as join3 } from "node:path";
|
|
@@ -17761,7 +17764,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
17761
17764
|
}
|
|
17762
17765
|
}, "writePublicationJournal");
|
|
17763
17766
|
|
|
17764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
17765
17768
|
var NativeRecordingPublication = class {
|
|
17766
17769
|
static {
|
|
17767
17770
|
__name(this, "NativeRecordingPublication");
|
|
@@ -17834,7 +17837,7 @@ var NativeRecordingPublication = class {
|
|
|
17834
17837
|
}
|
|
17835
17838
|
};
|
|
17836
17839
|
|
|
17837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
17838
17841
|
import { createHash as createHash4 } from "node:crypto";
|
|
17839
17842
|
import { readdir } from "node:fs/promises";
|
|
17840
17843
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -17921,7 +17924,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
17921
17924
|
beforePublish
|
|
17922
17925
|
}), "commitMediaEntry");
|
|
17923
17926
|
|
|
17924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
17925
17928
|
var validator = '"media-completed-v1"';
|
|
17926
17929
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
17927
17930
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -18022,7 +18025,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
18022
18025
|
return entry;
|
|
18023
18026
|
}, "archiveMediaFile");
|
|
18024
18027
|
|
|
18025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
18026
18029
|
import { mkdir, realpath } from "node:fs/promises";
|
|
18027
18030
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
18028
18031
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -18089,7 +18092,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
18089
18092
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
18090
18093
|
}, "withMediaArchiveLocks");
|
|
18091
18094
|
|
|
18092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
18093
18096
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
18094
18097
|
if (value === void 0)
|
|
18095
18098
|
return void 0;
|
|
@@ -18242,7 +18245,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
18242
18245
|
}, { create: true });
|
|
18243
18246
|
}, "archiveMedia");
|
|
18244
18247
|
|
|
18245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
18246
18249
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
18247
18250
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
18248
18251
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -18395,7 +18398,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
18395
18398
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
18396
18399
|
}, "moveMediaArchive");
|
|
18397
18400
|
|
|
18398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
18399
18402
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
18400
18403
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
18401
18404
|
}, "progress") }) => {
|
|
@@ -18418,7 +18421,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
18418
18421
|
}
|
|
18419
18422
|
await nativeRuntime({ env, progress });
|
|
18420
18423
|
progress(`${model.id}: loading it once to check it works`);
|
|
18421
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
18424
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-2DOSN4DV.js");
|
|
18422
18425
|
const embedder = await openEmbedder2(model, directory2);
|
|
18423
18426
|
try {
|
|
18424
18427
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -18439,7 +18442,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
18439
18442
|
}
|
|
18440
18443
|
await nativeRuntime({ env, progress });
|
|
18441
18444
|
progress(`${model.id}: loading it once to check it works`);
|
|
18442
|
-
const { openReranker } = await import("./rerank-
|
|
18445
|
+
const { openReranker } = await import("./rerank-FMCDP6VF.js");
|
|
18443
18446
|
const reranker = await openReranker(model, directory2);
|
|
18444
18447
|
try {
|
|
18445
18448
|
await reranker.score("check", ["check"]);
|
|
@@ -18457,7 +18460,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
18457
18460
|
await installFiles(placedImage(model, directory2), { progress });
|
|
18458
18461
|
}
|
|
18459
18462
|
progress(`${model.id}: loading it once to check it works`);
|
|
18460
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
18463
|
+
const { openPictureEmbedder } = await import("./embedder-3Q3C2WKC.js");
|
|
18461
18464
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
18462
18465
|
try {
|
|
18463
18466
|
const vector = await embedder.embedQuery("check");
|
|
@@ -18469,7 +18472,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
18469
18472
|
return { model, directory: directory2 };
|
|
18470
18473
|
}, "downloadImageModel");
|
|
18471
18474
|
|
|
18472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
18473
18476
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
18474
18477
|
async around(ref, window2) {
|
|
18475
18478
|
const at = parseLocator(ref);
|
|
@@ -18565,7 +18568,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
18565
18568
|
};
|
|
18566
18569
|
}, "storedNeighbours");
|
|
18567
18570
|
|
|
18568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
18569
18572
|
import { createHash as createHash5 } from "node:crypto";
|
|
18570
18573
|
var DAY = 864e5;
|
|
18571
18574
|
var MAX_TIME = 864e13;
|
|
@@ -18881,7 +18884,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
18881
18884
|
return value;
|
|
18882
18885
|
}, "decodeCheckpoint");
|
|
18883
18886
|
|
|
18884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
18885
18888
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
18886
18889
|
var PAGE = 20;
|
|
18887
18890
|
var PEOPLE = 20;
|
|
@@ -19285,7 +19288,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
19285
19288
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
19286
19289
|
}, "peopleOf");
|
|
19287
19290
|
|
|
19288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
19289
19292
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
19290
19293
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
19291
19294
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -19350,7 +19353,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
19350
19353
|
omittedMatches: omitted
|
|
19351
19354
|
})), "matchProjectCandidates");
|
|
19352
19355
|
|
|
19353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
19354
19357
|
var KINDS = ["project", "tag", "topic"];
|
|
19355
19358
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
19356
19359
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -19405,7 +19408,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
19405
19408
|
};
|
|
19406
19409
|
}, "findEvidenceMentions");
|
|
19407
19410
|
|
|
19408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
19409
19412
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
19410
19413
|
var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
|
|
19411
19414
|
if (PROJECT_ID.test(reference)) {
|
|
@@ -19571,7 +19574,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
19571
19574
|
return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
|
|
19572
19575
|
}, "gatherStoredProject");
|
|
19573
19576
|
|
|
19574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
19575
19578
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
19576
19579
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
19577
19580
|
if (key in own)
|
|
@@ -19588,12 +19591,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
19588
19591
|
return found.bind(adapter);
|
|
19589
19592
|
}, "capability");
|
|
19590
19593
|
|
|
19591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
19592
19595
|
import { randomBytes } from "node:crypto";
|
|
19593
19596
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
19594
19597
|
var newOperationId = newSendId;
|
|
19595
19598
|
|
|
19596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
19597
19600
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
19598
19601
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
19599
19602
|
if (deps.offline)
|
|
@@ -19665,7 +19668,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
19665
19668
|
};
|
|
19666
19669
|
}, "accountService");
|
|
19667
19670
|
|
|
19668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
19669
19672
|
var MINUTE = 6e4;
|
|
19670
19673
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
19671
19674
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -19684,7 +19687,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
19684
19687
|
return new Date(at - at % MINUTE).toISOString();
|
|
19685
19688
|
}, "sendTime");
|
|
19686
19689
|
|
|
19687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
19688
19691
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
19689
19692
|
try {
|
|
19690
19693
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -19931,10 +19934,10 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
19931
19934
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
19932
19935
|
}, "linkLimits");
|
|
19933
19936
|
|
|
19934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
19935
19938
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
19936
19939
|
|
|
19937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
19938
19941
|
var THREADS_PAGE = 500;
|
|
19939
19942
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
19940
19943
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -20013,7 +20016,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
20013
20016
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
20014
20017
|
}, "readMail");
|
|
20015
20018
|
|
|
20016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
20017
20020
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
20018
20021
|
if (deps.reads !== "store")
|
|
20019
20022
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -20160,7 +20163,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
20160
20163
|
}
|
|
20161
20164
|
}, "senderAmong");
|
|
20162
20165
|
|
|
20163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
20164
20167
|
var NO_MAIL = "no_mail";
|
|
20165
20168
|
var MAIL = "email";
|
|
20166
20169
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -20207,7 +20210,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
20207
20210
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
20208
20211
|
}, "accountsOfKind");
|
|
20209
20212
|
|
|
20210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
20211
20214
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
20212
20215
|
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");
|
|
20213
20216
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -20555,7 +20558,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
20555
20558
|
};
|
|
20556
20559
|
}, "statsLucene");
|
|
20557
20560
|
|
|
20558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
20559
20562
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
20560
20563
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
20561
20564
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -20595,7 +20598,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
20595
20598
|
};
|
|
20596
20599
|
}, "dateWindow");
|
|
20597
20600
|
|
|
20598
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
20599
20602
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
20600
20603
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
20601
20604
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -20764,7 +20767,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20764
20767
|
};
|
|
20765
20768
|
}, "readRankingSelection");
|
|
20766
20769
|
|
|
20767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
20768
20771
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
|
|
20769
20772
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
20770
20773
|
command,
|
|
@@ -20774,7 +20777,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
20774
20777
|
fieldsVersion: FIELD_VERSION
|
|
20775
20778
|
}), "searchRecordOf");
|
|
20776
20779
|
|
|
20777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
20778
20781
|
function invalid2(message) {
|
|
20779
20782
|
throw new CliError("validation_error", message);
|
|
20780
20783
|
}
|
|
@@ -21068,7 +21071,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
21068
21071
|
}, "evidence")
|
|
21069
21072
|
}), "adminStatisticsService");
|
|
21070
21073
|
|
|
21071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
21072
21075
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
21073
21076
|
if (value === void 0)
|
|
21074
21077
|
return void 0;
|
|
@@ -21078,7 +21081,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
21078
21081
|
return id2;
|
|
21079
21082
|
}, "threadIdOf");
|
|
21080
21083
|
|
|
21081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
21082
21085
|
var LINKS = /https?:\/\/\S+/g;
|
|
21083
21086
|
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");
|
|
21084
21087
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -21105,7 +21108,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
21105
21108
|
});
|
|
21106
21109
|
}, "questions");
|
|
21107
21110
|
|
|
21108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
21109
21112
|
var TOP_POSTS = 5;
|
|
21110
21113
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
21111
21114
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -21222,7 +21225,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
21222
21225
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
21223
21226
|
}, "median");
|
|
21224
21227
|
|
|
21225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
21226
21229
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
21227
21230
|
const events = [];
|
|
21228
21231
|
for (const stay of stays) {
|
|
@@ -21254,7 +21257,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
21254
21257
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
21255
21258
|
}, "memberEvents");
|
|
21256
21259
|
|
|
21257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
21258
21261
|
var AUDIT_PAGE = 200;
|
|
21259
21262
|
var AUDIT_BUDGET = 10;
|
|
21260
21263
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -21334,7 +21337,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
21334
21337
|
return found;
|
|
21335
21338
|
}, "burstJoins");
|
|
21336
21339
|
|
|
21337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
21338
21341
|
var EVENTS_DAYS = 7;
|
|
21339
21342
|
var TRACKED_DAYS = 30;
|
|
21340
21343
|
var STATS_PAGE = 1e3;
|
|
@@ -21629,7 +21632,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
21629
21632
|
return members.length === 0 ? null : members;
|
|
21630
21633
|
}, "storedMembers");
|
|
21631
21634
|
|
|
21632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
21633
21636
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
21634
21637
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
21635
21638
|
const name = typed.trim().toLowerCase();
|
|
@@ -21679,7 +21682,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
21679
21682
|
return best.name;
|
|
21680
21683
|
}, "categorize");
|
|
21681
21684
|
|
|
21682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
21683
21686
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
21684
21687
|
var RULES_IN = {
|
|
21685
21688
|
dialog: "all",
|
|
@@ -21721,7 +21724,7 @@ var applyTaskRules = /* @__PURE__ */ __name(async (review, { store, account: acc
|
|
|
21721
21724
|
}, "open");
|
|
21722
21725
|
const close = /* @__PURE__ */ __name(async (message, kind, answer) => {
|
|
21723
21726
|
for (const task2 of await store.findBySource(owner, sourceOf2(message))) {
|
|
21724
|
-
if (task2.kind !== kind || task2.state
|
|
21727
|
+
if (task2.kind !== kind || isClosedState(task2.state))
|
|
21725
21728
|
continue;
|
|
21726
21729
|
result.closed += 1;
|
|
21727
21730
|
if (dryRun)
|
|
@@ -21885,7 +21888,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
21885
21888
|
return passes;
|
|
21886
21889
|
}, "applyTaskRulesToChats");
|
|
21887
21890
|
|
|
21888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
21889
21892
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
21890
21893
|
const tags = /* @__PURE__ */ new Map();
|
|
21891
21894
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -21894,7 +21897,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
21894
21897
|
return tags;
|
|
21895
21898
|
}, "taskTagFilters");
|
|
21896
21899
|
|
|
21897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
21898
21901
|
var DAY2 = 864e5;
|
|
21899
21902
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
21900
21903
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -22136,10 +22139,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
22136
22139
|
};
|
|
22137
22140
|
}, "agendaItem");
|
|
22138
22141
|
|
|
22139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
22140
22143
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
22141
22144
|
|
|
22142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
22143
22146
|
var REQUEST_MS = 400;
|
|
22144
22147
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
22145
22148
|
const lowest = ranges[0];
|
|
@@ -22162,13 +22165,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
22162
22165
|
};
|
|
22163
22166
|
}, "estimateBackfill");
|
|
22164
22167
|
|
|
22165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
22166
22169
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
22167
22170
|
...error,
|
|
22168
22171
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
22169
22172
|
}), "withRecovery");
|
|
22170
22173
|
|
|
22171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
22172
22175
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
22173
22176
|
if (isCliFailure(error))
|
|
22174
22177
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -22251,7 +22254,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
22251
22254
|
};
|
|
22252
22255
|
}, "mergeBatches");
|
|
22253
22256
|
|
|
22254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
22255
22258
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
22256
22259
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
22257
22260
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -22274,7 +22277,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
22274
22277
|
}
|
|
22275
22278
|
}, "patiently");
|
|
22276
22279
|
|
|
22277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
22278
22281
|
var RULES_VERSION = 5;
|
|
22279
22282
|
var LOOK_BACK = 50;
|
|
22280
22283
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -22364,7 +22367,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
22364
22367
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
22365
22368
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
22366
22369
|
|
|
22367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
22368
22371
|
var CONTEXT_MESSAGES = 3;
|
|
22369
22372
|
var CONTEXT_MINUTES = 10;
|
|
22370
22373
|
var MAX_CHARS = 1200;
|
|
@@ -22388,12 +22391,12 @@ var context = {
|
|
|
22388
22391
|
}, "describe")
|
|
22389
22392
|
};
|
|
22390
22393
|
|
|
22391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
22392
22395
|
var BUILT_INS = [context];
|
|
22393
22396
|
var providers = [...BUILT_INS];
|
|
22394
22397
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
22395
22398
|
|
|
22396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
22397
22400
|
var READ_PAGE = 5e3;
|
|
22398
22401
|
var CHAIN = 50;
|
|
22399
22402
|
var CONVERSATION_QUERY = {
|
|
@@ -22545,7 +22548,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
22545
22548
|
return size4;
|
|
22546
22549
|
}, "sized");
|
|
22547
22550
|
|
|
22548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
22549
22552
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
22550
22553
|
var MESSAGE_PAGE = 5e3;
|
|
22551
22554
|
var PER_SESSION = 8;
|
|
@@ -22564,7 +22567,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
22564
22567
|
price: remote.price,
|
|
22565
22568
|
installed: true,
|
|
22566
22569
|
perBatch: PER_REQUEST * concurrency,
|
|
22567
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
22570
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-S3DTNYRP.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
22568
22571
|
};
|
|
22569
22572
|
}
|
|
22570
22573
|
const model = textModel(choice);
|
|
@@ -22581,7 +22584,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
22581
22584
|
if (!isTextModelInstalled(model, directory2))
|
|
22582
22585
|
throw notDownloaded(model.id);
|
|
22583
22586
|
if (apart) {
|
|
22584
|
-
const { openProcess } = await import("./process-
|
|
22587
|
+
const { openProcess } = await import("./process-UBA4L4B2.js");
|
|
22585
22588
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
22586
22589
|
}
|
|
22587
22590
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -22870,7 +22873,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
22870
22873
|
return { ...one, state };
|
|
22871
22874
|
}, "shaped");
|
|
22872
22875
|
|
|
22873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
22874
22877
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
22875
22878
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
22876
22879
|
for (const [key, value, maximum] of [
|
|
@@ -22923,7 +22926,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
22923
22926
|
}
|
|
22924
22927
|
}, "catchUpSearch");
|
|
22925
22928
|
|
|
22926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
22927
22930
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
22928
22931
|
if (deps.reads === "store") {
|
|
22929
22932
|
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`);
|
|
@@ -23195,7 +23198,7 @@ var fetchInto = /* @__PURE__ */ __name(async ({ history, store, account: account
|
|
|
23195
23198
|
}
|
|
23196
23199
|
const boundary = window2 === void 0 ? held.from : low;
|
|
23197
23200
|
before2 = byTime ? new Date(boundary + (fresh > 0 && !(window2 && fetching.beforeInclusive) ? 1 : 0)).toISOString() : String(boundary);
|
|
23198
|
-
note(`${fetched} messages so far, back to ${
|
|
23201
|
+
note(`${fetched} messages so far, back to ${fromAt.slice(0, 10)}`);
|
|
23199
23202
|
const wait = fetching.jitter ? pauseMs * (1 + Math.random()) : pauseMs;
|
|
23200
23203
|
await sleep3(wait, void 0, { signal: stop }).catch(() => {
|
|
23201
23204
|
});
|
|
@@ -23244,7 +23247,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
23244
23247
|
return message?.timestamp ?? fallback;
|
|
23245
23248
|
}, "timeOfKey");
|
|
23246
23249
|
|
|
23247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
23248
23251
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
23249
23252
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
23250
23253
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -23381,16 +23384,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
23381
23384
|
return { plan, repair };
|
|
23382
23385
|
}, "gapsService");
|
|
23383
23386
|
|
|
23384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
23385
23388
|
import { createHash as createHash8 } from "node:crypto";
|
|
23386
|
-
import { constants as constants2 } from "node:fs";
|
|
23387
|
-
import { open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
23389
|
+
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
23390
|
+
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
23388
23391
|
|
|
23389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
23390
23393
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
23391
23394
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
23392
23395
|
|
|
23393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
23394
23397
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
23395
23398
|
import { open as open4, stat } from "node:fs/promises";
|
|
23396
23399
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -23592,7 +23595,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
23592
23595
|
return { name, source };
|
|
23593
23596
|
}, "readStickerFile");
|
|
23594
23597
|
|
|
23595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
23596
23599
|
var MAX_FILES = 1e4;
|
|
23597
23600
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
23598
23601
|
if (refusedPlace(directory2, app, env))
|
|
@@ -23661,15 +23664,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
23661
23664
|
return choices;
|
|
23662
23665
|
}, "directoryPaths");
|
|
23663
23666
|
|
|
23664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
23665
23668
|
import { posix } from "node:path";
|
|
23666
23669
|
|
|
23667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
23668
23671
|
import { setImmediate as tick } from "node:timers/promises";
|
|
23669
23672
|
import { crc32 } from "node:zlib";
|
|
23670
23673
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
23671
23674
|
|
|
23672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
23673
23676
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
23674
23677
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
23675
23678
|
var SAMPLE = 65536;
|
|
@@ -23771,7 +23774,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
23771
23774
|
return result.text;
|
|
23772
23775
|
}, "decodeXml");
|
|
23773
23776
|
|
|
23774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
23775
23778
|
var MAX_PART = 10 * 1024 * 1024;
|
|
23776
23779
|
var MAX_ENTRIES = 1e3;
|
|
23777
23780
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -23784,7 +23787,7 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
23784
23787
|
if (signal?.aborted)
|
|
23785
23788
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
23786
23789
|
}, "cancelled");
|
|
23787
|
-
var
|
|
23790
|
+
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character) => character.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
23788
23791
|
var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
23789
23792
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
23790
23793
|
let end = -1;
|
|
@@ -23819,7 +23822,7 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
23819
23822
|
if (next > stop)
|
|
23820
23823
|
throw new Error("invalid_zip");
|
|
23821
23824
|
const name = decoder.decode(bytes2.subarray(offset + 46, offset + 46 + length));
|
|
23822
|
-
if (!
|
|
23825
|
+
if (!safeName2(name) || entries.has(name) || flags & 1 || method !== 0 && method !== 8)
|
|
23823
23826
|
throw new Error("invalid_zip");
|
|
23824
23827
|
if ((view.getUint32(offset + 38, true) >>> 16 & 61440) === 40960)
|
|
23825
23828
|
throw new Error("invalid_zip");
|
|
@@ -23986,7 +23989,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
23986
23989
|
return found;
|
|
23987
23990
|
}, "elements");
|
|
23988
23991
|
|
|
23989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
23990
23993
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
23991
23994
|
let name = "";
|
|
23992
23995
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -24041,7 +24044,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
24041
24044
|
return { text: parts.join("").trim(), truncated: false };
|
|
24042
24045
|
}, "sheetText");
|
|
24043
24046
|
|
|
24044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
24045
24048
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
24046
24049
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
24047
24050
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -24441,10 +24444,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
24441
24444
|
}
|
|
24442
24445
|
}, "readDocument");
|
|
24443
24446
|
|
|
24444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
24445
24448
|
import { extname as extname3 } from "node:path";
|
|
24446
24449
|
|
|
24447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
24448
24451
|
import { readFileSync } from "node:fs";
|
|
24449
24452
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
24450
24453
|
import { fileURLToPath } from "node:url";
|
|
@@ -24505,7 +24508,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
24505
24508
|
}
|
|
24506
24509
|
}, "derived");
|
|
24507
24510
|
|
|
24508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
24509
24512
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
24510
24513
|
var image2 = {
|
|
24511
24514
|
id: "image",
|
|
@@ -24514,7 +24517,7 @@ var image2 = {
|
|
|
24514
24517
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
24515
24518
|
};
|
|
24516
24519
|
|
|
24517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
24518
24521
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
24519
24522
|
var doc = {
|
|
24520
24523
|
id: "doc",
|
|
@@ -24526,7 +24529,7 @@ var doc = {
|
|
|
24526
24529
|
}), "read")
|
|
24527
24530
|
};
|
|
24528
24531
|
|
|
24529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
24530
24533
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
24531
24534
|
var docx = {
|
|
24532
24535
|
id: "docx",
|
|
@@ -24539,7 +24542,7 @@ var docx = {
|
|
|
24539
24542
|
}), "read")
|
|
24540
24543
|
};
|
|
24541
24544
|
|
|
24542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
24543
24546
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
24544
24547
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
24545
24548
|
"fonttbl",
|
|
@@ -24715,7 +24718,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
24715
24718
|
}, "htmlText");
|
|
24716
24719
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
24717
24720
|
|
|
24718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
24719
24722
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
24720
24723
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
24721
24724
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -24771,7 +24774,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
24771
24774
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
24772
24775
|
}, "markdownSections");
|
|
24773
24776
|
|
|
24774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
24775
24778
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
24776
24779
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
24777
24780
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -24842,7 +24845,7 @@ var html = {
|
|
|
24842
24845
|
}, "read")
|
|
24843
24846
|
};
|
|
24844
24847
|
|
|
24845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
24846
24849
|
var office = {
|
|
24847
24850
|
id: "office",
|
|
24848
24851
|
version: documentExtractor("odt"),
|
|
@@ -24853,7 +24856,7 @@ var office = {
|
|
|
24853
24856
|
}, "read")
|
|
24854
24857
|
};
|
|
24855
24858
|
|
|
24856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
24857
24860
|
var pdf = {
|
|
24858
24861
|
id: "pdf",
|
|
24859
24862
|
version: "unpdf",
|
|
@@ -24920,7 +24923,7 @@ var pdf = {
|
|
|
24920
24923
|
}), "read")
|
|
24921
24924
|
};
|
|
24922
24925
|
|
|
24923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
24924
24927
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
24925
24928
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
24926
24929
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -24940,7 +24943,7 @@ var plain = {
|
|
|
24940
24943
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
24941
24944
|
};
|
|
24942
24945
|
|
|
24943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
24944
24947
|
var rtf = {
|
|
24945
24948
|
id: "rtf",
|
|
24946
24949
|
version: "v1",
|
|
@@ -24948,10 +24951,10 @@ var rtf = {
|
|
|
24948
24951
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
24949
24952
|
};
|
|
24950
24953
|
|
|
24951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
24952
24955
|
import { basename as basename5 } from "node:path";
|
|
24953
24956
|
|
|
24954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
24955
24958
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
24956
24959
|
const cells = [];
|
|
24957
24960
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -24989,7 +24992,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
24989
24992
|
return { cells, truncated };
|
|
24990
24993
|
}, "delimitedSpans");
|
|
24991
24994
|
|
|
24992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
24993
24996
|
var DELIMITED = {
|
|
24994
24997
|
".csv": ",",
|
|
24995
24998
|
".tsv": " ",
|
|
@@ -25028,7 +25031,7 @@ var sheets = {
|
|
|
25028
25031
|
}, "read")
|
|
25029
25032
|
};
|
|
25030
25033
|
|
|
25031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
25032
25035
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
25033
25036
|
var HEAD_BYTES = 1024;
|
|
25034
25037
|
var readers = [...BUILT_INS2];
|
|
@@ -25038,7 +25041,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
25038
25041
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
25039
25042
|
}, "readWithRegistry");
|
|
25040
25043
|
|
|
25041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
25042
25045
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
25043
25046
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
25044
25047
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -26117,7 +26120,7 @@ function imageSize(input) {
|
|
|
26117
26120
|
}
|
|
26118
26121
|
__name(imageSize, "imageSize");
|
|
26119
26122
|
|
|
26120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
26121
26124
|
var MAX_PAGES = 20;
|
|
26122
26125
|
var MAX_PIXELS = 2e7;
|
|
26123
26126
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -26268,7 +26271,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
26268
26271
|
}
|
|
26269
26272
|
}, "ocrPdf");
|
|
26270
26273
|
|
|
26271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
26272
26275
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
26273
26276
|
const limits = pdfPreviewLimits(env);
|
|
26274
26277
|
const cancelled5 = /* @__PURE__ */ __name(() => {
|
|
@@ -26345,7 +26348,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
26345
26348
|
}
|
|
26346
26349
|
}, "pdfPreview");
|
|
26347
26350
|
|
|
26348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
26349
26352
|
import { createHash as createHash7 } from "node:crypto";
|
|
26350
26353
|
import { constants } from "node:fs";
|
|
26351
26354
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -26453,7 +26456,121 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
26453
26456
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
26454
26457
|
}, "transferMime");
|
|
26455
26458
|
|
|
26456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
26460
|
+
import { createWriteStream, mkdirSync } from "node:fs";
|
|
26461
|
+
import { link as link3, rm } from "node:fs/promises";
|
|
26462
|
+
import { join as join10, resolve as resolve6 } from "node:path";
|
|
26463
|
+
import { Readable, Transform } from "node:stream";
|
|
26464
|
+
import { pipeline } from "node:stream/promises";
|
|
26465
|
+
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
26466
|
+
{
|
|
26467
|
+
kind,
|
|
26468
|
+
providerRef,
|
|
26469
|
+
...name === void 0 ? {} : { name },
|
|
26470
|
+
...position === void 0 ? {} : { position }
|
|
26471
|
+
}
|
|
26472
|
+
]), "refreshedFiles");
|
|
26473
|
+
var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
|
|
26474
|
+
const downloaded = saved.map((one, index) => ({
|
|
26475
|
+
kind: one.kind,
|
|
26476
|
+
path: one.path,
|
|
26477
|
+
...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
|
|
26478
|
+
...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
|
|
26479
|
+
...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
|
|
26480
|
+
}));
|
|
26481
|
+
try {
|
|
26482
|
+
const kept = await messages.keepDownloaded(chat, message, downloaded);
|
|
26483
|
+
if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
|
|
26484
|
+
warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
|
|
26485
|
+
return kept;
|
|
26486
|
+
} catch (error) {
|
|
26487
|
+
onFailure?.(error);
|
|
26488
|
+
warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
|
|
26489
|
+
return 0;
|
|
26490
|
+
}
|
|
26491
|
+
}, "recordPaths");
|
|
26492
|
+
var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
|
|
26493
|
+
const { files } = await messages.download(chat, message);
|
|
26494
|
+
mkdirSync(output, { recursive: true });
|
|
26495
|
+
const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
|
|
26496
|
+
if (result.batch.failed > 0)
|
|
26497
|
+
throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
|
|
26498
|
+
batch: result.batch,
|
|
26499
|
+
saved: result.saved
|
|
26500
|
+
});
|
|
26501
|
+
return result.saved;
|
|
26502
|
+
}, "downloadMessage");
|
|
26503
|
+
var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
|
|
26504
|
+
const saved = [];
|
|
26505
|
+
const successful = [];
|
|
26506
|
+
for (const [index, file] of files.entries()) {
|
|
26507
|
+
if (batch.stopped)
|
|
26508
|
+
break;
|
|
26509
|
+
try {
|
|
26510
|
+
const one = await save(file, output, `${message}-${index + 1}`, { unique });
|
|
26511
|
+
saved.push(one);
|
|
26512
|
+
successful.push(file);
|
|
26513
|
+
batch.ok();
|
|
26514
|
+
onSaved?.(one);
|
|
26515
|
+
} catch (error) {
|
|
26516
|
+
const issue = batch.fail(message, "download", error, (file.position ?? index) + 1);
|
|
26517
|
+
warn(`message ${message}, attachment ${(file.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
|
|
26518
|
+
}
|
|
26519
|
+
}
|
|
26520
|
+
await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
|
|
26521
|
+
return { saved, batch: batch.result() };
|
|
26522
|
+
}, "saveFiles");
|
|
26523
|
+
var EXTENSIONS = {
|
|
26524
|
+
"image/jpeg": "jpg",
|
|
26525
|
+
"image/png": "png",
|
|
26526
|
+
"image/webp": "webp",
|
|
26527
|
+
"image/gif": "gif",
|
|
26528
|
+
"video/mp4": "mp4",
|
|
26529
|
+
"video/webm": "webm",
|
|
26530
|
+
"audio/mpeg": "mp3",
|
|
26531
|
+
"audio/ogg": "ogg",
|
|
26532
|
+
"audio/mp4": "m4a",
|
|
26533
|
+
"application/pdf": "pdf"
|
|
26534
|
+
};
|
|
26535
|
+
var BY_KIND = { photo: "jpg" };
|
|
26536
|
+
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
26537
|
+
const own = safeName(file.name);
|
|
26538
|
+
const fileName = /* @__PURE__ */ __name(() => {
|
|
26539
|
+
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
26540
|
+
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
26541
|
+
}, "fileName");
|
|
26542
|
+
const partial = join10(directory2, `.${fileName()}.${process.pid}.part`);
|
|
26543
|
+
let bytes2 = 0;
|
|
26544
|
+
const counting = new Transform({
|
|
26545
|
+
transform(chunk, _encoding, done2) {
|
|
26546
|
+
bytes2 += chunk.length;
|
|
26547
|
+
done2(null, chunk);
|
|
26548
|
+
}
|
|
26549
|
+
});
|
|
26550
|
+
try {
|
|
26551
|
+
await pipeline(Readable.from(file.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
26552
|
+
const name = fileName();
|
|
26553
|
+
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
26554
|
+
for (const candidate of names2) {
|
|
26555
|
+
const path2 = resolve6(join10(directory2, candidate));
|
|
26556
|
+
const taken = await link3(partial, path2).then(() => false, (error) => {
|
|
26557
|
+
if (error.code === "EEXIST")
|
|
26558
|
+
return true;
|
|
26559
|
+
throw error;
|
|
26560
|
+
});
|
|
26561
|
+
if (!taken)
|
|
26562
|
+
return { kind: file.kind, path: path2, bytes: bytes2 };
|
|
26563
|
+
}
|
|
26564
|
+
const path = resolve6(join10(directory2, names2.at(-1) ?? name));
|
|
26565
|
+
if (unique)
|
|
26566
|
+
return { kind: file.kind, path, bytes: bytes2, existing: true };
|
|
26567
|
+
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
26568
|
+
} finally {
|
|
26569
|
+
await rm(partial, { force: true });
|
|
26570
|
+
}
|
|
26571
|
+
}, "save");
|
|
26572
|
+
|
|
26573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
26457
26574
|
var ATTACHMENT_QUERY = {
|
|
26458
26575
|
entity: "attachment",
|
|
26459
26576
|
backend: "sql",
|
|
@@ -26808,6 +26925,48 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
26808
26925
|
...preview
|
|
26809
26926
|
};
|
|
26810
26927
|
}, "show"),
|
|
26928
|
+
saveHeld: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, output }) => {
|
|
26929
|
+
if (attachment2 !== void 0 && (!Number.isSafeInteger(attachment2) || attachment2 < 1))
|
|
26930
|
+
throw new CliError("validation_error", "attachment must be a position from 1");
|
|
26931
|
+
const store = await accountStore(deps);
|
|
26932
|
+
const { account: account2 } = store;
|
|
26933
|
+
const { chatId, messageId } = await messageOf(deps, store, chat, message);
|
|
26934
|
+
const ref = formatLocator({ ...account2, chat: chatId, message: messageId });
|
|
26935
|
+
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
26936
|
+
if (files.length === 0)
|
|
26937
|
+
throw new CliError("not_found", `the local store holds no file of ${ref}`);
|
|
26938
|
+
const chosen = attachment2 === void 0 ? files : files.filter(({ position }) => position === attachment2 - 1);
|
|
26939
|
+
if (chosen.length === 0)
|
|
26940
|
+
throw new CliError("not_found", `${ref} has no file at position ${attachment2}; its files are at ${files.map(({ position }) => position + 1).join(", ")}`);
|
|
26941
|
+
const env = deps.env ?? process.env;
|
|
26942
|
+
const held = await Promise.all(chosen.map(async (file) => {
|
|
26943
|
+
const missing4 = new CliError("not_found", `file ${file.position + 1} of ${ref} is not saved on this computer; run messages download without --offline`);
|
|
26944
|
+
if (file.localPath === null)
|
|
26945
|
+
throw missing4;
|
|
26946
|
+
if (refusedPlace(file.localPath, deps.messenger.app, env))
|
|
26947
|
+
throw new CliError("validation_error", "cannot copy known credential files, the WireCat apps' own files or the message store");
|
|
26948
|
+
const found = await lstat4(file.localPath).catch(() => void 0);
|
|
26949
|
+
if (!found)
|
|
26950
|
+
throw missing4;
|
|
26951
|
+
if (!found.isFile())
|
|
26952
|
+
throw new CliError("validation_error", "the saved attachment must be a regular file");
|
|
26953
|
+
return { file, path: file.localPath };
|
|
26954
|
+
}));
|
|
26955
|
+
mkdirSync2(output, { recursive: true });
|
|
26956
|
+
const saved = [];
|
|
26957
|
+
for (const { file, path } of held)
|
|
26958
|
+
saved.push(await save({
|
|
26959
|
+
kind: file.kind,
|
|
26960
|
+
...file.name === null ? {} : { name: file.name },
|
|
26961
|
+
...file.mime === null ? {} : { mime: file.mime },
|
|
26962
|
+
position: file.position,
|
|
26963
|
+
bytes: /* @__PURE__ */ __name(async function* () {
|
|
26964
|
+
const handle = await open6(path, constants2.O_RDONLY | (constants2.O_NOFOLLOW ?? 0));
|
|
26965
|
+
yield* handle.createReadStream();
|
|
26966
|
+
}, "bytes")
|
|
26967
|
+
}, output, `${messageId}-${file.position + 1}`));
|
|
26968
|
+
return saved;
|
|
26969
|
+
}, "saveHeld"),
|
|
26811
26970
|
setText: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, text: text2 }) => {
|
|
26812
26971
|
if (text2.trim() === "")
|
|
26813
26972
|
throw new CliError("validation_error", "the text is empty \u2014 nothing to keep");
|
|
@@ -26834,7 +26993,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
26834
26993
|
}, "setText")
|
|
26835
26994
|
}), "attachmentsService");
|
|
26836
26995
|
|
|
26837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
26838
26997
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
26839
26998
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
26840
26999
|
const store = await accountStore(deps);
|
|
@@ -26864,7 +27023,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
26864
27023
|
}, "list")
|
|
26865
27024
|
}), "chatDocumentsService");
|
|
26866
27025
|
|
|
26867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
26868
27027
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
26869
27028
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
26870
27029
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -26951,7 +27110,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
26951
27110
|
}
|
|
26952
27111
|
}, "isRetentionSelection");
|
|
26953
27112
|
|
|
26954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
26955
27114
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
26956
27115
|
const fields = text2.split(",").map((one) => one.trim());
|
|
26957
27116
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -27158,7 +27317,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
27158
27317
|
};
|
|
27159
27318
|
}, "countersService");
|
|
27160
27319
|
|
|
27161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
27162
27321
|
var SYNC_KEY = "messages.sync-first";
|
|
27163
27322
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
27164
27323
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -27290,7 +27449,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
27290
27449
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
27291
27450
|
}), "withRefresh");
|
|
27292
27451
|
|
|
27293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
27294
27453
|
var CANDIDATES = 50;
|
|
27295
27454
|
var WORD_HITS = 200;
|
|
27296
27455
|
var RRF_K = 60;
|
|
@@ -27565,13 +27724,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
27565
27724
|
return mean.map((value) => value / length);
|
|
27566
27725
|
}, "meanOf");
|
|
27567
27726
|
|
|
27568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
27569
27728
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
27570
27729
|
...embeddingsMaintenance(deps),
|
|
27571
27730
|
...embeddingsSearch(deps)
|
|
27572
27731
|
}), "embeddingsService");
|
|
27573
27732
|
|
|
27574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
27575
27734
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
27576
27735
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27577
27736
|
if (deps.offline)
|
|
@@ -27712,7 +27871,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
27712
27871
|
};
|
|
27713
27872
|
}, "foldersService");
|
|
27714
27873
|
|
|
27715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
27716
27875
|
var INBOX_CHATS = 20;
|
|
27717
27876
|
var REVIEW_DAYS = 3;
|
|
27718
27877
|
var UNANSWERED_HOURS = 24;
|
|
@@ -27920,7 +28079,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
27920
28079
|
};
|
|
27921
28080
|
}, "inboxService");
|
|
27922
28081
|
|
|
27923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
27924
28083
|
var REVIEW_COUNT = 500;
|
|
27925
28084
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
27926
28085
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -27999,7 +28158,14 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27999
28158
|
};
|
|
28000
28159
|
}, "mentionsService");
|
|
28001
28160
|
|
|
28002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
28162
|
+
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
28163
|
+
position,
|
|
28164
|
+
kind,
|
|
28165
|
+
...name === void 0 ? {} : { name },
|
|
28166
|
+
url: null,
|
|
28167
|
+
reason: "unsupported_provider"
|
|
28168
|
+
})), "fileLinks");
|
|
28003
28169
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
28004
28170
|
if (isLocator(reference)) {
|
|
28005
28171
|
if (message !== void 0)
|
|
@@ -28046,7 +28212,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
28046
28212
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
28047
28213
|
}, "validatePermalink");
|
|
28048
28214
|
|
|
28049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
28050
28216
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
28051
28217
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
28052
28218
|
return `${seconds / 86400}d`;
|
|
@@ -28078,7 +28244,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
28078
28244
|
return seconds;
|
|
28079
28245
|
}, "pinDurationOf");
|
|
28080
28246
|
|
|
28081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
28082
28248
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
28083
28249
|
if (sendAs === void 0) {
|
|
28084
28250
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -28103,7 +28269,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
28103
28269
|
return sendAs;
|
|
28104
28270
|
}, "typedSendAs");
|
|
28105
28271
|
|
|
28106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
28107
28273
|
var TOTAL_CAP = 1e4;
|
|
28108
28274
|
var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
28109
28275
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -28114,7 +28280,7 @@ var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
|
28114
28280
|
return { value: count3, relation: exact ? "eq" : "gte" };
|
|
28115
28281
|
}, "totalOf");
|
|
28116
28282
|
|
|
28117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
28118
28284
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
28119
28285
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
28120
28286
|
let narrows = false;
|
|
@@ -28143,7 +28309,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
28143
28309
|
return wanted(root).join(" ").trim();
|
|
28144
28310
|
}, "meaningWords");
|
|
28145
28311
|
|
|
28146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
28147
28313
|
var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
28148
28314
|
var scaffolding = new Set(words("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"));
|
|
28149
28315
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -28259,7 +28425,7 @@ function planQuestion(text2, strict = false) {
|
|
|
28259
28425
|
}
|
|
28260
28426
|
__name(planQuestion, "planQuestion");
|
|
28261
28427
|
|
|
28262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
28263
28429
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
28264
28430
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
28265
28431
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -28452,7 +28618,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
28452
28618
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
28453
28619
|
}, "signals");
|
|
28454
28620
|
|
|
28455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
28456
28622
|
var MEANING_DEPTH = 100;
|
|
28457
28623
|
var RRF_K2 = 60;
|
|
28458
28624
|
var RERANK_DEPTH = 50;
|
|
@@ -28780,7 +28946,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
28780
28946
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
28781
28947
|
}, "mixedWithReranker");
|
|
28782
28948
|
|
|
28783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
28784
28950
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
28785
28951
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
28786
28952
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -28979,7 +29145,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
28979
29145
|
return result;
|
|
28980
29146
|
}, "readThreadContext");
|
|
28981
29147
|
|
|
28982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
28983
29149
|
var SEARCH_FILL_MS = 200;
|
|
28984
29150
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
28985
29151
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -29046,12 +29212,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
29046
29212
|
}, "accountOf");
|
|
29047
29213
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
29048
29214
|
|
|
29049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
29050
29216
|
import { createHash as createHash9 } from "node:crypto";
|
|
29051
29217
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
29052
29218
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
29053
29219
|
|
|
29054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
29055
29221
|
var GROUP_SETTINGS = [
|
|
29056
29222
|
"allCanPin",
|
|
29057
29223
|
"onlyAdminsAdd",
|
|
@@ -29065,130 +29231,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
29065
29231
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
29066
29232
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
29067
29233
|
|
|
29068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29069
|
-
import { createWriteStream, mkdirSync } from "node:fs";
|
|
29070
|
-
import { link as link3, rm } from "node:fs/promises";
|
|
29071
|
-
import { basename as basename6, join as join10, resolve as resolve6 } from "node:path";
|
|
29072
|
-
import { Readable, Transform } from "node:stream";
|
|
29073
|
-
import { pipeline } from "node:stream/promises";
|
|
29074
|
-
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
29075
|
-
{
|
|
29076
|
-
kind,
|
|
29077
|
-
providerRef,
|
|
29078
|
-
...name === void 0 ? {} : { name },
|
|
29079
|
-
...position === void 0 ? {} : { position }
|
|
29080
|
-
}
|
|
29081
|
-
]), "refreshedFiles");
|
|
29082
|
-
var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
|
|
29083
|
-
const downloaded = saved.map((one, index) => ({
|
|
29084
|
-
kind: one.kind,
|
|
29085
|
-
path: one.path,
|
|
29086
|
-
...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
|
|
29087
|
-
...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
|
|
29088
|
-
...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
|
|
29089
|
-
}));
|
|
29090
|
-
try {
|
|
29091
|
-
const kept = await messages.keepDownloaded(chat, message, downloaded);
|
|
29092
|
-
if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
|
|
29093
|
-
warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
|
|
29094
|
-
return kept;
|
|
29095
|
-
} catch (error) {
|
|
29096
|
-
onFailure?.(error);
|
|
29097
|
-
warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
|
|
29098
|
-
return 0;
|
|
29099
|
-
}
|
|
29100
|
-
}, "recordPaths");
|
|
29101
|
-
var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
|
|
29102
|
-
const { files } = await messages.download(chat, message);
|
|
29103
|
-
mkdirSync(output, { recursive: true });
|
|
29104
|
-
const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
|
|
29105
|
-
if (result.batch.failed > 0)
|
|
29106
|
-
throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
|
|
29107
|
-
batch: result.batch,
|
|
29108
|
-
saved: result.saved
|
|
29109
|
-
});
|
|
29110
|
-
return result.saved;
|
|
29111
|
-
}, "downloadMessage");
|
|
29112
|
-
var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
|
|
29113
|
-
const saved = [];
|
|
29114
|
-
const successful = [];
|
|
29115
|
-
for (const [index, file] of files.entries()) {
|
|
29116
|
-
if (batch.stopped)
|
|
29117
|
-
break;
|
|
29118
|
-
try {
|
|
29119
|
-
const one = await save(file, output, `${message}-${index + 1}`, { unique });
|
|
29120
|
-
saved.push(one);
|
|
29121
|
-
successful.push(file);
|
|
29122
|
-
batch.ok();
|
|
29123
|
-
onSaved?.(one);
|
|
29124
|
-
} catch (error) {
|
|
29125
|
-
const issue = batch.fail(message, "download", error, (file.position ?? index) + 1);
|
|
29126
|
-
warn(`message ${message}, attachment ${(file.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
|
|
29127
|
-
}
|
|
29128
|
-
}
|
|
29129
|
-
await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
|
|
29130
|
-
return { saved, batch: batch.result() };
|
|
29131
|
-
}, "saveFiles");
|
|
29132
|
-
var EXTENSIONS = {
|
|
29133
|
-
"image/jpeg": "jpg",
|
|
29134
|
-
"image/png": "png",
|
|
29135
|
-
"image/webp": "webp",
|
|
29136
|
-
"image/gif": "gif",
|
|
29137
|
-
"video/mp4": "mp4",
|
|
29138
|
-
"video/webm": "webm",
|
|
29139
|
-
"audio/mpeg": "mp3",
|
|
29140
|
-
"audio/ogg": "ogg",
|
|
29141
|
-
"audio/mp4": "m4a",
|
|
29142
|
-
"application/pdf": "pdf"
|
|
29143
|
-
};
|
|
29144
|
-
var BY_KIND = { photo: "jpg" };
|
|
29145
|
-
var safeName2 = /* @__PURE__ */ __name((name, platform = process.platform) => {
|
|
29146
|
-
let plain2 = name === void 0 ? "" : basename6(name.replaceAll("\\", "/")).replace(/[\p{Cc}---]/gu, "").replace(/^\.+/, "");
|
|
29147
|
-
if (platform === "win32") {
|
|
29148
|
-
plain2 = plain2.replace(/[<>:"|?*]/g, "_").replace(/[. ]+$/, "");
|
|
29149
|
-
if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(plain2))
|
|
29150
|
-
return void 0;
|
|
29151
|
-
}
|
|
29152
|
-
return plain2 === "" ? void 0 : plain2;
|
|
29153
|
-
}, "safeName");
|
|
29154
|
-
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
29155
|
-
const own = safeName2(file.name);
|
|
29156
|
-
const fileName = /* @__PURE__ */ __name(() => {
|
|
29157
|
-
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
29158
|
-
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
29159
|
-
}, "fileName");
|
|
29160
|
-
const partial = join10(directory2, `.${fileName()}.${process.pid}.part`);
|
|
29161
|
-
let bytes2 = 0;
|
|
29162
|
-
const counting = new Transform({
|
|
29163
|
-
transform(chunk, _encoding, done2) {
|
|
29164
|
-
bytes2 += chunk.length;
|
|
29165
|
-
done2(null, chunk);
|
|
29166
|
-
}
|
|
29167
|
-
});
|
|
29168
|
-
try {
|
|
29169
|
-
await pipeline(Readable.from(file.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
29170
|
-
const name = fileName();
|
|
29171
|
-
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
29172
|
-
for (const candidate of names2) {
|
|
29173
|
-
const path2 = resolve6(join10(directory2, candidate));
|
|
29174
|
-
const taken = await link3(partial, path2).then(() => false, (error) => {
|
|
29175
|
-
if (error.code === "EEXIST")
|
|
29176
|
-
return true;
|
|
29177
|
-
throw error;
|
|
29178
|
-
});
|
|
29179
|
-
if (!taken)
|
|
29180
|
-
return { kind: file.kind, path: path2, bytes: bytes2 };
|
|
29181
|
-
}
|
|
29182
|
-
const path = resolve6(join10(directory2, names2.at(-1) ?? name));
|
|
29183
|
-
if (unique)
|
|
29184
|
-
return { kind: file.kind, path, bytes: bytes2, existing: true };
|
|
29185
|
-
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
29186
|
-
} finally {
|
|
29187
|
-
await rm(partial, { force: true });
|
|
29188
|
-
}
|
|
29189
|
-
}, "save");
|
|
29190
|
-
|
|
29191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
29234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
29192
29235
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
29193
29236
|
var PICTURE_FLOOR = 0.25;
|
|
29194
29237
|
var PAGE4 = 50;
|
|
@@ -29205,7 +29248,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
29205
29248
|
const directory2 = imageModelsDirectory(deps.env);
|
|
29206
29249
|
if (!isImageModelInstalled(model2, directory2))
|
|
29207
29250
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
29208
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
29251
|
+
const { openPictureEmbedder } = await import("./embedder-3Q3C2WKC.js");
|
|
29209
29252
|
return openPictureEmbedder(model2, directory2);
|
|
29210
29253
|
}, "open");
|
|
29211
29254
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -29402,7 +29445,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
29402
29445
|
}, "search")
|
|
29403
29446
|
}), "withPictures");
|
|
29404
29447
|
|
|
29405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
29406
29449
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
29407
29450
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
29408
29451
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -29451,7 +29494,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
29451
29494
|
}
|
|
29452
29495
|
}, "meaningLane");
|
|
29453
29496
|
|
|
29454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
29455
29498
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
29456
29499
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
29457
29500
|
if (choice === "off")
|
|
@@ -29463,9 +29506,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
29463
29506
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
29464
29507
|
try {
|
|
29465
29508
|
const warm = deps.embedders;
|
|
29466
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
29509
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-UBA4L4B2.js")).openRerankerProcess(model, directory2, {
|
|
29467
29510
|
threads: defaultThreads()
|
|
29468
|
-
})) : await (await import("./rerank-
|
|
29511
|
+
})) : await (await import("./rerank-FMCDP6VF.js")).openReranker(model, directory2);
|
|
29469
29512
|
return {
|
|
29470
29513
|
model: model.id,
|
|
29471
29514
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -29485,7 +29528,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
29485
29528
|
};
|
|
29486
29529
|
}, "rerankLane");
|
|
29487
29530
|
|
|
29488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
29489
29532
|
import { createHash as createHash10 } from "node:crypto";
|
|
29490
29533
|
var refOf = /* @__PURE__ */ __name((target2) => target2.ref ?? `document:${target2.documentId}`, "refOf");
|
|
29491
29534
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -29493,7 +29536,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
29493
29536
|
const directory2 = imageModelsDirectory(env);
|
|
29494
29537
|
if (!isImageModelInstalled(model, directory2))
|
|
29495
29538
|
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 });
|
|
29496
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
29539
|
+
const { openPictureEmbedder } = await import("./embedder-3Q3C2WKC.js");
|
|
29497
29540
|
return openPictureEmbedder(model, directory2);
|
|
29498
29541
|
}, "openPictureEmbedderFor");
|
|
29499
29542
|
var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options = {}) => {
|
|
@@ -29514,7 +29557,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options
|
|
|
29514
29557
|
}, "savePicture");
|
|
29515
29558
|
var removePicture = /* @__PURE__ */ __name((store, target2) => store.notes.removePicture(refOf(target2)), "removePicture");
|
|
29516
29559
|
|
|
29517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
29518
29561
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
29519
29562
|
const metadata = note.frontMatter;
|
|
29520
29563
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -29529,7 +29572,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
29529
29572
|
};
|
|
29530
29573
|
}, "documentSource");
|
|
29531
29574
|
|
|
29532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
29533
29576
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
29534
29577
|
let root;
|
|
29535
29578
|
try {
|
|
@@ -29556,7 +29599,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
29556
29599
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
29557
29600
|
}, "titleTiers");
|
|
29558
29601
|
|
|
29559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
29560
29603
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
29561
29604
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
29562
29605
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -29993,7 +30036,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
29993
30036
|
};
|
|
29994
30037
|
}, "searchNotesOf");
|
|
29995
30038
|
|
|
29996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
29997
30040
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
29998
30041
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
29999
30042
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -30105,7 +30148,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
30105
30148
|
};
|
|
30106
30149
|
}, "searchEvents");
|
|
30107
30150
|
|
|
30108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
30109
30152
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
30110
30153
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
30111
30154
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -30174,6 +30217,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
30174
30217
|
from: hit.email?.from ? { name: hit.email.from.name ?? hit.email.from.address, ref: hit.email.from.ref } : { name: hit.senderName, ref: null },
|
|
30175
30218
|
senderIsMe: senderIsMe(hit, at.account),
|
|
30176
30219
|
...hit.email ? { email: hit.email } : {},
|
|
30220
|
+
attachments: hitFiles(hit.attachments),
|
|
30177
30221
|
foundBy
|
|
30178
30222
|
};
|
|
30179
30223
|
}, "itemOf");
|
|
@@ -30313,7 +30357,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
30313
30357
|
};
|
|
30314
30358
|
}, "searchAll");
|
|
30315
30359
|
|
|
30316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
30317
30361
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
30318
30362
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
30319
30363
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -30406,7 +30450,8 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account2, request, qu
|
|
|
30406
30450
|
meetingId: hit.meetingId,
|
|
30407
30451
|
scope: hit.scope,
|
|
30408
30452
|
id: hit.id,
|
|
30409
|
-
startMs: hit.startMs
|
|
30453
|
+
startMs: hit.startMs,
|
|
30454
|
+
...hit.scope === "transcript" && hit.ref !== void 0 ? { cueRef: hit.ref, speakerName: hit.speakerName ?? null } : {}
|
|
30410
30455
|
}
|
|
30411
30456
|
});
|
|
30412
30457
|
if (collected.items.length > request.limit) {
|
|
@@ -30560,7 +30605,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
30560
30605
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
30561
30606
|
}, "searchAllOfSource");
|
|
30562
30607
|
|
|
30563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
30564
30609
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
30565
30610
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
30566
30611
|
var DEFAULT_BACKEND = "both";
|
|
@@ -30749,8 +30794,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
30749
30794
|
return { report, sources };
|
|
30750
30795
|
}, "searchServer");
|
|
30751
30796
|
|
|
30752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
30753
30798
|
var DELETE_AT_ONCE = 10;
|
|
30799
|
+
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
30800
|
+
const files = fileLinks(attachments);
|
|
30801
|
+
return files.length > 0 ? { files } : {};
|
|
30802
|
+
}, "filesOf");
|
|
30754
30803
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
30755
30804
|
const { guard } = deps;
|
|
30756
30805
|
const inStore = /* @__PURE__ */ __name(async (read) => read(await deps.store(), await deps.account()), "inStore");
|
|
@@ -30900,13 +30949,15 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
30900
30949
|
const store = await deps.store();
|
|
30901
30950
|
const chat2 = await readChatId(deps, target2.chat, store, account2);
|
|
30902
30951
|
const found2 = await store.messages.around(account2, chat2, target2.message, { before: 0, after: 0 });
|
|
30903
|
-
|
|
30952
|
+
const held2 = found2.find((item) => item.id === target2.message && item.chatId === chat2);
|
|
30953
|
+
if (!held2)
|
|
30904
30954
|
throw new CliError("not_found", "no such message in this account's stored chat");
|
|
30905
30955
|
return {
|
|
30906
30956
|
locator: formatLocator({ ...account2, chat: chat2, message: target2.message }),
|
|
30907
30957
|
url: null,
|
|
30908
30958
|
access: "unavailable",
|
|
30909
|
-
reason: deps.offline ? "offline" : "unsupported_provider"
|
|
30959
|
+
reason: deps.offline ? "offline" : "unsupported_provider",
|
|
30960
|
+
...filesOf(held2)
|
|
30910
30961
|
};
|
|
30911
30962
|
}
|
|
30912
30963
|
const connection = await deps.connection();
|
|
@@ -30914,20 +30965,27 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
30914
30965
|
throw new CliError("authentication_error", "the connected account differs from the recorded profile; refresh the session before linking");
|
|
30915
30966
|
const { id: chat } = await connection.resolve(target2.chat);
|
|
30916
30967
|
const locator = formatLocator({ ...account2, chat, message: target2.message });
|
|
30917
|
-
if (connection.permalink)
|
|
30918
|
-
|
|
30968
|
+
if (connection.permalink) {
|
|
30969
|
+
const permalink = validatePermalink(await connection.permalink(chat, target2.message));
|
|
30970
|
+
const held2 = await deps.store().then((store) => store.messages.around(account2, chat, target2.message, { before: 0, after: 0 })).then((found2) => found2.find((item) => item.id === target2.message && item.chatId === chat)).catch(() => void 0);
|
|
30971
|
+
return { locator, ...permalink, ...held2 ? filesOf(held2) : {} };
|
|
30972
|
+
}
|
|
30919
30973
|
const found = await capability(connection, "around", "read a message")(chat, target2.message, {
|
|
30920
30974
|
before: 0,
|
|
30921
30975
|
after: 0
|
|
30922
30976
|
});
|
|
30923
|
-
|
|
30977
|
+
const held = found.find((item) => item.id === target2.message && item.chatId === chat);
|
|
30978
|
+
if (!held)
|
|
30924
30979
|
throw new CliError("not_found", "no such message in this chat");
|
|
30925
|
-
return { locator, url: null, access: "unavailable", reason: "unsupported_provider" };
|
|
30980
|
+
return { locator, url: null, access: "unavailable", reason: "unsupported_provider", ...filesOf(held) };
|
|
30926
30981
|
}, "link"),
|
|
30927
|
-
download: /* @__PURE__ */ __name(async (
|
|
30982
|
+
download: /* @__PURE__ */ __name(async (reference, message) => {
|
|
30983
|
+
const target2 = messageLinkTarget(reference, message, deps.messenger.provider);
|
|
30984
|
+
if (target2.account !== void 0 && target2.account !== (await deps.account()).account)
|
|
30985
|
+
throw new CliError("validation_error", "that locator belongs to another account; select its profile first");
|
|
30928
30986
|
const connection = await deps.connection();
|
|
30929
30987
|
const download = capability(connection, "download", "download attachments");
|
|
30930
|
-
return download((await connection.resolve(chat)).id, message);
|
|
30988
|
+
return download((await connection.resolve(target2.chat)).id, target2.message);
|
|
30931
30989
|
}, "download"),
|
|
30932
30990
|
keepDownloaded: /* @__PURE__ */ __name((chat, message, files) => inStore(async (store, account2) => {
|
|
30933
30991
|
const chatId = await storedChatId(deps.messenger, chat, store, account2).catch(() => void 0) ?? (await (await deps.connection()).resolve(chat)).id;
|
|
@@ -31175,7 +31233,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
31175
31233
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
31176
31234
|
}, "checkMediaOptions");
|
|
31177
31235
|
|
|
31178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
31179
31237
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
31180
31238
|
var RULES = {
|
|
31181
31239
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -31190,7 +31248,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
31190
31248
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
31191
31249
|
}), "classifyChannel");
|
|
31192
31250
|
|
|
31193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
31194
31252
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
31195
31253
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
31196
31254
|
const store = await deps.store();
|
|
@@ -31276,7 +31334,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
31276
31334
|
};
|
|
31277
31335
|
}, "metadataService");
|
|
31278
31336
|
|
|
31279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
31280
31338
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
31281
31339
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
31282
31340
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -31313,7 +31371,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
31313
31371
|
return { chatId, rows, notes };
|
|
31314
31372
|
}, "moderateWith");
|
|
31315
31373
|
|
|
31316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
31317
31375
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
31318
31376
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
31319
31377
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -31391,7 +31449,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
31391
31449
|
}, "removePerson")
|
|
31392
31450
|
}), "moderatorOf");
|
|
31393
31451
|
|
|
31394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
31395
31453
|
var CONTEXT_MESSAGES2 = 10;
|
|
31396
31454
|
var CONTEXT_BYTES = 64 * 1024;
|
|
31397
31455
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -31647,10 +31705,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
31647
31705
|
};
|
|
31648
31706
|
}, "personMessages");
|
|
31649
31707
|
|
|
31650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
31651
31709
|
import { createHash as createHash11 } from "node:crypto";
|
|
31652
31710
|
|
|
31653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
31654
31712
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
31655
31713
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
31656
31714
|
const parsed = parseMeetingReference(reference);
|
|
@@ -31698,7 +31756,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
31698
31756
|
};
|
|
31699
31757
|
}, "resolveMeetingReference");
|
|
31700
31758
|
|
|
31701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
31702
31760
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
31703
31761
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
31704
31762
|
if (signal?.aborted)
|
|
@@ -31897,7 +31955,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
31897
31955
|
return { ...packet, fingerprint: hash(packet) };
|
|
31898
31956
|
}, "readMeetingEvidence");
|
|
31899
31957
|
|
|
31900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
31901
31959
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
31902
31960
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
31903
31961
|
const requestedAccounts = options.accountIds;
|
|
@@ -31996,7 +32054,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
31996
32054
|
};
|
|
31997
32055
|
}, "personMeetingContext");
|
|
31998
32056
|
|
|
31999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
32000
32058
|
var PREPARE_BYTES = 96 * 1024;
|
|
32001
32059
|
var MEETINGS = 5;
|
|
32002
32060
|
var CUES = 3;
|
|
@@ -32113,7 +32171,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
32113
32171
|
}
|
|
32114
32172
|
}, "meetingsOf");
|
|
32115
32173
|
|
|
32116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
32117
32175
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
32118
32176
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
32119
32177
|
const held = await storeIfOpen(deps);
|
|
@@ -32183,7 +32241,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
32183
32241
|
complete: false
|
|
32184
32242
|
})), "quiet");
|
|
32185
32243
|
|
|
32186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
32187
32245
|
var TIMELINE_ITEMS = 50;
|
|
32188
32246
|
var TIMELINE_MAX = 500;
|
|
32189
32247
|
var SCOPES = ["personal", "work"];
|
|
@@ -32238,7 +32296,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
32238
32296
|
};
|
|
32239
32297
|
}, "personTimeline");
|
|
32240
32298
|
|
|
32241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
32242
32300
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
32243
32301
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
32244
32302
|
const held = await storeIfOpen(deps);
|
|
@@ -32465,7 +32523,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
32465
32523
|
return rest;
|
|
32466
32524
|
}, "withoutPhone");
|
|
32467
32525
|
|
|
32468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
32469
32527
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
32470
32528
|
id: note.id,
|
|
32471
32529
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -32509,7 +32567,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
32509
32567
|
};
|
|
32510
32568
|
}, "privatePeopleService");
|
|
32511
32569
|
|
|
32512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
32513
32571
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
32514
32572
|
total: 0,
|
|
32515
32573
|
population: 0,
|
|
@@ -32765,7 +32823,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32765
32823
|
}, "evidence")
|
|
32766
32824
|
}), "rankingsService");
|
|
32767
32825
|
|
|
32768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
32769
32827
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
32770
32828
|
id: one.id,
|
|
32771
32829
|
name: one.name,
|
|
@@ -32894,7 +32952,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
32894
32952
|
};
|
|
32895
32953
|
}, "searchesService");
|
|
32896
32954
|
|
|
32897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
32898
32956
|
var TAGGING_QUERY = {
|
|
32899
32957
|
entity: "tagging",
|
|
32900
32958
|
backend: "sql",
|
|
@@ -32978,7 +33036,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
32978
33036
|
};
|
|
32979
33037
|
}, "tagsService");
|
|
32980
33038
|
|
|
32981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
32982
33040
|
var TASK_QUERY = {
|
|
32983
33041
|
entity: "task",
|
|
32984
33042
|
backend: "sql",
|
|
@@ -33115,7 +33173,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33115
33173
|
const planOf = /* @__PURE__ */ __name(async (store, id2, plan, by) => {
|
|
33116
33174
|
if (plan.category !== void 0)
|
|
33117
33175
|
plan = { ...plan, category: await categoryOf(store, plan.category) };
|
|
33118
|
-
const open7 = (await store.tasks.details(id2)).status
|
|
33176
|
+
const open7 = !isClosedState((await store.tasks.details(id2)).status);
|
|
33119
33177
|
if (!open7 && (plan.dueAt != null || plan.nextCheckAt != null))
|
|
33120
33178
|
throw new CliError("validation_error", "a closed task takes no due date or next check; it stays closed");
|
|
33121
33179
|
const { assignees, ...fields } = plan;
|
|
@@ -33146,7 +33204,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33146
33204
|
if (!current.some((one) => one.to === to))
|
|
33147
33205
|
await store.tasks.assign(id2, { to, role: "assignee" }, by);
|
|
33148
33206
|
}, "assign");
|
|
33149
|
-
const reviewAfterLink = /* @__PURE__ */ __name(async (store, id2) => (await store.tasks.get(id2))?.state
|
|
33207
|
+
const reviewAfterLink = /* @__PURE__ */ __name(async (store, id2) => !isClosedState((await store.tasks.get(id2))?.state ?? "done") ? store.tasks.reviewDuplicates(id2, { linked: true }) : 0, "reviewAfterLink");
|
|
33150
33208
|
return {
|
|
33151
33209
|
list: /* @__PURE__ */ __name(({ query, limit, offset, previews }) => inStore(async (store, account2) => {
|
|
33152
33210
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -33163,7 +33221,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33163
33221
|
...previews ? { previews: await Promise.all(shown.map(({ task: task2 }) => taskView(store, account2, task2))) } : {}
|
|
33164
33222
|
};
|
|
33165
33223
|
}), "list"),
|
|
33166
|
-
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}) => inStore(async (store, account2) => {
|
|
33224
|
+
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}, author = void 0) => inStore(async (store, account2) => {
|
|
33167
33225
|
const chosen = named2 === void 0 ? void 0 : await categoryOf(store, named2);
|
|
33168
33226
|
const source = message.trim();
|
|
33169
33227
|
const native = isNoteReference(source);
|
|
@@ -33198,7 +33256,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33198
33256
|
...plan.dueAt ? { due: plan.dueAt } : {}
|
|
33199
33257
|
};
|
|
33200
33258
|
const subject = { account: taskAccount(account2), draft };
|
|
33201
|
-
const by = origin === "owner" ? "owner" : { bot: origin };
|
|
33259
|
+
const by = author ?? (origin === "owner" ? "owner" : { bot: origin });
|
|
33202
33260
|
if (choice.attach !== void 0) {
|
|
33203
33261
|
const target2 = await owned(store, account2, choice.attach);
|
|
33204
33262
|
const similarity = await store.tasks.compare(subject, target2.id);
|
|
@@ -33292,7 +33350,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33292
33350
|
}, "release"),
|
|
33293
33351
|
close: /* @__PURE__ */ __name((id2, { as, reason, by, agent, certainty, suggestOnly }) => inStore(async (store, account2) => {
|
|
33294
33352
|
const existing = await owned(store, account2, id2);
|
|
33295
|
-
const suggested = existing.state
|
|
33353
|
+
const suggested = !isClosedState(existing.state) ? await store.tasks.closeSuggestion(id2) : null;
|
|
33296
33354
|
const state = as ?? (by === "owner" ? suggested?.as : void 0);
|
|
33297
33355
|
if (state === void 0)
|
|
33298
33356
|
throw new CliError("validation_error", "say how the task is closed: --as done, or --as dismissed");
|
|
@@ -33302,7 +33360,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
33302
33360
|
const { closeCertainty, closeSuggestion } = await store.tasks.details(task2.id);
|
|
33303
33361
|
return { ...await taskView(store, account2, task2), closeCertainty, closeSuggestion };
|
|
33304
33362
|
}, "closedView");
|
|
33305
|
-
if (by === "agent" && existing.state
|
|
33363
|
+
if (by === "agent" && !isClosedState(existing.state)) {
|
|
33306
33364
|
if (certainty === void 0)
|
|
33307
33365
|
throw new CliError("validation_error", "an agent closes a task with its certainty, 0 to 1: how sure it is the task needs nothing more", { reason: "task.certainty-required" });
|
|
33308
33366
|
const { allowed, min } = await store.tasks.agentClose();
|
|
@@ -33458,10 +33516,10 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
33458
33516
|
};
|
|
33459
33517
|
}, "taskView");
|
|
33460
33518
|
|
|
33461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33462
|
-
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
33519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
33520
|
+
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
33463
33521
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
33464
|
-
if (title !== void 0 || set !== 1)
|
|
33522
|
+
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
33465
33523
|
return "topic-edit";
|
|
33466
33524
|
if (closed !== void 0)
|
|
33467
33525
|
return closed ? "topic-close" : "topic-reopen";
|
|
@@ -33473,6 +33531,12 @@ var validTitle = /* @__PURE__ */ __name((title) => {
|
|
|
33473
33531
|
if (title.trim() === "" || new TextEncoder().encode(title).byteLength > 128)
|
|
33474
33532
|
throw new CliError("validation_error", "a topic title needs 1\u2013128 UTF-8 bytes");
|
|
33475
33533
|
}, "validTitle");
|
|
33534
|
+
var validIcon = /* @__PURE__ */ __name((icon) => {
|
|
33535
|
+
const emoji = icon.trim();
|
|
33536
|
+
if (emoji === "")
|
|
33537
|
+
throw new CliError("validation_error", "which icon? give an emoji from `topics icons list`");
|
|
33538
|
+
return emoji;
|
|
33539
|
+
}, "validIcon");
|
|
33476
33540
|
var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
33477
33541
|
const online = /* @__PURE__ */ __name(async () => {
|
|
33478
33542
|
if (deps.offline)
|
|
@@ -33488,6 +33552,11 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33488
33552
|
throw new CliError("validation_error", "which topic? give its id, from `topics list`");
|
|
33489
33553
|
return capability(await deps.connection(), "topic", "show a forum topic")(chat, id2);
|
|
33490
33554
|
}, "show"),
|
|
33555
|
+
icons: /* @__PURE__ */ __name(async () => {
|
|
33556
|
+
if (deps.offline)
|
|
33557
|
+
throw new CliError("validation_error", "`topics icons list` asks the messenger; not with --offline");
|
|
33558
|
+
return capability(await deps.connection(), "topicIcons", "list topic icons")();
|
|
33559
|
+
}, "icons"),
|
|
33491
33560
|
enable: /* @__PURE__ */ __name(async (chat, { upgrade }) => {
|
|
33492
33561
|
const connection = await online();
|
|
33493
33562
|
const probe = capability(connection, "forumState", "configure forum topics");
|
|
@@ -33564,8 +33633,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33564
33633
|
forum: true
|
|
33565
33634
|
};
|
|
33566
33635
|
}, "enable"),
|
|
33567
|
-
create: /* @__PURE__ */ __name(async (chat, title, { sendId }) => {
|
|
33636
|
+
create: /* @__PURE__ */ __name(async (chat, title, { sendId, icon: typedIcon }) => {
|
|
33568
33637
|
validTitle(title);
|
|
33638
|
+
const icon = typedIcon === void 0 ? void 0 : validIcon(typedIcon);
|
|
33569
33639
|
const connection = await online();
|
|
33570
33640
|
const create = capability(connection, "createTopic", "create forum topics");
|
|
33571
33641
|
const probe = capability(connection, "forumState", "read forum settings");
|
|
@@ -33580,7 +33650,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33580
33650
|
action: "topic-create",
|
|
33581
33651
|
key: "topics.create",
|
|
33582
33652
|
length: title.length
|
|
33583
|
-
}, () => create(target2, title, { sendId: id2 }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
33653
|
+
}, () => create(target2, title, { sendId: id2, ...icon === void 0 ? {} : { icon } }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
33584
33654
|
const state = await probe(chatId);
|
|
33585
33655
|
if (!state.forum)
|
|
33586
33656
|
throw new CliError("validation_error", "enable topics first with `topics enable`; creating a topic never upgrades a group");
|
|
@@ -33594,8 +33664,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33594
33664
|
}, "create"),
|
|
33595
33665
|
edit: /* @__PURE__ */ __name(async (chat, typedTopic, change) => {
|
|
33596
33666
|
const { title, closed, pinned, hidden } = change;
|
|
33597
|
-
|
|
33598
|
-
|
|
33667
|
+
const icon = change.icon == null ? change.icon : validIcon(change.icon);
|
|
33668
|
+
if ([title, closed, pinned, hidden, icon].every((one) => one === void 0))
|
|
33669
|
+
throw new CliError("validation_error", "nothing to change \u2014 rename, close, reopen, pin, unpin, hide or give an icon");
|
|
33599
33670
|
if (title !== void 0)
|
|
33600
33671
|
validTitle(title);
|
|
33601
33672
|
const topicId = typedTopic.trim();
|
|
@@ -33610,7 +33681,8 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33610
33681
|
...title === void 0 ? {} : { title },
|
|
33611
33682
|
...closed === void 0 ? {} : { closed },
|
|
33612
33683
|
...pinned === void 0 ? {} : { pinned },
|
|
33613
|
-
...hidden === void 0 ? {} : { hidden }
|
|
33684
|
+
...hidden === void 0 ? {} : { hidden },
|
|
33685
|
+
...icon === void 0 ? {} : { icon }
|
|
33614
33686
|
}));
|
|
33615
33687
|
return { operationId, chatId, topic };
|
|
33616
33688
|
}, "edit"),
|
|
@@ -33643,7 +33715,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33643
33715
|
};
|
|
33644
33716
|
}, "topicsService");
|
|
33645
33717
|
|
|
33646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
33647
33719
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
33648
33720
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
33649
33721
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -33717,7 +33789,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
33717
33789
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
33718
33790
|
}, "prepareEvidencePacket");
|
|
33719
33791
|
|
|
33720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
33721
33793
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
33722
33794
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
33723
33795
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -33737,7 +33809,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
33737
33809
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
33738
33810
|
}, "readEvidencePacket");
|
|
33739
33811
|
|
|
33740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
33741
33813
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
33742
33814
|
let before2 = Number.POSITIVE_INFINITY;
|
|
33743
33815
|
for (; ; ) {
|
|
@@ -33799,7 +33871,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
33799
33871
|
return { ...result, selection };
|
|
33800
33872
|
}, "searchMeetingHits");
|
|
33801
33873
|
|
|
33802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
33803
33875
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
33804
33876
|
const { maxMessages, url, ...selecting } = request;
|
|
33805
33877
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -33838,10 +33910,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
33838
33910
|
};
|
|
33839
33911
|
}, "readMeetingLinks");
|
|
33840
33912
|
|
|
33841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
33842
33914
|
import { createHash as createHash13 } from "node:crypto";
|
|
33843
33915
|
|
|
33844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
33845
33917
|
function invalid3(field, response = false) {
|
|
33846
33918
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
33847
33919
|
}
|
|
@@ -33960,7 +34032,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
33960
34032
|
}
|
|
33961
34033
|
}, "candidateCatalog");
|
|
33962
34034
|
|
|
33963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
33964
34036
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
33965
34037
|
const fixed = snapshotMeetingScope(scope);
|
|
33966
34038
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -34013,7 +34085,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
34013
34085
|
};
|
|
34014
34086
|
}, "createMeetingProjectCandidateReader");
|
|
34015
34087
|
|
|
34016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
34017
34089
|
import { createHash as createHash14 } from "node:crypto";
|
|
34018
34090
|
var scopeKeys = [
|
|
34019
34091
|
"accountId",
|
|
@@ -34148,7 +34220,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
34148
34220
|
};
|
|
34149
34221
|
}, "readMeetingProjectDiscovery");
|
|
34150
34222
|
|
|
34151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
34152
34224
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
34153
34225
|
const { limit, ...selecting } = request;
|
|
34154
34226
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -34156,7 +34228,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
34156
34228
|
return { ...review, selection };
|
|
34157
34229
|
}, "readMeetingReview");
|
|
34158
34230
|
|
|
34159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
34160
34232
|
var KIND = ["meetings-search"];
|
|
34161
34233
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
34162
34234
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -34186,7 +34258,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
34186
34258
|
};
|
|
34187
34259
|
}, "meetingSearchesService");
|
|
34188
34260
|
|
|
34189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
34190
34262
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
34191
34263
|
const { timeZone, maxRows, ...selecting } = request;
|
|
34192
34264
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -34198,7 +34270,7 @@ var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
34198
34270
|
return { ...stats, selection };
|
|
34199
34271
|
}, "readMeetingStats");
|
|
34200
34272
|
|
|
34201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
34202
34274
|
import { createHash as createHash15 } from "node:crypto";
|
|
34203
34275
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
34204
34276
|
ref: cue.reference,
|
|
@@ -34316,7 +34388,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
34316
34388
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
34317
34389
|
}, "readMeetingHitContext");
|
|
34318
34390
|
|
|
34319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
34320
34392
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
34321
34393
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
34322
34394
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -34393,7 +34465,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
34393
34465
|
return { packet, content };
|
|
34394
34466
|
}, "readMeetingPassage");
|
|
34395
34467
|
|
|
34396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
34397
34469
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
34398
34470
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
34399
34471
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -34407,10 +34479,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
34407
34479
|
};
|
|
34408
34480
|
}, "createMeetingBatchReader");
|
|
34409
34481
|
|
|
34410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
34411
34483
|
import { createHash as createHash16 } from "node:crypto";
|
|
34412
34484
|
|
|
34413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
34414
34486
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
34415
34487
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
34416
34488
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -34562,7 +34634,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
34562
34634
|
};
|
|
34563
34635
|
}, "applyMeetingEmbedding");
|
|
34564
34636
|
|
|
34565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
34566
34638
|
var DEPTH = 200;
|
|
34567
34639
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
34568
34640
|
if (value === void 0)
|
|
@@ -34699,7 +34771,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
34699
34771
|
};
|
|
34700
34772
|
}, "searchMeetingsCombined");
|
|
34701
34773
|
|
|
34702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
34703
34775
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
34704
34776
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
34705
34777
|
if (!signal?.aborted)
|
|
@@ -34804,7 +34876,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
34804
34876
|
};
|
|
34805
34877
|
}, "createMeetingContextService");
|
|
34806
34878
|
|
|
34807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
34808
34880
|
var integer = /* @__PURE__ */ __name((value, name, max) => {
|
|
34809
34881
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
34810
34882
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -35031,7 +35103,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
35031
35103
|
};
|
|
35032
35104
|
}, "openMeetingEmbedder");
|
|
35033
35105
|
|
|
35034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
35035
35107
|
var communicationFields = {
|
|
35036
35108
|
sources: pipe(array(strictObject({
|
|
35037
35109
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -35063,7 +35135,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
35063
35135
|
return { ...input, after, before: before2 };
|
|
35064
35136
|
}, "communicationRequest");
|
|
35065
35137
|
|
|
35066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
35067
35139
|
var MEETING_PREPARATION_LIMITS = {
|
|
35068
35140
|
meetings: { min: 1, max: 20, default: 5 },
|
|
35069
35141
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -35149,7 +35221,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
35149
35221
|
return { ...input, history };
|
|
35150
35222
|
}, "preparationRequest");
|
|
35151
35223
|
|
|
35152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
35153
35225
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
35154
35226
|
const section = {
|
|
35155
35227
|
readUsage: plan.reader.usage(),
|
|
@@ -35254,7 +35326,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
35254
35326
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
35255
35327
|
}, "appendPreparationCommunications");
|
|
35256
35328
|
|
|
35257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
35258
35330
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
35259
35331
|
if (port === void 0)
|
|
35260
35332
|
return void 0;
|
|
@@ -35359,7 +35431,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
35359
35431
|
}
|
|
35360
35432
|
}, "validatePreparationCommunications");
|
|
35361
35433
|
|
|
35362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
35363
35435
|
var invalid4 = /* @__PURE__ */ __name(() => {
|
|
35364
35436
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
35365
35437
|
}, "invalid");
|
|
@@ -35428,7 +35500,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
35428
35500
|
}
|
|
35429
35501
|
}, "appendKnowledgePreparation");
|
|
35430
35502
|
|
|
35431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
35432
35504
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
35433
35505
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
35434
35506
|
}, "invalid");
|
|
@@ -35502,7 +35574,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
35502
35574
|
}
|
|
35503
35575
|
}, "appendNotesPreparation");
|
|
35504
35576
|
|
|
35505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
35506
35578
|
var PAGE_LIMIT = 4;
|
|
35507
35579
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
35508
35580
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -35552,7 +35624,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
35552
35624
|
}
|
|
35553
35625
|
}, "appendProjectPreparation");
|
|
35554
35626
|
|
|
35555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
35556
35628
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
35557
35629
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
35558
35630
|
return;
|
|
@@ -35624,7 +35696,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
35624
35696
|
}
|
|
35625
35697
|
}, "appendRelatedPreparation");
|
|
35626
35698
|
|
|
35627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
35628
35700
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
35629
35701
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
35630
35702
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -35762,7 +35834,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
35762
35834
|
};
|
|
35763
35835
|
}, "createMeetingPreparationService");
|
|
35764
35836
|
|
|
35765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
35766
35838
|
import { createHash as createHash17 } from "node:crypto";
|
|
35767
35839
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
35768
35840
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -35782,7 +35854,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
35782
35854
|
};
|
|
35783
35855
|
}, "proposeMeetingTask");
|
|
35784
35856
|
|
|
35785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
35786
35858
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
35787
35859
|
const { provider, account: account2, scope } = key;
|
|
35788
35860
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -35845,7 +35917,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
35845
35917
|
}
|
|
35846
35918
|
}, "readMeetingTask");
|
|
35847
35919
|
|
|
35848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
35849
35921
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
35850
35922
|
const installer = ports.installer();
|
|
35851
35923
|
const argv = updateCommand(installer, packageName);
|
|
@@ -35910,7 +35982,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
35910
35982
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
35911
35983
|
}, "dayAfter");
|
|
35912
35984
|
|
|
35913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
35914
35986
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
35915
35987
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2) => {
|
|
35916
35988
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -35939,7 +36011,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2) => {
|
|
|
35939
36011
|
return { proposal: await store.proposedActions.approve(proposal.id, { task: task2.id }), task: task2 };
|
|
35940
36012
|
}, "approveAsTask");
|
|
35941
36013
|
|
|
35942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
35943
36015
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
35944
36016
|
const invalid6 = /* @__PURE__ */ __name((field) => {
|
|
35945
36017
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -35981,7 +36053,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
35981
36053
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
35982
36054
|
}, "storedCandidateRequest");
|
|
35983
36055
|
|
|
35984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
35985
36057
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
35986
36058
|
const fixed = snapshotMeetingScope(scope);
|
|
35987
36059
|
const store = ports?.meetings;
|
|
@@ -36073,7 +36145,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
36073
36145
|
};
|
|
36074
36146
|
}, "createStoredMeetingProjectCandidateReader");
|
|
36075
36147
|
|
|
36076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
36077
36149
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
36078
36150
|
const pictures = picturesService(deps);
|
|
36079
36151
|
const base = {
|
|
@@ -36203,6 +36275,9 @@ export {
|
|
|
36203
36275
|
engineHint,
|
|
36204
36276
|
engineStates,
|
|
36205
36277
|
imageSize,
|
|
36278
|
+
refreshedFiles,
|
|
36279
|
+
downloadMessage,
|
|
36280
|
+
saveFiles,
|
|
36206
36281
|
ATTACHMENT_QUERY,
|
|
36207
36282
|
attachmentsService,
|
|
36208
36283
|
retentionService,
|
|
@@ -36222,6 +36297,7 @@ export {
|
|
|
36222
36297
|
REVIEW_CHATS,
|
|
36223
36298
|
reviewIn,
|
|
36224
36299
|
inboxService,
|
|
36300
|
+
messageLinkTarget,
|
|
36225
36301
|
pinLengthHelp,
|
|
36226
36302
|
pinDurationOf,
|
|
36227
36303
|
sendAsCheck,
|
|
@@ -36237,9 +36313,6 @@ export {
|
|
|
36237
36313
|
ADMIN_RIGHTS,
|
|
36238
36314
|
senderIsMe,
|
|
36239
36315
|
MEDIA_KINDS,
|
|
36240
|
-
refreshedFiles,
|
|
36241
|
-
downloadMessage,
|
|
36242
|
-
saveFiles,
|
|
36243
36316
|
meaningLane,
|
|
36244
36317
|
openPictureEmbedderFor,
|
|
36245
36318
|
savePicture,
|