@wirecat/mail-cli 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +4 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-EEOMFTKE.js → all-profiles-O7HQNZOF.js} +8 -7
- package/dist/bundle/{anthropic-FPSVNB3F.js → anthropic-SNA6PTVO.js} +5 -5
- package/dist/bundle/{app-server-3T6UVR7B.js → app-server-LBKMJMKN.js} +43 -42
- package/dist/bundle/{bun-MSNAKMDK.js → bun-KF5QK2YN.js} +2 -2
- package/dist/bundle/{bun-sqlite-GIBBI5DV.js → bun-sqlite-2DKMM2PT.js} +4 -4
- package/dist/bundle/{chunk-URC4ATBD.js → chunk-2A4BAMNF.js} +4 -4
- package/dist/bundle/{chunk-7FCPLSSM.js → chunk-2F7D6YMB.js} +2 -2
- package/dist/bundle/{chunk-FVZST7ZH.js → chunk-2KVR7FF3.js} +11 -88
- package/dist/bundle/{chunk-Y2O3DACO.js → chunk-3EAAEF5U.js} +1 -1
- package/dist/bundle/{chunk-2Y3RKROM.js → chunk-3YGYB3LJ.js} +33 -6
- package/dist/bundle/{chunk-OHFSAYZG.js → chunk-5C74F7XX.js} +4 -4
- package/dist/bundle/{chunk-ZXLJ5EKZ.js → chunk-6CZQJ5XR.js} +7 -7
- package/dist/bundle/{chunk-3CBK26T2.js → chunk-6EZ7XGRG.js} +1 -1
- package/dist/bundle/{chunk-EFA7FRFJ.js → chunk-7GSE57K3.js} +2 -2
- package/dist/bundle/{chunk-UFWCJUGA.js → chunk-7LDC275M.js} +6 -6
- package/dist/bundle/{chunk-OHDDGTCH.js → chunk-AOVOIXGR.js} +9 -9
- package/dist/bundle/{chunk-VSHQITKC.js → chunk-B5XAETYU.js} +2 -2
- package/dist/bundle/chunk-BP3TZ4EY.js +91 -0
- package/dist/bundle/{chunk-V25TCQ3Z.js → chunk-DIP3ENSY.js} +1 -1
- package/dist/bundle/{chunk-WBI7J5B7.js → chunk-DPKHVBP3.js} +4 -4
- package/dist/bundle/{chunk-HANGU5HI.js → chunk-E7BTD4P6.js} +5 -5
- package/dist/bundle/{chunk-H5XCD6OG.js → chunk-ER6PJAPK.js} +2 -2
- package/dist/bundle/{chunk-JBLZ5XQG.js → chunk-F5SZVO3A.js} +3 -3
- package/dist/bundle/{chunk-3BC2XSNX.js → chunk-FTGCXIQA.js} +44 -24
- package/dist/bundle/{chunk-7L26RKOS.js → chunk-G53HRGTK.js} +16 -16
- package/dist/bundle/{chunk-H6Y2A4JA.js → chunk-H2ZURG7Q.js} +1 -1
- package/dist/bundle/{chunk-CJPEL2N5.js → chunk-H7OQ4YZV.js} +15 -15
- package/dist/bundle/{chunk-XV66LQXV.js → chunk-I62OTHDE.js} +2 -2
- package/dist/bundle/{chunk-CSJYZEFR.js → chunk-I7EWIIBC.js} +2 -2
- package/dist/bundle/{chunk-YMNF4QLY.js → chunk-IPKXRW6W.js} +22 -22
- package/dist/bundle/{chunk-M7JREJFC.js → chunk-IVDUR5Y4.js} +12 -0
- package/dist/bundle/{chunk-H3XWM2VA.js → chunk-KBFIKUCA.js} +27 -27
- package/dist/bundle/{chunk-7D7AKYQ2.js → chunk-KLLKDOO2.js} +2926 -1195
- package/dist/bundle/{chunk-UGXTDYUY.js → chunk-KQ5P5NLL.js} +1 -1
- package/dist/bundle/{chunk-SOCALLW5.js → chunk-M2YIJDBL.js} +5 -5
- package/dist/bundle/{chunk-6KDFUPBT.js → chunk-MQK2UNG4.js} +7 -7
- package/dist/bundle/{chunk-VNXCWZDW.js → chunk-MXG4L7NH.js} +248 -7
- package/dist/bundle/{chunk-NHVOJHHD.js → chunk-NGZW2JPK.js} +6 -6
- package/dist/bundle/{chunk-GQGJV53E.js → chunk-NVQUK2DH.js} +46 -46
- package/dist/bundle/{chunk-VNBQHV5H.js → chunk-OGK7LMYT.js} +5 -5
- package/dist/bundle/{chunk-BZBNBPCR.js → chunk-P547HU26.js} +9 -9
- package/dist/bundle/{chunk-XLCFCOT4.js → chunk-P62Z3Q35.js} +11 -11
- package/dist/bundle/{chunk-YHSXNUFQ.js → chunk-Q5EYTU3Q.js} +3 -3
- package/dist/bundle/{chunk-VD5UJUNR.js → chunk-QWRBAQZ7.js} +1 -1
- package/dist/bundle/{chunk-3QEYHTCQ.js → chunk-QZXHMQCM.js} +1 -1
- package/dist/bundle/{chunk-7CSK47S2.js → chunk-RE5SEGSR.js} +3 -3
- package/dist/bundle/{chunk-VMLGER4M.js → chunk-UHHARH5X.js} +192 -148
- package/dist/bundle/{chunk-LO66SLGD.js → chunk-UJEO3VWA.js} +1 -1
- package/dist/bundle/{chunk-JYZCISN7.js → chunk-UMWR5PKA.js} +12 -12
- package/dist/bundle/{chunk-XPBRNJ2V.js → chunk-V5ZID7KC.js} +1 -1
- package/dist/bundle/{chunk-MBWVZINS.js → chunk-VA3JKERH.js} +2 -2
- package/dist/bundle/{chunk-AXWTELO4.js → chunk-VERSKGJV.js} +2 -2
- package/dist/bundle/{chunk-6O6CM2ML.js → chunk-W643XZIR.js} +1 -1
- package/dist/bundle/{chunk-GIZILLRJ.js → chunk-WBJQEB6E.js} +11 -11
- package/dist/bundle/{chunk-UUBAWUUI.js → chunk-WVWNKZI4.js} +562 -404
- package/dist/bundle/chunk-X5XIFNTI.js +35 -0
- package/dist/bundle/{chunk-TBG3FRS6.js → chunk-XPREXN3W.js} +2 -2
- package/dist/bundle/{chunk-ZSS22YHM.js → chunk-XRJIQC6P.js} +1 -1
- package/dist/bundle/{chunk-5XTJUQZ5.js → chunk-YG4OI3HJ.js} +456 -201
- package/dist/bundle/{chunk-IGSHWMWC.js → chunk-ZCPUKUST.js} +1 -1
- package/dist/bundle/command-contract-B3OGAIDB.js +34 -0
- package/dist/bundle/{decode-YRTMNHC6.js → decode-X7Y2VSYZ.js} +4 -4
- package/dist/bundle/{dispatch-BCS2RDF4.js → dispatch-OWNO2CMC.js} +1 -1
- package/dist/bundle/{dist-NOBSXRL2.js → dist-L7FNC74Q.js} +40 -11
- package/dist/bundle/{echarts-5UKZVIF6.js → echarts-5AB3LFVD.js} +2 -2
- package/dist/bundle/{embed-G62XY6BJ.js → embed-VBS5LRCE.js} +5 -5
- package/dist/bundle/{embedder-SCHGLA74.js → embedder-VFSYBDKK.js} +8 -8
- package/dist/bundle/{failure-N5S6ZS62.js → failure-E534GZDF.js} +1 -1
- package/dist/bundle/{first-run-DPF2BBQN.js → first-run-NO2ODH2W.js} +8 -8
- package/dist/bundle/first-screen-7VJLGMJJ.js +32 -0
- package/dist/bundle/{instructions-7RP5OKLE.js → instructions-52W6ZQTU.js} +1 -1
- package/dist/bundle/mail.js +5 -5
- package/dist/bundle/{node-ENCKD6SS.js → node-TL2PBNKO.js} +2 -2
- package/dist/bundle/{node-sqlite-4ICXMPYY.js → node-sqlite-757HNQAD.js} +5 -5
- package/dist/bundle/{oauth-CX2WYMGN.js → oauth-VDRNJ7KN.js} +6 -6
- package/dist/bundle/{open-HQZYHMVE.js → open-NUWYOKPO.js} +4 -4
- package/dist/bundle/{openai-3ONJIA3F.js → openai-YLBFVK5X.js} +12 -12
- package/dist/bundle/{process-OK3HRPMD.js → process-PWAGP6YY.js} +1 -1
- package/dist/bundle/{program-FLKUE6LL.js → program-PPUPVL7O.js} +755 -646
- package/dist/bundle/{prompt-ZWKUQ42Y.js → prompt-M5U66RVJ.js} +4 -4
- package/dist/bundle/{recognize-PHDYO6DC.js → recognize-DCMDZA2U.js} +3 -3
- package/dist/bundle/{remote-4CX7GFMU.js → remote-4SHI5WJG.js} +6 -6
- package/dist/bundle/{rerank-ZCZTGXDQ.js → rerank-DYMZMNPQ.js} +6 -6
- package/dist/bundle/{serve-3LBS7CPR.js → serve-HO3WME4G.js} +8 -8
- package/dist/bundle/server-244FHPY4.js +64 -0
- package/dist/bundle/{server-2BKI2OQP.js → server-R3TIPRZN.js} +35 -34
- package/dist/bundle/{sqlite-runtime-J5T7SR5W.js → sqlite-runtime-DWRITUIH.js} +5 -5
- package/dist/bundle/{state-TIRNYVEL.js → state-QOMUDOGF.js} +5 -5
- package/dist/bundle/{store-F7ZXMIAP.js → store-LHHMOE5V.js} +21 -14
- package/dist/bundle/{store-NGE2E7KZ.js → store-RGO6IABA.js} +13 -12
- package/dist/bundle/store-maintenance-command-LU2ZBDUY.js +54 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-72CGQMAZ.js +0 -18
- package/dist/bundle/command-contract-6QSZ5QHQ.js +0 -33
- package/dist/bundle/first-screen-4MRKF6RQ.js +0 -31
- package/dist/bundle/server-X5F7VD2E.js +0 -63
- package/dist/bundle/store-maintenance-command-QZV76KAH.js +0 -53
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UMWR5PKA.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_ACTIONS,
|
|
14
14
|
ModerationRules,
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
someUndone,
|
|
27
27
|
validateFormattedText,
|
|
28
28
|
visibleFormattedText
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-P547HU26.js";
|
|
30
30
|
import {
|
|
31
31
|
MAX_MODEL_IMAGE_BYTES
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-6EZ7XGRG.js";
|
|
33
33
|
import {
|
|
34
34
|
Command,
|
|
35
35
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -69,17 +69,17 @@ import {
|
|
|
69
69
|
typedCommand,
|
|
70
70
|
vectorModelKey,
|
|
71
71
|
withAttempt
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-YG4OI3HJ.js";
|
|
73
73
|
import {
|
|
74
74
|
isCliFailure
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-2KVR7FF3.js";
|
|
76
76
|
import {
|
|
77
77
|
isNewer,
|
|
78
78
|
updateCommand
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-2F7D6YMB.js";
|
|
80
80
|
import {
|
|
81
81
|
remoteKey
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-7GSE57K3.js";
|
|
83
83
|
import {
|
|
84
84
|
Unzip,
|
|
85
85
|
UnzipInflate,
|
|
@@ -90,11 +90,11 @@ import {
|
|
|
90
90
|
placedText,
|
|
91
91
|
runEmbedders,
|
|
92
92
|
textModelsDirectory
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-OGK7LMYT.js";
|
|
94
94
|
import {
|
|
95
95
|
installFiles,
|
|
96
96
|
megabytes
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-F5SZVO3A.js";
|
|
98
98
|
import {
|
|
99
99
|
AGENDA_COLUMNS,
|
|
100
100
|
CHAT_COLUMNS,
|
|
@@ -128,6 +128,7 @@ import {
|
|
|
128
128
|
contextSource,
|
|
129
129
|
correctWords,
|
|
130
130
|
cutChunks,
|
|
131
|
+
delayStats,
|
|
131
132
|
dueDayOf,
|
|
132
133
|
entriesOfList,
|
|
133
134
|
exhausted,
|
|
@@ -155,7 +156,7 @@ import {
|
|
|
155
156
|
threadConversation,
|
|
156
157
|
validateAst,
|
|
157
158
|
validateFields
|
|
158
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-KLLKDOO2.js";
|
|
159
160
|
import {
|
|
160
161
|
COUNTER_FIELDS,
|
|
161
162
|
INTERNAL_NOTES,
|
|
@@ -173,14 +174,15 @@ import {
|
|
|
173
174
|
parseLocator,
|
|
174
175
|
parseReference,
|
|
175
176
|
providerNamed,
|
|
176
|
-
rankingOptions
|
|
177
|
-
|
|
177
|
+
rankingOptions,
|
|
178
|
+
rankingQuestion
|
|
179
|
+
} from "./chunk-MXG4L7NH.js";
|
|
178
180
|
import {
|
|
179
181
|
TASK_KINDS,
|
|
180
182
|
TASK_STATES,
|
|
181
183
|
createTaskService,
|
|
182
184
|
isClosedState
|
|
183
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-NGZW2JPK.js";
|
|
184
186
|
import {
|
|
185
187
|
EVENT_QUERY,
|
|
186
188
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -210,7 +212,6 @@ import {
|
|
|
210
212
|
normalizeTag,
|
|
211
213
|
parseLucene,
|
|
212
214
|
parseMeetingReference,
|
|
213
|
-
paymentTitle,
|
|
214
215
|
pull,
|
|
215
216
|
queryError,
|
|
216
217
|
queryFieldsOf,
|
|
@@ -222,24 +223,24 @@ import {
|
|
|
222
223
|
validateQuery,
|
|
223
224
|
walkQuery,
|
|
224
225
|
zonedMoment
|
|
225
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-UHHARH5X.js";
|
|
226
227
|
import {
|
|
227
228
|
DEFAULT_STEMMERS,
|
|
228
229
|
createStemmer,
|
|
229
230
|
fold,
|
|
230
231
|
normalize
|
|
231
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-MQK2UNG4.js";
|
|
232
233
|
import {
|
|
233
234
|
DEFAULT_TASK_CATEGORIES,
|
|
234
235
|
FALLBACK_CATEGORY
|
|
235
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-M2YIJDBL.js";
|
|
236
237
|
import {
|
|
237
238
|
storePath,
|
|
238
239
|
wirecatDirectory
|
|
239
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-X5XIFNTI.js";
|
|
240
241
|
import {
|
|
241
242
|
resolvePaths
|
|
242
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-3EAAEF5U.js";
|
|
243
244
|
import {
|
|
244
245
|
array,
|
|
245
246
|
boolean,
|
|
@@ -256,7 +257,7 @@ import {
|
|
|
256
257
|
safeParse,
|
|
257
258
|
strictObject,
|
|
258
259
|
string
|
|
259
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-IVDUR5Y4.js";
|
|
260
261
|
import {
|
|
261
262
|
importFrom,
|
|
262
263
|
resolveFrom
|
|
@@ -286,9 +287,9 @@ var require_conventions = __commonJS({
|
|
|
286
287
|
}
|
|
287
288
|
for (var i = 0; i < list2.length; i++) {
|
|
288
289
|
if (hasOwn(list2, i)) {
|
|
289
|
-
var
|
|
290
|
-
if (predicate.call(void 0,
|
|
291
|
-
return
|
|
290
|
+
var item2 = list2[i];
|
|
291
|
+
if (predicate.call(void 0, item2, i, list2)) {
|
|
292
|
+
return item2;
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
}
|
|
@@ -1097,8 +1098,8 @@ var require_dom = __commonJS({
|
|
|
1097
1098
|
* The first index of the node in the NodeList; -1 if not found.
|
|
1098
1099
|
* @private
|
|
1099
1100
|
*/
|
|
1100
|
-
indexOf: /* @__PURE__ */ __name(function(
|
|
1101
|
-
return Array.prototype.indexOf.call(this,
|
|
1101
|
+
indexOf: /* @__PURE__ */ __name(function(item2) {
|
|
1102
|
+
return Array.prototype.indexOf.call(this, item2);
|
|
1102
1103
|
}, "indexOf")
|
|
1103
1104
|
};
|
|
1104
1105
|
NodeList.prototype[Symbol.iterator] = function() {
|
|
@@ -16881,10 +16882,10 @@ var require_lib3 = __commonJS({
|
|
|
16881
16882
|
}
|
|
16882
16883
|
});
|
|
16883
16884
|
|
|
16884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16885
16886
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16886
16887
|
|
|
16887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16888
16889
|
var RULES_VERSION = 5;
|
|
16889
16890
|
var LOOK_BACK = 50;
|
|
16890
16891
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16974,7 +16975,7 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16974
16975
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16975
16976
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16976
16977
|
|
|
16977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
16978
16979
|
var COMMAND_NEEDS = {
|
|
16979
16980
|
"account update": ["updateProfile", "change the profile"],
|
|
16980
16981
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17024,7 +17025,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17024
17025
|
return group;
|
|
17025
17026
|
}, "hideNever");
|
|
17026
17027
|
|
|
17027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17028
17029
|
var AUDIT_PAGE = 200;
|
|
17029
17030
|
var AUDIT_BUDGET = 10;
|
|
17030
17031
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17104,7 +17105,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17104
17105
|
return found;
|
|
17105
17106
|
}, "burstJoins");
|
|
17106
17107
|
|
|
17107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17108
17109
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17109
17110
|
command.allowUnknownOption();
|
|
17110
17111
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17124,7 +17125,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17124
17125
|
return command;
|
|
17125
17126
|
}, "queryWordsAfterOptions");
|
|
17126
17127
|
|
|
17127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17128
17129
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17129
17130
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17130
17131
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17166,7 +17167,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17166
17167
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17167
17168
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17168
17169
|
|
|
17169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17170
17171
|
var integer = /* @__PURE__ */ __name((value) => {
|
|
17171
17172
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17172
17173
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17189,7 +17190,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17189
17190
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17190
17191
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17191
17192
|
|
|
17192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17193
17194
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17194
17195
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17195
17196
|
const zone = timezoneOf();
|
|
@@ -17275,7 +17276,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17275
17276
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17276
17277
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17277
17278
|
|
|
17278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17279
17280
|
var integer3 = /* @__PURE__ */ __name((text2) => {
|
|
17280
17281
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17281
17282
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17407,7 +17408,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17407
17408
|
}, "addMeetingCommandsDefinition");
|
|
17408
17409
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17409
17410
|
|
|
17410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17411
17412
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17412
17413
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17413
17414
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17540,7 +17541,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17540
17541
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17541
17542
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17542
17543
|
|
|
17543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17544
17545
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17545
17546
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17546
17547
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17549,7 +17550,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17549
17550
|
var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
|
|
17550
17551
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17551
17552
|
|
|
17552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17553
17554
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17554
17555
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17555
17556
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17740,7 +17741,7 @@ var folderAnswer = /* @__PURE__ */ __name((folder) => {
|
|
|
17740
17741
|
excluded_chats: shown?.excluded
|
|
17741
17742
|
});
|
|
17742
17743
|
}, "folderAnswer");
|
|
17743
|
-
var lines = /* @__PURE__ */ __name((line2) => (body) => (body.items ?? (body.item === void 0 ? [] : [body.item])).map((
|
|
17744
|
+
var lines = /* @__PURE__ */ __name((line2) => (body) => (body.items ?? (body.item === void 0 ? [] : [body.item])).map((item2) => `${line2(item2).trimEnd()}
|
|
17744
17745
|
`).join(""), "lines");
|
|
17745
17746
|
var pageOf2 = /* @__PURE__ */ __name(({ limit, page, all }, { items, hasMore }) => all ? { limit: Math.max(1, items.length), has_more: false, page: 1 } : { limit, has_more: hasMore, page }, "pageOf");
|
|
17746
17747
|
var wholeList = /* @__PURE__ */ __name((command, items, extra = {}) => listOf(command, { items, limit: Math.max(1, items.length), has_more: false, ...extra }), "wholeList");
|
|
@@ -17811,7 +17812,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17811
17812
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17812
17813
|
}), "sessionAnswer");
|
|
17813
17814
|
|
|
17814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17815
17816
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17816
17817
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17817
17818
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17824,11 +17825,11 @@ var storeAbsent = /* @__PURE__ */ __name((error) => {
|
|
|
17824
17825
|
return error instanceof Error && typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
17825
17826
|
}, "storeAbsent");
|
|
17826
17827
|
var accountUnknown = /* @__PURE__ */ __name((error) => isCliFailure(error) && (error.code === "not_found" || error.code === "authentication_error"), "accountUnknown");
|
|
17827
|
-
var unless = /* @__PURE__ */ __name(async (work,
|
|
17828
|
+
var unless = /* @__PURE__ */ __name(async (work, expected2) => {
|
|
17828
17829
|
try {
|
|
17829
17830
|
return await work();
|
|
17830
17831
|
} catch (error) {
|
|
17831
|
-
if (
|
|
17832
|
+
if (expected2(error))
|
|
17832
17833
|
return void 0;
|
|
17833
17834
|
throw error;
|
|
17834
17835
|
}
|
|
@@ -17875,7 +17876,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17875
17876
|
}), "storedDeps");
|
|
17876
17877
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17877
17878
|
|
|
17878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17879
17880
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17880
17881
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17881
17882
|
if (key in own)
|
|
@@ -17892,12 +17893,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17892
17893
|
return found.bind(adapter);
|
|
17893
17894
|
}, "capability");
|
|
17894
17895
|
|
|
17895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17896
17897
|
import { randomBytes } from "node:crypto";
|
|
17897
17898
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17898
17899
|
var newOperationId = newSendId;
|
|
17899
17900
|
|
|
17900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17901
17902
|
var LINKS = /https?:\/\/\S+/g;
|
|
17902
17903
|
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");
|
|
17903
17904
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -17927,7 +17928,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
17927
17928
|
});
|
|
17928
17929
|
}, "questions");
|
|
17929
17930
|
|
|
17930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
17931
17932
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17932
17933
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17933
17934
|
const name = typed.trim().toLowerCase();
|
|
@@ -17984,7 +17985,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
17984
17985
|
return best.name;
|
|
17985
17986
|
}, "categorize");
|
|
17986
17987
|
|
|
17987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
17988
17989
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
17989
17990
|
var RULES_IN = {
|
|
17990
17991
|
dialog: "all",
|
|
@@ -18190,7 +18191,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18190
18191
|
return passes;
|
|
18191
18192
|
}, "applyTaskRulesToChats");
|
|
18192
18193
|
|
|
18193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
18194
18195
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
18195
18196
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
18196
18197
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -18230,7 +18231,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
18230
18231
|
};
|
|
18231
18232
|
}, "dateWindow");
|
|
18232
18233
|
|
|
18233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18234
18235
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18235
18236
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18236
18237
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18253,10 +18254,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18253
18254
|
}
|
|
18254
18255
|
}, "patiently");
|
|
18255
18256
|
|
|
18256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18257
18258
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18258
18259
|
|
|
18259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18260
18261
|
var REQUEST_MS = 400;
|
|
18261
18262
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18262
18263
|
const lowest = ranges[0];
|
|
@@ -18279,13 +18280,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18279
18280
|
};
|
|
18280
18281
|
}, "estimateBackfill");
|
|
18281
18282
|
|
|
18282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18283
18284
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18284
18285
|
...error,
|
|
18285
18286
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18286
18287
|
}), "withRecovery");
|
|
18287
18288
|
|
|
18288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18289
18290
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18290
18291
|
if (isCliFailure(error))
|
|
18291
18292
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18368,7 +18369,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18368
18369
|
};
|
|
18369
18370
|
}, "mergeBatches");
|
|
18370
18371
|
|
|
18371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18372
18373
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18373
18374
|
if (deps.reads !== "store")
|
|
18374
18375
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18527,7 +18528,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18527
18528
|
}
|
|
18528
18529
|
}, "senderAmong");
|
|
18529
18530
|
|
|
18530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18531
18532
|
var CONTEXT_MESSAGES = 3;
|
|
18532
18533
|
var CONTEXT_MINUTES = 10;
|
|
18533
18534
|
var MAX_CHARS = 1200;
|
|
@@ -18551,12 +18552,12 @@ var context = {
|
|
|
18551
18552
|
}, "describe")
|
|
18552
18553
|
};
|
|
18553
18554
|
|
|
18554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18555
18556
|
var BUILT_INS = [context];
|
|
18556
18557
|
var providers = [...BUILT_INS];
|
|
18557
18558
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18558
18559
|
|
|
18559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18560
18561
|
var READ_PAGE = 5e3;
|
|
18561
18562
|
var CHAIN = 50;
|
|
18562
18563
|
var CONVERSATION_QUERY = {
|
|
@@ -18708,7 +18709,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
18708
18709
|
return size2;
|
|
18709
18710
|
}, "sized");
|
|
18710
18711
|
|
|
18711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18712
18713
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18713
18714
|
var MESSAGE_PAGE = 5e3;
|
|
18714
18715
|
var PER_SESSION = 8;
|
|
@@ -18727,7 +18728,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18727
18728
|
price: remote.price,
|
|
18728
18729
|
installed: true,
|
|
18729
18730
|
perBatch: PER_REQUEST * concurrency,
|
|
18730
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18731
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-4SHI5WJG.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18731
18732
|
};
|
|
18732
18733
|
}
|
|
18733
18734
|
const model = textModel(choice);
|
|
@@ -18744,7 +18745,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18744
18745
|
if (!isTextModelInstalled(model, directory2))
|
|
18745
18746
|
throw notDownloaded(model.id);
|
|
18746
18747
|
if (apart) {
|
|
18747
|
-
const { openProcess } = await import("./process-
|
|
18748
|
+
const { openProcess } = await import("./process-PWAGP6YY.js");
|
|
18748
18749
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18749
18750
|
}
|
|
18750
18751
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19033,7 +19034,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19033
19034
|
return { ...one, state };
|
|
19034
19035
|
}, "shaped");
|
|
19035
19036
|
|
|
19036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19037
19038
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19038
19039
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19039
19040
|
for (const [key, value, maximum] of [
|
|
@@ -19086,7 +19087,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19086
19087
|
}
|
|
19087
19088
|
}, "catchUpSearch");
|
|
19088
19089
|
|
|
19089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19090
19091
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19091
19092
|
if (deps.reads === "store") {
|
|
19092
19093
|
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`);
|
|
@@ -19452,7 +19453,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19452
19453
|
return message?.timestamp ?? fallback;
|
|
19453
19454
|
}, "timeOfKey");
|
|
19454
19455
|
|
|
19455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
19456
19457
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
19457
19458
|
import { open, stat } from "node:fs/promises";
|
|
19458
19459
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -19654,7 +19655,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
19654
19655
|
return { name, source };
|
|
19655
19656
|
}, "readStickerFile");
|
|
19656
19657
|
|
|
19657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19658
19659
|
var DAY_MS = 864e5;
|
|
19659
19660
|
var NEW_DAYS = 30;
|
|
19660
19661
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19731,7 +19732,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19731
19732
|
};
|
|
19732
19733
|
}, "scorePerson");
|
|
19733
19734
|
|
|
19734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19735
19736
|
var REGISTRIES = {
|
|
19736
19737
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19737
19738
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -19816,7 +19817,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
19816
19817
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
19817
19818
|
})), "notCovered");
|
|
19818
19819
|
|
|
19819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
19820
19821
|
var ACTIVITY_MESSAGES = 1e3;
|
|
19821
19822
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
19822
19823
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -19904,7 +19905,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
19904
19905
|
};
|
|
19905
19906
|
}, "botCheckService");
|
|
19906
19907
|
|
|
19907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
19908
19909
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
19909
19910
|
if (value === void 0)
|
|
19910
19911
|
return void 0;
|
|
@@ -19914,7 +19915,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
19914
19915
|
return id2;
|
|
19915
19916
|
}, "threadIdOf");
|
|
19916
19917
|
|
|
19917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
19918
19919
|
var TOP_POSTS = 5;
|
|
19919
19920
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
19920
19921
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20031,7 +20032,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20031
20032
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20032
20033
|
}, "median");
|
|
20033
20034
|
|
|
20034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20035
20036
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20036
20037
|
const events = [];
|
|
20037
20038
|
for (const stay of stays) {
|
|
@@ -20063,7 +20064,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20063
20064
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20064
20065
|
}, "memberEvents");
|
|
20065
20066
|
|
|
20066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20067
20068
|
var EVENTS_DAYS = 7;
|
|
20068
20069
|
var TRACKED_DAYS = 30;
|
|
20069
20070
|
var STATS_PAGE = 1e3;
|
|
@@ -20081,18 +20082,18 @@ var storedEvents = /* @__PURE__ */ __name(async (store, deps, chat, since) => {
|
|
|
20081
20082
|
var deepChecks = /* @__PURE__ */ __name(async (deps, items, deep, pauseMs, registry) => {
|
|
20082
20083
|
const checks = botCheckService(deps);
|
|
20083
20084
|
const checked2 = [];
|
|
20084
|
-
for (const [index,
|
|
20085
|
+
for (const [index, item2] of items.entries()) {
|
|
20085
20086
|
if (index >= deep) {
|
|
20086
|
-
checked2.push(
|
|
20087
|
+
checked2.push(item2);
|
|
20087
20088
|
continue;
|
|
20088
20089
|
}
|
|
20089
20090
|
if (index > 0)
|
|
20090
20091
|
await new Promise((resolve7) => setTimeout(resolve7, pauseMs));
|
|
20091
|
-
const { score, reasons, registries, unknown: unknown2 } = await checks.person(
|
|
20092
|
+
const { score, reasons, registries, unknown: unknown2 } = await checks.person(item2.id, {
|
|
20092
20093
|
registries: true,
|
|
20093
20094
|
...registry ? { registry } : {}
|
|
20094
20095
|
});
|
|
20095
|
-
checked2.push({ ...
|
|
20096
|
+
checked2.push({ ...item2, check: { score, reasons, registries, unknown: unknown2 } });
|
|
20096
20097
|
}
|
|
20097
20098
|
return checked2;
|
|
20098
20099
|
}, "deepChecks");
|
|
@@ -20358,7 +20359,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20358
20359
|
return members.length === 0 ? null : members;
|
|
20359
20360
|
}, "storedMembers");
|
|
20360
20361
|
|
|
20361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20362
20363
|
var INBOX_CHATS = 20;
|
|
20363
20364
|
var REVIEW_DAYS = 3;
|
|
20364
20365
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20566,7 +20567,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20566
20567
|
};
|
|
20567
20568
|
}, "inboxService");
|
|
20568
20569
|
|
|
20569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
20570
20571
|
var CONTEXT_MESSAGES2 = 10;
|
|
20571
20572
|
var CONTEXT_BYTES = 64 * 1024;
|
|
20572
20573
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -20751,8 +20752,8 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
20751
20752
|
var withinBytes = /* @__PURE__ */ __name((lists, bytes2) => {
|
|
20752
20753
|
let used = 0;
|
|
20753
20754
|
let cut = false;
|
|
20754
|
-
const keep2 = /* @__PURE__ */ __name((items) => items.filter((
|
|
20755
|
-
const size2 = Buffer.byteLength(JSON.stringify(
|
|
20755
|
+
const keep2 = /* @__PURE__ */ __name((items) => items.filter((item2) => {
|
|
20756
|
+
const size2 = Buffer.byteLength(JSON.stringify(item2), "utf8");
|
|
20756
20757
|
if (cut || used + size2 > bytes2) {
|
|
20757
20758
|
cut = true;
|
|
20758
20759
|
return false;
|
|
@@ -20827,10 +20828,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
20827
20828
|
};
|
|
20828
20829
|
}, "personMessages");
|
|
20829
20830
|
|
|
20830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
20831
20832
|
import { createHash } from "node:crypto";
|
|
20832
20833
|
|
|
20833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
20834
20835
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
20835
20836
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
20836
20837
|
const parsed = parseMeetingReference(reference);
|
|
@@ -20848,7 +20849,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
20848
20849
|
return { parsed, meeting };
|
|
20849
20850
|
}, "authorizedMeetingMetadata");
|
|
20850
20851
|
|
|
20851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
20852
20853
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
20853
20854
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
20854
20855
|
if (signal?.aborted)
|
|
@@ -20994,16 +20995,16 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
20994
20995
|
hasMore = true;
|
|
20995
20996
|
break;
|
|
20996
20997
|
}
|
|
20997
|
-
const
|
|
20998
|
-
const bytes2 = Buffer.byteLength(JSON.stringify(
|
|
20998
|
+
const item2 = cueEvidence(accountId, meeting.id, page.transcript, row);
|
|
20999
|
+
const bytes2 = Buffer.byteLength(JSON.stringify(item2), "utf8") + (items.length ? 1 : 0);
|
|
20999
21000
|
if (contentBytes + bytes2 > limits.bytes) {
|
|
21000
21001
|
truncatedBy = "bytes";
|
|
21001
21002
|
hasMore = true;
|
|
21002
21003
|
break;
|
|
21003
21004
|
}
|
|
21004
|
-
items.push(
|
|
21005
|
+
items.push(item2);
|
|
21005
21006
|
contentBytes += bytes2;
|
|
21006
|
-
nextReference =
|
|
21007
|
+
nextReference = item2.reference;
|
|
21007
21008
|
afterPosition = row.position;
|
|
21008
21009
|
}
|
|
21009
21010
|
if (truncatedBy !== null || parsed.cuePosition !== void 0 || !page.hasMore)
|
|
@@ -21047,7 +21048,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21047
21048
|
return { ...packet, fingerprint: hash(packet) };
|
|
21048
21049
|
}, "readMeetingEvidence");
|
|
21049
21050
|
|
|
21050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21051
21052
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21052
21053
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21053
21054
|
const requestedAccounts = options.accountIds;
|
|
@@ -21111,7 +21112,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21111
21112
|
}
|
|
21112
21113
|
throw error;
|
|
21113
21114
|
}
|
|
21114
|
-
const
|
|
21115
|
+
const item2 = {
|
|
21115
21116
|
reference,
|
|
21116
21117
|
cues: evidence.items,
|
|
21117
21118
|
cueCoverage: {
|
|
@@ -21120,12 +21121,12 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21120
21121
|
hasMore: evidence.coverage.hasMore
|
|
21121
21122
|
}
|
|
21122
21123
|
};
|
|
21123
|
-
const itemBytes = Buffer.byteLength(JSON.stringify(
|
|
21124
|
+
const itemBytes = Buffer.byteLength(JSON.stringify(item2), "utf8") + (items.length ? 1 : 0);
|
|
21124
21125
|
if (contentBytes + itemBytes > bytes2) {
|
|
21125
21126
|
truncatedBy = "bytes";
|
|
21126
21127
|
break;
|
|
21127
21128
|
}
|
|
21128
|
-
items.push(
|
|
21129
|
+
items.push(item2);
|
|
21129
21130
|
contentBytes += itemBytes;
|
|
21130
21131
|
}
|
|
21131
21132
|
checkMeetingCancelled(signal);
|
|
@@ -21146,7 +21147,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21146
21147
|
};
|
|
21147
21148
|
}, "personMeetingContext");
|
|
21148
21149
|
|
|
21149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21150
21151
|
var PREPARE_BYTES = 96 * 1024;
|
|
21151
21152
|
var MEETINGS = 5;
|
|
21152
21153
|
var CUES = 3;
|
|
@@ -21159,14 +21160,14 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21159
21160
|
const budgeted = /* @__PURE__ */ __name((page) => {
|
|
21160
21161
|
const items = [];
|
|
21161
21162
|
let cut = false;
|
|
21162
|
-
for (const
|
|
21163
|
-
const bytes2 = size(
|
|
21163
|
+
for (const item2 of page.items.slice(0, limit)) {
|
|
21164
|
+
const bytes2 = size(item2);
|
|
21164
21165
|
if (cut || bytes2 > left) {
|
|
21165
21166
|
cut = true;
|
|
21166
21167
|
continue;
|
|
21167
21168
|
}
|
|
21168
21169
|
left -= bytes2;
|
|
21169
|
-
items.push(
|
|
21170
|
+
items.push(item2);
|
|
21170
21171
|
}
|
|
21171
21172
|
const over = page.hasMore || page.items.length > limit;
|
|
21172
21173
|
return {
|
|
@@ -21249,7 +21250,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21249
21250
|
bytes: Math.min(left(), 4 * 1024 * 1024),
|
|
21250
21251
|
...since === void 0 ? {} : { since }
|
|
21251
21252
|
});
|
|
21252
|
-
const read = new Set(found.items.map((
|
|
21253
|
+
const read = new Set(found.items.map((item2) => parseMeetingReference(item2.reference).accountId));
|
|
21253
21254
|
return {
|
|
21254
21255
|
items: found.items,
|
|
21255
21256
|
hasMore: found.coverage.truncatedBy !== null || found.coverage.scanLimitReached,
|
|
@@ -21263,7 +21264,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21263
21264
|
}
|
|
21264
21265
|
}, "meetingsOf");
|
|
21265
21266
|
|
|
21266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21267
21268
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21268
21269
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21269
21270
|
const held = await storeIfOpen(deps);
|
|
@@ -21333,7 +21334,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21333
21334
|
complete: false
|
|
21334
21335
|
})), "quiet");
|
|
21335
21336
|
|
|
21336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21337
21338
|
var TIMELINE_ITEMS = 50;
|
|
21338
21339
|
var TIMELINE_MAX = 500;
|
|
21339
21340
|
var SCOPES = ["personal", "work"];
|
|
@@ -21388,7 +21389,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21388
21389
|
};
|
|
21389
21390
|
}, "personTimeline");
|
|
21390
21391
|
|
|
21391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21392
21393
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21393
21394
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21394
21395
|
const held = await storeIfOpen(deps);
|
|
@@ -21615,7 +21616,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
21615
21616
|
return rest;
|
|
21616
21617
|
}, "withoutPhone");
|
|
21617
21618
|
|
|
21618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
21619
21620
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
21620
21621
|
const tags = /* @__PURE__ */ new Map();
|
|
21621
21622
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -21624,7 +21625,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
21624
21625
|
return tags;
|
|
21625
21626
|
}, "taskTagFilters");
|
|
21626
21627
|
|
|
21627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
21628
21629
|
var TASK_QUERY = {
|
|
21629
21630
|
entity: "task",
|
|
21630
21631
|
backend: "sql",
|
|
@@ -22104,7 +22105,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22104
22105
|
};
|
|
22105
22106
|
}, "taskView");
|
|
22106
22107
|
|
|
22107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
22108
22109
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
22109
22110
|
if (newest === null)
|
|
22110
22111
|
return null;
|
|
@@ -22113,7 +22114,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
22113
22114
|
return newest.addressed ? "owed" : null;
|
|
22114
22115
|
}, "mailTurn");
|
|
22115
22116
|
|
|
22116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
22117
22118
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
22118
22119
|
if (error instanceof CliError && error.code === "not_found")
|
|
22119
22120
|
return void 0;
|
|
@@ -22171,7 +22172,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22171
22172
|
};
|
|
22172
22173
|
}, "mailActivity");
|
|
22173
22174
|
|
|
22174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22175
22176
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22176
22177
|
const ids = [...new Set(chatIds)];
|
|
22177
22178
|
if (ids.length === 0)
|
|
@@ -22197,7 +22198,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22197
22198
|
}));
|
|
22198
22199
|
}, "chatCoverage");
|
|
22199
22200
|
|
|
22200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
22201
22202
|
var DAY = 864e5;
|
|
22202
22203
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
22203
22204
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -22444,7 +22445,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
22444
22445
|
};
|
|
22445
22446
|
}, "agendaItem");
|
|
22446
22447
|
|
|
22447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
22448
22449
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
22449
22450
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
22450
22451
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -22467,33 +22468,33 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
22467
22468
|
if (big !== void 0 && (!big || page.items.length || typeof big.ref !== "string" || !Number.isSafeInteger(big.bytes) || big.bytes <= maxReadBytes))
|
|
22468
22469
|
fail2();
|
|
22469
22470
|
let actual = 0;
|
|
22470
|
-
for (const
|
|
22471
|
-
if (!
|
|
22471
|
+
for (const item2 of page.items) {
|
|
22472
|
+
if (!item2 || item2.provider !== source.provider || item2.account !== source.account || typeof item2.text !== "string" || typeof item2.ref !== "string")
|
|
22472
22473
|
fail2();
|
|
22473
|
-
if (!Number.isSafeInteger(
|
|
22474
|
+
if (!Number.isSafeInteger(item2.at) || item2.at < after || item2.at >= before2 || !Number.isSafeInteger(item2.updatedAt) || item2.updatedAt < 0)
|
|
22474
22475
|
fail2();
|
|
22475
|
-
if (
|
|
22476
|
+
if (item2.revision !== null && (!Number.isSafeInteger(item2.revision) || item2.revision < 1))
|
|
22476
22477
|
fail2();
|
|
22477
|
-
if (source.kind === "document" ? !["source-modified", "stored-update"].includes(
|
|
22478
|
+
if (source.kind === "document" ? !["source-modified", "stored-update"].includes(item2.timeKind) : item2.timeKind !== (source.kind === "meeting" ? "meeting-start" : "sent"))
|
|
22478
22479
|
fail2();
|
|
22479
|
-
const sender =
|
|
22480
|
+
const sender = item2.sender;
|
|
22480
22481
|
if (sender != null && (typeof sender !== "object" || typeof sender.provider !== "string" || typeof sender.id !== "string" || typeof sender.owner !== "boolean" || [sender.name, sender.person, sender.personName].some((v) => v !== null && typeof v !== "string") || sender.person !== null && !/^person:[1-9]\d*$/.test(sender.person)))
|
|
22481
22482
|
fail2();
|
|
22482
|
-
const text2 = [
|
|
22483
|
+
const text2 = [item2.text, item2.title, item2.url, item2.provider, item2.account, item2.timeKind];
|
|
22483
22484
|
if (text2.some((value) => value !== null && typeof value !== "string"))
|
|
22484
22485
|
fail2();
|
|
22485
22486
|
if (source.kind === "document") {
|
|
22486
|
-
const id2 = Number(
|
|
22487
|
-
if (!Number.isSafeInteger(id2) || id2 < 1 ||
|
|
22487
|
+
const id2 = Number(item2.ref.slice(9));
|
|
22488
|
+
if (!Number.isSafeInteger(id2) || id2 < 1 || item2.ref !== `document:${id2}`)
|
|
22488
22489
|
fail2();
|
|
22489
22490
|
} else if (source.kind === "meeting") {
|
|
22490
|
-
const reference = parseMeetingReference(
|
|
22491
|
-
if (reference.accountId !== source.accountId || reference.transcriptId === void 0 || reference.cuePosition === void 0 || formatMeetingReference(reference) !==
|
|
22491
|
+
const reference = parseMeetingReference(item2.ref);
|
|
22492
|
+
if (reference.accountId !== source.accountId || reference.transcriptId === void 0 || reference.cuePosition === void 0 || formatMeetingReference(reference) !== item2.ref)
|
|
22492
22493
|
fail2();
|
|
22493
|
-
text2.push(
|
|
22494
|
+
text2.push(item2.ref);
|
|
22494
22495
|
} else {
|
|
22495
|
-
const locator = parseLocator(
|
|
22496
|
-
if (locator.provider !== source.provider || locator.account !== source.account || chat !== void 0 && locator.chat !== chat || formatLocator(locator) !==
|
|
22496
|
+
const locator = parseLocator(item2.ref);
|
|
22497
|
+
if (locator.provider !== source.provider || locator.account !== source.account || chat !== void 0 && locator.chat !== chat || formatLocator(locator) !== item2.ref)
|
|
22497
22498
|
fail2();
|
|
22498
22499
|
text2.push(locator.chat, locator.message);
|
|
22499
22500
|
}
|
|
@@ -22508,7 +22509,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
22508
22509
|
}
|
|
22509
22510
|
}, "validateContextEvidencePage");
|
|
22510
22511
|
|
|
22511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
22512
22513
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
22513
22514
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
22514
22515
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -22561,7 +22562,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
22561
22562
|
};
|
|
22562
22563
|
}, "contextReadBudget");
|
|
22563
22564
|
|
|
22564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
22565
22566
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
22566
22567
|
if (!port || typeof port.read !== "function")
|
|
22567
22568
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -22605,7 +22606,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
22605
22606
|
};
|
|
22606
22607
|
}, "createContextEvidenceReader");
|
|
22607
22608
|
|
|
22608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
22609
22610
|
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");
|
|
22610
22611
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
22611
22612
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -22621,7 +22622,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
22621
22622
|
}, "excerpt");
|
|
22622
22623
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
22623
22624
|
|
|
22624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
22625
22626
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
22626
22627
|
var DEFAULT_PURPOSES = ["work"];
|
|
22627
22628
|
var LINK_PURPOSE = "work";
|
|
@@ -22651,7 +22652,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
22651
22652
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
22652
22653
|
], "purposeList");
|
|
22653
22654
|
|
|
22654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22655
22656
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22656
22657
|
async around(ref, window3) {
|
|
22657
22658
|
const at = parseLocator(ref);
|
|
@@ -22685,35 +22686,35 @@ var documentMatches = /* @__PURE__ */ __name((text2, queries, window3) => {
|
|
|
22685
22686
|
var attachNeighbours = /* @__PURE__ */ __name(async (items, reader, window3, budget, known2, signal) => {
|
|
22686
22687
|
if (!reader || window3.before + window3.after === 0)
|
|
22687
22688
|
return;
|
|
22688
|
-
for (const
|
|
22689
|
-
if (
|
|
22689
|
+
for (const item2 of items) {
|
|
22690
|
+
if (item2.kind !== "message" && item2.kind !== "mail")
|
|
22690
22691
|
continue;
|
|
22691
22692
|
if (budget.remaining() <= 0) {
|
|
22692
|
-
|
|
22693
|
-
|
|
22693
|
+
item2.around = null;
|
|
22694
|
+
item2.aroundIssue = "read-bytes";
|
|
22694
22695
|
continue;
|
|
22695
22696
|
}
|
|
22696
22697
|
signal?.throwIfAborted();
|
|
22697
22698
|
try {
|
|
22698
|
-
const rows = await reader.around(
|
|
22699
|
+
const rows = await reader.around(item2.ref, window3);
|
|
22699
22700
|
const around = [];
|
|
22700
22701
|
for (const row of rows.slice(0, window3.before + window3.after)) {
|
|
22701
22702
|
const text2 = excerpt(row.text, "", 200);
|
|
22702
22703
|
const bytes2 = Buffer.byteLength(text2);
|
|
22703
22704
|
if (bytes2 > budget.remaining()) {
|
|
22704
|
-
|
|
22705
|
+
item2.aroundIssue = "read-bytes";
|
|
22705
22706
|
break;
|
|
22706
22707
|
}
|
|
22707
22708
|
budget.charge(bytes2);
|
|
22708
22709
|
around.push({ ...row, text: text2, found: known2(row.ref) });
|
|
22709
22710
|
}
|
|
22710
|
-
|
|
22711
|
+
item2.around = around;
|
|
22711
22712
|
} catch (error) {
|
|
22712
22713
|
signal?.throwIfAborted();
|
|
22713
22714
|
if (!(error instanceof CliError))
|
|
22714
22715
|
throw error;
|
|
22715
|
-
|
|
22716
|
-
|
|
22716
|
+
item2.around = null;
|
|
22717
|
+
item2.aroundIssue = error.code;
|
|
22717
22718
|
}
|
|
22718
22719
|
}
|
|
22719
22720
|
}, "attachNeighbours");
|
|
@@ -22746,7 +22747,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
22746
22747
|
};
|
|
22747
22748
|
}, "storedNeighbours");
|
|
22748
22749
|
|
|
22749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
22750
22751
|
import { createHash as createHash2 } from "node:crypto";
|
|
22751
22752
|
var DAY2 = 864e5;
|
|
22752
22753
|
var MAX_TIME = 864e13;
|
|
@@ -23062,7 +23063,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23062
23063
|
return value;
|
|
23063
23064
|
}, "decodeCheckpoint");
|
|
23064
23065
|
|
|
23065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23066
23067
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23067
23068
|
var PAGE2 = 20;
|
|
23068
23069
|
var PEOPLE = 20;
|
|
@@ -23209,27 +23210,27 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
23209
23210
|
matchedAgain.set(ref, (matchedAgain.get(ref) ?? /* @__PURE__ */ new Set()).add(lane.id));
|
|
23210
23211
|
return true;
|
|
23211
23212
|
}, "again");
|
|
23212
|
-
const take = /* @__PURE__ */ __name((
|
|
23213
|
-
if (again(
|
|
23213
|
+
const take = /* @__PURE__ */ __name((item2, lane, kind, source) => {
|
|
23214
|
+
if (again(item2.ref, lane))
|
|
23214
23215
|
return;
|
|
23215
|
-
seen.add(seenKey(
|
|
23216
|
-
const short = excerpt(
|
|
23217
|
-
const fingerprint = contextEvidenceFingerprint(
|
|
23218
|
-
const { sender, ...stored } =
|
|
23216
|
+
seen.add(seenKey(item2.ref));
|
|
23217
|
+
const short = excerpt(item2.text, lane.query ?? "", 300, { literal: true });
|
|
23218
|
+
const fingerprint = contextEvidenceFingerprint(item2);
|
|
23219
|
+
const { sender, ...stored } = item2;
|
|
23219
23220
|
if (sender)
|
|
23220
|
-
senderOf.set(
|
|
23221
|
+
senderOf.set(item2.ref, sender);
|
|
23221
23222
|
const entry = {
|
|
23222
23223
|
...stored,
|
|
23223
23224
|
kind,
|
|
23224
23225
|
source,
|
|
23225
23226
|
text: short,
|
|
23226
|
-
textTruncated: short !==
|
|
23227
|
+
textTruncated: short !== item2.text.replace(/\s+/g, " ").trim(),
|
|
23227
23228
|
fingerprint,
|
|
23228
23229
|
lanes: [lane.id],
|
|
23229
23230
|
context: contextOf(lane)
|
|
23230
23231
|
};
|
|
23231
23232
|
if (kind === "document" && lane.query !== null && plan.around.before + plan.around.after) {
|
|
23232
|
-
const passage = documentMatches(
|
|
23233
|
+
const passage = documentMatches(item2.text, queries, plan.around);
|
|
23233
23234
|
entry.around = [];
|
|
23234
23235
|
entry.moreMatches = passage.moreMatches;
|
|
23235
23236
|
for (const part of passage.around) {
|
|
@@ -23239,10 +23240,10 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
23239
23240
|
break;
|
|
23240
23241
|
}
|
|
23241
23242
|
usage.aroundBytes += bytes2;
|
|
23242
|
-
entry.around.push({ ref:
|
|
23243
|
+
entry.around.push({ ref: item2.ref, at: item2.at, sender: null, ...part });
|
|
23243
23244
|
}
|
|
23244
23245
|
}
|
|
23245
|
-
byRef.set(
|
|
23246
|
+
byRef.set(item2.ref, entry);
|
|
23246
23247
|
items.push(entry);
|
|
23247
23248
|
usage.items++;
|
|
23248
23249
|
if (linkedLanes.has(lane.id))
|
|
@@ -23309,8 +23310,8 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
23309
23310
|
}
|
|
23310
23311
|
state.pages++;
|
|
23311
23312
|
state.code = page.coverage.index === "ready" ? null : `index-${page.coverage.index}`;
|
|
23312
|
-
for (const
|
|
23313
|
-
take(
|
|
23313
|
+
for (const item2 of page.items)
|
|
23314
|
+
take(item2, unit.lane, unit.source.kind, unit.sourceIndex);
|
|
23314
23315
|
if (!page.coverage.available)
|
|
23315
23316
|
state.state = "unavailable";
|
|
23316
23317
|
else if (page.next) {
|
|
@@ -23334,7 +23335,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
23334
23335
|
}
|
|
23335
23336
|
await attachNeighbours(
|
|
23336
23337
|
// A linked chat's neighbours are already its own lane's evidence.
|
|
23337
|
-
items.filter((
|
|
23338
|
+
items.filter((item2) => item2.context !== "linked-chat"),
|
|
23338
23339
|
ports.neighbours,
|
|
23339
23340
|
plan.around,
|
|
23340
23341
|
{
|
|
@@ -23445,8 +23446,8 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
23445
23446
|
}, "gatherProjectEvidence");
|
|
23446
23447
|
var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
23447
23448
|
const byKey = /* @__PURE__ */ new Map();
|
|
23448
|
-
for (const
|
|
23449
|
-
const sender = senderOf.get(
|
|
23449
|
+
for (const item2 of items) {
|
|
23450
|
+
const sender = senderOf.get(item2.ref);
|
|
23450
23451
|
if (!sender || sender.owner)
|
|
23451
23452
|
continue;
|
|
23452
23453
|
const key = sender.person ?? JSON.stringify([sender.provider, sender.id]);
|
|
@@ -23458,15 +23459,15 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
23458
23459
|
contexts: {}
|
|
23459
23460
|
};
|
|
23460
23461
|
byKey.set(key, found);
|
|
23461
|
-
if (!found.identities.some((i) => i.provider === sender.provider && i.account ===
|
|
23462
|
-
found.identities.push({ provider: sender.provider, account:
|
|
23462
|
+
if (!found.identities.some((i) => i.provider === sender.provider && i.account === item2.account && i.id === sender.id))
|
|
23463
|
+
found.identities.push({ provider: sender.provider, account: item2.account, id: sender.id });
|
|
23463
23464
|
found.items++;
|
|
23464
|
-
found.contexts[
|
|
23465
|
+
found.contexts[item2.context] = (found.contexts[item2.context] ?? 0) + 1;
|
|
23465
23466
|
}
|
|
23466
23467
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
23467
23468
|
}, "peopleOf");
|
|
23468
23469
|
|
|
23469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
23470
23471
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
23471
23472
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
23472
23473
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -23510,7 +23511,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
23510
23511
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
23511
23512
|
}, "matchVocabularyTerms");
|
|
23512
23513
|
|
|
23513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
23514
23515
|
var KINDS = ["project", "tag", "topic"];
|
|
23515
23516
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
23516
23517
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -23518,9 +23519,9 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23518
23519
|
const limit = options.limit ?? 50;
|
|
23519
23520
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 200)
|
|
23520
23521
|
throw new CliError("validation_error", "limit must be a whole number from 1 to 200", { param: "limit" });
|
|
23521
|
-
const texts = gathering.items.flatMap((
|
|
23522
|
-
{ text: `${
|
|
23523
|
-
...(
|
|
23522
|
+
const texts = gathering.items.flatMap((item2) => [
|
|
23523
|
+
{ text: `${item2.title ?? ""} ${item2.text}`, source: { reference: item2.ref, in: "hit" } },
|
|
23524
|
+
...(item2.around ?? []).map((one) => ({ text: one.text, source: { reference: one.ref, in: "around" } }))
|
|
23524
23525
|
]);
|
|
23525
23526
|
const items = [];
|
|
23526
23527
|
const vocabularyFingerprints = {};
|
|
@@ -23565,7 +23566,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23565
23566
|
};
|
|
23566
23567
|
}, "findEvidenceMentions");
|
|
23567
23568
|
|
|
23568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
23569
23570
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
23570
23571
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
23571
23572
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -23816,9 +23817,9 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23816
23817
|
if (proposed && lane.kinds.includes("sender"))
|
|
23817
23818
|
proposedLanes.set(lane.id, proposed);
|
|
23818
23819
|
}
|
|
23819
|
-
const items = gathered.items.map((
|
|
23820
|
-
const proposed =
|
|
23821
|
-
return proposed ? { ...
|
|
23820
|
+
const items = gathered.items.map((item2) => {
|
|
23821
|
+
const proposed = item2.lanes.every((lane) => proposedLanes.has(lane)) ? proposedLanes.get(item2.lanes[0] ?? "") : void 0;
|
|
23822
|
+
return proposed ? { ...item2, proposed } : item2;
|
|
23822
23823
|
});
|
|
23823
23824
|
const linkedRows = gathered.linkedChats.map((row) => {
|
|
23824
23825
|
const link4 = byRef.get(row.ref);
|
|
@@ -23871,18 +23872,18 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
23871
23872
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
23872
23873
|
}, "purposeHintOf");
|
|
23873
23874
|
|
|
23874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
23875
23876
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
23876
23877
|
|
|
23877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
23878
23879
|
import { lstat } from "node:fs/promises";
|
|
23879
23880
|
|
|
23880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
23881
23882
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
23882
23883
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
23883
23884
|
import { join as join2 } from "node:path";
|
|
23884
23885
|
|
|
23885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
23886
23887
|
import { createHash as createHash3 } from "node:crypto";
|
|
23887
23888
|
var metadataLimit = 16384;
|
|
23888
23889
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -23942,7 +23943,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
23942
23943
|
}
|
|
23943
23944
|
}, "readPartialMetadata");
|
|
23944
23945
|
|
|
23945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
23946
23947
|
import { randomUUID } from "node:crypto";
|
|
23947
23948
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
23948
23949
|
import { join } from "node:path";
|
|
@@ -24034,7 +24035,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
24034
24035
|
};
|
|
24035
24036
|
}, "partialWriter");
|
|
24036
24037
|
|
|
24037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24038
24039
|
var NativeRecordingPartialStore = class {
|
|
24039
24040
|
static {
|
|
24040
24041
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -24141,21 +24142,21 @@ var NativeRecordingPartialStore = class {
|
|
|
24141
24142
|
}
|
|
24142
24143
|
};
|
|
24143
24144
|
|
|
24144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24145
24146
|
import { createHash as createHash5 } from "node:crypto";
|
|
24146
24147
|
import { link as link2 } from "node:fs/promises";
|
|
24147
24148
|
import { basename as basename2, dirname as dirname2, join as join4, resolve as resolve2 } from "node:path";
|
|
24148
24149
|
|
|
24149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
24150
24151
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
24151
|
-
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path,
|
|
24152
|
+
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
24152
24153
|
signal?.throwIfAborted();
|
|
24153
24154
|
const file = await openOrdinaryFile(path, { writable });
|
|
24154
24155
|
try {
|
|
24155
|
-
if ((await file.stat()).size !==
|
|
24156
|
+
if ((await file.stat()).size !== expected2.size)
|
|
24156
24157
|
throw new CliError("validation_error", "recording recovery final checksum does not match");
|
|
24157
|
-
const actual = await fingerprintPartial(file, signal,
|
|
24158
|
-
if (actual.offset !==
|
|
24158
|
+
const actual = await fingerprintPartial(file, signal, expected2.size);
|
|
24159
|
+
if (actual.offset !== expected2.size || actual.sha256 !== expected2.sha256)
|
|
24159
24160
|
throw new CliError("validation_error", "recording recovery final checksum does not match");
|
|
24160
24161
|
return file;
|
|
24161
24162
|
} catch (error) {
|
|
@@ -24181,7 +24182,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
24181
24182
|
signal?.throwIfAborted();
|
|
24182
24183
|
}, "commitPublication");
|
|
24183
24184
|
|
|
24184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
24185
24186
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24186
24187
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
24187
24188
|
import { join as join3 } from "node:path";
|
|
@@ -24254,7 +24255,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
24254
24255
|
}
|
|
24255
24256
|
}, "writePublicationJournal");
|
|
24256
24257
|
|
|
24257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24258
24259
|
var NativeRecordingPublication = class {
|
|
24259
24260
|
static {
|
|
24260
24261
|
__name(this, "NativeRecordingPublication");
|
|
@@ -24281,13 +24282,13 @@ var NativeRecordingPublication = class {
|
|
|
24281
24282
|
write(value) {
|
|
24282
24283
|
return writePublicationJournal(this.root, this.journalPath, this.options.prefix, value, this.options.codec, this.options.metadataLimit, this.options.signal);
|
|
24283
24284
|
}
|
|
24284
|
-
validate(partialPath,
|
|
24285
|
-
if (resolve2(dirname2(partialPath)) !== resolve2(this.root) || resolve2(partialPath) === resolve2(this.finalPath) || resolve2(partialPath) === resolve2(this.journalPath) || !Number.isSafeInteger(
|
|
24285
|
+
validate(partialPath, expected2) {
|
|
24286
|
+
if (resolve2(dirname2(partialPath)) !== resolve2(this.root) || resolve2(partialPath) === resolve2(this.finalPath) || resolve2(partialPath) === resolve2(this.journalPath) || !Number.isSafeInteger(expected2.size) || expected2.size < 0 || expected2.size > this.options.maxBytes || typeof expected2.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(expected2.sha256))
|
|
24286
24287
|
throw new CliError("validation_error", "invalid recording publication evidence");
|
|
24287
24288
|
this.options.signal?.throwIfAborted();
|
|
24288
24289
|
}
|
|
24289
|
-
async publish(partialPath,
|
|
24290
|
-
const proof = { ...
|
|
24290
|
+
async publish(partialPath, expected2, commit) {
|
|
24291
|
+
const proof = { ...expected2 };
|
|
24291
24292
|
this.validate(partialPath, proof);
|
|
24292
24293
|
const partial = await verifiedPublicationFile(partialPath, proof, this.options.signal, true);
|
|
24293
24294
|
try {
|
|
@@ -24305,14 +24306,14 @@ var NativeRecordingPublication = class {
|
|
|
24305
24306
|
const intent = await this.read();
|
|
24306
24307
|
if (intent === null)
|
|
24307
24308
|
throw new CliError("validation_error", "recording path already exists without a verified manifest or scoped recovery record");
|
|
24308
|
-
const
|
|
24309
|
-
this.validate(partialPath,
|
|
24309
|
+
const expected2 = { ...this.options.evidence(intent) };
|
|
24310
|
+
this.validate(partialPath, expected2);
|
|
24310
24311
|
const completed = await loadPartial();
|
|
24311
|
-
if (!strongRecordingValidator(
|
|
24312
|
+
if (!strongRecordingValidator(expected2.validator) || !completed || partialIdentity(completed.locator) !== this.scope || completed.offset !== expected2.size || completed.sha256 !== expected2.sha256 || completed.validator !== expected2.validator || completed.total !== null && completed.total !== expected2.size)
|
|
24312
24313
|
throw new CliError("validation_error", "recording recovery checkpoint does not prove this completed asset");
|
|
24313
|
-
const partial = await verifiedPublicationFile(partialPath,
|
|
24314
|
+
const partial = await verifiedPublicationFile(partialPath, expected2, this.options.signal);
|
|
24314
24315
|
try {
|
|
24315
|
-
const final = await verifiedPublicationFile(this.finalPath,
|
|
24316
|
+
const final = await verifiedPublicationFile(this.finalPath, expected2, this.options.signal, true);
|
|
24316
24317
|
try {
|
|
24317
24318
|
await final.sync();
|
|
24318
24319
|
this.options.signal?.throwIfAborted();
|
|
@@ -24327,7 +24328,7 @@ var NativeRecordingPublication = class {
|
|
|
24327
24328
|
}
|
|
24328
24329
|
};
|
|
24329
24330
|
|
|
24330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
24331
24332
|
import { createHash as createHash6 } from "node:crypto";
|
|
24332
24333
|
import { readdir } from "node:fs/promises";
|
|
24333
24334
|
import { isAbsolute as isAbsolute2, join as join5, resolve as resolve3 } from "node:path";
|
|
@@ -24414,7 +24415,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
24414
24415
|
beforePublish
|
|
24415
24416
|
}), "commitMediaEntry");
|
|
24416
24417
|
|
|
24417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
24418
24419
|
var validator = '"media-completed-v1"';
|
|
24419
24420
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
24420
24421
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -24515,7 +24516,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
24515
24516
|
return entry;
|
|
24516
24517
|
}, "archiveMediaFile");
|
|
24517
24518
|
|
|
24518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
24519
24520
|
import { mkdir, realpath } from "node:fs/promises";
|
|
24520
24521
|
import { join as join6, resolve as resolve4 } from "node:path";
|
|
24521
24522
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -24582,7 +24583,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
24582
24583
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
24583
24584
|
}, "withMediaArchiveLocks");
|
|
24584
24585
|
|
|
24585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
24586
24587
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
24587
24588
|
if (value === void 0)
|
|
24588
24589
|
return void 0;
|
|
@@ -24735,7 +24736,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
24735
24736
|
}, { create: true });
|
|
24736
24737
|
}, "archiveMedia");
|
|
24737
24738
|
|
|
24738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
24739
24740
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
24740
24741
|
import { basename as basename3, dirname as dirname3, join as join7, resolve as resolve5 } from "node:path";
|
|
24741
24742
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -24888,7 +24889,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
24888
24889
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
24889
24890
|
}, "moveMediaArchive");
|
|
24890
24891
|
|
|
24891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
24892
24893
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
24893
24894
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
24894
24895
|
}, "progress") }) => {
|
|
@@ -24911,7 +24912,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
24911
24912
|
}
|
|
24912
24913
|
await nativeRuntime({ env, progress });
|
|
24913
24914
|
progress(`${model.id}: loading it once to check it works`);
|
|
24914
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
24915
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-VBS5LRCE.js");
|
|
24915
24916
|
const embedder = await openEmbedder2(model, directory2);
|
|
24916
24917
|
try {
|
|
24917
24918
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -24932,7 +24933,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
24932
24933
|
}
|
|
24933
24934
|
await nativeRuntime({ env, progress });
|
|
24934
24935
|
progress(`${model.id}: loading it once to check it works`);
|
|
24935
|
-
const { openReranker } = await import("./rerank-
|
|
24936
|
+
const { openReranker } = await import("./rerank-DYMZMNPQ.js");
|
|
24936
24937
|
const reranker = await openReranker(model, directory2);
|
|
24937
24938
|
try {
|
|
24938
24939
|
await reranker.score("check", ["check"]);
|
|
@@ -24950,7 +24951,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
24950
24951
|
await installFiles(placedImage(model, directory2), { progress });
|
|
24951
24952
|
}
|
|
24952
24953
|
progress(`${model.id}: loading it once to check it works`);
|
|
24953
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
24954
|
+
const { openPictureEmbedder } = await import("./embedder-VFSYBDKK.js");
|
|
24954
24955
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
24955
24956
|
try {
|
|
24956
24957
|
const vector = await embedder.embedQuery("check");
|
|
@@ -24962,7 +24963,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
24962
24963
|
return { model, directory: directory2 };
|
|
24963
24964
|
}, "downloadImageModel");
|
|
24964
24965
|
|
|
24965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
24966
24967
|
var MONEY_REQUEST = "money-request";
|
|
24967
24968
|
var MONEY_DONE = "money-done";
|
|
24968
24969
|
var PROMISE = "promise";
|
|
@@ -24996,10 +24997,10 @@ var MONEY_WORDS = [
|
|
|
24996
24997
|
}
|
|
24997
24998
|
];
|
|
24998
24999
|
|
|
24999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
25000
25001
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
25001
25002
|
|
|
25002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
25003
25004
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
25004
25005
|
var MONEY_DONE_FORMS = words([
|
|
25005
25006
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -25039,7 +25040,7 @@ var PROMISE_FORMS = words([
|
|
|
25039
25040
|
"estar\xE1 listo"
|
|
25040
25041
|
]);
|
|
25041
25042
|
|
|
25042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
25043
25044
|
var EXCERPT_CHARS = 80;
|
|
25044
25045
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
25045
25046
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -25061,7 +25062,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
25061
25062
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
25062
25063
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
25063
25064
|
|
|
25064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
25065
25066
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
25066
25067
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
25067
25068
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -25138,16 +25139,16 @@ var amounts = {
|
|
|
25138
25139
|
};
|
|
25139
25140
|
});
|
|
25140
25141
|
}, "read"),
|
|
25141
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((
|
|
25142
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "open" ? [{ chat: item2.chat, weight: 2, why: "money open" }] : []), "attention")
|
|
25142
25143
|
};
|
|
25143
25144
|
|
|
25144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
25145
25146
|
var children = {
|
|
25146
25147
|
id: "children",
|
|
25147
25148
|
version: 1,
|
|
25148
25149
|
scope: "project",
|
|
25149
25150
|
read: /* @__PURE__ */ __name(async (context2) => {
|
|
25150
|
-
const
|
|
25151
|
+
const item2 = /* @__PURE__ */ __name((data) => ({
|
|
25151
25152
|
signal: "children",
|
|
25152
25153
|
chat: null,
|
|
25153
25154
|
at: null,
|
|
@@ -25157,7 +25158,7 @@ var children = {
|
|
|
25157
25158
|
data
|
|
25158
25159
|
}), "item");
|
|
25159
25160
|
return [
|
|
25160
|
-
...context2.project.children.map((child) =>
|
|
25161
|
+
...context2.project.children.map((child) => item2({
|
|
25161
25162
|
child: child.ref,
|
|
25162
25163
|
key: child.key,
|
|
25163
25164
|
name: child.name,
|
|
@@ -25165,12 +25166,12 @@ var children = {
|
|
|
25165
25166
|
chats: context2.chats.filter((chat) => chat.project === child.ref).length,
|
|
25166
25167
|
cut: null
|
|
25167
25168
|
})),
|
|
25168
|
-
...context2.project.cut.map(({ ref, reason }) =>
|
|
25169
|
+
...context2.project.cut.map(({ ref, reason }) => item2({ child: ref, key: null, name: null, depth: null, chats: null, cut: reason }))
|
|
25169
25170
|
];
|
|
25170
25171
|
}, "read")
|
|
25171
25172
|
};
|
|
25172
25173
|
|
|
25173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
25174
25175
|
var coverage = {
|
|
25175
25176
|
id: "coverage",
|
|
25176
25177
|
version: 1,
|
|
@@ -25196,10 +25197,10 @@ var coverage = {
|
|
|
25196
25197
|
}
|
|
25197
25198
|
];
|
|
25198
25199
|
}, "read"),
|
|
25199
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((
|
|
25200
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
|
|
25200
25201
|
};
|
|
25201
25202
|
|
|
25202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/last-message.js
|
|
25203
25204
|
var lastMessage = {
|
|
25204
25205
|
id: "last-message",
|
|
25205
25206
|
version: 1,
|
|
@@ -25208,7 +25209,7 @@ var lastMessage = {
|
|
|
25208
25209
|
const last = chat?.messages.at(-1);
|
|
25209
25210
|
if (!chat || !last)
|
|
25210
25211
|
return [];
|
|
25211
|
-
const
|
|
25212
|
+
const item2 = {
|
|
25212
25213
|
signal: "last-message",
|
|
25213
25214
|
chat: chat.ref,
|
|
25214
25215
|
at: last.timestamp,
|
|
@@ -25217,33 +25218,61 @@ var lastMessage = {
|
|
|
25217
25218
|
basis: "store",
|
|
25218
25219
|
data: {}
|
|
25219
25220
|
};
|
|
25220
|
-
return [
|
|
25221
|
+
return [item2];
|
|
25221
25222
|
}, "read")
|
|
25222
25223
|
};
|
|
25223
25224
|
|
|
25224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25225
|
-
var
|
|
25225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25226
|
+
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
25227
|
+
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
25228
|
+
signal: "payments",
|
|
25229
|
+
chat: null,
|
|
25230
|
+
at,
|
|
25231
|
+
who: null,
|
|
25232
|
+
// The row first, then what it cites, so an amount read from a cited message is not counted twice.
|
|
25233
|
+
evidence: [row.ref, ...row.evidence].map((ref) => ({ ref, fingerprint: null })),
|
|
25234
|
+
basis: "store",
|
|
25235
|
+
data: { ...data, title: row.title, status: row.review }
|
|
25236
|
+
}), "item");
|
|
25237
|
+
var paid = /* @__PURE__ */ __name((row) => {
|
|
25238
|
+
const party = row.direction === "in" ? row.payer : row.payee;
|
|
25239
|
+
return item(row, `${row.date}T00:00:00.000Z`, {
|
|
25240
|
+
amount: row.amount,
|
|
25241
|
+
currency: row.currency,
|
|
25242
|
+
direction: row.direction === "in" ? "to_us" : "from_us",
|
|
25243
|
+
counterparty: party?.ref ?? null,
|
|
25244
|
+
counterparty_name: party?.name ?? null,
|
|
25245
|
+
due_at: null,
|
|
25246
|
+
state: "paid",
|
|
25247
|
+
item: row.reference,
|
|
25248
|
+
paid_at: row.date
|
|
25249
|
+
});
|
|
25250
|
+
}, "paid");
|
|
25251
|
+
var expected = /* @__PURE__ */ __name((row) => item(row, row.issueDate === null ? row.createdAt : `${row.issueDate}T00:00:00.000Z`, {
|
|
25252
|
+
amount: row.open,
|
|
25253
|
+
currency: row.currency,
|
|
25254
|
+
direction: row.direction === "receivable" ? "to_us" : "from_us",
|
|
25255
|
+
counterparty: row.counterparty.ref,
|
|
25256
|
+
counterparty_name: row.counterparty.name,
|
|
25257
|
+
due_at: row.dueDate,
|
|
25258
|
+
state: "expected",
|
|
25259
|
+
item: row.number
|
|
25260
|
+
}), "expected");
|
|
25226
25261
|
var payments = {
|
|
25227
25262
|
id: "payments",
|
|
25228
|
-
version:
|
|
25263
|
+
version: 3,
|
|
25229
25264
|
scope: "project",
|
|
25230
25265
|
read: /* @__PURE__ */ __name(async (context2) => {
|
|
25231
25266
|
const projects = [context2.project.ref, ...context2.project.children.map((child) => child.ref)];
|
|
25232
|
-
const
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
who: null,
|
|
25238
|
-
// The fact first, then what it cites, so an amount read from a cited message is not counted twice.
|
|
25239
|
-
evidence: [fact.ref, ...fact.evidence].map((ref) => ({ ref, fingerprint: null })),
|
|
25240
|
-
basis: "fact",
|
|
25241
|
-
data: { ...fact.payment, title: paymentTitle(fact), status: fact.status }
|
|
25242
|
-
}));
|
|
25267
|
+
const rows = await Promise.all(projects.map(async (project) => [
|
|
25268
|
+
...(await context2.store.finance.payments({ project, limit: 500 })).filter(holding).map(paid),
|
|
25269
|
+
...(await context2.store.finance.invoices({ project, open: true, limit: 500 })).filter(holding).map(expected)
|
|
25270
|
+
]));
|
|
25271
|
+
return rows.flat();
|
|
25243
25272
|
}, "read")
|
|
25244
25273
|
};
|
|
25245
25274
|
|
|
25246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
25247
25276
|
var PATTERNS_PER_CHAT = 3;
|
|
25248
25277
|
var DAY3 = 864e5;
|
|
25249
25278
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -25332,7 +25361,7 @@ var promises = {
|
|
|
25332
25361
|
}, "read")
|
|
25333
25362
|
};
|
|
25334
25363
|
|
|
25335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
25336
25365
|
var PER_SIDE = 5;
|
|
25337
25366
|
var WEEK = 7 * 864e5;
|
|
25338
25367
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -25358,12 +25387,12 @@ var questions2 = {
|
|
|
25358
25387
|
})));
|
|
25359
25388
|
}, "read"),
|
|
25360
25389
|
attention: /* @__PURE__ */ __name((items, context2) => {
|
|
25361
|
-
const stale = new Set(items.flatMap((
|
|
25390
|
+
const stale = new Set(items.flatMap((item2) => item2.chat !== null && item2.data.side === "yours" && item2.at && context2.now - Date.parse(item2.at) > WEEK ? [item2.chat] : []));
|
|
25362
25391
|
return [...stale].map((chat) => ({ chat, weight: 1, why: "your question unanswered for a week" }));
|
|
25363
25392
|
}, "attention")
|
|
25364
25393
|
};
|
|
25365
25394
|
|
|
25366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
25367
25396
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
25368
25397
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
25369
25398
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -25428,10 +25457,10 @@ var replyNext = {
|
|
|
25428
25457
|
}
|
|
25429
25458
|
];
|
|
25430
25459
|
}, "read"),
|
|
25431
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((
|
|
25460
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
25432
25461
|
};
|
|
25433
25462
|
|
|
25434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
25435
25464
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
25436
25465
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
25437
25466
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -25477,7 +25506,7 @@ var topics = {
|
|
|
25477
25506
|
}, "read")
|
|
25478
25507
|
};
|
|
25479
25508
|
|
|
25480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
25481
25510
|
var STATUS_SIGNALS = [
|
|
25482
25511
|
lastMessage,
|
|
25483
25512
|
replyNext,
|
|
@@ -25490,7 +25519,7 @@ var STATUS_SIGNALS = [
|
|
|
25490
25519
|
children
|
|
25491
25520
|
];
|
|
25492
25521
|
|
|
25493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
25494
25523
|
var DAY4 = 864e5;
|
|
25495
25524
|
var STATUS_WINDOW = 300;
|
|
25496
25525
|
var STATUS_CHATS = 16;
|
|
@@ -25536,15 +25565,16 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
25536
25565
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account) => accounts === void 0 || accounts.some((one) => one.provider === provider && one.account === account), "inAccounts");
|
|
25537
25566
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
25538
25567
|
var counted2 = /* @__PURE__ */ __name((items) => {
|
|
25539
|
-
const
|
|
25540
|
-
|
|
25568
|
+
const confirmed = /* @__PURE__ */ __name((item2) => item2.signal === "payments" && item2.data.status === "confirmed", "confirmed");
|
|
25569
|
+
const recorded = new Set(items.filter(confirmed).flatMap((item2) => item2.evidence.slice(1).map((one) => one.ref)));
|
|
25570
|
+
return (item2, state) => item2.signal === "payments" ? state === "expected" && confirmed(item2) : item2.signal === "amounts" && state === "open" && !item2.evidence.some((one) => recorded.has(one.ref));
|
|
25541
25571
|
}, "counted");
|
|
25542
25572
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
25543
25573
|
const totals = /* @__PURE__ */ new Map();
|
|
25544
25574
|
const open7 = counted2(items);
|
|
25545
|
-
for (const
|
|
25546
|
-
const data =
|
|
25547
|
-
if (!open7(
|
|
25575
|
+
for (const item2 of items) {
|
|
25576
|
+
const data = item2.data;
|
|
25577
|
+
if (!open7(item2, data.state) || data.amount === void 0)
|
|
25548
25578
|
continue;
|
|
25549
25579
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
25550
25580
|
const total = totals.get(key) ?? {
|
|
@@ -25671,7 +25701,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
25671
25701
|
};
|
|
25672
25702
|
}, "projectStatus");
|
|
25673
25703
|
|
|
25674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
25675
25705
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
25676
25706
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
25677
25707
|
if (deps.offline)
|
|
@@ -25743,7 +25773,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
25743
25773
|
};
|
|
25744
25774
|
}, "accountService");
|
|
25745
25775
|
|
|
25746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
25747
25777
|
var MINUTE = 6e4;
|
|
25748
25778
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
25749
25779
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -25762,7 +25792,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
25762
25792
|
return new Date(at - at % MINUTE).toISOString();
|
|
25763
25793
|
}, "sendTime");
|
|
25764
25794
|
|
|
25765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
25766
25796
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
25767
25797
|
try {
|
|
25768
25798
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -26009,7 +26039,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
26009
26039
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
26010
26040
|
}, "linkLimits");
|
|
26011
26041
|
|
|
26012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
26013
26043
|
var THREADS_PAGE = 500;
|
|
26014
26044
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
26015
26045
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -26088,7 +26118,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
26088
26118
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
26089
26119
|
}, "readMail");
|
|
26090
26120
|
|
|
26091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
26092
26122
|
var NO_MAIL = "no_mail";
|
|
26093
26123
|
var MAIL = "email";
|
|
26094
26124
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -26135,7 +26165,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26135
26165
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
26136
26166
|
}, "accountsOfKind");
|
|
26137
26167
|
|
|
26138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
26139
26169
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
26140
26170
|
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");
|
|
26141
26171
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -26394,9 +26424,9 @@ var searchLucene = /* @__PURE__ */ __name(async (store, account, request, messen
|
|
|
26394
26424
|
}, "inMailTables");
|
|
26395
26425
|
const found = !prepared.scopeAccounts.length ? { items: [], hasMore: false } : mailAccounts.length ? mergeMail(await execute(prepared.execution), await inMailTables(), request.limit, request.newest) : await execute(prepared.execution);
|
|
26396
26426
|
const { completeness, coverage: coverage2 } = request.kind === "mail" ? { completeness: [], coverage: void 0 } : await coverageOf(store, prepared, messenger);
|
|
26397
|
-
const items = await Promise.all(found.items.map(async (
|
|
26398
|
-
const garbled =
|
|
26399
|
-
const hit = withExcerpt(
|
|
26427
|
+
const items = await Promise.all(found.items.map(async (item2) => {
|
|
26428
|
+
const garbled = item2.corrections?.flatMap(({ to }) => to) ?? [];
|
|
26429
|
+
const hit = withExcerpt(item2, [request.text ?? "", ...garbled].join(" "));
|
|
26400
26430
|
if (!request.context)
|
|
26401
26431
|
return hit;
|
|
26402
26432
|
const locator = parseLocator(hit.locator);
|
|
@@ -26483,7 +26513,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
26483
26513
|
};
|
|
26484
26514
|
}, "statsLucene");
|
|
26485
26515
|
|
|
26486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
26487
26517
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
26488
26518
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
26489
26519
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -26652,7 +26682,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26652
26682
|
};
|
|
26653
26683
|
}, "readRankingSelection");
|
|
26654
26684
|
|
|
26655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
26656
26686
|
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");
|
|
26657
26687
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
26658
26688
|
command,
|
|
@@ -26662,7 +26692,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
26662
26692
|
fieldsVersion: FIELD_VERSION
|
|
26663
26693
|
}), "searchRecordOf");
|
|
26664
26694
|
|
|
26665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
26666
26696
|
function invalid2(message) {
|
|
26667
26697
|
throw new CliError("validation_error", message);
|
|
26668
26698
|
}
|
|
@@ -26956,7 +26986,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
26956
26986
|
}, "evidence")
|
|
26957
26987
|
}), "adminStatisticsService");
|
|
26958
26988
|
|
|
26959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
26960
26990
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
26961
26991
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
26962
26992
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -27093,12 +27123,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27093
27123
|
return { plan, repair };
|
|
27094
27124
|
}, "gapsService");
|
|
27095
27125
|
|
|
27096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
27097
27127
|
import { createHash as createHash9 } from "node:crypto";
|
|
27098
27128
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
27099
27129
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
27100
27130
|
|
|
27101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
27102
27132
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
27103
27133
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
27104
27134
|
var MAX_FILES = 1e4;
|
|
@@ -27169,15 +27199,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
27169
27199
|
return choices;
|
|
27170
27200
|
}, "directoryPaths");
|
|
27171
27201
|
|
|
27172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27173
27203
|
import { posix } from "node:path";
|
|
27174
27204
|
|
|
27175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27176
27206
|
import { setImmediate as tick } from "node:timers/promises";
|
|
27177
27207
|
import { crc32 } from "node:zlib";
|
|
27178
27208
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
27179
27209
|
|
|
27180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
27181
27211
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
27182
27212
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
27183
27213
|
var SAMPLE = 65536;
|
|
@@ -27279,7 +27309,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
27279
27309
|
return result.text;
|
|
27280
27310
|
}, "decodeXml");
|
|
27281
27311
|
|
|
27282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27283
27313
|
var MAX_PART = 10 * 1024 * 1024;
|
|
27284
27314
|
var MAX_ENTRIES = 1e3;
|
|
27285
27315
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -27358,8 +27388,8 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
27358
27388
|
const done2 = /* @__PURE__ */ new Set();
|
|
27359
27389
|
let expanded = 0;
|
|
27360
27390
|
const archive = new Unzip((file) => {
|
|
27361
|
-
const
|
|
27362
|
-
if (!
|
|
27391
|
+
const expected2 = entries.get(file.name);
|
|
27392
|
+
if (!expected2 || seen.has(file.name))
|
|
27363
27393
|
throw new Error("invalid_zip");
|
|
27364
27394
|
seen.add(file.name);
|
|
27365
27395
|
const keep2 = /\.(xml|rels|opf|xhtml|html)$/i.test(file.name) || file.name === "mimetype";
|
|
@@ -27377,7 +27407,7 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
27377
27407
|
if (keep2)
|
|
27378
27408
|
parts.push(data.slice());
|
|
27379
27409
|
if (final) {
|
|
27380
|
-
if (size2 !==
|
|
27410
|
+
if (size2 !== expected2.size || checksum !== expected2.crc)
|
|
27381
27411
|
throw new Error("invalid_zip");
|
|
27382
27412
|
done2.add(file.name);
|
|
27383
27413
|
if (keep2) {
|
|
@@ -27494,7 +27524,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
27494
27524
|
return found;
|
|
27495
27525
|
}, "elements");
|
|
27496
27526
|
|
|
27497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
27498
27528
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
27499
27529
|
let name = "";
|
|
27500
27530
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -27549,7 +27579,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
27549
27579
|
return { text: parts.join("").trim(), truncated: false };
|
|
27550
27580
|
}, "sheetText");
|
|
27551
27581
|
|
|
27552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27553
27583
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
27554
27584
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
27555
27585
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -27885,21 +27915,21 @@ var readBook = /* @__PURE__ */ __name((archive, output) => {
|
|
|
27885
27915
|
const book = xmlPart(archive, path);
|
|
27886
27916
|
rootIs(book, "package", [OPF]);
|
|
27887
27917
|
const manifest = /* @__PURE__ */ new Map();
|
|
27888
|
-
for (const
|
|
27889
|
-
const id2 = required(attribute(
|
|
27918
|
+
for (const item2 of elements(book, "item", OPF)) {
|
|
27919
|
+
const id2 = required(attribute(item2, "id"));
|
|
27890
27920
|
if (manifest.has(id2))
|
|
27891
27921
|
throw new Error("duplicate_chapter");
|
|
27892
|
-
manifest.set(id2, { path: target(path, required(attribute(
|
|
27922
|
+
manifest.set(id2, { path: target(path, required(attribute(item2, "href"))), type: attribute(item2, "media-type") });
|
|
27893
27923
|
}
|
|
27894
27924
|
let number2 = 0;
|
|
27895
27925
|
const chapters = elements(book, "itemref", OPF);
|
|
27896
27926
|
if (!chapters.length)
|
|
27897
27927
|
throw new Error("missing_chapters");
|
|
27898
27928
|
for (const chapter of chapters) {
|
|
27899
|
-
const
|
|
27900
|
-
if (
|
|
27929
|
+
const item2 = manifest.get(required(attribute(chapter, "idref")));
|
|
27930
|
+
if (item2?.type !== "application/xhtml+xml")
|
|
27901
27931
|
throw new Error("unsupported_chapter");
|
|
27902
|
-
const document = xmlPart(archive,
|
|
27932
|
+
const document = xmlPart(archive, item2.path);
|
|
27903
27933
|
const bodies = elements(document, "body", XHTML);
|
|
27904
27934
|
if (bodies.length !== 1)
|
|
27905
27935
|
throw new Error("missing_chapter");
|
|
@@ -27949,10 +27979,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
27949
27979
|
}
|
|
27950
27980
|
}, "readDocument");
|
|
27951
27981
|
|
|
27952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27953
27983
|
import { extname as extname3 } from "node:path";
|
|
27954
27984
|
|
|
27955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
27956
27986
|
import { readFileSync } from "node:fs";
|
|
27957
27987
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
27958
27988
|
import { fileURLToPath } from "node:url";
|
|
@@ -28013,7 +28043,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
28013
28043
|
}
|
|
28014
28044
|
}, "derived");
|
|
28015
28045
|
|
|
28016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
28017
28047
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
28018
28048
|
var image2 = {
|
|
28019
28049
|
id: "image",
|
|
@@ -28022,7 +28052,7 @@ var image2 = {
|
|
|
28022
28052
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
28023
28053
|
};
|
|
28024
28054
|
|
|
28025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
28026
28056
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
28027
28057
|
var doc = {
|
|
28028
28058
|
id: "doc",
|
|
@@ -28034,7 +28064,7 @@ var doc = {
|
|
|
28034
28064
|
}), "read")
|
|
28035
28065
|
};
|
|
28036
28066
|
|
|
28037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
28038
28068
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
28039
28069
|
var docx = {
|
|
28040
28070
|
id: "docx",
|
|
@@ -28047,7 +28077,7 @@ var docx = {
|
|
|
28047
28077
|
}), "read")
|
|
28048
28078
|
};
|
|
28049
28079
|
|
|
28050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
28051
28081
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
28052
28082
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
28053
28083
|
"fonttbl",
|
|
@@ -28223,7 +28253,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
28223
28253
|
}, "htmlText");
|
|
28224
28254
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
28225
28255
|
|
|
28226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
28227
28257
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
28228
28258
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
28229
28259
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -28279,7 +28309,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
28279
28309
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
28280
28310
|
}, "markdownSections");
|
|
28281
28311
|
|
|
28282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
28283
28313
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
28284
28314
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
28285
28315
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -28350,7 +28380,7 @@ var html = {
|
|
|
28350
28380
|
}, "read")
|
|
28351
28381
|
};
|
|
28352
28382
|
|
|
28353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
28354
28384
|
var office = {
|
|
28355
28385
|
id: "office",
|
|
28356
28386
|
version: documentExtractor("odt"),
|
|
@@ -28361,7 +28391,7 @@ var office = {
|
|
|
28361
28391
|
}, "read")
|
|
28362
28392
|
};
|
|
28363
28393
|
|
|
28364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
28365
28395
|
var pdf = {
|
|
28366
28396
|
id: "pdf",
|
|
28367
28397
|
version: "unpdf",
|
|
@@ -28428,7 +28458,7 @@ var pdf = {
|
|
|
28428
28458
|
}), "read")
|
|
28429
28459
|
};
|
|
28430
28460
|
|
|
28431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
28432
28462
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
28433
28463
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
28434
28464
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -28448,7 +28478,7 @@ var plain = {
|
|
|
28448
28478
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
28449
28479
|
};
|
|
28450
28480
|
|
|
28451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
28452
28482
|
var rtf = {
|
|
28453
28483
|
id: "rtf",
|
|
28454
28484
|
version: "v1",
|
|
@@ -28456,10 +28486,10 @@ var rtf = {
|
|
|
28456
28486
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
28457
28487
|
};
|
|
28458
28488
|
|
|
28459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
28460
28490
|
import { basename as basename5 } from "node:path";
|
|
28461
28491
|
|
|
28462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
28463
28493
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
28464
28494
|
const cells = [];
|
|
28465
28495
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -28497,7 +28527,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
28497
28527
|
return { cells, truncated };
|
|
28498
28528
|
}, "delimitedSpans");
|
|
28499
28529
|
|
|
28500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
28501
28531
|
var DELIMITED = {
|
|
28502
28532
|
".csv": ",",
|
|
28503
28533
|
".tsv": " ",
|
|
@@ -28536,7 +28566,7 @@ var sheets = {
|
|
|
28536
28566
|
}, "read")
|
|
28537
28567
|
};
|
|
28538
28568
|
|
|
28539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
28540
28570
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
28541
28571
|
var HEAD_BYTES = 1024;
|
|
28542
28572
|
var readers = [...BUILT_INS2];
|
|
@@ -28546,7 +28576,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
28546
28576
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
28547
28577
|
}, "readWithRegistry");
|
|
28548
28578
|
|
|
28549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28550
28580
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
28551
28581
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
28552
28582
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -29625,7 +29655,7 @@ function imageSize(input) {
|
|
|
29625
29655
|
}
|
|
29626
29656
|
__name(imageSize, "imageSize");
|
|
29627
29657
|
|
|
29628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
29629
29659
|
var MAX_PAGES = 20;
|
|
29630
29660
|
var MAX_PIXELS = 2e7;
|
|
29631
29661
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -29709,7 +29739,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
29709
29739
|
let text2;
|
|
29710
29740
|
try {
|
|
29711
29741
|
const content = await page.getTextContent();
|
|
29712
|
-
text2 = content.items.map((
|
|
29742
|
+
text2 = content.items.map((item2) => `${item2.str ?? ""}${item2.hasEOL ? "\n" : " "}`).join("").trim();
|
|
29713
29743
|
if (!text2) {
|
|
29714
29744
|
if (typeof unpdf.createIsomorphicCanvasFactory !== "function" || typeof unpdf.renderPageAsImage !== "function")
|
|
29715
29745
|
return { status: "engine-missing", engine: "unpdf" };
|
|
@@ -29776,7 +29806,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
29776
29806
|
}
|
|
29777
29807
|
}, "ocrPdf");
|
|
29778
29808
|
|
|
29779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
29780
29810
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
29781
29811
|
const limits = pdfPreviewLimits(env);
|
|
29782
29812
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -29853,7 +29883,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
29853
29883
|
}
|
|
29854
29884
|
}, "pdfPreview");
|
|
29855
29885
|
|
|
29856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
29857
29887
|
import { createHash as createHash8 } from "node:crypto";
|
|
29858
29888
|
import { constants } from "node:fs";
|
|
29859
29889
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -29961,7 +29991,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
29961
29991
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
29962
29992
|
}, "transferMime");
|
|
29963
29993
|
|
|
29964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
29965
29995
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
29966
29996
|
import { link as link3, rm } from "node:fs/promises";
|
|
29967
29997
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -30075,7 +30105,7 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
30075
30105
|
}
|
|
30076
30106
|
}, "save");
|
|
30077
30107
|
|
|
30078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
30079
30109
|
var ATTACHMENT_QUERY = {
|
|
30080
30110
|
entity: "attachment",
|
|
30081
30111
|
backend: "sql",
|
|
@@ -30271,7 +30301,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30271
30301
|
issue = batch.fail(formatLocator({ ...account, chat: file.chatId, message: file.messageId }), "extract", limitIssue ?? (extraction?.status === "unreadable" && extraction.issue ? extraction.issue : new CliError(status === "missing" ? "not_found" : "validation_error", status === "too-large" ? "attachment exceeds an extraction, decompression or OCR size limit" : extraction?.status === "engine-missing" ? `attachment engine-missing; ${engineMissing(extraction.engine)}; \`doctor\` lists the readers` : `attachment ${status}; retry or skip this item`, { limit_source: ocr ? "provider" : "local" })), file.position + 1);
|
|
30272
30302
|
} else
|
|
30273
30303
|
batch.ok();
|
|
30274
|
-
const
|
|
30304
|
+
const item2 = {
|
|
30275
30305
|
ref: formatLocator({ ...account, chat: file.chatId, message: file.messageId }),
|
|
30276
30306
|
attachment: file.position + 1,
|
|
30277
30307
|
kind: file.kind,
|
|
@@ -30286,13 +30316,13 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30286
30316
|
...extraction.pages === void 0 ? {} : { pages: extraction.pages, ocrPages: extraction.ocrPages }
|
|
30287
30317
|
} : {}
|
|
30288
30318
|
};
|
|
30289
|
-
finished.set(file.pk,
|
|
30290
|
-
onItem?.(
|
|
30319
|
+
finished.set(file.pk, item2);
|
|
30320
|
+
onItem?.(item2);
|
|
30291
30321
|
}, "processFile");
|
|
30292
30322
|
const failedItem = /* @__PURE__ */ __name((file, stage, error) => {
|
|
30293
30323
|
const issue = batch.fail(formatLocator({ ...account, chat: file.chatId, message: file.messageId }), stage, error, file.position + 1);
|
|
30294
30324
|
run.failed += 1;
|
|
30295
|
-
const
|
|
30325
|
+
const item2 = {
|
|
30296
30326
|
ref: formatLocator({ ...account, chat: file.chatId, message: file.messageId }),
|
|
30297
30327
|
attachment: file.position + 1,
|
|
30298
30328
|
kind: file.kind,
|
|
@@ -30301,8 +30331,8 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30301
30331
|
error: issue.code,
|
|
30302
30332
|
issue
|
|
30303
30333
|
};
|
|
30304
|
-
finished.set(file.pk,
|
|
30305
|
-
onItem?.(
|
|
30334
|
+
finished.set(file.pk, item2);
|
|
30335
|
+
onItem?.(item2);
|
|
30306
30336
|
}, "failedItem");
|
|
30307
30337
|
try {
|
|
30308
30338
|
walk: for (; ; ) {
|
|
@@ -30362,7 +30392,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30362
30392
|
run.batch = batch.result();
|
|
30363
30393
|
run.complete = false;
|
|
30364
30394
|
}
|
|
30365
|
-
run.items = [...finished.entries()].sort(([a], [b]) => b - a).map(([,
|
|
30395
|
+
run.items = [...finished.entries()].sort(([a], [b]) => b - a).map(([, item2]) => item2);
|
|
30366
30396
|
return run;
|
|
30367
30397
|
}, "extract"),
|
|
30368
30398
|
list: /* @__PURE__ */ __name(async ({ limit, offset = 0, query }) => {
|
|
@@ -30498,7 +30528,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30498
30528
|
}, "setText")
|
|
30499
30529
|
}), "attachmentsService");
|
|
30500
30530
|
|
|
30501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
30502
30532
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
30503
30533
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
30504
30534
|
const store = await accountStore(deps);
|
|
@@ -30528,7 +30558,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30528
30558
|
}, "list")
|
|
30529
30559
|
}), "chatDocumentsService");
|
|
30530
30560
|
|
|
30531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
30532
30562
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
30533
30563
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
30534
30564
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -30562,14 +30592,14 @@ var retentionService = /* @__PURE__ */ __name((deps) => ({
|
|
|
30562
30592
|
const result = await store.roster.retention(account, chatId, options);
|
|
30563
30593
|
return {
|
|
30564
30594
|
...result,
|
|
30565
|
-
items: result.items.map((
|
|
30566
|
-
...
|
|
30595
|
+
items: result.items.map((item2) => ({
|
|
30596
|
+
...item2,
|
|
30567
30597
|
drilldown: {
|
|
30568
30598
|
command: "stats messages evidence",
|
|
30569
30599
|
arguments: {
|
|
30570
|
-
message:
|
|
30600
|
+
message: item2.cohort,
|
|
30571
30601
|
component: "report",
|
|
30572
|
-
selection: { kind: "retention", version: 1, account, chatId, cohort:
|
|
30602
|
+
selection: { kind: "retention", version: 1, account, chatId, cohort: item2.cohort, options }
|
|
30573
30603
|
}
|
|
30574
30604
|
}
|
|
30575
30605
|
})),
|
|
@@ -30615,7 +30645,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
30615
30645
|
}
|
|
30616
30646
|
}, "isRetentionSelection");
|
|
30617
30647
|
|
|
30618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
30619
30649
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
30620
30650
|
const fields = text2.split(",").map((one) => one.trim());
|
|
30621
30651
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -30678,7 +30708,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30678
30708
|
fields,
|
|
30679
30709
|
now,
|
|
30680
30710
|
maxAge,
|
|
30681
|
-
items: items.map((
|
|
30711
|
+
items: items.map((item2) => ({ ...item2, counters: item2.counters.filter((one) => fields.includes(one.counter)) })),
|
|
30682
30712
|
hasMore
|
|
30683
30713
|
};
|
|
30684
30714
|
}, "select");
|
|
@@ -30822,7 +30852,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30822
30852
|
};
|
|
30823
30853
|
}, "countersService");
|
|
30824
30854
|
|
|
30825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
30826
30856
|
var SYNC_KEY = "messages.sync-first";
|
|
30827
30857
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
30828
30858
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -30954,7 +30984,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
30954
30984
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
30955
30985
|
}), "withRefresh");
|
|
30956
30986
|
|
|
30957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
30958
30988
|
var CANDIDATES = 50;
|
|
30959
30989
|
var WORD_HITS = 200;
|
|
30960
30990
|
var RRF_K = 60;
|
|
@@ -31072,7 +31102,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
31072
31102
|
}, deps.messenger);
|
|
31073
31103
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
31074
31104
|
const selected = prepared.selectedChat;
|
|
31075
|
-
const
|
|
31105
|
+
const scopeOf4 = /* @__PURE__ */ __name((one) => selected ? selected.account.provider === one.provider && selected.account.account === one.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
31076
31106
|
const words3 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
31077
31107
|
const meaning = [];
|
|
31078
31108
|
const sources = words3.sources;
|
|
@@ -31080,7 +31110,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
31080
31110
|
await withEmbedder(deps, target2, choice, {}, async (embedder) => {
|
|
31081
31111
|
const [vector] = await embedder.embed([query], "query");
|
|
31082
31112
|
for (const one of prepared.scopeAccounts) {
|
|
31083
|
-
const scope =
|
|
31113
|
+
const scope = scopeOf4(one);
|
|
31084
31114
|
if (scope === null)
|
|
31085
31115
|
continue;
|
|
31086
31116
|
const hits = await store.vectors.nearestConversations(one, {
|
|
@@ -31114,7 +31144,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
31114
31144
|
const scoped = [];
|
|
31115
31145
|
const elsewhere = [];
|
|
31116
31146
|
for (const one of prepared.scopeAccounts) {
|
|
31117
|
-
const scope =
|
|
31147
|
+
const scope = scopeOf4(one);
|
|
31118
31148
|
if (scope === null)
|
|
31119
31149
|
continue;
|
|
31120
31150
|
const eligibleChats = eligibility?.chats.filter(({ account: account2 }) => account2.provider === one.provider && account2.account === one.account).map(({ chat: chat2 }) => chat2);
|
|
@@ -31229,13 +31259,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
31229
31259
|
return mean.map((value) => value / length);
|
|
31230
31260
|
}, "meanOf");
|
|
31231
31261
|
|
|
31232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
31233
31263
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
31234
31264
|
...embeddingsMaintenance(deps),
|
|
31235
31265
|
...embeddingsSearch(deps)
|
|
31236
31266
|
}), "embeddingsService");
|
|
31237
31267
|
|
|
31238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
31239
31269
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
31240
31270
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
31241
31271
|
if (deps.offline)
|
|
@@ -31376,7 +31406,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31376
31406
|
};
|
|
31377
31407
|
}, "foldersService");
|
|
31378
31408
|
|
|
31379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
31380
31410
|
var REVIEW_COUNT = 500;
|
|
31381
31411
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
31382
31412
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -31455,7 +31485,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
31455
31485
|
};
|
|
31456
31486
|
}, "mentionsService");
|
|
31457
31487
|
|
|
31458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
31459
31489
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
31460
31490
|
position,
|
|
31461
31491
|
kind,
|
|
@@ -31504,7 +31534,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
31504
31534
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
31505
31535
|
}, "validatePermalink");
|
|
31506
31536
|
|
|
31507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
31508
31538
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
31509
31539
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
31510
31540
|
return `${seconds / 86400}d`;
|
|
@@ -31536,7 +31566,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
31536
31566
|
return seconds;
|
|
31537
31567
|
}, "pinDurationOf");
|
|
31538
31568
|
|
|
31539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
31540
31570
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
31541
31571
|
if (sendAs === void 0) {
|
|
31542
31572
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -31561,7 +31591,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
31561
31591
|
return sendAs;
|
|
31562
31592
|
}, "typedSendAs");
|
|
31563
31593
|
|
|
31564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
31565
31595
|
var TOTAL_CAP = 1e4;
|
|
31566
31596
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
31567
31597
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -31572,7 +31602,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
31572
31602
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
31573
31603
|
}, "totalOf");
|
|
31574
31604
|
|
|
31575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
31576
31606
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
31577
31607
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
31578
31608
|
let narrows = false;
|
|
@@ -31601,7 +31631,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
31601
31631
|
return wanted(root).join(" ").trim();
|
|
31602
31632
|
}, "meaningWords");
|
|
31603
31633
|
|
|
31604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
31605
31635
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
31606
31636
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
31607
31637
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -31716,7 +31746,7 @@ function planQuestion(text2, strict = false) {
|
|
|
31716
31746
|
}
|
|
31717
31747
|
__name(planQuestion, "planQuestion");
|
|
31718
31748
|
|
|
31719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31749
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
31720
31750
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
31721
31751
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
31722
31752
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -31840,8 +31870,8 @@ var searchCombined = /* @__PURE__ */ __name(async (store, account, request, mess
|
|
|
31840
31870
|
return finish(listed2.map(({ fused: _fused, ...hit }) => hit), ordered.length > request.limit || truncated, usedCorrections, truncated, true);
|
|
31841
31871
|
async function finish(items, hasMore, listed3, truncated2, expanded) {
|
|
31842
31872
|
const { completeness, coverage: coverage2 } = request.kind === "mail" ? { completeness: [], coverage: void 0 } : await coverageOf(store, prepared, messenger);
|
|
31843
|
-
const hydrated = await Promise.all(items.map(async (
|
|
31844
|
-
const hit = withExcerpt(
|
|
31873
|
+
const hydrated = await Promise.all(items.map(async (item2) => {
|
|
31874
|
+
const hit = withExcerpt(item2, request.text ?? "");
|
|
31845
31875
|
if (!request.context)
|
|
31846
31876
|
return hit;
|
|
31847
31877
|
const { provider, account: account2 } = parseLocator(hit.locator);
|
|
@@ -31909,7 +31939,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
31909
31939
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
31910
31940
|
}, "signals");
|
|
31911
31941
|
|
|
31912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
31913
31943
|
var MEANING_DEPTH = 100;
|
|
31914
31944
|
var RRF_K2 = 60;
|
|
31915
31945
|
var RERANK_DEPTH = 50;
|
|
@@ -32237,7 +32267,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
32237
32267
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
32238
32268
|
}, "mixedWithReranker");
|
|
32239
32269
|
|
|
32240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
32241
32271
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
32242
32272
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
32243
32273
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -32307,8 +32337,8 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32307
32337
|
stopped("messages");
|
|
32308
32338
|
const neighbours = anchor ? await around(message, before2, after) : [];
|
|
32309
32339
|
const nearest = neighbours.sort((a, b) => Number(a.id !== message) - Number(b.id !== message) || Math.abs(Date.parse(a.timestamp) - Date.parse(anchor?.timestamp ?? "")) - Math.abs(Date.parse(b.timestamp) - Date.parse(anchor?.timestamp ?? "")));
|
|
32310
|
-
for (const
|
|
32311
|
-
if (
|
|
32340
|
+
for (const item2 of nearest) {
|
|
32341
|
+
if (item2.threadId !== anchor?.threadId) {
|
|
32312
32342
|
stopped("thread");
|
|
32313
32343
|
continue;
|
|
32314
32344
|
}
|
|
@@ -32316,15 +32346,15 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32316
32346
|
stopped("messages");
|
|
32317
32347
|
break;
|
|
32318
32348
|
}
|
|
32319
|
-
if (Math.abs(Date.parse(
|
|
32349
|
+
if (Math.abs(Date.parse(item2.timestamp) - Date.parse(anchor?.timestamp ?? "")) > bounds.withinMs) {
|
|
32320
32350
|
stopped("time");
|
|
32321
32351
|
continue;
|
|
32322
32352
|
}
|
|
32323
|
-
if (bytes([...result.items,
|
|
32353
|
+
if (bytes([...result.items, item2], []) > bounds.maxBytes) {
|
|
32324
32354
|
stopped("bytes");
|
|
32325
32355
|
break;
|
|
32326
32356
|
}
|
|
32327
|
-
result.items.push(
|
|
32357
|
+
result.items.push(item2);
|
|
32328
32358
|
}
|
|
32329
32359
|
result.items.sort((a, b) => a.timestamp.localeCompare(b.timestamp) || a.id.localeCompare(b.id));
|
|
32330
32360
|
return result;
|
|
@@ -32354,16 +32384,16 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32354
32384
|
break;
|
|
32355
32385
|
}
|
|
32356
32386
|
const node = queue[index];
|
|
32357
|
-
const [
|
|
32358
|
-
if (!
|
|
32387
|
+
const [item2] = node.id === message ? [anchor] : await around(node.id);
|
|
32388
|
+
if (!item2) {
|
|
32359
32389
|
result.stale = true;
|
|
32360
32390
|
continue;
|
|
32361
32391
|
}
|
|
32362
|
-
if (Math.abs(Date.parse(
|
|
32392
|
+
if (Math.abs(Date.parse(item2.timestamp) - at) > bounds.withinMs) {
|
|
32363
32393
|
stopped("time");
|
|
32364
32394
|
continue;
|
|
32365
32395
|
}
|
|
32366
|
-
if (
|
|
32396
|
+
if (item2.threadId !== anchor.threadId) {
|
|
32367
32397
|
stopped("thread");
|
|
32368
32398
|
continue;
|
|
32369
32399
|
}
|
|
@@ -32371,7 +32401,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32371
32401
|
stopped("messages");
|
|
32372
32402
|
break;
|
|
32373
32403
|
}
|
|
32374
|
-
const { anchor: _anchor, ...body } =
|
|
32404
|
+
const { anchor: _anchor, ...body } = item2;
|
|
32375
32405
|
const displayed2 = node.id === message ? { ...body, anchor: true } : body;
|
|
32376
32406
|
const own = await linksOf(node.id);
|
|
32377
32407
|
const parent = chosen(own);
|
|
@@ -32436,7 +32466,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
32436
32466
|
return result;
|
|
32437
32467
|
}, "readThreadContext");
|
|
32438
32468
|
|
|
32439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
32440
32470
|
var SEARCH_FILL_MS = 200;
|
|
32441
32471
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
32442
32472
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -32503,12 +32533,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
32503
32533
|
}, "accountOf");
|
|
32504
32534
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
32505
32535
|
|
|
32506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32507
32537
|
import { createHash as createHash10 } from "node:crypto";
|
|
32508
32538
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
32509
32539
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
32510
32540
|
|
|
32511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
32512
32542
|
var GROUP_SETTINGS = [
|
|
32513
32543
|
"allCanPin",
|
|
32514
32544
|
"onlyAdminsAdd",
|
|
@@ -32522,7 +32552,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
32522
32552
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
32523
32553
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
32524
32554
|
|
|
32525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
32526
32556
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
32527
32557
|
var PICTURE_FLOOR = 0.25;
|
|
32528
32558
|
var PAGE4 = 50;
|
|
@@ -32539,7 +32569,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
32539
32569
|
const directory2 = imageModelsDirectory(deps.env);
|
|
32540
32570
|
if (!isImageModelInstalled(model2, directory2))
|
|
32541
32571
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
32542
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32572
|
+
const { openPictureEmbedder } = await import("./embedder-VFSYBDKK.js");
|
|
32543
32573
|
return openPictureEmbedder(model2, directory2);
|
|
32544
32574
|
}, "open");
|
|
32545
32575
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -32736,7 +32766,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
32736
32766
|
}, "search")
|
|
32737
32767
|
}), "withPictures");
|
|
32738
32768
|
|
|
32739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
32740
32770
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
32741
32771
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
32742
32772
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -32785,7 +32815,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
32785
32815
|
}
|
|
32786
32816
|
}, "meaningLane");
|
|
32787
32817
|
|
|
32788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
32789
32819
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
32790
32820
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
32791
32821
|
if (choice === "off")
|
|
@@ -32797,9 +32827,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
32797
32827
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
32798
32828
|
try {
|
|
32799
32829
|
const warm = deps.embedders;
|
|
32800
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
32830
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-PWAGP6YY.js")).openRerankerProcess(model, directory2, {
|
|
32801
32831
|
threads: defaultThreads()
|
|
32802
|
-
})) : await (await import("./rerank-
|
|
32832
|
+
})) : await (await import("./rerank-DYMZMNPQ.js")).openReranker(model, directory2);
|
|
32803
32833
|
return {
|
|
32804
32834
|
model: model.id,
|
|
32805
32835
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -32819,17 +32849,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
32819
32849
|
};
|
|
32820
32850
|
}, "rerankLane");
|
|
32821
32851
|
|
|
32822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
32823
32853
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
32824
32854
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
32825
32855
|
const directory2 = imageModelsDirectory(env);
|
|
32826
32856
|
if (!isImageModelInstalled(model, directory2))
|
|
32827
32857
|
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 });
|
|
32828
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32858
|
+
const { openPictureEmbedder } = await import("./embedder-VFSYBDKK.js");
|
|
32829
32859
|
return openPictureEmbedder(model, directory2);
|
|
32830
32860
|
}, "openPictureEmbedderFor");
|
|
32831
32861
|
|
|
32832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
32833
32863
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
32834
32864
|
const metadata = note.frontMatter;
|
|
32835
32865
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -32844,7 +32874,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
32844
32874
|
};
|
|
32845
32875
|
}, "documentSource");
|
|
32846
32876
|
|
|
32847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
32848
32878
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
32849
32879
|
let root;
|
|
32850
32880
|
try {
|
|
@@ -32871,7 +32901,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
32871
32901
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
32872
32902
|
}, "titleTiers");
|
|
32873
32903
|
|
|
32874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
32875
32905
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
32876
32906
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
32877
32907
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -33280,7 +33310,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
33280
33310
|
};
|
|
33281
33311
|
}, "searchNotesOf");
|
|
33282
33312
|
|
|
33283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33284
33314
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33285
33315
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
33286
33316
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -33392,7 +33422,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
33392
33422
|
};
|
|
33393
33423
|
}, "searchEvents");
|
|
33394
33424
|
|
|
33395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
33396
33426
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
33397
33427
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
33398
33428
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -33482,8 +33512,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
33482
33512
|
messagesBy = { by: "words and meaning", ...lane.partly ? { meaningSkipped: lane.partly } : {} };
|
|
33483
33513
|
const near2 = await nearEligible(store, account, query, messenger, lane.ranked, filters ? { text: filters } : {});
|
|
33484
33514
|
const fused2 = /* @__PURE__ */ new Map();
|
|
33485
|
-
byWords.forEach((
|
|
33486
|
-
fused2.set(
|
|
33515
|
+
byWords.forEach((item2, rank) => {
|
|
33516
|
+
fused2.set(item2.ref, { item: item2, score: 1 / (RRF_K3 + rank + 1) });
|
|
33487
33517
|
});
|
|
33488
33518
|
near2.forEach((hit, rank) => {
|
|
33489
33519
|
const held = fused2.get(hit.locator);
|
|
@@ -33494,7 +33524,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
33494
33524
|
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
33495
33525
|
});
|
|
33496
33526
|
});
|
|
33497
|
-
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item }) =>
|
|
33527
|
+
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
33498
33528
|
}, "messagesOf");
|
|
33499
33529
|
const embedders = runEmbedders();
|
|
33500
33530
|
try {
|
|
@@ -33578,12 +33608,12 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
33578
33608
|
}
|
|
33579
33609
|
const ranked = /* @__PURE__ */ new Map();
|
|
33580
33610
|
for (const list2 of lists)
|
|
33581
|
-
list2.forEach((
|
|
33582
|
-
const held = ranked.get(
|
|
33611
|
+
list2.forEach((item2, rank) => {
|
|
33612
|
+
const held = ranked.get(item2.ref) ?? { item: item2, score: 0 };
|
|
33583
33613
|
held.score += 1 / (RRF_K3 + rank + 1);
|
|
33584
|
-
ranked.set(
|
|
33614
|
+
ranked.set(item2.ref, held);
|
|
33585
33615
|
});
|
|
33586
|
-
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item }) =>
|
|
33616
|
+
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
33587
33617
|
const more = hasMore || ordered.length > window3;
|
|
33588
33618
|
return {
|
|
33589
33619
|
query: request.text,
|
|
@@ -33601,7 +33631,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
33601
33631
|
};
|
|
33602
33632
|
}, "searchAll");
|
|
33603
33633
|
|
|
33604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
33605
33635
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
33606
33636
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
33607
33637
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -33769,16 +33799,16 @@ var searchAllIncludingMeetings = /* @__PURE__ */ __name(async (store, account, r
|
|
|
33769
33799
|
};
|
|
33770
33800
|
}
|
|
33771
33801
|
const ranked = /* @__PURE__ */ new Map();
|
|
33772
|
-
for (const list2 of [legacy.items, meetings.items.map(({ item }) =>
|
|
33773
|
-
list2.forEach((
|
|
33774
|
-
const key =
|
|
33775
|
-
const held = ranked.get(key) ?? { item, score: 0 };
|
|
33802
|
+
for (const list2 of [legacy.items, meetings.items.map(({ item: item2 }) => item2)])
|
|
33803
|
+
list2.forEach((item2, rank) => {
|
|
33804
|
+
const key = item2.kind === "meeting" ? JSON.stringify([item2.kind, item2.accountId, item2.meetingId, item2.scope, item2.id]) : item2.ref;
|
|
33805
|
+
const held = ranked.get(key) ?? { item: item2, score: 0 };
|
|
33776
33806
|
held.score += 1 / (RRF_K3 + rank + 1);
|
|
33777
33807
|
ranked.set(key, held);
|
|
33778
33808
|
});
|
|
33779
|
-
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item }) =>
|
|
33809
|
+
const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
33780
33810
|
const items = ordered.slice(offset, window3);
|
|
33781
|
-
const returnedMeetings = ordered.slice(0, window3).filter((
|
|
33811
|
+
const returnedMeetings = ordered.slice(0, window3).filter((item2) => item2.kind === "meeting").length;
|
|
33782
33812
|
const nextCursor = meetings.items[returnedMeetings]?.before ?? (!meetings.coverage.complete ? meetings.after : void 0);
|
|
33783
33813
|
const more = legacy.hasMore || ordered.length > window3;
|
|
33784
33814
|
const { nextOffset: _, ...rest } = legacy;
|
|
@@ -33813,13 +33843,13 @@ var searchAllWithMeetings = /* @__PURE__ */ __name(async (store, account, reques
|
|
|
33813
33843
|
var holdingMeetings = /* @__PURE__ */ __name(async (store, named2) => {
|
|
33814
33844
|
if (named2.length < 2)
|
|
33815
33845
|
return named2;
|
|
33816
|
-
const
|
|
33846
|
+
const holding2 = [];
|
|
33817
33847
|
for (const key of named2) {
|
|
33818
33848
|
const { id: id2 } = await store.accounts.storedAccount(key);
|
|
33819
33849
|
if ((await store.meetings.meetings({ accountId: id2, limit: 1 })).length)
|
|
33820
|
-
|
|
33850
|
+
holding2.push(key);
|
|
33821
33851
|
}
|
|
33822
|
-
return
|
|
33852
|
+
return holding2.length ? holding2 : named2;
|
|
33823
33853
|
}, "holdingMeetings");
|
|
33824
33854
|
var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, request, messenger, searchMessages, meaning) => {
|
|
33825
33855
|
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
@@ -33854,7 +33884,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
33854
33884
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
33855
33885
|
}, "searchAllOfSource");
|
|
33856
33886
|
|
|
33857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
33858
33888
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
33859
33889
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
33860
33890
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34043,7 +34073,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34043
34073
|
return { report, sources };
|
|
34044
34074
|
}, "searchServer");
|
|
34045
34075
|
|
|
34046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34047
34077
|
var DELETE_AT_ONCE = 10;
|
|
34048
34078
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
34049
34079
|
const files = fileLinks(attachments);
|
|
@@ -34200,7 +34230,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34200
34230
|
const store = await deps.store();
|
|
34201
34231
|
const chat2 = await readChatId(deps, target2.chat, store, account);
|
|
34202
34232
|
const found2 = await store.messages.around(account, chat2, target2.message, { before: 0, after: 0 });
|
|
34203
|
-
const held2 = found2.find((
|
|
34233
|
+
const held2 = found2.find((item2) => item2.id === target2.message && item2.chatId === chat2);
|
|
34204
34234
|
if (!held2)
|
|
34205
34235
|
throw new CliError("not_found", "no such message in this account's stored chat");
|
|
34206
34236
|
return {
|
|
@@ -34218,14 +34248,14 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34218
34248
|
const locator = formatLocator({ ...account, chat, message: target2.message });
|
|
34219
34249
|
if (connection.permalink) {
|
|
34220
34250
|
const permalink = validatePermalink(await connection.permalink(chat, target2.message));
|
|
34221
|
-
const held2 = await deps.store().then((store) => store.messages.around(account, chat, target2.message, { before: 0, after: 0 })).then((found2) => found2.find((
|
|
34251
|
+
const held2 = await deps.store().then((store) => store.messages.around(account, chat, target2.message, { before: 0, after: 0 })).then((found2) => found2.find((item2) => item2.id === target2.message && item2.chatId === chat)).catch(() => void 0);
|
|
34222
34252
|
return { locator, ...permalink, ...held2 ? filesOf(held2) : {} };
|
|
34223
34253
|
}
|
|
34224
34254
|
const found = await capability(connection, "around", "read a message")(chat, target2.message, {
|
|
34225
34255
|
before: 0,
|
|
34226
34256
|
after: 0
|
|
34227
34257
|
});
|
|
34228
|
-
const held = found.find((
|
|
34258
|
+
const held = found.find((item2) => item2.id === target2.message && item2.chatId === chat);
|
|
34229
34259
|
if (!held)
|
|
34230
34260
|
throw new CliError("not_found", "no such message in this chat");
|
|
34231
34261
|
return { locator, url: null, access: "unavailable", reason: "unsupported_provider", ...filesOf(held) };
|
|
@@ -34484,7 +34514,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
34484
34514
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
34485
34515
|
}, "checkMediaOptions");
|
|
34486
34516
|
|
|
34487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
34488
34518
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
34489
34519
|
var RULES = {
|
|
34490
34520
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -34499,7 +34529,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
34499
34529
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
34500
34530
|
}), "classifyChannel");
|
|
34501
34531
|
|
|
34502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
34503
34533
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
34504
34534
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
34505
34535
|
const store = await deps.store();
|
|
@@ -34585,7 +34615,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
34585
34615
|
};
|
|
34586
34616
|
}, "metadataService");
|
|
34587
34617
|
|
|
34588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
34589
34619
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
34590
34620
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
34591
34621
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -34622,7 +34652,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
34622
34652
|
return { chatId, rows, notes };
|
|
34623
34653
|
}, "moderateWith");
|
|
34624
34654
|
|
|
34625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
34626
34656
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
34627
34657
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
34628
34658
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -34700,7 +34730,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
34700
34730
|
}, "removePerson")
|
|
34701
34731
|
}), "moderatorOf");
|
|
34702
34732
|
|
|
34703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
34704
34734
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
34705
34735
|
id: note.id,
|
|
34706
34736
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -34744,7 +34774,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
34744
34774
|
};
|
|
34745
34775
|
}, "privatePeopleService");
|
|
34746
34776
|
|
|
34747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
34748
34778
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
34749
34779
|
total: 0,
|
|
34750
34780
|
population: 0,
|
|
@@ -35000,7 +35030,134 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
35000
35030
|
}, "evidence")
|
|
35001
35031
|
}), "rankingsService");
|
|
35002
35032
|
|
|
35003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
35034
|
+
var FIELDS = ["date", "chat", "kind"];
|
|
35035
|
+
var WAITING_TAIL = 100;
|
|
35036
|
+
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
35037
|
+
if (text2 === void 0)
|
|
35038
|
+
return;
|
|
35039
|
+
const refuse = /* @__PURE__ */ __name(() => {
|
|
35040
|
+
throw new CliError("validation_error", `${command} reads date:, chat: and kind: terms, AND-ed \u2014 not words, other fields, OR or NOT`, { reason: "query.unsupported-field" });
|
|
35041
|
+
}, "refuse");
|
|
35042
|
+
const visit = /* @__PURE__ */ __name((node) => {
|
|
35043
|
+
if (node.kind === "boolean")
|
|
35044
|
+
for (const clause of node.clauses) {
|
|
35045
|
+
if (clause.occur !== "must")
|
|
35046
|
+
refuse();
|
|
35047
|
+
visit(clause.node);
|
|
35048
|
+
}
|
|
35049
|
+
else if (!FIELDS.includes(node.field) || !["term", "phrase", "range"].includes(node.operator))
|
|
35050
|
+
refuse();
|
|
35051
|
+
}, "visit");
|
|
35052
|
+
visit(parseLucene(text2, { ...MESSAGE_PARSING, defaultField: "text" }).root);
|
|
35053
|
+
}, "plainOnly");
|
|
35054
|
+
var scopeOf3 = /* @__PURE__ */ __name((root, accounts) => {
|
|
35055
|
+
const scope = { accounts, chats: [], kinds: [] };
|
|
35056
|
+
const visit = /* @__PURE__ */ __name((node) => {
|
|
35057
|
+
if (node.kind === "boolean") {
|
|
35058
|
+
for (const clause of node.clauses)
|
|
35059
|
+
visit(clause.node);
|
|
35060
|
+
return;
|
|
35061
|
+
}
|
|
35062
|
+
const { chat, date: date2 } = node.resolution ?? {};
|
|
35063
|
+
if (chat)
|
|
35064
|
+
scope.chats.push(chat);
|
|
35065
|
+
else if (node.field === "kind")
|
|
35066
|
+
scope.kinds.push(node.value.toLowerCase());
|
|
35067
|
+
else if (date2) {
|
|
35068
|
+
if (date2.lower !== void 0) {
|
|
35069
|
+
const lower = date2.lower + (date2.lower_inclusive ? 0 : 1);
|
|
35070
|
+
scope.since = Math.max(scope.since ?? lower, lower);
|
|
35071
|
+
}
|
|
35072
|
+
if (date2.upper !== void 0) {
|
|
35073
|
+
const upper = date2.upper - (date2.upper_inclusive ? 0 : 1);
|
|
35074
|
+
scope.until = Math.min(scope.until ?? upper, upper);
|
|
35075
|
+
}
|
|
35076
|
+
}
|
|
35077
|
+
}, "visit");
|
|
35078
|
+
visit(root);
|
|
35079
|
+
return scope;
|
|
35080
|
+
}, "scopeOf");
|
|
35081
|
+
var figuresOf = /* @__PURE__ */ __name((delays) => {
|
|
35082
|
+
const { medianMilliseconds, p90Milliseconds } = delayStats(delays);
|
|
35083
|
+
return {
|
|
35084
|
+
replies: delays.length,
|
|
35085
|
+
medianMs: medianMilliseconds,
|
|
35086
|
+
p90Ms: p90Milliseconds,
|
|
35087
|
+
meanMs: delays.length ? Math.round(delays.reduce((sum2, one) => sum2 + one, 0) / delays.length) : null
|
|
35088
|
+
};
|
|
35089
|
+
}, "figuresOf");
|
|
35090
|
+
var MINUTE2 = 6e4;
|
|
35091
|
+
var waitsOnOwner = /* @__PURE__ */ __name((newest) => {
|
|
35092
|
+
if (newest.mine)
|
|
35093
|
+
return false;
|
|
35094
|
+
if (newest.kind === "private")
|
|
35095
|
+
return !newest.quiet && rankingQuestion(newest.text);
|
|
35096
|
+
return newest.addressed || newest.ownerUsername !== null && new RegExp(`(^|[^\\w@])@${newest.ownerUsername.replace(/[^\w]/g, "\\$&")}(?!\\w)`, "i").test(newest.text);
|
|
35097
|
+
}, "waitsOnOwner");
|
|
35098
|
+
var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
35099
|
+
const prepared = /* @__PURE__ */ __name(async (query, command) => {
|
|
35100
|
+
plainOnly(query.text, command);
|
|
35101
|
+
const store = await deps.store();
|
|
35102
|
+
const found = await prepareLucene(store, await deps.account(), {
|
|
35103
|
+
...query.text === void 0 ? {} : { text: query.text },
|
|
35104
|
+
...query.source === void 0 ? {} : { source: query.source },
|
|
35105
|
+
timezone: timezoneOf(query.timezone),
|
|
35106
|
+
limit: 1
|
|
35107
|
+
}, deps.messenger);
|
|
35108
|
+
return { store, timezone: found.timezone, scope: scopeOf3(found.execution.root, found.scopeAccounts) };
|
|
35109
|
+
}, "prepared");
|
|
35110
|
+
return {
|
|
35111
|
+
responses: /* @__PURE__ */ __name(async ({ who, by, ...query }) => {
|
|
35112
|
+
const { store, timezone, scope } = await prepared(query, "stats messages responses");
|
|
35113
|
+
const delays = scope.accounts.length ? await store.queries.replyDelays(scope, who) : [];
|
|
35114
|
+
const buckets = { under5m: 0, under1h: 0, under1d: 0, over1d: 0 };
|
|
35115
|
+
for (const { delayMs } of delays) {
|
|
35116
|
+
if (delayMs < 5 * MINUTE2)
|
|
35117
|
+
buckets.under5m++;
|
|
35118
|
+
else if (delayMs < 60 * MINUTE2)
|
|
35119
|
+
buckets.under1h++;
|
|
35120
|
+
else if (delayMs < 24 * 60 * MINUTE2)
|
|
35121
|
+
buckets.under1d++;
|
|
35122
|
+
else
|
|
35123
|
+
buckets.over1d++;
|
|
35124
|
+
}
|
|
35125
|
+
const days = /* @__PURE__ */ new Map();
|
|
35126
|
+
if (by === "day") {
|
|
35127
|
+
const keyOf5 = calendarKey(timezone, "day");
|
|
35128
|
+
for (const { repliedAt, delayMs } of delays) {
|
|
35129
|
+
const key = keyOf5(repliedAt);
|
|
35130
|
+
const list2 = days.get(key) ?? [];
|
|
35131
|
+
list2.push(delayMs);
|
|
35132
|
+
days.set(key, list2);
|
|
35133
|
+
}
|
|
35134
|
+
}
|
|
35135
|
+
return {
|
|
35136
|
+
who,
|
|
35137
|
+
by,
|
|
35138
|
+
...figuresOf(delays.map(({ delayMs }) => delayMs)),
|
|
35139
|
+
buckets,
|
|
35140
|
+
rows: [...days].sort(([a], [b]) => a.localeCompare(b)).map(([key, list2]) => ({ key, ...figuresOf(list2) }))
|
|
35141
|
+
};
|
|
35142
|
+
}, "responses"),
|
|
35143
|
+
waiting: /* @__PURE__ */ __name(async (query) => {
|
|
35144
|
+
const { store, scope } = await prepared(query, "stats messages waiting");
|
|
35145
|
+
const chats = scope.accounts.length ? await store.queries.waitingChats(scope, waitsOnOwner, WAITING_TAIL) : [];
|
|
35146
|
+
const firsts = chats.flatMap(({ unanswered: unanswered2 }) => unanswered2.at(-1) ?? []);
|
|
35147
|
+
return {
|
|
35148
|
+
chats: chats.length,
|
|
35149
|
+
messages: chats.reduce((sum2, { unanswered: unanswered2 }) => sum2 + unanswered2.length, 0),
|
|
35150
|
+
oldestAt: firsts.length ? new Date(firsts.reduce((low, one) => Math.min(low, one))).toISOString() : null,
|
|
35151
|
+
byKind: {
|
|
35152
|
+
private: chats.filter(({ kind }) => kind === "private").length,
|
|
35153
|
+
group: chats.filter(({ kind }) => kind === "group").length
|
|
35154
|
+
}
|
|
35155
|
+
};
|
|
35156
|
+
}, "waiting")
|
|
35157
|
+
};
|
|
35158
|
+
}, "replyStatsService");
|
|
35159
|
+
|
|
35160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
35004
35161
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
35005
35162
|
id: one.id,
|
|
35006
35163
|
name: one.name,
|
|
@@ -35129,7 +35286,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35129
35286
|
};
|
|
35130
35287
|
}, "searchesService");
|
|
35131
35288
|
|
|
35132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
35133
35290
|
var TAGGING_QUERY = {
|
|
35134
35291
|
entity: "tagging",
|
|
35135
35292
|
backend: "sql",
|
|
@@ -35213,7 +35370,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35213
35370
|
};
|
|
35214
35371
|
}, "tagsService");
|
|
35215
35372
|
|
|
35216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
35217
35374
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
35218
35375
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
35219
35376
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -35412,7 +35569,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35412
35569
|
};
|
|
35413
35570
|
}, "topicsService");
|
|
35414
35571
|
|
|
35415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
35416
35573
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
35417
35574
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
35418
35575
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -35458,13 +35615,13 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
35458
35615
|
threadId: message.threadId ?? null,
|
|
35459
35616
|
attachmentKinds: message.attachments.map(({ kind: attachmentKind }) => attachmentKind)
|
|
35460
35617
|
};
|
|
35461
|
-
const
|
|
35462
|
-
const bytes2 = Buffer.byteLength(JSON.stringify(
|
|
35618
|
+
const item2 = { ...content2, fingerprint: hash2(content2) };
|
|
35619
|
+
const bytes2 = Buffer.byteLength(JSON.stringify(item2), "utf8") + (items.length > 0 ? 1 : 0);
|
|
35463
35620
|
if (bytes2 > limits.bytes - contentBytes) {
|
|
35464
35621
|
truncatedBy = "bytes";
|
|
35465
35622
|
break;
|
|
35466
35623
|
}
|
|
35467
|
-
items.push(
|
|
35624
|
+
items.push(item2);
|
|
35468
35625
|
contentBytes += bytes2;
|
|
35469
35626
|
}
|
|
35470
35627
|
const content = {
|
|
@@ -35486,7 +35643,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
35486
35643
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
35487
35644
|
}, "prepareEvidencePacket");
|
|
35488
35645
|
|
|
35489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
35490
35647
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
35491
35648
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
35492
35649
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -35506,7 +35663,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
35506
35663
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
35507
35664
|
}, "readEvidencePacket");
|
|
35508
35665
|
|
|
35509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
35510
35667
|
var scopeKeys = [
|
|
35511
35668
|
"accountId",
|
|
35512
35669
|
"meetingId",
|
|
@@ -35528,7 +35685,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
35528
35685
|
"maxVocabularyReadBytes"
|
|
35529
35686
|
]);
|
|
35530
35687
|
|
|
35531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
35532
35689
|
var communicationFields = {
|
|
35533
35690
|
sources: pipe(array(strictObject({
|
|
35534
35691
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -35560,7 +35717,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
35560
35717
|
return { ...input, after, before: before2 };
|
|
35561
35718
|
}, "communicationRequest");
|
|
35562
35719
|
|
|
35563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
35564
35721
|
var MEETING_PREPARATION_LIMITS = {
|
|
35565
35722
|
meetings: { min: 1, max: 20, default: 5 },
|
|
35566
35723
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -35633,7 +35790,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
35633
35790
|
};
|
|
35634
35791
|
}, "validateMeetingPreparationRequest");
|
|
35635
35792
|
|
|
35636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
35637
35794
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
35638
35795
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
35639
35796
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -35643,13 +35800,13 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
35643
35800
|
fail2();
|
|
35644
35801
|
return;
|
|
35645
35802
|
}
|
|
35646
|
-
const
|
|
35647
|
-
if (!section || section.query !==
|
|
35803
|
+
const expected2 = communicationRequest(request, after);
|
|
35804
|
+
if (!section || section.query !== expected2.query || section.window?.after !== expected2.after || section.window?.before !== expected2.before)
|
|
35648
35805
|
fail2();
|
|
35649
|
-
if (!Array.isArray(section.sources) || section.sources.length !==
|
|
35806
|
+
if (!Array.isArray(section.sources) || section.sources.length !== expected2.sources.length || section.sources.some((s) => !s || typeof s.selectionId !== "string") || new Set(section.sources.map((s) => s.selectionId)).size !== expected2.sources.length)
|
|
35650
35807
|
fail2();
|
|
35651
35808
|
for (const source of section.sources) {
|
|
35652
|
-
if (!
|
|
35809
|
+
if (!expected2.sources.some((s) => s.id === source.selectionId))
|
|
35653
35810
|
fail2();
|
|
35654
35811
|
try {
|
|
35655
35812
|
contextSource(source.source);
|
|
@@ -35659,20 +35816,20 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
35659
35816
|
}
|
|
35660
35817
|
if (!Array.isArray(section.items) || section.items.length > 20)
|
|
35661
35818
|
fail2();
|
|
35662
|
-
for (const
|
|
35663
|
-
if (!
|
|
35819
|
+
for (const item2 of section.items) {
|
|
35820
|
+
if (!item2)
|
|
35664
35821
|
fail2();
|
|
35665
|
-
const source = section.sources.find((s) => s.selectionId ===
|
|
35666
|
-
if (!source ||
|
|
35822
|
+
const source = section.sources.find((s) => s.selectionId === item2.selectionId)?.source;
|
|
35823
|
+
if (!source || item2.provider !== source.provider || item2.account !== source.account || !Number.isSafeInteger(item2.at) || item2.at < expected2.after || item2.at >= expected2.before || !Number.isSafeInteger(item2.updatedAt) || item2.updatedAt < 0 || item2.updatedAt > 864e13 || typeof item2.text !== "string" || Buffer.byteLength(item2.text) > 1024)
|
|
35667
35824
|
fail2();
|
|
35668
35825
|
try {
|
|
35669
35826
|
if (source.kind === "document") {
|
|
35670
|
-
const id2 = Number(
|
|
35671
|
-
if (!Number.isSafeInteger(id2) || id2 < 1 ||
|
|
35827
|
+
const id2 = Number(item2.ref.slice(9));
|
|
35828
|
+
if (!Number.isSafeInteger(id2) || id2 < 1 || item2.ref !== `document:${id2}`)
|
|
35672
35829
|
fail2();
|
|
35673
35830
|
} else {
|
|
35674
|
-
const locator = parseLocator(
|
|
35675
|
-
if (locator.provider !== source.provider || locator.account !== source.account || formatLocator(locator) !==
|
|
35831
|
+
const locator = parseLocator(item2.ref);
|
|
35832
|
+
if (locator.provider !== source.provider || locator.account !== source.account || formatLocator(locator) !== item2.ref)
|
|
35676
35833
|
fail2();
|
|
35677
35834
|
}
|
|
35678
35835
|
} catch {
|
|
@@ -35681,7 +35838,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
35681
35838
|
}
|
|
35682
35839
|
}, "validatePreparationCommunications");
|
|
35683
35840
|
|
|
35684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
35685
35842
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
35686
35843
|
const installer = ports.installer();
|
|
35687
35844
|
const argv = updateCommand(installer, packageName);
|
|
@@ -35746,7 +35903,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
35746
35903
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
35747
35904
|
}, "dayAfter");
|
|
35748
35905
|
|
|
35749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
35750
35907
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
35751
35908
|
const pictures = picturesService(deps);
|
|
35752
35909
|
const base = {
|
|
@@ -35756,6 +35913,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
35756
35913
|
counters: countersService(deps),
|
|
35757
35914
|
retention: retentionService(deps),
|
|
35758
35915
|
rankings: rankingsService(deps),
|
|
35916
|
+
replyStats: replyStatsService(deps),
|
|
35759
35917
|
topics: topicsService(deps),
|
|
35760
35918
|
messages: withPictures(messagesService(deps), pictures),
|
|
35761
35919
|
chats: chatsService(deps),
|
|
@@ -35782,7 +35940,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
35782
35940
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
35783
35941
|
}, "servicesFor");
|
|
35784
35942
|
|
|
35785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
35786
35944
|
import { createHash as createHash12 } from "node:crypto";
|
|
35787
35945
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
35788
35946
|
import { createConnection, createServer } from "node:net";
|
|
@@ -36003,7 +36161,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
36003
36161
|
}, () => finish({ error: stopped() }));
|
|
36004
36162
|
}), "relayCommand");
|
|
36005
36163
|
|
|
36006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
36007
36165
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
36008
36166
|
close: /* @__PURE__ */ __name(async () => {
|
|
36009
36167
|
}, "close"),
|