@wirecat/tg-cli 0.117.0 → 0.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-VNQ72MBK.js → adapter-4YNP6VCO.js} +39 -39
- package/dist/bundle/{all-profiles-3W2UQTCK.js → all-profiles-MIQDYAGO.js} +6 -6
- package/dist/bundle/{anthropic-DFUW2KTG.js → anthropic-NTASPJYE.js} +3 -3
- package/dist/bundle/{app-server-5XJIMLHB.js → app-server-UJZBJ2SK.js} +36 -36
- package/dist/bundle/{bot-api-HRRBF3W6.js → bot-api-JZAD4L3N.js} +40 -40
- package/dist/bundle/{bot-history-GBH5XE4N.js → bot-history-OUDHH3NU.js} +12 -12
- package/dist/bundle/{bun-ZMOYGG6F.js → bun-EC4HDIRD.js} +2 -2
- package/dist/bundle/{bun-sqlite-6FZFMA7K.js → bun-sqlite-A4HJR6KO.js} +2 -2
- package/dist/bundle/{chunk-HORGORHK.js → chunk-2KQHUBTV.js} +10 -10
- package/dist/bundle/{chunk-6GFUL4OU.js → chunk-2NA5KVP6.js} +15 -12
- package/dist/bundle/{chunk-C6TUVV7E.js → chunk-4BV4UMBB.js} +470 -209
- package/dist/bundle/{chunk-EZTYJ43A.js → chunk-57LKX6N2.js} +1 -1
- package/dist/bundle/{chunk-4JDGN6OD.js → chunk-5IIU7X4S.js} +1 -1
- package/dist/bundle/{chunk-2XLKZL6K.js → chunk-5LDWBEWU.js} +42 -26
- package/dist/bundle/{chunk-MLHKQDUN.js → chunk-5QYU7B27.js} +268 -153
- package/dist/bundle/{chunk-AG6HWPQP.js → chunk-65XV5PPI.js} +2 -2
- package/dist/bundle/{chunk-RDSLSV4M.js → chunk-6AXUEJGL.js} +1 -1
- package/dist/bundle/{chunk-HWYSRB64.js → chunk-6RI4TEIC.js} +2 -2
- package/dist/bundle/{chunk-7Y3RUEVY.js → chunk-6ZMTEUVU.js} +4 -4
- package/dist/bundle/{chunk-56Q5JV3Z.js → chunk-76EKXFX2.js} +1 -1
- package/dist/bundle/{chunk-TFBHDIGY.js → chunk-BNEP5EOV.js} +17 -3
- package/dist/bundle/{chunk-V47NPSSV.js → chunk-CEY43D3A.js} +29 -27
- package/dist/bundle/{chunk-G7B5UIE7.js → chunk-DKFC5ZZ3.js} +37 -11
- package/dist/bundle/{chunk-UGPZCNYC.js → chunk-DSZJREEO.js} +353 -286
- package/dist/bundle/{chunk-L5WNE4WS.js → chunk-EPXVRJAX.js} +1 -1
- package/dist/bundle/{chunk-66FZBLRJ.js → chunk-EQJ6NLF5.js} +12 -12
- package/dist/bundle/{chunk-B2YPB5AE.js → chunk-FHMK6OK4.js} +8 -8
- package/dist/bundle/{chunk-3GRX7WP6.js → chunk-G3RT2EQI.js} +1 -1
- package/dist/bundle/{chunk-TG6ZYL4B.js → chunk-GI4MTNA2.js} +7 -7
- package/dist/bundle/{chunk-AUBRELCM.js → chunk-GIM37COQ.js} +2 -2
- package/dist/bundle/{chunk-SQXB5ZUZ.js → chunk-GLRRCKP6.js} +2 -2
- package/dist/bundle/{chunk-VMCQGZIA.js → chunk-GXCJ47SJ.js} +381 -292
- package/dist/bundle/{chunk-UYK5AXSW.js → chunk-H6S3C3MH.js} +2 -2
- package/dist/bundle/{chunk-VRDVXXXD.js → chunk-HJNRIK5X.js} +6 -6
- package/dist/bundle/{chunk-HZZGOLGP.js → chunk-I4TI5HDJ.js} +9 -9
- package/dist/bundle/{chunk-MP7M6FFU.js → chunk-JLJKGKU2.js} +5 -5
- package/dist/bundle/{chunk-F6KBVIJP.js → chunk-JPVFYMSQ.js} +21 -13
- package/dist/bundle/{chunk-Z4QKLHJW.js → chunk-JWPSVS6C.js} +8692 -3312
- package/dist/bundle/{chunk-ZPILMEFY.js → chunk-JZETEZHC.js} +7 -20
- package/dist/bundle/{chunk-EA2PGDER.js → chunk-KEDHX6XG.js} +2 -2
- package/dist/bundle/{chunk-PTIB7NEE.js → chunk-MBH7IKLT.js} +1 -1
- package/dist/bundle/{chunk-YIXXH74F.js → chunk-MZNOASAW.js} +1 -1
- package/dist/bundle/{chunk-GFHNQBD2.js → chunk-NKFTZVQU.js} +1 -1
- package/dist/bundle/{chunk-2452HCIV.js → chunk-NMT2VGEI.js} +2 -2
- package/dist/bundle/{chunk-KVTLT4V7.js → chunk-OTQDJUES.js} +5 -5
- package/dist/bundle/{chunk-Q7O4CQDO.js → chunk-PB252TT3.js} +1 -1
- package/dist/bundle/{chunk-V2T7NYNU.js → chunk-PO74BDER.js} +23 -21
- package/dist/bundle/{chunk-X3CD475M.js → chunk-PW3HFIJA.js} +203 -155
- package/dist/bundle/{chunk-6HRN7BW6.js → chunk-PWCQC56A.js} +1 -1
- package/dist/bundle/{chunk-3RJYLN5V.js → chunk-RG2E7ZQZ.js} +117 -14
- package/dist/bundle/{chunk-RDH2QBUE.js → chunk-TMTEWOQS.js} +1 -1
- package/dist/bundle/{chunk-7NBUT62O.js → chunk-TSTEZNSX.js} +1 -1
- package/dist/bundle/{chunk-XW5C4TI7.js → chunk-Y64SI2RO.js} +47 -1
- package/dist/bundle/{chunk-FEKXHILZ.js → chunk-YEOSV6JC.js} +1 -1
- package/dist/bundle/{chunk-EL6I4WTB.js → chunk-YPRUWRKE.js} +1 -1
- package/dist/bundle/{chunk-M7V5XRM6.js → chunk-ZMUC3UQO.js} +2 -2
- package/dist/bundle/{chunk-FAHHERJ7.js → chunk-ZXXTJF4Z.js} +4 -4
- package/dist/bundle/{command-contract-KMMHARMR.js → command-contract-7GZ6HAA6.js} +12 -12
- package/dist/bundle/{decode-YMSOY2AY.js → decode-NMNPLKNR.js} +2 -2
- package/dist/bundle/{echarts-7XS55TQY.js → echarts-S46LEIPS.js} +2 -2
- package/dist/bundle/{embed-QTOE7NN3.js → embed-I5ZYHGYC.js} +3 -3
- package/dist/bundle/{embedder-KBBRYSNH.js → embedder-LTJI67N2.js} +6 -6
- package/dist/bundle/{entry-HGEUYYMX.js → entry-O6BUPXF7.js} +4 -4
- package/dist/bundle/{first-run-CSGMEJXY.js → first-run-PMZNCDGD.js} +5 -5
- package/dist/bundle/{first-screen-K2PBNJNE.js → first-screen-BGML5DSO.js} +13 -13
- package/dist/bundle/{instructions-S6ZXCTFH.js → instructions-AUEGY3VO.js} +1 -1
- package/dist/bundle/{node-LCIUWXXG.js → node-XRA7RBCQ.js} +2 -2
- package/dist/bundle/{node-sqlite-HL4WY4N2.js → node-sqlite-DEZO6LRS.js} +3 -3
- package/dist/bundle/{oauth-U4KIMDKG.js → oauth-DAVC7WCD.js} +4 -4
- package/dist/bundle/{open-EH7OS7M7.js → open-DE2YO4T7.js} +2 -2
- package/dist/bundle/{openai-W5TB3NA5.js → openai-5BKGAULH.js} +10 -10
- package/dist/bundle/{process-3CVLTCTA.js → process-4ZHPNUIQ.js} +1 -1
- package/dist/bundle/{program-LOIZTK2P.js → program-EGTKSNB4.js} +42 -42
- package/dist/bundle/{prompt-IDNH7N3W.js → prompt-HWCWHHPE.js} +2 -2
- package/dist/bundle/{recognize-G5EWYXIF.js → recognize-NG6RXNGF.js} +1 -1
- package/dist/bundle/{remote-4XTBZVZD.js → remote-ZKXIIGYH.js} +4 -4
- package/dist/bundle/{rerank-OWSTDLZN.js → rerank-TX5QFURV.js} +4 -4
- package/dist/bundle/{serve-YCPSEWP3.js → serve-XAS6DECW.js} +6 -6
- package/dist/bundle/{server-ODG4A2KK.js → server-CNPIWBYU.js} +28 -28
- package/dist/bundle/server-FRTKLHZF.js +60 -0
- package/dist/bundle/{state-OL2235G5.js → state-3HTUETTS.js} +3 -3
- package/dist/bundle/{store-5AACYNDM.js → store-B5VZWJHN.js} +17 -9
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +50 -0
- package/dist/bundle/tg.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/server-KELKX6S3.js +0 -60
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +0 -50
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EQJ6NLF5.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
WEIGHTS,
|
|
22
22
|
agenda,
|
|
23
23
|
annotate,
|
|
24
|
+
annotateOption,
|
|
24
25
|
attachment,
|
|
25
26
|
codeOf,
|
|
26
27
|
conversation,
|
|
@@ -48,17 +49,14 @@ import {
|
|
|
48
49
|
typedCommand,
|
|
49
50
|
vectorModelKey,
|
|
50
51
|
withAttempt
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import {
|
|
53
|
-
isCliFailure
|
|
54
|
-
} from "./chunk-ZPILMEFY.js";
|
|
52
|
+
} from "./chunk-PW3HFIJA.js";
|
|
55
53
|
import {
|
|
56
54
|
isNewer,
|
|
57
55
|
updateCommand
|
|
58
56
|
} from "./chunk-3MQOLYAN.js";
|
|
59
57
|
import {
|
|
60
58
|
readOnlyLockOf
|
|
61
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-PB252TT3.js";
|
|
62
60
|
import {
|
|
63
61
|
AGENDA_COLUMNS,
|
|
64
62
|
CHAT_COLUMNS,
|
|
@@ -83,6 +81,7 @@ import {
|
|
|
83
81
|
TASK_RELATION_KINDS,
|
|
84
82
|
TRACKED_CHAT_COLUMNS,
|
|
85
83
|
UNKNOWN_PROVIDER,
|
|
84
|
+
WORD_BODY,
|
|
86
85
|
amountsOf,
|
|
87
86
|
attachmentColumns,
|
|
88
87
|
attachmentMaxBytes,
|
|
@@ -111,16 +110,19 @@ import {
|
|
|
111
110
|
hasText,
|
|
112
111
|
historyStartKey,
|
|
113
112
|
hitFiles,
|
|
113
|
+
holdsKind,
|
|
114
|
+
holdsKindOf,
|
|
114
115
|
inSource,
|
|
115
116
|
inboxKey,
|
|
116
117
|
isAccountList,
|
|
117
118
|
isFolderProvider,
|
|
119
|
+
isImportedProvider,
|
|
118
120
|
isKind,
|
|
119
121
|
isLocator,
|
|
120
122
|
isQueryLimit,
|
|
121
123
|
isStemmed,
|
|
122
124
|
kindIn,
|
|
123
|
-
|
|
125
|
+
listedHolds,
|
|
124
126
|
looksLikeReference,
|
|
125
127
|
matchDownloads,
|
|
126
128
|
messageOfEmail,
|
|
@@ -129,6 +131,7 @@ import {
|
|
|
129
131
|
parseLocator,
|
|
130
132
|
parseReference,
|
|
131
133
|
pdfPreviewLimits,
|
|
134
|
+
plainQuery,
|
|
132
135
|
providerLabel,
|
|
133
136
|
providerNamed,
|
|
134
137
|
queryFilter,
|
|
@@ -141,7 +144,7 @@ import {
|
|
|
141
144
|
validateAst,
|
|
142
145
|
validateFields,
|
|
143
146
|
withoutField
|
|
144
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-JWPSVS6C.js";
|
|
145
148
|
import {
|
|
146
149
|
EVENT_QUERY,
|
|
147
150
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -163,6 +166,7 @@ import {
|
|
|
163
166
|
implicitTextTerms,
|
|
164
167
|
importFiles,
|
|
165
168
|
isClosedState,
|
|
169
|
+
isUsable,
|
|
166
170
|
listed,
|
|
167
171
|
meetingCueFingerprint,
|
|
168
172
|
meetingDetailsAnswer,
|
|
@@ -186,23 +190,27 @@ import {
|
|
|
186
190
|
validateQuery,
|
|
187
191
|
walkQuery,
|
|
188
192
|
zonedMoment
|
|
189
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-4BV4UMBB.js";
|
|
194
|
+
import {
|
|
195
|
+
isCliFailure,
|
|
196
|
+
sqliteCode
|
|
197
|
+
} from "./chunk-Y64SI2RO.js";
|
|
190
198
|
import {
|
|
191
199
|
DEFAULT_STEMMERS,
|
|
192
200
|
createStemmer,
|
|
193
201
|
fold,
|
|
194
202
|
normalize
|
|
195
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-GI4MTNA2.js";
|
|
196
204
|
import {
|
|
197
205
|
DEFAULT_TASK_CATEGORIES,
|
|
198
206
|
FALLBACK_CATEGORY
|
|
199
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-6ZMTEUVU.js";
|
|
200
208
|
import {
|
|
201
209
|
MAX_MODEL_IMAGE_BYTES
|
|
202
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-76EKXFX2.js";
|
|
203
211
|
import {
|
|
204
212
|
remoteKey
|
|
205
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-NMT2VGEI.js";
|
|
206
214
|
import {
|
|
207
215
|
Unzip,
|
|
208
216
|
UnzipInflate,
|
|
@@ -213,15 +221,15 @@ import {
|
|
|
213
221
|
placedText,
|
|
214
222
|
runEmbedders,
|
|
215
223
|
textModelsDirectory
|
|
216
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-OTQDJUES.js";
|
|
217
225
|
import {
|
|
218
226
|
installFiles,
|
|
219
227
|
megabytes
|
|
220
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-JPVFYMSQ.js";
|
|
221
229
|
import {
|
|
222
230
|
storePath,
|
|
223
231
|
wirecatDirectory
|
|
224
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-G3RT2EQI.js";
|
|
225
233
|
import {
|
|
226
234
|
resolvePaths,
|
|
227
235
|
writeSecurely
|
|
@@ -13120,8 +13128,8 @@ var require_bom_handling = __commonJS({
|
|
|
13120
13128
|
"use strict";
|
|
13121
13129
|
var BOMChar = "\uFEFF";
|
|
13122
13130
|
exports.PrependBOM = PrependBOMWrapper;
|
|
13123
|
-
function PrependBOMWrapper(
|
|
13124
|
-
this.encoder =
|
|
13131
|
+
function PrependBOMWrapper(encoder2, options) {
|
|
13132
|
+
this.encoder = encoder2;
|
|
13125
13133
|
this.addBOM = true;
|
|
13126
13134
|
}
|
|
13127
13135
|
__name(PrependBOMWrapper, "PrependBOMWrapper");
|
|
@@ -16754,9 +16762,9 @@ var require_lib3 = __commonJS({
|
|
|
16754
16762
|
module.exports.defaultCharSingleByte = "?";
|
|
16755
16763
|
module.exports.encode = /* @__PURE__ */ __name(function encode(str, encoding, options) {
|
|
16756
16764
|
str = "" + (str || "");
|
|
16757
|
-
var
|
|
16758
|
-
var res =
|
|
16759
|
-
var trail =
|
|
16765
|
+
var encoder2 = module.exports.getEncoder(encoding, options);
|
|
16766
|
+
var res = encoder2.write(str);
|
|
16767
|
+
var trail = encoder2.end();
|
|
16760
16768
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
16761
16769
|
}, "encode");
|
|
16762
16770
|
module.exports.decode = /* @__PURE__ */ __name(function decode2(buf, encoding, options) {
|
|
@@ -16827,11 +16835,11 @@ var require_lib3 = __commonJS({
|
|
|
16827
16835
|
};
|
|
16828
16836
|
module.exports.getEncoder = /* @__PURE__ */ __name(function getEncoder(encoding, options) {
|
|
16829
16837
|
var codec = module.exports.getCodec(encoding);
|
|
16830
|
-
var
|
|
16838
|
+
var encoder2 = new codec.encoder(options, codec);
|
|
16831
16839
|
if (codec.bomAware && options && options.addBOM) {
|
|
16832
|
-
|
|
16840
|
+
encoder2 = new bomHandling.PrependBOM(encoder2, options);
|
|
16833
16841
|
}
|
|
16834
|
-
return
|
|
16842
|
+
return encoder2;
|
|
16835
16843
|
}, "getEncoder");
|
|
16836
16844
|
module.exports.getDecoder = /* @__PURE__ */ __name(function getDecoder(encoding, options) {
|
|
16837
16845
|
var codec = module.exports.getCodec(encoding);
|
|
@@ -16874,7 +16882,7 @@ var require_lib3 = __commonJS({
|
|
|
16874
16882
|
}
|
|
16875
16883
|
});
|
|
16876
16884
|
|
|
16877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16878
16886
|
var RULES_VERSION = 5;
|
|
16879
16887
|
var LOOK_BACK = 50;
|
|
16880
16888
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16964,15 +16972,15 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16964
16972
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16965
16973
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16966
16974
|
|
|
16967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16968
16976
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16969
16977
|
|
|
16970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
16971
16979
|
import { randomBytes } from "node:crypto";
|
|
16972
16980
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
16973
16981
|
var newOperationId = newSendId;
|
|
16974
16982
|
|
|
16975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
16976
16984
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
16977
16985
|
import { open, stat } from "node:fs/promises";
|
|
16978
16986
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17193,7 +17201,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17193
17201
|
return { name, source };
|
|
17194
17202
|
}, "readStickerFile");
|
|
17195
17203
|
|
|
17196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17197
17205
|
var COMMAND_NEEDS = {
|
|
17198
17206
|
"account update": ["updateProfile", "change the profile"],
|
|
17199
17207
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17243,7 +17251,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17243
17251
|
return group;
|
|
17244
17252
|
}, "hideNever");
|
|
17245
17253
|
|
|
17246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17247
17255
|
var AUDIT_PAGE = 200;
|
|
17248
17256
|
var AUDIT_BUDGET = 10;
|
|
17249
17257
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17323,7 +17331,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17323
17331
|
return found;
|
|
17324
17332
|
}, "burstJoins");
|
|
17325
17333
|
|
|
17326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17327
17335
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17328
17336
|
command.allowUnknownOption();
|
|
17329
17337
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17343,7 +17351,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17343
17351
|
return command;
|
|
17344
17352
|
}, "queryWordsAfterOptions");
|
|
17345
17353
|
|
|
17346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17347
17355
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17348
17356
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17349
17357
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17385,7 +17393,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17385
17393
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17386
17394
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17387
17395
|
|
|
17388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17389
17397
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17390
17398
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17391
17399
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17408,7 +17416,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17408
17416
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17409
17417
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17410
17418
|
|
|
17411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17412
17420
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17413
17421
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17414
17422
|
const zone = timezoneOf();
|
|
@@ -17494,7 +17502,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17494
17502
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17495
17503
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17496
17504
|
|
|
17497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17498
17506
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17499
17507
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17500
17508
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17544,7 +17552,14 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17544
17552
|
output(annotate(group.command("summary"), { effects: LOCAL_READ, output: { entity: "meeting_summary" } }).description("show stored meeting summaries").argument("<meeting>", "stored meeting id", integer4)).action(async (id2, _opts, command) => {
|
|
17545
17553
|
print(await meetingSummaryAnswer(deps.store, id2, deps.accountId), command);
|
|
17546
17554
|
});
|
|
17547
|
-
output(annotate(group.command("export"), { effects: LOCAL_WRITE, output: { entity: "meeting_export" } }).description("export a meeting as Markdown or one transcript as WebVTT").argument("<meeting>", "stored meeting id", integer4).addOption(new Option("--format <format>", "export format").choices(["markdown", "vtt"]).default("markdown")).option("--transcript-id <id>", "export a specific transcript version", integer4).
|
|
17555
|
+
const exporter = output(annotate(group.command("export"), { effects: LOCAL_WRITE, output: { entity: "meeting_export" } }).description("export a meeting as Markdown or one transcript as WebVTT").argument("<meeting>", "stored meeting id", integer4).addOption(new Option("--format <format>", "export format").choices(["markdown", "vtt"]).default("markdown")).option("--transcript-id <id>", "export a specific transcript version", integer4).addOption(
|
|
17556
|
+
// Not over MCP: an agent would choose where on the owner's disk to write; it gets the content in the answer.
|
|
17557
|
+
annotateOption(new Option("--output <file>", "write content to a new file through the host's writer"), {
|
|
17558
|
+
mcp: false
|
|
17559
|
+
})
|
|
17560
|
+
));
|
|
17561
|
+
deps.newFileOutput?.(exporter, "output");
|
|
17562
|
+
exporter.action(async (id2, opts, command) => {
|
|
17548
17563
|
if (opts.output !== void 0 && !opts.output.trim())
|
|
17549
17564
|
throw new MeetingError("validation_error", "output path must not be empty");
|
|
17550
17565
|
if (opts.output !== void 0 && !deps.writeFile)
|
|
@@ -17571,8 +17586,10 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17571
17586
|
output(annotate(group.command("sync"), {
|
|
17572
17587
|
effects: FETCH,
|
|
17573
17588
|
offline: false,
|
|
17574
|
-
output: { entity: "meeting_ingestion" }
|
|
17575
|
-
|
|
17589
|
+
output: { entity: "meeting_ingestion" },
|
|
17590
|
+
// Only a sync that stops itself at its budget may outlive the one-shot deadline.
|
|
17591
|
+
...deps.budgetOf ? { cooperative: true, partial: true } : {}
|
|
17592
|
+
}).description("bring the stored meetings up to date from the connected account, oldest first; a run that stops before its deadline keeps what it saved and the next one goes on from there")).option("--since-time <time>", "fetch meetings starting at or after this ISO 8601 date or time", date).option("--lookback-days <days>", "revisit recent occurrences for late transcripts (0\u201331)", lookbackDays).option("--rescan", "read the last 30 days again, not only what came after the last sync").action(async (opts, command) => {
|
|
17576
17593
|
const source = deps.source;
|
|
17577
17594
|
if (!source)
|
|
17578
17595
|
throw new MeetingError("configuration_error", "meeting source is unavailable");
|
|
@@ -17580,7 +17597,9 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17580
17597
|
accountId: deps.accountId,
|
|
17581
17598
|
since: opts.sinceTime === void 0 ? void 0 : new Date(opts.sinceTime).toISOString(),
|
|
17582
17599
|
now: deps.now?.(),
|
|
17583
|
-
lookbackMs: opts.lookbackDays * 864e5
|
|
17600
|
+
...opts.lookbackDays === void 0 ? {} : { lookbackMs: opts.lookbackDays * 864e5 },
|
|
17601
|
+
...opts.rescan ? { rescan: true } : {},
|
|
17602
|
+
...deps.budgetOf ? { budget: deps.budgetOf(command) } : {}
|
|
17584
17603
|
}), command));
|
|
17585
17604
|
});
|
|
17586
17605
|
const importCommand = annotate(group.command("import"), {
|
|
@@ -17627,7 +17646,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17627
17646
|
}, "addMeetingCommandsDefinition");
|
|
17628
17647
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17629
17648
|
|
|
17630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17631
17650
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17632
17651
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17633
17652
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17760,7 +17779,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17760
17779
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17761
17780
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17762
17781
|
|
|
17763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17764
17783
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17765
17784
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17766
17785
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17769,7 +17788,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17769
17788
|
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");
|
|
17770
17789
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17771
17790
|
|
|
17772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17773
17792
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17774
17793
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17775
17794
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18031,7 +18050,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18031
18050
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18032
18051
|
}), "sessionAnswer");
|
|
18033
18052
|
|
|
18034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18035
18054
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18036
18055
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18037
18056
|
if (key in own)
|
|
@@ -18048,7 +18067,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18048
18067
|
return found.bind(adapter);
|
|
18049
18068
|
}, "capability");
|
|
18050
18069
|
|
|
18051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18052
18071
|
var TAKES = {
|
|
18053
18072
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18054
18073
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18108,9 +18127,9 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18108
18127
|
throw wrongAccount(reference, scope, profiles);
|
|
18109
18128
|
}, "ensureAccount");
|
|
18110
18129
|
|
|
18111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18112
18131
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18113
|
-
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18132
|
+
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18114
18133
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
18115
18134
|
const wanted = foldName(reference.trim());
|
|
18116
18135
|
const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
|
|
@@ -18153,7 +18172,7 @@ ${lines3}`, { candidates });
|
|
|
18153
18172
|
}, "ambiguous");
|
|
18154
18173
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18155
18174
|
|
|
18156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18157
18176
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18158
18177
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18159
18178
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18161,9 +18180,7 @@ var SQLITE_BUSY = 5;
|
|
|
18161
18180
|
var storeAbsent = /* @__PURE__ */ __name((error) => {
|
|
18162
18181
|
if (isCliFailure(error))
|
|
18163
18182
|
return error.code === "validation_error" && error.message === NO_LOCAL_STORE;
|
|
18164
|
-
|
|
18165
|
-
const code = errcode ?? errno;
|
|
18166
|
-
return error instanceof Error && typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
18183
|
+
return error instanceof Error && sqliteCode(error) === SQLITE_BUSY;
|
|
18167
18184
|
}, "storeAbsent");
|
|
18168
18185
|
var accountUnknown = /* @__PURE__ */ __name((error) => isCliFailure(error) && (error.code === "not_found" || error.code === "authentication_error"), "accountUnknown");
|
|
18169
18186
|
var unless = /* @__PURE__ */ __name(async (work, expected2) => {
|
|
@@ -18217,7 +18234,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18217
18234
|
}), "storedDeps");
|
|
18218
18235
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18219
18236
|
|
|
18220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18221
18238
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18222
18239
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18223
18240
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18240,10 +18257,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18240
18257
|
}
|
|
18241
18258
|
}, "patiently");
|
|
18242
18259
|
|
|
18243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18244
18261
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18245
18262
|
|
|
18246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18247
18264
|
var REQUEST_MS = 400;
|
|
18248
18265
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18249
18266
|
const lowest = ranges[0];
|
|
@@ -18266,13 +18283,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18266
18283
|
};
|
|
18267
18284
|
}, "estimateBackfill");
|
|
18268
18285
|
|
|
18269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18270
18287
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18271
18288
|
...error,
|
|
18272
18289
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18273
18290
|
}), "withRecovery");
|
|
18274
18291
|
|
|
18275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18276
18293
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18277
18294
|
if (isCliFailure(error))
|
|
18278
18295
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18355,7 +18372,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18355
18372
|
};
|
|
18356
18373
|
}, "mergeBatches");
|
|
18357
18374
|
|
|
18358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18359
18376
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18360
18377
|
if (deps.reads !== "store")
|
|
18361
18378
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18514,7 +18531,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18514
18531
|
}
|
|
18515
18532
|
}, "senderAmong");
|
|
18516
18533
|
|
|
18517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18518
18535
|
var CONTEXT_MESSAGES = 3;
|
|
18519
18536
|
var CONTEXT_MINUTES = 10;
|
|
18520
18537
|
var MAX_CHARS = 1200;
|
|
@@ -18538,12 +18555,12 @@ var context = {
|
|
|
18538
18555
|
}, "describe")
|
|
18539
18556
|
};
|
|
18540
18557
|
|
|
18541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18542
18559
|
var BUILT_INS = [context];
|
|
18543
18560
|
var providers = [...BUILT_INS];
|
|
18544
18561
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18545
18562
|
|
|
18546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18547
18564
|
var READ_PAGE = 5e3;
|
|
18548
18565
|
var CHAIN = 50;
|
|
18549
18566
|
var CONVERSATION_QUERY = {
|
|
@@ -18695,7 +18712,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
18695
18712
|
return size2;
|
|
18696
18713
|
}, "sized");
|
|
18697
18714
|
|
|
18698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18699
18716
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18700
18717
|
var MESSAGE_PAGE = 5e3;
|
|
18701
18718
|
var PER_SESSION = 8;
|
|
@@ -18714,7 +18731,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18714
18731
|
price: remote.price,
|
|
18715
18732
|
installed: true,
|
|
18716
18733
|
perBatch: PER_REQUEST * concurrency,
|
|
18717
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18734
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-ZKXIIGYH.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18718
18735
|
};
|
|
18719
18736
|
}
|
|
18720
18737
|
const model = textModel(choice);
|
|
@@ -18731,7 +18748,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18731
18748
|
if (!isTextModelInstalled(model, directory2))
|
|
18732
18749
|
throw notDownloaded(model.id);
|
|
18733
18750
|
if (apart) {
|
|
18734
|
-
const { openProcess } = await import("./process-
|
|
18751
|
+
const { openProcess } = await import("./process-4ZHPNUIQ.js");
|
|
18735
18752
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18736
18753
|
}
|
|
18737
18754
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19020,7 +19037,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19020
19037
|
return { ...one, state };
|
|
19021
19038
|
}, "shaped");
|
|
19022
19039
|
|
|
19023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19024
19041
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19025
19042
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19026
19043
|
for (const [key, value, maximum] of [
|
|
@@ -19073,7 +19090,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19073
19090
|
}
|
|
19074
19091
|
}, "catchUpSearch");
|
|
19075
19092
|
|
|
19076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19077
19094
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19078
19095
|
if (deps.reads === "store") {
|
|
19079
19096
|
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`);
|
|
@@ -19439,7 +19456,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19439
19456
|
return message?.timestamp ?? fallback;
|
|
19440
19457
|
}, "timeOfKey");
|
|
19441
19458
|
|
|
19442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19443
19460
|
var LINKS = /https?:\/\/\S+/g;
|
|
19444
19461
|
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");
|
|
19445
19462
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19469,7 +19486,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19469
19486
|
});
|
|
19470
19487
|
}, "questions");
|
|
19471
19488
|
|
|
19472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19473
19490
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19474
19491
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19475
19492
|
const name = typed.trim().toLowerCase();
|
|
@@ -19526,7 +19543,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19526
19543
|
return best.name;
|
|
19527
19544
|
}, "categorize");
|
|
19528
19545
|
|
|
19529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19530
19547
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19531
19548
|
var RULES_IN = {
|
|
19532
19549
|
dialog: "all",
|
|
@@ -19623,7 +19640,7 @@ var applyTaskRules = /* @__PURE__ */ __name(async (review, { store, account, now
|
|
|
19623
19640
|
return result;
|
|
19624
19641
|
}, "applyTaskRules");
|
|
19625
19642
|
var ARRIVAL_WINDOW = 50;
|
|
19626
|
-
var
|
|
19643
|
+
var kindOf = /* @__PURE__ */ __name(async (store, account, chat) => await store.chats.chatKind(account, chat) ?? "unknown", "kindOf");
|
|
19627
19644
|
var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, message) => {
|
|
19628
19645
|
const page = await store.messages.messages(account, message.chatId, { limit: ARRIVAL_WINDOW });
|
|
19629
19646
|
const messages = [...page.items.filter((one) => one.id !== message.id), message].sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp));
|
|
@@ -19632,7 +19649,7 @@ var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, mess
|
|
|
19632
19649
|
{
|
|
19633
19650
|
id: message.chatId,
|
|
19634
19651
|
messages,
|
|
19635
|
-
kind: await
|
|
19652
|
+
kind: await kindOf(store, account, message.chatId),
|
|
19636
19653
|
watched: (await watchedChats(store, account)).has(message.chatId)
|
|
19637
19654
|
}
|
|
19638
19655
|
]
|
|
@@ -19724,7 +19741,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19724
19741
|
const tasks = [];
|
|
19725
19742
|
const pass = await applyTaskRules({
|
|
19726
19743
|
chats: [
|
|
19727
|
-
{ id: chat, messages: page.items, kind: await
|
|
19744
|
+
{ id: chat, messages: page.items, kind: await kindOf(store, account, chat), watched: watched.has(chat) }
|
|
19728
19745
|
]
|
|
19729
19746
|
}, { store: store.tasks, account, categories, dryRun: !yes, onHeld: /* @__PURE__ */ __name((task2) => tasks.push(task2), "onHeld") });
|
|
19730
19747
|
passes.push({ chat, messages: page.items.length, ...pass, tasks });
|
|
@@ -19732,7 +19749,11 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19732
19749
|
return passes;
|
|
19733
19750
|
}, "applyTaskRulesToChats");
|
|
19734
19751
|
|
|
19735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
19753
|
+
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
19754
|
+
var encoder = new TextEncoder();
|
|
19755
|
+
|
|
19756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19736
19757
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19737
19758
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19738
19759
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19772,7 +19793,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19772
19793
|
};
|
|
19773
19794
|
}, "dateWindow");
|
|
19774
19795
|
|
|
19775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19776
19797
|
var DAY_MS = 864e5;
|
|
19777
19798
|
var NEW_DAYS = 30;
|
|
19778
19799
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19849,7 +19870,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19849
19870
|
};
|
|
19850
19871
|
}, "scorePerson");
|
|
19851
19872
|
|
|
19852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
19853
19874
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
19854
19875
|
const controller = new AbortController();
|
|
19855
19876
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -19865,7 +19886,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
19865
19886
|
}
|
|
19866
19887
|
}, "withTimeLimit");
|
|
19867
19888
|
|
|
19868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19869
19890
|
var REGISTRIES = {
|
|
19870
19891
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19871
19892
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -19952,7 +19973,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
19952
19973
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
19953
19974
|
})), "notCovered");
|
|
19954
19975
|
|
|
19955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
19956
19977
|
var ACTIVITY_MESSAGES = 1e3;
|
|
19957
19978
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
19958
19979
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20040,7 +20061,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20040
20061
|
};
|
|
20041
20062
|
}, "botCheckService");
|
|
20042
20063
|
|
|
20043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20044
20065
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20045
20066
|
if (value === void 0)
|
|
20046
20067
|
return void 0;
|
|
@@ -20050,7 +20071,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20050
20071
|
return id2;
|
|
20051
20072
|
}, "threadIdOf");
|
|
20052
20073
|
|
|
20053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20054
20075
|
var TOP_POSTS = 5;
|
|
20055
20076
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20056
20077
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20167,7 +20188,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20167
20188
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20168
20189
|
}, "median");
|
|
20169
20190
|
|
|
20170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20171
20192
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20172
20193
|
const events = [];
|
|
20173
20194
|
for (const stay of stays) {
|
|
@@ -20199,7 +20220,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20199
20220
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20200
20221
|
}, "memberEvents");
|
|
20201
20222
|
|
|
20202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20203
20224
|
var EVENTS_DAYS = 7;
|
|
20204
20225
|
var TRACKED_DAYS = 30;
|
|
20205
20226
|
var STATS_PAGE = 1e3;
|
|
@@ -20494,7 +20515,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20494
20515
|
return members.length === 0 ? null : members;
|
|
20495
20516
|
}, "storedMembers");
|
|
20496
20517
|
|
|
20497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20498
20519
|
var INBOX_CHATS = 20;
|
|
20499
20520
|
var REVIEW_DAYS = 3;
|
|
20500
20521
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20702,7 +20723,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20702
20723
|
};
|
|
20703
20724
|
}, "inboxService");
|
|
20704
20725
|
|
|
20705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
20706
20727
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
20707
20728
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
20708
20729
|
const { text: text2, spans } = formatted2;
|
|
@@ -20762,7 +20783,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
20762
20783
|
};
|
|
20763
20784
|
}, "visibleFormattedText");
|
|
20764
20785
|
|
|
20765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
20766
20787
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
20767
20788
|
var LINK2 = /https?:\/\/\S+/i;
|
|
20768
20789
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -20950,7 +20971,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
20950
20971
|
}, "nextPoint");
|
|
20951
20972
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
20952
20973
|
|
|
20953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
20954
20975
|
import { existsSync, readFileSync } from "node:fs";
|
|
20955
20976
|
import { join } from "node:path";
|
|
20956
20977
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -21093,7 +21114,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
21093
21114
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
21094
21115
|
}, "assign");
|
|
21095
21116
|
|
|
21096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21097
21118
|
var CONTEXT_MESSAGES2 = 10;
|
|
21098
21119
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21099
21120
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21169,18 +21190,34 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
21169
21190
|
}
|
|
21170
21191
|
return { items, cut: true };
|
|
21171
21192
|
}, "eventsOnce");
|
|
21172
|
-
var
|
|
21193
|
+
var nameOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "nameOf");
|
|
21194
|
+
var readableAccounts = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
21195
|
+
const stored = await store.accounts.storedAccounts();
|
|
21196
|
+
const own = stored.find((one) => nameOf(one) === nameOf(asked));
|
|
21197
|
+
if (!own || asked.scope !== void 0 && asked.scope !== own.scope)
|
|
21198
|
+
throw new CliError("not_found", `no ${asked.provider} account ${asked.account} in the store`);
|
|
21199
|
+
const allowed = scopes ?? [own.scope];
|
|
21200
|
+
return stored.filter((one) => allowed.includes(one.scope));
|
|
21201
|
+
}, "readableAccounts");
|
|
21202
|
+
var readsOf = /* @__PURE__ */ __name((record2, asked, readable) => {
|
|
21203
|
+
const scopeOf4 = new Map(readable.map((one) => [nameOf(one), one.scope]));
|
|
21204
|
+
return record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).flatMap((account) => {
|
|
21205
|
+
const scope = scopeOf4.get(nameOf({ provider: identity.provider, account }));
|
|
21206
|
+
return identity.accounts.includes(account) && scope !== void 0 ? [{ key: { provider: identity.provider, account }, scope, identity }] : [];
|
|
21207
|
+
}));
|
|
21208
|
+
}, "readsOf");
|
|
21173
21209
|
var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
|
|
21174
21210
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21175
21211
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
21176
21212
|
if (!record2)
|
|
21177
21213
|
throw new CliError("not_found", `no person ${found.id} in the store`);
|
|
21214
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21178
21215
|
return {
|
|
21179
21216
|
person: { ...record2, provider: asked.provider, id: found.id },
|
|
21180
|
-
...await recordContext(store, record2, readsOf(record2, asked), options)
|
|
21217
|
+
...await recordContext(store, record2, readsOf(record2, asked, readable), readable, options)
|
|
21181
21218
|
};
|
|
21182
21219
|
}, "personContext");
|
|
21183
|
-
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21220
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21184
21221
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
21185
21222
|
const shared = [];
|
|
21186
21223
|
const notRead = [];
|
|
@@ -21238,9 +21275,15 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21238
21275
|
cut ||= named2.hasMore;
|
|
21239
21276
|
}
|
|
21240
21277
|
const personId = Number(record2.uid);
|
|
21241
|
-
const
|
|
21278
|
+
const calendars = [];
|
|
21279
|
+
for (const one of readable)
|
|
21280
|
+
if ((await store.calendar.calendars(one.id)).length)
|
|
21281
|
+
calendars.push(one);
|
|
21282
|
+
const accountIds = calendars.map(({ id: id2 }) => id2);
|
|
21283
|
+
const nothing = { items: [], cut: false };
|
|
21284
|
+
const upcoming = accountIds.length ? await eventsOnce(store, { personId, accountIds, from: now }, messages) : nothing;
|
|
21242
21285
|
const upcomingIds = new Set(upcoming.items.map(({ id: id2 }) => id2));
|
|
21243
|
-
const past = await eventsOnce(store, { personId, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages);
|
|
21286
|
+
const past = accountIds.length ? await eventsOnce(store, { personId, accountIds, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages) : nothing;
|
|
21244
21287
|
cut ||= upcoming.cut || past.cut;
|
|
21245
21288
|
direct.sort(newestFirst);
|
|
21246
21289
|
const each = [...direct, ...beyond].sort(newestFirst);
|
|
@@ -21256,7 +21299,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21256
21299
|
};
|
|
21257
21300
|
cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
|
|
21258
21301
|
const kept2 = withinBytes(lists, bytes2);
|
|
21302
|
+
const read = [
|
|
21303
|
+
...reads.map(({ key, scope }) => ({ ...key, scope })),
|
|
21304
|
+
...calendars.map(({ provider, account, scope }) => ({ provider, account, scope }))
|
|
21305
|
+
];
|
|
21306
|
+
const accounts = [...new Map(read.map((one) => [nameOf(one), one])).values()].sort((a, b) => nameOf(a).localeCompare(nameOf(b)));
|
|
21259
21307
|
return {
|
|
21308
|
+
accounts,
|
|
21260
21309
|
shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
|
|
21261
21310
|
last: {
|
|
21262
21311
|
fromThem: each.find((message) => !message.outgoing) ?? null,
|
|
@@ -21328,7 +21377,7 @@ var lean = /* @__PURE__ */ __name((key, message, detail) => {
|
|
|
21328
21377
|
replyTo: message.replyTo?.id ?? message.replyToId ?? null
|
|
21329
21378
|
};
|
|
21330
21379
|
}, "lean");
|
|
21331
|
-
var
|
|
21380
|
+
var kindOf2 = /* @__PURE__ */ __name((chat, chatId, person) => chat && chat.kind !== "unknown" ? chat.kind : chatId === person ? "dialog" : chat?.kind ?? "unknown", "kindOf");
|
|
21332
21381
|
var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { chats, limit = CHAT_MESSAGES, detail = 0 }) => {
|
|
21333
21382
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21334
21383
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
@@ -21341,7 +21390,7 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21341
21390
|
const chat = stored.find((one) => one.id === chatId);
|
|
21342
21391
|
const page = await store.messages.find({ account: asked, senders: [found.id], chatId, limit });
|
|
21343
21392
|
answer.push({
|
|
21344
|
-
chat: { id: chatId, title: chat?.title ?? null, kind:
|
|
21393
|
+
chat: { id: chatId, title: chat?.title ?? null, kind: kindOf2(chat, chatId, found.id) },
|
|
21345
21394
|
messages: page.items.toSorted((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((message) => lean(asked, message, detail)),
|
|
21346
21395
|
complete: held.get(chatId) === "complete",
|
|
21347
21396
|
more: page.hasMore
|
|
@@ -21354,10 +21403,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21354
21403
|
};
|
|
21355
21404
|
}, "personMessages");
|
|
21356
21405
|
|
|
21357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21358
21407
|
import { createHash } from "node:crypto";
|
|
21359
21408
|
|
|
21360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21361
21410
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21362
21411
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21363
21412
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21375,7 +21424,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21375
21424
|
return { parsed, meeting };
|
|
21376
21425
|
}, "authorizedMeetingMetadata");
|
|
21377
21426
|
|
|
21378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21379
21428
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21380
21429
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21381
21430
|
if (signal?.aborted)
|
|
@@ -21574,7 +21623,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21574
21623
|
return { ...packet, fingerprint: hash(packet) };
|
|
21575
21624
|
}, "readMeetingEvidence");
|
|
21576
21625
|
|
|
21577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21578
21627
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21579
21628
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21580
21629
|
const requestedAccounts = options.accountIds;
|
|
@@ -21673,7 +21722,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21673
21722
|
};
|
|
21674
21723
|
}, "personMeetingContext");
|
|
21675
21724
|
|
|
21676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21677
21726
|
var PREPARE_BYTES = 96 * 1024;
|
|
21678
21727
|
var MEETINGS = 5;
|
|
21679
21728
|
var CUES = 3;
|
|
@@ -21701,7 +21750,6 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21701
21750
|
coverage: { included: items.length, hasMore: over || cut, cutBy: cut ? "bytes" : over ? "limit" : null }
|
|
21702
21751
|
};
|
|
21703
21752
|
}, "budgeted");
|
|
21704
|
-
const reads = readsOf(context2.person, asked);
|
|
21705
21753
|
const partial = new Set(context2.notRead.map((chat) => `${chat.provider}/${chat.account}/${chat.chatId}`));
|
|
21706
21754
|
const waiting = [];
|
|
21707
21755
|
for (const chat of context2.shared.filter((one) => one.kind === "dialog")) {
|
|
@@ -21718,10 +21766,10 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21718
21766
|
});
|
|
21719
21767
|
}
|
|
21720
21768
|
waiting.sort((a, b) => Date.parse(b.message.timestamp) - Date.parse(a.message.timestamp));
|
|
21721
|
-
const accounts =
|
|
21769
|
+
const accounts = context2.accounts.map(({ provider, account }) => ({ provider, account }));
|
|
21722
21770
|
const held = await store.people.preparation(context2.person.uid, { accounts, limit });
|
|
21723
|
-
const
|
|
21724
|
-
const meetings = await meetingsOf(store, context2.person.uid,
|
|
21771
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21772
|
+
const meetings = await meetingsOf(store, context2.person.uid, readable, options.since, () => left);
|
|
21725
21773
|
const sections = {
|
|
21726
21774
|
waiting: budgeted({ items: waiting, hasMore: false }),
|
|
21727
21775
|
tasks: budgeted(held.tasks),
|
|
@@ -21790,7 +21838,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21790
21838
|
}
|
|
21791
21839
|
}, "meetingsOf");
|
|
21792
21840
|
|
|
21793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21794
21842
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21795
21843
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21796
21844
|
const held = await storeIfOpen(deps);
|
|
@@ -21860,7 +21908,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21860
21908
|
complete: false
|
|
21861
21909
|
})), "quiet");
|
|
21862
21910
|
|
|
21863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21864
21912
|
var TIMELINE_ITEMS = 50;
|
|
21865
21913
|
var TIMELINE_MAX = 500;
|
|
21866
21914
|
var SCOPES = ["personal", "work"];
|
|
@@ -21915,7 +21963,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21915
21963
|
};
|
|
21916
21964
|
}, "personTimeline");
|
|
21917
21965
|
|
|
21918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21919
21967
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21920
21968
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21921
21969
|
const held = await storeIfOpen(deps);
|
|
@@ -22142,7 +22190,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22142
22190
|
return rest;
|
|
22143
22191
|
}, "withoutPhone");
|
|
22144
22192
|
|
|
22145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22146
22194
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22147
22195
|
var PERIOD_FIELD = "created";
|
|
22148
22196
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22245,7 +22293,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22245
22293
|
}));
|
|
22246
22294
|
}, "meetingNames");
|
|
22247
22295
|
|
|
22248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22249
22297
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22250
22298
|
const tags = /* @__PURE__ */ new Map();
|
|
22251
22299
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22254,7 +22302,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22254
22302
|
return tags;
|
|
22255
22303
|
}, "taskTagFilters");
|
|
22256
22304
|
|
|
22257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22258
22306
|
var TASK_QUERY = {
|
|
22259
22307
|
entity: "task",
|
|
22260
22308
|
backend: "sql",
|
|
@@ -22746,7 +22794,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22746
22794
|
};
|
|
22747
22795
|
}, "taskView");
|
|
22748
22796
|
|
|
22749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
22750
22798
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
22751
22799
|
if (newest === null)
|
|
22752
22800
|
return null;
|
|
@@ -22755,7 +22803,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
22755
22803
|
return newest.addressed ? "owed" : null;
|
|
22756
22804
|
}, "mailTurn");
|
|
22757
22805
|
|
|
22758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
22759
22807
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
22760
22808
|
if (error instanceof CliError && error.code === "not_found")
|
|
22761
22809
|
return void 0;
|
|
@@ -22813,7 +22861,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22813
22861
|
};
|
|
22814
22862
|
}, "mailActivity");
|
|
22815
22863
|
|
|
22816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22817
22865
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22818
22866
|
const ids = [...new Set(chatIds)];
|
|
22819
22867
|
if (ids.length === 0)
|
|
@@ -22839,7 +22887,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22839
22887
|
}));
|
|
22840
22888
|
}, "chatCoverage");
|
|
22841
22889
|
|
|
22842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
22843
22891
|
var DAY = 864e5;
|
|
22844
22892
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
22845
22893
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23086,7 +23134,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23086
23134
|
};
|
|
23087
23135
|
}, "agendaItem");
|
|
23088
23136
|
|
|
23089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
23090
23138
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
23091
23139
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
23092
23140
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -23150,7 +23198,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
23150
23198
|
}
|
|
23151
23199
|
}, "validateContextEvidencePage");
|
|
23152
23200
|
|
|
23153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
23154
23202
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
23155
23203
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
23156
23204
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -23203,7 +23251,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
23203
23251
|
};
|
|
23204
23252
|
}, "contextReadBudget");
|
|
23205
23253
|
|
|
23206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
23207
23255
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
23208
23256
|
if (!port || typeof port.read !== "function")
|
|
23209
23257
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -23247,7 +23295,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
23247
23295
|
};
|
|
23248
23296
|
}, "createContextEvidenceReader");
|
|
23249
23297
|
|
|
23250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23251
23299
|
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");
|
|
23252
23300
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
23253
23301
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23263,7 +23311,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
23263
23311
|
}, "excerpt");
|
|
23264
23312
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
23265
23313
|
|
|
23266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
23267
23315
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
23268
23316
|
var DEFAULT_PURPOSES = ["work"];
|
|
23269
23317
|
var LINK_PURPOSE = "work";
|
|
@@ -23293,7 +23341,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
23293
23341
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
23294
23342
|
], "purposeList");
|
|
23295
23343
|
|
|
23296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
23297
23345
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
23298
23346
|
async around(ref, window3) {
|
|
23299
23347
|
const at = parseLocator(ref);
|
|
@@ -23388,7 +23436,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23388
23436
|
};
|
|
23389
23437
|
}, "storedNeighbours");
|
|
23390
23438
|
|
|
23391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23392
23440
|
import { createHash as createHash2 } from "node:crypto";
|
|
23393
23441
|
var DAY2 = 864e5;
|
|
23394
23442
|
var MAX_TIME = 864e13;
|
|
@@ -23704,7 +23752,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23704
23752
|
return value;
|
|
23705
23753
|
}, "decodeCheckpoint");
|
|
23706
23754
|
|
|
23707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23708
23756
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23709
23757
|
var PAGE3 = 20;
|
|
23710
23758
|
var PEOPLE = 20;
|
|
@@ -24108,7 +24156,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
24108
24156
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
24109
24157
|
}, "peopleOf");
|
|
24110
24158
|
|
|
24111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
24112
24160
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
24113
24161
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
24114
24162
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -24152,7 +24200,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
24152
24200
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
24153
24201
|
}, "matchVocabularyTerms");
|
|
24154
24202
|
|
|
24155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
24156
24204
|
var KINDS = ["project", "tag", "topic"];
|
|
24157
24205
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
24158
24206
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -24207,7 +24255,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
24207
24255
|
};
|
|
24208
24256
|
}, "findEvidenceMentions");
|
|
24209
24257
|
|
|
24210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
24211
24259
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
24212
24260
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
24213
24261
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -24302,7 +24350,7 @@ var proposedLinksOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
|
24302
24350
|
}
|
|
24303
24351
|
];
|
|
24304
24352
|
}).sort((a, b) => Number(a.id) - Number(b.id));
|
|
24305
|
-
const legacy = (await store.knowledge.relations(null, project)).filter((one) =>
|
|
24353
|
+
const legacy = (await store.knowledge.relations(null, project)).filter((one) => one.standing === "proposed" && one.kind === "member-of" && one.to === project).map((one) => ({ from: one.from, id: `link:${one.id}`, role: one.role, purpose: one.purpose }));
|
|
24306
24354
|
return [...proposals, ...legacy];
|
|
24307
24355
|
}, "proposedLinksOf");
|
|
24308
24356
|
var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed) => {
|
|
@@ -24310,7 +24358,7 @@ var memberRefsOf = /* @__PURE__ */ __name(async (store, project, includeProposed
|
|
|
24310
24358
|
return [];
|
|
24311
24359
|
const confirmed = /* @__PURE__ */ new Set();
|
|
24312
24360
|
for (const relation of await store.knowledge.relations(null, project))
|
|
24313
|
-
if (relation.
|
|
24361
|
+
if (isUsable(relation.standing) && relation.kind === "member-of" && relation.to === project && /^person:.+/.test(relation.from))
|
|
24314
24362
|
confirmed.add(relation.from);
|
|
24315
24363
|
const members = [...confirmed].sort().map((ref) => ({ ref }));
|
|
24316
24364
|
if (!includeProposed)
|
|
@@ -24348,7 +24396,7 @@ var linkedChatsOf = /* @__PURE__ */ __name(async (store, project, options = {})
|
|
|
24348
24396
|
return [];
|
|
24349
24397
|
const chats = [];
|
|
24350
24398
|
for (const relation of await store.knowledge.relations(null, project)) {
|
|
24351
|
-
if (!relation.
|
|
24399
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== project)
|
|
24352
24400
|
continue;
|
|
24353
24401
|
const reference = chatOf2(relation.from);
|
|
24354
24402
|
if (reference)
|
|
@@ -24513,18 +24561,18 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
24513
24561
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
24514
24562
|
}, "purposeHintOf");
|
|
24515
24563
|
|
|
24516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
24517
24565
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24518
24566
|
|
|
24519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
24520
24568
|
import { lstat } from "node:fs/promises";
|
|
24521
24569
|
|
|
24522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24523
24571
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
24524
24572
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
24525
24573
|
import { join as join3 } from "node:path";
|
|
24526
24574
|
|
|
24527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
24528
24576
|
import { createHash as createHash3 } from "node:crypto";
|
|
24529
24577
|
var metadataLimit = 16384;
|
|
24530
24578
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -24584,7 +24632,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
24584
24632
|
}
|
|
24585
24633
|
}, "readPartialMetadata");
|
|
24586
24634
|
|
|
24587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
24588
24636
|
import { randomUUID } from "node:crypto";
|
|
24589
24637
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
24590
24638
|
import { join as join2 } from "node:path";
|
|
@@ -24676,7 +24724,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
24676
24724
|
};
|
|
24677
24725
|
}, "partialWriter");
|
|
24678
24726
|
|
|
24679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24680
24728
|
var NativeRecordingPartialStore = class {
|
|
24681
24729
|
static {
|
|
24682
24730
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -24783,12 +24831,12 @@ var NativeRecordingPartialStore = class {
|
|
|
24783
24831
|
}
|
|
24784
24832
|
};
|
|
24785
24833
|
|
|
24786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24787
24835
|
import { createHash as createHash5 } from "node:crypto";
|
|
24788
24836
|
import { link as link2 } from "node:fs/promises";
|
|
24789
24837
|
import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve2 } from "node:path";
|
|
24790
24838
|
|
|
24791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
24792
24840
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
24793
24841
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
24794
24842
|
signal?.throwIfAborted();
|
|
@@ -24823,7 +24871,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
24823
24871
|
signal?.throwIfAborted();
|
|
24824
24872
|
}, "commitPublication");
|
|
24825
24873
|
|
|
24826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
24827
24875
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24828
24876
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
24829
24877
|
import { join as join4 } from "node:path";
|
|
@@ -24896,7 +24944,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
24896
24944
|
}
|
|
24897
24945
|
}, "writePublicationJournal");
|
|
24898
24946
|
|
|
24899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24900
24948
|
var NativeRecordingPublication = class {
|
|
24901
24949
|
static {
|
|
24902
24950
|
__name(this, "NativeRecordingPublication");
|
|
@@ -24969,7 +25017,7 @@ var NativeRecordingPublication = class {
|
|
|
24969
25017
|
}
|
|
24970
25018
|
};
|
|
24971
25019
|
|
|
24972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
24973
25021
|
import { createHash as createHash6 } from "node:crypto";
|
|
24974
25022
|
import { readdir } from "node:fs/promises";
|
|
24975
25023
|
import { isAbsolute as isAbsolute2, join as join6, resolve as resolve3 } from "node:path";
|
|
@@ -25056,7 +25104,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
25056
25104
|
beforePublish
|
|
25057
25105
|
}), "commitMediaEntry");
|
|
25058
25106
|
|
|
25059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25060
25108
|
var validator = '"media-completed-v1"';
|
|
25061
25109
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
25062
25110
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -25157,7 +25205,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
25157
25205
|
return entry;
|
|
25158
25206
|
}, "archiveMediaFile");
|
|
25159
25207
|
|
|
25160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
25161
25209
|
import { mkdir, realpath } from "node:fs/promises";
|
|
25162
25210
|
import { join as join7, resolve as resolve4 } from "node:path";
|
|
25163
25211
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -25224,7 +25272,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
25224
25272
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
25225
25273
|
}, "withMediaArchiveLocks");
|
|
25226
25274
|
|
|
25227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25228
25276
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
25229
25277
|
if (value === void 0)
|
|
25230
25278
|
return void 0;
|
|
@@ -25377,7 +25425,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
25377
25425
|
}, { create: true });
|
|
25378
25426
|
}, "archiveMedia");
|
|
25379
25427
|
|
|
25380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
25381
25429
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
25382
25430
|
import { basename as basename3, dirname as dirname3, join as join8, resolve as resolve5 } from "node:path";
|
|
25383
25431
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -25530,7 +25578,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
25530
25578
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
25531
25579
|
}, "moveMediaArchive");
|
|
25532
25580
|
|
|
25533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
25534
25582
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
25535
25583
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
25536
25584
|
}, "progress") }) => {
|
|
@@ -25541,7 +25589,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
25541
25589
|
}
|
|
25542
25590
|
}, "nativeRuntime");
|
|
25543
25591
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25544
|
-
}, "progress"), acceptTerms = false }) => {
|
|
25592
|
+
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
25545
25593
|
const model = textModel(id2);
|
|
25546
25594
|
if (model.terms && !acceptTerms) {
|
|
25547
25595
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
@@ -25549,11 +25597,11 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25549
25597
|
const directory2 = textModelsDirectory(env);
|
|
25550
25598
|
if (!isTextModelInstalled(model, directory2)) {
|
|
25551
25599
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25552
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
25600
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25553
25601
|
}
|
|
25554
25602
|
await nativeRuntime({ env, progress });
|
|
25555
25603
|
progress(`${model.id}: loading it once to check it works`);
|
|
25556
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
25604
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-I5ZYHGYC.js");
|
|
25557
25605
|
const embedder = await openEmbedder2(model, directory2);
|
|
25558
25606
|
try {
|
|
25559
25607
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -25565,16 +25613,16 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25565
25613
|
return { model, directory: directory2 };
|
|
25566
25614
|
}, "downloadTextModel");
|
|
25567
25615
|
var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25568
|
-
}, "progress") }) => {
|
|
25616
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
25569
25617
|
const model = rerankModel(id2);
|
|
25570
25618
|
const directory2 = textModelsDirectory(env);
|
|
25571
25619
|
if (!isTextModelInstalled(model, directory2)) {
|
|
25572
25620
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25573
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
25621
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25574
25622
|
}
|
|
25575
25623
|
await nativeRuntime({ env, progress });
|
|
25576
25624
|
progress(`${model.id}: loading it once to check it works`);
|
|
25577
|
-
const { openReranker } = await import("./rerank-
|
|
25625
|
+
const { openReranker } = await import("./rerank-TX5QFURV.js");
|
|
25578
25626
|
const reranker = await openReranker(model, directory2);
|
|
25579
25627
|
try {
|
|
25580
25628
|
await reranker.score("check", ["check"]);
|
|
@@ -25584,15 +25632,15 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
25584
25632
|
return { model, directory: directory2 };
|
|
25585
25633
|
}, "downloadRerankModel");
|
|
25586
25634
|
var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
25587
|
-
}, "progress") }) => {
|
|
25635
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
25588
25636
|
const model = imageModel(id2);
|
|
25589
25637
|
const directory2 = imageModelsDirectory(env);
|
|
25590
25638
|
if (!isImageModelInstalled(model, directory2)) {
|
|
25591
25639
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
25592
|
-
await installFiles(placedImage(model, directory2), { progress });
|
|
25640
|
+
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
25593
25641
|
}
|
|
25594
25642
|
progress(`${model.id}: loading it once to check it works`);
|
|
25595
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
25643
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
25596
25644
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
25597
25645
|
try {
|
|
25598
25646
|
const vector = await embedder.embedQuery("check");
|
|
@@ -25604,7 +25652,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25604
25652
|
return { model, directory: directory2 };
|
|
25605
25653
|
}, "downloadImageModel");
|
|
25606
25654
|
|
|
25607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
25608
25656
|
var MONEY_REQUEST = "money-request";
|
|
25609
25657
|
var MONEY_DONE = "money-done";
|
|
25610
25658
|
var PROMISE = "promise";
|
|
@@ -25638,10 +25686,10 @@ var MONEY_WORDS = [
|
|
|
25638
25686
|
}
|
|
25639
25687
|
];
|
|
25640
25688
|
|
|
25641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
25642
25690
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
25643
25691
|
|
|
25644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
25645
25693
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
25646
25694
|
var MONEY_DONE_FORMS = words([
|
|
25647
25695
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -25681,7 +25729,7 @@ var PROMISE_FORMS = words([
|
|
|
25681
25729
|
"estar\xE1 listo"
|
|
25682
25730
|
]);
|
|
25683
25731
|
|
|
25684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
25685
25733
|
var EXCERPT_CHARS = 80;
|
|
25686
25734
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
25687
25735
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -25703,7 +25751,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
25703
25751
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
25704
25752
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
25705
25753
|
|
|
25706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
25707
25755
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
25708
25756
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
25709
25757
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -25784,7 +25832,7 @@ var amounts = {
|
|
|
25784
25832
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
25785
25833
|
};
|
|
25786
25834
|
|
|
25787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
25788
25836
|
var children = {
|
|
25789
25837
|
id: "children",
|
|
25790
25838
|
version: 1,
|
|
@@ -25813,7 +25861,7 @@ var children = {
|
|
|
25813
25861
|
}, "read")
|
|
25814
25862
|
};
|
|
25815
25863
|
|
|
25816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
25817
25865
|
var coverage = {
|
|
25818
25866
|
id: "coverage",
|
|
25819
25867
|
version: 1,
|
|
@@ -25842,7 +25890,7 @@ var coverage = {
|
|
|
25842
25890
|
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")
|
|
25843
25891
|
};
|
|
25844
25892
|
|
|
25845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25846
25894
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
25847
25895
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
25848
25896
|
signal: "payments",
|
|
@@ -25892,7 +25940,7 @@ var payments = {
|
|
|
25892
25940
|
}, "read")
|
|
25893
25941
|
};
|
|
25894
25942
|
|
|
25895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
25896
25944
|
var PATTERNS_PER_CHAT = 3;
|
|
25897
25945
|
var DAY3 = 864e5;
|
|
25898
25946
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -25981,7 +26029,7 @@ var promises = {
|
|
|
25981
26029
|
}, "read")
|
|
25982
26030
|
};
|
|
25983
26031
|
|
|
25984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
25985
26033
|
var PER_SIDE = 5;
|
|
25986
26034
|
var WEEK = 7 * 864e5;
|
|
25987
26035
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26012,7 +26060,7 @@ var questions2 = {
|
|
|
26012
26060
|
}, "attention")
|
|
26013
26061
|
};
|
|
26014
26062
|
|
|
26015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26016
26064
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26017
26065
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
26018
26066
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -26080,7 +26128,7 @@ var replyNext = {
|
|
|
26080
26128
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
26081
26129
|
};
|
|
26082
26130
|
|
|
26083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
26084
26132
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
26085
26133
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
26086
26134
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -26126,7 +26174,7 @@ var topics = {
|
|
|
26126
26174
|
}, "read")
|
|
26127
26175
|
};
|
|
26128
26176
|
|
|
26129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
26130
26178
|
var STATUS_SIGNALS = [
|
|
26131
26179
|
replyNext,
|
|
26132
26180
|
questions2,
|
|
@@ -26138,7 +26186,7 @@ var STATUS_SIGNALS = [
|
|
|
26138
26186
|
children
|
|
26139
26187
|
];
|
|
26140
26188
|
|
|
26141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
26142
26190
|
var DAY4 = 864e5;
|
|
26143
26191
|
var STATUS_WINDOW = 300;
|
|
26144
26192
|
var STATUS_CHATS = 16;
|
|
@@ -26154,7 +26202,7 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
26154
26202
|
const below = [];
|
|
26155
26203
|
for (const parent of level2)
|
|
26156
26204
|
for (const relation of await store.knowledge.relations(null, parent)) {
|
|
26157
|
-
if (!relation.
|
|
26205
|
+
if (!isUsable(relation.standing) || relation.kind !== "member-of" || relation.to !== parent)
|
|
26158
26206
|
continue;
|
|
26159
26207
|
if (!relation.from.startsWith("project:"))
|
|
26160
26208
|
continue;
|
|
@@ -26327,7 +26375,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26327
26375
|
};
|
|
26328
26376
|
}, "projectStatus");
|
|
26329
26377
|
|
|
26330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
26331
26379
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
26332
26380
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
26333
26381
|
if (deps.offline)
|
|
@@ -26399,7 +26447,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
26399
26447
|
};
|
|
26400
26448
|
}, "accountService");
|
|
26401
26449
|
|
|
26402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
26403
26451
|
var MINUTE = 6e4;
|
|
26404
26452
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
26405
26453
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -26418,7 +26466,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
26418
26466
|
return new Date(at - at % MINUTE).toISOString();
|
|
26419
26467
|
}, "sendTime");
|
|
26420
26468
|
|
|
26421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
26422
26470
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
26423
26471
|
try {
|
|
26424
26472
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -26665,7 +26713,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
26665
26713
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
26666
26714
|
}, "linkLimits");
|
|
26667
26715
|
|
|
26668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
26669
26717
|
var THREADS_PAGE = 500;
|
|
26670
26718
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
26671
26719
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -26744,7 +26792,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
26744
26792
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
26745
26793
|
}, "readMail");
|
|
26746
26794
|
|
|
26747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
26748
26796
|
var NO_MAIL = "no_mail";
|
|
26749
26797
|
var MAIL = "email";
|
|
26750
26798
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -26775,11 +26823,11 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26775
26823
|
if (kind === "messages") {
|
|
26776
26824
|
if (explicit === MAIL)
|
|
26777
26825
|
throw new CliError("validation_error", "mail is searched with `memo search mail`, not search messages");
|
|
26778
|
-
return chosen.filter(({ provider }) =>
|
|
26826
|
+
return chosen.filter(({ provider }) => holdsKindOf(provider, "messages"));
|
|
26779
26827
|
}
|
|
26780
26828
|
if (explicit !== void 0 && explicit !== MAIL && explicit !== "all")
|
|
26781
26829
|
throw new CliError("validation_error", `search mail reads mail only \u2014 \`${command === void 0 ? "" : `${command} `}search messages\` searches ${explicit}`);
|
|
26782
|
-
const mail = (listed2 ? chosen : held).filter(({ provider }) =>
|
|
26830
|
+
const mail = (listed2 ? chosen : held).filter(({ provider }) => holdsKindOf(provider, "mail"));
|
|
26783
26831
|
if (mail.length === 0)
|
|
26784
26832
|
throw new CliError("not_found", "no mail in the store yet \u2014 `memo sync --only mail --since-time <time>` imports it", {
|
|
26785
26833
|
reason: NO_MAIL
|
|
@@ -26791,7 +26839,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26791
26839
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
26792
26840
|
}, "accountsOfKind");
|
|
26793
26841
|
|
|
26794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
26795
26843
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
26796
26844
|
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");
|
|
26797
26845
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -26974,7 +27022,7 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
26974
27022
|
const completeness = [];
|
|
26975
27023
|
const stats = /* @__PURE__ */ new Map();
|
|
26976
27024
|
let inventoryComplete = scopeAccounts.length > 0;
|
|
26977
|
-
for (const selected of scopeAccounts) {
|
|
27025
|
+
for (const selected of scopeAccounts.filter(({ provider }) => !isImportedProvider(provider))) {
|
|
26978
27026
|
if (!await store.sync.syncState(selected, CHAT_LIST_KEY)) {
|
|
26979
27027
|
inventoryComplete = false;
|
|
26980
27028
|
}
|
|
@@ -27139,7 +27187,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
27139
27187
|
};
|
|
27140
27188
|
}, "statsLucene");
|
|
27141
27189
|
|
|
27142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
27143
27191
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
27144
27192
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
27145
27193
|
function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -27308,7 +27356,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27308
27356
|
};
|
|
27309
27357
|
}, "readRankingSelection");
|
|
27310
27358
|
|
|
27311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
27312
27360
|
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");
|
|
27313
27361
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
27314
27362
|
command,
|
|
@@ -27318,7 +27366,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
27318
27366
|
fieldsVersion: FIELD_VERSION
|
|
27319
27367
|
}), "searchRecordOf");
|
|
27320
27368
|
|
|
27321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
27322
27370
|
function invalid4(message) {
|
|
27323
27371
|
throw new CliError("validation_error", message);
|
|
27324
27372
|
}
|
|
@@ -27612,7 +27660,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
27612
27660
|
}, "evidence")
|
|
27613
27661
|
}), "adminStatisticsService");
|
|
27614
27662
|
|
|
27615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
27616
27664
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
27617
27665
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
27618
27666
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -27749,12 +27797,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27749
27797
|
return { plan, repair };
|
|
27750
27798
|
}, "gapsService");
|
|
27751
27799
|
|
|
27752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
27753
27801
|
import { createHash as createHash9 } from "node:crypto";
|
|
27754
27802
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
27755
27803
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
27756
27804
|
|
|
27757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
27758
27806
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
27759
27807
|
import { basename as basename4, join as join9, relative as relative2, sep as sep2 } from "node:path";
|
|
27760
27808
|
var MAX_FILES = 1e4;
|
|
@@ -27825,15 +27873,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
27825
27873
|
return choices;
|
|
27826
27874
|
}, "directoryPaths");
|
|
27827
27875
|
|
|
27828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27829
27877
|
import { posix } from "node:path";
|
|
27830
27878
|
|
|
27831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27832
27880
|
import { setImmediate as tick } from "node:timers/promises";
|
|
27833
27881
|
import { crc32 } from "node:zlib";
|
|
27834
27882
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
27835
27883
|
|
|
27836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
27837
27885
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
27838
27886
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
27839
27887
|
var SAMPLE = 65536;
|
|
@@ -27935,7 +27983,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
27935
27983
|
return result.text;
|
|
27936
27984
|
}, "decodeXml");
|
|
27937
27985
|
|
|
27938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27939
27987
|
var MAX_PART = 10 * 1024 * 1024;
|
|
27940
27988
|
var MAX_ENTRIES = 1e3;
|
|
27941
27989
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28150,7 +28198,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
28150
28198
|
return found;
|
|
28151
28199
|
}, "elements");
|
|
28152
28200
|
|
|
28153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
28154
28202
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
28155
28203
|
let name = "";
|
|
28156
28204
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -28205,7 +28253,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
28205
28253
|
return { text: parts.join("").trim(), truncated: false };
|
|
28206
28254
|
}, "sheetText");
|
|
28207
28255
|
|
|
28208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28209
28257
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
28210
28258
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
28211
28259
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -28605,10 +28653,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
28605
28653
|
}
|
|
28606
28654
|
}, "readDocument");
|
|
28607
28655
|
|
|
28608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28609
28657
|
import { extname as extname3 } from "node:path";
|
|
28610
28658
|
|
|
28611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
28612
28660
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
28613
28661
|
import { dirname as dirname4, extname as extname2, join as join10 } from "node:path";
|
|
28614
28662
|
import { fileURLToPath } from "node:url";
|
|
@@ -28669,7 +28717,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
28669
28717
|
}
|
|
28670
28718
|
}, "derived");
|
|
28671
28719
|
|
|
28672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
28673
28721
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
28674
28722
|
var image2 = {
|
|
28675
28723
|
id: "image",
|
|
@@ -28678,7 +28726,7 @@ var image2 = {
|
|
|
28678
28726
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
28679
28727
|
};
|
|
28680
28728
|
|
|
28681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
28682
28730
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
28683
28731
|
var doc = {
|
|
28684
28732
|
id: "doc",
|
|
@@ -28690,7 +28738,7 @@ var doc = {
|
|
|
28690
28738
|
}), "read")
|
|
28691
28739
|
};
|
|
28692
28740
|
|
|
28693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
28694
28742
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
28695
28743
|
var docx = {
|
|
28696
28744
|
id: "docx",
|
|
@@ -28703,7 +28751,7 @@ var docx = {
|
|
|
28703
28751
|
}), "read")
|
|
28704
28752
|
};
|
|
28705
28753
|
|
|
28706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
28707
28755
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
28708
28756
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
28709
28757
|
"fonttbl",
|
|
@@ -28879,7 +28927,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
28879
28927
|
}, "htmlText");
|
|
28880
28928
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
28881
28929
|
|
|
28882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
28883
28931
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
28884
28932
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
28885
28933
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -28935,7 +28983,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
28935
28983
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
28936
28984
|
}, "markdownSections");
|
|
28937
28985
|
|
|
28938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
28939
28987
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
28940
28988
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
28941
28989
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29006,7 +29054,7 @@ var html = {
|
|
|
29006
29054
|
}, "read")
|
|
29007
29055
|
};
|
|
29008
29056
|
|
|
29009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29010
29058
|
var office = {
|
|
29011
29059
|
id: "office",
|
|
29012
29060
|
version: documentExtractor("odt"),
|
|
@@ -29017,7 +29065,7 @@ var office = {
|
|
|
29017
29065
|
}, "read")
|
|
29018
29066
|
};
|
|
29019
29067
|
|
|
29020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29021
29069
|
var pdf = {
|
|
29022
29070
|
id: "pdf",
|
|
29023
29071
|
version: "unpdf",
|
|
@@ -29084,7 +29132,7 @@ var pdf = {
|
|
|
29084
29132
|
}), "read")
|
|
29085
29133
|
};
|
|
29086
29134
|
|
|
29087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
29088
29136
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
29089
29137
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
29090
29138
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -29104,7 +29152,7 @@ var plain = {
|
|
|
29104
29152
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
29105
29153
|
};
|
|
29106
29154
|
|
|
29107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
29108
29156
|
var rtf = {
|
|
29109
29157
|
id: "rtf",
|
|
29110
29158
|
version: "v1",
|
|
@@ -29112,10 +29160,10 @@ var rtf = {
|
|
|
29112
29160
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
29113
29161
|
};
|
|
29114
29162
|
|
|
29115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29116
29164
|
import { basename as basename5 } from "node:path";
|
|
29117
29165
|
|
|
29118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
29119
29167
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
29120
29168
|
const cells = [];
|
|
29121
29169
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -29153,7 +29201,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
29153
29201
|
return { cells, truncated };
|
|
29154
29202
|
}, "delimitedSpans");
|
|
29155
29203
|
|
|
29156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29157
29205
|
var DELIMITED = {
|
|
29158
29206
|
".csv": ",",
|
|
29159
29207
|
".tsv": " ",
|
|
@@ -29192,7 +29240,7 @@ var sheets = {
|
|
|
29192
29240
|
}, "read")
|
|
29193
29241
|
};
|
|
29194
29242
|
|
|
29195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
29196
29244
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
29197
29245
|
var HEAD_BYTES = 1024;
|
|
29198
29246
|
var readers = [...BUILT_INS2];
|
|
@@ -29202,7 +29250,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
29202
29250
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
29203
29251
|
}, "readWithRegistry");
|
|
29204
29252
|
|
|
29205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29206
29254
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
29207
29255
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
29208
29256
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -30281,7 +30329,7 @@ function imageSize(input) {
|
|
|
30281
30329
|
}
|
|
30282
30330
|
__name(imageSize, "imageSize");
|
|
30283
30331
|
|
|
30284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
30285
30333
|
var MAX_PAGES = 20;
|
|
30286
30334
|
var MAX_PIXELS = 2e7;
|
|
30287
30335
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -30432,7 +30480,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
30432
30480
|
}
|
|
30433
30481
|
}, "ocrPdf");
|
|
30434
30482
|
|
|
30435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
30436
30484
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
30437
30485
|
const limits = pdfPreviewLimits(env);
|
|
30438
30486
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -30509,7 +30557,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
30509
30557
|
}
|
|
30510
30558
|
}, "pdfPreview");
|
|
30511
30559
|
|
|
30512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
30513
30561
|
import { createHash as createHash8 } from "node:crypto";
|
|
30514
30562
|
import { constants } from "node:fs";
|
|
30515
30563
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -30617,7 +30665,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
30617
30665
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
30618
30666
|
}, "transferMime");
|
|
30619
30667
|
|
|
30620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
30621
30669
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
30622
30670
|
import { link as link3, rm } from "node:fs/promises";
|
|
30623
30671
|
import { join as join11, resolve as resolve6 } from "node:path";
|
|
@@ -30731,7 +30779,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30731
30779
|
}
|
|
30732
30780
|
}, "save");
|
|
30733
30781
|
|
|
30734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
30735
30783
|
var ATTACHMENT_QUERY = {
|
|
30736
30784
|
entity: "attachment",
|
|
30737
30785
|
backend: "sql",
|
|
@@ -31154,7 +31202,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31154
31202
|
}, "setText")
|
|
31155
31203
|
}), "attachmentsService");
|
|
31156
31204
|
|
|
31157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
31158
31206
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
31159
31207
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
31160
31208
|
const store = await accountStore(deps);
|
|
@@ -31184,7 +31232,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31184
31232
|
}, "list")
|
|
31185
31233
|
}), "chatDocumentsService");
|
|
31186
31234
|
|
|
31187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
31188
31236
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
31189
31237
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
31190
31238
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -31271,7 +31319,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
31271
31319
|
}
|
|
31272
31320
|
}, "isRetentionSelection");
|
|
31273
31321
|
|
|
31274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
31275
31323
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
31276
31324
|
const fields = text2.split(",").map((one) => one.trim());
|
|
31277
31325
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -31478,7 +31526,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31478
31526
|
};
|
|
31479
31527
|
}, "countersService");
|
|
31480
31528
|
|
|
31481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
31482
31530
|
var SYNC_KEY = "messages.sync-first";
|
|
31483
31531
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
31484
31532
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -31610,7 +31658,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
31610
31658
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
31611
31659
|
}), "withRefresh");
|
|
31612
31660
|
|
|
31613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
31614
31662
|
var CANDIDATES = 50;
|
|
31615
31663
|
var WORD_HITS = 200;
|
|
31616
31664
|
var RRF_K = 60;
|
|
@@ -31885,13 +31933,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
31885
31933
|
return mean2.map((value) => value / length);
|
|
31886
31934
|
}, "meanOf");
|
|
31887
31935
|
|
|
31888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
31889
31937
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
31890
31938
|
...embeddingsMaintenance(deps),
|
|
31891
31939
|
...embeddingsSearch(deps)
|
|
31892
31940
|
}), "embeddingsService");
|
|
31893
31941
|
|
|
31894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
31895
31943
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
31896
31944
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
31897
31945
|
if (deps.offline)
|
|
@@ -32032,7 +32080,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32032
32080
|
};
|
|
32033
32081
|
}, "foldersService");
|
|
32034
32082
|
|
|
32035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
32036
32084
|
var REVIEW_COUNT = 500;
|
|
32037
32085
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
32038
32086
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -32111,7 +32159,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
32111
32159
|
};
|
|
32112
32160
|
}, "mentionsService");
|
|
32113
32161
|
|
|
32114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
32115
32163
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
32116
32164
|
position,
|
|
32117
32165
|
kind,
|
|
@@ -32160,7 +32208,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
32160
32208
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
32161
32209
|
}, "validatePermalink");
|
|
32162
32210
|
|
|
32163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
32164
32212
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
32165
32213
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
32166
32214
|
return `${seconds / 86400}d`;
|
|
@@ -32192,7 +32240,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
32192
32240
|
return seconds;
|
|
32193
32241
|
}, "pinDurationOf");
|
|
32194
32242
|
|
|
32195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
32196
32244
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
32197
32245
|
if (sendAs === void 0) {
|
|
32198
32246
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -32217,7 +32265,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
32217
32265
|
return sendAs;
|
|
32218
32266
|
}, "typedSendAs");
|
|
32219
32267
|
|
|
32220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
32221
32269
|
var TOTAL_CAP = 1e4;
|
|
32222
32270
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
32223
32271
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -32228,7 +32276,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
32228
32276
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
32229
32277
|
}, "totalOf");
|
|
32230
32278
|
|
|
32231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
32232
32280
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
32233
32281
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
32234
32282
|
let narrows = false;
|
|
@@ -32257,7 +32305,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
32257
32305
|
return wanted(root).join(" ").trim();
|
|
32258
32306
|
}, "meaningWords");
|
|
32259
32307
|
|
|
32260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
32261
32309
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
32262
32310
|
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"));
|
|
32263
32311
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -32389,7 +32437,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
32389
32437
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
32390
32438
|
}, "questionLookup");
|
|
32391
32439
|
|
|
32392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
32393
32441
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
32394
32442
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
32395
32443
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -32582,7 +32630,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
32582
32630
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
32583
32631
|
}, "signals");
|
|
32584
32632
|
|
|
32585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
32586
32634
|
var MEANING_DEPTH = 100;
|
|
32587
32635
|
var RRF_K2 = 60;
|
|
32588
32636
|
var RERANK_DEPTH = 50;
|
|
@@ -32907,7 +32955,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
32907
32955
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
32908
32956
|
}, "mixedWithReranker");
|
|
32909
32957
|
|
|
32910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
32911
32959
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
32912
32960
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
32913
32961
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -33106,7 +33154,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
33106
33154
|
return result;
|
|
33107
33155
|
}, "readThreadContext");
|
|
33108
33156
|
|
|
33109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
33110
33158
|
var SEARCH_FILL_MS = 200;
|
|
33111
33159
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
33112
33160
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -33137,6 +33185,8 @@ var topUp = /* @__PURE__ */ __name(async (store) => {
|
|
|
33137
33185
|
}, "topUp");
|
|
33138
33186
|
var MAX_SEARCH_OFFSET = 1e3;
|
|
33139
33187
|
var searchStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, meaning, rerank) => {
|
|
33188
|
+
if (request.text !== void 0)
|
|
33189
|
+
request = { ...request, text: plainQuery(request.text) };
|
|
33140
33190
|
const offset = request.offset ?? 0;
|
|
33141
33191
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
33142
33192
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -33173,12 +33223,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
33173
33223
|
}, "accountOf");
|
|
33174
33224
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
33175
33225
|
|
|
33176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33177
33227
|
import { createHash as createHash10 } from "node:crypto";
|
|
33178
33228
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
33179
33229
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
33180
33230
|
|
|
33181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
33182
33232
|
var GROUP_SETTINGS = [
|
|
33183
33233
|
"allCanPin",
|
|
33184
33234
|
"onlyAdminsAdd",
|
|
@@ -33192,7 +33242,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
33192
33242
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
33193
33243
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
33194
33244
|
|
|
33195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33196
33246
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
33197
33247
|
var PICTURE_FLOOR = 0.25;
|
|
33198
33248
|
var PAGE5 = 50;
|
|
@@ -33209,7 +33259,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33209
33259
|
const directory2 = imageModelsDirectory(deps.env);
|
|
33210
33260
|
if (!isImageModelInstalled(model2, directory2))
|
|
33211
33261
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
33212
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33262
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
33213
33263
|
return openPictureEmbedder(model2, directory2);
|
|
33214
33264
|
}, "open");
|
|
33215
33265
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33406,7 +33456,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
33406
33456
|
}, "search")
|
|
33407
33457
|
}), "withPictures");
|
|
33408
33458
|
|
|
33409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
33410
33460
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
33411
33461
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
33412
33462
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -33474,7 +33524,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
33474
33524
|
}
|
|
33475
33525
|
}, "meaningLane");
|
|
33476
33526
|
|
|
33477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
33478
33528
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
33479
33529
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
33480
33530
|
if (choice === "off")
|
|
@@ -33486,9 +33536,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33486
33536
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
33487
33537
|
try {
|
|
33488
33538
|
const warm = deps.embedders;
|
|
33489
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
33539
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-4ZHPNUIQ.js")).openRerankerProcess(model, directory2, {
|
|
33490
33540
|
threads: defaultThreads()
|
|
33491
|
-
})) : await (await import("./rerank-
|
|
33541
|
+
})) : await (await import("./rerank-TX5QFURV.js")).openReranker(model, directory2);
|
|
33492
33542
|
return {
|
|
33493
33543
|
model: model.id,
|
|
33494
33544
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33508,17 +33558,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33508
33558
|
};
|
|
33509
33559
|
}, "rerankLane");
|
|
33510
33560
|
|
|
33511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
33512
33562
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
33513
33563
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
33514
33564
|
const directory2 = imageModelsDirectory(env);
|
|
33515
33565
|
if (!isImageModelInstalled(model, directory2))
|
|
33516
33566
|
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 });
|
|
33517
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33567
|
+
const { openPictureEmbedder } = await import("./embedder-LTJI67N2.js");
|
|
33518
33568
|
return openPictureEmbedder(model, directory2);
|
|
33519
33569
|
}, "openPictureEmbedderFor");
|
|
33520
33570
|
|
|
33521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
33522
33572
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
33523
33573
|
const metadata = note.frontMatter;
|
|
33524
33574
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -33533,7 +33583,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
33533
33583
|
};
|
|
33534
33584
|
}, "documentSource");
|
|
33535
33585
|
|
|
33536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
33537
33587
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33538
33588
|
let root;
|
|
33539
33589
|
try {
|
|
@@ -33560,7 +33610,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
33560
33610
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33561
33611
|
}, "titleTiers");
|
|
33562
33612
|
|
|
33563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
33564
33614
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33565
33615
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33566
33616
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -33776,6 +33826,7 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
33776
33826
|
return totalOf(count4, shown, hasMore, othersComplete);
|
|
33777
33827
|
}, "notesTotal");
|
|
33778
33828
|
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
33829
|
+
query = plainQuery(query);
|
|
33779
33830
|
const typed = noteSourceOfQuery(query);
|
|
33780
33831
|
const source = given ?? typed.source;
|
|
33781
33832
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
@@ -33862,9 +33913,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
33862
33913
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
33863
33914
|
held.foundBy.push(by);
|
|
33864
33915
|
ranked.set(ref, held);
|
|
33916
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
33865
33917
|
if (by === "meaning" && lookup2 !== void 0 && held.foundBy.includes("words"))
|
|
33866
|
-
|
|
33867
|
-
|
|
33918
|
+
held.score = Math.max(held.score, vote);
|
|
33919
|
+
else
|
|
33920
|
+
held.score += vote;
|
|
33868
33921
|
}), "add");
|
|
33869
33922
|
add(matched.items, "words");
|
|
33870
33923
|
if (meaning !== void 0)
|
|
@@ -33952,12 +34005,14 @@ var notesScopeOf = /* @__PURE__ */ __name((accounts) => {
|
|
|
33952
34005
|
return { folderIds, ...accounts.length > folderIds.length ? { withInternal: true } : {} };
|
|
33953
34006
|
}, "notesScopeOf");
|
|
33954
34007
|
var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accounts: list3, app, ...query }) => {
|
|
34008
|
+
text2 = plainQuery(text2);
|
|
33955
34009
|
const own = app?.command ?? query.command;
|
|
33956
34010
|
const what = `${own === void 0 ? "" : `${own} `}search notes`;
|
|
33957
34011
|
const held = [
|
|
33958
34012
|
{ provider: "notes", account: INTERNAL_NOTES },
|
|
33959
34013
|
...(await store.notes.folders()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
33960
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 }))
|
|
34014
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
34015
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [{ provider: "notes", account: added.id }] : [])
|
|
33961
34016
|
];
|
|
33962
34017
|
const named2 = list3 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list3, await listContextOf(store, account, app)), ["notes", "documents"], what);
|
|
33963
34018
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
@@ -33977,14 +34032,14 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
33977
34032
|
};
|
|
33978
34033
|
}, "searchNotesOf");
|
|
33979
34034
|
|
|
33980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33981
34036
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33982
34037
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
33983
34038
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
33984
34039
|
const held = await store.accounts.storedAccounts();
|
|
33985
34040
|
return held.filter((one) => accounts.some(({ provider, account }) => one.provider === provider && one.account === account)).map(({ id: id2 }) => String(id2));
|
|
33986
34041
|
}, "accountIdsOf");
|
|
33987
|
-
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) =>
|
|
34042
|
+
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) => holdsKind(provider, "events")).map(({ provider, account }) => ({ provider, account })), "calendarAccounts");
|
|
33988
34043
|
var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
33989
34044
|
ref: hit.ref,
|
|
33990
34045
|
provider: hit.account?.provider ?? null,
|
|
@@ -34014,6 +34069,7 @@ var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null
|
|
|
34014
34069
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
34015
34070
|
if (!query.trim())
|
|
34016
34071
|
throw new CliError("validation_error", "say what to find in the events");
|
|
34072
|
+
query = plainQuery(query);
|
|
34017
34073
|
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
34018
34074
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
34019
34075
|
...exact ? { exact: true } : {},
|
|
@@ -34094,8 +34150,14 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34094
34150
|
};
|
|
34095
34151
|
}, "searchEvents");
|
|
34096
34152
|
|
|
34097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34098
34154
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
34155
|
+
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
34156
|
+
const { reason, span } = error.details ?? {};
|
|
34157
|
+
const why = typeof reason === "string" ? reason : void 0;
|
|
34158
|
+
const token = span && Number.isInteger(span.start) && Number.isInteger(span.end) ? text2.slice(span.start, span.end).trim() : "";
|
|
34159
|
+
return { ...why ? { why } : {}, ...token ? { token } : {} };
|
|
34160
|
+
}, "refusal");
|
|
34099
34161
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
34100
34162
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
34101
34163
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -34106,15 +34168,19 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
34106
34168
|
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
34107
34169
|
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
34108
34170
|
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34109
|
-
const words3 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ?
|
|
34171
|
+
const words3 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
34172
|
+
// A title holds "invoice", not the question mark of "invoice?".
|
|
34173
|
+
node.value.replace(/\?+$/u, "") || node.value
|
|
34174
|
+
) : (() => {
|
|
34110
34175
|
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
34111
34176
|
})());
|
|
34112
34177
|
return { words: words3, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
34113
34178
|
}, "titleWords");
|
|
34114
|
-
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) =>
|
|
34115
|
-
var searchAll = /* @__PURE__ */ __name(async (store, account,
|
|
34116
|
-
if (!
|
|
34179
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm")), "crmAccounts");
|
|
34180
|
+
var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger = {}, searchMessages = (query) => searchStore(store, account, query, messenger), meaning) => {
|
|
34181
|
+
if (!asked.text.trim())
|
|
34117
34182
|
throw new CliError("validation_error", "say what to find");
|
|
34183
|
+
const request = { ...asked, text: plainQuery(asked.text) };
|
|
34118
34184
|
const offset = request.offset ?? 0;
|
|
34119
34185
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
34120
34186
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -34158,7 +34224,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34158
34224
|
if (kind === "messages" && found.coverage)
|
|
34159
34225
|
coverage2 = found.coverage;
|
|
34160
34226
|
hasMore ||= found.hasMore;
|
|
34161
|
-
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) =>
|
|
34227
|
+
const read = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, kind));
|
|
34162
34228
|
for (const one of found.skipped ?? [])
|
|
34163
34229
|
if (!skipped.some(({ source }) => source === one.source))
|
|
34164
34230
|
skipped.push(one);
|
|
@@ -34205,12 +34271,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34205
34271
|
const held = fused2.get(hit.locator);
|
|
34206
34272
|
if (held)
|
|
34207
34273
|
held.item.foundBy = ["words", "meaning"];
|
|
34274
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
34208
34275
|
if (held && discovers)
|
|
34209
|
-
|
|
34210
|
-
|
|
34211
|
-
item: held?.item ?? itemOf3(hit, ["meaning"]),
|
|
34212
|
-
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
34213
|
-
});
|
|
34276
|
+
held.score = Math.max(held.score, vote);
|
|
34277
|
+
else
|
|
34278
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf3(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
34214
34279
|
});
|
|
34215
34280
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
34216
34281
|
}, "messagesOf");
|
|
@@ -34252,7 +34317,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34252
34317
|
const read = chosen?.map(({ account: account2 }) => account2) ?? [
|
|
34253
34318
|
INTERNAL_NOTES,
|
|
34254
34319
|
...(await store.notes.folders()).map(({ id: id2 }) => id2),
|
|
34255
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2)
|
|
34320
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2),
|
|
34321
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [added.id] : [])
|
|
34256
34322
|
];
|
|
34257
34323
|
accounts.push(...read.map((account2) => ({ resource, provider: "notes", account: account2 })));
|
|
34258
34324
|
} else if (resource === "events") {
|
|
@@ -34296,6 +34362,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34296
34362
|
const found = await store.deals.find({
|
|
34297
34363
|
words: words3,
|
|
34298
34364
|
anyWord: anyWord || discover,
|
|
34365
|
+
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
34299
34366
|
limit: Math.min(window3 + 1, 500),
|
|
34300
34367
|
...chosen === void 0 ? {} : { accounts: chosen }
|
|
34301
34368
|
});
|
|
@@ -34319,7 +34386,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34319
34386
|
} catch (error) {
|
|
34320
34387
|
if (!skippable(error))
|
|
34321
34388
|
throw error;
|
|
34322
|
-
skipped.push({ resource, code: error.code, reason: error.message });
|
|
34389
|
+
skipped.push({ resource, code: error.code, reason: error.message, ...refusal(error, request.text) });
|
|
34323
34390
|
}
|
|
34324
34391
|
}
|
|
34325
34392
|
} finally {
|
|
@@ -34328,7 +34395,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34328
34395
|
const ordered = oneList(lists, cosines);
|
|
34329
34396
|
const more = hasMore || ordered.length > window3;
|
|
34330
34397
|
return {
|
|
34331
|
-
query:
|
|
34398
|
+
query: asked.text,
|
|
34332
34399
|
items: ordered.slice(offset, window3),
|
|
34333
34400
|
hasMore: more,
|
|
34334
34401
|
...more && window3 <= MAX_SEARCH_OFFSET ? { nextOffset: window3 } : {},
|
|
@@ -34355,7 +34422,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
34355
34422
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
34356
34423
|
}, "oneList");
|
|
34357
34424
|
|
|
34358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
34359
34426
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
34360
34427
|
var whole3 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
34361
34428
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -34580,7 +34647,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34580
34647
|
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
34581
34648
|
const { skipped } = fitting(entries, only, "search all", (kind) => `--only leaves ${kind} out`);
|
|
34582
34649
|
const named2 = /* @__PURE__ */ __name((resource) => [
|
|
34583
|
-
...new Map(entries.flatMap(({ accounts }) => accounts).filter((
|
|
34650
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one) => listedHolds(one, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
34584
34651
|
], "named");
|
|
34585
34652
|
const meetings = await holdingMeetings(store, named2("meetings"));
|
|
34586
34653
|
const empty2 = named2("meetings").filter((one) => !meetings.some(({ provider, account: account2 }) => provider === one.provider && account2 === one.account)).map(({ provider, account: account2 }) => ({
|
|
@@ -34609,7 +34676,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34609
34676
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
34610
34677
|
}, "searchAllOfSource");
|
|
34611
34678
|
|
|
34612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34613
34680
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34614
34681
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34615
34682
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34662,7 +34729,7 @@ var asQuery = /* @__PURE__ */ __name(({ words: words3, from, ...rest }) => ({
|
|
|
34662
34729
|
...rest,
|
|
34663
34730
|
...from !== void 0 && rest.chat !== void 0 ? { from } : {}
|
|
34664
34731
|
}), "asQuery");
|
|
34665
|
-
var
|
|
34732
|
+
var refusal2 = {
|
|
34666
34733
|
unsupported: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
34667
34734
|
pushed_history: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
34668
34735
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -34686,7 +34753,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34686
34753
|
if (quiet2)
|
|
34687
34754
|
return void 0;
|
|
34688
34755
|
if (backend === "server")
|
|
34689
|
-
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error",
|
|
34756
|
+
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error", refusal2[reason], {
|
|
34690
34757
|
reason
|
|
34691
34758
|
});
|
|
34692
34759
|
return { report: { ...report, skipped: reason, complete: false }, sources };
|
|
@@ -34798,7 +34865,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34798
34865
|
return { report, sources };
|
|
34799
34866
|
}, "searchServer");
|
|
34800
34867
|
|
|
34801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34802
34869
|
var DELETE_AT_ONCE = 10;
|
|
34803
34870
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
34804
34871
|
const files = fileLinks(attachments);
|
|
@@ -35239,7 +35306,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35239
35306
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35240
35307
|
}, "checkMediaOptions");
|
|
35241
35308
|
|
|
35242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35243
35310
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35244
35311
|
var RULES = {
|
|
35245
35312
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -35254,7 +35321,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
35254
35321
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
35255
35322
|
}), "classifyChannel");
|
|
35256
35323
|
|
|
35257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35258
35325
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35259
35326
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35260
35327
|
const store = await deps.store();
|
|
@@ -35340,7 +35407,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35340
35407
|
};
|
|
35341
35408
|
}, "metadataService");
|
|
35342
35409
|
|
|
35343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35344
35411
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35345
35412
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
35346
35413
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -35377,7 +35444,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
35377
35444
|
return { chatId, rows, notes };
|
|
35378
35445
|
}, "moderateWith");
|
|
35379
35446
|
|
|
35380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
35381
35448
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
35382
35449
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
35383
35450
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -35455,7 +35522,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
35455
35522
|
}, "removePerson")
|
|
35456
35523
|
}), "moderatorOf");
|
|
35457
35524
|
|
|
35458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
35459
35526
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
35460
35527
|
id: note.id,
|
|
35461
35528
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -35499,7 +35566,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
35499
35566
|
};
|
|
35500
35567
|
}, "privatePeopleService");
|
|
35501
35568
|
|
|
35502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
35503
35570
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
35504
35571
|
total: 0,
|
|
35505
35572
|
population: 0,
|
|
@@ -35755,7 +35822,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
35755
35822
|
}, "evidence")
|
|
35756
35823
|
}), "rankingsService");
|
|
35757
35824
|
|
|
35758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
35759
35826
|
var FIELDS = ["date", "chat", "kind"];
|
|
35760
35827
|
var WAITING_TAIL = 100;
|
|
35761
35828
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -35882,7 +35949,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35882
35949
|
};
|
|
35883
35950
|
}, "replyStatsService");
|
|
35884
35951
|
|
|
35885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
35886
35953
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
35887
35954
|
id: one.id,
|
|
35888
35955
|
name: one.name,
|
|
@@ -35903,7 +35970,7 @@ var MESSAGE_SEARCH_COMMANDS = [
|
|
|
35903
35970
|
"admin-statistics"
|
|
35904
35971
|
];
|
|
35905
35972
|
var NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
35906
|
-
var
|
|
35973
|
+
var nameOf2 = /* @__PURE__ */ __name((value) => {
|
|
35907
35974
|
const name = value.trim().toLowerCase();
|
|
35908
35975
|
if (!NAME.test(name) || /^\d+$/.test(name))
|
|
35909
35976
|
throw new CliError("validation_error", `"${singleLine(value)}" cannot name a saved search \u2014 use up to 64 letters a\u2013z, digits and hyphens, not only digits`, { reason: "name.invalid" });
|
|
@@ -35958,13 +36025,13 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35958
36025
|
if (isAdminSelection(params.selection)) {
|
|
35959
36026
|
const selected = await readAdminSelection(store, params.selection);
|
|
35960
36027
|
const normalized2 = typeof params.selection === "string" ? JSON.parse(params.selection) : params.selection;
|
|
35961
|
-
return store.searches.saveSearch(
|
|
36028
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf("admin-statistics", {
|
|
35962
36029
|
adminReport: selected.options.report,
|
|
35963
36030
|
selection: normalized2,
|
|
35964
36031
|
timezone: selected.base.timezone
|
|
35965
36032
|
}), { replace });
|
|
35966
36033
|
}
|
|
35967
|
-
return store.searches.saveSearch(
|
|
36034
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf(params.target ? params.target === "messages" ? "message-top" : "author-top" : params.by === void 0 ? "search" : "stats", checked(params)), {
|
|
35968
36035
|
replace
|
|
35969
36036
|
});
|
|
35970
36037
|
}), "create"),
|
|
@@ -36011,7 +36078,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
36011
36078
|
};
|
|
36012
36079
|
}, "searchesService");
|
|
36013
36080
|
|
|
36014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
36015
36082
|
var TAGGING_QUERY = {
|
|
36016
36083
|
entity: "tagging",
|
|
36017
36084
|
backend: "sql",
|
|
@@ -36095,7 +36162,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36095
36162
|
};
|
|
36096
36163
|
}, "tagsService");
|
|
36097
36164
|
|
|
36098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
36099
36166
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
36100
36167
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
36101
36168
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -36294,7 +36361,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36294
36361
|
};
|
|
36295
36362
|
}, "topicsService");
|
|
36296
36363
|
|
|
36297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
36298
36365
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
36299
36366
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36300
36367
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -36368,7 +36435,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
36368
36435
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
36369
36436
|
}, "prepareEvidencePacket");
|
|
36370
36437
|
|
|
36371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
36372
36439
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
36373
36440
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
36374
36441
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -36388,7 +36455,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
36388
36455
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
36389
36456
|
}, "readEvidencePacket");
|
|
36390
36457
|
|
|
36391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36392
36459
|
var scopeKeys = [
|
|
36393
36460
|
"accountId",
|
|
36394
36461
|
"meetingId",
|
|
@@ -36410,7 +36477,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
36410
36477
|
"maxVocabularyReadBytes"
|
|
36411
36478
|
]);
|
|
36412
36479
|
|
|
36413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
36414
36481
|
var communicationFields = {
|
|
36415
36482
|
sources: pipe(array(strictObject({
|
|
36416
36483
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -36442,7 +36509,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
36442
36509
|
return { ...input, after, before: before2 };
|
|
36443
36510
|
}, "communicationRequest");
|
|
36444
36511
|
|
|
36445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
36446
36513
|
var MEETING_PREPARATION_LIMITS = {
|
|
36447
36514
|
meetings: { min: 1, max: 20, default: 5 },
|
|
36448
36515
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -36515,7 +36582,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
36515
36582
|
};
|
|
36516
36583
|
}, "validateMeetingPreparationRequest");
|
|
36517
36584
|
|
|
36518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
36519
36586
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
36520
36587
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
36521
36588
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -36563,7 +36630,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
36563
36630
|
}
|
|
36564
36631
|
}, "validatePreparationCommunications");
|
|
36565
36632
|
|
|
36566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
36567
36634
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
36568
36635
|
const installer = ports.installer();
|
|
36569
36636
|
const argv = updateCommand(installer, packageName);
|
|
@@ -36628,7 +36695,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
36628
36695
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
36629
36696
|
}, "dayAfter");
|
|
36630
36697
|
|
|
36631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
36632
36699
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
36633
36700
|
const pictures = picturesService(deps);
|
|
36634
36701
|
const base = {
|
|
@@ -36665,7 +36732,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
36665
36732
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
36666
36733
|
}, "servicesFor");
|
|
36667
36734
|
|
|
36668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
36669
36736
|
import { createHash as createHash12 } from "node:crypto";
|
|
36670
36737
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
36671
36738
|
import { createConnection, createServer } from "node:net";
|
|
@@ -36886,7 +36953,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
36886
36953
|
}, () => finish({ error: stopped() }));
|
|
36887
36954
|
}), "relayCommand");
|
|
36888
36955
|
|
|
36889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
36890
36957
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
36891
36958
|
close: /* @__PURE__ */ __name(async () => {
|
|
36892
36959
|
}, "close"),
|