@wirecat/notion-cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-AILW4JPO.js +42 -0
- package/dist/bundle/{all-profiles-AELHUTFU.js → all-profiles-CKOACXTW.js} +11 -11
- package/dist/bundle/{anthropic-3CCYAGO3.js → anthropic-DWBBVTU3.js} +5 -5
- package/dist/bundle/{app-server-DJ6P4NY4.js → app-server-BHFYNCDE.js} +72 -72
- package/dist/bundle/{bun-2FLR4IV4.js → bun-ICK2XT7J.js} +2 -2
- package/dist/bundle/{bun-sqlite-QB6CU6TH.js → bun-sqlite-LU5V5Y4A.js} +6 -6
- package/dist/bundle/{chunk-4RFR4J2O.js → chunk-2OZVCNU5.js} +2 -2
- package/dist/bundle/{chunk-6EJCI47L.js → chunk-2RNJ2JP3.js} +4 -4
- package/dist/bundle/{chunk-F5ZAN7OC.js → chunk-364ET7LV.js} +1 -1
- package/dist/bundle/{chunk-WAGADES3.js → chunk-3AKMIKND.js} +17 -17
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-3DGHBXH2.js} +1 -1
- package/dist/bundle/{chunk-VH7526NL.js → chunk-3KOJNZH3.js} +3 -3
- package/dist/bundle/{chunk-T37TAXVL.js → chunk-3T3OAYL4.js} +2 -2
- package/dist/bundle/{chunk-XYQVVW4R.js → chunk-3YXYA6HB.js} +1 -1
- package/dist/bundle/{chunk-3MYN2RMG.js → chunk-3ZSUVFR7.js} +8 -8
- package/dist/bundle/{chunk-STTO2MSY.js → chunk-46JBCXLI.js} +6 -6
- package/dist/bundle/{chunk-HM6AMYHR.js → chunk-4FHKSSXQ.js} +2 -2
- package/dist/bundle/{chunk-RD7BKTWV.js → chunk-5NFIUY2P.js} +4 -4
- package/dist/bundle/{chunk-3UX4VJWD.js → chunk-63SW4UXG.js} +3 -4
- package/dist/bundle/{chunk-2XUV7HNE.js → chunk-64IK7JFO.js} +2 -2
- package/dist/bundle/{chunk-2Z7UOXFC.js → chunk-6MQSBWWF.js} +1 -1
- package/dist/bundle/{chunk-SAPP2LEH.js → chunk-6UZ5D2WP.js} +7 -7
- package/dist/bundle/{chunk-CL3YNUCC.js → chunk-7COTHS6G.js} +6 -6
- package/dist/bundle/{chunk-3LMW7U7F.js → chunk-A3RJ6FD5.js} +21 -8
- package/dist/bundle/{chunk-ZDYEOE7L.js → chunk-ADCAWRRX.js} +48 -48
- package/dist/bundle/{chunk-IJVTN5L3.js → chunk-ALAPDLCP.js} +2 -2
- package/dist/bundle/{chunk-DGMTSDKB.js → chunk-B6DJQBZI.js} +5 -5
- package/dist/bundle/{chunk-BAXNAOOL.js → chunk-BFCRGLOF.js} +3 -3
- package/dist/bundle/{chunk-YYQ5GKAI.js → chunk-BFHPT67P.js} +655 -565
- package/dist/bundle/{chunk-6YOMPW7Y.js → chunk-BQ6CXCLP.js} +8 -8
- package/dist/bundle/{chunk-BEV5LO4D.js → chunk-BXXHUO7Y.js} +13 -13
- package/dist/bundle/{chunk-W2VQDIU5.js → chunk-DCSPCOPB.js} +9 -9
- package/dist/bundle/{chunk-KB35BVTG.js → chunk-EMIJVLOA.js} +2 -2
- package/dist/bundle/{chunk-FMMYBVCH.js → chunk-EUF5JNPG.js} +1 -1
- package/dist/bundle/{chunk-Q7EIL6VU.js → chunk-EWXMIKZN.js} +28 -28
- package/dist/bundle/{chunk-LC6WE6JS.js → chunk-FHYV4VWY.js} +14 -7
- package/dist/bundle/{chunk-GPRJXJC7.js → chunk-FNESLLZS.js} +15 -1
- package/dist/bundle/{chunk-JFSVAOA7.js → chunk-FO3XY2Y2.js} +2 -2
- package/dist/bundle/{chunk-7L2XOKDZ.js → chunk-HJDQTM3T.js} +8 -8
- package/dist/bundle/{chunk-FV4WTZCU.js → chunk-HOO53OYK.js} +16 -16
- package/dist/bundle/{chunk-T6XIBULH.js → chunk-HSVKU4OJ.js} +45 -31
- package/dist/bundle/{chunk-OEQNP56V.js → chunk-IEY7KS6Q.js} +1 -1
- package/dist/bundle/{chunk-QGGRFRMP.js → chunk-ITW26OBI.js} +38 -38
- package/dist/bundle/{chunk-IURYZSG3.js → chunk-ITWINZ6R.js} +12 -12
- package/dist/bundle/{chunk-WAU5LSHP.js → chunk-IYZWHCZJ.js} +90 -11
- package/dist/bundle/{chunk-YUDVRFXN.js → chunk-J3DZVB67.js} +1 -1
- package/dist/bundle/{chunk-GCAJW4SR.js → chunk-JEZJFQQW.js} +1 -1
- package/dist/bundle/{chunk-AE4VW4NB.js → chunk-JPGN473W.js} +3 -3
- package/dist/bundle/{chunk-NSR43UEW.js → chunk-JVRBW5LH.js} +5 -5
- package/dist/bundle/{chunk-DIU2QJJF.js → chunk-KBY42GKW.js} +23 -23
- package/dist/bundle/{chunk-WGZH2M64.js → chunk-KWBLDSRV.js} +16 -3
- package/dist/bundle/{chunk-P27NDZQR.js → chunk-LBRTLZHI.js} +171 -157
- package/dist/bundle/{chunk-WB2KSQIP.js → chunk-LEPPRULN.js} +20 -6
- package/dist/bundle/{chunk-ERN53B3Z.js → chunk-LVAFTQ45.js} +18 -18
- package/dist/bundle/{chunk-PHKED7AG.js → chunk-MB4HXDBT.js} +5 -5
- package/dist/bundle/{chunk-BQBC2WIG.js → chunk-N3NJPHZB.js} +1 -1
- package/dist/bundle/{chunk-DHVVXQEL.js → chunk-NCCRLAAI.js} +3 -3
- package/dist/bundle/{chunk-HOVHE3A3.js → chunk-NV7NNL5T.js} +7 -7
- package/dist/bundle/{chunk-TFT4FVRU.js → chunk-OALFRUMI.js} +2 -2
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-OCGNOJYD.js} +1 -1
- package/dist/bundle/{chunk-2CMLY2X3.js → chunk-OFMCU3BH.js} +5 -5
- package/dist/bundle/{chunk-FRB2L7OE.js → chunk-OP2BH55P.js} +3 -3
- package/dist/bundle/{chunk-7JVKQ6NM.js → chunk-OS4WPXPZ.js} +4 -4
- package/dist/bundle/{chunk-ESZHGC4Q.js → chunk-OW5HW3TD.js} +6 -6
- package/dist/bundle/{chunk-5OJLUUOJ.js → chunk-PDVXG3T3.js} +6 -6
- package/dist/bundle/{chunk-4VXXOJ2F.js → chunk-PSMRUOII.js} +3 -3
- package/dist/bundle/{chunk-EHW45LLT.js → chunk-QK52ARAU.js} +3 -3
- package/dist/bundle/{chunk-AZLDR36U.js → chunk-QMNEDK7Z.js} +3 -3
- package/dist/bundle/{chunk-RXU5T5NM.js → chunk-R4JV3VLU.js} +12 -12
- package/dist/bundle/{chunk-5XPHFV7H.js → chunk-REOBWSGV.js} +8 -8
- package/dist/bundle/{chunk-LECMHK2F.js → chunk-RNVYNPXT.js} +1 -1
- package/dist/bundle/{chunk-JVESLS7B.js → chunk-RXGX2CZX.js} +63 -63
- package/dist/bundle/{chunk-KNCPBX5P.js → chunk-S35UJBFZ.js} +19 -19
- package/dist/bundle/{chunk-LQVDFD65.js → chunk-S5P7THM5.js} +2 -2
- package/dist/bundle/{chunk-A42T4YX7.js → chunk-SRVTGI3M.js} +2 -2
- package/dist/bundle/{chunk-CHPWBQUK.js → chunk-TWY543BS.js} +1 -1
- package/dist/bundle/{chunk-EZMG5QXB.js → chunk-UO4O6WQ4.js} +8 -8
- package/dist/bundle/{chunk-KGAUINBO.js → chunk-UQVUXG7H.js} +10 -10
- package/dist/bundle/{chunk-GUIQJUJV.js → chunk-UYEDQGMI.js} +6 -6
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-VRBEYOJL.js} +1 -1
- package/dist/bundle/{chunk-YDDI4QIT.js → chunk-VXKD533R.js} +575 -447
- package/dist/bundle/{chunk-KZJQPJK5.js → chunk-VYZ2J7DT.js} +4 -4
- package/dist/bundle/{chunk-G4ZU73SD.js → chunk-WJFQMOVM.js} +75 -60
- package/dist/bundle/{chunk-YXYZAWWW.js → chunk-WUNEJRLJ.js} +6 -6
- package/dist/bundle/{chunk-HHEWTLAT.js → chunk-X5LUHN62.js} +2 -2
- package/dist/bundle/{chunk-UOC52GCB.js → chunk-X737FHZP.js} +4 -4
- package/dist/bundle/{chunk-K5IC4FZN.js → chunk-YSF5JBRA.js} +1 -1
- package/dist/bundle/{chunk-SEAGUFBX.js → chunk-ZGUUP2T3.js} +12 -12
- package/dist/bundle/{chunk-QEJFBORC.js → chunk-ZMKAI3F3.js} +3 -3
- package/dist/bundle/command-contract-C2CF4QAH.js +41 -0
- package/dist/bundle/{command-server-entry-VUR6WL77.js → command-server-entry-F3B2KSPO.js} +29 -29
- package/dist/bundle/{decode-I64PF2RM.js → decode-FDHFF7GC.js} +5 -5
- package/dist/bundle/{dispatch-JQBAZWCL.js → dispatch-IXKG5Z5Y.js} +8 -8
- package/dist/bundle/{echarts-YRRVLEX3.js → echarts-PGJPVPA4.js} +2 -2
- package/dist/bundle/{embed-BLXLKMK2.js → embed-U6X7CNNK.js} +6 -6
- package/dist/bundle/{embedder-JYGF6R7I.js → embedder-3ROL6ROQ.js} +9 -9
- package/dist/bundle/{failure-I6AAF5R5.js → failure-IYMRXM2X.js} +2 -2
- package/dist/bundle/{first-run-YLDOZGY6.js → first-run-PNVNHGR7.js} +12 -12
- package/dist/bundle/first-screen-DEDD64YH.js +41 -0
- package/dist/bundle/{instructions-AG7SRWTR.js → instructions-MJQWRI2D.js} +1 -1
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-JNHOSK4L.js} +2 -2
- package/dist/bundle/meeting-combined-HEC25QPY.js +25 -0
- package/dist/bundle/meeting-model-R7QPDNZZ.js +27 -0
- package/dist/bundle/{meeting-semantic-3DZPHM7L.js → meeting-semantic-7WPLMBNT.js} +6 -6
- package/dist/bundle/{node-GJQYN4FT.js → node-3UXNV3CD.js} +2 -2
- package/dist/bundle/{node-sqlite-7VXIRQPH.js → node-sqlite-ULWDWM3I.js} +7 -7
- package/dist/bundle/notes-search-7PE3E3C7.js +64 -0
- package/dist/bundle/notion.js +13 -13
- package/dist/bundle/{oauth-N67CH2TK.js → oauth-LNUZMA72.js} +7 -7
- package/dist/bundle/{open-JGXVHIKO.js → open-HGHC35M4.js} +5 -5
- package/dist/bundle/{openai-PFQJTF4H.js → openai-ISSP57MV.js} +18 -18
- package/dist/bundle/{process-MEKCZMX3.js → process-PB2WCOR2.js} +1 -1
- package/dist/bundle/{program-DUJYLJH5.js → program-GASBJRMG.js} +1987 -1245
- package/dist/bundle/{prompt-FW44QDHD.js → prompt-3VGQVX2B.js} +5 -5
- package/dist/bundle/{recognize-62TDQ6A7.js → recognize-7Q2P3NME.js} +4 -4
- package/dist/bundle/{remote-7ONFD7GG.js → remote-BBAWKVIT.js} +11 -11
- package/dist/bundle/{rerank-YOHQQJS4.js → rerank-H4PUS4HV.js} +7 -7
- package/dist/bundle/{schemas-IIGJ7DOP.js → schemas-TTVUADHT.js} +1 -1
- package/dist/bundle/{serve-ZCXGT5RB.js → serve-FZNSKY7R.js} +9 -9
- package/dist/bundle/{server-RQ74M637.js → server-BRRNDW6L.js} +64 -64
- package/dist/bundle/server-CQJ4LKAZ.js +90 -0
- package/dist/bundle/{services-FWBRZ57M.js → services-PEU557KZ.js} +51 -51
- package/dist/bundle/{sqlite-runtime-ZZBNGV5L.js → sqlite-runtime-4IZJ4YUM.js} +6 -6
- package/dist/bundle/{state-GDDFO62Y.js → state-MX3JVT5Q.js} +6 -6
- package/dist/bundle/{store-D2LRIWEI.js → store-JUT34REM.js} +23 -23
- package/dist/bundle/{store-KQCLR57N.js → store-PP4BPADZ.js} +21 -21
- package/dist/bundle/store-maintenance-command-GRFTJBSB.js +77 -0
- package/dist/bundle/surface-FPWES3NY.js +76 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +3 -25
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +8 -6
- package/dist/commands/library.js.map +1 -1
- package/dist/context.d.ts +11 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +20 -7
- package/dist/context.js.map +1 -1
- package/dist/generated/wirecat-config.d.ts +13 -0
- package/dist/generated/wirecat-config.d.ts.map +1 -0
- package/dist/generated/wirecat-config.js +82 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/library.d.ts +0 -5
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +0 -13
- package/dist/library.js.map +1 -1
- package/dist/notion/client.d.ts +2 -6
- package/dist/notion/client.d.ts.map +1 -1
- package/dist/notion/client.js +7 -8
- package/dist/notion/client.js.map +1 -1
- package/dist/notion/errors.d.ts +5 -0
- package/dist/notion/errors.d.ts.map +1 -1
- package/dist/notion/errors.js +21 -1
- package/dist/notion/errors.js.map +1 -1
- package/dist/notion/port.d.ts +10 -0
- package/dist/notion/port.d.ts.map +1 -1
- package/dist/notion/port.js +19 -0
- package/dist/notion/port.js.map +1 -1
- package/dist/sync/files.d.ts +3 -3
- package/dist/sync/files.d.ts.map +1 -1
- package/dist/sync/from-config.d.ts +13 -0
- package/dist/sync/from-config.d.ts.map +1 -0
- package/dist/sync/from-config.js +32 -0
- package/dist/sync/from-config.js.map +1 -0
- package/dist/sync/source.d.ts +2 -1
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +4 -20
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +1 -11
- package/dist/sync/users.d.ts.map +1 -1
- package/dist/sync/users.js +0 -33
- package/dist/sync/users.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
- package/dist/bundle/agent-ILG6AH7S.js +0 -42
- package/dist/bundle/command-contract-L2FASWD6.js +0 -41
- package/dist/bundle/first-screen-GZH3LMLZ.js +0 -41
- package/dist/bundle/meeting-combined-OFQSGKBG.js +0 -25
- package/dist/bundle/meeting-model-K6NSX3O5.js +0 -27
- package/dist/bundle/notes-search-ACDOPTNH.js +0 -64
- package/dist/bundle/server-XMZF57WM.js +0 -90
- package/dist/bundle/store-maintenance-command-CK2MU5M6.js +0 -77
- package/dist/bundle/surface-K4TPIQW7.js +0 -76
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
sameOrdinaryFile,
|
|
8
8
|
syncDirectory,
|
|
9
9
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ITWINZ6R.js";
|
|
11
11
|
import {
|
|
12
12
|
WIRECAT_TOOLS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FNESLLZS.js";
|
|
14
14
|
import {
|
|
15
15
|
isNewer,
|
|
16
16
|
updateCommand
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PSMRUOII.js";
|
|
18
18
|
import {
|
|
19
19
|
LIST_QUERY_GUIDE,
|
|
20
20
|
dateWindow,
|
|
21
21
|
momentOf
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-R4JV3VLU.js";
|
|
23
23
|
import {
|
|
24
24
|
CEILING_KEY,
|
|
25
25
|
LEVELS,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
stops,
|
|
39
39
|
tagging,
|
|
40
40
|
task
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LBRTLZHI.js";
|
|
42
42
|
import {
|
|
43
43
|
ALL,
|
|
44
44
|
MAIL,
|
|
@@ -94,10 +94,10 @@ import {
|
|
|
94
94
|
withPictures,
|
|
95
95
|
withRecovery,
|
|
96
96
|
withTimeLimit
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-ADCAWRRX.js";
|
|
98
98
|
import {
|
|
99
99
|
capability
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-EMIJVLOA.js";
|
|
101
101
|
import {
|
|
102
102
|
MESSENGER_CHANGE_REFUSAL,
|
|
103
103
|
ancestorValue,
|
|
@@ -111,14 +111,14 @@ import {
|
|
|
111
111
|
readOnlyLockOf,
|
|
112
112
|
readOnlyRefusal,
|
|
113
113
|
sentIds
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-3ZSUVFR7.js";
|
|
115
115
|
import {
|
|
116
116
|
MAX_MODEL_IMAGE_BYTES
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-BFCRGLOF.js";
|
|
118
118
|
import {
|
|
119
119
|
resolveMeetingSelection,
|
|
120
120
|
searchMeetingHits
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-DCSPCOPB.js";
|
|
122
122
|
import {
|
|
123
123
|
anyOfTerms,
|
|
124
124
|
isFunctionWord,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
questionLookup,
|
|
129
129
|
questionText,
|
|
130
130
|
words
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-MB4HXDBT.js";
|
|
132
132
|
import {
|
|
133
133
|
CustomTextModelShape,
|
|
134
134
|
DEFAULT_RERANK_MODEL,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
textModels,
|
|
141
141
|
vectorModelKey,
|
|
142
142
|
writeTextModelsSection
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-B6DJQBZI.js";
|
|
144
144
|
import {
|
|
145
145
|
AGENDA_COLUMNS,
|
|
146
146
|
BUSINESS_FIND_MAX,
|
|
@@ -217,12 +217,12 @@ import {
|
|
|
217
217
|
threadConversation,
|
|
218
218
|
waitingPointer,
|
|
219
219
|
withoutField
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-VXKD533R.js";
|
|
221
221
|
import {
|
|
222
222
|
MINUTE,
|
|
223
223
|
YEAR,
|
|
224
224
|
aheadOf
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-3KOJNZH3.js";
|
|
226
226
|
import {
|
|
227
227
|
CATEGORIES,
|
|
228
228
|
CRM_KINDS,
|
|
@@ -239,7 +239,7 @@ import {
|
|
|
239
239
|
minorUnits,
|
|
240
240
|
normalCrmUserId,
|
|
241
241
|
scaleOf
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-KBY42GKW.js";
|
|
243
243
|
import {
|
|
244
244
|
chatReferenceOf,
|
|
245
245
|
ensureAccount,
|
|
@@ -248,12 +248,12 @@ import {
|
|
|
248
248
|
isId,
|
|
249
249
|
isStemmed,
|
|
250
250
|
pickPerson
|
|
251
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-UQVUXG7H.js";
|
|
252
252
|
import {
|
|
253
253
|
DEFAULT_STEMMERS,
|
|
254
254
|
createStemmer,
|
|
255
255
|
cutsDeep
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-REOBWSGV.js";
|
|
257
257
|
import {
|
|
258
258
|
INTERNAL_NOTES,
|
|
259
259
|
LOG_ATTRIBUTES,
|
|
@@ -281,10 +281,10 @@ import {
|
|
|
281
281
|
sourceOf2,
|
|
282
282
|
typedCommand,
|
|
283
283
|
withAttempt
|
|
284
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-BXXHUO7Y.js";
|
|
285
285
|
import {
|
|
286
286
|
isCliFailure
|
|
287
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-S5P7THM5.js";
|
|
288
288
|
import {
|
|
289
289
|
FIELD_VERSION,
|
|
290
290
|
MESSAGE_PARSING,
|
|
@@ -301,14 +301,14 @@ import {
|
|
|
301
301
|
searchError,
|
|
302
302
|
validateAst,
|
|
303
303
|
validateFields
|
|
304
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-FHYV4VWY.js";
|
|
305
305
|
import {
|
|
306
306
|
fold,
|
|
307
307
|
normalize
|
|
308
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-6MQSBWWF.js";
|
|
309
309
|
import {
|
|
310
310
|
normalizeTag
|
|
311
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-3T3OAYL4.js";
|
|
312
312
|
import {
|
|
313
313
|
CALLBACK_WITHIN_MS,
|
|
314
314
|
MEETING_FINDINGS_KIND,
|
|
@@ -346,24 +346,24 @@ import {
|
|
|
346
346
|
validateQuery,
|
|
347
347
|
walkQuery,
|
|
348
348
|
windowOf
|
|
349
|
-
} from "./chunk-
|
|
349
|
+
} from "./chunk-RXGX2CZX.js";
|
|
350
350
|
import {
|
|
351
351
|
remoteKey
|
|
352
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-JVRBW5LH.js";
|
|
353
353
|
import {
|
|
354
354
|
localOnly
|
|
355
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-OFMCU3BH.js";
|
|
356
356
|
import {
|
|
357
357
|
modelAddressAllowed,
|
|
358
358
|
onThisComputer
|
|
359
|
-
} from "./chunk-
|
|
359
|
+
} from "./chunk-OP2BH55P.js";
|
|
360
360
|
import {
|
|
361
361
|
DEFAULT_TASK_CATEGORIES,
|
|
362
362
|
FALLBACK_CATEGORY,
|
|
363
363
|
readSharedSection,
|
|
364
364
|
sharedConfigPath,
|
|
365
365
|
writeSharedSection
|
|
366
|
-
} from "./chunk-
|
|
366
|
+
} from "./chunk-NV7NNL5T.js";
|
|
367
367
|
import {
|
|
368
368
|
Unzip,
|
|
369
369
|
UnzipInflate,
|
|
@@ -374,21 +374,21 @@ import {
|
|
|
374
374
|
placedText,
|
|
375
375
|
runEmbedders,
|
|
376
376
|
textModelsDirectory
|
|
377
|
-
} from "./chunk-
|
|
377
|
+
} from "./chunk-46JBCXLI.js";
|
|
378
378
|
import {
|
|
379
379
|
installFiles,
|
|
380
380
|
megabytes
|
|
381
|
-
} from "./chunk-
|
|
381
|
+
} from "./chunk-5NFIUY2P.js";
|
|
382
382
|
import {
|
|
383
383
|
storePath,
|
|
384
384
|
wirecatDirectory
|
|
385
|
-
} from "./chunk-
|
|
385
|
+
} from "./chunk-X5LUHN62.js";
|
|
386
386
|
import {
|
|
387
387
|
logRecordOf,
|
|
388
388
|
realSleep,
|
|
389
389
|
resolvePaths,
|
|
390
390
|
writeSecurely
|
|
391
|
-
} from "./chunk-
|
|
391
|
+
} from "./chunk-S35UJBFZ.js";
|
|
392
392
|
import {
|
|
393
393
|
array,
|
|
394
394
|
boolean,
|
|
@@ -427,7 +427,7 @@ import {
|
|
|
427
427
|
isCliError,
|
|
428
428
|
singleLine,
|
|
429
429
|
visibleControls
|
|
430
|
-
} from "./chunk-
|
|
430
|
+
} from "./chunk-4FHKSSXQ.js";
|
|
431
431
|
import {
|
|
432
432
|
__commonJS,
|
|
433
433
|
__name,
|
|
@@ -17043,7 +17043,7 @@ var require_lib3 = __commonJS({
|
|
|
17043
17043
|
}
|
|
17044
17044
|
});
|
|
17045
17045
|
|
|
17046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
17047
17047
|
var DAY_MS = 864e5;
|
|
17048
17048
|
var NEW_DAYS = 30;
|
|
17049
17049
|
var SAME_TEXT_MIN = 20;
|
|
@@ -17062,7 +17062,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17062
17062
|
const reasons = [];
|
|
17063
17063
|
const unknown3 = [];
|
|
17064
17064
|
const add = /* @__PURE__ */ __name((reason, source, detail) => reasons.push({ reason, weight: WEIGHTS[reason], source, ...detail ? { detail } : {} }), "add");
|
|
17065
|
-
const young = /* @__PURE__ */ __name((
|
|
17065
|
+
const young = /* @__PURE__ */ __name((at2) => now.getTime() - Date.parse(at2) < NEW_DAYS * DAY_MS, "young");
|
|
17066
17066
|
const { flags } = subject;
|
|
17067
17067
|
for (const flag of ["bot", "scam", "fake", "deleted"]) {
|
|
17068
17068
|
if (flags?.[flag] === void 0)
|
|
@@ -17120,7 +17120,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17120
17120
|
};
|
|
17121
17121
|
}, "scorePerson");
|
|
17122
17122
|
|
|
17123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
17124
17124
|
var REGISTRIES = {
|
|
17125
17125
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
17126
17126
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -17207,7 +17207,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
17207
17207
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
17208
17208
|
})), "notCovered");
|
|
17209
17209
|
|
|
17210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
17211
17211
|
var ACTIVITY_MESSAGES = 1e3;
|
|
17212
17212
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
17213
17213
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -17295,7 +17295,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
17295
17295
|
};
|
|
17296
17296
|
}, "botCheckService");
|
|
17297
17297
|
|
|
17298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
17299
17299
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
17300
17300
|
if (newest === null)
|
|
17301
17301
|
return null;
|
|
@@ -17304,7 +17304,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
17304
17304
|
return newest.addressed ? "owed" : null;
|
|
17305
17305
|
}, "mailTurn");
|
|
17306
17306
|
|
|
17307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
17308
17308
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
17309
17309
|
if (error instanceof CliError && error.code === "not_found")
|
|
17310
17310
|
return void 0;
|
|
@@ -17362,7 +17362,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
17362
17362
|
};
|
|
17363
17363
|
}, "mailActivity");
|
|
17364
17364
|
|
|
17365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
17366
17366
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
17367
17367
|
const ids = [...new Set(chatIds)];
|
|
17368
17368
|
if (ids.length === 0)
|
|
@@ -17388,7 +17388,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
17388
17388
|
}));
|
|
17389
17389
|
}, "chatCoverage");
|
|
17390
17390
|
|
|
17391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
17392
17392
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
17393
17393
|
if (value === void 0)
|
|
17394
17394
|
return void 0;
|
|
@@ -17398,15 +17398,15 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
17398
17398
|
return id3;
|
|
17399
17399
|
}, "threadIdOf");
|
|
17400
17400
|
|
|
17401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17402
17402
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17403
17403
|
|
|
17404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17405
17405
|
import { randomBytes } from "node:crypto";
|
|
17406
17406
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17407
17407
|
var newOperationId = newSendId;
|
|
17408
17408
|
|
|
17409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17410
17410
|
var LINKS = /https?:\/\/\S+/g;
|
|
17411
17411
|
var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before).map(({ question }) => question), "unanswered");
|
|
17412
17412
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -17436,7 +17436,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
17436
17436
|
});
|
|
17437
17437
|
}, "questions");
|
|
17438
17438
|
|
|
17439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
17440
17440
|
var TOP_POSTS = 5;
|
|
17441
17441
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
17442
17442
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -17499,9 +17499,9 @@ var membersOf = /* @__PURE__ */ __name(({ events, more }, messages, since) => {
|
|
|
17499
17499
|
const people = /* @__PURE__ */ __name((names2) => inPeriod.filter(({ event: event2 }) => names2.has(event2)).flatMap(({ timestamp: timestamp2, people: people2 }) => people2.map(({ id: id3 }) => ({ id: id3, at: Date.parse(timestamp2) }))), "people");
|
|
17500
17500
|
const joined = people(JOINS);
|
|
17501
17501
|
const left = people(LEAVES);
|
|
17502
|
-
const firstWords = joined.flatMap(({ id: id3, at:
|
|
17503
|
-
const first2 = messages.find((one2) => one2.senderId === id3 && Date.parse(one2.timestamp) >=
|
|
17504
|
-
return first2 ? [(Date.parse(first2.timestamp) -
|
|
17502
|
+
const firstWords = joined.flatMap(({ id: id3, at: at2 }) => {
|
|
17503
|
+
const first2 = messages.find((one2) => one2.senderId === id3 && Date.parse(one2.timestamp) >= at2);
|
|
17504
|
+
return first2 ? [(Date.parse(first2.timestamp) - at2) / 6e4] : [];
|
|
17505
17505
|
});
|
|
17506
17506
|
return {
|
|
17507
17507
|
joined: joined.length,
|
|
@@ -17553,7 +17553,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
17553
17553
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
17554
17554
|
}, "median");
|
|
17555
17555
|
|
|
17556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
17557
17557
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
17558
17558
|
const events = [];
|
|
17559
17559
|
for (const stay of stays) {
|
|
@@ -17582,10 +17582,10 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
17582
17582
|
before: { name: before.name, username: before.username, marks: before.marks }
|
|
17583
17583
|
});
|
|
17584
17584
|
}
|
|
17585
|
-
return events.filter(({ at:
|
|
17585
|
+
return events.filter(({ at: at2 }) => Date.parse(at2) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
17586
17586
|
}, "memberEvents");
|
|
17587
17587
|
|
|
17588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17589
17589
|
var AUDIT_PAGE = 200;
|
|
17590
17590
|
var AUDIT_BUDGET = 10;
|
|
17591
17591
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17665,7 +17665,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17665
17665
|
return found;
|
|
17666
17666
|
}, "burstJoins");
|
|
17667
17667
|
|
|
17668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
17669
17669
|
var EVENTS_DAYS = 7;
|
|
17670
17670
|
var TRACKED_DAYS = 30;
|
|
17671
17671
|
var STATS_PAGE = 1e3;
|
|
@@ -17960,7 +17960,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
17960
17960
|
return members.length === 0 ? null : members;
|
|
17961
17961
|
}, "storedMembers");
|
|
17962
17962
|
|
|
17963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
17964
17964
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17965
17965
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17966
17966
|
const name = typed.trim().toLowerCase();
|
|
@@ -17997,8 +17997,8 @@ var hitsByList = /* @__PURE__ */ __name((text3, categories) => {
|
|
|
17997
17997
|
const counted2 = [];
|
|
17998
17998
|
for (const triggers of triggerStems(categories)) {
|
|
17999
17999
|
const hit = /* @__PURE__ */ new Set();
|
|
18000
|
-
english.forEach((word,
|
|
18001
|
-
const other = spanish[
|
|
18000
|
+
english.forEach((word, at2) => {
|
|
18001
|
+
const other = spanish[at2];
|
|
18002
18002
|
if (triggers.english.has(word))
|
|
18003
18003
|
hit.add(word);
|
|
18004
18004
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
@@ -18017,7 +18017,7 @@ var categorize = /* @__PURE__ */ __name((text3, categories = DEFAULT_TASK_CATEGO
|
|
|
18017
18017
|
return best.name;
|
|
18018
18018
|
}, "categorize");
|
|
18019
18019
|
|
|
18020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
18021
18021
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
18022
18022
|
var RULES_IN = {
|
|
18023
18023
|
dialog: "all",
|
|
@@ -18223,7 +18223,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18223
18223
|
return passes;
|
|
18224
18224
|
}, "applyTaskRulesToChats");
|
|
18225
18225
|
|
|
18226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
18227
18227
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
18228
18228
|
const tags = /* @__PURE__ */ new Map();
|
|
18229
18229
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -18232,7 +18232,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
18232
18232
|
return tags;
|
|
18233
18233
|
}, "taskTagFilters");
|
|
18234
18234
|
|
|
18235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
18236
18236
|
var DAY = 864e5;
|
|
18237
18237
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
18238
18238
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -18264,7 +18264,7 @@ var AGENDA_QUERY = {
|
|
|
18264
18264
|
var agendaService = /* @__PURE__ */ __name((deps, now = Date.now) => ({
|
|
18265
18265
|
show: /* @__PURE__ */ __name(async ({ dueWithin = DAY, waiting = AGENDA_DEFAULTS.waiting, unanswered: unanswered2 = AGENDA_DEFAULTS.unanswered, within = 30 * DAY, query, holder } = {}) => {
|
|
18266
18266
|
const [store, account] = [await deps.store(), await deps.account()];
|
|
18267
|
-
const
|
|
18267
|
+
const at2 = now();
|
|
18268
18268
|
const parts = query ? split(query) : { tasks: void 0, chats: void 0 };
|
|
18269
18269
|
const find = /* @__PURE__ */ __name((where) => store.tasks.find({
|
|
18270
18270
|
project: inboxKey(taskAccount(account)),
|
|
@@ -18280,8 +18280,8 @@ var agendaService = /* @__PURE__ */ __name((deps, now = Date.now) => ({
|
|
|
18280
18280
|
}), "find");
|
|
18281
18281
|
const open7 = await find();
|
|
18282
18282
|
const tags = await taskTagFilters(store, parts.tasks);
|
|
18283
|
-
const listed2 = parts.tasks ? await find(queryFilter(parts.tasks, taskColumns(holder,
|
|
18284
|
-
const tasks = listed2.map((task2) => ({ task: task2, reasons: reasonsOf(task2,
|
|
18283
|
+
const listed2 = parts.tasks ? await find(queryFilter(parts.tasks, taskColumns(holder, at2, tags), { command: "tasks agenda", zone: timezoneOf() })) : open7;
|
|
18284
|
+
const tasks = listed2.map((task2) => ({ task: task2, reasons: reasonsOf(task2, at2, dueWithin) })).filter(({ reasons }) => reasons.length > 0).sort((a, b) => urgency(a.task) - urgency(b.task)).map(({ task: task2, reasons }) => ({
|
|
18285
18285
|
id: task2.id,
|
|
18286
18286
|
key: task2.key,
|
|
18287
18287
|
title: task2.title,
|
|
@@ -18310,8 +18310,8 @@ var agendaService = /* @__PURE__ */ __name((deps, now = Date.now) => ({
|
|
|
18310
18310
|
createdAt: task2.createdAt,
|
|
18311
18311
|
assignees
|
|
18312
18312
|
}));
|
|
18313
|
-
const mail = account.provider === "email" ? await mailActivity(store, account,
|
|
18314
|
-
const activity = mail ?? await store.chats.chatActivity(account,
|
|
18313
|
+
const mail = account.provider === "email" ? await mailActivity(store, account, at2 - within, parts.chats) : void 0;
|
|
18314
|
+
const activity = mail ?? await store.chats.chatActivity(account, at2 - within, parts.chats ? queryFilter(parts.chats, AGENDA_COLUMNS, { command: "tasks agenda", zone: timezoneOf() }) : void 0);
|
|
18315
18315
|
const turnOf = /* @__PURE__ */ __name((chat) => "turn" in chat ? chat.turn : chat.lastFromOwner === null ? null : chat.lastFromOwner ? "waiting" : "owed", "turnOf");
|
|
18316
18316
|
const chats = activity.chats.map(({ lastMessageId, ...chat }) => ({
|
|
18317
18317
|
turn: turnOf({ lastMessageId, ...chat }),
|
|
@@ -18324,7 +18324,7 @@ var agendaService = /* @__PURE__ */ __name((deps, now = Date.now) => ({
|
|
|
18324
18324
|
}),
|
|
18325
18325
|
openTasks: open7.filter((task2) => chatOf(task2.source) === chat.chatId).map((task2) => task2.id)
|
|
18326
18326
|
}));
|
|
18327
|
-
const silentFor = /* @__PURE__ */ __name((chat) =>
|
|
18327
|
+
const silentFor = /* @__PURE__ */ __name((chat) => at2 - Date.parse(chat.lastMessageAt), "silentFor");
|
|
18328
18328
|
const shown = {
|
|
18329
18329
|
owed: chats.filter((chat) => chat.turn === "owed" && silentFor(chat) >= unanswered2),
|
|
18330
18330
|
waiting: chats.filter((chat) => chat.turn === "waiting" && silentFor(chat) >= waiting),
|
|
@@ -18340,11 +18340,11 @@ var agendaService = /* @__PURE__ */ __name((deps, now = Date.now) => ({
|
|
|
18340
18340
|
if (category && !inList.has(category))
|
|
18341
18341
|
unlisted.set(category, (unlisted.get(category) ?? 0) + 1);
|
|
18342
18342
|
return {
|
|
18343
|
-
at: new Date(
|
|
18344
|
-
since: new Date(
|
|
18343
|
+
at: new Date(at2).toISOString(),
|
|
18344
|
+
since: new Date(at2 - within).toISOString(),
|
|
18345
18345
|
account: taskAccount(account),
|
|
18346
18346
|
storedAt: activity.storedAt,
|
|
18347
|
-
stale: activity.storedAt === null ||
|
|
18347
|
+
stale: activity.storedAt === null || at2 - Date.parse(activity.storedAt) > DAY,
|
|
18348
18348
|
tasks,
|
|
18349
18349
|
owed: withCoverage(shown.owed),
|
|
18350
18350
|
waiting: withCoverage(shown.waiting),
|
|
@@ -18381,7 +18381,7 @@ var split = /* @__PURE__ */ __name((query) => {
|
|
|
18381
18381
|
}, "of");
|
|
18382
18382
|
return { tasks: of("tasks"), chats: of("chats") };
|
|
18383
18383
|
}, "split");
|
|
18384
|
-
var taskColumns = /* @__PURE__ */ __name((holder,
|
|
18384
|
+
var taskColumns = /* @__PURE__ */ __name((holder, at2, tags) => ({
|
|
18385
18385
|
tag: { where: /* @__PURE__ */ __name((node) => tags.get(node.value) ?? { sql: "0", params: [] }, "where") },
|
|
18386
18386
|
category: { type: "kw", sql: "t.category" },
|
|
18387
18387
|
claimed: {
|
|
@@ -18390,28 +18390,28 @@ var taskColumns = /* @__PURE__ */ __name((holder, at3, tags) => ({
|
|
|
18390
18390
|
if (claim === "any")
|
|
18391
18391
|
return { sql: "1", params: [] };
|
|
18392
18392
|
if (claim === "none")
|
|
18393
|
-
return { sql: "t.claimed_by IS NULL OR t.claimed_until < ?", params: [
|
|
18393
|
+
return { sql: "t.claimed_by IS NULL OR t.claimed_until < ?", params: [at2] };
|
|
18394
18394
|
if (claim === "mine")
|
|
18395
18395
|
return {
|
|
18396
18396
|
sql: "t.claimed_by IS NOT NULL AND t.claimed_by = ? AND t.claimed_until >= ?",
|
|
18397
|
-
params: [holder ?? null,
|
|
18397
|
+
params: [holder ?? null, at2]
|
|
18398
18398
|
};
|
|
18399
18399
|
return {
|
|
18400
18400
|
sql: "t.claimed_by IS NOT NULL AND t.claimed_by IS NOT ? AND t.claimed_until >= ?",
|
|
18401
|
-
params: [holder ?? null,
|
|
18401
|
+
params: [holder ?? null, at2]
|
|
18402
18402
|
};
|
|
18403
18403
|
}, "where")
|
|
18404
18404
|
}
|
|
18405
18405
|
}), "taskColumns");
|
|
18406
|
-
var reasonsOf = /* @__PURE__ */ __name((task2,
|
|
18406
|
+
var reasonsOf = /* @__PURE__ */ __name((task2, at2, dueWithin) => {
|
|
18407
18407
|
const due = task2.dueAt === null ? void 0 : Date.parse(task2.dueAt);
|
|
18408
18408
|
const check = task2.nextCheckAt === null ? void 0 : Date.parse(task2.nextCheckAt);
|
|
18409
18409
|
const reasons = [];
|
|
18410
|
-
if (due !== void 0 && due <=
|
|
18410
|
+
if (due !== void 0 && due <= at2)
|
|
18411
18411
|
reasons.push("overdue");
|
|
18412
|
-
else if (due !== void 0 && due <=
|
|
18412
|
+
else if (due !== void 0 && due <= at2 + dueWithin)
|
|
18413
18413
|
reasons.push("due");
|
|
18414
|
-
if (check !== void 0 && check <=
|
|
18414
|
+
if (check !== void 0 && check <= at2)
|
|
18415
18415
|
reasons.push("check");
|
|
18416
18416
|
if (due === void 0 && check === void 0)
|
|
18417
18417
|
reasons.push("unplanned");
|
|
@@ -18486,7 +18486,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
18486
18486
|
};
|
|
18487
18487
|
}, "agendaItem");
|
|
18488
18488
|
|
|
18489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
18490
18490
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
18491
18491
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
18492
18492
|
const fail4 = /* @__PURE__ */ __name(() => {
|
|
@@ -18550,7 +18550,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
18550
18550
|
}
|
|
18551
18551
|
}, "validateContextEvidencePage");
|
|
18552
18552
|
|
|
18553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
18554
18554
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
18555
18555
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
18556
18556
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -18603,7 +18603,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
18603
18603
|
};
|
|
18604
18604
|
}, "contextReadBudget");
|
|
18605
18605
|
|
|
18606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
18607
18607
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
18608
18608
|
if (!port || typeof port.read !== "function")
|
|
18609
18609
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -18647,7 +18647,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
18647
18647
|
};
|
|
18648
18648
|
}, "createContextEvidenceReader");
|
|
18649
18649
|
|
|
18650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
18651
18651
|
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");
|
|
18652
18652
|
var excerpt = /* @__PURE__ */ __name((text3, query, size4 = 240, options = {}) => {
|
|
18653
18653
|
const flat = text3.replace(/\s+/g, " ").trim();
|
|
@@ -18656,17 +18656,17 @@ var excerpt = /* @__PURE__ */ __name((text3, query, size4 = 240, options = {}) =
|
|
|
18656
18656
|
const lower = flat.toLowerCase();
|
|
18657
18657
|
const literalWords = new Set((query.match(/[\p{L}\p{N}]+/gu) ?? []).map(fold));
|
|
18658
18658
|
const found = options.literal ? [...flat.matchAll(/[\p{L}\p{N}\p{M}]+/gu)].filter((match) => literalWords.has(fold(match[0]))).map((match) => match.index) : queryWords(query).map((word) => lower.indexOf(word)).filter((index) => index >= 0);
|
|
18659
|
-
const
|
|
18660
|
-
const start = Math.max(0, Math.min(
|
|
18659
|
+
const at2 = found.reduce((minimum, index) => Math.min(minimum, index), found[0] ?? 0);
|
|
18660
|
+
const start = Math.max(0, Math.min(at2 - Math.floor(size4 / 3), flat.length - size4));
|
|
18661
18661
|
const end = start + size4;
|
|
18662
18662
|
return `${start > 0 ? "\u2026" : ""}${flat.slice(start, end).trim()}${end < flat.length ? "\u2026" : ""}`;
|
|
18663
18663
|
}, "excerpt");
|
|
18664
18664
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
18665
18665
|
|
|
18666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
18667
18667
|
import { createInterface } from "node:readline";
|
|
18668
18668
|
|
|
18669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
18670
18670
|
import { createHash } from "node:crypto";
|
|
18671
18671
|
var MAX_ID = 512;
|
|
18672
18672
|
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
@@ -18896,7 +18896,7 @@ var envelopeOfVcard = /* @__PURE__ */ __name((text3, { provider, account, batchI
|
|
|
18896
18896
|
};
|
|
18897
18897
|
}, "envelopeOfVcard");
|
|
18898
18898
|
|
|
18899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
18900
18900
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
18901
18901
|
dryRun,
|
|
18902
18902
|
source: null,
|
|
@@ -18932,9 +18932,9 @@ var receiptOf = /* @__PURE__ */ __name((dryRun, source, run2) => ({
|
|
|
18932
18932
|
reason,
|
|
18933
18933
|
candidates
|
|
18934
18934
|
})),
|
|
18935
|
-
ignored: run2.ignored.map(({ index, key, at:
|
|
18935
|
+
ignored: run2.ignored.map(({ index, key, at: at2, reason }) => ({
|
|
18936
18936
|
key,
|
|
18937
|
-
pointer: pointerOf("records", index, ...
|
|
18937
|
+
pointer: pointerOf("records", index, ...at2),
|
|
18938
18938
|
reason
|
|
18939
18939
|
})),
|
|
18940
18940
|
relationships: run2.relationships,
|
|
@@ -18996,7 +18996,7 @@ var ingestVcard = /* @__PURE__ */ __name(async (store, text3, { provider, batchI
|
|
|
18996
18996
|
return { ...await ingest(store, envelope, options), vcard: issues };
|
|
18997
18997
|
}, "ingestVcard");
|
|
18998
18998
|
|
|
18999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
19000
19000
|
var escaped = /* @__PURE__ */ __name((text3) => text3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
19001
19001
|
var folded = /* @__PURE__ */ __name((text3) => text3.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
19002
19002
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -19040,7 +19040,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
19040
19040
|
var remembered = /* @__PURE__ */ __name((input, key, read) => input.remember ? input.remember(key, read) : read(), "remembered");
|
|
19041
19041
|
var chatsWithOf = /* @__PURE__ */ __name((input, key, id3) => remembered(input, `chats-with\0${key.provider}\0${key.account}\0${id3}`, () => input.store.chats.chatsWith(key, id3)), "chatsWithOf");
|
|
19042
19042
|
|
|
19043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
19044
19044
|
var SEARCH_LIMIT = 500;
|
|
19045
19045
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
19046
19046
|
var aliasHits = {
|
|
@@ -19089,7 +19089,7 @@ var aliasHits = {
|
|
|
19089
19089
|
}, "candidates")
|
|
19090
19090
|
};
|
|
19091
19091
|
|
|
19092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
19093
19093
|
var WEIGHT = 0.5;
|
|
19094
19094
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
19095
19095
|
var LARGE_GROUP = 30;
|
|
@@ -19161,7 +19161,7 @@ var sendersOf2 = /* @__PURE__ */ __name(async (input, chat, reference, key) => {
|
|
|
19161
19161
|
return found;
|
|
19162
19162
|
}, "sendersOf");
|
|
19163
19163
|
|
|
19164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
19165
19165
|
var WEIGHT2 = 0.7;
|
|
19166
19166
|
var chatTitle = {
|
|
19167
19167
|
id: "chat-title",
|
|
@@ -19200,7 +19200,7 @@ var chatTitle = {
|
|
|
19200
19200
|
}, "candidates")
|
|
19201
19201
|
};
|
|
19202
19202
|
|
|
19203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
19204
19204
|
var WEIGHT3 = 0.3;
|
|
19205
19205
|
var CONTACTS = 500;
|
|
19206
19206
|
var MOST_PAIRS = 200;
|
|
@@ -19261,7 +19261,7 @@ var emailDomain = {
|
|
|
19261
19261
|
}, "candidates")
|
|
19262
19262
|
};
|
|
19263
19263
|
|
|
19264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
19265
19265
|
var NAMED = 0.7;
|
|
19266
19266
|
var MEMBER_ONLY = 0.3;
|
|
19267
19267
|
var READ_LIMIT2 = 500;
|
|
@@ -19335,7 +19335,7 @@ var mailThread = {
|
|
|
19335
19335
|
}, "candidates")
|
|
19336
19336
|
};
|
|
19337
19337
|
|
|
19338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
19339
19339
|
var WEIGHT4 = 0.5;
|
|
19340
19340
|
var memberChats = {
|
|
19341
19341
|
id: "member-chats",
|
|
@@ -19377,7 +19377,7 @@ var memberChats = {
|
|
|
19377
19377
|
}, "candidates")
|
|
19378
19378
|
};
|
|
19379
19379
|
|
|
19380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
19381
19381
|
var WEIGHT5 = 0.6;
|
|
19382
19382
|
var memberDialog = {
|
|
19383
19383
|
id: "member-dialog",
|
|
@@ -19410,7 +19410,7 @@ var memberDialog = {
|
|
|
19410
19410
|
}, "candidates")
|
|
19411
19411
|
};
|
|
19412
19412
|
|
|
19413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
19414
19414
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
19415
19415
|
var DEFAULT_PURPOSES = ["work"];
|
|
19416
19416
|
var LINK_PURPOSE = "work";
|
|
@@ -19440,15 +19440,15 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
19440
19440
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
19441
19441
|
], "purposeList");
|
|
19442
19442
|
|
|
19443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
19444
19444
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
19445
19445
|
async around(ref2, window2) {
|
|
19446
|
-
const
|
|
19447
|
-
if (
|
|
19446
|
+
const at2 = parseLocator(ref2);
|
|
19447
|
+
if (at2.provider === "email")
|
|
19448
19448
|
return [];
|
|
19449
|
-
const rows = await messages.around({ provider:
|
|
19449
|
+
const rows = await messages.around({ provider: at2.provider, account: at2.account }, at2.chat, at2.message, window2);
|
|
19450
19450
|
return rows.filter((row) => !row.anchor).map((row) => ({
|
|
19451
|
-
ref: formatLocator({ ...
|
|
19451
|
+
ref: formatLocator({ ...at2, message: row.id }),
|
|
19452
19452
|
at: Date.parse(row.timestamp),
|
|
19453
19453
|
sender: row.senderName,
|
|
19454
19454
|
text: row.text ?? ""
|
|
@@ -19511,11 +19511,11 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19511
19511
|
const messages = storedMessageNeighbours(store.messages);
|
|
19512
19512
|
return {
|
|
19513
19513
|
async around(ref2, window2) {
|
|
19514
|
-
const
|
|
19515
|
-
if (
|
|
19514
|
+
const at2 = parseLocator(ref2);
|
|
19515
|
+
if (at2.provider !== "email")
|
|
19516
19516
|
return messages.around(ref2, window2);
|
|
19517
|
-
const account = await store.accounts.storedAccount({ provider:
|
|
19518
|
-
const email = await store.mail.email(account.id,
|
|
19517
|
+
const account = await store.accounts.storedAccount({ provider: at2.provider, account: at2.account });
|
|
19518
|
+
const email = await store.mail.email(account.id, at2.message);
|
|
19519
19519
|
if (!email)
|
|
19520
19520
|
throw new CliError("not_found", "the hit's email is no longer stored");
|
|
19521
19521
|
const thread = await store.mail.thread(email.emailThreadId);
|
|
@@ -19527,7 +19527,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19527
19527
|
...emails.slice(Math.max(0, index - window2.before), index),
|
|
19528
19528
|
...emails.slice(index + 1, index + 1 + window2.after)
|
|
19529
19529
|
].map((one2) => ({
|
|
19530
|
-
ref: formatLocator({ ...
|
|
19530
|
+
ref: formatLocator({ ...at2, message: one2.externalId }),
|
|
19531
19531
|
at: one2.sentAt ?? one2.receivedAt ?? 0,
|
|
19532
19532
|
sender: one2.fromName ?? one2.fromAddress,
|
|
19533
19533
|
text: [one2.subject, one2.bodyText ?? one2.snippet].filter(Boolean).join(" \u2014 ")
|
|
@@ -19536,7 +19536,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19536
19536
|
};
|
|
19537
19537
|
}, "storedNeighbours");
|
|
19538
19538
|
|
|
19539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
19540
19540
|
import { createHash as createHash2 } from "node:crypto";
|
|
19541
19541
|
var DAY2 = 864e5;
|
|
19542
19542
|
var MAX_TIME = 864e13;
|
|
@@ -19852,7 +19852,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text3, plan) => {
|
|
|
19852
19852
|
return value;
|
|
19853
19853
|
}, "decodeCheckpoint");
|
|
19854
19854
|
|
|
19855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
19856
19856
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
19857
19857
|
var PAGE = 20;
|
|
19858
19858
|
var PEOPLE = 20;
|
|
@@ -20256,7 +20256,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
20256
20256
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
20257
20257
|
}, "peopleOf");
|
|
20258
20258
|
|
|
20259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
20260
20260
|
var normalizedText = /* @__PURE__ */ __name((text3) => text3.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
20261
20261
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
20262
20262
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -20321,7 +20321,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
20321
20321
|
omittedMatches: omitted
|
|
20322
20322
|
})), "matchProjectCandidates");
|
|
20323
20323
|
|
|
20324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
20325
20325
|
var KINDS = ["project", "tag", "topic"];
|
|
20326
20326
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
20327
20327
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -20376,7 +20376,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
20376
20376
|
};
|
|
20377
20377
|
}, "findEvidenceMentions");
|
|
20378
20378
|
|
|
20379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
20380
20380
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
20381
20381
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
20382
20382
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -20687,7 +20687,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
20687
20687
|
return { chat: top.ref, relationship: link3.relationship, items, of };
|
|
20688
20688
|
}, "purposeHintOf");
|
|
20689
20689
|
|
|
20690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
20691
20691
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
20692
20692
|
var PERSON_SCORERS = [emailDomain];
|
|
20693
20693
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -20943,18 +20943,18 @@ var referenceOf = /* @__PURE__ */ __name((text3) => {
|
|
|
20943
20943
|
}, "referenceOf");
|
|
20944
20944
|
var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
|
|
20945
20945
|
|
|
20946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
20947
20947
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
20948
20948
|
|
|
20949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
20950
20950
|
import { lstat } from "node:fs/promises";
|
|
20951
20951
|
|
|
20952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20953
20953
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
20954
20954
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
20955
20955
|
import { join as join2 } from "node:path";
|
|
20956
20956
|
|
|
20957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
20958
20958
|
import { createHash as createHash3 } from "node:crypto";
|
|
20959
20959
|
var metadataLimit = 16384;
|
|
20960
20960
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -21014,7 +21014,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path2, locator, maxBytes
|
|
|
21014
21014
|
}
|
|
21015
21015
|
}, "readPartialMetadata");
|
|
21016
21016
|
|
|
21017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
21018
21018
|
import { randomUUID } from "node:crypto";
|
|
21019
21019
|
import { open, rename, unlink } from "node:fs/promises";
|
|
21020
21020
|
import { join } from "node:path";
|
|
@@ -21106,7 +21106,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21106
21106
|
};
|
|
21107
21107
|
}, "partialWriter");
|
|
21108
21108
|
|
|
21109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21110
21110
|
var NativeRecordingPartialStore = class {
|
|
21111
21111
|
static {
|
|
21112
21112
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -21213,12 +21213,12 @@ var NativeRecordingPartialStore = class {
|
|
|
21213
21213
|
}
|
|
21214
21214
|
};
|
|
21215
21215
|
|
|
21216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21217
21217
|
import { createHash as createHash5 } from "node:crypto";
|
|
21218
21218
|
import { link } from "node:fs/promises";
|
|
21219
21219
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
21220
21220
|
|
|
21221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
21222
21222
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
21223
21223
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path2, expected2, signal, writable = false) => {
|
|
21224
21224
|
signal?.throwIfAborted();
|
|
@@ -21253,7 +21253,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
21253
21253
|
signal?.throwIfAborted();
|
|
21254
21254
|
}, "commitPublication");
|
|
21255
21255
|
|
|
21256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21257
21257
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21258
21258
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21259
21259
|
import { join as join3 } from "node:path";
|
|
@@ -21326,7 +21326,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path2, prefix,
|
|
|
21326
21326
|
}
|
|
21327
21327
|
}, "writePublicationJournal");
|
|
21328
21328
|
|
|
21329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21330
21330
|
var NativeRecordingPublication = class {
|
|
21331
21331
|
static {
|
|
21332
21332
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21399,7 +21399,7 @@ var NativeRecordingPublication = class {
|
|
|
21399
21399
|
}
|
|
21400
21400
|
};
|
|
21401
21401
|
|
|
21402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21403
21403
|
import { createHash as createHash6 } from "node:crypto";
|
|
21404
21404
|
import { readdir } from "node:fs/promises";
|
|
21405
21405
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -21486,7 +21486,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
21486
21486
|
beforePublish
|
|
21487
21487
|
}), "commitMediaEntry");
|
|
21488
21488
|
|
|
21489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21490
21490
|
var validator = '"media-completed-v1"';
|
|
21491
21491
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21492
21492
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind2, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21587,18 +21587,18 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind2, file
|
|
|
21587
21587
|
return entry;
|
|
21588
21588
|
}, "archiveMediaFile");
|
|
21589
21589
|
|
|
21590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21591
21591
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21592
21592
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
21593
21593
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
21594
21594
|
const roots = /* @__PURE__ */ new Set();
|
|
21595
21595
|
const queued = new Set(initial.map((directory2) => resolve3(directory2)));
|
|
21596
21596
|
const pending = [...queued];
|
|
21597
|
-
for (let
|
|
21597
|
+
for (let at2 = 0; at2 < pending.length; at2++) {
|
|
21598
21598
|
signal?.throwIfAborted();
|
|
21599
21599
|
let root;
|
|
21600
21600
|
try {
|
|
21601
|
-
root = await realpath(pending[
|
|
21601
|
+
root = await realpath(pending[at2]);
|
|
21602
21602
|
} catch (error) {
|
|
21603
21603
|
if (missingMediaFile(error))
|
|
21604
21604
|
continue;
|
|
@@ -21654,7 +21654,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21654
21654
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21655
21655
|
}, "withMediaArchiveLocks");
|
|
21656
21656
|
|
|
21657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21658
21658
|
var checkMediaArchive = /* @__PURE__ */ __name((directory2, signal) => withMediaArchiveLocks(directory2, signal, async (root) => {
|
|
21659
21659
|
const entries = await readMediaManifests(root, signal);
|
|
21660
21660
|
if (!entries.length)
|
|
@@ -21797,7 +21797,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
21797
21797
|
}, { create: true });
|
|
21798
21798
|
}, "archiveMedia");
|
|
21799
21799
|
|
|
21800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
21801
21801
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
21802
21802
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
21803
21803
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -21948,7 +21948,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
21948
21948
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
21949
21949
|
}, "moveMediaArchive");
|
|
21950
21950
|
|
|
21951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
21952
21952
|
import { writeFileSync } from "node:fs";
|
|
21953
21953
|
import { join as join8 } from "node:path";
|
|
21954
21954
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
@@ -21973,7 +21973,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
21973
21973
|
`);
|
|
21974
21974
|
await nativeRuntime({ env, progress });
|
|
21975
21975
|
progress(`${model.id}: loading it once to check it works`);
|
|
21976
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
21976
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-U6X7CNNK.js");
|
|
21977
21977
|
const embedder = await openEmbedder2(model, directory2);
|
|
21978
21978
|
try {
|
|
21979
21979
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -21994,7 +21994,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id3, { env, progress = /
|
|
|
21994
21994
|
}
|
|
21995
21995
|
await nativeRuntime({ env, progress });
|
|
21996
21996
|
progress(`${model.id}: loading it once to check it works`);
|
|
21997
|
-
const { openReranker } = await import("./rerank-
|
|
21997
|
+
const { openReranker } = await import("./rerank-H4PUS4HV.js");
|
|
21998
21998
|
const reranker = await openReranker(model, directory2);
|
|
21999
21999
|
try {
|
|
22000
22000
|
await reranker.score("check", ["check"]);
|
|
@@ -22012,7 +22012,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
22012
22012
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
22013
22013
|
}
|
|
22014
22014
|
progress(`${model.id}: loading it once to check it works`);
|
|
22015
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22015
|
+
const { openPictureEmbedder } = await import("./embedder-3ROL6ROQ.js");
|
|
22016
22016
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22017
22017
|
try {
|
|
22018
22018
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22024,7 +22024,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id3, { env, progress = /*
|
|
|
22024
22024
|
return { model, directory: directory2 };
|
|
22025
22025
|
}, "downloadImageModel");
|
|
22026
22026
|
|
|
22027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
22028
22028
|
var MONEY_REQUEST = "money-request";
|
|
22029
22029
|
var MONEY_DONE = "money-done";
|
|
22030
22030
|
var PROMISE = "promise";
|
|
@@ -22058,10 +22058,10 @@ var MONEY_WORDS = [
|
|
|
22058
22058
|
}
|
|
22059
22059
|
];
|
|
22060
22060
|
|
|
22061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
22062
22062
|
var moneyClassesOf = /* @__PURE__ */ __name((text3) => listsHit(text3, MONEY_WORDS), "moneyClassesOf");
|
|
22063
22063
|
|
|
22064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
22065
22065
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
22066
22066
|
var MONEY_DONE_FORMS = words2([
|
|
22067
22067
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -22101,7 +22101,7 @@ var PROMISE_FORMS = words2([
|
|
|
22101
22101
|
"estar\xE1 listo"
|
|
22102
22102
|
]);
|
|
22103
22103
|
|
|
22104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
22105
22105
|
var EXCERPT_CHARS = 80;
|
|
22106
22106
|
var excerpt2 = /* @__PURE__ */ __name((text3) => {
|
|
22107
22107
|
const flat = text3.replace(/\s+/g, " ").trim();
|
|
@@ -22121,9 +22121,9 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
22121
22121
|
owner: message.outgoing === true
|
|
22122
22122
|
}), "whoOf");
|
|
22123
22123
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
22124
|
-
var day = /* @__PURE__ */ __name((
|
|
22124
|
+
var day = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString().slice(0, 10), "day");
|
|
22125
22125
|
|
|
22126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
22127
22127
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
22128
22128
|
var verbOf = /* @__PURE__ */ __name((text3) => {
|
|
22129
22129
|
if (MONEY_DONE_FORMS.test(text3))
|
|
@@ -22204,7 +22204,7 @@ var amounts = {
|
|
|
22204
22204
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
22205
22205
|
};
|
|
22206
22206
|
|
|
22207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
22208
22208
|
var children = {
|
|
22209
22209
|
id: "children",
|
|
22210
22210
|
version: 1,
|
|
@@ -22233,7 +22233,7 @@ var children = {
|
|
|
22233
22233
|
}, "read")
|
|
22234
22234
|
};
|
|
22235
22235
|
|
|
22236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
22237
22237
|
var coverage = {
|
|
22238
22238
|
id: "coverage",
|
|
22239
22239
|
version: 1,
|
|
@@ -22262,12 +22262,12 @@ var coverage = {
|
|
|
22262
22262
|
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")
|
|
22263
22263
|
};
|
|
22264
22264
|
|
|
22265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
22266
22266
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
22267
|
-
var item = /* @__PURE__ */ __name((row,
|
|
22267
|
+
var item = /* @__PURE__ */ __name((row, at2, data) => ({
|
|
22268
22268
|
signal: "payments",
|
|
22269
22269
|
chat: null,
|
|
22270
|
-
at:
|
|
22270
|
+
at: at2,
|
|
22271
22271
|
who: null,
|
|
22272
22272
|
// The row first, then what it cites, so an amount read from a cited message is not counted twice.
|
|
22273
22273
|
evidence: [row.ref, ...row.evidence].map((ref2) => ({ ref: ref2, fingerprint: null })),
|
|
@@ -22312,7 +22312,7 @@ var payments = {
|
|
|
22312
22312
|
}, "read")
|
|
22313
22313
|
};
|
|
22314
22314
|
|
|
22315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
22316
22316
|
var PATTERNS_PER_CHAT = 3;
|
|
22317
22317
|
var DAY3 = 864e5;
|
|
22318
22318
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -22401,7 +22401,7 @@ var promises = {
|
|
|
22401
22401
|
}, "read")
|
|
22402
22402
|
};
|
|
22403
22403
|
|
|
22404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
22405
22405
|
var PER_SIDE = 5;
|
|
22406
22406
|
var WEEK = 7 * 864e5;
|
|
22407
22407
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -22432,7 +22432,7 @@ var questions2 = {
|
|
|
22432
22432
|
}, "attention")
|
|
22433
22433
|
};
|
|
22434
22434
|
|
|
22435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
22436
22436
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
22437
22437
|
const byId = /* @__PURE__ */ __name((id3) => chat.messages.find((one2) => one2.id === id3), "byId");
|
|
22438
22438
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId(message.replyToId));
|
|
@@ -22500,7 +22500,7 @@ var replyNext = {
|
|
|
22500
22500
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
22501
22501
|
};
|
|
22502
22502
|
|
|
22503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
22504
22504
|
var escaped2 = /* @__PURE__ */ __name((text3) => text3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
22505
22505
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
22506
22506
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -22546,7 +22546,7 @@ var topics = {
|
|
|
22546
22546
|
}, "read")
|
|
22547
22547
|
};
|
|
22548
22548
|
|
|
22549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
22550
22550
|
var STATUS_SIGNALS = [
|
|
22551
22551
|
replyNext,
|
|
22552
22552
|
questions2,
|
|
@@ -22558,7 +22558,7 @@ var STATUS_SIGNALS = [
|
|
|
22558
22558
|
children
|
|
22559
22559
|
];
|
|
22560
22560
|
|
|
22561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
22562
22562
|
var DAY4 = 864e5;
|
|
22563
22563
|
var STATUS_WINDOW = 300;
|
|
22564
22564
|
var STATUS_CHATS = 16;
|
|
@@ -22747,7 +22747,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22747
22747
|
};
|
|
22748
22748
|
}, "projectStatus");
|
|
22749
22749
|
|
|
22750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/project-activity.js
|
|
22751
22751
|
var TOP = 3;
|
|
22752
22752
|
var projectActivity = /* @__PURE__ */ __name(async (store, input) => {
|
|
22753
22753
|
const until = input.until ?? Date.now();
|
|
@@ -22786,7 +22786,7 @@ var projectActivity = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22786
22786
|
return count3 ? [{ ref: refOf(chat), ...count3 }] : [];
|
|
22787
22787
|
});
|
|
22788
22788
|
const counted2 = known2.filter((chat) => !chat.muted);
|
|
22789
|
-
const last = counted2.map((chat) => chat.lastAt).filter((
|
|
22789
|
+
const last = counted2.map((chat) => chat.lastAt).filter((at2) => at2 !== null);
|
|
22790
22790
|
return {
|
|
22791
22791
|
ref: project,
|
|
22792
22792
|
key,
|
|
@@ -22809,7 +22809,7 @@ var projectActivity = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22809
22809
|
}, "projectActivity");
|
|
22810
22810
|
var refOf = /* @__PURE__ */ __name((chat) => formatReference({ type: "chat", provider: chat.provider, account: chat.account, chat: chat.chat }), "refOf");
|
|
22811
22811
|
|
|
22812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
22813
22813
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
22814
22814
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
22815
22815
|
if (deps.offline)
|
|
@@ -22881,18 +22881,18 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
22881
22881
|
};
|
|
22882
22882
|
}, "accountService");
|
|
22883
22883
|
|
|
22884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
22885
22885
|
var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-time", zone) => {
|
|
22886
|
-
const
|
|
22886
|
+
const at2 = aheadOf(value, flag, now, {
|
|
22887
22887
|
...zone === void 0 ? {} : { zone },
|
|
22888
22888
|
refuseDate: true,
|
|
22889
22889
|
soonest: MINUTE,
|
|
22890
22890
|
latest: YEAR
|
|
22891
22891
|
});
|
|
22892
|
-
return new Date(
|
|
22892
|
+
return new Date(at2 - at2 % MINUTE).toISOString();
|
|
22893
22893
|
}, "sendTime");
|
|
22894
22894
|
|
|
22895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
22896
22896
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
22897
22897
|
try {
|
|
22898
22898
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -23139,7 +23139,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
23139
23139
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
23140
23140
|
}, "linkLimits");
|
|
23141
23141
|
|
|
23142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
23143
23143
|
var THREADS_PAGE = 500;
|
|
23144
23144
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
23145
23145
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -23195,10 +23195,10 @@ var mailAround = /* @__PURE__ */ __name(async (store, hit, count3) => {
|
|
|
23195
23195
|
if (!stored)
|
|
23196
23196
|
return void 0;
|
|
23197
23197
|
const emails = (await store.mail.emails({ accountId: stored.id, threadExternalId: hit.chatId })).reverse();
|
|
23198
|
-
const
|
|
23199
|
-
if (
|
|
23198
|
+
const at2 = emails.findIndex(({ externalId }) => externalId === hit.id);
|
|
23199
|
+
if (at2 < 0)
|
|
23200
23200
|
return void 0;
|
|
23201
|
-
return emails.slice(Math.max(0,
|
|
23201
|
+
return emails.slice(Math.max(0, at2 - count3), at2 + count3 + 1).map((email) => email.externalId === hit.id ? { ...messageOfEmail(email, hit.chatId), anchor: true } : messageOfEmail(email, hit.chatId));
|
|
23202
23202
|
}, "mailAround");
|
|
23203
23203
|
var readMail = /* @__PURE__ */ __name(async (store, locator, { before = 0, after = 0 } = {}) => {
|
|
23204
23204
|
const { provider, account, chat, message } = parseLocator(locator);
|
|
@@ -23208,13 +23208,13 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before = 0, after
|
|
|
23208
23208
|
if (!stored)
|
|
23209
23209
|
throw new CliError("not_found", `no mail of ${account} is stored`);
|
|
23210
23210
|
const thread = await store.mail.threadHits(stored.id, chat);
|
|
23211
|
-
const
|
|
23212
|
-
if (
|
|
23211
|
+
const at2 = thread.findIndex(({ id: id3 }) => id3 === message);
|
|
23212
|
+
if (at2 < 0)
|
|
23213
23213
|
throw new CliError("not_found", `no stored email ${message} in that thread`);
|
|
23214
|
-
return thread.slice(Math.max(0,
|
|
23214
|
+
return thread.slice(Math.max(0, at2 - before), at2 + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
23215
23215
|
}, "readMail");
|
|
23216
23216
|
|
|
23217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
23218
23218
|
var PERSON_FIELDS = /* @__PURE__ */ new Set(["from", "to", "cc", "bcc"]);
|
|
23219
23219
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list"]);
|
|
23220
23220
|
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");
|
|
@@ -23587,7 +23587,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
23587
23587
|
};
|
|
23588
23588
|
}, "statsLucene");
|
|
23589
23589
|
|
|
23590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
23591
23591
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
23592
23592
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
23593
23593
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -23756,7 +23756,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23756
23756
|
};
|
|
23757
23757
|
}, "readRankingSelection");
|
|
23758
23758
|
|
|
23759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
23760
23760
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
|
|
23761
23761
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
23762
23762
|
command,
|
|
@@ -23766,7 +23766,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
23766
23766
|
fieldsVersion: FIELD_VERSION
|
|
23767
23767
|
}), "searchRecordOf");
|
|
23768
23768
|
|
|
23769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
23770
23770
|
function invalid2(message) {
|
|
23771
23771
|
throw new CliError("validation_error", message);
|
|
23772
23772
|
}
|
|
@@ -24060,10 +24060,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
24060
24060
|
}, "evidence")
|
|
24061
24061
|
}), "adminStatisticsService");
|
|
24062
24062
|
|
|
24063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24064
24064
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24065
24065
|
|
|
24066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
24067
24067
|
var REQUEST_MS = 400;
|
|
24068
24068
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
24069
24069
|
const lowest = ranges[0];
|
|
@@ -24086,7 +24086,7 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
24086
24086
|
};
|
|
24087
24087
|
}, "estimateBackfill");
|
|
24088
24088
|
|
|
24089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
24090
24090
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
24091
24091
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
24092
24092
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -24109,7 +24109,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
24109
24109
|
}
|
|
24110
24110
|
}, "patiently");
|
|
24111
24111
|
|
|
24112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
24113
24113
|
var RULES_VERSION = 6;
|
|
24114
24114
|
var LOOK_BACK = 50;
|
|
24115
24115
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -24167,8 +24167,8 @@ var mentionLinks = /* @__PURE__ */ __name((message, window2, handles) => {
|
|
|
24167
24167
|
var sameSenderLink = /* @__PURE__ */ __name((message, window2) => {
|
|
24168
24168
|
if (message.senderId === null)
|
|
24169
24169
|
return [];
|
|
24170
|
-
const
|
|
24171
|
-
const target2 = latest(window2.slice(-SAME_SENDER_WITHIN), (candidate) => candidate.senderId === message.senderId && sameThread(candidate, message) &&
|
|
24170
|
+
const at2 = Date.parse(message.timestamp);
|
|
24171
|
+
const target2 = latest(window2.slice(-SAME_SENDER_WITHIN), (candidate) => candidate.senderId === message.senderId && sameThread(candidate, message) && at2 - Date.parse(candidate.timestamp) <= SAME_SENDER_MS);
|
|
24172
24172
|
return target2 ? [link2(message, target2.id, "rule", "same_sender", 0.5, "same-sender-v2")] : [];
|
|
24173
24173
|
}, "sameSenderLink");
|
|
24174
24174
|
var mentioned = /* @__PURE__ */ __name((text3, handles) => {
|
|
@@ -24207,12 +24207,12 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
24207
24207
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
24208
24208
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind2, confidence, method) => ({ messageId: message.id, parentId, source, kind: kind2, confidence, method }), "link");
|
|
24209
24209
|
|
|
24210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
24211
24211
|
var CONTEXT_MESSAGES = 3;
|
|
24212
24212
|
var CONTEXT_MINUTES = 10;
|
|
24213
24213
|
var MAX_CHARS = 1200;
|
|
24214
24214
|
var line = /* @__PURE__ */ __name(({ sender, text: text3 }) => sender ? `${sender}: ${text3.trim()}` : text3.trim(), "line");
|
|
24215
|
-
var near = /* @__PURE__ */ __name((messages, sentAt) => messages.filter(({ text: text3, sentAt:
|
|
24215
|
+
var near = /* @__PURE__ */ __name((messages, sentAt) => messages.filter(({ text: text3, sentAt: at2 }) => text3.trim() && Math.abs(at2 - sentAt) <= CONTEXT_MINUTES * 6e4).slice(0, CONTEXT_MESSAGES), "near");
|
|
24216
24216
|
var contextText = /* @__PURE__ */ __name(({ chatTitle: chatTitle2, sender, caption, sentAt, before, after }) => {
|
|
24217
24217
|
const earlier = near(before, sentAt).reverse();
|
|
24218
24218
|
const later = near(after, sentAt);
|
|
@@ -24231,12 +24231,12 @@ var context = {
|
|
|
24231
24231
|
}, "describe")
|
|
24232
24232
|
};
|
|
24233
24233
|
|
|
24234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
24235
24235
|
var BUILT_INS = [context];
|
|
24236
24236
|
var providers = [...BUILT_INS];
|
|
24237
24237
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
24238
24238
|
|
|
24239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
24240
24240
|
var READ_PAGE = 5e3;
|
|
24241
24241
|
var CHAIN = 50;
|
|
24242
24242
|
var CONVERSATION_QUERY = {
|
|
@@ -24388,7 +24388,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
24388
24388
|
return size4;
|
|
24389
24389
|
}, "sized");
|
|
24390
24390
|
|
|
24391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
24392
24392
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
24393
24393
|
var MESSAGE_PAGE = 5e3;
|
|
24394
24394
|
var PER_SESSION = 8;
|
|
@@ -24407,7 +24407,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
24407
24407
|
price: remote.price,
|
|
24408
24408
|
installed: true,
|
|
24409
24409
|
perBatch: PER_REQUEST * concurrency,
|
|
24410
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
24410
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-BBAWKVIT.js")).openRemote(remote, apiKey, {
|
|
24411
24411
|
concurrency,
|
|
24412
24412
|
env: deps.env ?? process.env
|
|
24413
24413
|
}), "open")
|
|
@@ -24427,7 +24427,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
24427
24427
|
if (!isTextModelInstalled(model, directory2))
|
|
24428
24428
|
throw notDownloaded(model.id);
|
|
24429
24429
|
if (apart) {
|
|
24430
|
-
const { openProcess } = await import("./process-
|
|
24430
|
+
const { openProcess } = await import("./process-PB2WCOR2.js");
|
|
24431
24431
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
24432
24432
|
}
|
|
24433
24433
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -24525,8 +24525,8 @@ ${text3}`),
|
|
|
24525
24525
|
}
|
|
24526
24526
|
const have = await store.vectors.embeddedHashes(target2.key, described.map(({ hash: hash3 }) => hash3));
|
|
24527
24527
|
const missing3 = [...new Map(described.filter(({ hash: hash3 }) => !have.has(hash3)).map((one2) => [one2.hash, one2])).values()];
|
|
24528
|
-
for (let
|
|
24529
|
-
const batch = missing3.slice(
|
|
24528
|
+
for (let at2 = 0; at2 < missing3.length; at2 += PER_REQUEST) {
|
|
24529
|
+
const batch = missing3.slice(at2, at2 + PER_REQUEST);
|
|
24530
24530
|
const vectors = await embedder.embed(batch.map(({ text: text3 }) => text3), "passage");
|
|
24531
24531
|
check?.();
|
|
24532
24532
|
await store.vectors.saveVectors(target2.key, target2.dims, batch.map(({ hash: hash3 }, index) => ({ hash: hash3, vector: vectors[index] })));
|
|
@@ -24573,9 +24573,9 @@ ${text3}`),
|
|
|
24573
24573
|
const embedMessages = /* @__PURE__ */ __name(async (items, target2, embedder, check) => {
|
|
24574
24574
|
const store = await deps.store();
|
|
24575
24575
|
const account = await deps.account();
|
|
24576
|
-
for (let
|
|
24576
|
+
for (let at2 = 0; at2 < items.length; at2 += target2.perBatch) {
|
|
24577
24577
|
check?.();
|
|
24578
|
-
const batch = items.slice(
|
|
24578
|
+
const batch = items.slice(at2, at2 + target2.perBatch);
|
|
24579
24579
|
const vectors = await embedder.embed(batch.map(({ text: text3 }) => text3), "passage");
|
|
24580
24580
|
await store.vectors.saveMessageVectors(account, target2.key, target2.dims, batch.map(({ messagePk, hash: hash3, text: text3, occurredAt }, index) => ({
|
|
24581
24581
|
messagePk,
|
|
@@ -24716,7 +24716,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
24716
24716
|
return { ...one2, state };
|
|
24717
24717
|
}, "shaped");
|
|
24718
24718
|
|
|
24719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
24720
24720
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
24721
24721
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
24722
24722
|
for (const [key, value, maximum] of [
|
|
@@ -24769,7 +24769,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
24769
24769
|
}
|
|
24770
24770
|
}, "catchUpSearch");
|
|
24771
24771
|
|
|
24772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24773
24773
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
24774
24774
|
if (deps.reads === "store") {
|
|
24775
24775
|
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`);
|
|
@@ -25000,8 +25000,8 @@ var limitOf = /* @__PURE__ */ __name(async (deps, store, account, chat, options)
|
|
|
25000
25000
|
var recordSkip = /* @__PURE__ */ __name(async (store, account, chatId, skip) => {
|
|
25001
25001
|
if (!chatId)
|
|
25002
25002
|
return;
|
|
25003
|
-
const
|
|
25004
|
-
await store.chats.recordHistorySkips(account, /* @__PURE__ */ new Map([[chatId, { ...skip, messages: 0, oldestAt:
|
|
25003
|
+
const at2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
25004
|
+
await store.chats.recordHistorySkips(account, /* @__PURE__ */ new Map([[chatId, { ...skip, messages: 0, oldestAt: at2, newestAt: at2, unread: true }]]));
|
|
25005
25005
|
}, "recordSkip");
|
|
25006
25006
|
var abortable = /* @__PURE__ */ __name(async (read, signal) => {
|
|
25007
25007
|
signal.throwIfAborted();
|
|
@@ -25093,7 +25093,7 @@ var fetchInto = /* @__PURE__ */ __name(async ({ history, store, account, fetchin
|
|
|
25093
25093
|
reachedSince = true;
|
|
25094
25094
|
break;
|
|
25095
25095
|
}
|
|
25096
|
-
const oldestAt = page.items.reduce((
|
|
25096
|
+
const oldestAt = page.items.reduce((at2, message) => message.timestamp < at2 ? message.timestamp : at2, first2.timestamp);
|
|
25097
25097
|
const fromAt = held.from === low ? oldestAt : await timeOfKey(store, account, chatId, held.from, byTime, oldestAt);
|
|
25098
25098
|
if (last !== void 0 && await store.messages.countMessages(account, chatId, { since: fromAt }) >= last) {
|
|
25099
25099
|
reachedLast = true;
|
|
@@ -25150,7 +25150,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
25150
25150
|
return message?.timestamp ?? fallback;
|
|
25151
25151
|
}, "timeOfKey");
|
|
25152
25152
|
|
|
25153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
25154
25154
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
25155
25155
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
25156
25156
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -25287,16 +25287,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
25287
25287
|
return { plan, repair };
|
|
25288
25288
|
}, "gapsService");
|
|
25289
25289
|
|
|
25290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
25291
25291
|
import { createHash as createHash9 } from "node:crypto";
|
|
25292
25292
|
import { constants as constants2, mkdirSync } from "node:fs";
|
|
25293
25293
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
25294
25294
|
|
|
25295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25296
25296
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
25297
25297
|
import { basename as basename4, join as join9, relative as relative2, sep as sep2 } from "node:path";
|
|
25298
25298
|
|
|
25299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
25300
25300
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
25301
25301
|
import { open as open4, stat } from "node:fs/promises";
|
|
25302
25302
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -25512,7 +25512,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path2, maxBytes, read) => {
|
|
|
25512
25512
|
return { name, source };
|
|
25513
25513
|
}, "readStickerFile");
|
|
25514
25514
|
|
|
25515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25516
25516
|
var MAX_FILES = 1e4;
|
|
25517
25517
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
25518
25518
|
if (refusedPlace(directory2, app, env))
|
|
@@ -25581,15 +25581,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
25581
25581
|
return choices;
|
|
25582
25582
|
}, "directoryPaths");
|
|
25583
25583
|
|
|
25584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25585
25585
|
import { posix } from "node:path";
|
|
25586
25586
|
|
|
25587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25588
25588
|
import { setImmediate as tick } from "node:timers/promises";
|
|
25589
25589
|
import { crc32 } from "node:zlib";
|
|
25590
25590
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
25591
25591
|
|
|
25592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
25593
25593
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
25594
25594
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
25595
25595
|
var SAMPLE = 65536;
|
|
@@ -25691,7 +25691,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
25691
25691
|
return result.text;
|
|
25692
25692
|
}, "decodeXml");
|
|
25693
25693
|
|
|
25694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25695
25695
|
var MAX_PART = 10 * 1024 * 1024;
|
|
25696
25696
|
var MAX_ENTRIES = 1e3;
|
|
25697
25697
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -25906,7 +25906,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
25906
25906
|
return found;
|
|
25907
25907
|
}, "elements");
|
|
25908
25908
|
|
|
25909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
25910
25910
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
25911
25911
|
let name = "";
|
|
25912
25912
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -25961,7 +25961,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
25961
25961
|
return { text: parts.join("").trim(), truncated: false };
|
|
25962
25962
|
}, "sheetText");
|
|
25963
25963
|
|
|
25964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25965
25965
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
25966
25966
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
25967
25967
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26361,10 +26361,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind2, signal) => {
|
|
|
26361
26361
|
}
|
|
26362
26362
|
}, "readDocument");
|
|
26363
26363
|
|
|
26364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26365
26365
|
import { extname as extname3 } from "node:path";
|
|
26366
26366
|
|
|
26367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26368
26368
|
import { readFileSync } from "node:fs";
|
|
26369
26369
|
import { dirname as dirname4, extname as extname2, join as join10 } from "node:path";
|
|
26370
26370
|
import { fileURLToPath } from "node:url";
|
|
@@ -26425,7 +26425,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26425
26425
|
}
|
|
26426
26426
|
}, "derived");
|
|
26427
26427
|
|
|
26428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26429
26429
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26430
26430
|
var image2 = {
|
|
26431
26431
|
id: "image",
|
|
@@ -26434,7 +26434,7 @@ var image2 = {
|
|
|
26434
26434
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26435
26435
|
};
|
|
26436
26436
|
|
|
26437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26438
26438
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26439
26439
|
var doc = {
|
|
26440
26440
|
id: "doc",
|
|
@@ -26446,7 +26446,7 @@ var doc = {
|
|
|
26446
26446
|
}), "read")
|
|
26447
26447
|
};
|
|
26448
26448
|
|
|
26449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26450
26450
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26451
26451
|
var docx = {
|
|
26452
26452
|
id: "docx",
|
|
@@ -26459,10 +26459,10 @@ var docx = {
|
|
|
26459
26459
|
}), "read")
|
|
26460
26460
|
};
|
|
26461
26461
|
|
|
26462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26463
26463
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26464
26464
|
|
|
26465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/html-entities.js
|
|
26466
26466
|
var NAMED2 = {
|
|
26467
26467
|
amp: "&",
|
|
26468
26468
|
lt: "<",
|
|
@@ -26514,7 +26514,7 @@ var decodeEntities = /* @__PURE__ */ __name((text3) => text3.replace(/&(#x[0-9a-
|
|
|
26514
26514
|
return body[1] === "x" || body[1] === "X" ? character(Number.parseInt(body.slice(2), 16), entity2) : character(Number(body.slice(1)), entity2);
|
|
26515
26515
|
}), "decodeEntities");
|
|
26516
26516
|
|
|
26517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26518
26518
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26519
26519
|
"fonttbl",
|
|
26520
26520
|
"colortbl",
|
|
@@ -26680,7 +26680,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
26680
26680
|
return decodeEntities(replaceTags(blocks, /<[^>]*>/g, "")).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
26681
26681
|
}, "htmlText");
|
|
26682
26682
|
|
|
26683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
26684
26684
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
26685
26685
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
26686
26686
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -26724,19 +26724,19 @@ var HEADING = /^(#{1,6})[ \t]+(.+?)[ \t]*#*[ \t]*$/;
|
|
|
26724
26724
|
var markdownSections = /* @__PURE__ */ __name((text3) => {
|
|
26725
26725
|
const found = [];
|
|
26726
26726
|
let fence = false;
|
|
26727
|
-
let
|
|
26727
|
+
let at2 = 0;
|
|
26728
26728
|
for (const line2 of text3.split("\n")) {
|
|
26729
26729
|
if (/^(```|~~~)/.test(line2))
|
|
26730
26730
|
fence = !fence;
|
|
26731
26731
|
const match = fence ? null : HEADING.exec(line2);
|
|
26732
26732
|
if (match?.[1] && match[2])
|
|
26733
|
-
found.push({ heading: match[2], level: match[1].length, start:
|
|
26734
|
-
|
|
26733
|
+
found.push({ heading: match[2], level: match[1].length, start: at2, end: text3.length });
|
|
26734
|
+
at2 += line2.length + 1;
|
|
26735
26735
|
}
|
|
26736
26736
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text3.length }));
|
|
26737
26737
|
}, "markdownSections");
|
|
26738
26738
|
|
|
26739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
26740
26740
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
26741
26741
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
26742
26742
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -26807,7 +26807,7 @@ var html = {
|
|
|
26807
26807
|
}, "read")
|
|
26808
26808
|
};
|
|
26809
26809
|
|
|
26810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
26811
26811
|
var office = {
|
|
26812
26812
|
id: "office",
|
|
26813
26813
|
version: documentExtractor("odt"),
|
|
@@ -26818,7 +26818,7 @@ var office = {
|
|
|
26818
26818
|
}, "read")
|
|
26819
26819
|
};
|
|
26820
26820
|
|
|
26821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
26822
26822
|
var pdf = {
|
|
26823
26823
|
id: "pdf",
|
|
26824
26824
|
version: "unpdf",
|
|
@@ -26864,10 +26864,10 @@ var pdf = {
|
|
|
26864
26864
|
const result = await Promise.race([reading(), aborted]);
|
|
26865
26865
|
const pages = Array.isArray(result.text) ? result.text : [result.text];
|
|
26866
26866
|
const text3 = pages.join("\n\n");
|
|
26867
|
-
let
|
|
26867
|
+
let at2 = 0;
|
|
26868
26868
|
const spans = pages.map((page, index) => {
|
|
26869
|
-
const span = { page: index + 1, start:
|
|
26870
|
-
|
|
26869
|
+
const span = { page: index + 1, start: at2, end: at2 + page.length };
|
|
26870
|
+
at2 += page.length + 2;
|
|
26871
26871
|
return span;
|
|
26872
26872
|
});
|
|
26873
26873
|
return text3.trim() === "" ? { status: "needs-agent", extractor } : {
|
|
@@ -26885,7 +26885,7 @@ var pdf = {
|
|
|
26885
26885
|
}), "read")
|
|
26886
26886
|
};
|
|
26887
26887
|
|
|
26888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
26889
26889
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
26890
26890
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
26891
26891
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -26905,7 +26905,7 @@ var plain = {
|
|
|
26905
26905
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
26906
26906
|
};
|
|
26907
26907
|
|
|
26908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
26909
26909
|
var rtf = {
|
|
26910
26910
|
id: "rtf",
|
|
26911
26911
|
version: "v1",
|
|
@@ -26913,10 +26913,10 @@ var rtf = {
|
|
|
26913
26913
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
26914
26914
|
};
|
|
26915
26915
|
|
|
26916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26917
26917
|
import { basename as basename5 } from "node:path";
|
|
26918
26918
|
|
|
26919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
26920
26920
|
var delimitedSpans = /* @__PURE__ */ __name((text3, delimiter, maxCells = 1e4) => {
|
|
26921
26921
|
const cells = [];
|
|
26922
26922
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -26926,23 +26926,23 @@ var delimitedSpans = /* @__PURE__ */ __name((text3, delimiter, maxCells = 1e4) =
|
|
|
26926
26926
|
else
|
|
26927
26927
|
truncated = true;
|
|
26928
26928
|
}, "finish");
|
|
26929
|
-
for (let
|
|
26930
|
-
const char = text3[
|
|
26929
|
+
for (let at2 = 0; at2 < text3.length; at2++) {
|
|
26930
|
+
const char = text3[at2];
|
|
26931
26931
|
if (char === '"') {
|
|
26932
|
-
if (quoted && text3[
|
|
26933
|
-
|
|
26932
|
+
if (quoted && text3[at2 + 1] === '"') {
|
|
26933
|
+
at2++;
|
|
26934
26934
|
continue;
|
|
26935
26935
|
}
|
|
26936
26936
|
quoted = !quoted;
|
|
26937
26937
|
} else if (!quoted && char === delimiter) {
|
|
26938
|
-
finish(
|
|
26939
|
-
start =
|
|
26938
|
+
finish(at2);
|
|
26939
|
+
start = at2 + 1;
|
|
26940
26940
|
column++;
|
|
26941
26941
|
} else if (!quoted && (char === "\n" || char === "\r")) {
|
|
26942
|
-
finish(
|
|
26943
|
-
if (char === "\r" && text3[
|
|
26944
|
-
|
|
26945
|
-
start =
|
|
26942
|
+
finish(at2);
|
|
26943
|
+
if (char === "\r" && text3[at2 + 1] === "\n")
|
|
26944
|
+
at2++;
|
|
26945
|
+
start = at2 + 1;
|
|
26946
26946
|
row++;
|
|
26947
26947
|
column = 1;
|
|
26948
26948
|
}
|
|
@@ -26954,7 +26954,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text3, delimiter, maxCells = 1e4) =
|
|
|
26954
26954
|
return { cells, truncated };
|
|
26955
26955
|
}, "delimitedSpans");
|
|
26956
26956
|
|
|
26957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26958
26958
|
var DELIMITED = {
|
|
26959
26959
|
".csv": ",",
|
|
26960
26960
|
".tsv": " ",
|
|
@@ -26993,7 +26993,7 @@ var sheets = {
|
|
|
26993
26993
|
}, "read")
|
|
26994
26994
|
};
|
|
26995
26995
|
|
|
26996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
26997
26997
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
26998
26998
|
var HEAD_BYTES = 1024;
|
|
26999
26999
|
var readers = [...BUILT_INS2];
|
|
@@ -27003,7 +27003,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
27003
27003
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
27004
27004
|
}, "readWithRegistry");
|
|
27005
27005
|
|
|
27006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27007
27007
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
27008
27008
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path: path2 }) => extname3(name ?? path2).toLowerCase(), "extensionOf");
|
|
27009
27009
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -28082,7 +28082,7 @@ function imageSize(input) {
|
|
|
28082
28082
|
}
|
|
28083
28083
|
__name(imageSize, "imageSize");
|
|
28084
28084
|
|
|
28085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
28086
28086
|
var MAX_PAGES = 20;
|
|
28087
28087
|
var MAX_PIXELS = 2e7;
|
|
28088
28088
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28242,7 +28242,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline, load, signal) => {
|
|
|
28242
28242
|
}
|
|
28243
28243
|
}, "ocrPdf");
|
|
28244
28244
|
|
|
28245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28246
28246
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28247
28247
|
const limits = pdfPreviewLimits(env);
|
|
28248
28248
|
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
@@ -28319,7 +28319,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28319
28319
|
}
|
|
28320
28320
|
}, "pdfPreview");
|
|
28321
28321
|
|
|
28322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/picture-reading.js
|
|
28323
28323
|
import { spawn } from "node:child_process";
|
|
28324
28324
|
import { mkdtempSync, readFileSync as readFileSync2, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
28325
28325
|
import { tmpdir } from "node:os";
|
|
@@ -28482,7 +28482,7 @@ Read the attached picture.`,
|
|
|
28482
28482
|
}
|
|
28483
28483
|
}, "readPictureWithAgent");
|
|
28484
28484
|
|
|
28485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28486
28486
|
import { createHash as createHash8 } from "node:crypto";
|
|
28487
28487
|
import { constants } from "node:fs";
|
|
28488
28488
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28590,7 +28590,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28590
28590
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28591
28591
|
}, "transferMime");
|
|
28592
28592
|
|
|
28593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28594
28594
|
var ATTACHMENT_QUERY = {
|
|
28595
28595
|
entity: "attachment",
|
|
28596
28596
|
backend: "sql",
|
|
@@ -29061,7 +29061,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29061
29061
|
}, "readPicture")
|
|
29062
29062
|
}), "attachmentsService");
|
|
29063
29063
|
|
|
29064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
29065
29065
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
29066
29066
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref: ref2 }) => {
|
|
29067
29067
|
const store = await accountStore(deps);
|
|
@@ -29091,7 +29091,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29091
29091
|
}, "list")
|
|
29092
29092
|
}), "chatDocumentsService");
|
|
29093
29093
|
|
|
29094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
29095
29095
|
var observationDuration = /* @__PURE__ */ __name((text3, flag) => {
|
|
29096
29096
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text3);
|
|
29097
29097
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -29178,7 +29178,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
29178
29178
|
}
|
|
29179
29179
|
}, "isRetentionSelection");
|
|
29180
29180
|
|
|
29181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
29182
29182
|
var counterFields = /* @__PURE__ */ __name((text3 = "views,reactions,comments") => {
|
|
29183
29183
|
const fields2 = text3.split(",").map((one2) => one2.trim());
|
|
29184
29184
|
if (!fields2.length || fields2.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields2).size !== fields2.length)
|
|
@@ -29385,7 +29385,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29385
29385
|
};
|
|
29386
29386
|
}, "countersService");
|
|
29387
29387
|
|
|
29388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/search/respell.js
|
|
29389
29389
|
var LATIN = {
|
|
29390
29390
|
\u0430: "a",
|
|
29391
29391
|
\u0431: "b",
|
|
@@ -29440,10 +29440,11 @@ var respelled = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
29440
29440
|
return found;
|
|
29441
29441
|
}, "respelled");
|
|
29442
29442
|
|
|
29443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/named-chat.js
|
|
29444
29444
|
var LEAST_USES = 3;
|
|
29445
29445
|
var SAMPLE2 = 50;
|
|
29446
29446
|
var CAPITALISED = 0.8;
|
|
29447
|
+
var NAMED_SHARE = 0.05;
|
|
29447
29448
|
var namedChat = /* @__PURE__ */ __name(async (store, account, messenger, accounts, words4) => {
|
|
29448
29449
|
for (const word of words4) {
|
|
29449
29450
|
if (word.length < 3 || new RegExp("^\\p{N}+$", "u").test(word))
|
|
@@ -29456,6 +29457,7 @@ var namedChat = /* @__PURE__ */ __name(async (store, account, messenger, account
|
|
|
29456
29457
|
messenger
|
|
29457
29458
|
);
|
|
29458
29459
|
const groups = (await store.queries.countQuery(execution, "chat")).sort((a, b) => b.count - a.count);
|
|
29460
|
+
const total = groups.reduce((sum2, { count: count3 }) => sum2 + count3, 0);
|
|
29459
29461
|
const dialogs = [];
|
|
29460
29462
|
for (const group of groups) {
|
|
29461
29463
|
if (dialogs.length === 2)
|
|
@@ -29468,6 +29470,8 @@ var namedChat = /* @__PURE__ */ __name(async (store, account, messenger, account
|
|
|
29468
29470
|
const [best, next] = dialogs;
|
|
29469
29471
|
if (!best || best.count < LEAST_USES || next && next.count * 2 > best.count)
|
|
29470
29472
|
continue;
|
|
29473
|
+
if (best.count < total * NAMED_SHARE)
|
|
29474
|
+
continue;
|
|
29471
29475
|
const { items } = await store.queries.matchQuery({
|
|
29472
29476
|
...execution,
|
|
29473
29477
|
chat: { account: best.source, chatId: best.chatId }
|
|
@@ -29490,7 +29494,7 @@ var queryWords2 = /* @__PURE__ */ __name((query) => {
|
|
|
29490
29494
|
}, "queryWords");
|
|
29491
29495
|
var without = /* @__PURE__ */ __name((query, word) => query.replace(new RegExp(`(?<![\\p{L}\\p{N}])${word}(?![\\p{L}\\p{N}])`, "giu"), " ").replace(/\s+/gu, " ").trim(), "without");
|
|
29492
29496
|
|
|
29493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29494
29498
|
var SYNC_KEY = "messages.sync-first";
|
|
29495
29499
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29496
29500
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29501,7 +29505,7 @@ var chatScope = /* @__PURE__ */ __name((node) => {
|
|
|
29501
29505
|
const required2 = node.clauses.filter(({ occur }) => occur === "must").map(({ node: node2 }) => chatScope(node2));
|
|
29502
29506
|
const bounded3 = required2.filter((scope) => scope !== void 0);
|
|
29503
29507
|
if (bounded3.length)
|
|
29504
|
-
return bounded3.reduce((one2, other) => one2.filter((chat) => other.some((
|
|
29508
|
+
return bounded3.reduce((one2, other) => one2.filter((chat) => other.some((at2) => keyOf2(at2) === keyOf2(chat))));
|
|
29505
29509
|
const optional2 = node.clauses.filter(({ occur }) => occur === "should").map(({ node: node2 }) => chatScope(node2));
|
|
29506
29510
|
if (!optional2.length || optional2.some((scope) => scope === void 0))
|
|
29507
29511
|
return void 0;
|
|
@@ -29622,12 +29626,18 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29622
29626
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29623
29627
|
}), "withRefresh");
|
|
29624
29628
|
|
|
29625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29626
29630
|
var CANDIDATES = 50;
|
|
29627
29631
|
var ACROSS_CHATS = 500;
|
|
29628
29632
|
var OWN_BLOCK = 5;
|
|
29629
29633
|
var PER_CHAT = 20;
|
|
29634
|
+
var BIG_CHAT = 100;
|
|
29630
29635
|
var WORD_HITS = 200;
|
|
29636
|
+
var SHOWN_LINES = 3;
|
|
29637
|
+
var SHOWN_CHARS = 200;
|
|
29638
|
+
var SHOWN_HEAD = 80;
|
|
29639
|
+
var CHUNK_READ = 60;
|
|
29640
|
+
var REPLIES_READ = 60;
|
|
29631
29641
|
var RRF_K2 = 60;
|
|
29632
29642
|
var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
29633
29643
|
const command = deps.messenger.app.command;
|
|
@@ -29646,6 +29656,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29646
29656
|
}, deps.messenger);
|
|
29647
29657
|
const { items } = await store.queries.matchQuery({
|
|
29648
29658
|
...lexical.execution,
|
|
29659
|
+
rareWordsFirst: true,
|
|
29649
29660
|
...prepared.selectedChat ? {} : { perChat: PER_CHAT },
|
|
29650
29661
|
...prepared.selectedChat ? { chat: prepared.selectedChat } : {},
|
|
29651
29662
|
...conversations === void 0 ? {} : { conversationIds: conversations },
|
|
@@ -29655,13 +29666,13 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29655
29666
|
const sources = /* @__PURE__ */ new Map();
|
|
29656
29667
|
for (const account of prepared.scopeAccounts) {
|
|
29657
29668
|
const refs = items.flatMap((hit, index) => {
|
|
29658
|
-
const
|
|
29659
|
-
return
|
|
29669
|
+
const at2 = parseLocator(hit.locator);
|
|
29670
|
+
return at2.provider === account.provider && at2.account === account.account ? [{ hit, index }] : [];
|
|
29660
29671
|
});
|
|
29661
29672
|
const found = await store.conversations.conversationsOfMessages(account, refs.map(({ hit }) => ({ chatId: hit.chatId, messageId: hit.id })));
|
|
29662
29673
|
const chats = /* @__PURE__ */ new Set();
|
|
29663
|
-
refs.forEach(({ hit, index },
|
|
29664
|
-
const summary = found[
|
|
29674
|
+
refs.forEach(({ hit, index }, at2) => {
|
|
29675
|
+
const summary = found[at2];
|
|
29665
29676
|
if (summary) {
|
|
29666
29677
|
summaries.set(index, summary);
|
|
29667
29678
|
sources.set(summary.id, account);
|
|
@@ -29696,8 +29707,8 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29696
29707
|
const emails = [];
|
|
29697
29708
|
for (const account of mailAccounts) {
|
|
29698
29709
|
const found = mail.items.filter((hit) => {
|
|
29699
|
-
const
|
|
29700
|
-
return
|
|
29710
|
+
const at2 = parseLocator(hit.locator);
|
|
29711
|
+
return at2.account === account.account && (since === void 0 || hit.timestamp >= since);
|
|
29701
29712
|
});
|
|
29702
29713
|
if (!found.length)
|
|
29703
29714
|
continue;
|
|
@@ -29728,11 +29739,13 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29728
29739
|
});
|
|
29729
29740
|
return { hits, outside: outside2, sources, respellings };
|
|
29730
29741
|
}, "byWords");
|
|
29731
|
-
const search = /* @__PURE__ */ __name(async (query, { chat, model: choice, since, limit, filter, source, timezone, syncFirst, signal, refresh, timeLimitMs }) => {
|
|
29742
|
+
const search = /* @__PURE__ */ __name(async (query, { chat, model: choice, since, limit, filter, source, timezone, syncFirst, signal, refresh, timeLimitMs, like }) => {
|
|
29732
29743
|
if (!query.trim())
|
|
29733
29744
|
searchError("query.invalid-syntax", { start: 0, end: query.length }, "give words to search for");
|
|
29734
29745
|
if (new TextEncoder().encode(query).length > QUERY_LIMITS.bytes)
|
|
29735
29746
|
searchError("query.too-large", { start: 0, end: query.length }, "query is longer than 8 KiB");
|
|
29747
|
+
if (like !== void 0 && new TextEncoder().encode(like).length > QUERY_LIMITS.bytes)
|
|
29748
|
+
throw new CliError("validation_error", "--like is longer than 8 KiB: one sentence is enough");
|
|
29736
29749
|
const refreshed = await refreshSearch(deps, {
|
|
29737
29750
|
chat,
|
|
29738
29751
|
limit,
|
|
@@ -29771,56 +29784,59 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29771
29784
|
respellings: /* @__PURE__ */ new Map()
|
|
29772
29785
|
};
|
|
29773
29786
|
});
|
|
29774
|
-
const
|
|
29787
|
+
const texts = like?.trim() ? [query, like] : [query];
|
|
29788
|
+
const meaning = texts.map(() => []);
|
|
29775
29789
|
const own = [];
|
|
29776
29790
|
const sources = words4.sources;
|
|
29777
29791
|
if (target2.installed && prepared.scopeAccounts.length && eligibility?.conversations.length !== 0) {
|
|
29778
29792
|
await withEmbedder(deps, target2, choice, {}, async (embedder) => {
|
|
29779
|
-
const
|
|
29780
|
-
for (const
|
|
29781
|
-
const
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
|
|
29791
|
-
|
|
29792
|
-
|
|
29793
|
-
|
|
29794
|
-
|
|
29795
|
-
|
|
29796
|
-
|
|
29797
|
-
|
|
29798
|
-
|
|
29799
|
-
|
|
29800
|
-
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
|
|
29807
|
-
|
|
29808
|
-
|
|
29809
|
-
|
|
29810
|
-
|
|
29811
|
-
|
|
29812
|
-
|
|
29813
|
-
|
|
29814
|
-
|
|
29815
|
-
|
|
29816
|
-
|
|
29817
|
-
|
|
29793
|
+
const vectors = await embedder.embed(texts, "query");
|
|
29794
|
+
for (const [at2, vector] of vectors.entries())
|
|
29795
|
+
for (const one2 of prepared.scopeAccounts) {
|
|
29796
|
+
const scope = scopeOf6(one2);
|
|
29797
|
+
if (scope === null)
|
|
29798
|
+
continue;
|
|
29799
|
+
const whole3 = "chatId" in scope || one2.provider === MAIL;
|
|
29800
|
+
const hits2 = await store.vectors.nearestConversations(one2, {
|
|
29801
|
+
...scope,
|
|
29802
|
+
...since === void 0 ? {} : { since },
|
|
29803
|
+
model: target2.key,
|
|
29804
|
+
limit: whole3 ? Math.max(limit, CANDIDATES) : Math.max(limit, ACROSS_CHATS),
|
|
29805
|
+
query: vector,
|
|
29806
|
+
...eligibility ? { conversations: eligibility.conversations } : {}
|
|
29807
|
+
});
|
|
29808
|
+
const images = at2 > 0 ? [] : await store.vectors.nearestImages(one2, {
|
|
29809
|
+
...scope,
|
|
29810
|
+
...since === void 0 ? {} : { since },
|
|
29811
|
+
model: target2.key,
|
|
29812
|
+
limit: Math.max(limit, CANDIDATES),
|
|
29813
|
+
query: vector
|
|
29814
|
+
});
|
|
29815
|
+
const found = [
|
|
29816
|
+
...hits2,
|
|
29817
|
+
...images.filter((hit) => !eligibility || eligibility.conversations.includes(hit.summary.id))
|
|
29818
|
+
].sort((a, b) => b.score - a.score);
|
|
29819
|
+
const mine = at2 > 0 ? [] : await store.vectors.nearestConversations(one2, {
|
|
29820
|
+
...scope,
|
|
29821
|
+
...since === void 0 ? {} : { since },
|
|
29822
|
+
model: target2.key,
|
|
29823
|
+
limit: OWN_BLOCK,
|
|
29824
|
+
query: vector,
|
|
29825
|
+
fromOwner: true,
|
|
29826
|
+
...eligibility ? { conversations: eligibility.conversations } : {}
|
|
29827
|
+
});
|
|
29828
|
+
for (const hit of found)
|
|
29829
|
+
sources.set(hit.summary.id, one2);
|
|
29830
|
+
for (const hit of mine) {
|
|
29831
|
+
sources.set(hit.summary.id, one2);
|
|
29832
|
+
own.push(hit);
|
|
29833
|
+
}
|
|
29834
|
+
meaning[at2]?.push(...whole3 ? found.map((hit) => ({ hit, lead: hit.score })) : shared(found, limit));
|
|
29818
29835
|
}
|
|
29819
|
-
meaning.push(...whole3 ? found.map((hit) => ({ hit, lead: hit.score })) : shared(found, limit));
|
|
29820
|
-
}
|
|
29821
29836
|
});
|
|
29822
29837
|
}
|
|
29823
|
-
|
|
29838
|
+
for (const list3 of meaning)
|
|
29839
|
+
list3.sort((a, b) => b.lead - a.lead);
|
|
29824
29840
|
const scoped = [];
|
|
29825
29841
|
const elsewhere = [];
|
|
29826
29842
|
for (const one2 of prepared.scopeAccounts) {
|
|
@@ -29849,17 +29865,46 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29849
29865
|
locator: formatLocator({ ...source2, chat: hit.summary.chatId, message: hit.chunk.firstMessageId })
|
|
29850
29866
|
};
|
|
29851
29867
|
}, "located");
|
|
29852
|
-
const hits = fused(meaning.map(({ hit }) => hit), words4.hits, meaningFloor(target2.key)).slice(0, limit).map(located);
|
|
29868
|
+
const hits = fused(meaning.map((list3) => list3.map(({ hit }) => hit)), words4.hits, meaningFloor(target2.key)).slice(0, limit).map(located);
|
|
29853
29869
|
const shown = new Set(hits.map((hit) => hit.summary.id));
|
|
29854
|
-
const
|
|
29870
|
+
const ownOf = /* @__PURE__ */ __name((keep2) => own.filter(keep2).sort((a, b) => b.score - a.score).slice(0, OWN_BLOCK).map((hit) => located({ ...hit, by: ["meaning"] })), "ownOf");
|
|
29871
|
+
const ownHits = ownOf((hit) => !shown.has(hit.summary.id));
|
|
29872
|
+
const ownSpare = ownOf((hit) => shown.has(hit.summary.id));
|
|
29873
|
+
const asked = wordStems(query);
|
|
29874
|
+
const stems = [...asked, ...wordStems(texts.join(" "))];
|
|
29875
|
+
const replies = (async () => {
|
|
29876
|
+
const found = /* @__PURE__ */ new Map();
|
|
29877
|
+
const bySource = /* @__PURE__ */ new Map();
|
|
29878
|
+
for (const hit of [...hits, ...ownHits, ...ownSpare]) {
|
|
29879
|
+
const source2 = hit.source ?? account;
|
|
29880
|
+
const group = bySource.get(JSON.stringify(source2)) ?? { source: source2, hits: [] };
|
|
29881
|
+
group.hits.push(hit);
|
|
29882
|
+
bySource.set(JSON.stringify(source2), group);
|
|
29883
|
+
}
|
|
29884
|
+
for (const { source: source2, hits: group } of bySource.values()) {
|
|
29885
|
+
const read = await store.conversations.chunkReplies(source2, group.map(({ summary, chunk }) => ({ conversationId: summary.id, ...chunk })), REPLIES_READ);
|
|
29886
|
+
for (const [index, hit] of group.entries())
|
|
29887
|
+
found.set(hit, read[index] ?? []);
|
|
29888
|
+
}
|
|
29889
|
+
return found;
|
|
29890
|
+
})();
|
|
29891
|
+
const withLines = /* @__PURE__ */ __name(async (hit, ownFirst) => {
|
|
29892
|
+
const read = await store.conversations.chunkMessages(hit.source ?? account, hit.summary.id, hit.chunk, CHUNK_READ);
|
|
29893
|
+
const lines = [
|
|
29894
|
+
...shownLines(read, stems, ownFirst, asked),
|
|
29895
|
+
...shownLines((await replies).get(hit) ?? [], stems, false, [], 1)
|
|
29896
|
+
];
|
|
29897
|
+
return lines.length ? { ...hit, lines } : hit;
|
|
29898
|
+
}, "withLines");
|
|
29855
29899
|
return {
|
|
29856
29900
|
accounts: prepared.scopeAccounts,
|
|
29857
29901
|
model: target2.id,
|
|
29858
29902
|
meaning: target2.installed ? "searched" : "unavailable",
|
|
29859
29903
|
...wordsOutOfTime ? { words: "out-of-time" } : {},
|
|
29860
29904
|
...words4.respellings.size ? { respelled: Object.fromEntries(words4.respellings) } : {},
|
|
29861
|
-
hits,
|
|
29862
|
-
...ownHits.length ? { own: ownHits } : {},
|
|
29905
|
+
hits: await Promise.all(hits.map((hit) => withLines(hit, false))),
|
|
29906
|
+
...ownHits.length ? { own: await Promise.all(ownHits.map((hit) => withLines(hit, true))) } : {},
|
|
29907
|
+
...ownSpare.length ? { ownSpare: await Promise.all(ownSpare.map((hit) => withLines(hit, true))) } : {},
|
|
29863
29908
|
readiness,
|
|
29864
29909
|
...locallyRefreshed ? { prepared: locallyRefreshed } : {},
|
|
29865
29910
|
...refreshed ? { refreshed, coverage: { state: refreshed.complete ? "partial" : "stale" } } : {},
|
|
@@ -29869,7 +29914,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29869
29914
|
return {
|
|
29870
29915
|
/** Over every chat, a query that names someone by a name their private chat uses has that chat's hits first. */
|
|
29871
29916
|
search: /* @__PURE__ */ __name(async (query, options) => {
|
|
29872
|
-
const found = await search(query, options);
|
|
29917
|
+
const { ownSpare, ...found } = await search(query, options);
|
|
29873
29918
|
if (options.chat !== void 0 || options.filter !== void 0 || found.accounts?.length !== 1)
|
|
29874
29919
|
return found;
|
|
29875
29920
|
const named3 = await namedChat(await deps.store(), await deps.account(), deps.messenger, found.accounts, queryWords2(query)).catch((error) => {
|
|
@@ -29883,10 +29928,15 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29883
29928
|
const { syncFirst: _, refresh: __, ...plain2 } = options;
|
|
29884
29929
|
const inside2 = await search(rest || query, { ...plain2, chat: named3.chatId });
|
|
29885
29930
|
const shown = new Set(inside2.hits.map(({ summary }) => summary.id));
|
|
29931
|
+
const hits = [...inside2.hits, ...found.hits.filter(({ summary }) => !shown.has(summary.id))].slice(0, options.limit);
|
|
29932
|
+
const kept2 = new Set(hits.map(({ summary }) => summary.id));
|
|
29933
|
+
const own = [...found.own ?? [], ...(ownSpare ?? []).filter(({ summary }) => !kept2.has(summary.id))].sort((a, b) => (b.score ?? 0) - (a.score ?? 0)).slice(0, OWN_BLOCK);
|
|
29934
|
+
const { own: _shown, ...plainFound } = found;
|
|
29886
29935
|
return {
|
|
29887
|
-
...
|
|
29936
|
+
...plainFound,
|
|
29937
|
+
...own.length ? { own } : {},
|
|
29888
29938
|
named: { word: named3.word, chatId: named3.chatId, title: named3.title },
|
|
29889
|
-
hits
|
|
29939
|
+
hits
|
|
29890
29940
|
};
|
|
29891
29941
|
}, "search"),
|
|
29892
29942
|
related: /* @__PURE__ */ __name(async (chat, message, { model: choice, limit }) => {
|
|
@@ -29926,23 +29976,32 @@ var shared = /* @__PURE__ */ __name((hits, limit) => {
|
|
|
29926
29976
|
for (const hit of hits)
|
|
29927
29977
|
chats.set(hit.summary.chatId, [...chats.get(hit.summary.chatId) ?? [], hit]);
|
|
29928
29978
|
return [...chats.values()].flatMap((own) => {
|
|
29929
|
-
const
|
|
29930
|
-
|
|
29979
|
+
const share = own.length >= BIG_CHAT ? BIG_CHAT : PER_CHAT;
|
|
29980
|
+
const level2 = own[Math.min(share, own.length) - 1]?.score ?? 0;
|
|
29981
|
+
return own.slice(0, Math.max(limit, share)).map((hit, at2) => ({ hit, lead: share > PER_CHAT && at2 >= PER_CHAT ? hit.score - 10 : hit.score - level2 }));
|
|
29931
29982
|
});
|
|
29932
29983
|
}, "shared");
|
|
29933
29984
|
var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
29934
29985
|
const merged3 = /* @__PURE__ */ new Map();
|
|
29935
|
-
|
|
29936
|
-
|
|
29937
|
-
summary
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
29986
|
+
for (const list3 of meaning)
|
|
29987
|
+
list3.filter(({ score }) => score > minimumCosine).forEach(({ summary, chunk, score, stale, matchedIn }, index) => {
|
|
29988
|
+
const key = matchedIn ? `${summary.id}#${chunk.firstMessageId}` : summary.id;
|
|
29989
|
+
const share = 1 / (RRF_K2 + index + 1);
|
|
29990
|
+
const held = merged3.get(key);
|
|
29991
|
+
if (!held) {
|
|
29992
|
+
merged3.set(key, {
|
|
29993
|
+
summary,
|
|
29994
|
+
chunk,
|
|
29995
|
+
score,
|
|
29996
|
+
by: ["meaning"],
|
|
29997
|
+
stale,
|
|
29998
|
+
...matchedIn ? { matchedIn } : {},
|
|
29999
|
+
fused: share
|
|
30000
|
+
});
|
|
30001
|
+
return;
|
|
30002
|
+
}
|
|
30003
|
+
held.fused += share;
|
|
29944
30004
|
});
|
|
29945
|
-
});
|
|
29946
30005
|
words4.forEach(({ summary, chunk }, index) => {
|
|
29947
30006
|
const share = 1 / (RRF_K2 + index + 1);
|
|
29948
30007
|
const held = merged3.get(summary.id);
|
|
@@ -29954,6 +30013,35 @@ var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
|
29954
30013
|
});
|
|
29955
30014
|
return [...merged3.values()].sort((a, b) => b.fused - a.fused || (b.score ?? -2) - (a.score ?? -2)).map(({ fused: _, ...hit }) => hit);
|
|
29956
30015
|
}, "fused");
|
|
30016
|
+
var wordStems = /* @__PURE__ */ __name((text3) => [...new Set(queryWords2(text3).map((word) => word.slice(0, 5)))], "wordStems");
|
|
30017
|
+
var shownLines = /* @__PURE__ */ __name((read, stems, ownFirst, asked, count3 = SHOWN_LINES) => {
|
|
30018
|
+
const scored = read.map(({ text: text3, ...line2 }, at2) => {
|
|
30019
|
+
const flat = text3.replace(/\s+/g, " ").trim();
|
|
30020
|
+
const lower = flat.toLowerCase();
|
|
30021
|
+
const found = stems.filter((stem) => lower.includes(stem));
|
|
30022
|
+
const first2 = found.reduce((least, stem) => Math.min(least, lower.indexOf(stem)), Number.POSITIVE_INFINITY);
|
|
30023
|
+
return { ...line2, flat, at: at2, score: found.length + (ownFirst && line2.outgoing ? 100 : 0), first: first2 };
|
|
30024
|
+
});
|
|
30025
|
+
const picked = [...scored].sort((a, b) => b.score - a.score || a.at - b.at).slice(0, count3);
|
|
30026
|
+
const matches = /* @__PURE__ */ __name((flat) => asked.filter((stem) => flat.toLowerCase().includes(stem)).length, "matches");
|
|
30027
|
+
const asking = scored.reduce((best, line2) => matches(line2.flat) > (best ? matches(best.flat) : 0) ? line2 : best, void 0);
|
|
30028
|
+
const reply = asking && scored[asking.at + 1];
|
|
30029
|
+
if (reply && !picked.includes(reply))
|
|
30030
|
+
picked.push(reply);
|
|
30031
|
+
return picked.sort((a, b) => a.at - b.at).map(({ sender, flat, outgoing, first: first2 }) => {
|
|
30032
|
+
const who2 = outgoing ? `${sender ?? "you"}${sender ? " (you)" : ""}: ` : sender ? `${sender}: ` : "";
|
|
30033
|
+
return `${who2}${cutAround(flat, first2)}`;
|
|
30034
|
+
});
|
|
30035
|
+
}, "shownLines");
|
|
30036
|
+
var cutAround = /* @__PURE__ */ __name((flat, first2) => {
|
|
30037
|
+
if (flat.length <= SHOWN_CHARS)
|
|
30038
|
+
return flat;
|
|
30039
|
+
if (!Number.isFinite(first2) || first2 < SHOWN_CHARS - 25)
|
|
30040
|
+
return `${flat.slice(0, SHOWN_CHARS)}\u2026`;
|
|
30041
|
+
const tail = SHOWN_CHARS - SHOWN_HEAD;
|
|
30042
|
+
const from = Math.min(first2 - 30, flat.length - tail);
|
|
30043
|
+
return `${flat.slice(0, SHOWN_HEAD)}\u2026${flat.slice(from, from + tail)}${from + tail < flat.length ? "\u2026" : ""}`;
|
|
30044
|
+
}, "cutAround");
|
|
29957
30045
|
var searchReadiness = /* @__PURE__ */ __name((chats, meaning, outside2) => {
|
|
29958
30046
|
const built = new Set(chats.filter(({ state }) => state !== "not-built").map(({ chat }) => chat));
|
|
29959
30047
|
const ids = /* @__PURE__ */ __name((keep2) => chats.filter(keep2).map(({ chat }) => chat), "ids");
|
|
@@ -29978,13 +30066,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
29978
30066
|
return mean2.map((value) => value / length);
|
|
29979
30067
|
}, "meanOf");
|
|
29980
30068
|
|
|
29981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
29982
30070
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
29983
30071
|
...embeddingsMaintenance(deps),
|
|
29984
30072
|
...embeddingsSearch(deps)
|
|
29985
30073
|
}), "embeddingsService");
|
|
29986
30074
|
|
|
29987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
29988
30076
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
29989
30077
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
29990
30078
|
if (deps.offline)
|
|
@@ -30125,7 +30213,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30125
30213
|
};
|
|
30126
30214
|
}, "foldersService");
|
|
30127
30215
|
|
|
30128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
30129
30217
|
var INBOX_CHATS = 20;
|
|
30130
30218
|
var REVIEW_DAYS = 3;
|
|
30131
30219
|
var UNANSWERED_HOURS = 24;
|
|
@@ -30138,9 +30226,9 @@ var storeReader = /* @__PURE__ */ __name((deps, store, account) => ({
|
|
|
30138
30226
|
chats: /* @__PURE__ */ __name(async ({ limit, offset }) => {
|
|
30139
30227
|
const newest = new Map((await store.chats.chatStats(account)).map((one2) => [one2.chatId, one2.newestAt]));
|
|
30140
30228
|
const all = byRecency((await store.chats.chats(account, {})).items.map((chat) => {
|
|
30141
|
-
const
|
|
30142
|
-
const later =
|
|
30143
|
-
return later ? { ...chat, lastMessageAt:
|
|
30229
|
+
const at2 = newest.get(chat.id) ?? null;
|
|
30230
|
+
const later = at2 !== null && (chat.lastMessageAt === null || Date.parse(at2) > Date.parse(chat.lastMessageAt));
|
|
30231
|
+
return later ? { ...chat, lastMessageAt: at2 } : chat;
|
|
30144
30232
|
}));
|
|
30145
30233
|
const end = limit === void 0 ? all.length : offset + limit;
|
|
30146
30234
|
return { items: all.slice(offset, end), hasMore: all.length > end };
|
|
@@ -30333,7 +30421,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
30333
30421
|
};
|
|
30334
30422
|
}, "inboxService");
|
|
30335
30423
|
|
|
30336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
30337
30425
|
var REVIEW_COUNT = 500;
|
|
30338
30426
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
30339
30427
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -30412,13 +30500,13 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
30412
30500
|
};
|
|
30413
30501
|
}, "mentionsService");
|
|
30414
30502
|
|
|
30415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
30416
30504
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
30417
30505
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
30418
30506
|
const { text: text3, spans } = formatted2;
|
|
30419
30507
|
if (typeof text3 !== "string" || !Array.isArray(spans) || spans.length > 100)
|
|
30420
30508
|
throw invalid3();
|
|
30421
|
-
const boundary = /* @__PURE__ */ __name((
|
|
30509
|
+
const boundary = /* @__PURE__ */ __name((at2) => !(at2 > 0 && at2 < text3.length && /[\uD800-\uDBFF]/u.test(text3[at2 - 1] ?? "") && /[\uDC00-\uDFFF]/u.test(text3[at2] ?? "")), "boundary");
|
|
30422
30510
|
for (const span of spans) {
|
|
30423
30511
|
if (![
|
|
30424
30512
|
"bold",
|
|
@@ -30472,7 +30560,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
30472
30560
|
};
|
|
30473
30561
|
}, "visibleFormattedText");
|
|
30474
30562
|
|
|
30475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
30476
30564
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind: kind2, name }) => ({
|
|
30477
30565
|
position,
|
|
30478
30566
|
kind: kind2,
|
|
@@ -30521,7 +30609,7 @@ var validatePermalink = /* @__PURE__ */ __name((link3) => {
|
|
|
30521
30609
|
return { url: link3.url, access: link3.access, reason: link3.reason };
|
|
30522
30610
|
}, "validatePermalink");
|
|
30523
30611
|
|
|
30524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
30525
30613
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
30526
30614
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
30527
30615
|
return `${seconds / 86400}d`;
|
|
@@ -30553,7 +30641,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
30553
30641
|
return seconds;
|
|
30554
30642
|
}, "pinDurationOf");
|
|
30555
30643
|
|
|
30556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
30557
30645
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
30558
30646
|
if (sendAs === void 0) {
|
|
30559
30647
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30578,7 +30666,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30578
30666
|
return sendAs;
|
|
30579
30667
|
}, "typedSendAs");
|
|
30580
30668
|
|
|
30581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30582
30670
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30583
30671
|
var tokensOf = /* @__PURE__ */ __name((text3) => normalize(text3).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30584
30672
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30779,7 +30867,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30779
30867
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
30780
30868
|
}, "signals");
|
|
30781
30869
|
|
|
30782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30783
30871
|
var MEANING_DEPTH = 100;
|
|
30784
30872
|
var RRF_K3 = 60;
|
|
30785
30873
|
var RERANK_DEPTH = 50;
|
|
@@ -31105,7 +31193,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
31105
31193
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
31106
31194
|
}, "mixedWithReranker");
|
|
31107
31195
|
|
|
31108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
31109
31197
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
31110
31198
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
31111
31199
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -31198,7 +31286,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31198
31286
|
return result;
|
|
31199
31287
|
}
|
|
31200
31288
|
result.stale = state.algorithmVersion !== RULES_VERSION;
|
|
31201
|
-
const
|
|
31289
|
+
const at2 = Date.parse(anchor.timestamp);
|
|
31202
31290
|
const cache = /* @__PURE__ */ new Map();
|
|
31203
31291
|
const linksOf = /* @__PURE__ */ __name(async (id3) => {
|
|
31204
31292
|
if (!cache.has(id3)) {
|
|
@@ -31227,7 +31315,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31227
31315
|
result.stale = true;
|
|
31228
31316
|
continue;
|
|
31229
31317
|
}
|
|
31230
|
-
if (Math.abs(Date.parse(item2.timestamp) -
|
|
31318
|
+
if (Math.abs(Date.parse(item2.timestamp) - at2) > bounds.withinMs) {
|
|
31231
31319
|
stopped("time");
|
|
31232
31320
|
continue;
|
|
31233
31321
|
}
|
|
@@ -31304,7 +31392,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31304
31392
|
return result;
|
|
31305
31393
|
}, "readThreadContext");
|
|
31306
31394
|
|
|
31307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
31308
31396
|
var SEARCH_FILL_MS = 200;
|
|
31309
31397
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
31310
31398
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -31412,7 +31500,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
31412
31500
|
}, "accountOf");
|
|
31413
31501
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
31414
31502
|
|
|
31415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31416
31504
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
31417
31505
|
try {
|
|
31418
31506
|
const text3 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -31491,7 +31579,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31491
31579
|
}
|
|
31492
31580
|
}, "meaningLane");
|
|
31493
31581
|
|
|
31494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31495
31583
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31496
31584
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31497
31585
|
if (choice === "off")
|
|
@@ -31503,9 +31591,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31503
31591
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31504
31592
|
try {
|
|
31505
31593
|
const warm = deps.embedders;
|
|
31506
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31594
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-PB2WCOR2.js")).openRerankerProcess(model, directory2, {
|
|
31507
31595
|
threads: defaultThreads()
|
|
31508
|
-
})) : await (await import("./rerank-
|
|
31596
|
+
})) : await (await import("./rerank-H4PUS4HV.js")).openReranker(model, directory2);
|
|
31509
31597
|
return {
|
|
31510
31598
|
model: model.id,
|
|
31511
31599
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31525,14 +31613,14 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31525
31613
|
};
|
|
31526
31614
|
}, "rerankLane");
|
|
31527
31615
|
|
|
31528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/file-fetch.js
|
|
31529
31617
|
var EXCHANGE_MS = 60 * 60 * 1e3;
|
|
31530
31618
|
|
|
31531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/files.js
|
|
31532
31620
|
var foldKey = /* @__PURE__ */ __name((key) => key.replaceAll("_", "").toLowerCase(), "foldKey");
|
|
31533
31621
|
var DOWNLOAD_KEYS = new Set(["DOWNLOAD_URL", "downloadUrl", "fileUrl", "CALL_RECORD_URL", "archiveLink", "publicUrl"].map(foldKey));
|
|
31534
31622
|
|
|
31535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
31536
31624
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
31537
31625
|
import { dirname as dirname5 } from "node:path";
|
|
31538
31626
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -31599,7 +31687,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
31599
31687
|
}
|
|
31600
31688
|
}, "lockTime");
|
|
31601
31689
|
|
|
31602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/manifest/map.js
|
|
31603
31691
|
var TIMES = { createdAt: "epoch", updatedAt: "epoch" };
|
|
31604
31692
|
var ITEM = {
|
|
31605
31693
|
externalId: "id",
|
|
@@ -31651,7 +31739,7 @@ var FIELDS = {
|
|
|
31651
31739
|
lead: ITEM
|
|
31652
31740
|
};
|
|
31653
31741
|
|
|
31654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/manifest/manifest.js
|
|
31655
31743
|
var path = pipe(string(), regex(/^[^.\s]+(\.[^.\s]+)*$/, "a dotted path such as properties.name"));
|
|
31656
31744
|
var paths = pipe(array(path), minLength(1));
|
|
31657
31745
|
var crmRuleSchema = union([
|
|
@@ -31744,7 +31832,7 @@ var schema = strictObject({
|
|
|
31744
31832
|
}))
|
|
31745
31833
|
});
|
|
31746
31834
|
|
|
31747
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
31835
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/names.js
|
|
31748
31836
|
var pascal = /* @__PURE__ */ __name((text3) => text3.split(/[^A-Za-z0-9]+/).filter(Boolean).map((word) => word[0]?.toUpperCase() + word.slice(1)).join(""), "pascal");
|
|
31749
31837
|
var GLOBALS = /* @__PURE__ */ new Set([
|
|
31750
31838
|
"Array",
|
|
@@ -31780,7 +31868,7 @@ var identifier = /* @__PURE__ */ __name((id3) => {
|
|
|
31780
31868
|
return GLOBALS.has(name) ? `Api${name}` : name;
|
|
31781
31869
|
}, "identifier");
|
|
31782
31870
|
|
|
31783
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
31871
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/sign-in.js
|
|
31784
31872
|
var BEARER = { in: "header", name: "authorization", value: /* @__PURE__ */ __name((token) => `Bearer ${token}`, "value") };
|
|
31785
31873
|
var signInPlace = /* @__PURE__ */ __name((scheme) => {
|
|
31786
31874
|
if (scheme.type === "apiKey") {
|
|
@@ -31813,7 +31901,7 @@ var signInRequirements = /* @__PURE__ */ __name((operation, document) => {
|
|
|
31813
31901
|
return requirements?.some((one2) => Object.keys(one2).length > 0) ? requirements : void 0;
|
|
31814
31902
|
}, "signInRequirements");
|
|
31815
31903
|
|
|
31816
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
31904
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/graphql.js
|
|
31817
31905
|
var graphqlDocument = /* @__PURE__ */ __name((binding, selection = binding.selection) => {
|
|
31818
31906
|
const variables = Object.entries(binding.variables);
|
|
31819
31907
|
const declared = variables.length ? `(${variables.map(([name, type]) => `$${name}: ${type}`).join(", ")})` : "";
|
|
@@ -31822,7 +31910,7 @@ var graphqlDocument = /* @__PURE__ */ __name((binding, selection = binding.selec
|
|
|
31822
31910
|
return `${binding.operation} ${binding.field[0]?.toUpperCase()}${binding.field.slice(1)}${declared} { ${binding.field}${passed}${inner} }`;
|
|
31823
31911
|
}, "graphqlDocument");
|
|
31824
31912
|
|
|
31825
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
31913
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/openapi.js
|
|
31826
31914
|
var IGNORED = /* @__PURE__ */ new Set([
|
|
31827
31915
|
"readOnly",
|
|
31828
31916
|
"example",
|
|
@@ -31866,7 +31954,7 @@ var KNOWN = /* @__PURE__ */ new Set([
|
|
|
31866
31954
|
]);
|
|
31867
31955
|
var LARGEST_EXAMPLE = 8 * 1024;
|
|
31868
31956
|
|
|
31869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/cli/bot/api-input.js
|
|
31870
31958
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
31871
31959
|
|
|
31872
31960
|
// node_modules/.pnpm/lossless-json@4.3.3/node_modules/lossless-json/lib/esm/utils.js
|
|
@@ -32553,7 +32641,7 @@ function resolveSpace(space) {
|
|
|
32553
32641
|
}
|
|
32554
32642
|
__name(resolveSpace, "resolveSpace");
|
|
32555
32643
|
|
|
32556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/cli/bot/api-input.js
|
|
32557
32645
|
var RENAMED = { timeout: "poll-timeout" };
|
|
32558
32646
|
var apiFlagOf = /* @__PURE__ */ __name((name) => RENAMED[name] ?? name.replace(/_/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), "apiFlagOf");
|
|
32559
32647
|
var apiOptionKey = /* @__PURE__ */ __name((name) => apiFlagOf(name).replace(/-([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "apiOptionKey");
|
|
@@ -32691,7 +32779,7 @@ var flagValue = /* @__PURE__ */ __name((operation, name, raw, type) => {
|
|
|
32691
32779
|
return raw;
|
|
32692
32780
|
}, "flagValue");
|
|
32693
32781
|
|
|
32694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/cli/service-api-manifest.js
|
|
32695
32783
|
var manifestBaseUrl = /* @__PURE__ */ __name((manifest, given, variables = {}) => {
|
|
32696
32784
|
const server = manifest.servers?.[0];
|
|
32697
32785
|
if (given === void 0 && !server)
|
|
@@ -32769,7 +32857,7 @@ var underBase = /* @__PURE__ */ __name((url, baseUrl) => {
|
|
|
32769
32857
|
const prefix = base.pathname.endsWith("/") ? base.pathname : `${base.pathname}/`;
|
|
32770
32858
|
return url.origin === base.origin && (url.pathname === base.pathname || url.pathname.startsWith(prefix));
|
|
32771
32859
|
}, "underBase");
|
|
32772
|
-
var
|
|
32860
|
+
var answerAt = /* @__PURE__ */ __name((value, path2) => path2 === "" ? value : path2.split(".").reduce((inner, key) => inner && typeof inner === "object" ? inner[key] : void 0, value), "answerAt");
|
|
32773
32861
|
var numberOf = /* @__PURE__ */ __name((value) => {
|
|
32774
32862
|
const number3 = typeof value === "number" ? value : typeof value === "string" ? Number(value) : Number(String(value));
|
|
32775
32863
|
return Number.isFinite(number3) ? number3 : void 0;
|
|
@@ -32783,18 +32871,18 @@ var withValue = /* @__PURE__ */ __name((input, parameter, value) => {
|
|
|
32783
32871
|
return { ...input, fields: fields2, body: apiJson({ ...body, [parameter.name]: value }) };
|
|
32784
32872
|
}, "withValue");
|
|
32785
32873
|
var nextPage = /* @__PURE__ */ __name((pagination, input, answer, headers) => {
|
|
32786
|
-
const listed2 = pagination.items === void 0 ? [answer] :
|
|
32874
|
+
const listed2 = pagination.items === void 0 ? [answer] : answerAt(answer, pagination.items);
|
|
32787
32875
|
const items = Array.isArray(listed2) ? listed2 : [];
|
|
32788
32876
|
switch (pagination.style) {
|
|
32789
32877
|
case "cursor": {
|
|
32790
|
-
const cursor =
|
|
32791
|
-
const more = pagination.hasMore === void 0 ||
|
|
32878
|
+
const cursor = answerAt(answer, pagination.next);
|
|
32879
|
+
const more = pagination.hasMore === void 0 || answerAt(answer, pagination.hasMore) !== false;
|
|
32792
32880
|
return more && typeof cursor === "string" && cursor !== "" ? { items, next: { input: withValue(input, pagination.cursor, cursor) } } : { items };
|
|
32793
32881
|
}
|
|
32794
32882
|
case "offset":
|
|
32795
32883
|
case "page": {
|
|
32796
32884
|
const parameter = pagination.style === "offset" ? pagination.offset : pagination.page;
|
|
32797
|
-
const total = pagination.total === void 0 ? void 0 : numberOf(
|
|
32885
|
+
const total = pagination.total === void 0 ? void 0 : numberOf(answerAt(answer, pagination.total));
|
|
32798
32886
|
const current = numberOf(parameterValue(input, parameter)) ?? (pagination.style === "offset" ? 0 : pagination.start ?? 1);
|
|
32799
32887
|
const next = pagination.style === "offset" ? current + items.length : current + 1;
|
|
32800
32888
|
const pages = pagination.style === "page" && pagination.pagesHeader !== void 0 ? numberOf(headers?.get(pagination.pagesHeader) ?? void 0) : void 0;
|
|
@@ -32802,16 +32890,16 @@ var nextPage = /* @__PURE__ */ __name((pagination, input, answer, headers) => {
|
|
|
32802
32890
|
return last ? { items } : { items, next: { input: withValue(input, parameter, next) } };
|
|
32803
32891
|
}
|
|
32804
32892
|
case "link": {
|
|
32805
|
-
const url =
|
|
32893
|
+
const url = answerAt(answer, pagination.next);
|
|
32806
32894
|
return typeof url === "string" && url !== "" ? { items, next: { url } } : { items };
|
|
32807
32895
|
}
|
|
32808
32896
|
}
|
|
32809
32897
|
}, "nextPage");
|
|
32810
32898
|
|
|
32811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/manifest/source.js
|
|
32812
32900
|
var OVERLAP_MS = 10 * 6e4;
|
|
32813
32901
|
|
|
32814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
32815
32903
|
import { readFileSync as readFileSync4, renameSync, writeFileSync as writeFileSync3 } from "node:fs";
|
|
32816
32904
|
import { join as join12 } from "node:path";
|
|
32817
32905
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -32862,15 +32950,15 @@ var Pacer = class {
|
|
|
32862
32950
|
const tat = Number(file2.tat);
|
|
32863
32951
|
if (!Number.isFinite(tat))
|
|
32864
32952
|
return 0;
|
|
32865
|
-
const
|
|
32866
|
-
return Number.isFinite(
|
|
32953
|
+
const at2 = Number(file2.at);
|
|
32954
|
+
return Number.isFinite(at2) && at2 > now ? now + Math.max(0, tat - at2) : tat;
|
|
32867
32955
|
} catch {
|
|
32868
32956
|
return 0;
|
|
32869
32957
|
}
|
|
32870
32958
|
}
|
|
32871
|
-
write(tat,
|
|
32959
|
+
write(tat, at2) {
|
|
32872
32960
|
const temporary = `${this.path}.${process.pid}.tmp`;
|
|
32873
|
-
writeFileSync3(temporary, JSON.stringify({ tat, at:
|
|
32961
|
+
writeFileSync3(temporary, JSON.stringify({ tat, at: at2 }), { mode: 384 });
|
|
32874
32962
|
renameSync(temporary, this.path);
|
|
32875
32963
|
}
|
|
32876
32964
|
};
|
|
@@ -32879,9 +32967,9 @@ var LONGEST_PACE_WAIT_MS = 5 * 6e4;
|
|
|
32879
32967
|
var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
32880
32968
|
const { name, operation, warn } = options;
|
|
32881
32969
|
const now = options.now ?? Date.now;
|
|
32882
|
-
let
|
|
32970
|
+
let at2 = now();
|
|
32883
32971
|
try {
|
|
32884
|
-
|
|
32972
|
+
at2 = await pacer.reserve();
|
|
32885
32973
|
} catch (error) {
|
|
32886
32974
|
warn?.(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
|
|
32887
32975
|
event: "warning",
|
|
@@ -32889,11 +32977,11 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
32889
32977
|
operation
|
|
32890
32978
|
});
|
|
32891
32979
|
}
|
|
32892
|
-
const waitMs =
|
|
32980
|
+
const waitMs = at2 - now();
|
|
32893
32981
|
if (waitMs <= 0)
|
|
32894
32982
|
return;
|
|
32895
32983
|
if (waitMs > (options.longestWaitMs ?? LONGEST_PACE_WAIT_MS))
|
|
32896
|
-
throw new CliError("rate_limited", `this profile's next request to ${name} has to wait ${Math.ceil(waitMs / 1e3)} s more \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(
|
|
32984
|
+
throw new CliError("rate_limited", `this profile's next request to ${name} has to wait ${Math.ceil(waitMs / 1e3)} s more \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at2).toISOString(), remembered: true });
|
|
32897
32985
|
if (waitMs >= ANNOUNCE_WAIT_MS) {
|
|
32898
32986
|
const seconds = Math.ceil(waitMs / 1e3);
|
|
32899
32987
|
warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
|
|
@@ -32906,10 +32994,10 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
32906
32994
|
await (options.sleep ?? ((ms) => new Promise((resolve6) => setTimeout(resolve6, ms))))(waitMs);
|
|
32907
32995
|
}, "waitForTurn");
|
|
32908
32996
|
|
|
32909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
32910
32998
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
32911
32999
|
|
|
32912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
32913
33001
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync5, renameSync as renameSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
32914
33002
|
import { dirname as dirname6, join as join13 } from "node:path";
|
|
32915
33003
|
var MOST_DEADLINES = 50;
|
|
@@ -32993,7 +33081,7 @@ var FloodMemory = class {
|
|
|
32993
33081
|
}
|
|
32994
33082
|
};
|
|
32995
33083
|
|
|
32996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
32997
33085
|
import { appendFileSync, mkdirSync as mkdirSync4, readFileSync as readFileSync6 } from "node:fs";
|
|
32998
33086
|
import { dirname as dirname7, join as join14 } from "node:path";
|
|
32999
33087
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join14(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
@@ -33019,12 +33107,12 @@ var SendJournal = class {
|
|
|
33019
33107
|
return withFileLockAsync(this.path, "the send journal", body);
|
|
33020
33108
|
}
|
|
33021
33109
|
append(entry) {
|
|
33022
|
-
const { at:
|
|
33110
|
+
const { at: at2, ...attributes } = entry;
|
|
33023
33111
|
const { runId, command, traceId } = currentRun();
|
|
33024
33112
|
const record2 = logRecordOf({
|
|
33025
33113
|
severity: entry.outcome === "sent" || entry.outcome === "reserved" ? "info" : "warn",
|
|
33026
33114
|
event: logAttributes({ event: "send.recorded", ...attributes }),
|
|
33027
|
-
time:
|
|
33115
|
+
time: at2,
|
|
33028
33116
|
runId,
|
|
33029
33117
|
...traceId === void 0 ? {} : { traceId },
|
|
33030
33118
|
command,
|
|
@@ -33072,7 +33160,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
33072
33160
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
33073
33161
|
}, "withSendId");
|
|
33074
33162
|
|
|
33075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
33076
33164
|
import { existsSync, readFileSync as readFileSync7, rmSync as rmSync2 } from "node:fs";
|
|
33077
33165
|
import { join as join15 } from "node:path";
|
|
33078
33166
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join15(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -33184,7 +33272,7 @@ var RecipientList = class {
|
|
|
33184
33272
|
}
|
|
33185
33273
|
};
|
|
33186
33274
|
|
|
33187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
33188
33276
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
33189
33277
|
var countsTowardLimit = /* @__PURE__ */ __name(({ kind: kind2 = "message", action: action2, notify }) => kind2 === "message" || kind2 === "forward" || kind2 === "edit" || kind2 === "delete" || kind2 === "pin" && notify === true || action2 === "create" || action2 === "members.add" || action2 === "requests.accept" || action2 === "join" || action2 === "contact-import", "countsTowardLimit");
|
|
33190
33278
|
var weightOf = /* @__PURE__ */ __name(({ kind: kind2 = "message", action: action2, count: count3, people }) => kind2 === "delete" || kind2 === "message" && action2 === void 0 ? Math.max(1, count3 ?? 1) : action2 === "create" || action2 === "members.add" || action2 === "requests.accept" || action2 === "contact-import" ? Math.max(1, people ?? count3 ?? 1) : 1, "weightOf");
|
|
@@ -33241,10 +33329,10 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
33241
33329
|
if (count3 > sendsPerHour) {
|
|
33242
33330
|
throw new CliError("rate_limited", `${count3} at once is more than the hourly limit of profile ${profile} (sendsPerHour ${sendsPerHour}) \u2014 do fewer at a time`);
|
|
33243
33331
|
}
|
|
33244
|
-
const
|
|
33245
|
-
if (Number.isNaN(
|
|
33332
|
+
const at2 = request.scheduledFor ? Date.parse(request.scheduledFor) : now().getTime();
|
|
33333
|
+
if (Number.isNaN(at2))
|
|
33246
33334
|
throw new CliError("validation_error", `"${request.scheduledFor}" is not a time to send at \u2014 use ISO 8601`);
|
|
33247
|
-
const counted2 = entries.filter(countsTowardLimit).filter((entry) => entry.outcome === "sent" || entry.outcome === "outcome_unknown" || entry.outcome === "reserved").filter((entry) => Math.abs(timeOf(entry) -
|
|
33335
|
+
const counted2 = entries.filter(countsTowardLimit).filter((entry) => entry.outcome === "sent" || entry.outcome === "outcome_unknown" || entry.outcome === "reserved").filter((entry) => Math.abs(timeOf(entry) - at2) < HOUR_MS);
|
|
33248
33336
|
const unsure = /* @__PURE__ */ __name((entry) => entry.outcome === "outcome_unknown", "unsure");
|
|
33249
33337
|
const same2 = /* @__PURE__ */ __name((a, b) => a.sendId !== void 0 && a.sendId === b.sendId && a.chatId === b.chatId, "same");
|
|
33250
33338
|
const last = [...counted2].reverse().find((entry) => same2(entry, { chatId, sendId }));
|
|
@@ -33264,7 +33352,7 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
33264
33352
|
});
|
|
33265
33353
|
const nextMs = (opening?.time ?? 0) + HOUR_MS;
|
|
33266
33354
|
const next = new Date(nextMs).toISOString();
|
|
33267
|
-
throw new CliError("rate_limited", `profile ${profile} has sent ${used} messages in the hour around ${new Date(
|
|
33355
|
+
throw new CliError("rate_limited", `profile ${profile} has sent ${used} messages in the hour around ${new Date(at2).toISOString()}, and its limit is ${sendsPerHour} (sendsPerHour) \u2014 the next send is possible at ${next}`, { retry_after_ms: nextMs - now().getTime(), retry_at: next });
|
|
33268
33356
|
}
|
|
33269
33357
|
return true;
|
|
33270
33358
|
}, "withinLimit");
|
|
@@ -33372,7 +33460,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
33372
33460
|
}), "guardFor");
|
|
33373
33461
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
33374
33462
|
|
|
33375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/keyed-guard.js
|
|
33376
33464
|
var keyedGuard = /* @__PURE__ */ __name((build, ask2, levelOf, extra) => {
|
|
33377
33465
|
let question;
|
|
33378
33466
|
let answered = false;
|
|
@@ -33415,7 +33503,7 @@ var keyedGuard = /* @__PURE__ */ __name((build, ask2, levelOf, extra) => {
|
|
|
33415
33503
|
};
|
|
33416
33504
|
}, "keyedGuard");
|
|
33417
33505
|
|
|
33418
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/writer.js
|
|
33419
33507
|
var CRM_ASSIGN_OTHERS_KEY = "crm.assign-others";
|
|
33420
33508
|
var CRM_WRITE_DEFAULTS = {
|
|
33421
33509
|
"deals.delete": "ask",
|
|
@@ -33423,7 +33511,7 @@ var CRM_WRITE_DEFAULTS = {
|
|
|
33423
33511
|
[CRM_ASSIGN_OTHERS_KEY]: "deny"
|
|
33424
33512
|
};
|
|
33425
33513
|
|
|
33426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/viewer.js
|
|
33427
33515
|
var VIEWERS = "crm:viewers";
|
|
33428
33516
|
var viewersOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
33429
33517
|
try {
|
|
@@ -33466,7 +33554,7 @@ var withReadableDeal = /* @__PURE__ */ __name(async (store, viewers, row) => {
|
|
|
33466
33554
|
return seen ? row : { ...row, deal: null };
|
|
33467
33555
|
}, "withReadableDeal");
|
|
33468
33556
|
|
|
33469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/crm/sync.js
|
|
33470
33558
|
var CLOCK_MARGIN = 60 * 6e4;
|
|
33471
33559
|
var GAPS = "crm:gaps";
|
|
33472
33560
|
var crmGapsOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
@@ -33478,7 +33566,7 @@ var crmGapsOf = /* @__PURE__ */ __name(async (store, account) => {
|
|
|
33478
33566
|
}
|
|
33479
33567
|
}, "crmGapsOf");
|
|
33480
33568
|
|
|
33481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/search/question-period.js
|
|
33482
33570
|
var DAY5 = 864e5;
|
|
33483
33571
|
var SPAN = { start: 0, end: 0 };
|
|
33484
33572
|
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
@@ -33508,24 +33596,24 @@ var weekDays = /* @__PURE__ */ __name((day2) => {
|
|
|
33508
33596
|
}, "weekDays");
|
|
33509
33597
|
var yearDays = /* @__PURE__ */ __name((year) => [Date.UTC(year, 0, 1), Date.UTC(year, 11, 31)], "yearDays");
|
|
33510
33598
|
var unitDays = /* @__PURE__ */ __name((unit, day2) => {
|
|
33511
|
-
const
|
|
33599
|
+
const at2 = new Date(day2);
|
|
33512
33600
|
if (/^(?:day|дн|день)/iu.test(unit))
|
|
33513
33601
|
return [day2, day2];
|
|
33514
33602
|
if (/^(?:week|недел)/iu.test(unit))
|
|
33515
33603
|
return weekDays(day2);
|
|
33516
33604
|
if (/^(?:month|месяц)/iu.test(unit))
|
|
33517
|
-
return monthDays(
|
|
33518
|
-
return yearDays(
|
|
33605
|
+
return monthDays(at2.getUTCFullYear(), at2.getUTCMonth());
|
|
33606
|
+
return yearDays(at2.getUTCFullYear());
|
|
33519
33607
|
}, "unitDays");
|
|
33520
33608
|
var unitsBack = /* @__PURE__ */ __name((unit, count3, today) => {
|
|
33521
|
-
const
|
|
33609
|
+
const at2 = new Date(today);
|
|
33522
33610
|
if (/^(?:day|дн|день)/iu.test(unit))
|
|
33523
33611
|
return today - count3 * DAY5;
|
|
33524
33612
|
if (/^(?:week|недел)/iu.test(unit))
|
|
33525
33613
|
return today - 7 * count3 * DAY5;
|
|
33526
33614
|
if (/^(?:month|месяц)/iu.test(unit))
|
|
33527
|
-
return Date.UTC(
|
|
33528
|
-
return Date.UTC(
|
|
33615
|
+
return Date.UTC(at2.getUTCFullYear(), at2.getUTCMonth() - count3, 1);
|
|
33616
|
+
return Date.UTC(at2.getUTCFullYear() - count3, 0, 1);
|
|
33529
33617
|
}, "unitsBack");
|
|
33530
33618
|
var RULES = [
|
|
33531
33619
|
[
|
|
@@ -33603,9 +33691,9 @@ var questionPeriod = /* @__PURE__ */ __name((text3, now, zone) => {
|
|
|
33603
33691
|
};
|
|
33604
33692
|
}, "questionPeriod");
|
|
33605
33693
|
|
|
33606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33607
33695
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33608
|
-
var iso = /* @__PURE__ */ __name((
|
|
33696
|
+
var iso = /* @__PURE__ */ __name((at2) => at2 === null ? null : new Date(at2).toISOString(), "iso");
|
|
33609
33697
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
33610
33698
|
const held = await store.accounts.storedAccounts();
|
|
33611
33699
|
return held.filter((one2) => accounts.some(({ provider, account }) => one2.provider === provider && one2.account === account)).map(({ id: id3 }) => String(id3));
|
|
@@ -33721,7 +33809,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
33721
33809
|
};
|
|
33722
33810
|
}, "searchEvents");
|
|
33723
33811
|
|
|
33724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
33725
33813
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
33726
33814
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
33727
33815
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -33751,7 +33839,7 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words4, anyWo
|
|
|
33751
33839
|
};
|
|
33752
33840
|
}, "searchBusiness");
|
|
33753
33841
|
|
|
33754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
33755
33843
|
var MOST_HITS_PER_MEETING = 3;
|
|
33756
33844
|
var PAGE_ROWS = 200;
|
|
33757
33845
|
var MOST_PAGES = 25;
|
|
@@ -33979,7 +34067,7 @@ var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
|
33979
34067
|
foundBy: ["title"]
|
|
33980
34068
|
}), "titleItem");
|
|
33981
34069
|
|
|
33982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-harder.js
|
|
33983
34071
|
var SECTION2 = "search_harder";
|
|
33984
34072
|
var HARDER_MODELS = {
|
|
33985
34073
|
anthropic: "claude-haiku-5-5",
|
|
@@ -34241,7 +34329,7 @@ var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { laterPage, a
|
|
|
34241
34329
|
};
|
|
34242
34330
|
}, "reorderHarder");
|
|
34243
34331
|
|
|
34244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34245
34333
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm", "business", "meetings"];
|
|
34246
34334
|
var refusal = /* @__PURE__ */ __name((error, text3) => {
|
|
34247
34335
|
const { reason, span } = error.details ?? {};
|
|
@@ -34362,17 +34450,17 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
34362
34450
|
skipped.push(one2);
|
|
34363
34451
|
accounts.push(...read.map(({ provider, account: account2 }) => ({ resource: kind2, provider, account: account2 })));
|
|
34364
34452
|
const itemOf3 = /* @__PURE__ */ __name((hit, foundBy) => {
|
|
34365
|
-
const
|
|
34453
|
+
const at2 = parseLocator(hit.locator);
|
|
34366
34454
|
return {
|
|
34367
34455
|
kind: kind2 === "mail" ? "mail" : "message",
|
|
34368
34456
|
ref: hit.locator,
|
|
34369
|
-
provider:
|
|
34370
|
-
account:
|
|
34457
|
+
provider: at2.provider,
|
|
34458
|
+
account: at2.account,
|
|
34371
34459
|
title: hit.chatTitle,
|
|
34372
34460
|
timestamp: hit.timestamp,
|
|
34373
34461
|
text: hit.excerpt ?? excerpt(hit.text ?? "", request.text),
|
|
34374
34462
|
from: hit.email?.from ? { name: hit.email.from.name ?? hit.email.from.address, ref: hit.email.from.ref } : { name: hit.senderName, ref: null },
|
|
34375
|
-
senderIsMe: senderIsMe(hit,
|
|
34463
|
+
senderIsMe: senderIsMe(hit, at2.account),
|
|
34376
34464
|
...hit.email ? { email: hit.email } : {},
|
|
34377
34465
|
attachments: hitFiles(hit.attachments),
|
|
34378
34466
|
foundBy
|
|
@@ -34680,13 +34768,13 @@ var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
|
34680
34768
|
if (!period)
|
|
34681
34769
|
return ordered;
|
|
34682
34770
|
const inside2 = /* @__PURE__ */ __name(({ timestamp: timestamp2 }) => {
|
|
34683
|
-
const
|
|
34684
|
-
return
|
|
34771
|
+
const at2 = timestamp2 === null ? Number.NaN : Date.parse(timestamp2);
|
|
34772
|
+
return at2 >= period.from && at2 < period.to;
|
|
34685
34773
|
}, "inside");
|
|
34686
34774
|
return ordered.map((item2, rank) => ({ item: item2, score: 1 - rank / PERIOD_DEPTH + (inside2(item2) ? PERIOD_BOOST : 0) })).sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
34687
34775
|
}, "insidePeriodFirst");
|
|
34688
34776
|
|
|
34689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34690
34778
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34691
34779
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34692
34780
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34877,7 +34965,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34877
34965
|
return { report, sources };
|
|
34878
34966
|
}, "searchServer");
|
|
34879
34967
|
|
|
34880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34881
34969
|
var DELETE_AT_ONCE = 10;
|
|
34882
34970
|
var atOnce = /* @__PURE__ */ __name((ids) => {
|
|
34883
34971
|
if (ids.length > DELETE_AT_ONCE)
|
|
@@ -35139,7 +35227,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35139
35227
|
}), void 0, validate === void 0 || threadId === void 0 ? void 0 : () => validate(chatId, threadId, { ...replyTo === void 0 ? {} : { replyTo } }));
|
|
35140
35228
|
return { operationId, chatId, saved: true };
|
|
35141
35229
|
}, "saveDraft"),
|
|
35142
|
-
send: /* @__PURE__ */ __name(async ({ chat, text: typed, sendId, replyTo: typedReplyTo, threadId: typedThread, silent, noPreview, markdown: markdown2, html: html2, at:
|
|
35230
|
+
send: /* @__PURE__ */ __name(async ({ chat, text: typed, sendId, replyTo: typedReplyTo, threadId: typedThread, silent, noPreview, markdown: markdown2, html: html2, at: at2, attachments = [], key, origin, spoiler, captionAbove, sendAs, commentTo, sticker, stickerFile }) => {
|
|
35143
35231
|
const stickers = (sticker === void 0 ? 0 : 1) + (stickerFile === void 0 ? 0 : 1);
|
|
35144
35232
|
if (stickers > 0 && (stickers > 1 || typed.trim() !== "" || attachments.length > 0 || markdown2 || html2))
|
|
35145
35233
|
throw new CliError("validation_error", "a sticker goes alone \u2014 no text, no file, no photo");
|
|
@@ -35148,7 +35236,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35148
35236
|
const media = { ...spoiler ? { spoiler } : {}, ...captionAbove ? { captionAbove } : {} };
|
|
35149
35237
|
checkMediaOptions(deps.messenger, Object.keys(media), attachments.length);
|
|
35150
35238
|
const connection = await deps.connection();
|
|
35151
|
-
if (
|
|
35239
|
+
if (at2 !== void 0 && sendId !== void 0) {
|
|
35152
35240
|
throw new CliError("validation_error", "a scheduled send is never repeated: it would be scheduled twice \u2014 look in `messages scheduled` instead");
|
|
35153
35241
|
}
|
|
35154
35242
|
const prepared = await formatted(connection, typed, { markdown: markdown2, html: html2 });
|
|
@@ -35176,7 +35264,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35176
35264
|
...replyTo === void 0 ? {} : { replyTo },
|
|
35177
35265
|
...threadId === void 0 ? {} : { threadId },
|
|
35178
35266
|
...sendAs === void 0 ? {} : { sendAs },
|
|
35179
|
-
...
|
|
35267
|
+
...at2 === void 0 ? {} : { scheduledFor: at2 },
|
|
35180
35268
|
...key === void 0 ? {} : { key },
|
|
35181
35269
|
...origin === void 0 ? {} : { origin },
|
|
35182
35270
|
...attachments.length === 0 && stickerFile === void 0 ? {} : {
|
|
@@ -35194,7 +35282,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35194
35282
|
...silent ? { silent } : {},
|
|
35195
35283
|
...noPreview ? { noPreview } : {},
|
|
35196
35284
|
...spans.length > 0 ? { formatting: spans } : {},
|
|
35197
|
-
...
|
|
35285
|
+
...at2 === void 0 ? {} : { at: at2 },
|
|
35198
35286
|
...attachments.length === 0 ? {} : { attachments },
|
|
35199
35287
|
...sticker === void 0 ? {} : { sticker },
|
|
35200
35288
|
...stickerFile === void 0 ? {} : { stickerFile },
|
|
@@ -35203,8 +35291,8 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35203
35291
|
}), (sent) => sentIds(chatId, sent.message), validate === void 0 || threadId === void 0 ? void 0 : () => validate(chatId, threadId, { ...replyTo === void 0 ? {} : { replyTo } }));
|
|
35204
35292
|
return { ...done2, operationId: id3 };
|
|
35205
35293
|
} catch (error) {
|
|
35206
|
-
if (
|
|
35207
|
-
throw new CliError("outcome_unknown", "no answer \u2014 the message may have been scheduled. Look in `messages scheduled` before anything else; never send it again with --operation-id", { scheduled_for:
|
|
35294
|
+
if (at2 !== void 0 && codeOf(error) === "outcome_unknown") {
|
|
35295
|
+
throw new CliError("outcome_unknown", "no answer \u2014 the message may have been scheduled. Look in `messages scheduled` before anything else; never send it again with --operation-id", { scheduled_for: at2 });
|
|
35208
35296
|
}
|
|
35209
35297
|
throw error;
|
|
35210
35298
|
}
|
|
@@ -35241,8 +35329,8 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35241
35329
|
await guardedWrite(guard, { operationId, chatId, kind: "delete", key: "messages.scheduled.cancel", count: ids.length }, () => cancel(chatId, ids));
|
|
35242
35330
|
return { operationId, chatId, cancelled: ids };
|
|
35243
35331
|
}, "cancelScheduled"),
|
|
35244
|
-
editScheduled: /* @__PURE__ */ __name(async ({ chat, id: id3, text: typed, markdown: markdown2, html: html2, at:
|
|
35245
|
-
if (typed === void 0 &&
|
|
35332
|
+
editScheduled: /* @__PURE__ */ __name(async ({ chat, id: id3, text: typed, markdown: markdown2, html: html2, at: at2 }) => {
|
|
35333
|
+
if (typed === void 0 && at2 === void 0)
|
|
35246
35334
|
throw new CliError("validation_error", "nothing to change \u2014 give the new text, --at-time, or both");
|
|
35247
35335
|
const connection = await deps.connection();
|
|
35248
35336
|
const edit = capability(connection, "editScheduled", "edit a scheduled message");
|
|
@@ -35251,7 +35339,7 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35251
35339
|
if (change !== void 0 && change.text.trim() === "")
|
|
35252
35340
|
throw new CliError("validation_error", "no new text \u2014 the marks leave nothing");
|
|
35253
35341
|
const { chatId, found: [current] } = await waiting(connection, chat, [id3]);
|
|
35254
|
-
const scheduledFor =
|
|
35342
|
+
const scheduledFor = at2 ?? current?.scheduledFor ?? current?.timestamp;
|
|
35255
35343
|
if (scheduledFor === void 0)
|
|
35256
35344
|
throw new CliError("invalid_response", "the scheduled message has no time");
|
|
35257
35345
|
const operationId = newOperationId();
|
|
@@ -35377,7 +35465,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35377
35465
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35378
35466
|
}, "checkMediaOptions");
|
|
35379
35467
|
|
|
35380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35381
35469
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35382
35470
|
var RULES2 = {
|
|
35383
35471
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -35392,7 +35480,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2
|
|
|
35392
35480
|
return fields2.length ? [{ tag, score: fields2.length / 3, fields: fields2 }] : [];
|
|
35393
35481
|
}), "classifyChannel");
|
|
35394
35482
|
|
|
35395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35396
35484
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35397
35485
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35398
35486
|
const store = await deps.store();
|
|
@@ -35478,7 +35566,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35478
35566
|
};
|
|
35479
35567
|
}, "metadataService");
|
|
35480
35568
|
|
|
35481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
35482
35570
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
35483
35571
|
var LINK2 = /https?:\/\/\S+/i;
|
|
35484
35572
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -35539,10 +35627,10 @@ var floodOf = /* @__PURE__ */ __name((messages, flood) => {
|
|
|
35539
35627
|
if (message.senderId === null)
|
|
35540
35628
|
continue;
|
|
35541
35629
|
const times = bySender.get(message.senderId) ?? [];
|
|
35542
|
-
const
|
|
35543
|
-
times.push(
|
|
35630
|
+
const at2 = Date.parse(message.timestamp);
|
|
35631
|
+
times.push(at2);
|
|
35544
35632
|
bySender.set(message.senderId, times);
|
|
35545
|
-
if (times.filter((time) =>
|
|
35633
|
+
if (times.filter((time) => at2 - time < window2).length > flood.messages)
|
|
35546
35634
|
over.add(message.id);
|
|
35547
35635
|
}
|
|
35548
35636
|
return over;
|
|
@@ -35666,7 +35754,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
35666
35754
|
}, "nextPoint");
|
|
35667
35755
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
35668
35756
|
|
|
35669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
35670
35758
|
import { existsSync as existsSync2, readdirSync, readFileSync as readFileSync8 } from "node:fs";
|
|
35671
35759
|
import { join as join16 } from "node:path";
|
|
35672
35760
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -35783,9 +35871,9 @@ var ModerationRules = class {
|
|
|
35783
35871
|
checkedUntil(chatId) {
|
|
35784
35872
|
return this.#file().checkedUntil?.[chatId];
|
|
35785
35873
|
}
|
|
35786
|
-
markChecked(chatId,
|
|
35874
|
+
markChecked(chatId, at2) {
|
|
35787
35875
|
const saved = this.#file();
|
|
35788
|
-
this.#write({ ...saved, checkedUntil: { ...saved.checkedUntil, [chatId]:
|
|
35876
|
+
this.#write({ ...saved, checkedUntil: { ...saved.checkedUntil, [chatId]: at2 } });
|
|
35789
35877
|
}
|
|
35790
35878
|
#file() {
|
|
35791
35879
|
if (!existsSync2(this.path))
|
|
@@ -35818,7 +35906,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
35818
35906
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
35819
35907
|
}, "assign");
|
|
35820
35908
|
|
|
35821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35822
35910
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35823
35911
|
var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
35824
35912
|
const { chatId, title, rules, point, since, dryRun } = run2;
|
|
@@ -35855,7 +35943,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
|
35855
35943
|
return { chatId, rows, notes };
|
|
35856
35944
|
}, "moderateWith");
|
|
35857
35945
|
|
|
35858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
35859
35947
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
35860
35948
|
const file2 = /* @__PURE__ */ __name(() => {
|
|
35861
35949
|
const env = deps.env ?? process.env;
|
|
@@ -35908,7 +35996,7 @@ var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
|
35908
35996
|
chatId,
|
|
35909
35997
|
title,
|
|
35910
35998
|
rules,
|
|
35911
|
-
point: { read: /* @__PURE__ */ __name((id3) => rules.checkedUntil(id3), "read"), write: /* @__PURE__ */ __name((id3,
|
|
35999
|
+
point: { read: /* @__PURE__ */ __name((id3) => rules.checkedUntil(id3), "read"), write: /* @__PURE__ */ __name((id3, at2) => rules.markChecked(id3, at2), "write") },
|
|
35912
36000
|
gather: /* @__PURE__ */ __name((from) => gather(connection, chatId, from), "gather"),
|
|
35913
36001
|
moderator: moderatorOf(connection, deps),
|
|
35914
36002
|
command: deps.messenger.app.command,
|
|
@@ -35940,7 +36028,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
35940
36028
|
}, "removePerson")
|
|
35941
36029
|
}), "moderatorOf");
|
|
35942
36030
|
|
|
35943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-meetings.js
|
|
35944
36032
|
var SCAN = 1e3;
|
|
35945
36033
|
var SNIPPET = 200;
|
|
35946
36034
|
var SNIPPET_ROWS = 6;
|
|
@@ -36005,7 +36093,7 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
36005
36093
|
return { items, total: newest.length, hasMore: cut || newest.length > limit };
|
|
36006
36094
|
}, "personMeetings");
|
|
36007
36095
|
|
|
36008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
36009
36097
|
var CONTEXT_MESSAGES2 = 10;
|
|
36010
36098
|
var CONTEXT_BYTES = 64 * 1024;
|
|
36011
36099
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -36047,7 +36135,7 @@ var mailWith = /* @__PURE__ */ __name(async (store, key, address, limit, since)
|
|
|
36047
36135
|
return { items, hasMore: emails.length > limit };
|
|
36048
36136
|
}, "mailWith");
|
|
36049
36137
|
var newestFirst = /* @__PURE__ */ __name((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp), "newestFirst");
|
|
36050
|
-
var iso2 = /* @__PURE__ */ __name((
|
|
36138
|
+
var iso2 = /* @__PURE__ */ __name((at2) => at2 === null ? null : new Date(at2).toISOString(), "iso");
|
|
36051
36139
|
var contextEvent = /* @__PURE__ */ __name((event2) => ({
|
|
36052
36140
|
ref: `event:${event2.id}`,
|
|
36053
36141
|
title: event2.title,
|
|
@@ -36311,10 +36399,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
36311
36399
|
};
|
|
36312
36400
|
}, "personMessages");
|
|
36313
36401
|
|
|
36314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
36315
36403
|
import { createHash as createHash10 } from "node:crypto";
|
|
36316
36404
|
|
|
36317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
36318
36406
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
36319
36407
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
36320
36408
|
const parsed = parseMeetingReference(reference);
|
|
@@ -36362,7 +36450,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
36362
36450
|
};
|
|
36363
36451
|
}, "resolveMeetingReference");
|
|
36364
36452
|
|
|
36365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
36366
36454
|
var hash = /* @__PURE__ */ __name((value) => createHash10("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36367
36455
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
36368
36456
|
if (signal?.aborted)
|
|
@@ -36561,7 +36649,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
36561
36649
|
return { ...packet, fingerprint: hash(packet) };
|
|
36562
36650
|
}, "readMeetingEvidence");
|
|
36563
36651
|
|
|
36564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
36565
36653
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
36566
36654
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
36567
36655
|
const requestedAccounts = options.accountIds;
|
|
@@ -36660,7 +36748,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
36660
36748
|
};
|
|
36661
36749
|
}, "personMeetingContext");
|
|
36662
36750
|
|
|
36663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
36664
36752
|
var PREPARE_BYTES = 96 * 1024;
|
|
36665
36753
|
var MEETINGS = 5;
|
|
36666
36754
|
var CUES = 3;
|
|
@@ -36783,7 +36871,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
36783
36871
|
}
|
|
36784
36872
|
}, "meetingsOf");
|
|
36785
36873
|
|
|
36786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
36787
36875
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
36788
36876
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
36789
36877
|
const held = await storeIfOpen(deps);
|
|
@@ -36853,14 +36941,14 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id3, title,
|
|
|
36853
36941
|
complete: false
|
|
36854
36942
|
})), "quiet");
|
|
36855
36943
|
|
|
36856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
36857
36945
|
var TIMELINE_ITEMS = 50;
|
|
36858
36946
|
var TIMELINE_MAX = 500;
|
|
36859
36947
|
var SCOPES = ["personal", "work"];
|
|
36860
36948
|
var cursorOf = /* @__PURE__ */ __name((row) => `before:${row.occurredAt}:${row.id}`, "cursorOf");
|
|
36861
36949
|
var boundOf = /* @__PURE__ */ __name((cursor) => {
|
|
36862
|
-
const [way,
|
|
36863
|
-
const bound2 = { at: Number(
|
|
36950
|
+
const [way, at2, id3, ...rest] = cursor.split(":");
|
|
36951
|
+
const bound2 = { at: Number(at2), id: Number(id3) };
|
|
36864
36952
|
if (way !== "before" || rest.length > 0 || !Number.isSafeInteger(bound2.at) || !Number.isSafeInteger(bound2.id))
|
|
36865
36953
|
throw new CliError("validation_error", `--cursor takes what page.next gave, before:<time>:<id> \u2014 not "${cursor}"`);
|
|
36866
36954
|
return bound2;
|
|
@@ -36915,7 +37003,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
36915
37003
|
};
|
|
36916
37004
|
}, "personTimeline");
|
|
36917
37005
|
|
|
36918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
36919
37007
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
36920
37008
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
36921
37009
|
const held = await storeIfOpen(deps);
|
|
@@ -37180,7 +37268,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
37180
37268
|
return rest;
|
|
37181
37269
|
}, "withoutPhone");
|
|
37182
37270
|
|
|
37183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37184
37272
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
37185
37273
|
id: note.id,
|
|
37186
37274
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -37224,7 +37312,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37224
37312
|
};
|
|
37225
37313
|
}, "privatePeopleService");
|
|
37226
37314
|
|
|
37227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37228
37316
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37229
37317
|
total: 0,
|
|
37230
37318
|
population: 0,
|
|
@@ -37480,7 +37568,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37480
37568
|
}, "evidence")
|
|
37481
37569
|
}), "rankingsService");
|
|
37482
37570
|
|
|
37483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37484
37572
|
var FIELDS2 = ["date", "chat", "kind", "muted"];
|
|
37485
37573
|
var WAITING_TAIL = 100;
|
|
37486
37574
|
var plainOnly = /* @__PURE__ */ __name((text3, command) => {
|
|
@@ -37614,7 +37702,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37614
37702
|
};
|
|
37615
37703
|
}, "replyStatsService");
|
|
37616
37704
|
|
|
37617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37618
37706
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
37619
37707
|
id: one2.id,
|
|
37620
37708
|
name: one2.name,
|
|
@@ -37740,7 +37828,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37740
37828
|
};
|
|
37741
37829
|
}, "searchesService");
|
|
37742
37830
|
|
|
37743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
37744
37832
|
var TAGGING_QUERY = {
|
|
37745
37833
|
entity: "tagging",
|
|
37746
37834
|
backend: "sql",
|
|
@@ -37824,7 +37912,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37824
37912
|
};
|
|
37825
37913
|
}, "tagsService");
|
|
37826
37914
|
|
|
37827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
37828
37916
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
37829
37917
|
var PERIOD_FIELD = "created";
|
|
37830
37918
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -37955,7 +38043,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
37955
38043
|
}));
|
|
37956
38044
|
}, "meetingNames");
|
|
37957
38045
|
|
|
37958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
37959
38047
|
var TASK_QUERY = {
|
|
37960
38048
|
entity: "task",
|
|
37961
38049
|
backend: "sql",
|
|
@@ -38408,7 +38496,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
38408
38496
|
}), "stats")
|
|
38409
38497
|
};
|
|
38410
38498
|
}, "tasksService");
|
|
38411
|
-
var iso3 = /* @__PURE__ */ __name((
|
|
38499
|
+
var iso3 = /* @__PURE__ */ __name((at2) => at2 === void 0 ? null : at2.toISOString(), "iso");
|
|
38412
38500
|
var taskItem2 = /* @__PURE__ */ __name((account, { task: task2, title, updatedAt, closeSuggestion = null }) => ({
|
|
38413
38501
|
ref: `task:${task2.id}`,
|
|
38414
38502
|
id: task2.id,
|
|
@@ -38455,7 +38543,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
38455
38543
|
};
|
|
38456
38544
|
}, "taskView");
|
|
38457
38545
|
|
|
38458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38459
38547
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38460
38548
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
38461
38549
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38654,7 +38742,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38654
38742
|
};
|
|
38655
38743
|
}, "topicsService");
|
|
38656
38744
|
|
|
38657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/business-context.js
|
|
38658
38746
|
var SECTION_LIMIT = 20;
|
|
38659
38747
|
var STORE_PAGE = 500;
|
|
38660
38748
|
var sectionOf = /* @__PURE__ */ __name((all, limit, next, { more = false, total = all.length, newest = false } = {}) => {
|
|
@@ -38785,7 +38873,7 @@ var coverageFor = /* @__PURE__ */ __name(async (store, base, scope) => {
|
|
|
38785
38873
|
}, "coverageFor");
|
|
38786
38874
|
var newestFirst2 = /* @__PURE__ */ __name((a, b) => (b.at ?? "").localeCompare(a.at ?? "") || a.ref.localeCompare(b.ref), "newestFirst");
|
|
38787
38875
|
|
|
38788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/call-stats.js
|
|
38789
38877
|
var callsOf = /* @__PURE__ */ __name((stored) => stored.map(callOf).filter((one2) => one2 !== null), "callsOf");
|
|
38790
38878
|
var readCallStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
38791
38879
|
const { timeZone, callbackWithinMs, missedLimit, ...selection } = request;
|
|
@@ -38816,7 +38904,7 @@ var readCallStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
38816
38904
|
};
|
|
38817
38905
|
}, "readCallStats");
|
|
38818
38906
|
|
|
38819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/communications.js
|
|
38820
38908
|
var MAIL_ROWS = 500;
|
|
38821
38909
|
var EVENT_ROWS2 = 1e3;
|
|
38822
38910
|
var RECORDED_ROWS = 100;
|
|
@@ -38884,12 +38972,12 @@ var communicationsOf = /* @__PURE__ */ __name(async (store, asked, scope, { sinc
|
|
|
38884
38972
|
if (!threads.has(email.emailThreadId))
|
|
38885
38973
|
threads.set(email.emailThreadId, (await store.mail.thread(email.emailThreadId))?.thread.externalId ?? null);
|
|
38886
38974
|
const thread = threads.get(email.emailThreadId);
|
|
38887
|
-
const
|
|
38975
|
+
const at2 = email.receivedAt ?? email.sentAt;
|
|
38888
38976
|
touch(mail, email.id, {
|
|
38889
38977
|
kind: "mail",
|
|
38890
38978
|
ref: formatLocator({ ...key, chat: thread ?? String(email.emailThreadId), message: email.externalId }),
|
|
38891
38979
|
title: email.subject,
|
|
38892
|
-
at:
|
|
38980
|
+
at: at2 === null ? null : new Date(at2).toISOString()
|
|
38893
38981
|
}, person.uid);
|
|
38894
38982
|
}
|
|
38895
38983
|
continue;
|
|
@@ -39002,7 +39090,7 @@ var personHistory = /* @__PURE__ */ __name(async (store, reference, { accounts,
|
|
|
39002
39090
|
};
|
|
39003
39091
|
}, "personHistory");
|
|
39004
39092
|
|
|
39005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/money-context.js
|
|
39006
39094
|
var invoiceLine = /* @__PURE__ */ __name((invoice, linkedBy) => ({
|
|
39007
39095
|
ref: invoice.ref,
|
|
39008
39096
|
title: invoice.title,
|
|
@@ -39074,7 +39162,7 @@ var moneyOf = /* @__PURE__ */ __name((rows, limit, next, complete) => {
|
|
|
39074
39162
|
};
|
|
39075
39163
|
}, "moneyOf");
|
|
39076
39164
|
|
|
39077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/organization-context.js
|
|
39078
39166
|
var dealLine = /* @__PURE__ */ __name((deal) => ({
|
|
39079
39167
|
ref: deal.ref,
|
|
39080
39168
|
kind: deal.kind,
|
|
@@ -39226,7 +39314,7 @@ var organizationContext = /* @__PURE__ */ __name(async (store, reference, { acco
|
|
|
39226
39314
|
};
|
|
39227
39315
|
}, "organizationContext");
|
|
39228
39316
|
|
|
39229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/deal-context.js
|
|
39230
39318
|
var DAY6 = 864e5;
|
|
39231
39319
|
var dealContext = /* @__PURE__ */ __name(async (store, reference, { accounts, limit = SECTION_LIMIT, now = Date.now(), deniedKinds = [], viewing = [] } = {}) => {
|
|
39232
39320
|
const scope = scopeOf4(accounts, deniedKinds, viewing);
|
|
@@ -39355,7 +39443,7 @@ var dealBrief = /* @__PURE__ */ __name((context2) => ({
|
|
|
39355
39443
|
notRead: context2.coverage.notRead
|
|
39356
39444
|
}), "dealBrief");
|
|
39357
39445
|
|
|
39358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
39359
39447
|
import { createHash as createHash11, randomUUID as randomUUID6 } from "node:crypto";
|
|
39360
39448
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
39361
39449
|
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -39429,7 +39517,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind: kind2, source, page,
|
|
|
39429
39517
|
return { ...content, id: randomUUID6(), fingerprint: hash2(content) };
|
|
39430
39518
|
}, "prepareEvidencePacket");
|
|
39431
39519
|
|
|
39432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
39433
39521
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before }, messenger = {}) => {
|
|
39434
39522
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
39435
39523
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -39449,7 +39537,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
39449
39537
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
39450
39538
|
}, "readEvidencePacket");
|
|
39451
39539
|
|
|
39452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
39453
39541
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
39454
39542
|
const { maxMessages, url, ...selecting } = request;
|
|
39455
39543
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -39488,7 +39576,7 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
39488
39576
|
};
|
|
39489
39577
|
}, "readMeetingLinks");
|
|
39490
39578
|
|
|
39491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-meaning.js
|
|
39492
39580
|
var bounded = /* @__PURE__ */ __name((value, maximum) => value === void 0 || Number.isSafeInteger(value) && value > 0 && value <= maximum, "bounded");
|
|
39493
39581
|
var validateMeetingModel = /* @__PURE__ */ __name((options) => {
|
|
39494
39582
|
if (typeof options.model !== "string" || !options.model.trim() || options.model.length > 1e3)
|
|
@@ -39519,9 +39607,9 @@ var validateMeetingEmbeddings = /* @__PURE__ */ __name((options) => {
|
|
|
39519
39607
|
}, "validateMeetingEmbeddings");
|
|
39520
39608
|
var loadApi = /* @__PURE__ */ __name(async () => {
|
|
39521
39609
|
const [model, combined, semantic] = await Promise.all([
|
|
39522
|
-
import("./meeting-model-
|
|
39523
|
-
import("./meeting-combined-
|
|
39524
|
-
import("./meeting-semantic-
|
|
39610
|
+
import("./meeting-model-R7QPDNZZ.js"),
|
|
39611
|
+
import("./meeting-combined-HEC25QPY.js"),
|
|
39612
|
+
import("./meeting-semantic-7WPLMBNT.js")
|
|
39525
39613
|
]);
|
|
39526
39614
|
return { ...model, ...combined, ...semantic };
|
|
39527
39615
|
}, "loadApi");
|
|
@@ -39619,10 +39707,10 @@ var meetingMeaning = /* @__PURE__ */ __name((store, accountId, options = {}) =>
|
|
|
39619
39707
|
};
|
|
39620
39708
|
}, "meetingMeaning");
|
|
39621
39709
|
|
|
39622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
39623
39711
|
import { createHash as createHash12 } from "node:crypto";
|
|
39624
39712
|
|
|
39625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
39626
39714
|
function invalid5(field, response = false) {
|
|
39627
39715
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
39628
39716
|
}
|
|
@@ -39741,7 +39829,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
39741
39829
|
}
|
|
39742
39830
|
}, "candidateCatalog");
|
|
39743
39831
|
|
|
39744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
39745
39833
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
39746
39834
|
const fixed = snapshotMeetingScope(scope);
|
|
39747
39835
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -39794,7 +39882,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
39794
39882
|
};
|
|
39795
39883
|
}, "createMeetingProjectCandidateReader");
|
|
39796
39884
|
|
|
39797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
39798
39886
|
import { createHash as createHash13 } from "node:crypto";
|
|
39799
39887
|
var scopeKeys = [
|
|
39800
39888
|
"accountId",
|
|
@@ -39929,7 +40017,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
39929
40017
|
};
|
|
39930
40018
|
}, "readMeetingProjectDiscovery");
|
|
39931
40019
|
|
|
39932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
39933
40021
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
39934
40022
|
const { limit, ...selecting } = request;
|
|
39935
40023
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -39937,7 +40025,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
39937
40025
|
return { ...review, selection };
|
|
39938
40026
|
}, "readMeetingReview");
|
|
39939
40027
|
|
|
39940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
39941
40029
|
var KIND = ["meetings-search"];
|
|
39942
40030
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
39943
40031
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -39967,7 +40055,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
39967
40055
|
};
|
|
39968
40056
|
}, "meetingSearchesService");
|
|
39969
40057
|
|
|
39970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
39971
40059
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
39972
40060
|
const { timeZone, maxRows, ...selecting } = request;
|
|
39973
40061
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -39990,7 +40078,7 @@ var readMeetingCounts = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
39990
40078
|
return { ...counts, selection };
|
|
39991
40079
|
}, "readMeetingCounts");
|
|
39992
40080
|
|
|
39993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-tags.js
|
|
39994
40082
|
var keyOf6 = /* @__PURE__ */ __name(async (store, accountId) => {
|
|
39995
40083
|
const owner = await store.meetings.account(accountId);
|
|
39996
40084
|
if (!owner)
|
|
@@ -40064,7 +40152,7 @@ var meetingTags = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
40064
40152
|
};
|
|
40065
40153
|
}, "meetingTags");
|
|
40066
40154
|
|
|
40067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/person-business.js
|
|
40068
40156
|
var personBusiness = /* @__PURE__ */ __name(async (store, uid, { limit = SECTION_LIMIT, scope = scopeOf4(void 0) } = {}) => {
|
|
40069
40157
|
const ref2 = `person:${uid}`;
|
|
40070
40158
|
const { edges, full } = await edgesOf(store, ref2, scope);
|
|
@@ -40122,7 +40210,7 @@ var canonicalPersonContext = /* @__PURE__ */ __name(async (store, reference, { a
|
|
|
40122
40210
|
};
|
|
40123
40211
|
}, "canonicalPersonContext");
|
|
40124
40212
|
|
|
40125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
40126
40214
|
import { createHash as createHash14 } from "node:crypto";
|
|
40127
40215
|
import { existsSync as existsSync3 } from "node:fs";
|
|
40128
40216
|
var useTextModel = /* @__PURE__ */ __name(async (id3, { env, command }) => {
|
|
@@ -40172,8 +40260,8 @@ var CustomModelRequest = strictObject({
|
|
|
40172
40260
|
chunksPerSecond: optional(number())
|
|
40173
40261
|
});
|
|
40174
40262
|
var invalid6 = /* @__PURE__ */ __name((what, issues) => {
|
|
40175
|
-
const
|
|
40176
|
-
return new CliError("validation_error", `${what}${
|
|
40263
|
+
const at2 = getDotPath(issues[0]);
|
|
40264
|
+
return new CliError("validation_error", `${what}${at2 ? ` ${at2}` : ""} ${issues[0].message}`);
|
|
40177
40265
|
}, "invalid");
|
|
40178
40266
|
var HUB = "https://huggingface.co";
|
|
40179
40267
|
var SMALL_FILE_MOST = 2e7;
|
|
@@ -40253,7 +40341,7 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id3, payload, { env, fetc
|
|
|
40253
40341
|
return { ...checked2.output, custom: true };
|
|
40254
40342
|
}, "addCustomTextModel");
|
|
40255
40343
|
|
|
40256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/account-groups.js
|
|
40257
40345
|
var SCOPES2 = ["personal", "work"];
|
|
40258
40346
|
var scopeOf5 = /* @__PURE__ */ __name((scope) => {
|
|
40259
40347
|
if (!SCOPES2.includes(scope))
|
|
@@ -40264,8 +40352,8 @@ var fail3 = /* @__PURE__ */ __name((code, message) => {
|
|
|
40264
40352
|
throw new CliError(code, message);
|
|
40265
40353
|
}, "fail");
|
|
40266
40354
|
var contextOf2 = /* @__PURE__ */ __name(({ store, account, app, env }) => listContextOf(store, account, app, void 0, env), "contextOf");
|
|
40267
|
-
var unlocked = /* @__PURE__ */ __name((
|
|
40268
|
-
const lock = groupLockOf(
|
|
40355
|
+
var unlocked = /* @__PURE__ */ __name((at2) => {
|
|
40356
|
+
const lock = groupLockOf(at2.app, at2.env);
|
|
40269
40357
|
if (lock !== void 0)
|
|
40270
40358
|
throw new CliError("permission_error", `this process is locked to group ${lock} \u2014 groups are changed without the lock`);
|
|
40271
40359
|
}, "unlocked");
|
|
@@ -40301,81 +40389,81 @@ var isIn = /* @__PURE__ */ __name((context2, group, key) => {
|
|
|
40301
40389
|
fail3("not_found", `no group "${group}" \u2014 groups here: ${Object.keys(context2.membership.groups).join(", ")}`);
|
|
40302
40390
|
return (context2.membership.groups[group] ?? []).some(sameAs(key));
|
|
40303
40391
|
}, "isIn");
|
|
40304
|
-
var listAccountGroups = /* @__PURE__ */ __name(async (
|
|
40305
|
-
var addGroupMember = /* @__PURE__ */ __name(async (
|
|
40306
|
-
unlocked(
|
|
40392
|
+
var listAccountGroups = /* @__PURE__ */ __name(async (at2) => (await contextOf2(at2)).membership, "listAccountGroups");
|
|
40393
|
+
var addGroupMember = /* @__PURE__ */ __name(async (at2, change) => {
|
|
40394
|
+
unlocked(at2);
|
|
40307
40395
|
const group = usableGroup(change.group, change.reserved);
|
|
40308
|
-
const key = accountOf3(await contextOf2(
|
|
40309
|
-
await
|
|
40310
|
-
return listAccountGroups(
|
|
40396
|
+
const key = accountOf3(await contextOf2(at2), change.member);
|
|
40397
|
+
await at2.store.accounts.changeAccountGroups({ add: { group, entry: sourceOf2(key) } });
|
|
40398
|
+
return listAccountGroups(at2);
|
|
40311
40399
|
}, "addGroupMember");
|
|
40312
|
-
var removeGroupMember = /* @__PURE__ */ __name(async (
|
|
40313
|
-
unlocked(
|
|
40400
|
+
var removeGroupMember = /* @__PURE__ */ __name(async (at2, change) => {
|
|
40401
|
+
unlocked(at2);
|
|
40314
40402
|
const group = usableGroup(change.group);
|
|
40315
|
-
const context2 = await contextOf2(
|
|
40403
|
+
const context2 = await contextOf2(at2);
|
|
40316
40404
|
const key = accountOf3(context2, change.member);
|
|
40317
40405
|
isIn(context2, group, key);
|
|
40318
|
-
const { removed } = await
|
|
40406
|
+
const { removed } = await at2.store.accounts.changeAccountGroups({
|
|
40319
40407
|
remove: { group, drop: namesOnly(context2, key) }
|
|
40320
40408
|
});
|
|
40321
40409
|
if (removed.length === 0)
|
|
40322
40410
|
fail3("not_found", `${change.member} is not in group ${group}`);
|
|
40323
|
-
return listAccountGroups(
|
|
40411
|
+
return listAccountGroups(at2);
|
|
40324
40412
|
}, "removeGroupMember");
|
|
40325
|
-
var moveGroupMember = /* @__PURE__ */ __name(async (
|
|
40326
|
-
unlocked(
|
|
40413
|
+
var moveGroupMember = /* @__PURE__ */ __name(async (at2, move) => {
|
|
40414
|
+
unlocked(at2);
|
|
40327
40415
|
const to = usableGroup(move.to, move.reserved);
|
|
40328
|
-
const context2 = await contextOf2(
|
|
40416
|
+
const context2 = await contextOf2(at2);
|
|
40329
40417
|
const key = accountOf3(context2, move.member);
|
|
40330
40418
|
if (!isIn(context2, move.from, key))
|
|
40331
40419
|
fail3("not_found", `${move.member} is not in group ${move.from}`);
|
|
40332
|
-
await
|
|
40420
|
+
await at2.store.accounts.changeAccountGroups({
|
|
40333
40421
|
...move.from === ALL ? {} : { remove: { group: move.from, drop: namesOnly(context2, key) } },
|
|
40334
40422
|
add: { group: to, entry: sourceOf2(key) }
|
|
40335
40423
|
});
|
|
40336
|
-
return listAccountGroups(
|
|
40424
|
+
return listAccountGroups(at2);
|
|
40337
40425
|
}, "moveGroupMember");
|
|
40338
|
-
var savedGroup = /* @__PURE__ */ __name(async (
|
|
40426
|
+
var savedGroup = /* @__PURE__ */ __name(async (at2, name) => {
|
|
40339
40427
|
if (NOT_GROUP_NAMES.has(name.toLowerCase()))
|
|
40340
40428
|
fail3("validation_error", `"${name}" is built in \u2014 it cannot be renamed or deleted`);
|
|
40341
|
-
const saved = await
|
|
40429
|
+
const saved = await at2.store.accounts.accountGroups();
|
|
40342
40430
|
if (!Object.hasOwn(saved, name))
|
|
40343
40431
|
fail3("not_found", `no group "${name}" \u2014 groups here: ${Object.keys(saved).join(", ") || "none"}`);
|
|
40344
40432
|
return name;
|
|
40345
40433
|
}, "savedGroup");
|
|
40346
|
-
var renameAccountGroup = /* @__PURE__ */ __name(async (
|
|
40347
|
-
unlocked(
|
|
40348
|
-
const from = await savedGroup(
|
|
40434
|
+
var renameAccountGroup = /* @__PURE__ */ __name(async (at2, rename4) => {
|
|
40435
|
+
unlocked(at2);
|
|
40436
|
+
const from = await savedGroup(at2, rename4.from);
|
|
40349
40437
|
const to = usableGroup(rename4.to, rename4.reserved);
|
|
40350
|
-
if (hasGroup((await contextOf2(
|
|
40438
|
+
if (hasGroup((await contextOf2(at2)).membership.groups, to))
|
|
40351
40439
|
fail3("validation_error", `group "${to}" already exists`);
|
|
40352
|
-
if (!await
|
|
40440
|
+
if (!await at2.store.accounts.renameAccountGroup(from, to))
|
|
40353
40441
|
fail3("validation_error", `group "${to}" already exists`);
|
|
40354
|
-
return listAccountGroups(
|
|
40442
|
+
return listAccountGroups(at2);
|
|
40355
40443
|
}, "renameAccountGroup");
|
|
40356
|
-
var deleteAccountGroup = /* @__PURE__ */ __name(async (
|
|
40357
|
-
unlocked(
|
|
40358
|
-
await
|
|
40359
|
-
return listAccountGroups(
|
|
40444
|
+
var deleteAccountGroup = /* @__PURE__ */ __name(async (at2, group) => {
|
|
40445
|
+
unlocked(at2);
|
|
40446
|
+
await at2.store.accounts.saveAccountGroup(await savedGroup(at2, group), void 0);
|
|
40447
|
+
return listAccountGroups(at2);
|
|
40360
40448
|
}, "deleteAccountGroup");
|
|
40361
|
-
var setAccountScope = /* @__PURE__ */ __name(async (
|
|
40362
|
-
unlocked(
|
|
40449
|
+
var setAccountScope = /* @__PURE__ */ __name(async (at2, change) => {
|
|
40450
|
+
unlocked(at2);
|
|
40363
40451
|
const scope = scopeOf5(change.scope);
|
|
40364
|
-
const { provider, account } = accountOf3(await contextOf2(
|
|
40365
|
-
return
|
|
40452
|
+
const { provider, account } = accountOf3(await contextOf2(at2), change.member);
|
|
40453
|
+
return at2.store.accounts.setScope({ provider, account }, scope);
|
|
40366
40454
|
}, "setAccountScope");
|
|
40367
|
-
var setChatScope = /* @__PURE__ */ __name(async (
|
|
40368
|
-
unlocked(
|
|
40455
|
+
var setChatScope = /* @__PURE__ */ __name(async (at2, change) => {
|
|
40456
|
+
unlocked(at2);
|
|
40369
40457
|
const scope = change.scope === null ? null : scopeOf5(change.scope);
|
|
40370
|
-
const { provider, account } = accountOf3(await contextOf2(
|
|
40458
|
+
const { provider, account } = accountOf3(await contextOf2(at2), change.member);
|
|
40371
40459
|
const key = { provider, account };
|
|
40372
|
-
if (!await
|
|
40460
|
+
if (!await at2.store.chats.setChatScope(key, change.chat, scope))
|
|
40373
40461
|
fail3("not_found", `no chat ${change.chat} stored in ${sourceOf2(key)}`);
|
|
40374
|
-
const effective = (await
|
|
40462
|
+
const effective = (await at2.store.chats.chatScopes(key, [change.chat])).get(change.chat) ?? "personal";
|
|
40375
40463
|
return { ...key, chat: change.chat, own: scope, scope: effective };
|
|
40376
40464
|
}, "setChatScope");
|
|
40377
40465
|
|
|
40378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/group-guard.js
|
|
40379
40467
|
var refOf2 = /* @__PURE__ */ __name((item2) => typeof item2 === "string" ? item2 : typeof item2 === "object" && item2 !== null && "ref" in item2 ? item2.ref : void 0, "refOf");
|
|
40380
40468
|
var groupGuardOf = /* @__PURE__ */ __name(async (store, app, env) => {
|
|
40381
40469
|
const group = groupLockOf(app, env);
|
|
@@ -40402,7 +40490,7 @@ var groupGuardOf = /* @__PURE__ */ __name(async (store, app, env) => {
|
|
|
40402
40490
|
const walk2 = /* @__PURE__ */ __name(async (node, key) => {
|
|
40403
40491
|
if (Array.isArray(node)) {
|
|
40404
40492
|
const items = await Promise.all(node.map((one2) => walk2(one2)));
|
|
40405
|
-
let changed2 = items.some((one2,
|
|
40493
|
+
let changed2 = items.some((one2, at2) => one2 !== node[at2]);
|
|
40406
40494
|
let shown = items;
|
|
40407
40495
|
if (key === "evidence" || key === "sources") {
|
|
40408
40496
|
shown = [];
|
|
@@ -40486,14 +40574,14 @@ var lockedRegistry = /* @__PURE__ */ __name((registry, guard) => {
|
|
|
40486
40574
|
};
|
|
40487
40575
|
}, "lockedRegistry");
|
|
40488
40576
|
|
|
40489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/calendar/sync.js
|
|
40490
40578
|
var DAY7 = 864e5;
|
|
40491
40579
|
var SLOTS_EVERY = 7 * DAY7;
|
|
40492
40580
|
|
|
40493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
|
|
40494
40582
|
var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
|
|
40495
40583
|
|
|
40496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/calendar/reads.js
|
|
40497
40585
|
var eventIdOf = /* @__PURE__ */ __name((reference) => {
|
|
40498
40586
|
const text3 = String(reference).replace(/^event:/u, "");
|
|
40499
40587
|
if (!/^[1-9]\d*$/u.test(text3) || !Number.isSafeInteger(Number(text3)))
|
|
@@ -40558,11 +40646,11 @@ var EVENTS_QUERY = {
|
|
|
40558
40646
|
} : field)
|
|
40559
40647
|
};
|
|
40560
40648
|
|
|
40561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/calendar/recurrence.js
|
|
40562
40650
|
var RULE_LINE = /^RRULE:/iu;
|
|
40563
40651
|
var ruleLine = /* @__PURE__ */ __name((lines) => lines.find((line2) => RULE_LINE.test(line2)), "ruleLine");
|
|
40564
40652
|
|
|
40565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/calendar/writer.js
|
|
40566
40654
|
var EVENTS_NOTIFY_KEY = "events.notify";
|
|
40567
40655
|
var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
|
|
40568
40656
|
var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
|
|
@@ -40580,7 +40668,7 @@ var CALENDAR_WRITE_DEFAULTS = {
|
|
|
40580
40668
|
[EVENTS_REMIND_HOOK_KEY]: "deny"
|
|
40581
40669
|
};
|
|
40582
40670
|
|
|
40583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/listings.js
|
|
40584
40672
|
var DOCUMENT_TEXT_CANDIDATES = 2e3;
|
|
40585
40673
|
var webUrl = /* @__PURE__ */ __name((url) => url !== null && /^https:\/\//iu.test(url) ? url : null, "webUrl");
|
|
40586
40674
|
var iso4 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -40698,8 +40786,8 @@ var showDocument = /* @__PURE__ */ __name(async (store, reference, text3) => {
|
|
|
40698
40786
|
language: found.language,
|
|
40699
40787
|
tags: found.tags,
|
|
40700
40788
|
people: found.people,
|
|
40701
|
-
meetings: found.meetings.map(({ ref: ref2, title, at:
|
|
40702
|
-
events: found.events.map(({ ref: ref2, title, at:
|
|
40789
|
+
meetings: found.meetings.map(({ ref: ref2, title, at: at2, role }) => ({ ref: ref2, title, at: iso4(at2), role })),
|
|
40790
|
+
events: found.events.map(({ ref: ref2, title, at: at2, role }) => ({ ref: ref2, title, at: iso4(at2), role })),
|
|
40703
40791
|
untrusted: ["title", "file_name", "folder", "path", "text", "meetings.title", "events.title"]
|
|
40704
40792
|
};
|
|
40705
40793
|
}, "showDocument");
|
|
@@ -40853,7 +40941,7 @@ var showMeetingEntry = /* @__PURE__ */ __name(async (store, reference, lines) =>
|
|
|
40853
40941
|
};
|
|
40854
40942
|
}, "showMeetingEntry");
|
|
40855
40943
|
|
|
40856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
40857
40945
|
import { createHash as createHash15 } from "node:crypto";
|
|
40858
40946
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
40859
40947
|
ref: cue.reference,
|
|
@@ -40971,7 +41059,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
40971
41059
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
40972
41060
|
}, "readMeetingHitContext");
|
|
40973
41061
|
|
|
40974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
40975
41063
|
var visible = /* @__PURE__ */ __name((text3) => text3.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
40976
41064
|
var markdown = /* @__PURE__ */ __name((text3) => visible(text3).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
40977
41065
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -41047,7 +41135,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
41047
41135
|
return { packet, content };
|
|
41048
41136
|
}, "readMeetingPassage");
|
|
41049
41137
|
|
|
41050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
41051
41139
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
41052
41140
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
41053
41141
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -41061,7 +41149,7 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
41061
41149
|
};
|
|
41062
41150
|
}, "createMeetingBatchReader");
|
|
41063
41151
|
|
|
41064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
41065
41153
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
41066
41154
|
var checkCancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
41067
41155
|
if (!signal?.aborted)
|
|
@@ -41168,7 +41256,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
41168
41256
|
};
|
|
41169
41257
|
}, "createMeetingContextService");
|
|
41170
41258
|
|
|
41171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
41172
41260
|
var communicationFields = {
|
|
41173
41261
|
sources: pipe(array(strictObject({
|
|
41174
41262
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -41200,7 +41288,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
41200
41288
|
return { ...input, after, before };
|
|
41201
41289
|
}, "communicationRequest");
|
|
41202
41290
|
|
|
41203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
41204
41292
|
var MEETING_PREPARATION_LIMITS = {
|
|
41205
41293
|
meetings: { min: 1, max: 20, default: 5 },
|
|
41206
41294
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -41286,7 +41374,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
41286
41374
|
return { ...input, history };
|
|
41287
41375
|
}, "preparationRequest");
|
|
41288
41376
|
|
|
41289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
41290
41378
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
41291
41379
|
const section = {
|
|
41292
41380
|
readUsage: plan.reader.usage(),
|
|
@@ -41391,7 +41479,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
41391
41479
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
41392
41480
|
}, "appendPreparationCommunications");
|
|
41393
41481
|
|
|
41394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
41395
41483
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
41396
41484
|
if (port === void 0)
|
|
41397
41485
|
return void 0;
|
|
@@ -41496,7 +41584,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
41496
41584
|
}
|
|
41497
41585
|
}, "validatePreparationCommunications");
|
|
41498
41586
|
|
|
41499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
41500
41588
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
41501
41589
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
41502
41590
|
}, "invalid");
|
|
@@ -41565,7 +41653,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
41565
41653
|
}
|
|
41566
41654
|
}, "appendKnowledgePreparation");
|
|
41567
41655
|
|
|
41568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
41569
41657
|
var invalid8 = /* @__PURE__ */ __name(() => {
|
|
41570
41658
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
41571
41659
|
}, "invalid");
|
|
@@ -41639,7 +41727,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
41639
41727
|
}
|
|
41640
41728
|
}, "appendNotesPreparation");
|
|
41641
41729
|
|
|
41642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
41643
41731
|
var PAGE_LIMIT = 4;
|
|
41644
41732
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
41645
41733
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -41689,7 +41777,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
41689
41777
|
}
|
|
41690
41778
|
}, "appendProjectPreparation");
|
|
41691
41779
|
|
|
41692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
41693
41781
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
41694
41782
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
41695
41783
|
return;
|
|
@@ -41761,7 +41849,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
41761
41849
|
}
|
|
41762
41850
|
}, "appendRelatedPreparation");
|
|
41763
41851
|
|
|
41764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
41765
41853
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
41766
41854
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
41767
41855
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -41899,7 +41987,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
41899
41987
|
};
|
|
41900
41988
|
}, "createMeetingPreparationService");
|
|
41901
41989
|
|
|
41902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
41903
41991
|
import { createHash as createHash16 } from "node:crypto";
|
|
41904
41992
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind2) => {
|
|
41905
41993
|
if (!TASK_KINDS.includes(kind2))
|
|
@@ -41919,7 +42007,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
41919
42007
|
};
|
|
41920
42008
|
}, "proposeMeetingTask");
|
|
41921
42009
|
|
|
41922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
41923
42011
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
41924
42012
|
const { provider, account, scope } = key;
|
|
41925
42013
|
if (!provider.trim() || provider.includes(":") || !account.trim())
|
|
@@ -41982,7 +42070,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account, id3) => {
|
|
|
41982
42070
|
}
|
|
41983
42071
|
}, "readMeetingTask");
|
|
41984
42072
|
|
|
41985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
41986
42074
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
41987
42075
|
const installer = ports.installer();
|
|
41988
42076
|
const argv = updateCommand(installer, packageName);
|
|
@@ -42047,7 +42135,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
42047
42135
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
42048
42136
|
}, "dayAfter");
|
|
42049
42137
|
|
|
42050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
42051
42139
|
var proposalSource = /* @__PURE__ */ __name((id3) => `proposed-action:${id3}`, "proposalSource");
|
|
42052
42140
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id3, by) => {
|
|
42053
42141
|
const proposal = await store.proposedActions.get(id3);
|
|
@@ -42070,7 +42158,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id3, by) => {
|
|
|
42070
42158
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
42071
42159
|
}, "approveAsTask");
|
|
42072
42160
|
|
|
42073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
42074
42162
|
var MAX_IDS = 500;
|
|
42075
42163
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
42076
42164
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -42112,7 +42200,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text3) => {
|
|
|
42112
42200
|
return ids;
|
|
42113
42201
|
}, "parseProposalIds");
|
|
42114
42202
|
|
|
42115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
42116
42204
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
42117
42205
|
if (author.type === "person")
|
|
42118
42206
|
return { type: "person", id: author.id };
|
|
@@ -42185,7 +42273,7 @@ var reviewedKind = /* @__PURE__ */ __name((spec) => ({
|
|
|
42185
42273
|
}, "decide")
|
|
42186
42274
|
}), "reviewedKind");
|
|
42187
42275
|
|
|
42188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
42189
42277
|
var FACT_SUMMARIES = {
|
|
42190
42278
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
42191
42279
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -42260,7 +42348,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
42260
42348
|
};
|
|
42261
42349
|
}, "findingsKind");
|
|
42262
42350
|
|
|
42263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
42264
42352
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
42265
42353
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
42266
42354
|
var rowOf2 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -42316,7 +42404,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42316
42404
|
}, "decide")
|
|
42317
42405
|
}), "organizationKind");
|
|
42318
42406
|
|
|
42319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
42320
42408
|
var rowOf3 = /* @__PURE__ */ __name((action2) => ({
|
|
42321
42409
|
id: action2.id,
|
|
42322
42410
|
kind: "action",
|
|
@@ -42356,7 +42444,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
42356
42444
|
}, "decide")
|
|
42357
42445
|
}), "actionKind");
|
|
42358
42446
|
|
|
42359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/contracts.js
|
|
42360
42448
|
var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
42361
42449
|
type: "contract",
|
|
42362
42450
|
list: /* @__PURE__ */ __name((options) => store.contracts.list(options), "list"),
|
|
@@ -42365,7 +42453,7 @@ var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
42365
42453
|
decide: /* @__PURE__ */ __name(async (id3, confirm, { by, reason }) => (confirm ? await store.contracts.confirm(id3, by, reason) : await store.contracts.reject(id3, by, reason)).ref, "decide")
|
|
42366
42454
|
}), "contractKind");
|
|
42367
42455
|
|
|
42368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
42369
42457
|
var STATUS = {
|
|
42370
42458
|
proposed: "proposed",
|
|
42371
42459
|
accepted: "confirmed",
|
|
@@ -42408,7 +42496,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42408
42496
|
}, "decide")
|
|
42409
42497
|
}), "factKind");
|
|
42410
42498
|
|
|
42411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
42412
42500
|
var invoiceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
42413
42501
|
type: "invoice",
|
|
42414
42502
|
list: /* @__PURE__ */ __name((options) => store.finance.invoices(options), "list"),
|
|
@@ -42424,7 +42512,7 @@ var paymentKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
42424
42512
|
decide: /* @__PURE__ */ __name(async (id3, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id3, by, reason) : await store.finance.reject(id3, by, reason)).ref, "decide")
|
|
42425
42513
|
}), "paymentKind");
|
|
42426
42514
|
|
|
42427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/identity-link.js
|
|
42428
42516
|
var rowOf5 = /* @__PURE__ */ __name((action2) => {
|
|
42429
42517
|
const payload = action2.payload;
|
|
42430
42518
|
const [from, to] = payload.persons;
|
|
@@ -42471,7 +42559,7 @@ var identityLinkKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42471
42559
|
}, "decide")
|
|
42472
42560
|
}), "identityLinkKind");
|
|
42473
42561
|
|
|
42474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/identity-split.js
|
|
42475
42563
|
var summaryOf = /* @__PURE__ */ __name((payload, person) => payload.split === "unmerge" ? `undo ${payload.merge}: ${payload.identities.join(", ")} go back to their own person` : `${payload.identities.join(", ")} may not be ${person}: they would move to a person of their own`, "summaryOf");
|
|
42476
42564
|
var dropped = /* @__PURE__ */ __name((action2) => action2.status !== "proposed" && action2.status !== "rejected" && typeof action2.result?.person !== "string", "dropped");
|
|
42477
42565
|
var rowOf6 = /* @__PURE__ */ __name((store) => async (action2) => {
|
|
@@ -42526,7 +42614,7 @@ var identitySplitKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42526
42614
|
}, "decide")
|
|
42527
42615
|
}), "identitySplitKind");
|
|
42528
42616
|
|
|
42529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
42530
42618
|
var linkRow = /* @__PURE__ */ __name((link3) => ({
|
|
42531
42619
|
id: `key:${link3.id}`,
|
|
42532
42620
|
kind: "key_document",
|
|
@@ -42594,7 +42682,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
42594
42682
|
};
|
|
42595
42683
|
}, "keyDocumentKind");
|
|
42596
42684
|
|
|
42597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
42598
42686
|
var words3 = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
42599
42687
|
var summaryOf2 = /* @__PURE__ */ __name((finding) => {
|
|
42600
42688
|
switch (finding.kind) {
|
|
@@ -42685,7 +42773,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
42685
42773
|
};
|
|
42686
42774
|
}, "mailFindingsKind");
|
|
42687
42775
|
|
|
42688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
42689
42777
|
var rowOf8 = /* @__PURE__ */ __name((action2, batch) => {
|
|
42690
42778
|
const findings = batch.input.findings;
|
|
42691
42779
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -42752,7 +42840,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
42752
42840
|
};
|
|
42753
42841
|
}, "meetingFindingsKind");
|
|
42754
42842
|
|
|
42755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
42756
42844
|
var STATUS2 = {
|
|
42757
42845
|
proposed: "proposed",
|
|
42758
42846
|
confirmed: "confirmed",
|
|
@@ -42793,7 +42881,7 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42793
42881
|
}, "decide")
|
|
42794
42882
|
}), "memoryKind");
|
|
42795
42883
|
|
|
42796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
42797
42885
|
var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
42798
42886
|
type: "order",
|
|
42799
42887
|
list: /* @__PURE__ */ __name((options) => store.orders.list(options), "list"),
|
|
@@ -42802,7 +42890,7 @@ var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
42802
42890
|
decide: /* @__PURE__ */ __name(async (id3, confirm, { by, reason }) => (confirm ? await store.orders.confirm(id3, by, reason) : await store.orders.reject(id3, by, reason)).ref, "decide")
|
|
42803
42891
|
}), "orderKind");
|
|
42804
42892
|
|
|
42805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
42806
42894
|
var linkRow2 = /* @__PURE__ */ __name((link3) => ({
|
|
42807
42895
|
id: `link:${link3.id}`,
|
|
42808
42896
|
kind: "relationship",
|
|
@@ -42877,7 +42965,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
42877
42965
|
};
|
|
42878
42966
|
}, "relationshipKind");
|
|
42879
42967
|
|
|
42880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
42881
42969
|
var KIND2 = "relationship_update";
|
|
42882
42970
|
var summaryOf3 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
42883
42971
|
var rowOf10 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -42927,7 +43015,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42927
43015
|
}, "decide")
|
|
42928
43016
|
}), "relationshipUpdateKind");
|
|
42929
43017
|
|
|
42930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/source-review.js
|
|
42931
43019
|
var rowOf11 = /* @__PURE__ */ __name((action2) => {
|
|
42932
43020
|
const payload = action2.payload;
|
|
42933
43021
|
const sources = payload.sources.flatMap((source) => source.ref ?? []);
|
|
@@ -42970,7 +43058,7 @@ var sourceReviewKind = /* @__PURE__ */ __name((store) => ({
|
|
|
42970
43058
|
}, "decide")
|
|
42971
43059
|
}), "sourceReviewKind");
|
|
42972
43060
|
|
|
42973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/subscriptions.js
|
|
42974
43062
|
var subscriptionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
42975
43063
|
type: "subscription",
|
|
42976
43064
|
list: /* @__PURE__ */ __name((options) => store.subscriptions.list(options), "list"),
|
|
@@ -42989,7 +43077,7 @@ var subscriptionPriceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
42989
43077
|
}, "decide")
|
|
42990
43078
|
}), "subscriptionPriceKind");
|
|
42991
43079
|
|
|
42992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
42993
43081
|
var rowOf12 = /* @__PURE__ */ __name((task2) => {
|
|
42994
43082
|
const suggestion = task2.closeSuggestion;
|
|
42995
43083
|
if (suggestion === null)
|
|
@@ -43057,7 +43145,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
43057
43145
|
};
|
|
43058
43146
|
}, "taskCloseKind");
|
|
43059
43147
|
|
|
43060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/transactions.js
|
|
43061
43149
|
var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
43062
43150
|
type: "transaction",
|
|
43063
43151
|
list: /* @__PURE__ */ __name((options) => store.transactions.list(options), "list"),
|
|
@@ -43066,7 +43154,7 @@ var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
43066
43154
|
decide: /* @__PURE__ */ __name(async (id3, confirm, { by, reason }) => (confirm ? await store.transactions.confirm(id3, by, reason) : await store.transactions.reject(id3, by, reason)).ref, "decide")
|
|
43067
43155
|
}), "transactionKind");
|
|
43068
43156
|
|
|
43069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
43070
43158
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
43071
43159
|
var marked = /* @__PURE__ */ __name((kind2, row) => kind2.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
43072
43160
|
var refusalOf = /* @__PURE__ */ __name((id3, error) => {
|
|
@@ -43201,7 +43289,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
43201
43289
|
return registry;
|
|
43202
43290
|
}, "proposalRegistry");
|
|
43203
43291
|
|
|
43204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/search-all-deprecated.js
|
|
43205
43293
|
var searchAllIncludingMeetings = /* @__PURE__ */ __name(async (store, account, { meetingAccount, maxMeetings: _maxMeetings, meetingCursor: _meetingCursor, ...request }, messenger = {}, searchMessages, meaning) => {
|
|
43206
43294
|
const { meetings: _meetings, ...found } = await searchAll(store, account, {
|
|
43207
43295
|
...request,
|
|
@@ -43211,7 +43299,7 @@ var searchAllIncludingMeetings = /* @__PURE__ */ __name(async (store, account, {
|
|
|
43211
43299
|
return found;
|
|
43212
43300
|
}, "searchAllIncludingMeetings");
|
|
43213
43301
|
|
|
43214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
43215
43303
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
43216
43304
|
const invalid9 = /* @__PURE__ */ __name((field) => {
|
|
43217
43305
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -43253,7 +43341,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
43253
43341
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
43254
43342
|
}, "storedCandidateRequest");
|
|
43255
43343
|
|
|
43256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
43257
43345
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
43258
43346
|
const fixed = snapshotMeetingScope(scope);
|
|
43259
43347
|
const store = ports?.meetings;
|
|
@@ -43345,7 +43433,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
43345
43433
|
};
|
|
43346
43434
|
}, "createStoredMeetingProjectCandidateReader");
|
|
43347
43435
|
|
|
43348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
43349
43437
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
43350
43438
|
const pictures = picturesService(deps);
|
|
43351
43439
|
const base = {
|
|
@@ -43544,7 +43632,9 @@ export {
|
|
|
43544
43632
|
manifestBaseUrl,
|
|
43545
43633
|
signRequest,
|
|
43546
43634
|
underBase,
|
|
43635
|
+
answerAt,
|
|
43547
43636
|
parameterValue,
|
|
43637
|
+
withValue,
|
|
43548
43638
|
nextPage,
|
|
43549
43639
|
DEFAULT_PACE,
|
|
43550
43640
|
pacePathFor,
|