@wirecat/drive-cli 0.70.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-FW3GK3QO.js → all-profiles-3QJG2NAN.js} +13 -13
- package/dist/bundle/{anthropic-QVKJT3II.js → anthropic-PSWTEU6G.js} +8 -8
- package/dist/bundle/{app-server-QU73RD5R.js → app-server-PVTA6ABR.js} +62 -62
- package/dist/bundle/{bun-5XCD5CBB.js → bun-LU5LP3JI.js} +2 -2
- package/dist/bundle/{bun-sqlite-TIGSVNSV.js → bun-sqlite-PYMKLBRU.js} +9 -9
- package/dist/bundle/{chunk-BFKFKDPC.js → chunk-22QQUKWA.js} +1 -1
- package/dist/bundle/{chunk-RLNZ7NX5.js → chunk-26DHFMGZ.js} +2 -2
- package/dist/bundle/{chunk-RHSBXOQM.js → chunk-2BVVU7GG.js} +1 -1
- package/dist/bundle/{chunk-ILAQIBEO.js → chunk-2LHAVY4U.js} +1 -1
- package/dist/bundle/{chunk-GAHIHE4K.js → chunk-2PUNKUYJ.js} +3177 -3043
- package/dist/bundle/{chunk-DHX27E5M.js → chunk-2UUWXPOB.js} +3 -3
- package/dist/bundle/{chunk-RCTOWLCD.js → chunk-35SCQ4VI.js} +26 -26
- package/dist/bundle/{chunk-ZCXWV4XO.js → chunk-3EBBLKIT.js} +4 -4
- package/dist/bundle/{chunk-SONPLYV7.js → chunk-3N2OFXB5.js} +5 -5
- package/dist/bundle/{chunk-KSJAFMU5.js → chunk-3UGYFXH6.js} +42 -19
- package/dist/bundle/{chunk-HK225DAG.js → chunk-4HWJOU7N.js} +1 -1
- package/dist/bundle/{chunk-6DPOWBKA.js → chunk-4PA4DHYV.js} +6 -6
- package/dist/bundle/{chunk-54NDYVZA.js → chunk-4QNW4NK6.js} +1 -1
- package/dist/bundle/{chunk-2SBC4DVV.js → chunk-6SJOTNHF.js} +4 -4
- package/dist/bundle/{chunk-VVN6GHAZ.js → chunk-6TNNT2MQ.js} +223 -126
- package/dist/bundle/{chunk-5JTB4URG.js → chunk-6W763DZN.js} +12 -12
- package/dist/bundle/{chunk-FVTKFIQH.js → chunk-6XFIITOG.js} +383 -349
- package/dist/bundle/{chunk-54BQWRJL.js → chunk-72C4YOCH.js} +7 -7
- package/dist/bundle/{chunk-3UWRAIWA.js → chunk-7PDHGZN4.js} +4 -4
- package/dist/bundle/{chunk-REM5WHHQ.js → chunk-ACUAV6VX.js} +56 -56
- package/dist/bundle/{chunk-IGNIUDI3.js → chunk-ASMMG72J.js} +40 -33
- package/dist/bundle/{chunk-DVI72ZQG.js → chunk-B5KSXHJ7.js} +1 -1
- package/dist/bundle/{chunk-6BMTW5A6.js → chunk-BKSQBBYG.js} +7 -7
- package/dist/bundle/{chunk-HRATXUFH.js → chunk-CJLVYIOP.js} +21 -21
- package/dist/bundle/{chunk-RQNRYF6D.js → chunk-COJSWDNU.js} +3 -3
- package/dist/bundle/{chunk-FONIFRYI.js → chunk-COOOO5B3.js} +4 -4
- package/dist/bundle/{chunk-EG62WVR2.js → chunk-D5TGYUVU.js} +6 -6
- package/dist/bundle/{chunk-LMJBQFW6.js → chunk-EOEU3AZN.js} +6 -6
- package/dist/bundle/{chunk-GV5DGHSA.js → chunk-FCS26CYQ.js} +4 -4
- package/dist/bundle/{chunk-BD2K2ONK.js → chunk-FJH7DJWK.js} +4 -4
- package/dist/bundle/{chunk-FADAOLGB.js → chunk-FP54WSIR.js} +4 -4
- package/dist/bundle/{chunk-PAPY6Q6H.js → chunk-FT3LN3HP.js} +1 -1
- package/dist/bundle/{chunk-WJK6KTCS.js → chunk-GBKNJWOZ.js} +8 -8
- package/dist/bundle/{chunk-GJZSVSV3.js → chunk-GOWXXYEF.js} +2 -2
- package/dist/bundle/{chunk-LINBDWJK.js → chunk-GPQ44Y2R.js} +2 -2
- package/dist/bundle/{chunk-3AHBZP33.js → chunk-GZ2D4KXG.js} +8 -8
- package/dist/bundle/{chunk-ZHZYGY5R.js → chunk-HKY7X6NY.js} +4 -4
- package/dist/bundle/{chunk-GPDPEHYX.js → chunk-HL52XXZX.js} +1 -1
- package/dist/bundle/{chunk-BBFXQPKD.js → chunk-HMS6EEQL.js} +3 -3
- package/dist/bundle/{chunk-FYPW7NMH.js → chunk-I4RWW3UD.js} +49 -4
- package/dist/bundle/{chunk-HWUPU6WX.js → chunk-ICDCAQ6K.js} +8 -8
- package/dist/bundle/{chunk-NP7LJATI.js → chunk-J5Q5FS2N.js} +17 -22
- package/dist/bundle/{chunk-I7YSHUPW.js → chunk-JDV7HNNQ.js} +13 -13
- package/dist/bundle/{chunk-BBRMDMIR.js → chunk-JZHBZOJR.js} +3 -3
- package/dist/bundle/{chunk-QBAOIMVB.js → chunk-KGERXYTV.js} +1 -1
- package/dist/bundle/{chunk-7IBENBCK.js → chunk-KGYVHPGE.js} +2 -2
- package/dist/bundle/{chunk-ABZ2NYDT.js → chunk-KYKW2W6X.js} +1 -1
- package/dist/bundle/{chunk-AV5UKJZM.js → chunk-L46C6HQ7.js} +12 -12
- package/dist/bundle/{chunk-3TCMANIM.js → chunk-LXKYKRHD.js} +11 -11
- package/dist/bundle/{chunk-DVVUJ254.js → chunk-MIA7P6FZ.js} +2 -2
- package/dist/bundle/{chunk-PR7XD2DI.js → chunk-MNLL5YLM.js} +2 -2
- package/dist/bundle/{chunk-Q5C6YKAY.js → chunk-OF422U5D.js} +10 -10
- package/dist/bundle/{chunk-HHAZ6DCY.js → chunk-OJSBWP3F.js} +6 -6
- package/dist/bundle/{chunk-EDO5LZVF.js → chunk-P7CUM5IB.js} +1 -1
- package/dist/bundle/{chunk-P7PLKNPX.js → chunk-PRW6SYA3.js} +157 -70
- package/dist/bundle/{chunk-7QSRODXM.js → chunk-Q7DOMFJ4.js} +6 -6
- package/dist/bundle/{chunk-HYXXMSVD.js → chunk-QETR5HIZ.js} +503 -416
- package/dist/bundle/{chunk-YZPE72GE.js → chunk-QFR2PNJN.js} +12 -12
- package/dist/bundle/{chunk-MXNQZAJQ.js → chunk-QNRRK3CN.js} +2 -2
- package/dist/bundle/{chunk-PN4JYURZ.js → chunk-QXC6IEH6.js} +45 -45
- package/dist/bundle/{chunk-WWE5GO6G.js → chunk-RESDD3Q4.js} +3 -3
- package/dist/bundle/{chunk-YCL3SK4T.js → chunk-RJOQH5YY.js} +39 -38
- package/dist/bundle/{chunk-7C5KENNU.js → chunk-RWDKMU74.js} +3 -3
- package/dist/bundle/{chunk-GK3BJMGK.js → chunk-SAKO3P4H.js} +1 -1
- package/dist/bundle/{chunk-FN3RXBO7.js → chunk-SDKQNOL5.js} +6 -6
- package/dist/bundle/{chunk-TGS5VPJD.js → chunk-SERXSCN3.js} +167 -206
- package/dist/bundle/{chunk-3UZ4OH22.js → chunk-TAFHYHKA.js} +18 -116
- package/dist/bundle/{chunk-YRUR3E3E.js → chunk-TAUBRNC5.js} +35 -35
- package/dist/bundle/{chunk-P77FL6RY.js → chunk-UDMNY63V.js} +20 -17
- package/dist/bundle/{chunk-IFTX7AQU.js → chunk-UTO2GO4P.js} +5 -5
- package/dist/bundle/{chunk-3CHW7JGR.js → chunk-WVDCCYS3.js} +17 -17
- package/dist/bundle/{chunk-OY7TNUEC.js → chunk-X4TIMMKJ.js} +1 -1
- package/dist/bundle/{chunk-TNKQDS5A.js → chunk-XF4EXO2C.js} +6 -6
- package/dist/bundle/{chunk-BXPC5TFG.js → chunk-XMMFBPGC.js} +2 -2
- package/dist/bundle/{chunk-FCSHWUMW.js → chunk-Y2NWGNUB.js} +5 -5
- package/dist/bundle/{chunk-ML3R2UHV.js → chunk-YJIGGUPI.js} +4 -4
- package/dist/bundle/{chunk-DR57KDAY.js → chunk-YMJ6IDGT.js} +6 -6
- package/dist/bundle/{chunk-F5KJWRF5.js → chunk-YPFWNVHV.js} +3 -3
- package/dist/bundle/{chunk-XZBA6FVH.js → chunk-YPNWIB6H.js} +3 -3
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-YVI5SQPY.js} +1 -1
- package/dist/bundle/{chunk-T5D4OGDC.js → chunk-Z3KUSRCF.js} +2 -2
- package/dist/bundle/{chunk-4WK26MPY.js → chunk-Z56QFOBR.js} +1 -1
- package/dist/bundle/{chunk-7DJNURKV.js → chunk-ZCR3IRZ2.js} +8 -8
- package/dist/bundle/{chunk-XOL346TJ.js → chunk-ZM63SUHG.js} +2 -2
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-ZZ32DXTH.js} +1 -1
- package/dist/bundle/{cli-K4D4DIGQ.js → cli-556DERZL.js} +68 -68
- package/dist/bundle/command-contract-VRTOAV6W.js +43 -0
- package/dist/bundle/{command-server-entry-WREK3QBB.js → command-server-entry-AYLGNZWD.js} +33 -33
- package/dist/bundle/{decode-SEETPKBH.js → decode-QU24MWMN.js} +8 -8
- package/dist/bundle/{dispatch-SQCEURVK.js → dispatch-4KODNOXV.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-WZ5RKFCX.js → echarts-BXX4OQWC.js} +2 -2
- package/dist/bundle/{embed-B2UCRZZR.js → embed-KG27KG3D.js} +9 -9
- package/dist/bundle/{embedder-4R6Z7G7L.js → embedder-IPAVUQUV.js} +12 -12
- package/dist/bundle/entry-MVXQETWS.js +25 -0
- package/dist/bundle/{failure-CYNXH3RQ.js → failure-ESL7ETL4.js} +4 -4
- package/dist/bundle/first-run-4UVLW2WR.js +31 -0
- package/dist/bundle/first-screen-JAKAIINI.js +41 -0
- package/dist/bundle/google-22NXXJX5.js +45 -0
- package/dist/bundle/{google-api-SAND2F7L.js → google-api-VCDBSNOW.js} +70 -70
- package/dist/bundle/grants-MQMTVCRQ.js +118 -0
- package/dist/bundle/{identity-JVVGS4U6.js → identity-LOWMVGZY.js} +6 -6
- package/dist/bundle/{instructions-JSMTSB22.js → instructions-2VECIDXF.js} +1 -1
- package/dist/bundle/{login-6WG3YBDU.js → login-7GBONT7V.js} +76 -76
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-O6ACR2DX.js} +2 -2
- package/dist/bundle/meeting-combined-LVP4AZKA.js +27 -0
- package/dist/bundle/meeting-model-RAY5XDXZ.js +29 -0
- package/dist/bundle/{meeting-semantic-5U7JQCFF.js → meeting-semantic-G7PFOKU7.js} +10 -10
- package/dist/bundle/{node-VJMVHOWD.js → node-MPEQSFI3.js} +2 -2
- package/dist/bundle/{node-sqlite-DCNT3HVE.js → node-sqlite-OLQMAYB4.js} +10 -10
- package/dist/bundle/oauth-SGH2I2BY.js +22 -0
- package/dist/bundle/{open-NFOEHVW7.js → open-OXTE672W.js} +8 -8
- package/dist/bundle/{openai-D47WY7EC.js → openai-EB3TPIZY.js} +19 -19
- package/dist/bundle/{process-Q2FRU5VA.js → process-F6TKXWWA.js} +1 -1
- package/dist/bundle/{program-T2AJJQEM.js → program-4IFDZ7FM.js} +142 -125
- package/dist/bundle/{prompt-YJSDABXN.js → prompt-F5RRHPN2.js} +8 -8
- package/dist/bundle/{reasons-WEHPCSJX.js → reasons-UORHJDHK.js} +5 -5
- package/dist/bundle/{recognize-6OBEIEB3.js → recognize-DAVNZND3.js} +7 -7
- package/dist/bundle/{remote-3SL2QJ7T.js → remote-D5EYYIAU.js} +13 -13
- package/dist/bundle/{rerank-L6F5SLIB.js → rerank-CND2GVLZ.js} +10 -10
- package/dist/bundle/{serve-GYSWIWH4.js → serve-ZHSPUIGX.js} +12 -12
- package/dist/bundle/server-DUVJWP3Q.js +80 -0
- package/dist/bundle/{server-GWWP3RIT.js → server-YMAK4LHC.js} +54 -54
- package/dist/bundle/{services-BDQBRXT5.js → services-ZILSFJ6E.js} +47 -47
- package/dist/bundle/{sqlite-runtime-ZSZGAUYB.js → sqlite-runtime-S5VPMZQH.js} +9 -9
- package/dist/bundle/{start-BJ275RUK.js → start-CR6X25RT.js} +7 -7
- package/dist/bundle/{state-HLNGFI2T.js → state-YFPHVIIJ.js} +9 -9
- package/dist/bundle/{store-OSRTGYGI.js → store-CL4ZJZRI.js} +23 -23
- package/dist/bundle/{store-I43KZNJW.js → store-UODRT6X4.js} +25 -25
- package/dist/bundle/store-maintenance-command-DY5XIBWR.js +72 -0
- package/dist/bundle/tokens-AF7QOFOF.js +118 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +1 -2
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-V3F452QI.js +0 -43
- package/dist/bundle/entry-ORZYRJ5N.js +0 -25
- package/dist/bundle/first-run-KAKA6KBY.js +0 -31
- package/dist/bundle/first-screen-R645UHRH.js +0 -41
- package/dist/bundle/google-BSO3YB7N.js +0 -45
- package/dist/bundle/grants-PLNFYARD.js +0 -118
- package/dist/bundle/meeting-combined-SUKMFK3F.js +0 -27
- package/dist/bundle/meeting-model-S4YGKIFI.js +0 -29
- package/dist/bundle/oauth-KCMNQ3ZP.js +0 -22
- package/dist/bundle/server-BI46BSRE.js +0 -80
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +0 -72
- package/dist/bundle/tokens-DB7O7QNB.js +0 -118
- /package/dist/bundle/{chunk-ZI3YTXSF.js → chunk-VKE77B3F.js} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
googleDocumentId,
|
|
6
6
|
googleDocumentLinks,
|
|
7
7
|
trimUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JZHBZOJR.js";
|
|
9
9
|
import {
|
|
10
10
|
PRESENCE,
|
|
11
11
|
QUERY_LIMITS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
plainQuery,
|
|
18
18
|
searchError,
|
|
19
19
|
tooWideTerm
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZCR3IRZ2.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_STEMMERS,
|
|
23
23
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -27,16 +27,16 @@ import {
|
|
|
27
27
|
analyzerIdentity,
|
|
28
28
|
createStemmer,
|
|
29
29
|
parseStemmers
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GZ2D4KXG.js";
|
|
31
31
|
import {
|
|
32
32
|
NORMALIZER_VERSION,
|
|
33
33
|
fold,
|
|
34
34
|
normalize
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X4TIMMKJ.js";
|
|
36
36
|
import {
|
|
37
37
|
quietSqliteWarning,
|
|
38
38
|
storeCapable
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4PA4DHYV.js";
|
|
40
40
|
import {
|
|
41
41
|
ACCOUNT_GROUPS,
|
|
42
42
|
ADDED_ACCOUNT,
|
|
@@ -162,18 +162,18 @@ import {
|
|
|
162
162
|
usableLinkSql,
|
|
163
163
|
useStoredProviders,
|
|
164
164
|
walletLine
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-RJOQH5YY.js";
|
|
166
166
|
import {
|
|
167
167
|
holdsCredential,
|
|
168
168
|
secretNamed
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-SAKO3P4H.js";
|
|
170
170
|
import {
|
|
171
171
|
sqliteCode
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-26DHFMGZ.js";
|
|
173
173
|
import {
|
|
174
174
|
normalizeTag,
|
|
175
175
|
tagOf
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-2UUWXPOB.js";
|
|
177
177
|
import {
|
|
178
178
|
CHAT_MESSAGES_READ,
|
|
179
179
|
FACT_TYPES,
|
|
@@ -183,6 +183,7 @@ import {
|
|
|
183
183
|
MeetingError,
|
|
184
184
|
READ_BUDGET_EXCEEDED,
|
|
185
185
|
REVIEW_LIMIT,
|
|
186
|
+
TRANSCRIPT_WORDS,
|
|
186
187
|
aggregateMeetingCounts,
|
|
187
188
|
aggregateMeetingStats,
|
|
188
189
|
calendarText,
|
|
@@ -217,7 +218,7 @@ import {
|
|
|
217
218
|
validateMeetingRelatedHistory,
|
|
218
219
|
validateMeetingSeriesHistory,
|
|
219
220
|
validatePayment
|
|
220
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-PRW6SYA3.js";
|
|
221
222
|
import {
|
|
222
223
|
OPERATORS_BY_TYPE,
|
|
223
224
|
dateRange,
|
|
@@ -230,13 +231,13 @@ import {
|
|
|
230
231
|
validateQuery,
|
|
231
232
|
walkQuery,
|
|
232
233
|
zonedMoment
|
|
233
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-OF422U5D.js";
|
|
234
235
|
import {
|
|
235
236
|
DEFAULT_TASK_CATEGORIES,
|
|
236
237
|
sharedConfigPath,
|
|
237
238
|
storedTaskCategories,
|
|
238
239
|
taskCategoriesReader
|
|
239
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-GBKNJWOZ.js";
|
|
240
241
|
import {
|
|
241
242
|
SQLiteTable,
|
|
242
243
|
TableAliasProxyHandler,
|
|
@@ -261,23 +262,23 @@ import {
|
|
|
261
262
|
sql,
|
|
262
263
|
sqliteTable,
|
|
263
264
|
text
|
|
264
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-FT3LN3HP.js";
|
|
265
266
|
import {
|
|
266
267
|
PRAGMAS,
|
|
267
268
|
TIME_LIMIT_FUNCTION,
|
|
268
269
|
TimeLimitReached,
|
|
269
270
|
isQueryOnly
|
|
270
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-4HWJOU7N.js";
|
|
271
272
|
import {
|
|
272
273
|
refuseOwnerStoreInTests,
|
|
273
274
|
storePath
|
|
274
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-Z3KUSRCF.js";
|
|
275
276
|
import {
|
|
276
277
|
resolveFrom
|
|
277
278
|
} from "./chunk-Y5E2WNWB.js";
|
|
278
279
|
import {
|
|
279
280
|
singleLine
|
|
280
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-KYKW2W6X.js";
|
|
281
282
|
import {
|
|
282
283
|
array,
|
|
283
284
|
boolean,
|
|
@@ -295,11 +296,11 @@ import {
|
|
|
295
296
|
safeParse,
|
|
296
297
|
strictObject,
|
|
297
298
|
string
|
|
298
|
-
} from "./chunk-
|
|
299
|
+
} from "./chunk-OJSBWP3F.js";
|
|
299
300
|
import {
|
|
300
301
|
CliError,
|
|
301
302
|
isCliError
|
|
302
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-4QNW4NK6.js";
|
|
303
304
|
import {
|
|
304
305
|
__commonJS,
|
|
305
306
|
__name,
|
|
@@ -10043,7 +10044,7 @@ var require_cjs = __commonJS({
|
|
|
10043
10044
|
}
|
|
10044
10045
|
});
|
|
10045
10046
|
|
|
10046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10047
10048
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10048
10049
|
const methods = whole;
|
|
10049
10050
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10171,7 +10172,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10171
10172
|
};
|
|
10172
10173
|
}, "bindAccount");
|
|
10173
10174
|
|
|
10174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10175
10176
|
var IndexBuilderOn = class {
|
|
10176
10177
|
static {
|
|
10177
10178
|
__name(this, "IndexBuilderOn");
|
|
@@ -10366,7 +10367,7 @@ function alias(table, alias2) {
|
|
|
10366
10367
|
}
|
|
10367
10368
|
__name(alias, "alias");
|
|
10368
10369
|
|
|
10369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
|
|
10370
10371
|
var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10371
10372
|
var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
10372
10373
|
var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
|
|
@@ -10485,7 +10486,7 @@ var fieldError = /* @__PURE__ */ __name((schema, value, at2 = []) => {
|
|
|
10485
10486
|
return void 0;
|
|
10486
10487
|
}, "fieldError");
|
|
10487
10488
|
|
|
10488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/record-types.js
|
|
10489
10490
|
var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
|
|
10490
10491
|
var PARTY = ["person", "organization"];
|
|
10491
10492
|
var ORGANIZATION = ["organization"];
|
|
@@ -10880,7 +10881,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf2(type).some(([, role])
|
|
|
10880
10881
|
var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
|
|
10881
10882
|
var article = /* @__PURE__ */ __name((word2) => /^[aeiou]/.test(word2) ? "an" : "a", "article");
|
|
10882
10883
|
|
|
10883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10884
10885
|
var ENTITY_TABLES = {
|
|
10885
10886
|
...RECORD_TABLES,
|
|
10886
10887
|
account: "accounts",
|
|
@@ -10919,11 +10920,11 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10919
10920
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10920
10921
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10921
10922
|
|
|
10922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10923
10924
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10924
10925
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10925
10926
|
|
|
10926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10927
10928
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10928
10929
|
var mergeSql = /* @__PURE__ */ __name((event2) => `(${event2}.from_person_id IS NOT NULL AND ${event2}.from_person_id <> ${event2}.to_person_id AND ${event2}.method NOT IN (${SEPARATIONS.map((method) => `'${method}'`).join(", ")}) AND NOT EXISTS (SELECT 1 FROM identity_link_events stay WHERE stay.to_person_id = ${event2}.from_person_id AND stay.identity_id <> ${event2}.identity_id AND stay.id < ${event2}.id AND stay.id = (SELECT max(s.id) FROM identity_link_events s WHERE s.identity_id = stay.identity_id AND s.id < ${event2}.id) AND NOT EXISTS (SELECT 1 FROM identity_link_events went WHERE went.identity_id = stay.identity_id AND went.from_person_id = ${event2}.from_person_id AND went.to_person_id = ${event2}.to_person_id AND went.id = (SELECT min(w.id) FROM identity_link_events w WHERE w.identity_id = stay.identity_id AND w.id > ${event2}.id))))`, "mergeSql");
|
|
10929
10930
|
var mergedAwaySql = /* @__PURE__ */ __name((person2) => `(${person2}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person2}.id) AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person2}.id AND ${mergeSql("me")}))`, "mergedAwaySql");
|
|
@@ -10955,7 +10956,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10955
10956
|
}, "samePersons");
|
|
10956
10957
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10957
10958
|
|
|
10958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10959
10960
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10960
10961
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10961
10962
|
const at2 = ref3.indexOf(":");
|
|
@@ -11062,13 +11063,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11062
11063
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11063
11064
|
}, "forgetErasedLinks");
|
|
11064
11065
|
|
|
11065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11066
11067
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11067
11068
|
|
|
11068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11069
11070
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11070
11071
|
|
|
11071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11072
11073
|
var TASK_CLOSE_KIND = "task_close";
|
|
11073
11074
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11074
11075
|
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND || kind3 === SOURCE_REVIEW_KIND || kind3 === IDENTITY_LINK_KIND || kind3 === IDENTITY_SPLIT_KIND, "isOwnerOnlyKind");
|
|
@@ -11116,7 +11117,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11116
11117
|
}, "assertMayDecide");
|
|
11117
11118
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11118
11119
|
|
|
11119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/addresses.js
|
|
11120
11121
|
var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
|
|
11121
11122
|
var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
|
|
11122
11123
|
var ROLE_ADDRESS_WORDS = {
|
|
@@ -11178,7 +11179,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
|
|
|
11178
11179
|
var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
|
|
11179
11180
|
var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
|
|
11180
11181
|
|
|
11181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11182
11183
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11183
11184
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11184
11185
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11208,7 +11209,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11208
11209
|
]);
|
|
11209
11210
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11210
11211
|
|
|
11211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11212
11213
|
var BY_ADDRESS = "SELECT DISTINCT o.id FROM organizations o JOIN organization_identities oi ON oi.organization_id = o.id JOIN identities i ON i.id = oi.identity_id WHERE o.deleted_at IS NULL AND i.provider = 'email' AND ";
|
|
11213
11214
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11214
11215
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11233,7 +11234,7 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11233
11234
|
return id2;
|
|
11234
11235
|
}, "organizationOfAddress");
|
|
11235
11236
|
|
|
11236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
11237
11238
|
var PHONE_PLANS = [
|
|
11238
11239
|
{
|
|
11239
11240
|
country: "us",
|
|
@@ -11613,7 +11614,7 @@ var PHONE_PLANS = [
|
|
|
11613
11614
|
}
|
|
11614
11615
|
];
|
|
11615
11616
|
|
|
11616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
11617
11618
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
11618
11619
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
11619
11620
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -11688,10 +11689,10 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
|
|
|
11688
11689
|
return found2 ? `+${found2[1]}` : void 0;
|
|
11689
11690
|
}, "storedPhone");
|
|
11690
11691
|
|
|
11691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11692
11693
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11693
11694
|
|
|
11694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11695
11696
|
import { existsSync, statSync } from "node:fs";
|
|
11696
11697
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11697
11698
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11717,7 +11718,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11717
11718
|
throw new CliError("conflict", "the store's journal file was deleted or replaced by another program while this command had the store open, so nothing more is written; `store recover` says what to do", { reason: "store.journal-replaced" });
|
|
11718
11719
|
}, "checkJournal");
|
|
11719
11720
|
|
|
11720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11721
11722
|
var WRITE = /^\s*(?:WITH\b[\s\S]*?\)\s*)?(INSERT|REPLACE|UPDATE|DELETE)\b(?:\s+OR\s+[A-Za-z]+)?\s+(?:INTO\s+|FROM\s+)?(?:("?)(\w+)\2\.)?["`[]?(\w+)/i;
|
|
11722
11723
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11723
11724
|
const match = WRITE.exec(sql2);
|
|
@@ -11797,7 +11798,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11797
11798
|
}, "committedWrites");
|
|
11798
11799
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11799
11800
|
|
|
11800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11801
11802
|
var ARMS = [
|
|
11802
11803
|
[
|
|
11803
11804
|
"message",
|
|
@@ -11925,7 +11926,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11925
11926
|
return recomputed;
|
|
11926
11927
|
}, "drainInvolvementQueue");
|
|
11927
11928
|
|
|
11928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11929
11930
|
import { domainToUnicode } from "node:url";
|
|
11930
11931
|
|
|
11931
11932
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21947,7 +21948,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21947
21948
|
}, "oa");
|
|
21948
21949
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21949
21950
|
|
|
21950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21951
21952
|
var BEFORE = [
|
|
21952
21953
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21953
21954
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -22207,7 +22208,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
22207
22208
|
return found2.sort((a, b) => a.start - b.start);
|
|
22208
22209
|
}, "findPlaces");
|
|
22209
22210
|
|
|
22210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
22211
22212
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
22212
22213
|
var MENTION_VERSIONS = {
|
|
22213
22214
|
phone: 1,
|
|
@@ -22383,7 +22384,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
22383
22384
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
22384
22385
|
}, "exactlyOne");
|
|
22385
22386
|
|
|
22386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22387
22388
|
var RUSSIAN = "\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0435\u0439 \u0410\u043D\u0430\u0442\u043E\u043B\u0438\u0439 \u0410\u043D\u0434\u0440\u0435\u0439 \u0410\u043D\u0442\u043E\u043D \u0410\u0440\u043A\u0430\u0434\u0438\u0439 \u0410\u0440\u0441\u0435\u043D\u0438\u0439 \u0410\u0440\u0442\u0451\u043C \u0410\u0440\u0442\u0435\u043C \u0410\u0440\u0442\u0443\u0440 \u0411\u043E\u0440\u0438\u0441 \u0412\u0430\u0434\u0438\u043C \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D \u0412\u0430\u043B\u0435\u0440\u0438\u0439 \u0412\u0430\u0441\u0438\u043B\u0438\u0439 \u0412\u0438\u043A\u0442\u043E\u0440 \u0412\u0438\u0442\u0430\u043B\u0438\u0439 \u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440 \u0412\u043B\u0430\u0434\u0438\u0441\u043B\u0430\u0432 \u0412\u0441\u0435\u0432\u043E\u043B\u043E\u0434 \u0412\u044F\u0447\u0435\u0441\u043B\u0430\u0432 \u0413\u0435\u043D\u043D\u0430\u0434\u0438\u0439 \u0413\u0435\u043E\u0440\u0433\u0438\u0439 \u0413\u043B\u0435\u0431 \u0413\u0440\u0438\u0433\u043E\u0440\u0438\u0439 \u0414\u0430\u043D\u0438\u0438\u043B \u0414\u0430\u043D\u0438\u043B\u0430 \u0414\u0435\u043D\u0438\u0441 \u0414\u043C\u0438\u0442\u0440\u0438\u0439 \u0415\u0432\u0433\u0435\u043D\u0438\u0439 \u0415\u0433\u043E\u0440 \u0418\u0432\u0430\u043D \u0418\u0433\u043E\u0440\u044C \u0418\u043B\u044C\u044F \u041A\u0438\u0440\u0438\u043B\u043B \u041A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0438\u043D \u041B\u0435\u043E\u043D\u0438\u0434 \u041C\u0430\u043A\u0441\u0438\u043C \u041C\u0430\u0440\u0430\u0442 \u041C\u0430\u0442\u0432\u0435\u0439 \u041C\u0438\u0445\u0430\u0438\u043B \u041D\u0438\u043A\u0438\u0442\u0430 \u041D\u0438\u043A\u043E\u043B\u0430\u0439 \u041E\u043B\u0435\u0433 \u041F\u0430\u0432\u0435\u043B \u041F\u0451\u0442\u0440 \u041F\u0435\u0442\u0440 \u0420\u043E\u0434\u0438\u043E\u043D \u0420\u043E\u0441\u0442\u0438\u0441\u043B\u0430\u0432 \u0420\u0443\u0441\u043B\u0430\u043D \u0420\u0443\u0441\u0442\u0430\u043C \u0421\u0435\u043C\u0451\u043D \u0421\u0435\u043C\u0435\u043D \u0421\u0435\u0440\u0433\u0435\u0439 \u0421\u0442\u0430\u043D\u0438\u0441\u043B\u0430\u0432 \u0421\u0442\u0435\u043F\u0430\u043D \u0422\u0438\u043C\u043E\u0444\u0435\u0439 \u0422\u0438\u043C\u0443\u0440 \u0424\u0451\u0434\u043E\u0440 \u0424\u0435\u0434\u043E\u0440 \u0424\u0438\u043B\u0438\u043F\u043F \u042D\u0434\u0443\u0430\u0440\u0434 \u042E\u0440\u0438\u0439 \u042F\u0440\u043E\u0441\u043B\u0430\u0432 \u042F\u043A\u043E\u0432 \u042D\u043B\u044C\u0434\u0430\u0440 \u0414\u0430\u0432\u0438\u0434 \u0417\u0430\u0445\u0430\u0440 \u0421\u0430\u0432\u0435\u043B\u0438\u0439 \u041C\u0438\u0440\u043E\u043D \u041F\u043B\u0430\u0442\u043E\u043D \u0414\u0435\u043C\u0438\u0434 \u0410\u0440\u0441\u0435\u043D \u041D\u0443\u0440\u043B\u0430\u043D \u0410\u043D\u0437\u043E\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u0430 \u0410\u043B\u0438\u043D\u0430 \u0410\u043B\u0438\u0441\u0430 \u0410\u043B\u043B\u0430 \u0410\u043D\u0430\u0441\u0442\u0430\u0441\u0438\u044F \u0410\u043D\u0433\u0435\u043B\u0438\u043D\u0430 \u0410\u043D\u043D\u0430 \u0410\u043D\u0442\u043E\u043D\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u0440\u0438\u044F \u0412\u0430\u0440\u0432\u0430\u0440\u0430 \u0412\u0435\u0440\u043E\u043D\u0438\u043A\u0430 \u0412\u0438\u043A\u0442\u043E\u0440\u0438\u044F \u0413\u0430\u043B\u0438\u043D\u0430 \u0414\u0430\u0440\u044C\u044F \u0414\u0438\u0430\u043D\u0430 \u0415\u0432\u0433\u0435\u043D\u0438\u044F \u0415\u043A\u0430\u0442\u0435\u0440\u0438\u043D\u0430 \u0415\u043B\u0435\u043D\u0430 \u0415\u043B\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u0416\u0430\u043D\u043D\u0430 \u0417\u0438\u043D\u0430\u0438\u0434\u0430 \u041A\u0430\u0440\u0438\u043D\u0430 \u041A\u0438\u0440\u0430 \u041A\u043B\u0430\u0432\u0434\u0438\u044F \u041A\u0440\u0438\u0441\u0442\u0438\u043D\u0430 \u041A\u0441\u0435\u043D\u0438\u044F \u041B\u0430\u0440\u0438\u0441\u0430 \u041B\u0438\u0434\u0438\u044F \u041B\u044E\u0434\u043C\u0438\u043B\u0430 \u041C\u0430\u0440\u0433\u0430\u0440\u0438\u0442\u0430 \u041C\u0430\u0440\u0438\u043D\u0430 \u041C\u0430\u0440\u0438\u044F \u041C\u0438\u043B\u0430\u043D\u0430 \u041D\u0430\u0442\u0430\u043B\u044C\u044F \u041D\u0430\u0442\u0430\u043B\u0438\u044F \u041D\u0438\u043D\u0430 \u041E\u043A\u0441\u0430\u043D\u0430 \u041E\u043B\u0435\u0441\u044F \u041E\u043B\u044C\u0433\u0430 \u041F\u043E\u043B\u0438\u043D\u0430 \u0420\u0430\u0438\u0441\u0430 \u0421\u0432\u0435\u0442\u043B\u0430\u043D\u0430 \u0421\u043E\u0444\u0438\u044F \u0421\u043E\u0444\u044C\u044F \u0422\u0430\u0438\u0441\u0438\u044F \u0422\u0430\u043C\u0430\u0440\u0430 \u0422\u0430\u0442\u044C\u044F\u043D\u0430 \u0423\u043B\u044C\u044F\u043D\u0430 \u042E\u043B\u0438\u044F \u042D\u043B\u044C\u0432\u0438\u0440\u0430 \u0420\u0435\u0433\u0438\u043D\u0430 \u0421\u043D\u0435\u0436\u0430\u043D\u0430 \u0410\u043B\u0451\u043D\u0430 \u0410\u043B\u0435\u043D\u0430 \u0412\u0430\u0441\u0438\u043B\u0438\u0441\u0430 \u0410\u0440\u0438\u043D\u0430 \u0415\u0441\u0435\u043D\u0438\u044F \u042D\u0432\u0435\u043B\u0438\u043D\u0430 \u0421\u0430\u0448\u0430 \u0416\u0435\u043D\u044F \u0412\u0430\u043B\u044F \u0414\u0438\u043C\u0430 \u041C\u0438\u0448\u0430 \u041A\u043E\u043B\u044F \u041F\u0435\u0442\u044F \u0412\u0430\u0441\u044F \u0421\u0435\u0440\u0451\u0436\u0430 \u0421\u0435\u0440\u0435\u0436\u0430 \u041F\u0430\u0448\u0430 \u041B\u0451\u0448\u0430 \u041B\u0435\u0448\u0430 \u0412\u0438\u0442\u044F \u041A\u043E\u0441\u0442\u044F \u0412\u043E\u0432\u0430 \u0412\u043E\u043B\u043E\u0434\u044F \u0412\u0430\u043D\u044F \u0413\u043E\u0448\u0430 \u0413\u0440\u0438\u0448\u0430 \u0422\u043E\u043B\u044F \u0411\u043E\u0440\u044F \u0421\u0442\u0430\u0441 \u0422\u0451\u043C\u0430 \u0422\u0430\u043D\u044F \u041A\u0430\u0442\u044F \u041B\u0435\u043D\u0430 \u041D\u0430\u0442\u0430\u0448\u0430 \u0421\u0432\u0435\u0442\u0430 \u042E\u043B\u044F \u041D\u0430\u0441\u0442\u044F \u0414\u0430\u0448\u0430 \u041C\u0430\u0448\u0430 \u041B\u044E\u0434\u0430 \u0413\u0430\u043B\u044F \u0412\u0438\u043A\u0430 \u041A\u0441\u044E\u0448\u0430 \u041B\u0438\u0437\u0430 \u0421\u043E\u043D\u044F \u041D\u0430\u0434\u044F \u041B\u0435\u0440\u0430 \u0410\u043B\u0451\u0448\u0430 \u0410\u043B\u0435\u0448\u0430 \u041C\u0438\u0442\u044F \u0421\u0435\u043D\u044F \u0424\u0435\u0434\u044F \u0416\u0435\u043D\u0435\u0447\u043A\u0430 \u041E\u043B\u0435\u043D\u044C\u043A\u0430 \u0422\u0430\u043D\u0435\u0447\u043A\u0430";
|
|
22388
22389
|
var EUROPEAN = "James John Robert Michael William David Richard Joseph Thomas Charles Christopher Daniel Matthew Anthony Donald Steven Paul Andrew Joshua Kenneth Kevin Brian George Timothy Ronald Edward Jason Jeffrey Ryan Jacob Gary Nicholas Eric Jonathan Stephen Larry Justin Scott Brandon Benjamin Samuel Gregory Alexander Patrick Raymond Dennis Jerry Tyler Aaron Nathan Henry Peter Zachary Douglas Harold Kyle Noah Ethan Oliver Harry Lucas Liam Mary Patricia Jennifer Linda Elizabeth Barbara Susan Jessica Sarah Karen Lisa Nancy Betty Margaret Sandra Ashley Kimberly Emily Donna Michelle Carol Amanda Dorothy Melissa Deborah Stephanie Rebecca Sharon Laura Cynthia Kathleen Angela Shirley Anna Brenda Pamela Emma Nicole Helen Samantha Katherine Christine Rachel Carolyn Janet Catherine Maria Heather Diane Ruth Julie Olivia Joyce Kelly Lauren Christina Joan Evelyn Judith Megan Andrea Cheryl Hannah Jacqueline Martha Teresa Sara Madison Frances Kathryn Janice Abigail Alice Julia Judy Sophia Denise Doris Marilyn Danielle Beverly Isabella Theresa Diana Natalie Charlotte Marie Kayla Alexis Javier Carlos Antonio Manuel Francisco Juan Pedro Alejandro Miguel Rafael Pablo Sergio Fernando Jorge Luis Alberto \xC1lvaro Diego Adri\xE1n Rub\xE9n Iv\xE1n \xD3scar Andr\xE9s Ra\xFAl Enrique Vicente Joaqu\xEDn Ignacio Gonzalo Marcos V\xEDctor Jaime Alfonso Guillermo Tom\xE1s Emilio Gabriel Nicol\xE1s Mart\xEDn Jordi Josep Xavier Luc\xEDa Carmen Isabel Cristina Marta Elena Raquel Silvia Beatriz Paula Nuria N\xFAria Sonia Alicia Irene Montserrat Inmaculada Noelia Lorena Sof\xEDa Valeria Claudia Natalia Sandra Ver\xF3nica Esther Yolanda Vanesa Laia Klaus J\xFCrgen Wolfgang Stefan Andreas Matthias Markus Tobias Florian Lukas Jonas Maximilian Sebastian Dirk Sabine Ursula Petra Monika Katrin Anja Pierre Michel Philippe Alain Fran\xE7ois Christophe Laurent Olivier Julien Mathieu S\xE9bastien Guillaume Antoine Camille Nathalie Isabelle Sylvie Sophie C\xE9line Aur\xE9lie Chlo\xE9 Manon Giuseppe Giovanni Marco Luca Francesco Alessandro Matteo Lorenzo Stefano Paolo Roberto Davide Simone Federico Giulia Francesca Chiara Valentina Alessia Martina Elisa Jo\xE3o Pedro Tiago Beatriz In\xEAs Mariana Piotr Krzysztof Tomasz Marcin Agnieszka Katarzyna Ma\u0142gorzata Magdalena";
|
|
22389
22390
|
var WORDS = "\u0412\u0435\u0440\u0430 \u041D\u0430\u0434\u0435\u0436\u0434\u0430 \u041B\u044E\u0431\u043E\u0432\u044C \u0421\u043B\u0430\u0432\u0430 \u0420\u043E\u043C\u0430\u043D \u0420\u043E\u0437\u0430 \u041C\u0430\u0439\u044F \u041B\u0438\u043B\u0438\u044F \u0417\u043B\u0430\u0442\u0430 \u041C\u0438\u043B\u0430 \u041D\u0438\u043A\u0430 \u041B\u0435\u0432 \u0413\u043B\u043E\u0440\u0438\u044F Will Mark Rose Grace Hope Faith Bill Frank Jack June April Summer Amber Ruby Lily Daisy Victoria Virginia Georgia Florence Sydney Chelsea Jordan Austin Dallas Mercedes Dolores Rosa Pilar Marina Esperanza Gloria Amparo Consuelo Roc\xEDo Salvador Santiago Jes\xFAs \xC1ngeles Hugo Ram\xF3n Christian Felix F\xE9lix Mario Martin Victor Pierre Paz Merc\xE8 Estrella Aurora Concepci\xF3n Remedios Soledad Milagros Angel \xC1ngel Dawn Joy Holly Ivy Iris Violet Pearl";
|
|
@@ -22391,7 +22392,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22391
22392
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22392
22393
|
var NAME_WORDS = WORDS.split(" ");
|
|
22393
22394
|
|
|
22394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22395
22396
|
var LATIN_TO_CYRILLIC = {
|
|
22396
22397
|
shch: "\u0449",
|
|
22397
22398
|
sch: "\u0449",
|
|
@@ -22599,7 +22600,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
22599
22600
|
return found2;
|
|
22600
22601
|
}, "findUnknownNames");
|
|
22601
22602
|
|
|
22602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22603
22604
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22604
22605
|
"webpage",
|
|
22605
22606
|
"share",
|
|
@@ -22640,7 +22641,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22640
22641
|
});
|
|
22641
22642
|
}, "matchDownloads");
|
|
22642
22643
|
|
|
22643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
22644
22645
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
22645
22646
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
22646
22647
|
kind: "char",
|
|
@@ -22941,7 +22942,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
22941
22942
|
const chars = [...pattern.normalize("NFC")];
|
|
22942
22943
|
let out = "";
|
|
22943
22944
|
let at2 = 0;
|
|
22944
|
-
const
|
|
22945
|
+
const literal5 = /* @__PURE__ */ __name((c) => {
|
|
22945
22946
|
if (!/[\p{L}\p{N}\p{M}]/u.test(c))
|
|
22946
22947
|
return c;
|
|
22947
22948
|
const folded6 = fold(c);
|
|
@@ -23020,7 +23021,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23020
23021
|
if (next === void 0)
|
|
23021
23022
|
out += c;
|
|
23022
23023
|
else
|
|
23023
|
-
out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` :
|
|
23024
|
+
out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` : literal5(next);
|
|
23024
23025
|
} else if (c === '"') {
|
|
23025
23026
|
const end = chars.indexOf('"', at2);
|
|
23026
23027
|
if (end < 0) {
|
|
@@ -23035,12 +23036,12 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
23035
23036
|
} else if (c === "[")
|
|
23036
23037
|
characterClass();
|
|
23037
23038
|
else
|
|
23038
|
-
out +=
|
|
23039
|
+
out += literal5(c);
|
|
23039
23040
|
}
|
|
23040
23041
|
return out;
|
|
23041
23042
|
}, "foldRegex");
|
|
23042
23043
|
|
|
23043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
23044
23045
|
var PRESET_VERSION = 1;
|
|
23045
23046
|
var PRESETS = {
|
|
23046
23047
|
password: {
|
|
@@ -23094,12 +23095,12 @@ var PRESETS = {
|
|
|
23094
23095
|
}
|
|
23095
23096
|
};
|
|
23096
23097
|
|
|
23097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
23098
23099
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
23099
23100
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
23100
23101
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
23101
23102
|
|
|
23102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
23103
23104
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
23104
23105
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
23105
23106
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -23123,7 +23124,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
23123
23124
|
};
|
|
23124
23125
|
}, "linkMatch");
|
|
23125
23126
|
|
|
23126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
23127
23128
|
var SETTING = "phoneCountries";
|
|
23128
23129
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
23129
23130
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -23154,7 +23155,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
23154
23155
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
23155
23156
|
}, "valueMatch");
|
|
23156
23157
|
|
|
23157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
23158
23159
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
23159
23160
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
23160
23161
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23182,7 +23183,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23182
23183
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23183
23184
|
}, "vocabularySimilarity");
|
|
23184
23185
|
|
|
23185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23186
23187
|
import { createHash } from "node:crypto";
|
|
23187
23188
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
23188
23189
|
try {
|
|
@@ -23248,7 +23249,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23248
23249
|
});
|
|
23249
23250
|
}, "guardTagCreation");
|
|
23250
23251
|
|
|
23251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23252
23253
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23253
23254
|
throw new CliError("validation_error", message3);
|
|
23254
23255
|
}, "invalid");
|
|
@@ -23325,7 +23326,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23325
23326
|
};
|
|
23326
23327
|
}, "createTagRedirectIndex");
|
|
23327
23328
|
|
|
23328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23329
23330
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23330
23331
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23331
23332
|
if (!row2)
|
|
@@ -23353,7 +23354,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23353
23354
|
return snapshot2;
|
|
23354
23355
|
}, "tagRedirectSnapshot");
|
|
23355
23356
|
|
|
23356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23357
23358
|
import { createHash as createHash2 } from "node:crypto";
|
|
23358
23359
|
var TASK_KEY_PREFIXES = {
|
|
23359
23360
|
question: "Q",
|
|
@@ -23381,7 +23382,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23381
23382
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23382
23383
|
}, "taskAccountOf");
|
|
23383
23384
|
|
|
23384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
23385
23386
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
23386
23387
|
var REFERABLE = {
|
|
23387
23388
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -23541,7 +23542,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23541
23542
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
23542
23543
|
}, "taskIdOf");
|
|
23543
23544
|
|
|
23544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23545
23546
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
23546
23547
|
if (iso17 === null || iso17 === void 0)
|
|
23547
23548
|
return null;
|
|
@@ -23555,7 +23556,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23555
23556
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23556
23557
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23557
23558
|
|
|
23558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23559
23560
|
var TAG_KINDS = ["tag", "topic"];
|
|
23560
23561
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23561
23562
|
var TAG_TYPE = {
|
|
@@ -23758,7 +23759,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23758
23759
|
return result;
|
|
23759
23760
|
}, "tagsOf");
|
|
23760
23761
|
|
|
23761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
23762
23763
|
var MOST_YO_SPELLINGS = 64;
|
|
23763
23764
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
23764
23765
|
let spellings2 = [""];
|
|
@@ -23780,7 +23781,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
23780
23781
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
23781
23782
|
}).join("")}*`, "anyCaseGlob");
|
|
23782
23783
|
|
|
23783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23784
23785
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
23785
23786
|
var SPEECH = speech("att");
|
|
23786
23787
|
var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
|
|
@@ -24266,7 +24267,7 @@ var FIELD_COMPILERS = {
|
|
|
24266
24267
|
subject
|
|
24267
24268
|
};
|
|
24268
24269
|
|
|
24269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
24270
24271
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
24271
24272
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
24272
24273
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -24282,7 +24283,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
24282
24283
|
};
|
|
24283
24284
|
}, "placeOf");
|
|
24284
24285
|
|
|
24285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
24286
24287
|
var DRAIN_ON_WRITE = 500;
|
|
24287
24288
|
var METHOD = "rules";
|
|
24288
24289
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -24448,7 +24449,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24448
24449
|
return queued.length;
|
|
24449
24450
|
}, "drainMentions");
|
|
24450
24451
|
|
|
24451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24452
24453
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24453
24454
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24454
24455
|
if (!exists2)
|
|
@@ -24456,7 +24457,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24456
24457
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24457
24458
|
}, "indexRow");
|
|
24458
24459
|
|
|
24459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24460
24461
|
var INDEX = "message_stems";
|
|
24461
24462
|
var SETTING2 = "searchStemmers";
|
|
24462
24463
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24578,7 +24579,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24578
24579
|
};
|
|
24579
24580
|
}, "stemmerCache");
|
|
24580
24581
|
|
|
24581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24582
24583
|
var rehearsal = new AsyncLocalStorage();
|
|
24583
24584
|
var SQLITE_BUSY = 5;
|
|
24584
24585
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24721,7 +24722,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24721
24722
|
}
|
|
24722
24723
|
}, "read");
|
|
24723
24724
|
|
|
24724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24725
24726
|
var FOLDED = [
|
|
24726
24727
|
{ table: "tasks", column: "title" },
|
|
24727
24728
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24758,7 +24759,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24758
24759
|
return filled;
|
|
24759
24760
|
}, "fillFolded");
|
|
24760
24761
|
|
|
24761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24762
24763
|
import { createHash as createHash3 } from "node:crypto";
|
|
24763
24764
|
var CHUNK_CHARS = 1200;
|
|
24764
24765
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24863,7 +24864,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24863
24864
|
return chunks2;
|
|
24864
24865
|
}, "cutChunks");
|
|
24865
24866
|
|
|
24866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24867
24868
|
var DAY2 = 864e5;
|
|
24868
24869
|
var CURRENCY = [
|
|
24869
24870
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24989,7 +24990,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
24989
24990
|
return best?.day ?? null;
|
|
24990
24991
|
}, "dueDayOf");
|
|
24991
24992
|
|
|
24992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
24993
24994
|
var DAY3 = 864e5;
|
|
24994
24995
|
var STOP_WORDS = new Set([
|
|
24995
24996
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -25144,7 +25145,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
25144
25145
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
25145
25146
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
25146
25147
|
|
|
25147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
25148
25149
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
25149
25150
|
coalesce(CASE k.chunkable_type
|
|
25150
25151
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -25286,7 +25287,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
25286
25287
|
}, "dropUnusedVectors");
|
|
25287
25288
|
var dropAllUnusedVectors = /* @__PURE__ */ __name((database) => database.prepare("DELETE FROM embeddings WHERE NOT EXISTS (SELECT 1 FROM chunks k WHERE k.content_hash = embeddings.content_hash) RETURNING 1").all().length, "dropAllUnusedVectors");
|
|
25288
25289
|
|
|
25289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
25290
25291
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
25291
25292
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
25292
25293
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -25561,7 +25562,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25561
25562
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25562
25563
|
])), "vectorCounts");
|
|
25563
25564
|
|
|
25564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25565
25566
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25566
25567
|
var SCAN_PAGE2 = 5e3;
|
|
25567
25568
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25624,12 +25625,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25624
25625
|
}, "nearestPictures")
|
|
25625
25626
|
}), "documentPicturesOver");
|
|
25626
25627
|
|
|
25627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25628
25629
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
25629
25630
|
|
|
25630
25631
|
${text8}` : text8, "noteIndexText");
|
|
25631
25632
|
|
|
25632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25633
25634
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25634
25635
|
var ENRICHMENT_POSITION = 1e6;
|
|
25635
25636
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25723,10 +25724,10 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25723
25724
|
}), "clear")
|
|
25724
25725
|
}), "enrichmentsOver");
|
|
25725
25726
|
|
|
25726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25727
25728
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25728
|
-
const
|
|
25729
|
-
return wildcard ?? (/[*?[]/u.test(
|
|
25729
|
+
const literal5 = escaped2 ?? plain2 ?? "";
|
|
25730
|
+
return wildcard ?? (/[*?[]/u.test(literal5) ? `[${literal5}]` : literal5);
|
|
25730
25731
|
}).join(""), "glob");
|
|
25731
25732
|
var foldedWords = /* @__PURE__ */ __name((column2) => ({
|
|
25732
25733
|
where: /* @__PURE__ */ __name((node) => {
|
|
@@ -25799,7 +25800,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25799
25800
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
25800
25801
|
var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
25801
25802
|
|
|
25802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25803
25804
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25804
25805
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25805
25806
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25889,7 +25890,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25889
25890
|
});
|
|
25890
25891
|
}, "linkMeeting");
|
|
25891
25892
|
|
|
25892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25893
25894
|
var MAX_TITLE = 120;
|
|
25894
25895
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25895
25896
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -25951,7 +25952,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
25951
25952
|
}
|
|
25952
25953
|
}, "fillFoundTaskTitles");
|
|
25953
25954
|
|
|
25954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
25955
25956
|
var EVENT_TEXT = "trim(coalesce(e.description, '') || ' ' || coalesce(e.location, '') || ' ' || coalesce((SELECT group_concat(p.name, ' ') FROM calendar_entries ce JOIN calendar_entry_participants p ON p.entry_id = ce.id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL AND p.resource = 0 AND p.name IS NOT NULL), ''))";
|
|
25956
25957
|
var UNSEARCHED_EVENT_TYPES = [
|
|
25957
25958
|
"working-location",
|
|
@@ -26198,7 +26199,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
26198
26199
|
return true;
|
|
26199
26200
|
}, "resetNoteIndex");
|
|
26200
26201
|
|
|
26201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
26202
26203
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
26203
26204
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
26204
26205
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -26217,7 +26218,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
26217
26218
|
}
|
|
26218
26219
|
}, "resolvePersonLinks");
|
|
26219
26220
|
|
|
26220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
26221
26222
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
26222
26223
|
id: integer("id").primaryKey(),
|
|
26223
26224
|
name: text("name").notNull().unique(),
|
|
@@ -26226,7 +26227,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
26226
26227
|
updatedAt: integer("updated_at").notNull()
|
|
26227
26228
|
});
|
|
26228
26229
|
|
|
26229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
26230
26231
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
26231
26232
|
id: integer("id").primaryKey(),
|
|
26232
26233
|
linkId: integer("link_id").notNull(),
|
|
@@ -26238,7 +26239,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
26238
26239
|
createdAt: integer("created_at").notNull()
|
|
26239
26240
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
26240
26241
|
|
|
26241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
26242
26243
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
26243
26244
|
sourceKey: text("source_key").notNull(),
|
|
26244
26245
|
collection: text("collection").notNull(),
|
|
@@ -26248,13 +26249,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
26248
26249
|
createdAt: integer("created_at").notNull()
|
|
26249
26250
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
26250
26251
|
|
|
26251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
26252
26253
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
26253
26254
|
id: integer("id").notNull(),
|
|
26254
26255
|
indexableType: text("indexable_type").notNull()
|
|
26255
26256
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
26256
26257
|
|
|
26257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
26258
26259
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
26259
26260
|
id: integer("id").primaryKey(),
|
|
26260
26261
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -26274,7 +26275,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
26274
26275
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
26275
26276
|
]);
|
|
26276
26277
|
|
|
26277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
26278
26279
|
var enrichments = sqliteTable("enrichments", {
|
|
26279
26280
|
subjectType: text("subject_type").notNull(),
|
|
26280
26281
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -26286,7 +26287,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
26286
26287
|
createdAt: integer("created_at").notNull()
|
|
26287
26288
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
26288
26289
|
|
|
26289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
26290
26291
|
var templates = sqliteTable("templates", {
|
|
26291
26292
|
key: text("key").notNull(),
|
|
26292
26293
|
channel: text("channel").notNull(),
|
|
@@ -26308,7 +26309,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
26308
26309
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
26309
26310
|
]);
|
|
26310
26311
|
|
|
26311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
26312
26313
|
var links = sqliteTable("links", {
|
|
26313
26314
|
id: integer("id").primaryKey(),
|
|
26314
26315
|
fromType: text("from_type").notNull(),
|
|
@@ -26339,7 +26340,7 @@ var links = sqliteTable("links", {
|
|
|
26339
26340
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
26340
26341
|
]);
|
|
26341
26342
|
|
|
26342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
26343
26344
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
26344
26345
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
26345
26346
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26365,7 +26366,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26365
26366
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26366
26367
|
]);
|
|
26367
26368
|
|
|
26368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26369
26370
|
var accounts = sqliteTable("accounts", {
|
|
26370
26371
|
id: integer("id").primaryKey(),
|
|
26371
26372
|
provider: text("provider").notNull(),
|
|
@@ -28375,7 +28376,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28375
28376
|
at: integer("at").notNull()
|
|
28376
28377
|
});
|
|
28377
28378
|
|
|
28378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28379
28380
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28380
28381
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28381
28382
|
return void 0;
|
|
@@ -28621,7 +28622,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28621
28622
|
}, "meetingIdentityPk");
|
|
28622
28623
|
var phoneOf = /* @__PURE__ */ __name(({ orm }, provider, nativeId) => orm.select({ phone: identities.phone }).from(identities).where(and(eq(identities.provider, provider), eq(identities.externalId, nativeId))).get()?.phone ?? null, "phoneOf");
|
|
28623
28624
|
|
|
28624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
28625
28626
|
var TAKES = {
|
|
28626
28627
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
28627
28628
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -28681,7 +28682,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference2, scope3, profilesOn
|
|
|
28681
28682
|
throw wrongAccount(reference2, scope3, profiles);
|
|
28682
28683
|
}, "ensureAccount");
|
|
28683
28684
|
|
|
28684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
28685
28686
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
28686
28687
|
const padded = ` ${term} `;
|
|
28687
28688
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -28690,7 +28691,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
28690
28691
|
return [...pieces];
|
|
28691
28692
|
}, "trigrams");
|
|
28692
28693
|
|
|
28693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
28694
28695
|
var isId = /* @__PURE__ */ __name((reference2) => /^-?\d+$/.test(reference2.trim()), "isId");
|
|
28695
28696
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
28696
28697
|
var pickChat = /* @__PURE__ */ __name((reference2, chats2) => {
|
|
@@ -28761,7 +28762,7 @@ ${lines}`, { candidates });
|
|
|
28761
28762
|
}, "ambiguous");
|
|
28762
28763
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
28763
28764
|
|
|
28764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/display-names.js
|
|
28765
28766
|
var QUOTES = [
|
|
28766
28767
|
['"', '"'],
|
|
28767
28768
|
["'", "'"],
|
|
@@ -28819,7 +28820,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
|
|
|
28819
28820
|
}, "nameKey");
|
|
28820
28821
|
var isReadable = /* @__PURE__ */ __name((shown2) => shown2 !== null && READABLE.test(shown2), "isReadable");
|
|
28821
28822
|
|
|
28822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
28823
28824
|
var identitiesOf = /* @__PURE__ */ __name(({ database }, person2) => database.prepare("SELECT identity_id AS pk FROM identity_links WHERE person_id = ?").all(person2).map(({ pk }) => Number(pk)), "identitiesOf");
|
|
28824
28825
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
28825
28826
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -28834,7 +28835,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
28834
28835
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
28835
28836
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
28836
28837
|
|
|
28837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
28838
28839
|
var MESSAGE_FIELDS = {
|
|
28839
28840
|
pk: messages.id,
|
|
28840
28841
|
nativeId: messages.externalId,
|
|
@@ -29014,7 +29015,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
29014
29015
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
29015
29016
|
}), "chatActivity");
|
|
29016
29017
|
|
|
29017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
29018
29019
|
var HIT_FIELDS = {
|
|
29019
29020
|
...MESSAGE_FIELDS,
|
|
29020
29021
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -29115,7 +29116,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
29115
29116
|
};
|
|
29116
29117
|
}, "directReplies");
|
|
29117
29118
|
|
|
29118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
29119
29120
|
var identityRow = /* @__PURE__ */ __name(({ orm }, { provider, id: id2 }) => orm.select({ pk: identities.id, personPk: identityLinks.personId }).from(identities).innerJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, provider), eq(identities.externalId, id2))).get(), "identityRow");
|
|
29120
29121
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
29121
29122
|
const found2 = identityRow(context, ref3);
|
|
@@ -29328,7 +29329,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
29328
29329
|
}, "mentioning");
|
|
29329
29330
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
29330
29331
|
|
|
29331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
29332
29333
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
29333
29334
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
29334
29335
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -29385,7 +29386,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
29385
29386
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
29386
29387
|
}, "proposedBySql");
|
|
29387
29388
|
|
|
29388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
29389
29390
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
29390
29391
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
29391
29392
|
var KEPT = 20;
|
|
@@ -29480,7 +29481,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
29480
29481
|
return scrubbed;
|
|
29481
29482
|
}, "scrubSourceReviews");
|
|
29482
29483
|
|
|
29483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
29484
29485
|
var QUOTE_LIMIT = 500;
|
|
29485
29486
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
29486
29487
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -29759,7 +29760,7 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
29759
29760
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
29760
29761
|
}, "deleteDocumentRow");
|
|
29761
29762
|
|
|
29762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
29763
29764
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
29764
29765
|
var unregistered = /* @__PURE__ */ __name((provider) => `no CLI has registered ${provider} in this store yet; run its CLI once`, "unregistered");
|
|
29765
29766
|
var profilesOn = /* @__PURE__ */ __name((profiles, app, key2) => Object.entries(profiles[app] ?? {}).filter(([, saved]) => saved.provider === key2.provider && saved.account === key2.account).map(([name]) => name), "profilesOn");
|
|
@@ -29858,7 +29859,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
29858
29859
|
return `${WORDS2[summary.kind]} ${named2}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
29859
29860
|
}, "refLabel");
|
|
29860
29861
|
|
|
29861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
29862
29863
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
29863
29864
|
const unique2 = [...new Set(ids3)];
|
|
29864
29865
|
if (unique2.length === 0)
|
|
@@ -29947,7 +29948,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
29947
29948
|
}, "refEndsOf");
|
|
29948
29949
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
29949
29950
|
|
|
29950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
29951
29952
|
var EXCERPT_CHARS = 280;
|
|
29952
29953
|
var TITLE_CHARS = 120;
|
|
29953
29954
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -30371,7 +30372,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
30371
30372
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
30372
30373
|
}), "refsStoreOver");
|
|
30373
30374
|
|
|
30374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
30375
30376
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
30376
30377
|
ref: ref3,
|
|
30377
30378
|
kind: read2.kind,
|
|
@@ -30409,7 +30410,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
30409
30410
|
});
|
|
30410
30411
|
}, "evidenceSourcesOf");
|
|
30411
30412
|
|
|
30412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
30413
30414
|
import { randomBytes } from "node:crypto";
|
|
30414
30415
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
30415
30416
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -30422,7 +30423,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
30422
30423
|
return time3 + random;
|
|
30423
30424
|
}, "ulid");
|
|
30424
30425
|
|
|
30425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
30426
30427
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
30427
30428
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
30428
30429
|
if (!meta && !sections?.length)
|
|
@@ -30443,11 +30444,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
30443
30444
|
return typeof language === "string" && language !== "" ? language : null;
|
|
30444
30445
|
}, "languageOf");
|
|
30445
30446
|
|
|
30446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
30447
30448
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
30448
30449
|
var fileNoteRow = /* @__PURE__ */ __name((database, account, local, path) => database.prepare(local ? `SELECT d.*, f.account_id AS account_id, f.external_id AS external_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM files f JOIN documents d ON d.id = f.document_id WHERE f.account_id = ? AND f.external_id = ? AND ${LIVE3} ORDER BY d.created_at, d.id LIMIT 1` : `SELECT d.*, f.account_id AS account_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM documents d JOIN files f ON f.document_id = d.id AND f.account_id = d.account_id WHERE d.account_id = ? AND d.external_id = ? AND ${LIVE3} LIMIT 1`).get(account, path), "fileNoteRow");
|
|
30449
30450
|
|
|
30450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
30451
30452
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
30452
30453
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
30453
30454
|
if (isObject2(value))
|
|
@@ -30484,8 +30485,8 @@ var localFolder = /* @__PURE__ */ __name((database, now2, accountId, path) => {
|
|
|
30484
30485
|
var logFileLink = /* @__PURE__ */ __name((database, now2, fileId, from2, to, method = "import", author = "rules") => database.prepare("INSERT INTO entity_link_events (linkable_type, linkable_id, entity_type, from_entity_id, to_entity_id, method, confidence, author, created_at) VALUES ('file', ?, 'document', ?, ?, ?, 1, ?, ?)").run(fileId, from2 == null ? null : Number(from2), to, method, author, now2), "logFileLink");
|
|
30485
30486
|
var driveFileTarget = /* @__PURE__ */ __name((fileId) => `google-drive:${fileId}`, "driveFileTarget");
|
|
30486
30487
|
var driveDocumentOf = /* @__PURE__ */ __name((database, fileId) => {
|
|
30487
|
-
const
|
|
30488
|
-
return
|
|
30488
|
+
const row2 = database.prepare("SELECT MIN(f.document_id) AS id FROM files f JOIN accounts a ON a.id = f.account_id WHERE a.provider = 'google-drive' AND f.external_id = ? AND f.deleted_at IS NULL AND f.document_id IS NOT NULL").get(fileId);
|
|
30489
|
+
return row2?.id == null ? null : Number(row2.id);
|
|
30489
30490
|
}, "driveDocumentOf");
|
|
30490
30491
|
var linkAttached = /* @__PURE__ */ __name((database, now2, fileId) => {
|
|
30491
30492
|
const target = driveFileTarget(fileId);
|
|
@@ -30694,7 +30695,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30694
30695
|
};
|
|
30695
30696
|
}, "filesStoreOver");
|
|
30696
30697
|
|
|
30697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
30698
30699
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
30699
30700
|
entity: "document",
|
|
30700
30701
|
backend: "sql",
|
|
@@ -30740,7 +30741,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
30740
30741
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
30741
30742
|
}, "importedDocumentWhere");
|
|
30742
30743
|
|
|
30743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
30744
30745
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
30745
30746
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
30746
30747
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -30748,7 +30749,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
30748
30749
|
reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
|
|
30749
30750
|
}, "reviewLink");
|
|
30750
30751
|
|
|
30751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
30752
30753
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30753
30754
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
30754
30755
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -30782,7 +30783,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
30782
30783
|
};
|
|
30783
30784
|
}, "linkOf");
|
|
30784
30785
|
|
|
30785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
30786
30787
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
30787
30788
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
30788
30789
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -30803,7 +30804,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
30803
30804
|
return changed;
|
|
30804
30805
|
}, "dateFileNotes");
|
|
30805
30806
|
|
|
30806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
30807
30808
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
30808
30809
|
const value = text8.trim();
|
|
30809
30810
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -30816,7 +30817,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
30816
30817
|
return value;
|
|
30817
30818
|
}, "oneOf");
|
|
30818
30819
|
|
|
30819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
30820
30821
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
30821
30822
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
30822
30823
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31336,10 +31337,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31336
31337
|
};
|
|
31337
31338
|
}, "notesStoreOver");
|
|
31338
31339
|
|
|
31339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
31340
31341
|
var pageOfRows = /* @__PURE__ */ __name((rows, limit, offset = 0) => rows.length > limit ? { items: rows.slice(0, limit), hasMore: true, nextOffset: offset + limit } : { items: rows, hasMore: false }, "pageOfRows");
|
|
31341
31342
|
|
|
31342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
31343
31344
|
var NAMED = "SELECT m.*, b.name AS author_name, b.kind AS author_kind FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
|
|
31344
31345
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31345
31346
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31604,7 +31605,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31604
31605
|
};
|
|
31605
31606
|
}, "memoriesStoreOver");
|
|
31606
31607
|
|
|
31607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
31608
31609
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
31609
31610
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
31610
31611
|
throw new CliError(code, message3, { reason });
|
|
@@ -31752,7 +31753,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
31752
31753
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
31753
31754
|
}, "reviewedRowsOver");
|
|
31754
31755
|
|
|
31755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
31756
31757
|
var MAX_LINES = 500;
|
|
31757
31758
|
var PARENTS = {
|
|
31758
31759
|
invoice: {
|
|
@@ -31852,7 +31853,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
31852
31853
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
31853
31854
|
}, "moneyLinesOver");
|
|
31854
31855
|
|
|
31855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
31856
31857
|
var COUNTED = {
|
|
31857
31858
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
31858
31859
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -31927,7 +31928,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31927
31928
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
31928
31929
|
}, "refundRulesOver");
|
|
31929
31930
|
|
|
31930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
31931
31932
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
31932
31933
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
31933
31934
|
var PAID = netPaidSql("i.id");
|
|
@@ -32331,7 +32332,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32331
32332
|
};
|
|
32332
32333
|
}, "financeStoreOver");
|
|
32333
32334
|
|
|
32334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32335
32336
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
32336
32337
|
throw new CliError("validation_error", message3, { reason });
|
|
32337
32338
|
}, "refuse");
|
|
@@ -32409,7 +32410,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
32409
32410
|
};
|
|
32410
32411
|
}, "paymentEntriesOver");
|
|
32411
32412
|
|
|
32412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
32413
32414
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
32414
32415
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
32415
32416
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -32436,7 +32437,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
32436
32437
|
return valid;
|
|
32437
32438
|
}, "validateEvidenceFindings");
|
|
32438
32439
|
|
|
32439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
32440
32441
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
32441
32442
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
32442
32443
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -32630,7 +32631,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32630
32631
|
};
|
|
32631
32632
|
}, "proposedActionsStoreOver");
|
|
32632
32633
|
|
|
32633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
32634
32635
|
var CONFIRMED = "proposal";
|
|
32635
32636
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
32636
32637
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -32980,7 +32981,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
32980
32981
|
return { items, hasMore: rows.length > limit };
|
|
32981
32982
|
}, "identityLinkRows");
|
|
32982
32983
|
|
|
32983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
32984
32985
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
32985
32986
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
32986
32987
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -33083,7 +33084,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
33083
33084
|
return recordOf(context, alone);
|
|
33084
33085
|
}, "split");
|
|
33085
33086
|
|
|
33086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
33087
33088
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
33088
33089
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
33089
33090
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -33260,7 +33261,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
33260
33261
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33261
33262
|
}, "forgetErasedSplits");
|
|
33262
33263
|
|
|
33263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
33264
33265
|
var SEED_PEOPLE = [
|
|
33265
33266
|
{ name: "Owner", username: "owner" },
|
|
33266
33267
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -33277,7 +33278,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
33277
33278
|
];
|
|
33278
33279
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
33279
33280
|
|
|
33280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
33281
33282
|
var TEST_DATA_KIND = "test_data";
|
|
33282
33283
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
33283
33284
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -33346,7 +33347,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
33346
33347
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
33347
33348
|
}, "forgetErasedTestData");
|
|
33348
33349
|
|
|
33349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
33350
33351
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
33351
33352
|
provider,
|
|
33352
33353
|
externalId: account,
|
|
@@ -33440,7 +33441,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
33440
33441
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
33441
33442
|
}, "dropOrphanPeople");
|
|
33442
33443
|
|
|
33443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
33444
33445
|
var HISTORY_KEY = "$history";
|
|
33445
33446
|
var objectOf3 = /* @__PURE__ */ __name((text8) => {
|
|
33446
33447
|
if (typeof text8 !== "string")
|
|
@@ -33516,7 +33517,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
33516
33517
|
return rest;
|
|
33517
33518
|
}, "withoutHistory");
|
|
33518
33519
|
|
|
33519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
33520
33521
|
var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
|
|
33521
33522
|
var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
|
|
33522
33523
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -33814,7 +33815,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
33814
33815
|
}
|
|
33815
33816
|
}, "replaceAutoTags");
|
|
33816
33817
|
|
|
33817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
33818
33819
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
33819
33820
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
33820
33821
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -33833,7 +33834,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
33833
33834
|
return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
|
|
33834
33835
|
}, "counterFreshness");
|
|
33835
33836
|
|
|
33836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
33837
33838
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
33838
33839
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
33839
33840
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -33873,7 +33874,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
33873
33874
|
}, "maskStoredBotTokens");
|
|
33874
33875
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
33875
33876
|
|
|
33876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
33877
33878
|
import { createHash as createHash4 } from "node:crypto";
|
|
33878
33879
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
33879
33880
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -33971,7 +33972,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
33971
33972
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
33972
33973
|
}, "contextEvidenceRequest");
|
|
33973
33974
|
|
|
33974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
33975
33976
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
33976
33977
|
var ACTIVITY = `
|
|
33977
33978
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -34101,7 +34102,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
34101
34102
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
34102
34103
|
}), "mailActivity");
|
|
34103
34104
|
|
|
34104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
34105
34106
|
var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
|
|
34106
34107
|
var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
|
|
34107
34108
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -34182,7 +34183,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
34182
34183
|
return withoutSignOff(withoutGreeting(kept2)).join("\n").trim();
|
|
34183
34184
|
}, "mailCore");
|
|
34184
34185
|
|
|
34185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
34186
34187
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
34187
34188
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
34188
34189
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -34295,7 +34296,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
34295
34296
|
return emails3 + threads;
|
|
34296
34297
|
}, "drainEmailIndex");
|
|
34297
34298
|
|
|
34298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
34299
34300
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
34300
34301
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
34301
34302
|
var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
|
|
@@ -34393,7 +34394,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
34393
34394
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
34394
34395
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
34395
34396
|
|
|
34396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
34397
34398
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
34398
34399
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
34399
34400
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -34443,7 +34444,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
34443
34444
|
return threads.length;
|
|
34444
34445
|
}, "markEmailsRestored");
|
|
34445
34446
|
|
|
34446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
34447
34448
|
var MAIL_PIECE_ROWS = `SELECT p.id, p.content_hash AS hash, p.type, p.owner, p.position, p.email_id AS email, v.vector
|
|
34448
34449
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
34449
34450
|
WHERE p.account_id = ?
|
|
@@ -34503,7 +34504,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
34503
34504
|
}, "indexedMailPieces");
|
|
34504
34505
|
var nearestMailPieces = /* @__PURE__ */ __name((database, model, query, filter, depth) => (filter.threadExternalId === void 0 ? indexedMailPieces(database, model, query, filter, depth) : void 0) ?? scannedMailPieces(database, model, query, filter), "nearestMailPieces");
|
|
34505
34506
|
|
|
34506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
34507
34508
|
var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
|
|
34508
34509
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
34509
34510
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34570,7 +34571,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
34570
34571
|
}
|
|
34571
34572
|
}), "mailRulesOver");
|
|
34572
34573
|
|
|
34573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
34574
34575
|
function checkMeetingCancelled(signal) {
|
|
34575
34576
|
if (!signal?.aborted)
|
|
34576
34577
|
return;
|
|
@@ -34581,7 +34582,7 @@ function checkMeetingCancelled(signal) {
|
|
|
34581
34582
|
}
|
|
34582
34583
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
34583
34584
|
|
|
34584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
34585
34586
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
34586
34587
|
id: Number(row2.id),
|
|
34587
34588
|
accountId: Number(row2.account_id),
|
|
@@ -34631,7 +34632,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
34631
34632
|
createdAt: Number(row2.created_at)
|
|
34632
34633
|
}), "transcriptRowOf");
|
|
34633
34634
|
|
|
34634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
34635
34636
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
34636
34637
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
34637
34638
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -34798,7 +34799,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34798
34799
|
}
|
|
34799
34800
|
}), "meetingReadsOver");
|
|
34800
34801
|
|
|
34801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
34802
34803
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
34803
34804
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
34804
34805
|
const params = [input.accountId];
|
|
@@ -34841,7 +34842,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
34841
34842
|
return { clauses, params };
|
|
34842
34843
|
}, "meetingSelectionSql");
|
|
34843
34844
|
|
|
34844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
34845
34846
|
var MOST_CALLS = 2e5;
|
|
34846
34847
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
34847
34848
|
if (typeof value !== "string")
|
|
@@ -34896,7 +34897,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34896
34897
|
}
|
|
34897
34898
|
}), "meetingCallsOver");
|
|
34898
34899
|
|
|
34899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
34900
34901
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34901
34902
|
async meetingChatLines(input) {
|
|
34902
34903
|
checkMeetingCancelled(input.signal);
|
|
@@ -34924,7 +34925,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34924
34925
|
}
|
|
34925
34926
|
}), "meetingChatLinesOver");
|
|
34926
34927
|
|
|
34927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
34928
34929
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
34929
34930
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
34930
34931
|
}, "missing");
|
|
@@ -35047,7 +35048,7 @@ function meetingContextLinksOver(context) {
|
|
|
35047
35048
|
}
|
|
35048
35049
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
35049
35050
|
|
|
35050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
35051
35052
|
var TRANSCRIPT_ROLE = "transcript";
|
|
35052
35053
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
35053
35054
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -35121,7 +35122,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
35121
35122
|
};
|
|
35122
35123
|
}, "meetingTranscriptDocumentsOver");
|
|
35123
35124
|
|
|
35124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
35125
35126
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
35126
35127
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
35127
35128
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -35150,7 +35151,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35150
35151
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
35151
35152
|
}, "indexedText");
|
|
35152
35153
|
|
|
35153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
35154
35155
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
35155
35156
|
var meetingCurrentIndexRows = `
|
|
35156
35157
|
SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
|
|
@@ -35181,7 +35182,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
35181
35182
|
}, "invalidateMeetingStems");
|
|
35182
35183
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
35183
35184
|
|
|
35184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
35185
35186
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
35186
35187
|
return {
|
|
35187
35188
|
async indexSearch(original) {
|
|
@@ -35249,10 +35250,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
35249
35250
|
}
|
|
35250
35251
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
35251
35252
|
|
|
35252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35253
35254
|
import { createHash as createHash5 } from "node:crypto";
|
|
35254
35255
|
|
|
35255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
35256
35257
|
var SHORTEST_CORRECTION = 3;
|
|
35257
35258
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
35258
35259
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -35299,7 +35300,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
35299
35300
|
return corrections;
|
|
35300
35301
|
}, "correctWords");
|
|
35301
35302
|
|
|
35302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
35303
35304
|
var SHORTEST_GARBLED = 4;
|
|
35304
35305
|
var MOST_WIDENED = 64;
|
|
35305
35306
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -35320,14 +35321,14 @@ var garbledDistance = /* @__PURE__ */ __name((probe, word2, stems) => {
|
|
|
35320
35321
|
return null;
|
|
35321
35322
|
if (isNumberWord(probe.literal) || isNumberWord(word2))
|
|
35322
35323
|
return null;
|
|
35323
|
-
const
|
|
35324
|
+
const literal5 = plain(probe.literal);
|
|
35324
35325
|
const stored4 = plain(word2);
|
|
35325
35326
|
let best = null;
|
|
35326
35327
|
for (const queryStem of probe.stems.map(plain))
|
|
35327
35328
|
for (const wordStem of stems.map(plain)) {
|
|
35328
35329
|
if (Math.min(queryStem.length, wordStem.length) < 3)
|
|
35329
35330
|
continue;
|
|
35330
|
-
if (wordStem.startsWith(queryStem) &&
|
|
35331
|
+
if (wordStem.startsWith(queryStem) && literal5.startsWith(wordStem) || queryStem.startsWith(wordStem) && stored4.startsWith(queryStem))
|
|
35331
35332
|
return 0;
|
|
35332
35333
|
if (queryStem.length < SHORTEST_GARBLED)
|
|
35333
35334
|
continue;
|
|
@@ -35337,7 +35338,7 @@ var garbledDistance = /* @__PURE__ */ __name((probe, word2, stems) => {
|
|
|
35337
35338
|
if (distance <= 1)
|
|
35338
35339
|
best = distance;
|
|
35339
35340
|
}
|
|
35340
|
-
if (best === null && stored4.length >= SHORTEST_GARBLED &&
|
|
35341
|
+
if (best === null && stored4.length >= SHORTEST_GARBLED && literal5.startsWith(stored4))
|
|
35341
35342
|
return 1;
|
|
35342
35343
|
return best;
|
|
35343
35344
|
}, "garbledDistance");
|
|
@@ -35391,7 +35392,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
35391
35392
|
return found2.map((words4) => words4.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word2) => word2.term));
|
|
35392
35393
|
}, "widenWords");
|
|
35393
35394
|
|
|
35394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
35395
35396
|
import { readFileSync } from "node:fs";
|
|
35396
35397
|
var loaded;
|
|
35397
35398
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -35450,7 +35451,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
35450
35451
|
return false;
|
|
35451
35452
|
}, "knownRussianWord");
|
|
35452
35453
|
|
|
35453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
35454
35455
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
35455
35456
|
var MOST_WORDS = 128;
|
|
35456
35457
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -35528,11 +35529,11 @@ var resolveMeetingQuery = /* @__PURE__ */ __name((database, accountId, ast, stat
|
|
|
35528
35529
|
const all2 = [];
|
|
35529
35530
|
const wordsOf6 = /* @__PURE__ */ __name((value, exact) => {
|
|
35530
35531
|
const words4 = (value.match(WORD2) ?? []).filter((raw) => normalize(raw)).map((raw) => {
|
|
35531
|
-
const
|
|
35532
|
+
const literal5 = normalize(raw);
|
|
35532
35533
|
return {
|
|
35533
35534
|
raw,
|
|
35534
|
-
literal:
|
|
35535
|
-
whole: exact || isNumberWord(
|
|
35535
|
+
literal: literal5,
|
|
35536
|
+
whole: exact || isNumberWord(literal5),
|
|
35536
35537
|
stems: state.stemmer && raw.length <= 1024 && !exact ? [...new Set(state.stemmer.explain(raw).map((word2) => word2.stem))] : [],
|
|
35537
35538
|
widened: []
|
|
35538
35539
|
};
|
|
@@ -35706,7 +35707,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
35706
35707
|
return [...found2];
|
|
35707
35708
|
}, "matchedMeetingWords");
|
|
35708
35709
|
|
|
35709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
35710
35711
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
35711
35712
|
throw new CliError("validation_error", message3);
|
|
35712
35713
|
}, "fail");
|
|
@@ -35890,7 +35891,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35890
35891
|
}
|
|
35891
35892
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35892
35893
|
|
|
35893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35894
35895
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35895
35896
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35896
35897
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35922,7 +35923,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35922
35923
|
}
|
|
35923
35924
|
}), "meetingLanguagesOver");
|
|
35924
35925
|
|
|
35925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35926
35927
|
import { createHash as createHash6 } from "node:crypto";
|
|
35927
35928
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35928
35929
|
if (value === void 0)
|
|
@@ -36015,7 +36016,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36015
36016
|
}
|
|
36016
36017
|
}), "meetingParticipantSearchOver");
|
|
36017
36018
|
|
|
36018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
36019
36020
|
var preparationQueries = {
|
|
36020
36021
|
participants: {
|
|
36021
36022
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -36065,7 +36066,7 @@ var preparationQueries = {
|
|
|
36065
36066
|
}
|
|
36066
36067
|
};
|
|
36067
36068
|
|
|
36068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
36069
36070
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36070
36071
|
async preparationContext(original) {
|
|
36071
36072
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -36106,7 +36107,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36106
36107
|
}
|
|
36107
36108
|
}), "meetingPreparationContextOver");
|
|
36108
36109
|
|
|
36109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
36110
36111
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
36111
36112
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
36112
36113
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -36120,7 +36121,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
36120
36121
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
36121
36122
|
)`, "preparationSubjects");
|
|
36122
36123
|
|
|
36123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
36124
36125
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36125
36126
|
async preparationKnowledge(original) {
|
|
36126
36127
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36165,7 +36166,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
36165
36166
|
}
|
|
36166
36167
|
}), "meetingPreparationKnowledgeOver");
|
|
36167
36168
|
|
|
36168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
36169
36170
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36170
36171
|
async preparationNotes(original) {
|
|
36171
36172
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -36218,7 +36219,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36218
36219
|
}
|
|
36219
36220
|
}), "meetingPreparationNotesOver");
|
|
36220
36221
|
|
|
36221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
36222
36223
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36223
36224
|
async relatedHistory(original) {
|
|
36224
36225
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -36289,7 +36290,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36289
36290
|
}
|
|
36290
36291
|
}), "meetingRelatedHistoryOver");
|
|
36291
36292
|
|
|
36292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
36293
36294
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
36294
36295
|
var text4 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
36295
36296
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -36370,7 +36371,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36370
36371
|
}
|
|
36371
36372
|
}), "meetingReviewOver");
|
|
36372
36373
|
|
|
36373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
36374
36375
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
36375
36376
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
36376
36377
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -36424,7 +36425,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36424
36425
|
}
|
|
36425
36426
|
}), "meetingSeriesHistoryOver");
|
|
36426
36427
|
|
|
36427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
36428
36429
|
var MOST_ROWS = 5e5;
|
|
36429
36430
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
36430
36431
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -36493,7 +36494,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36493
36494
|
}
|
|
36494
36495
|
}), "meetingStatsOver");
|
|
36495
36496
|
|
|
36496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
36497
36498
|
var CYRILLIC_TO_LATIN = {
|
|
36498
36499
|
\u0430: "a",
|
|
36499
36500
|
\u0431: "b",
|
|
@@ -36715,7 +36716,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
36715
36716
|
}
|
|
36716
36717
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
36717
36718
|
|
|
36718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
36719
36720
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
36720
36721
|
const found2 = /* @__PURE__ */ new Map();
|
|
36721
36722
|
for (const row2 of database.prepare("SELECT p.id, p.name FROM persons p WHERE p.owner = 0 AND p.name IS NOT NULL AND EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = p.id) ORDER BY p.id").all()) {
|
|
@@ -36831,7 +36832,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36831
36832
|
}
|
|
36832
36833
|
__name(sharedTraces, "sharedTraces");
|
|
36833
36834
|
|
|
36834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36835
36836
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36836
36837
|
var PERSON_BY = {
|
|
36837
36838
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36854,7 +36855,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
36854
36855
|
return [...found2].sort((a, b) => a - b);
|
|
36855
36856
|
}, "personsByIdentifiers");
|
|
36856
36857
|
|
|
36857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36858
36859
|
var BY = "rule";
|
|
36859
36860
|
var RULE = { bot: "rule", kind: "rule" };
|
|
36860
36861
|
var MOST_SHARING = 6;
|
|
@@ -37301,7 +37302,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
37301
37302
|
return pass.result;
|
|
37302
37303
|
}, "linkPhones");
|
|
37303
37304
|
|
|
37304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
37305
37306
|
var CURSOR_KEY = "meetings";
|
|
37306
37307
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
37307
37308
|
id: Number(row2.id),
|
|
@@ -37901,7 +37902,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37901
37902
|
};
|
|
37902
37903
|
}, "meetingStoreOver");
|
|
37903
37904
|
|
|
37904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37905
37906
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37906
37907
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37907
37908
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37927,7 +37928,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37927
37928
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37928
37929
|
}, "release");
|
|
37929
37930
|
|
|
37930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37931
37932
|
var THREAD_COLUMNS = {
|
|
37932
37933
|
subject: {
|
|
37933
37934
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -37944,7 +37945,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
37944
37945
|
AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
|
|
37945
37946
|
}, "threadRows");
|
|
37946
37947
|
|
|
37947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
37948
37949
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
37949
37950
|
id: `email:${place.emailId}`,
|
|
37950
37951
|
chatId: place.threadExternalId,
|
|
@@ -38486,7 +38487,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
38486
38487
|
}
|
|
38487
38488
|
}), "mailStoreOver");
|
|
38488
38489
|
|
|
38489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
38490
38491
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
38491
38492
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
38492
38493
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -38576,7 +38577,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
38576
38577
|
}, "knownWord");
|
|
38577
38578
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
38578
38579
|
|
|
38579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
38580
38581
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
38581
38582
|
var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
|
|
38582
38583
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -38662,7 +38663,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
38662
38663
|
return found2;
|
|
38663
38664
|
}, "spokenTranscripts");
|
|
38664
38665
|
|
|
38665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
38666
38667
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
38667
38668
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
38668
38669
|
const start = startOf(node);
|
|
@@ -38720,7 +38721,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
38720
38721
|
});
|
|
38721
38722
|
}, "placeHits");
|
|
38722
38723
|
|
|
38723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
38724
38725
|
var GROUPS = {
|
|
38725
38726
|
chat: {
|
|
38726
38727
|
key: "m.chat_id",
|
|
@@ -38742,7 +38743,7 @@ var GROUPS = {
|
|
|
38742
38743
|
}
|
|
38743
38744
|
};
|
|
38744
38745
|
|
|
38745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
38746
38747
|
var MESSAGES = {
|
|
38747
38748
|
rows: "messages",
|
|
38748
38749
|
threads: "chats",
|
|
@@ -39235,7 +39236,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
39235
39236
|
};
|
|
39236
39237
|
}, "runCompiled");
|
|
39237
39238
|
|
|
39238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
39239
39240
|
function invalidMetadata() {
|
|
39240
39241
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
39241
39242
|
}
|
|
@@ -39337,7 +39338,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
39337
39338
|
};
|
|
39338
39339
|
}), "counterTargets");
|
|
39339
39340
|
|
|
39340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
39341
39342
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
39342
39343
|
var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
|
|
39343
39344
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -39456,7 +39457,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
39456
39457
|
}));
|
|
39457
39458
|
}, "attachmentViews");
|
|
39458
39459
|
|
|
39459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
39460
39461
|
var transcript2 = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
39461
39462
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
39462
39463
|
const { orm, database, now: now2 } = context;
|
|
@@ -39494,7 +39495,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
39494
39495
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
39495
39496
|
}, "intoVoiceAttachment");
|
|
39496
39497
|
|
|
39497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
39498
39499
|
var FIELDS = [
|
|
39499
39500
|
"threadExternalId",
|
|
39500
39501
|
"senderIdentityId",
|
|
@@ -39818,7 +39819,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
39818
39819
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
39819
39820
|
}, "writeDerivedReactions");
|
|
39820
39821
|
|
|
39821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
39822
39823
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
39823
39824
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
39824
39825
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -39839,7 +39840,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
39839
39840
|
};
|
|
39840
39841
|
}, "keysOver");
|
|
39841
39842
|
|
|
39842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
39843
39844
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
39844
39845
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
39845
39846
|
if (!row2)
|
|
@@ -39886,7 +39887,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39886
39887
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39887
39888
|
}, "forgetProfile");
|
|
39888
39889
|
|
|
39889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
39890
39891
|
var DAY4 = 864e5;
|
|
39891
39892
|
var COUNTERPART_LINK = `EXISTS (SELECT 1 FROM links l WHERE l.from_type = 'event' AND l.from_id = e.id AND l.to_type = 'person' AND l.to_id = ? AND l.kind = ${linkKind("related-to")} AND l.role = '${COUNTERPART_ROLE}')`;
|
|
39892
39893
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -40002,7 +40003,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
40002
40003
|
return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
|
|
40003
40004
|
}, "listEvents");
|
|
40004
40005
|
|
|
40005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
40006
40007
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
40007
40008
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
40008
40009
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -40059,7 +40060,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
40059
40060
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
40060
40061
|
}, "forgetCalendarRows");
|
|
40061
40062
|
|
|
40062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
40063
40064
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
40064
40065
|
id: Number(row2.id),
|
|
40065
40066
|
accountId: Number(row2.account_id),
|
|
@@ -40662,7 +40663,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
40662
40663
|
};
|
|
40663
40664
|
}, "eventStoreOver");
|
|
40664
40665
|
|
|
40665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
40666
40667
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
40667
40668
|
const { orm, database, now: now2 } = context;
|
|
40668
40669
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -40777,7 +40778,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
40777
40778
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
40778
40779
|
}, "purgeCrmCopies");
|
|
40779
40780
|
|
|
40780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
40781
40782
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
40782
40783
|
var ownerNames = /* @__PURE__ */ __name(({ database }, owner) => database.prepare("SELECT i.name FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE l.person_id = ?").all(owner).map(({ name }) => new Set(nameSkeletons(displayName(typeof name === "string" ? name : null)))).filter((words4) => words4.size > 0), "ownerNames");
|
|
40783
40784
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -40836,7 +40837,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
40836
40837
|
return personOf2(context, ref3);
|
|
40837
40838
|
}, "linkToOwner");
|
|
40838
40839
|
|
|
40839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
40840
40841
|
var PROVIDERS_SETTING = "providers";
|
|
40841
40842
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
40842
40843
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -40884,7 +40885,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
40884
40885
|
});
|
|
40885
40886
|
}, "registerProvider");
|
|
40886
40887
|
|
|
40887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
40888
40889
|
var DAY5 = 864e5;
|
|
40889
40890
|
var RECENTLY_CLOSED_MS = 14 * DAY5;
|
|
40890
40891
|
var TEXT_LIMIT = 20;
|
|
@@ -41082,7 +41083,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
41082
41083
|
};
|
|
41083
41084
|
}, "taskSimilarityOver");
|
|
41084
41085
|
|
|
41085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
41086
41087
|
var SETTING3 = "taskCategories";
|
|
41087
41088
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
41088
41089
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -41101,7 +41102,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
41101
41102
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
|
|
41102
41103
|
}, "saveTaskCategories");
|
|
41103
41104
|
|
|
41104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
41105
41106
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
41106
41107
|
var ALLOWED = "taskAgentClose";
|
|
41107
41108
|
var MIN = "taskAgentCloseMin";
|
|
@@ -41157,7 +41158,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
41157
41158
|
];
|
|
41158
41159
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
41159
41160
|
|
|
41160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
41161
41162
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
41162
41163
|
var KEY = "taskFirstPassPerChat";
|
|
41163
41164
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -41177,7 +41178,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
41177
41178
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
|
|
41178
41179
|
}, "saveFirstPassPerChat");
|
|
41179
41180
|
|
|
41180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
41181
41182
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
41182
41183
|
var EXTERNAL_ID_CHARS = 200;
|
|
41183
41184
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -41204,7 +41205,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
41204
41205
|
return text8;
|
|
41205
41206
|
}, "sourceUrlOf");
|
|
41206
41207
|
|
|
41207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
41208
41209
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
41209
41210
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
41210
41211
|
name,
|
|
@@ -41456,7 +41457,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
41456
41457
|
var TASK_PEOPLE = `WITH merged AS (SELECT json_extract(value, '$[0]') AS id, json_extract(value, '$[1]') AS now FROM json_each(?)), counts AS (SELECT coalesce(m.now, a.assignee_id) AS person, count(DISTINCT t.id) AS n FROM task_assignments a JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL LEFT JOIN merged m ON m.id = a.assignee_id WHERE a.assignee_type = 'person' GROUP BY 1) SELECT p.id, p.name, p.owner, coalesce(c.n, 0) AS n FROM persons p LEFT JOIN counts c ON c.person = p.id WHERE NOT ${mergedAwaySql("p")} ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?`;
|
|
41457
41458
|
var mergedAssignees = /* @__PURE__ */ __name((database) => JSON.stringify(database.prepare(`SELECT DISTINCT a.assignee_id AS id FROM task_assignments a JOIN persons p ON p.id = a.assignee_id WHERE a.assignee_type = 'person' AND ${mergedAwaySql("p")}`).all().map(({ id: id2 }) => [Number(id2), currentPerson(database, Number(id2))])), "mergedAssignees");
|
|
41458
41459
|
|
|
41459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
41460
41461
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
41461
41462
|
if (row2.author_type == null)
|
|
41462
41463
|
return null;
|
|
@@ -41484,7 +41485,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
41484
41485
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
41485
41486
|
}, "addComment");
|
|
41486
41487
|
|
|
41487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
41488
41489
|
var TASK_RELATION_KINDS = [
|
|
41489
41490
|
"blocked-by",
|
|
41490
41491
|
"follow-up-of",
|
|
@@ -41614,7 +41615,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
41614
41615
|
};
|
|
41615
41616
|
}, "taskRelationsStoreOver");
|
|
41616
41617
|
|
|
41617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
41618
41619
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
41619
41620
|
var TASK_EVENT_KINDS = [
|
|
41620
41621
|
"created",
|
|
@@ -42173,7 +42174,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
42173
42174
|
};
|
|
42174
42175
|
}, "workTasksOver");
|
|
42175
42176
|
|
|
42176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
42177
42178
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
42178
42179
|
const { database, now: now2 } = context;
|
|
42179
42180
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -42222,7 +42223,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
42222
42223
|
};
|
|
42223
42224
|
}, "taskCloseOver");
|
|
42224
42225
|
|
|
42225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
42226
42227
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
42227
42228
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
42228
42229
|
const { database, now: now2 } = context;
|
|
@@ -42441,7 +42442,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
42441
42442
|
};
|
|
42442
42443
|
}, "taskPairsOver");
|
|
42443
42444
|
|
|
42444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
42445
42446
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
42446
42447
|
var TASK_STATS_SQL = {
|
|
42447
42448
|
rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? PROJECT_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
@@ -42480,7 +42481,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
42480
42481
|
}, "statNames")
|
|
42481
42482
|
}), "taskStatsOver");
|
|
42482
42483
|
|
|
42483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
42484
42485
|
var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
|
|
42485
42486
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
42486
42487
|
const key2 = inboxKey(account);
|
|
@@ -42696,7 +42697,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
42696
42697
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
42697
42698
|
}, "oneOf");
|
|
42698
42699
|
|
|
42699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
42700
42701
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
42701
42702
|
const { database } = context;
|
|
42702
42703
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42766,7 +42767,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
42766
42767
|
};
|
|
42767
42768
|
}, "accountsStoreOver");
|
|
42768
42769
|
|
|
42769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
42770
42771
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
42771
42772
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
42772
42773
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -42790,7 +42791,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
42790
42791
|
})), "keepDownloads");
|
|
42791
42792
|
var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
|
|
42792
42793
|
|
|
42793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
42794
42795
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
42795
42796
|
const { database } = context;
|
|
42796
42797
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42847,7 +42848,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42847
42848
|
}, "keepAttachmentText")
|
|
42848
42849
|
}), "attachmentsStoreOver");
|
|
42849
42850
|
|
|
42850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
42851
42852
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
42852
42853
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
42853
42854
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -43032,7 +43033,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
43032
43033
|
return done;
|
|
43033
43034
|
}, "rekeyChats");
|
|
43034
43035
|
|
|
43035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
43036
43037
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
43037
43038
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
43038
43039
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -43090,7 +43091,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
43090
43091
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
43091
43092
|
}, "chatCoverage");
|
|
43092
43093
|
|
|
43093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
43094
43095
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43095
43096
|
const { database } = context;
|
|
43096
43097
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -43239,7 +43240,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43239
43240
|
};
|
|
43240
43241
|
}, "chatsStoreOver");
|
|
43241
43242
|
|
|
43242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
43243
43244
|
import { createHash as createHash7 } from "node:crypto";
|
|
43244
43245
|
var BATCH_CONTEXT = 50;
|
|
43245
43246
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -43377,7 +43378,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
43377
43378
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
43378
43379
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
43379
43380
|
|
|
43380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
43381
43382
|
import { setTimeout } from "node:timers/promises";
|
|
43382
43383
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
43383
43384
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -43689,7 +43690,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
43689
43690
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
43690
43691
|
WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
|
|
43691
43692
|
|
|
43692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
43693
43694
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
43694
43695
|
const { database } = context;
|
|
43695
43696
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -43796,7 +43797,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
43796
43797
|
};
|
|
43797
43798
|
}, "conversationsStoreOver");
|
|
43798
43799
|
|
|
43799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
43800
43801
|
var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
|
|
43801
43802
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
43802
43803
|
const { database } = context;
|
|
@@ -43821,7 +43822,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43821
43822
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
43822
43823
|
}), "countersStoreOver");
|
|
43823
43824
|
|
|
43824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
43825
43826
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
43826
43827
|
var MENTION_QUERY = defineQuery({
|
|
43827
43828
|
entity: "mention",
|
|
@@ -44040,7 +44041,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
44040
44041
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
44041
44042
|
}, "listPlaces");
|
|
44042
44043
|
|
|
44043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
44044
44045
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
44045
44046
|
const { database } = context;
|
|
44046
44047
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -44075,7 +44076,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44075
44076
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
44076
44077
|
}), "mentionsStoreOver");
|
|
44077
44078
|
|
|
44078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
44079
44080
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
44080
44081
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
44081
44082
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -44174,7 +44175,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
44174
44175
|
});
|
|
44175
44176
|
}, "waitingChats");
|
|
44176
44177
|
|
|
44177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
44178
44179
|
var SQL = `SELECT coalesce(nullif(trim(c.title), ''), (SELECT sender_name FROM messages WHERE chat_id = c.id AND outgoing = 0 AND deleted_at IS NULL ORDER BY sent_at DESC LIMIT 1)) AS title, ${MUTED_NOW} AS muted, w.messages, w.sent, (SELECT max(sent_at) FROM messages WHERE chat_id = c.id AND deleted_at IS NULL AND sent_at < ?) AS last FROM chats c, (SELECT count(*) AS messages, coalesce(sum(outgoing = 1), 0) AS sent FROM messages WHERE chat_id = ? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?) w WHERE c.id = ?`;
|
|
44179
44180
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
44180
44181
|
const statement = database.prepare(SQL);
|
|
@@ -44194,7 +44195,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
44194
44195
|
return found2;
|
|
44195
44196
|
}, "chatActivityCounts");
|
|
44196
44197
|
|
|
44197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
44198
44199
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
44199
44200
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
44200
44201
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -44209,7 +44210,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
44209
44210
|
}));
|
|
44210
44211
|
}, "documentLinkMessages");
|
|
44211
44212
|
|
|
44212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
44213
44214
|
var stemmerFor = stemmerCache();
|
|
44214
44215
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
44215
44216
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -44253,7 +44254,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
44253
44254
|
});
|
|
44254
44255
|
}, "laterSharingRare");
|
|
44255
44256
|
|
|
44256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
44257
44258
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
44258
44259
|
const { database } = context;
|
|
44259
44260
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -44394,7 +44395,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
44394
44395
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
44395
44396
|
}), "messagesStoreOver");
|
|
44396
44397
|
|
|
44397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
44398
44399
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
44399
44400
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
44400
44401
|
"noreply",
|
|
@@ -44457,7 +44458,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
44457
44458
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
44458
44459
|
}, "isCompanyName");
|
|
44459
44460
|
|
|
44460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
44461
44462
|
var SMALL_GROUP_MEMBERS = 10;
|
|
44462
44463
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
44463
44464
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -44512,7 +44513,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
44512
44513
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
44513
44514
|
}, "shownReasons");
|
|
44514
44515
|
|
|
44515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
44516
44517
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
44517
44518
|
var MIN_QUERY = 3;
|
|
44518
44519
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -44857,7 +44858,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
44857
44858
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
44858
44859
|
}, "similarPeople");
|
|
44859
44860
|
|
|
44860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
44861
44862
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
44862
44863
|
var COLUMNS5 = "l.person_id AS person, p.owner, p.name AS person_name, i.id AS pk, i.provider, i.external_id, i.name, i.phone, i.email, i.username, l.method, l.author, l.created_at, EXISTS (SELECT 1 FROM accounts a WHERE a.provider = i.provider AND a.external_id = i.external_id) AS account FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id";
|
|
44863
44864
|
var text5 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -45113,7 +45114,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
45113
45114
|
return { person: `person:${person2}`, identities: identities2 };
|
|
45114
45115
|
}, "markTestData");
|
|
45115
45116
|
|
|
45116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
45117
45118
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
45118
45119
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
45119
45120
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -45182,7 +45183,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
45182
45183
|
});
|
|
45183
45184
|
}, "personPreparation");
|
|
45184
45185
|
|
|
45185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
45186
45187
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
45187
45188
|
const id2 = Number(uid);
|
|
45188
45189
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -45190,7 +45191,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
45190
45191
|
return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(currentPerson(database, id2), JSON.stringify(accountIds)));
|
|
45191
45192
|
}, "personSeenInAccounts");
|
|
45192
45193
|
|
|
45193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
45194
45195
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
45195
45196
|
const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
|
|
45196
45197
|
if (!row2)
|
|
@@ -45257,7 +45258,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
45257
45258
|
return { id: id2, personId, removed: true };
|
|
45258
45259
|
}, "removeNote");
|
|
45259
45260
|
|
|
45260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
45261
45262
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
45262
45263
|
const { database } = context;
|
|
45263
45264
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -45384,13 +45385,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
45384
45385
|
};
|
|
45385
45386
|
}, "peopleStoreOver");
|
|
45386
45387
|
|
|
45387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45388
45389
|
import { createHash as createHash9 } from "node:crypto";
|
|
45389
45390
|
|
|
45390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45391
45392
|
import { createHash as createHash8 } from "node:crypto";
|
|
45392
45393
|
|
|
45393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
45394
45395
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
45395
45396
|
var AUTHOR_MEASURES = [
|
|
45396
45397
|
"messages",
|
|
@@ -45530,7 +45531,7 @@ var withoutUrls = /* @__PURE__ */ __name((text8) => text8.replace(/\S+/gu, (toke
|
|
|
45530
45531
|
var rankingWords = /* @__PURE__ */ __name((text8) => withoutUrls(text8).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
45531
45532
|
var rankingQuestion = /* @__PURE__ */ __name((text8) => withoutUrls(text8).includes("?"), "rankingQuestion");
|
|
45532
45533
|
|
|
45533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
45534
45535
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
45535
45536
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
45536
45537
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -45752,7 +45753,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
45752
45753
|
};
|
|
45753
45754
|
}, "rankReplyGraph");
|
|
45754
45755
|
|
|
45755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
45756
45757
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
45757
45758
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
45758
45759
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -45926,7 +45927,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
45926
45927
|
return { items, evidence, summary, graph: graph.quality };
|
|
45927
45928
|
}, "calculateAdminStatistics");
|
|
45928
45929
|
|
|
45929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
45930
45931
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
45931
45932
|
const dates = [];
|
|
45932
45933
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -45948,7 +45949,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
45948
45949
|
return dates[0].node.resolution.date;
|
|
45949
45950
|
}, "rankingContextRange");
|
|
45950
45951
|
|
|
45951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
45952
45953
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
45953
45954
|
let counts;
|
|
45954
45955
|
try {
|
|
@@ -46243,7 +46244,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
46243
46244
|
});
|
|
46244
46245
|
}, "rankQuery");
|
|
46245
46246
|
|
|
46246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
46247
46248
|
function fail2(message3, reason = "query.too-large") {
|
|
46248
46249
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
46249
46250
|
}
|
|
@@ -46420,7 +46421,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
46420
46421
|
return result;
|
|
46421
46422
|
}), "adminStatisticsQuery");
|
|
46422
46423
|
|
|
46423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
46424
46425
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
46425
46426
|
if (!execution.accounts.length)
|
|
46426
46427
|
return { conversations: [], chats: [] };
|
|
@@ -46438,7 +46439,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
46438
46439
|
return { conversations: conversations2, chats: chats2 };
|
|
46439
46440
|
}, "conversationEligibility");
|
|
46440
46441
|
|
|
46441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
46442
46443
|
import { createHash as createHash10 } from "node:crypto";
|
|
46443
46444
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
46444
46445
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -46588,7 +46589,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
46588
46589
|
return result;
|
|
46589
46590
|
}, "rankingEvidence");
|
|
46590
46591
|
|
|
46591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
46592
46593
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
46593
46594
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
46594
46595
|
if (execution.corpus === "mail")
|
|
@@ -46609,7 +46610,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
46609
46610
|
};
|
|
46610
46611
|
}, "queriesStoreOver");
|
|
46611
46612
|
|
|
46612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
46613
46614
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
46614
46615
|
const { database, now: now2 } = context;
|
|
46615
46616
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -46648,10 +46649,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
46648
46649
|
}));
|
|
46649
46650
|
}, "chatEventsOf");
|
|
46650
46651
|
|
|
46651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46652
46653
|
import { createHash as createHash11 } from "node:crypto";
|
|
46653
46654
|
|
|
46654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
46655
46656
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
46656
46657
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
46657
46658
|
timeZone: zone,
|
|
@@ -46671,7 +46672,7 @@ var weekKey = /* @__PURE__ */ __name((day3) => {
|
|
|
46671
46672
|
return date3.toISOString().slice(0, 10);
|
|
46672
46673
|
}, "weekKey");
|
|
46673
46674
|
|
|
46674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
46675
46676
|
var RETENTION_TOLERANCE = 864e5;
|
|
46676
46677
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
46677
46678
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -46725,7 +46726,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
46725
46726
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
46726
46727
|
}, "retentionCohorts");
|
|
46727
46728
|
|
|
46728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
46729
46730
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
46730
46731
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
46731
46732
|
validateRetentionOptions(options);
|
|
@@ -46856,7 +46857,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
46856
46857
|
};
|
|
46857
46858
|
}, "retentionQuery");
|
|
46858
46859
|
|
|
46859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
46860
46861
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
46861
46862
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
46862
46863
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -46985,7 +46986,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
46985
46986
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
46986
46987
|
})), "trackedChats");
|
|
46987
46988
|
|
|
46988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
46989
46990
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46990
46991
|
const { database } = context;
|
|
46991
46992
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -47041,7 +47042,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47041
47042
|
};
|
|
47042
47043
|
}, "rosterStoreOver");
|
|
47043
47044
|
|
|
47044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
47045
47046
|
var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
|
|
47046
47047
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
47047
47048
|
const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
|
|
@@ -47065,7 +47066,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
47065
47066
|
}
|
|
47066
47067
|
}, "backfillNormalized");
|
|
47067
47068
|
|
|
47068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
47069
47070
|
var INDEX2 = "message_words";
|
|
47070
47071
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
47071
47072
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -47192,7 +47193,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
47192
47193
|
});
|
|
47193
47194
|
}, "resetSearchIndex");
|
|
47194
47195
|
|
|
47195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
47196
47197
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
47197
47198
|
const filled = { stemmed: 0, drained: 0 };
|
|
47198
47199
|
const before2 = stemsState(database);
|
|
@@ -47287,7 +47288,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
47287
47288
|
return resetStems(database, { now: now2 });
|
|
47288
47289
|
}, "followDefaultStemmers");
|
|
47289
47290
|
|
|
47290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
47291
47292
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
47292
47293
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
47293
47294
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -47309,7 +47310,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
47309
47310
|
});
|
|
47310
47311
|
}, "termCandidates");
|
|
47311
47312
|
|
|
47312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
47313
47314
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47314
47315
|
const { database } = context;
|
|
47315
47316
|
const stemmerFor2 = stemmerCache();
|
|
@@ -47333,7 +47334,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47333
47334
|
};
|
|
47334
47335
|
}, "searchIndexStoreOver");
|
|
47335
47336
|
|
|
47336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
47337
47338
|
var HISTORY_KEPT = 1e3;
|
|
47338
47339
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
47339
47340
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -47403,7 +47404,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
47403
47404
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
47404
47405
|
}, "clearHistory");
|
|
47405
47406
|
|
|
47406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
47407
47408
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
47408
47409
|
const { database } = context;
|
|
47409
47410
|
return {
|
|
@@ -47427,7 +47428,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47427
47428
|
};
|
|
47428
47429
|
}, "searchesStoreOver");
|
|
47429
47430
|
|
|
47430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
47431
47432
|
import { createHash as createHash12 } from "node:crypto";
|
|
47432
47433
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
47433
47434
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -47669,7 +47670,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47669
47670
|
};
|
|
47670
47671
|
}, "addedSourcesOver");
|
|
47671
47672
|
|
|
47672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
47673
47674
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
47674
47675
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
47675
47676
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -47717,7 +47718,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
47717
47718
|
};
|
|
47718
47719
|
}, "agentActionsStoreOver");
|
|
47719
47720
|
|
|
47720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
47721
47722
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
47722
47723
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
47723
47724
|
if (typeof value !== "string")
|
|
@@ -47763,7 +47764,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
47763
47764
|
}
|
|
47764
47765
|
}, "suggestBaseStages");
|
|
47765
47766
|
|
|
47766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
47767
47768
|
import { createHash as createHash13 } from "node:crypto";
|
|
47768
47769
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
47769
47770
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -48094,8 +48095,39 @@ var fieldReferences = /* @__PURE__ */ __name((record3, options = {}) => {
|
|
|
48094
48095
|
return found2;
|
|
48095
48096
|
}, "fieldReferences");
|
|
48096
48097
|
|
|
48097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
48098
48099
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
48100
|
+
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
48101
|
+
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
48102
|
+
const text8 = String(item.amount).trim();
|
|
48103
|
+
const decimal2 = /^\d+(?:\.(\d+))?$/.exec(text8);
|
|
48104
|
+
if (text8.startsWith("-"))
|
|
48105
|
+
return "it is below zero";
|
|
48106
|
+
if (!decimal2)
|
|
48107
|
+
return "it is not a decimal number";
|
|
48108
|
+
if ((decimal2[1] ?? "").length > scaleOf(String(code)))
|
|
48109
|
+
return `it has more decimals than ${code} has`;
|
|
48110
|
+
return "it is too large to keep exactly";
|
|
48111
|
+
}, "amountFault");
|
|
48112
|
+
var moneyOf2 = /* @__PURE__ */ __name((item) => {
|
|
48113
|
+
if (item.amount == null || item.currency == null)
|
|
48114
|
+
return { currency: null, amount: null, amountNote: null };
|
|
48115
|
+
try {
|
|
48116
|
+
const currency2 = currencyOf(item.currency);
|
|
48117
|
+
return { currency: currency2, amount: minorUnits(String(item.amount), currency2), amountNote: null };
|
|
48118
|
+
} catch (error) {
|
|
48119
|
+
const reason = error instanceof CliError ? error.details?.reason : void 0;
|
|
48120
|
+
if (!MONEY_REFUSALS.includes(reason))
|
|
48121
|
+
throw error;
|
|
48122
|
+
const code = textOf4(String(item.currency), 10);
|
|
48123
|
+
const why = reason === "money.currency" ? `the store keeps no amounts in ${code}` : amountFault(item, code);
|
|
48124
|
+
return {
|
|
48125
|
+
currency: null,
|
|
48126
|
+
amount: null,
|
|
48127
|
+
amountNote: `the CRM's amount ${textOf4(String(item.amount), 40)} ${code} is not kept: ${why}`
|
|
48128
|
+
};
|
|
48129
|
+
}
|
|
48130
|
+
}, "moneyOf");
|
|
48099
48131
|
var SOURCE = "crm";
|
|
48100
48132
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
48101
48133
|
var idPart = /* @__PURE__ */ __name((value) => value.replaceAll("%", "%25").replaceAll("/", "%2F"), "idPart");
|
|
@@ -48177,11 +48209,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48177
48209
|
message: `${kind3} ${item.externalId} stands in stage ${item.stage} of pipeline ${item.pipeline}, which is not stored`
|
|
48178
48210
|
};
|
|
48179
48211
|
const title2 = textOf4(item.title, 200) ?? `${kind3} ${item.externalId}`;
|
|
48180
|
-
const
|
|
48181
|
-
const currency2 = given3 ? currencyOf(item.currency) : null;
|
|
48182
|
-
const amount = currency2 === null ? null : minorUnits(String(item.amount), currency2, `${kind3} ${item.externalId}'s amount`);
|
|
48183
|
-
if (amount !== null && amount < 0)
|
|
48184
|
-
throw new CliError("validation_error", "an amount is 0 or more");
|
|
48212
|
+
const { currency: currency2, amount, amountNote } = moneyOf2(item);
|
|
48185
48213
|
if (item.status != null && !STAGE_OUTCOMES.includes(item.status))
|
|
48186
48214
|
throw new CliError("validation_error", `${kind3} ${item.externalId}'s status is open, won or lost`);
|
|
48187
48215
|
const status2 = item.status ?? String(stage.outcome);
|
|
@@ -48193,7 +48221,8 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48193
48221
|
...item.assignee ? { assignee: crmIdentityId(key2, item.assignee, "user") } : {},
|
|
48194
48222
|
...textOf4(item.contactName, 200) ? { contact_name: textOf4(item.contactName, 200) } : {},
|
|
48195
48223
|
...textOf4(item.companyName, 200) ? { company_name: textOf4(item.companyName, 200) } : {},
|
|
48196
|
-
...item.closedReason && status2 !== "open" ? { closed_reason: textOf4(item.closedReason, 2e3) } : {}
|
|
48224
|
+
...item.closedReason && status2 !== "open" ? { closed_reason: textOf4(item.closedReason, 2e3) } : {},
|
|
48225
|
+
...amountNote ? { amount_note: { label: "Amount not kept", value: amountNote } } : {}
|
|
48197
48226
|
};
|
|
48198
48227
|
const values = {
|
|
48199
48228
|
title: title2,
|
|
@@ -48220,12 +48249,12 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48220
48249
|
}
|
|
48221
48250
|
if (writer3.project !== void 0)
|
|
48222
48251
|
database.prepare(`UPDATE ${table} SET project_id = ? WHERE id = ?`).run(writer3.project, id2);
|
|
48223
|
-
return { id: id2 };
|
|
48252
|
+
return { id: id2, ...amountNote ? { amountNote } : {} };
|
|
48224
48253
|
}, "saveItemRow");
|
|
48225
48254
|
return { savePipeline, saveItemRow };
|
|
48226
48255
|
}, "crmRowsOver");
|
|
48227
48256
|
|
|
48228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
48229
48258
|
var ACTIVITY_RECORD = "crm.activity";
|
|
48230
48259
|
var MOST_BODY = 2e4;
|
|
48231
48260
|
var MOST_SUBJECT = 500;
|
|
@@ -48305,7 +48334,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
48305
48334
|
return { save: save2, of };
|
|
48306
48335
|
}, "crmActivitiesOver");
|
|
48307
48336
|
|
|
48308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
48309
48338
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
48310
48339
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
48311
48340
|
const rows = database.prepare(`SELECT stage_id, currency, count(*) AS items, coalesce(sum(amount), 0) AS units FROM ${TABLES3[kind3]} WHERE stage_id IN (${stageIds.map(() => "?").join(", ") || "NULL"}) AND deleted_at IS NULL AND (? IS NULL OR created_at >= ?) GROUP BY stage_id, currency ORDER BY currency`).all(...stageIds, cutoff, cutoff);
|
|
@@ -48322,7 +48351,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
48322
48351
|
});
|
|
48323
48352
|
}, "stageAmountsOf");
|
|
48324
48353
|
|
|
48325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
48326
48355
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
48327
48356
|
var itemsSql = /* @__PURE__ */ __name((kind3) => `SELECT d.*, s.name AS stage_name, s.pipeline_id, p.name AS pipeline_name, b.name AS author_name, b.kind AS author_kind, a.provider AS account_provider, a.external_id AS account_external_id, bs.id AS base_stage_ref_id, bs.name AS base_stage_name FROM ${TABLES4[kind3]} d JOIN pipeline_stages s ON s.id = d.stage_id JOIN pipelines p ON p.id = s.pipeline_id LEFT JOIN bots b ON d.author_type = 'bot' AND b.id = d.author_id LEFT JOIN accounts a ON a.id = d.account_id LEFT JOIN pipeline_stages bs ON s.base_confirmed = 1 AND bs.id = s.base_stage_id`, "itemsSql");
|
|
48328
48357
|
var MAX_STAGES = 30;
|
|
@@ -48730,13 +48759,13 @@ var dealOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48730
48759
|
if (!found2.length && !exact) {
|
|
48731
48760
|
const docs = /* @__PURE__ */ new Map();
|
|
48732
48761
|
for (const { parts } of records2)
|
|
48733
|
-
for (const
|
|
48734
|
-
docs.set(
|
|
48762
|
+
for (const literal5 of new Set(parts.flatMap(({ words: held }) => held.map((word2) => word2.literal))))
|
|
48763
|
+
docs.set(literal5, (docs.get(literal5) ?? 0) + 1);
|
|
48735
48764
|
const vocabulary = {
|
|
48736
48765
|
knownTerms: /* @__PURE__ */ __name(async (terms) => new Set(terms.filter((term) => docs.has(term))), "knownTerms"),
|
|
48737
48766
|
termCandidates: /* @__PURE__ */ __name(async (_, { shortest, longest }) => [...docs].filter(([term]) => term.length >= shortest && term.length <= longest).map(([term, count2]) => ({ term, docs: count2 })), "termCandidates")
|
|
48738
48767
|
};
|
|
48739
|
-
const unmatched = probes.flat().filter((probe) => ![...stored4.values()].some((word2) => wordMatches(probe, word2, false))).map(({ literal:
|
|
48768
|
+
const unmatched = probes.flat().filter((probe) => ![...stored4.values()].some((word2) => wordMatches(probe, word2, false))).map(({ literal: literal5 }) => literal5);
|
|
48740
48769
|
const fixes = unmatched.length ? await correctWords(vocabulary, [...new Set(unmatched)]) : /* @__PURE__ */ new Map();
|
|
48741
48770
|
if (fixes.size) {
|
|
48742
48771
|
corrections = [...fixes].map(([from2, to]) => ({ from: from2, to }));
|
|
@@ -48801,7 +48830,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48801
48830
|
};
|
|
48802
48831
|
}, "dealsStoreOver");
|
|
48803
48832
|
|
|
48804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
48805
48834
|
var KEY2 = "ownerLanguages";
|
|
48806
48835
|
var ISO_639_1 = new Set("aa ab ae af ak am an ar as av ay az ba be bg bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu".split(" "));
|
|
48807
48836
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -48831,7 +48860,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
48831
48860
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY2, JSON.stringify(languages), now2);
|
|
48832
48861
|
}, "saveOwnerLanguages");
|
|
48833
48862
|
|
|
48834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
48835
48864
|
var OUTCOMES = {
|
|
48836
48865
|
lead: ["open", "open", "open", "won", "lost"],
|
|
48837
48866
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -49164,7 +49193,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49164
49193
|
};
|
|
49165
49194
|
}, "baseStagesStoreOver");
|
|
49166
49195
|
|
|
49167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
49168
49197
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
49169
49198
|
}) => {
|
|
49170
49199
|
const { database, now: now2 } = context;
|
|
@@ -49223,7 +49252,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
49223
49252
|
};
|
|
49224
49253
|
}, "botUpdateStoreOver");
|
|
49225
49254
|
|
|
49226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
49227
49256
|
var IMPORTER = { bot: "import" };
|
|
49228
49257
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
49229
49258
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -49268,7 +49297,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
49268
49297
|
};
|
|
49269
49298
|
}), "moneyLinesOf");
|
|
49270
49299
|
|
|
49271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
|
|
49272
49301
|
var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
|
|
49273
49302
|
var ROLE_LABELS = {
|
|
49274
49303
|
organization: {
|
|
@@ -49309,7 +49338,7 @@ var ROLE_LABELS = {
|
|
|
49309
49338
|
}
|
|
49310
49339
|
};
|
|
49311
49340
|
|
|
49312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
49313
49342
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
49314
49343
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
49315
49344
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -49393,7 +49422,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49393
49422
|
};
|
|
49394
49423
|
}, "relationRolesOver");
|
|
49395
49424
|
|
|
49396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
49397
49426
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
49398
49427
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
49399
49428
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -49440,7 +49469,8 @@ var picked = /* @__PURE__ */ __name((name, text8, values) => {
|
|
|
49440
49469
|
}, "picked");
|
|
49441
49470
|
var crmScopeUsers = /* @__PURE__ */ __name((database, key2) => {
|
|
49442
49471
|
const self = crmOwnUser(database, key2);
|
|
49443
|
-
|
|
49472
|
+
const chosen = userIds(stored2(database, crmSettingKey(key2, "unassigned")));
|
|
49473
|
+
return [...new Set(chosen.length ? chosen : self ? [self] : [])];
|
|
49444
49474
|
}, "crmScopeUsers");
|
|
49445
49475
|
var crmOwnUser = /* @__PURE__ */ __name((database, key2) => {
|
|
49446
49476
|
const value = stored2(database, crmSettingKey(key2, "self"));
|
|
@@ -49588,7 +49618,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
49588
49618
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
49589
49619
|
}), "crmSettingsOf");
|
|
49590
49620
|
|
|
49591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
49592
49622
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
49593
49623
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
49594
49624
|
id: link3.id,
|
|
@@ -49948,7 +49978,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
49948
49978
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
49949
49979
|
}, "decidedOrigin");
|
|
49950
49980
|
|
|
49951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
49952
49982
|
var keyOf4 = /* @__PURE__ */ __name((kind3, fromType, fromId, toType, toId, role) => `${String(kind3)}|${String(fromType)}:${String(fromId)}|${String(toType)}:${String(toId)}|${role == null ? "" : String(role)}`, "keyOf");
|
|
49953
49983
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
49954
49984
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -50086,7 +50116,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
50086
50116
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
50087
50117
|
}), "relationsStoreOver");
|
|
50088
50118
|
|
|
50089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
50090
50120
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
50091
50121
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
50092
50122
|
added: 0,
|
|
@@ -50276,7 +50306,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50276
50306
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
50277
50307
|
}, "recordRelationshipsOver");
|
|
50278
50308
|
|
|
50279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
50280
50310
|
var CONTRACTS = "SELECT k.*, b.name AS author_name, b.kind AS author_kind FROM contracts k LEFT JOIN bots b ON k.author_type = 'bot' AND b.id = k.author_id";
|
|
50281
50311
|
var DAY_MS2 = 864e5;
|
|
50282
50312
|
var deadlineOf = /* @__PURE__ */ __name((expiration, days) => expiration === null || days === null ? null : new Date(Date.parse(`${expiration}T00:00:00Z`) - days * DAY_MS2).toISOString().slice(0, 10), "deadlineOf");
|
|
@@ -50435,7 +50465,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50435
50465
|
};
|
|
50436
50466
|
}, "contractsStoreOver");
|
|
50437
50467
|
|
|
50438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
50439
50469
|
var BUSINESS_FIND_MAX = 2001;
|
|
50440
50470
|
var party2 = /* @__PURE__ */ __name((kind3, id2, as) => `LEFT JOIN persons ${as}p ON ${kind3} = 'person' AND ${as}p.id = ${id2} AND ${as}p.owner = 0 LEFT JOIN organizations ${as}o ON ${kind3} = 'organization' AND ${as}o.id = ${id2} LEFT JOIN projects ${as}j ON ${kind3} = 'project' AND ${as}j.id = ${id2}`, "party");
|
|
50441
50471
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -50540,7 +50570,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
50540
50570
|
};
|
|
50541
50571
|
}, "businessSearchOver");
|
|
50542
50572
|
|
|
50543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
50544
50574
|
var CATALOG_QUERY = defineQuery({
|
|
50545
50575
|
entity: "document",
|
|
50546
50576
|
backend: "sql",
|
|
@@ -50719,7 +50749,9 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
50719
50749
|
const actorSql = "json_each(d.metadata, '$.catalog.folded.people')";
|
|
50720
50750
|
const tagSql = "SELECT 1 FROM taggings g JOIN resolved_tags t ON t.id=g.tag_id WHERE g.taggable_type='document' AND g.taggable_id=d.id AND t.name=?";
|
|
50721
50751
|
const tag2 = /* @__PURE__ */ __name((name) => canonicalTagNamed(database, name)?.name ?? normalizeTag(name), "tag");
|
|
50722
|
-
if (query.parent
|
|
50752
|
+
if (Array.isArray(query.parent))
|
|
50753
|
+
add2("EXISTS(SELECT 1 FROM json_each(d.metadata, '$.catalog.parents') WHERE value IN (SELECT value FROM json_each(?)))", JSON.stringify(query.parent.map((parent2) => field2(parent2))));
|
|
50754
|
+
else if (query.parent !== void 0)
|
|
50723
50755
|
add2("EXISTS(SELECT 1 FROM json_each(d.metadata, '$.catalog.parents') WHERE value=?)", query.parent);
|
|
50724
50756
|
if (query.kind !== void 0)
|
|
50725
50757
|
add2("json_extract(d.metadata, '$.catalog.kind')=?", query.kind);
|
|
@@ -50771,7 +50803,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
50771
50803
|
};
|
|
50772
50804
|
}, "catalogStoreOver");
|
|
50773
50805
|
|
|
50774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
50775
50807
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
50776
50808
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
50777
50809
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -50784,7 +50816,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
50784
50816
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
50785
50817
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
50786
50818
|
|
|
50787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
50788
50820
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
50789
50821
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
50790
50822
|
signal?.throwIfAborted();
|
|
@@ -50883,7 +50915,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
50883
50915
|
});
|
|
50884
50916
|
}, "readMeetingContextEvidence");
|
|
50885
50917
|
|
|
50886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
50887
50919
|
var corpora = {
|
|
50888
50920
|
message: {
|
|
50889
50921
|
table: "messages",
|
|
@@ -51128,7 +51160,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
51128
51160
|
}
|
|
51129
51161
|
}), "contextRecordsOver");
|
|
51130
51162
|
|
|
51131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
51132
51164
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
51133
51165
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
51134
51166
|
var DryRun = class extends Error {
|
|
@@ -51163,7 +51195,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
51163
51195
|
database.prepare("INSERT INTO temp.crm_scope SELECT DISTINCT value FROM json_each(?)").run(JSON.stringify((users ?? []).map((id2) => crmIdentityId(key2, id2, "user"))));
|
|
51164
51196
|
database.exec("INSERT INTO temp.crm_proposed SELECT ref, max(decided) FROM (SELECT json_extract(payload, '$.identity') AS ref, status <> 'proposed' AS decided FROM proposed_actions WHERE kind = 'identity_link' UNION ALL SELECT json_extract(payload, '$.with'), status <> 'proposed' FROM proposed_actions WHERE kind = 'identity_link') WHERE ref IS NOT NULL GROUP BY ref");
|
|
51165
51197
|
const identityRefs = referencesTo(database, "identities", /* @__PURE__ */ new Set([...OWN, "account_identities", "involvements"]), "SELECT id FROM temp.crm_gone");
|
|
51166
|
-
database.prepare(`INSERT INTO temp.crm_gone SELECT i.id, l.person_id FROM identities i LEFT JOIN identity_links l ON l.identity_id = i.id WHERE ${contactOf2} AND i.created_at < ? AND i.updated_at < ? AND NOT ${named2("deals", "deal")} AND NOT ${named2("leads", "lead")} AND NOT EXISTS (SELECT 1 FROM links k JOIN records r ON r.entity_type = 'organization' AND r.entity_id = k.to_id WHERE k.from_type = 'person' AND k.from_id = l.person_id AND +k.to_type = 'organization' AND k.kind = 'member-of' AND k.role = 'contact' AND k.source = 'crm' AND k.deleted_at IS NULL AND r.account_id = ${accountId} AND r.type = 'organization' AND r.deleted_at IS NULL) AND NOT EXISTS (SELECT 1 FROM identity_link_events e WHERE e.identity_id = i.id AND e.author = 'owner') AND NOT EXISTS (SELECT 1 FROM temp.crm_proposed c WHERE c.decided AND c.ref = i.provider || ':' || i.external_id)`).run(...contact, before2, before2);
|
|
51198
|
+
database.prepare(`INSERT INTO temp.crm_gone SELECT i.id, l.person_id FROM identities i LEFT JOIN identity_links l ON l.identity_id = i.id WHERE ${contactOf2} AND i.created_at < ? AND i.updated_at < ? ` + (users === void 0 ? "" : "AND coalesce(json_extract(i.metadata, '$.assignee'), '') NOT IN (SELECT id FROM temp.crm_scope) ") + `AND NOT ${named2("deals", "deal")} AND NOT ${named2("leads", "lead")} AND NOT EXISTS (SELECT 1 FROM links k JOIN records r ON r.entity_type = 'organization' AND r.entity_id = k.to_id WHERE k.from_type = 'person' AND k.from_id = l.person_id AND +k.to_type = 'organization' AND k.kind = 'member-of' AND k.role = 'contact' AND k.source = 'crm' AND k.deleted_at IS NULL AND r.account_id = ${accountId} AND r.type = 'organization' AND r.deleted_at IS NULL) AND NOT EXISTS (SELECT 1 FROM identity_link_events e WHERE e.identity_id = i.id AND e.author = 'owner') AND NOT EXISTS (SELECT 1 FROM temp.crm_proposed c WHERE c.decided AND c.ref = i.provider || ':' || i.external_id)`).run(...contact, before2, before2);
|
|
51167
51199
|
database.exec(`DELETE FROM temp.crm_gone WHERE id IN (${identityRefs})`);
|
|
51168
51200
|
database.exec("INSERT OR IGNORE INTO temp.crm_persons SELECT person FROM temp.crm_gone WHERE person IS NOT NULL");
|
|
51169
51201
|
database.exec("INSERT OR IGNORE INTO temp.crm_persons SELECT from_person_id FROM identity_link_events WHERE identity_id IN (SELECT id FROM temp.crm_gone) AND from_person_id IS NOT NULL");
|
|
@@ -51205,7 +51237,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
51205
51237
|
}
|
|
51206
51238
|
}, "removeCrmContacts");
|
|
51207
51239
|
|
|
51208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
51209
51241
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
51210
51242
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
51211
51243
|
const { database, now: now2 } = context;
|
|
@@ -51252,7 +51284,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
51252
51284
|
return { save: save2, pending, handled };
|
|
51253
51285
|
}, "crmStageEntriesOver");
|
|
51254
51286
|
|
|
51255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
51256
51288
|
var PENDING = "crm:pending-relations";
|
|
51257
51289
|
var PENDING_DAYS = 30;
|
|
51258
51290
|
var PENDING_MOST = 5e3;
|
|
@@ -51470,6 +51502,8 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51470
51502
|
const saved = saveItemRow(key2, accountId, kind3, item, at2);
|
|
51471
51503
|
if ("reason" in saved)
|
|
51472
51504
|
return saved;
|
|
51505
|
+
if (saved.amountNote)
|
|
51506
|
+
report.tally.issues.push({ externalId: item.externalId, reason: "crm.amount-unkept", message: saved.amountNote });
|
|
51473
51507
|
const { id: id2 } = saved;
|
|
51474
51508
|
if (item.people === void 0 && item.assignee === void 0)
|
|
51475
51509
|
return null;
|
|
@@ -51497,6 +51531,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51497
51531
|
reportFrom(key2, accountId, self, wanted, scope3, report.tally, report.pending);
|
|
51498
51532
|
return null;
|
|
51499
51533
|
}, "saveItem");
|
|
51534
|
+
const assignContact = /* @__PURE__ */ __name((key2, externalId, assignee) => {
|
|
51535
|
+
const user = assignee ? crmIdentityId(key2, normalCrmUserId(assignee), "user") : null;
|
|
51536
|
+
database.prepare("UPDATE identities SET metadata = CASE WHEN ? IS NULL THEN json_remove(metadata, '$.assignee') ELSE json_set(coalesce(metadata, '{}'), '$.assignee', ?) END WHERE provider = ? AND external_id = ? AND json_extract(metadata, '$.assignee') IS NOT ?").run(user, user, key2.provider, crmIdentityId(key2, externalId), user);
|
|
51537
|
+
}, "assignContact");
|
|
51500
51538
|
const saveItems = /* @__PURE__ */ __name((key2, kind3, items, users) => write(database, () => {
|
|
51501
51539
|
const accountId = account(key2);
|
|
51502
51540
|
const at2 = now2();
|
|
@@ -51636,7 +51674,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51636
51674
|
const accountId = findAccountPk(context, key2);
|
|
51637
51675
|
if (accountId === void 0 || kind3 === "person")
|
|
51638
51676
|
return [];
|
|
51639
|
-
return kind3 === "organization" ? database.prepare("SELECT id, external_id, updated_at FROM records WHERE account_id = ? AND type = 'organization' AND deleted_at IS NULL").all(accountId) : database.prepare(`SELECT id, external_id, updated_at FROM ${TABLES2[kind3]} WHERE account_id = ? AND deleted_at IS NULL`).all(accountId);
|
|
51677
|
+
return kind3 === "organization" ? database.prepare("SELECT id, external_id, updated_at FROM records WHERE account_id = ? AND type = 'organization' AND deleted_at IS NULL").all(accountId) : database.prepare(`SELECT id, external_id, updated_at, json_extract(metadata, '$.assignee') AS assignee FROM ${TABLES2[kind3]} WHERE account_id = ? AND deleted_at IS NULL`).all(accountId);
|
|
51640
51678
|
}, "stored");
|
|
51641
51679
|
const markDeleted2 = /* @__PURE__ */ __name((key2, kind3, rows) => {
|
|
51642
51680
|
const table = kind3 === "organization" ? "records" : TABLES2[kind3];
|
|
@@ -51670,6 +51708,8 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51670
51708
|
const tally = tallied();
|
|
51671
51709
|
const pending = pendingBook(accountId);
|
|
51672
51710
|
for (const contact of contacts2) {
|
|
51711
|
+
if (contact.assignee !== void 0)
|
|
51712
|
+
assignContact(key2, contact.externalId, contact.assignee);
|
|
51673
51713
|
const person2 = nameUnnamed(key2, contact.externalId, "contact", textOf4(contact.name, 200));
|
|
51674
51714
|
const email = textOf4(contact.email, 320)?.toLowerCase();
|
|
51675
51715
|
const sharing = email ? peopleSharing(key2, contact.externalId, email) : 0;
|
|
@@ -51722,9 +51762,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51722
51762
|
const gone = new Set(externalIds);
|
|
51723
51763
|
return markDeleted2(key2, kind3, stored4(key2, kind3).filter((row2) => gone.has(String(row2.external_id))));
|
|
51724
51764
|
}), "remove"),
|
|
51725
|
-
removeUnlisted: /* @__PURE__ */ __name(async (key2, kind3, listed, before2, { dryRun } = {}) => write(database, () => {
|
|
51765
|
+
removeUnlisted: /* @__PURE__ */ __name(async (key2, kind3, listed, before2, { dryRun, users } = {}) => write(database, () => {
|
|
51726
51766
|
const held = new Set(listed);
|
|
51727
|
-
const
|
|
51767
|
+
const scope3 = users && new Set(users.map((id2) => crmIdentityId(key2, id2, "user")));
|
|
51768
|
+
const gone = stored4(key2, kind3).filter((row2) => !held.has(String(row2.external_id)) && Number(row2.updated_at) < before2 && (!scope3 || row2.assignee == null || scope3.has(String(row2.assignee))));
|
|
51728
51769
|
return dryRun ? gone.length : markDeleted2(key2, kind3, gone);
|
|
51729
51770
|
}), "removeUnlisted"),
|
|
51730
51771
|
scope: /* @__PURE__ */ __name(async (key2) => crmScope(database, key2), "scope"),
|
|
@@ -51761,10 +51802,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51761
51802
|
};
|
|
51762
51803
|
}, "crmCopiesOver");
|
|
51763
51804
|
|
|
51764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51765
51806
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
51766
51807
|
|
|
51767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
51768
51809
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
51769
51810
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
51770
51811
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -51778,7 +51819,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
51778
51819
|
}, "callbackDataOf");
|
|
51779
51820
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
51780
51821
|
|
|
51781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51782
51823
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
51783
51824
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
51784
51825
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -51877,7 +51918,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
51877
51918
|
};
|
|
51878
51919
|
}, "decisionRequestStoreOver");
|
|
51879
51920
|
|
|
51880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
51881
51922
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
51882
51923
|
var DAY6 = 864e5;
|
|
51883
51924
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -51974,6 +52015,21 @@ var rowsOf = /* @__PURE__ */ __name((context, filter) => {
|
|
|
51974
52015
|
}, "rowsOf");
|
|
51975
52016
|
var ROW_MEETINGS = "r.meetings";
|
|
51976
52017
|
var inRowMeetings = /* @__PURE__ */ __name((condition) => `EXISTS (SELECT 1 FROM json_each(${ROW_MEETINGS}) rm WHERE ${condition.replaceAll("{m}", "rm.value")})`, "inRowMeetings");
|
|
52018
|
+
var MEETING_TRANSCRIPT = `(EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = {m} AND t.deleted_at IS NULL
|
|
52019
|
+
AND t.superseded_at IS NULL)
|
|
52020
|
+
OR EXISTS (SELECT 1 FROM links tl JOIN documents td ON td.id = tl.to_id WHERE tl.from_type = 'meeting'
|
|
52021
|
+
AND tl.from_id = {m} AND tl.kind = 'attached' AND tl.to_type = 'document' AND tl.role IN ('transcript', 'notes')
|
|
52022
|
+
AND td.deleted_at IS NULL))`;
|
|
52023
|
+
var literal4 = /* @__PURE__ */ __name((text8) => `'${text8.replaceAll("'", "''")}'`, "literal");
|
|
52024
|
+
var namedLikeTranscript = /* @__PURE__ */ __name((title2) => `(${TRANSCRIPT_WORDS.flatMap((word2) => [
|
|
52025
|
+
`${title2} LIKE ${literal4(`%${word2}%`)}`,
|
|
52026
|
+
`instr(${title2}, ${literal4(word2.toLowerCase())}) > 0`
|
|
52027
|
+
]).join(" OR ")})`, "namedLikeTranscript");
|
|
52028
|
+
var EVENT_TRANSCRIPT = `EXISTS (SELECT 1 FROM calendar_entries tc JOIN links tl ON tl.from_type = 'calendar_entry'
|
|
52029
|
+
AND tl.from_id = tc.id AND tl.kind = 'attached' AND tl.to_type = 'document'
|
|
52030
|
+
JOIN documents td ON td.id = tl.to_id WHERE tc.event_id = {e} AND td.deleted_at IS NULL
|
|
52031
|
+
AND ${namedLikeTranscript("td.title")})`;
|
|
52032
|
+
var ROW_TRANSCRIPT = `((r.type = 'event' AND ${EVENT_TRANSCRIPT.replaceAll("{e}", "r.id")}) OR ${inRowMeetings(MEETING_TRANSCRIPT)})`;
|
|
51977
52033
|
var PHONE_MEETING = "(SELECT a.provider FROM meetings km JOIN accounts a ON a.id = km.account_id WHERE km.id = {m}) = 'phone'";
|
|
51978
52034
|
var KIND = `(CASE
|
|
51979
52035
|
WHEN (r.type = 'event' AND EXISTS (SELECT 1 FROM calendar_entries kc WHERE kc.event_id = r.id
|
|
@@ -52007,7 +52063,7 @@ var filtersOf = /* @__PURE__ */ __name((database, filter) => {
|
|
|
52007
52063
|
params.push(people2, people2, people2);
|
|
52008
52064
|
}
|
|
52009
52065
|
if (filter.hasTranscript !== void 0) {
|
|
52010
|
-
clauses.push(`${filter.hasTranscript ? "" : "NOT "}${
|
|
52066
|
+
clauses.push(`${filter.hasTranscript ? "" : "NOT "}${ROW_TRANSCRIPT}`);
|
|
52011
52067
|
}
|
|
52012
52068
|
return { sql: clauses.length ? `WHERE ${clauses.join(" AND ")}` : "", params };
|
|
52013
52069
|
}, "filtersOf");
|
|
@@ -52056,15 +52112,15 @@ var citingBatches = /* @__PURE__ */ __name((database, meetingIds) => {
|
|
|
52056
52112
|
var hydrate = /* @__PURE__ */ __name((database, page3) => {
|
|
52057
52113
|
const eventIds = page3.filter(({ type }) => type === "event").map(({ id: id2 }) => id2);
|
|
52058
52114
|
const meetingIds = [...new Set(page3.flatMap(({ meetingIds: meetingIds2 }) => meetingIds2))];
|
|
52059
|
-
const events3 = new Map(database.prepare(
|
|
52115
|
+
const events3 = new Map(database.prepare(`SELECT e.*, ${EVENT_TRANSCRIPT.replaceAll("{e}", "e.id")} AS has_transcript FROM events e
|
|
52116
|
+
WHERE e.id IN (SELECT value FROM json_each(?))`).all(ids2(eventIds)).map((row2) => [Number(row2.id), row2]));
|
|
52060
52117
|
const entries = database.prepare(`SELECT ce.id, ce.event_id, ce.join_url, ce.timezone, ce.status, ce.deleted_at, ce.event_type, ce.url,
|
|
52061
52118
|
ce.own_response, ce.conference, c.title AS calendar, a.provider, a.external_id AS account FROM calendar_entries ce JOIN calendars c ON c.id = ce.calendar_id
|
|
52062
52119
|
JOIN accounts a ON a.id = c.account_id WHERE ce.event_id IN (SELECT value FROM json_each(?))
|
|
52063
52120
|
ORDER BY ce.deleted_at IS NOT NULL, ce.id`).all(ids2(eventIds));
|
|
52064
52121
|
const series = new Map(database.prepare("SELECT id, recurrence FROM event_series WHERE id IN (SELECT event_series_id FROM events WHERE id IN (SELECT value FROM json_each(?)))").all(ids2(eventIds)).map((row2) => [Number(row2.id), row2.recurrence == null ? null : JSON.parse(String(row2.recurrence))]));
|
|
52065
52122
|
const meetings2 = new Map(database.prepare(`SELECT m.*, a.provider, a.external_id AS account,
|
|
52066
|
-
|
|
52067
|
-
AND t.superseded_at IS NULL) AS has_transcript,
|
|
52123
|
+
${MEETING_TRANSCRIPT.replaceAll("{m}", "m.id")} AS has_transcript,
|
|
52068
52124
|
EXISTS (SELECT 1 FROM meeting_summaries s WHERE s.meeting_id = m.id) AS has_summary,
|
|
52069
52125
|
(EXISTS (SELECT 1 FROM attachments ra WHERE ra.attachable_type = 'meeting' AND ra.attachable_id = m.id
|
|
52070
52126
|
AND (ra.kind IN ('audio', 'video') OR ra.mime LIKE 'audio/%' OR ra.mime LIKE 'video/%'))
|
|
@@ -52182,7 +52238,7 @@ var hydrate = /* @__PURE__ */ __name((database, page3) => {
|
|
|
52182
52238
|
sources,
|
|
52183
52239
|
participants: [...participants3.values()],
|
|
52184
52240
|
hasRecording: held.some((meeting) => Number(meeting.has_recording) === 1),
|
|
52185
|
-
hasTranscript: held.some((meeting) => Number(meeting.has_transcript) === 1),
|
|
52241
|
+
hasTranscript: Number(event2?.has_transcript ?? 0) === 1 || held.some((meeting) => Number(meeting.has_transcript) === 1),
|
|
52186
52242
|
hasSummary: held.some((meeting) => Number(meeting.has_summary) === 1),
|
|
52187
52243
|
documents: [...linked.values()],
|
|
52188
52244
|
seriesId: num(event2?.event_series_id),
|
|
@@ -52249,7 +52305,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
52249
52305
|
};
|
|
52250
52306
|
}, "meetingListingOver");
|
|
52251
52307
|
|
|
52252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
52253
52309
|
var DOCUMENT_KINDS = [
|
|
52254
52310
|
"transcript",
|
|
52255
52311
|
"doc",
|
|
@@ -52486,7 +52542,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
52486
52542
|
};
|
|
52487
52543
|
}, "documentListingOver");
|
|
52488
52544
|
|
|
52489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
52490
52546
|
var NOTE_FIELDS = [
|
|
52491
52547
|
"text",
|
|
52492
52548
|
"exact",
|
|
@@ -52771,6 +52827,7 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
|
|
|
52771
52827
|
});
|
|
52772
52828
|
}, "searchCorpus");
|
|
52773
52829
|
var SCAN_PAGE3 = 5e3;
|
|
52830
|
+
var SETTLE_BATCH = 50;
|
|
52774
52831
|
var LIVE5 = "((k.chunkable_type = 'document' AND EXISTS (SELECT 1 FROM documents d WHERE d.id = k.chunkable_id AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1 AND (? IS NULL OR d.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))))) OR (k.chunkable_type = 'note' AND ? IS NULL AND EXISTS (SELECT 1 FROM notes n WHERE n.id = k.chunkable_id AND n.deleted_at IS NULL)))";
|
|
52775
52832
|
var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
52776
52833
|
const { database } = context;
|
|
@@ -52799,6 +52856,36 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52799
52856
|
return matchingNoteRefs(context, query);
|
|
52800
52857
|
}, "matchingRefs"),
|
|
52801
52858
|
indexState: /* @__PURE__ */ __name(async () => noteIndexState(database), "indexState"),
|
|
52859
|
+
indexWritten: /* @__PURE__ */ __name(async ({ until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
52860
|
+
if (isQueryOnly(database))
|
|
52861
|
+
return 0;
|
|
52862
|
+
const once4 = /* @__PURE__ */ __name(() => {
|
|
52863
|
+
let ran = false;
|
|
52864
|
+
return () => {
|
|
52865
|
+
const stop = ran;
|
|
52866
|
+
ran = true;
|
|
52867
|
+
return stop;
|
|
52868
|
+
};
|
|
52869
|
+
}, "once");
|
|
52870
|
+
const steps = [
|
|
52871
|
+
() => drainCorpus(database, CORPORA.document, stemmerFor2, { batch: SETTLE_BATCH, until: once4() }),
|
|
52872
|
+
() => drainCorpus(database, CORPORA.note, stemmerFor2, { batch: SETTLE_BATCH, until: once4() }),
|
|
52873
|
+
() => fillTrigrams(database, { batch: SETTLE_BATCH, until: once4() })
|
|
52874
|
+
];
|
|
52875
|
+
let total = 0;
|
|
52876
|
+
for (; ; ) {
|
|
52877
|
+
let done = 0;
|
|
52878
|
+
for (const step of steps) {
|
|
52879
|
+
if (until())
|
|
52880
|
+
return total;
|
|
52881
|
+
done += step();
|
|
52882
|
+
}
|
|
52883
|
+
total += done;
|
|
52884
|
+
if (done === 0)
|
|
52885
|
+
return total;
|
|
52886
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
52887
|
+
}
|
|
52888
|
+
}, "indexWritten"),
|
|
52802
52889
|
chunksToEmbed: /* @__PURE__ */ __name(async (model, { after: after2, limit }) => {
|
|
52803
52890
|
drain();
|
|
52804
52891
|
const scope3 = live2(void 0, void 0);
|
|
@@ -52929,7 +53016,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52929
53016
|
};
|
|
52930
53017
|
}, "noteSearchOver");
|
|
52931
53018
|
|
|
52932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
52933
53020
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
52934
53021
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
52935
53022
|
var EVENT_CORPUS = {
|
|
@@ -53061,7 +53148,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
53061
53148
|
};
|
|
53062
53149
|
}, "eventSearchOver");
|
|
53063
53150
|
|
|
53064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
53065
53152
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
53066
53153
|
try {
|
|
53067
53154
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -53119,7 +53206,7 @@ var aheadOf = /* @__PURE__ */ __name((reference2, flag6, now2 = Date.now(), opti
|
|
|
53119
53206
|
return read2.time;
|
|
53120
53207
|
}, "aheadOf");
|
|
53121
53208
|
|
|
53122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
53123
53210
|
var NAMED4 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
53124
53211
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
53125
53212
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -53342,7 +53429,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53342
53429
|
};
|
|
53343
53430
|
}, "factsStoreOver");
|
|
53344
53431
|
|
|
53345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
53346
53433
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
53347
53434
|
throw new CliError("validation_error", message3);
|
|
53348
53435
|
}, "invalid");
|
|
@@ -53510,7 +53597,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
53510
53597
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
53511
53598
|
}, "findingsCoreOver");
|
|
53512
53599
|
|
|
53513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
53514
53601
|
var stale = /* @__PURE__ */ __name(() => {
|
|
53515
53602
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
53516
53603
|
reason: "evidence-findings.stale"
|
|
@@ -53774,7 +53861,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53774
53861
|
};
|
|
53775
53862
|
}, "evidenceFindingsStoreOver");
|
|
53776
53863
|
|
|
53777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
53778
53865
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
53779
53866
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
53780
53867
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -53828,7 +53915,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
53828
53915
|
}, "forPerson")
|
|
53829
53916
|
}), "involvementStoreOver");
|
|
53830
53917
|
|
|
53831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
53832
53919
|
var LABELLED = {
|
|
53833
53920
|
note: "note",
|
|
53834
53921
|
document: "document",
|
|
@@ -53841,7 +53928,7 @@ var LABELLED = {
|
|
|
53841
53928
|
};
|
|
53842
53929
|
var accountMeetingTagging = /* @__PURE__ */ __name((alias2) => `(${alias2}.taggable_type <> 'meeting' OR EXISTS (SELECT 1 FROM meetings mt WHERE mt.id = ${alias2}.taggable_id AND mt.deleted_at IS NULL AND (? IS NULL OR mt.account_id = ?)))`, "accountMeetingTagging");
|
|
53843
53930
|
|
|
53844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
53845
53932
|
import { createHash as createHash15 } from "node:crypto";
|
|
53846
53933
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
53847
53934
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -53927,7 +54014,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
53927
54014
|
};
|
|
53928
54015
|
}, "meetingProjectsStoreOver");
|
|
53929
54016
|
|
|
53930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
53931
54018
|
var ORGANIZATIONS_QUERY = {
|
|
53932
54019
|
entity: "organization",
|
|
53933
54020
|
backend: "sql",
|
|
@@ -53968,7 +54055,7 @@ var REMINDERS_QUERY = {
|
|
|
53968
54055
|
})
|
|
53969
54056
|
};
|
|
53970
54057
|
|
|
53971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
53972
54059
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
53973
54060
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
53974
54061
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -53989,7 +54076,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
53989
54076
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
53990
54077
|
}, "categorySql");
|
|
53991
54078
|
|
|
53992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
53993
54080
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
53994
54081
|
id: String(row2.id),
|
|
53995
54082
|
ref: `organization:${row2.id}`,
|
|
@@ -54034,7 +54121,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
54034
54121
|
}), "setOwnOrganization")
|
|
54035
54122
|
}), "organizationsStoreOver");
|
|
54036
54123
|
|
|
54037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
54038
54125
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
54039
54126
|
var ACCOUNT_ENDS = [
|
|
54040
54127
|
["deal", "deals"],
|
|
@@ -54185,13 +54272,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
54185
54272
|
__name(proposalItem, "proposalItem");
|
|
54186
54273
|
}, "relationListOver");
|
|
54187
54274
|
|
|
54188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
54189
54276
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
54190
54277
|
...relationListOver(context),
|
|
54191
54278
|
...relationRolesOver(context)
|
|
54192
54279
|
}), "relationReadsOver");
|
|
54193
54280
|
|
|
54194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
54195
54282
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
54196
54283
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
54197
54284
|
var DEFAULT_LIMIT = 500;
|
|
@@ -54434,16 +54521,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54434
54521
|
};
|
|
54435
54522
|
}, "sourceReviewStoreOver");
|
|
54436
54523
|
|
|
54437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54438
54525
|
import { createHash as createHash18 } from "node:crypto";
|
|
54439
54526
|
|
|
54440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54441
54528
|
import { createHash as createHash17 } from "node:crypto";
|
|
54442
54529
|
|
|
54443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54444
54531
|
import { createHash as createHash16 } from "node:crypto";
|
|
54445
54532
|
|
|
54446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
54447
54534
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
54448
54535
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
54449
54536
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -54494,7 +54581,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
54494
54581
|
return input;
|
|
54495
54582
|
}, "consolidationApplyInput");
|
|
54496
54583
|
|
|
54497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
54498
54585
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
54499
54586
|
id: String(row2.id),
|
|
54500
54587
|
sourceId: String(row2.source_id),
|
|
@@ -54569,7 +54656,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
54569
54656
|
}, { beforeCommit: check3 });
|
|
54570
54657
|
}, "applyTagConsolidation");
|
|
54571
54658
|
|
|
54572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54573
54660
|
var selections = [
|
|
54574
54661
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
54575
54662
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -54713,7 +54800,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
54713
54800
|
};
|
|
54714
54801
|
}, "previewRows");
|
|
54715
54802
|
|
|
54716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54717
54804
|
var kinds = ["project", "tag", "topic"];
|
|
54718
54805
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
54719
54806
|
if (signal?.aborted)
|
|
@@ -54977,7 +55064,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54977
55064
|
};
|
|
54978
55065
|
}, "vocabularyStoreOver");
|
|
54979
55066
|
|
|
54980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
54981
55068
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
54982
55069
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
54983
55070
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -55531,7 +55618,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
55531
55618
|
return key2.padEnd(3, "X");
|
|
55532
55619
|
}, "projectKey");
|
|
55533
55620
|
|
|
55534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
55535
55622
|
var DAY7 = 864e5;
|
|
55536
55623
|
var SETTING5 = "logs_pruned_at";
|
|
55537
55624
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY7, botUpdatePayloadsMs: 30 * DAY7 };
|
|
@@ -55558,7 +55645,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
55558
55645
|
};
|
|
55559
55646
|
}, "logPruner");
|
|
55560
55647
|
|
|
55561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
55562
55649
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
55563
55650
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
55564
55651
|
var invalid8 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -55934,7 +56021,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
55934
56021
|
}, "checkMailFindings");
|
|
55935
56022
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
55936
56023
|
|
|
55937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
55938
56025
|
var ORDERS = "SELECT o.*, b.name AS author_name, b.kind AS author_kind FROM orders o LEFT JOIN bots b ON o.author_type = 'bot' AND b.id = o.author_id";
|
|
55939
56026
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
55940
56027
|
const { database, now: now2 } = context;
|
|
@@ -56149,7 +56236,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56149
56236
|
};
|
|
56150
56237
|
}, "ordersStoreOver");
|
|
56151
56238
|
|
|
56152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
56153
56240
|
var MAIL_EDITS = {
|
|
56154
56241
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
56155
56242
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -56638,7 +56725,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
56638
56725
|
};
|
|
56639
56726
|
}, "mailFindingsStoreOver");
|
|
56640
56727
|
|
|
56641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
56642
56729
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
56643
56730
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
56644
56731
|
reason: "meeting-findings.stale"
|
|
@@ -56851,7 +56938,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56851
56938
|
};
|
|
56852
56939
|
}, "meetingFindingsStoreOver");
|
|
56853
56940
|
|
|
56854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
56855
56942
|
var RANK_BATCH = 512;
|
|
56856
56943
|
var LIVE6 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
56857
56944
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -57122,7 +57209,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
57122
57209
|
}
|
|
57123
57210
|
}), "meetingVectorsOver");
|
|
57124
57211
|
|
|
57125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
57126
57213
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
57127
57214
|
var TEXTS = {
|
|
57128
57215
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -57223,7 +57310,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57223
57310
|
};
|
|
57224
57311
|
}, "sourceMentionStoreOver");
|
|
57225
57312
|
|
|
57226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
57227
57314
|
var TRANSACTIONS = "SELECT t.*, w.name AS wallet_name, b.name AS author_name, b.kind AS author_kind, (SELECT coalesce(sum(amount), 0) FROM transaction_splits WHERE transaction_id = t.id) AS split FROM financial_transactions t JOIN financial_accounts w ON w.id = t.financial_account_id LEFT JOIN bots b ON t.author_type = 'bot' AND b.id = t.author_id";
|
|
57228
57315
|
var MAX_SPLITS = 100;
|
|
57229
57316
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -57457,11 +57544,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
57457
57544
|
};
|
|
57458
57545
|
}, "transactionsStoreOver");
|
|
57459
57546
|
|
|
57460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
57461
57548
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
57462
57549
|
import { dirname as dirname2 } from "node:path";
|
|
57463
57550
|
|
|
57464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
57465
57552
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
57466
57553
|
var CLIENTS_SETTING = "clients";
|
|
57467
57554
|
var coreVersion = (() => {
|
|
@@ -57522,7 +57609,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
57522
57609
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
57523
57610
|
}, "refusalAdvice");
|
|
57524
57611
|
|
|
57525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
57526
57613
|
var GENERATED = [
|
|
57527
57614
|
{
|
|
57528
57615
|
"name": "20261010184427_initial",
|
|
@@ -58876,7 +58963,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
58876
58963
|
}
|
|
58877
58964
|
];
|
|
58878
58965
|
|
|
58879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
58880
58967
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
58881
58968
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
58882
58969
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -59109,7 +59196,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
59109
59196
|
return { ...result, foreignKeyViolations };
|
|
59110
59197
|
}, "rollBack");
|
|
59111
59198
|
|
|
59112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
59113
59200
|
var V31_TABLES = [
|
|
59114
59201
|
"accounts",
|
|
59115
59202
|
"account_identities",
|
|
@@ -59274,7 +59361,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
59274
59361
|
return migrations;
|
|
59275
59362
|
}, "generatedMigrations");
|
|
59276
59363
|
|
|
59277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
59278
59365
|
var MIGRATIONS = generatedMigrations();
|
|
59279
59366
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
59280
59367
|
version INTEGER PRIMARY KEY,
|
|
@@ -59371,7 +59458,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
59371
59458
|
}
|
|
59372
59459
|
}, "migrate");
|
|
59373
59460
|
|
|
59374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
59375
59462
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
59376
59463
|
const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
|
|
59377
59464
|
if (pending.get(0, 1) === void 0)
|
|
@@ -59393,7 +59480,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
59393
59480
|
}
|
|
59394
59481
|
}, "fillJoinKeys");
|
|
59395
59482
|
|
|
59396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
59397
59484
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
59398
59485
|
refuseOwnerStoreInTests(path);
|
|
59399
59486
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -59407,8 +59494,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
59407
59494
|
}, "openSqlite");
|
|
59408
59495
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59409
59496
|
quietSqliteWarning();
|
|
59410
|
-
const { drizzle } = await import("./node-
|
|
59411
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
59497
|
+
const { drizzle } = await import("./node-MPEQSFI3.js");
|
|
59498
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-OLQMAYB4.js");
|
|
59412
59499
|
const client = await nodeClient(path, { readOnly });
|
|
59413
59500
|
try {
|
|
59414
59501
|
if (!readOnly)
|
|
@@ -59422,8 +59509,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59422
59509
|
}
|
|
59423
59510
|
}, "openUnderNode");
|
|
59424
59511
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
59425
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
59426
|
-
const { drizzle } = await import("./bun-
|
|
59512
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-PYMKLBRU.js");
|
|
59513
|
+
const { drizzle } = await import("./bun-LU5LP3JI.js");
|
|
59427
59514
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
59428
59515
|
try {
|
|
59429
59516
|
if (!readOnly)
|
|
@@ -59437,7 +59524,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59437
59524
|
}
|
|
59438
59525
|
}, "openUnderBun");
|
|
59439
59526
|
|
|
59440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
59441
59528
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
59442
59529
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
59443
59530
|
try {
|
|
@@ -59505,7 +59592,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
59505
59592
|
});
|
|
59506
59593
|
}, "movePaymentFacts");
|
|
59507
59594
|
|
|
59508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
59509
59596
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
59510
59597
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
59511
59598
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -59523,7 +59610,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
59523
59610
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
59524
59611
|
}, "assertReadCompatible");
|
|
59525
59612
|
|
|
59526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
59527
59614
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
59528
59615
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
59529
59616
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -59569,7 +59656,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
59569
59656
|
});
|
|
59570
59657
|
}, "moveSuggestedLinks");
|
|
59571
59658
|
|
|
59572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
59573
59660
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
59574
59661
|
var TEST_PROVIDER = "chat";
|
|
59575
59662
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -59590,7 +59677,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
59590
59677
|
}
|
|
59591
59678
|
}, "purgeTestAccounts");
|
|
59592
59679
|
|
|
59593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59594
59681
|
var BACKFILL_ON_OPEN = 5e3;
|
|
59595
59682
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
59596
59683
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -59702,7 +59789,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
59702
59789
|
}
|
|
59703
59790
|
}, "openStoreContext");
|
|
59704
59791
|
|
|
59705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
59706
59793
|
var PRODUCTS = "SELECT c.*, b.name AS author_name, b.kind AS author_kind FROM catalog_items c LEFT JOIN bots b ON c.author_type = 'bot' AND b.id = c.author_id";
|
|
59707
59794
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
59708
59795
|
const { database, now: now2 } = context;
|
|
@@ -59810,13 +59897,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59810
59897
|
};
|
|
59811
59898
|
}, "productsStoreOver");
|
|
59812
59899
|
|
|
59813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59814
59901
|
import { createHash as createHash20 } from "node:crypto";
|
|
59815
59902
|
|
|
59816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59817
59904
|
import { createHash as createHash19 } from "node:crypto";
|
|
59818
59905
|
|
|
59819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
59820
59907
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59821
59908
|
var ref = text6(2048);
|
|
59822
59909
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59886,7 +59973,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
59886
59973
|
}))
|
|
59887
59974
|
});
|
|
59888
59975
|
|
|
59889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59890
59977
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
59891
59978
|
var invalid11 = /* @__PURE__ */ __name((field4) => {
|
|
59892
59979
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -60019,7 +60106,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
60019
60106
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
60020
60107
|
}, "projectAnnotationsFingerprint");
|
|
60021
60108
|
|
|
60022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
60023
60110
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
60024
60111
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
60025
60112
|
var targetSchema = strictObject({
|
|
@@ -60126,7 +60213,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
60126
60213
|
}, "planBoundProjectAnnotations");
|
|
60127
60214
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
60128
60215
|
|
|
60129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
60130
60217
|
import { createHash as createHash21 } from "node:crypto";
|
|
60131
60218
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
60132
60219
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -60220,7 +60307,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
60220
60307
|
})).digest("hex");
|
|
60221
60308
|
}, "projectAnnotationSnapshotFingerprint");
|
|
60222
60309
|
|
|
60223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
60224
60311
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
60225
60312
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
60226
60313
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -60237,7 +60324,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
60237
60324
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
60238
60325
|
}, "projectAnnotationRequest");
|
|
60239
60326
|
|
|
60240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
60241
60328
|
var SnapshotBudget = class {
|
|
60242
60329
|
static {
|
|
60243
60330
|
__name(this, "SnapshotBudget");
|
|
@@ -60263,13 +60350,13 @@ var SnapshotBudget = class {
|
|
|
60263
60350
|
}
|
|
60264
60351
|
};
|
|
60265
60352
|
|
|
60266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60267
60354
|
import { createHash as createHash23 } from "node:crypto";
|
|
60268
60355
|
|
|
60269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
60270
60357
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
60271
60358
|
|
|
60272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
60273
60360
|
import { createHash as createHash22 } from "node:crypto";
|
|
60274
60361
|
var invalid13 = /* @__PURE__ */ __name(() => {
|
|
60275
60362
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -60412,7 +60499,7 @@ var ProjectSnapshotSources = class {
|
|
|
60412
60499
|
}
|
|
60413
60500
|
};
|
|
60414
60501
|
|
|
60415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
60416
60503
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
60417
60504
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
60418
60505
|
}, "unsupported");
|
|
@@ -60590,7 +60677,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
60590
60677
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
60591
60678
|
}), "projectAnnotationSnapshot");
|
|
60592
60679
|
|
|
60593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60594
60681
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
60595
60682
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
60596
60683
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -60652,7 +60739,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
60652
60739
|
};
|
|
60653
60740
|
}), "previewAnnotationSnapshot");
|
|
60654
60741
|
|
|
60655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
60656
60743
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
60657
60744
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
60658
60745
|
if (link3.kind === "evidence" && to)
|
|
@@ -60719,7 +60806,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
60719
60806
|
return mappings;
|
|
60720
60807
|
}, "restoreAnnotationRecords");
|
|
60721
60808
|
|
|
60722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
60723
60810
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
60724
60811
|
async preview(request) {
|
|
60725
60812
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -60749,7 +60836,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
60749
60836
|
}
|
|
60750
60837
|
}), "projectAnnotationStoreOver");
|
|
60751
60838
|
|
|
60752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
60753
60840
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
60754
60841
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
60755
60842
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -60820,7 +60907,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60820
60907
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
60821
60908
|
}, "recordRelationsOver");
|
|
60822
60909
|
|
|
60823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
60824
60911
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
60825
60912
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
60826
60913
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -60874,7 +60961,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
60874
60961
|
return { pointedAt, remap };
|
|
60875
60962
|
}, "recordRemapOver");
|
|
60876
60963
|
|
|
60877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
60878
60965
|
var runs = 0;
|
|
60879
60966
|
var PAGE = 500;
|
|
60880
60967
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -61087,7 +61174,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
61087
61174
|
return pointerOf("records", index2, "fields", key2);
|
|
61088
61175
|
}, "waitingPointer");
|
|
61089
61176
|
|
|
61090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
61091
61178
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
61092
61179
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
61093
61180
|
var ORG_EMAIL = "org-email";
|
|
@@ -61253,7 +61340,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
61253
61340
|
]);
|
|
61254
61341
|
}, "renameMade");
|
|
61255
61342
|
|
|
61256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
61257
61344
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
61258
61345
|
name: given2(fields4, "name"),
|
|
61259
61346
|
unit: given2(fields4, "unit"),
|
|
@@ -61376,7 +61463,7 @@ var DIRECT_PROJECTORS = {
|
|
|
61376
61463
|
lead: dealProjector("lead")
|
|
61377
61464
|
};
|
|
61378
61465
|
|
|
61379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
61380
61467
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
61381
61468
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
61382
61469
|
const text8 = String(fields4.text ?? "");
|
|
@@ -61445,7 +61532,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
61445
61532
|
}
|
|
61446
61533
|
};
|
|
61447
61534
|
|
|
61448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
61449
61536
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
61450
61537
|
const importer = authorActor(context, IMPORTER).actor;
|
|
61451
61538
|
return context.database.prepare("SELECT 1 FROM payment_allocations WHERE payment_id = ? AND NOT (author_type = ? AND author_id = ?) LIMIT 1").get(paymentId, importer.type, importer.id) !== void 0;
|
|
@@ -61655,7 +61742,7 @@ var MONEY_PROJECTORS = {
|
|
|
61655
61742
|
}
|
|
61656
61743
|
};
|
|
61657
61744
|
|
|
61658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
61659
61746
|
var CALLS_CALENDAR = "calls";
|
|
61660
61747
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
61661
61748
|
if (!isImportedProvider(source2.provider))
|
|
@@ -61830,7 +61917,7 @@ var PHONE_PROJECTORS = {
|
|
|
61830
61917
|
}
|
|
61831
61918
|
};
|
|
61832
61919
|
|
|
61833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
61834
61921
|
var RECORD_PROJECTORS = {
|
|
61835
61922
|
...MONEY_PROJECTORS,
|
|
61836
61923
|
...DIRECT_PROJECTORS,
|
|
@@ -61841,7 +61928,7 @@ var RECORD_PROJECTORS = {
|
|
|
61841
61928
|
project: null
|
|
61842
61929
|
};
|
|
61843
61930
|
|
|
61844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
61845
61932
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
61846
61933
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
61847
61934
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -61903,7 +61990,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
61903
61990
|
return { settle, checkShares };
|
|
61904
61991
|
}, "recordSettlingOver");
|
|
61905
61992
|
|
|
61906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
61907
61994
|
import { createHash as createHash24 } from "node:crypto";
|
|
61908
61995
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
61909
61996
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -61919,7 +62006,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61919
62006
|
return { stamp, untouched };
|
|
61920
62007
|
}, "importStampsOver");
|
|
61921
62008
|
|
|
61922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
61923
62010
|
var SUBSCRIPTIONS = "SELECT s.*, b.name AS author_name, b.kind AS author_kind FROM subscriptions s LEFT JOIN bots b ON s.author_type = 'bot' AND b.id = s.author_id";
|
|
61924
62011
|
var PRICES = "SELECT p.*, b.name AS author_name, b.kind AS author_kind FROM subscription_prices p LEFT JOIN bots b ON p.author_type = 'bot' AND b.id = p.author_id";
|
|
61925
62012
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -62156,7 +62243,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62156
62243
|
};
|
|
62157
62244
|
}, "subscriptionsStoreOver");
|
|
62158
62245
|
|
|
62159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
62160
62247
|
var WALLETS = "SELECT w.*, b.name AS author_name, b.kind AS author_kind FROM financial_accounts w LEFT JOIN bots b ON w.author_type = 'bot' AND b.id = w.author_id";
|
|
62161
62248
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
62162
62249
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -62281,7 +62368,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62281
62368
|
};
|
|
62282
62369
|
}, "walletsStoreOver");
|
|
62283
62370
|
|
|
62284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
62285
62372
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
62286
62373
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
62287
62374
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -62540,7 +62627,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
62540
62627
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
62541
62628
|
}, "recordWritesOver");
|
|
62542
62629
|
|
|
62543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
62544
62631
|
var LIMIT = 1e3;
|
|
62545
62632
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
62546
62633
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -62764,7 +62851,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62764
62851
|
};
|
|
62765
62852
|
}, "recordStoreOver");
|
|
62766
62853
|
|
|
62767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
62768
62855
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
62769
62856
|
key: row2.key,
|
|
62770
62857
|
channel: row2.channel,
|
|
@@ -62819,7 +62906,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
62819
62906
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
62820
62907
|
}, "storedTemplateBodies");
|
|
62821
62908
|
|
|
62822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
62823
62910
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
62824
62911
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
62825
62912
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -62854,7 +62941,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
62854
62941
|
return proxy;
|
|
62855
62942
|
}, "storeErrors");
|
|
62856
62943
|
|
|
62857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
62858
62945
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
62859
62946
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
62860
62947
|
let merged2 = { from: from2, to };
|
|
@@ -62867,7 +62954,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
62867
62954
|
}, "markRange");
|
|
62868
62955
|
var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
|
|
62869
62956
|
|
|
62870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
62871
62958
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
62872
62959
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
62873
62960
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -62888,7 +62975,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
62888
62975
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(prefixOf2(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now2).toISOString() }), now2);
|
|
62889
62976
|
}, "setTaskAnalysisMark");
|
|
62890
62977
|
|
|
62891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
62892
62979
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
62893
62980
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
62894
62981
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -62898,7 +62985,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
62898
62985
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf6(account), JSON.stringify(until), now2);
|
|
62899
62986
|
}, "setTaskRulesStop");
|
|
62900
62987
|
|
|
62901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
62902
62989
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62903
62990
|
const { database } = context;
|
|
62904
62991
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -62957,7 +63044,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62957
63044
|
};
|
|
62958
63045
|
}, "syncStoreOver");
|
|
62959
63046
|
|
|
62960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
62961
63048
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62962
63049
|
const { database } = context;
|
|
62963
63050
|
return {
|
|
@@ -62979,7 +63066,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62979
63066
|
};
|
|
62980
63067
|
}, "tagsStoreOver");
|
|
62981
63068
|
|
|
62982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
62983
63070
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
62984
63071
|
var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
|
|
62985
63072
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -63106,7 +63193,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
63106
63193
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
63107
63194
|
}, "savePictureChunks");
|
|
63108
63195
|
|
|
63109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
63110
63197
|
var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
|
|
63111
63198
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
63112
63199
|
FROM messages m
|
|
@@ -63195,7 +63282,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
63195
63282
|
return plain2(best(found2));
|
|
63196
63283
|
}, "nearestMessages");
|
|
63197
63284
|
|
|
63198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
63199
63286
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
63200
63287
|
const { database } = context;
|
|
63201
63288
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -63454,7 +63541,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
63454
63541
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
63455
63542
|
}), "vectorsStoreOver");
|
|
63456
63543
|
|
|
63457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
63458
63545
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
63459
63546
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
63460
63547
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -63542,10 +63629,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
63542
63629
|
}
|
|
63543
63630
|
}, "lastBackup");
|
|
63544
63631
|
|
|
63545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
63546
63633
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
63547
63634
|
|
|
63548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
63549
63636
|
var COUNTED_TABLES = [
|
|
63550
63637
|
"accounts",
|
|
63551
63638
|
"chats",
|
|
@@ -63630,7 +63717,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
63630
63717
|
};
|
|
63631
63718
|
}, "storeContents");
|
|
63632
63719
|
|
|
63633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
63634
63721
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
63635
63722
|
const context = await openStoreContext(options);
|
|
63636
63723
|
try {
|