@wirecat/zoom-cli 0.74.0 → 0.75.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/contracts/wirecat.json +5 -4
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-SDOAABLC.js → all-profiles-WFLKFKJC.js} +19 -29
- package/dist/bundle/{answer-policy-RHS74QYY.js → answer-policy-XCKC2LLN.js} +57 -57
- package/dist/bundle/{anthropic-HCVY2PIN.js → anthropic-H45W4P22.js} +2 -2
- package/dist/bundle/{app-server-V64VS6KN.js → app-server-I4FPLBIX.js} +49 -64
- package/dist/bundle/{bun-EBQHHLKR.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-PVMXO2JB.js → bun-sqlite-X2YZPHDS.js} +3 -3
- package/dist/bundle/{chunk-OP6HK2QL.js → chunk-2Q4CB4EI.js} +1 -1
- package/dist/bundle/{chunk-P53CLAXD.js → chunk-3U3W6YY5.js} +59 -56
- package/dist/bundle/{chunk-XGEPAJBY.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-TMCXUWTY.js → chunk-3YKAFLXY.js} +1 -1
- package/dist/bundle/{chunk-NKBMLSWK.js → chunk-3YRPDNWK.js} +544 -142
- package/dist/bundle/{chunk-SY4MIIWF.js → chunk-4J5GJJ2I.js} +1 -1
- package/dist/bundle/{chunk-F6PUM6ZK.js → chunk-4XDWV6VJ.js} +16 -16
- package/dist/bundle/{chunk-SPWKGRTO.js → chunk-4YNUQGDP.js} +1 -1
- package/dist/bundle/{chunk-DXZN3DU6.js → chunk-532H3KT3.js} +2 -2
- package/dist/bundle/{chunk-YNI57LTZ.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/{chunk-2PNG76LV.js → chunk-7ZVWV33Z.js} +9 -9
- package/dist/bundle/{chunk-LZ4AVHBS.js → chunk-A3Q3PG54.js} +1 -1
- package/dist/bundle/{chunk-SKDQNYKA.js → chunk-AVCYD4WQ.js} +19 -18
- package/dist/bundle/{chunk-YFLTHGB3.js → chunk-B6Q53CVA.js} +7 -7
- package/dist/bundle/{chunk-RRW54FK6.js → chunk-BY2YPKZZ.js} +10 -10
- package/dist/bundle/{chunk-QLKCKTM4.js → chunk-C5WQ57AB.js} +1 -1
- package/dist/bundle/{chunk-FL2TKSZY.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-IZUOL4Q6.js → chunk-DQBLDZ7M.js} +3 -3
- package/dist/bundle/{chunk-WYV5IITK.js → chunk-DUPFAY35.js} +6 -6
- package/dist/bundle/{chunk-ZYMTS3CI.js → chunk-ELD5AC7Q.js} +2 -2
- package/dist/bundle/{chunk-LUBG5GKK.js → chunk-EOZAJGB4.js} +11 -12
- package/dist/bundle/{chunk-OPUGV7VW.js → chunk-F6RB5FHZ.js} +1 -1
- package/dist/bundle/{chunk-LQR4V5EY.js → chunk-F7K2V6OA.js} +10 -10
- package/dist/bundle/{chunk-6GPBDVQ2.js → chunk-FBYGBR4Q.js} +3 -3
- package/dist/bundle/{chunk-R4J4DLJV.js → chunk-GPVSGZ4R.js} +728 -544
- package/dist/bundle/{chunk-PKM2UKAZ.js → chunk-GU4FVTJV.js} +13 -1
- package/dist/bundle/{chunk-XFT3YIHU.js → chunk-HKPNQL52.js} +3 -3
- package/dist/bundle/{chunk-N7KCNMKL.js → chunk-IDGWBKMH.js} +10 -10
- package/dist/bundle/{chunk-7R4UU65O.js → chunk-IMDTC4MD.js} +34 -20
- package/dist/bundle/{chunk-UW3BB2XW.js → chunk-IO3BQ6JU.js} +22 -22
- package/dist/bundle/{chunk-LHPYSVGP.js → chunk-IW245Q5B.js} +22 -22
- package/dist/bundle/{chunk-DSRG5NRF.js → chunk-JDTZCZ5K.js} +2 -2
- package/dist/bundle/{chunk-GPGIU3OG.js → chunk-JTYWSXJG.js} +7 -7
- package/dist/bundle/{chunk-TKPIDOW5.js → chunk-K5E5MB4C.js} +18 -18
- package/dist/bundle/{chunk-HGUYJUNO.js → chunk-L5UILROP.js} +5 -5
- package/dist/bundle/{chunk-QSWR7VDA.js → chunk-LRCSDAYK.js} +3 -3
- package/dist/bundle/{chunk-HZUUVNWC.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-Y4KWWPIO.js → chunk-MNVT7EJS.js} +2 -2
- package/dist/bundle/{chunk-7W23N2YW.js → chunk-NE4GYKQA.js} +5 -5
- package/dist/bundle/{chunk-5R6EBM5Z.js → chunk-NL6AZ6S2.js} +1 -1
- package/dist/bundle/{chunk-AFUHT7F7.js → chunk-NQLL4KRN.js} +5 -5
- package/dist/bundle/{chunk-5KDBLEUF.js → chunk-NQQVNLO6.js} +10 -10
- package/dist/bundle/{chunk-6EMOZGSN.js → chunk-NU4FSSMN.js} +2 -2
- package/dist/bundle/{chunk-NV2REPY6.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-3ROL6MBJ.js → chunk-P4ZQQLZF.js} +569 -401
- package/dist/bundle/{chunk-R35YGFKQ.js → chunk-P6MQ6FS4.js} +30 -5
- package/dist/bundle/{chunk-4ELLWJT4.js → chunk-PCJRHC5Y.js} +7 -7
- package/dist/bundle/{chunk-I2D4ZZOD.js → chunk-PPM7UTCT.js} +19 -16
- package/dist/bundle/{chunk-APLV37JA.js → chunk-PX4IMYVB.js} +2 -2
- package/dist/bundle/{chunk-TN2YUZBF.js → chunk-QBKKTTA3.js} +155 -149
- package/dist/bundle/{chunk-RQJ2RXFO.js → chunk-QEO3XTIE.js} +35 -25
- package/dist/bundle/{chunk-YM6ZATEK.js → chunk-QXQUANWE.js} +4 -4
- package/dist/bundle/{chunk-XCC7R47Z.js → chunk-RABCFGT3.js} +2 -2
- package/dist/bundle/{chunk-UGLNVUFX.js → chunk-RBYVQE3S.js} +4 -4
- package/dist/bundle/{chunk-RJJ4OYNH.js → chunk-RKI4BGWG.js} +2 -2
- package/dist/bundle/{chunk-LN2LWPN2.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-IS6FUZCP.js → chunk-SR5X7YKB.js} +1 -1
- package/dist/bundle/{chunk-4EZKR6Q4.js → chunk-T25PR26L.js} +5 -5
- package/dist/bundle/{chunk-FY2X6U6O.js → chunk-T4FMXDDV.js} +2 -2
- package/dist/bundle/{chunk-UVWNUY3W.js → chunk-TSHUBGN4.js} +2 -2
- package/dist/bundle/{chunk-BKMC4ETU.js → chunk-V3UK6E5B.js} +4 -4
- package/dist/bundle/{chunk-QAGSAOYS.js → chunk-VLK3X53X.js} +2 -2
- package/dist/bundle/{chunk-PMHMKZEJ.js → chunk-VPSQZ2YR.js} +42 -50
- package/dist/bundle/{chunk-WRRGO246.js → chunk-VUPWDCYV.js} +1 -1
- package/dist/bundle/{chunk-TLNZUPGU.js → chunk-W2AC2RAG.js} +13 -13
- package/dist/bundle/{chunk-BOGGQOVO.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-KBRIMLVN.js → chunk-WUWF4EXZ.js} +6 -6
- package/dist/bundle/{chunk-UXSTXFZQ.js → chunk-XCJGDPMN.js} +383 -367
- package/dist/bundle/{chunk-KYL5FYOW.js → chunk-XUHQ7DVT.js} +1 -1
- package/dist/bundle/{chunk-7NE3LB7A.js → chunk-Y5J5CAG2.js} +1 -1
- package/dist/bundle/{chunk-3TYNBHBK.js → chunk-ZBYKCVSV.js} +1 -1
- package/dist/bundle/{chunk-KCPRTZBZ.js → chunk-ZVVRRMLW.js} +98 -6
- package/dist/bundle/{cli-5ALOQCAC.js → cli-NPRYCWFH.js} +64 -56
- package/dist/bundle/{command-contract-WO5QJVLZ.js → command-contract-OJYRKQHR.js} +17 -17
- package/dist/bundle/{command-server-entry-ICOMIJIH.js → command-server-entry-BV4SUPUI.js} +24 -24
- package/dist/bundle/config-UMEV24OE.js +97 -0
- package/dist/bundle/{decode-7LFOROWF.js → decode-PRMKCHHC.js} +2 -2
- package/dist/bundle/{dist-KJOOYNCP.js → dist-HGLDGKUW.js} +18 -14
- package/dist/bundle/{echarts-EJXBKCJT.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-TOZCKRRO.js → embed-OZN2BIJY.js} +3 -3
- package/dist/bundle/{embedder-QKEKUCS5.js → embedder-RBDHO6Z6.js} +6 -6
- package/dist/bundle/{first-run-S7CQVGK6.js → first-run-HNCD7U3B.js} +6 -6
- package/dist/bundle/first-screen-374BBMO6.js +39 -0
- package/dist/bundle/{instructions-Z7GVGWXS.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/{main-RL3GC4OX.js → main-FPMCCRIQ.js} +15 -15
- package/dist/bundle/{meetings-JCMLE5AO.js → meetings-WYCVHAIP.js} +17 -1
- package/dist/bundle/{node-L2PVEW3N.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-4YW3W4XI.js → node-sqlite-O4C6IWSM.js} +4 -4
- package/dist/bundle/{oauth-NNHWAT6A.js → oauth-6VXOUXSE.js} +4 -4
- package/dist/bundle/{open-PF2JHJIY.js → open-AMUIWV3Y.js} +2 -2
- package/dist/bundle/{openai-C72ADYMD.js → openai-MEDN6FSK.js} +10 -10
- package/dist/bundle/{process-MNZTQ2DA.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-FOCBZZZS.js → program-CF2NKA2A.js} +70 -69
- package/dist/bundle/{prompt-RBSUKMV7.js → prompt-N3UZE4ZR.js} +2 -2
- package/dist/bundle/{recognize-RM6TQKK3.js → recognize-I5F3K3CZ.js} +1 -1
- package/dist/bundle/{remote-UKHTU3YR.js → remote-CJF5KMMY.js} +6 -6
- package/dist/bundle/{rerank-3LBRVESU.js → rerank-6WLY6MKY.js} +4 -4
- package/dist/bundle/{run-log-UXINNGKA.js → run-log-FKF4ZX4M.js} +55 -55
- package/dist/bundle/{serve-OOZFTW3W.js → serve-FOQJ3WMX.js} +6 -6
- package/dist/bundle/server-BAGY5HEZ.js +74 -0
- package/dist/bundle/{server-YNQPNIJD.js → server-OEEGRSQD.js} +47 -45
- package/dist/bundle/{services-SLEOMN4B.js → services-Q6SFESMS.js} +31 -31
- package/dist/bundle/{speech-FZZ6QVGU.js → speech-PBVEIG4N.js} +12 -12
- package/dist/bundle/{sqlite-runtime-WUR4PWYB.js → sqlite-runtime-IWR65V6I.js} +3 -3
- package/dist/bundle/{state-ET36L4TY.js → state-G54C2N6U.js} +3 -3
- package/dist/bundle/{store-SQB2DOVJ.js → store-7EWMPTTW.js} +16 -16
- package/dist/bundle/{store-DI6OUBXA.js → store-D5OLXIFW.js} +14 -14
- package/dist/bundle/store-connection-34747SCC.js +90 -0
- package/dist/bundle/store-maintenance-command-QBO67F7Z.js +65 -0
- package/dist/bundle/{tokens-SUHRRQ25.js → tokens-J7TFHLEG.js} +4 -4
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-GE4SSHOP.js → zoom-app-SULPMVN4.js} +2 -2
- package/dist/recording-schedule-commands.d.ts.map +1 -1
- package/dist/recording-schedule-commands.js +2 -2
- package/dist/recording-schedule-commands.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-IJONJTST.js +0 -76
- package/dist/bundle/config-YQA5TJ7Y.js +0 -97
- package/dist/bundle/first-screen-6GW6FD6S.js +0 -39
- package/dist/bundle/server-DM5ZPFZB.js +0 -75
- package/dist/bundle/store-connection-M6LVRAZ5.js +0 -90
- package/dist/bundle/store-maintenance-command-B66KWG6K.js +0 -65
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
analyzerIdentity,
|
|
10
10
|
createStemmer,
|
|
11
11
|
parseStemmers
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PCJRHC5Y.js";
|
|
13
13
|
import {
|
|
14
14
|
AMOUNT_ROLES,
|
|
15
15
|
BARE_INTERNATIONAL_PROVIDERS,
|
|
@@ -68,12 +68,12 @@ import {
|
|
|
68
68
|
typedPhone,
|
|
69
69
|
validCounter,
|
|
70
70
|
wildcardPattern
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-K5E5MB4C.js";
|
|
72
72
|
import {
|
|
73
73
|
NORMALIZER_VERSION,
|
|
74
74
|
fold,
|
|
75
75
|
normalize
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-4YNUQGDP.js";
|
|
77
77
|
import {
|
|
78
78
|
ACCOUNT_GROUPS,
|
|
79
79
|
CATEGORIES,
|
|
@@ -111,10 +111,10 @@ import {
|
|
|
111
111
|
runEvent,
|
|
112
112
|
severity,
|
|
113
113
|
sourceOf
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-IO3BQ6JU.js";
|
|
115
115
|
import {
|
|
116
116
|
sqliteCode
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-3YKAFLXY.js";
|
|
118
118
|
import {
|
|
119
119
|
ADDED_ACCOUNT,
|
|
120
120
|
ADDED_PROVIDER,
|
|
@@ -204,13 +204,13 @@ import {
|
|
|
204
204
|
usableLinkSql,
|
|
205
205
|
useStoredProviders,
|
|
206
206
|
walletLine
|
|
207
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-IMDTC4MD.js";
|
|
208
208
|
import {
|
|
209
209
|
DEFAULT_TASK_CATEGORIES,
|
|
210
210
|
sharedConfigPath,
|
|
211
211
|
storedTaskCategories,
|
|
212
212
|
taskCategoriesReader
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-L5UILROP.js";
|
|
214
214
|
import {
|
|
215
215
|
SQLiteTable,
|
|
216
216
|
TableAliasProxyHandler,
|
|
@@ -235,21 +235,21 @@ import {
|
|
|
235
235
|
sql,
|
|
236
236
|
sqliteTable,
|
|
237
237
|
text
|
|
238
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-3URYKAJP.js";
|
|
239
239
|
import {
|
|
240
240
|
refuseOwnerStoreInTests,
|
|
241
241
|
storePath
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-A3Q3PG54.js";
|
|
243
243
|
import {
|
|
244
244
|
quietSqliteWarning,
|
|
245
245
|
storeCapable
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-NQLL4KRN.js";
|
|
247
247
|
import {
|
|
248
248
|
PRAGMAS,
|
|
249
249
|
TIME_LIMIT_FUNCTION,
|
|
250
250
|
TimeLimitReached,
|
|
251
251
|
isQueryOnly
|
|
252
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-OUM4ZO53.js";
|
|
253
253
|
import {
|
|
254
254
|
CHAT_MESSAGES_READ,
|
|
255
255
|
FACT_TYPES,
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
validateMeetingRelatedHistory,
|
|
294
294
|
validateMeetingSeriesHistory,
|
|
295
295
|
validatePayment
|
|
296
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-3YRPDNWK.js";
|
|
297
297
|
import {
|
|
298
298
|
OPERATORS_BY_TYPE,
|
|
299
299
|
dateRange,
|
|
@@ -10080,7 +10080,7 @@ var require_cjs = __commonJS({
|
|
|
10080
10080
|
}
|
|
10081
10081
|
});
|
|
10082
10082
|
|
|
10083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10084
10084
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10085
10085
|
const methods = whole;
|
|
10086
10086
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10208,7 +10208,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10208
10208
|
};
|
|
10209
10209
|
}, "bindAccount");
|
|
10210
10210
|
|
|
10211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10212
10212
|
var IndexBuilderOn = class {
|
|
10213
10213
|
static {
|
|
10214
10214
|
__name(this, "IndexBuilderOn");
|
|
@@ -10403,7 +10403,7 @@ function alias(table, alias2) {
|
|
|
10403
10403
|
}
|
|
10404
10404
|
__name(alias, "alias");
|
|
10405
10405
|
|
|
10406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10407
10407
|
var ENTITY_TABLES = {
|
|
10408
10408
|
...RECORD_TABLES,
|
|
10409
10409
|
account: "accounts",
|
|
@@ -10442,7 +10442,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10442
10442
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10443
10443
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10444
10444
|
|
|
10445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
10446
10446
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
10447
10447
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
10448
10448
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -10499,7 +10499,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
10499
10499
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
10500
10500
|
}, "proposedBySql");
|
|
10501
10501
|
|
|
10502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
10503
10503
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
10504
10504
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
10505
10505
|
var KEPT = 20;
|
|
@@ -10594,7 +10594,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
10594
10594
|
return scrubbed;
|
|
10595
10595
|
}, "scrubSourceReviews");
|
|
10596
10596
|
|
|
10597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
10598
10598
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
10599
10599
|
var REFERABLE = {
|
|
10600
10600
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -10754,7 +10754,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
10754
10754
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
10755
10755
|
}, "taskIdOf");
|
|
10756
10756
|
|
|
10757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
10758
10758
|
var QUOTE_LIMIT = 500;
|
|
10759
10759
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
10760
10760
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -11033,11 +11033,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
11033
11033
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
11034
11034
|
}, "deleteDocumentRow");
|
|
11035
11035
|
|
|
11036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
11037
11037
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
11038
11038
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
11039
11039
|
|
|
11040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
11041
11041
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
11042
11042
|
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");
|
|
11043
11043
|
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");
|
|
@@ -11069,7 +11069,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
11069
11069
|
}, "samePersons");
|
|
11070
11070
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
11071
11071
|
|
|
11072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
11073
11073
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
11074
11074
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
11075
11075
|
const at2 = ref3.indexOf(":");
|
|
@@ -11176,13 +11176,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
11176
11176
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
11177
11177
|
}, "forgetErasedLinks");
|
|
11178
11178
|
|
|
11179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
11180
11180
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
11181
11181
|
|
|
11182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
11183
11183
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
11184
11184
|
|
|
11185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
11186
11186
|
var TASK_CLOSE_KIND = "task_close";
|
|
11187
11187
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
11188
11188
|
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");
|
|
@@ -11230,7 +11230,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
11230
11230
|
}, "assertMayDecide");
|
|
11231
11231
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
11232
11232
|
|
|
11233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
11234
11234
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
11235
11235
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
11236
11236
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -11260,7 +11260,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
11260
11260
|
]);
|
|
11261
11261
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11262
11262
|
|
|
11263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
11264
11264
|
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 ";
|
|
11265
11265
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
11266
11266
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -11285,10 +11285,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
11285
11285
|
return id2;
|
|
11286
11286
|
}, "organizationOfAddress");
|
|
11287
11287
|
|
|
11288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
11289
11289
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11290
11290
|
|
|
11291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
11292
11292
|
import { existsSync, statSync } from "node:fs";
|
|
11293
11293
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
11294
11294
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -11314,7 +11314,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
11314
11314
|
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" });
|
|
11315
11315
|
}, "checkJournal");
|
|
11316
11316
|
|
|
11317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
11318
11318
|
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;
|
|
11319
11319
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
11320
11320
|
const match = WRITE.exec(sql2);
|
|
@@ -11394,7 +11394,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
11394
11394
|
}, "committedWrites");
|
|
11395
11395
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
11396
11396
|
|
|
11397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
11398
11398
|
var ARMS = [
|
|
11399
11399
|
[
|
|
11400
11400
|
"message",
|
|
@@ -11522,7 +11522,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
11522
11522
|
return recomputed;
|
|
11523
11523
|
}, "drainInvolvementQueue");
|
|
11524
11524
|
|
|
11525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
11526
11526
|
import { domainToUnicode } from "node:url";
|
|
11527
11527
|
|
|
11528
11528
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -21544,7 +21544,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
21544
21544
|
}, "oa");
|
|
21545
21545
|
var na = { parse: O, get: aa, isValid: oa };
|
|
21546
21546
|
|
|
21547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
21548
21548
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
21549
21549
|
var ID = /^[\w-]{10,}$/;
|
|
21550
21550
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21586,7 +21586,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text7) => [...text7.matchAll(L
|
|
|
21586
21586
|
return { url, documentId: googleDocumentId(url) };
|
|
21587
21587
|
}), "googleDocumentLinks");
|
|
21588
21588
|
|
|
21589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21590
21590
|
var BEFORE = [
|
|
21591
21591
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21592
21592
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21846,7 +21846,7 @@ var findPlaces = /* @__PURE__ */ __name((text7) => {
|
|
|
21846
21846
|
return found2.sort((a, b) => a.start - b.start);
|
|
21847
21847
|
}, "findPlaces");
|
|
21848
21848
|
|
|
21849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21850
21850
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21851
21851
|
var MENTION_VERSIONS = {
|
|
21852
21852
|
phone: 1,
|
|
@@ -22022,7 +22022,7 @@ var exactlyOne = /* @__PURE__ */ __name((text7, options) => {
|
|
|
22022
22022
|
return one2 && one2.start === 0 && one2.end === text7.length ? one2.value : void 0;
|
|
22023
22023
|
}, "exactlyOne");
|
|
22024
22024
|
|
|
22025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
22026
22026
|
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";
|
|
22027
22027
|
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";
|
|
22028
22028
|
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";
|
|
@@ -22030,7 +22030,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
22030
22030
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
22031
22031
|
var NAME_WORDS = WORDS.split(" ");
|
|
22032
22032
|
|
|
22033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
22034
22034
|
var LATIN_TO_CYRILLIC = {
|
|
22035
22035
|
shch: "\u0449",
|
|
22036
22036
|
sch: "\u0449",
|
|
@@ -22238,7 +22238,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text7, stem, taken) => {
|
|
|
22238
22238
|
return found2;
|
|
22239
22239
|
}, "findUnknownNames");
|
|
22240
22240
|
|
|
22241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
22242
22242
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
22243
22243
|
"webpage",
|
|
22244
22244
|
"share",
|
|
@@ -22279,7 +22279,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
22279
22279
|
});
|
|
22280
22280
|
}, "matchDownloads");
|
|
22281
22281
|
|
|
22282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
22283
22283
|
var PRESET_VERSION = 1;
|
|
22284
22284
|
var PRESETS = {
|
|
22285
22285
|
password: {
|
|
@@ -22333,7 +22333,7 @@ var PRESETS = {
|
|
|
22333
22333
|
}
|
|
22334
22334
|
};
|
|
22335
22335
|
|
|
22336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
22337
22337
|
var FIELD_VERSION = 2;
|
|
22338
22338
|
var UNITS = {
|
|
22339
22339
|
"": 1,
|
|
@@ -22913,12 +22913,12 @@ var QUERY_OPERATORS = [
|
|
|
22913
22913
|
{ name: "boost / minimum / intervals", example: "invoice^2", semantics: "query.unsupported-operator" }
|
|
22914
22914
|
];
|
|
22915
22915
|
|
|
22916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
22917
22917
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
22918
22918
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
22919
22919
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
22920
22920
|
|
|
22921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
22922
22922
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
22923
22923
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
22924
22924
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -22942,7 +22942,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
22942
22942
|
};
|
|
22943
22943
|
}, "linkMatch");
|
|
22944
22944
|
|
|
22945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
22946
22946
|
var SETTING = "phoneCountries";
|
|
22947
22947
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
22948
22948
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -22973,7 +22973,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
22973
22973
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
22974
22974
|
}, "valueMatch");
|
|
22975
22975
|
|
|
22976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
22977
22977
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
22978
22978
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
22979
22979
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -23001,7 +23001,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
23001
23001
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
23002
23002
|
}, "vocabularySimilarity");
|
|
23003
23003
|
|
|
23004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
23005
23005
|
import { createHash } from "node:crypto";
|
|
23006
23006
|
var folded3 = /* @__PURE__ */ __name((name) => {
|
|
23007
23007
|
try {
|
|
@@ -23067,7 +23067,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
23067
23067
|
});
|
|
23068
23068
|
}, "guardTagCreation");
|
|
23069
23069
|
|
|
23070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
23071
23071
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
23072
23072
|
throw new CliError("validation_error", message3);
|
|
23073
23073
|
}, "invalid");
|
|
@@ -23144,7 +23144,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
23144
23144
|
};
|
|
23145
23145
|
}, "createTagRedirectIndex");
|
|
23146
23146
|
|
|
23147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
23148
23148
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
23149
23149
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
23150
23150
|
if (!row2)
|
|
@@ -23172,7 +23172,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
23172
23172
|
return snapshot2;
|
|
23173
23173
|
}, "tagRedirectSnapshot");
|
|
23174
23174
|
|
|
23175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
23176
23176
|
import { createHash as createHash2 } from "node:crypto";
|
|
23177
23177
|
var TASK_KEY_PREFIXES = {
|
|
23178
23178
|
question: "Q",
|
|
@@ -23200,7 +23200,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
23200
23200
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
23201
23201
|
}, "taskAccountOf");
|
|
23202
23202
|
|
|
23203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
23204
23204
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
23205
23205
|
if (iso17 === null || iso17 === void 0)
|
|
23206
23206
|
return null;
|
|
@@ -23214,7 +23214,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
23214
23214
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
23215
23215
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
23216
23216
|
|
|
23217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
23218
23218
|
var TAG_KINDS = ["tag", "topic"];
|
|
23219
23219
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
23220
23220
|
var TAG_TYPE = {
|
|
@@ -23398,7 +23398,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23398
23398
|
...filter.where ? [filter.where] : [],
|
|
23399
23399
|
...filter.source === void 0 ? [] : [{ sql: filter.source === "auto" ? "x.auto = 1" : "(x.auto = 0 OR x.source = 'owner')", params: [] }]
|
|
23400
23400
|
];
|
|
23401
|
-
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
23401
|
+
const rows = database.prepare(`SELECT * FROM (SELECT tag,type,min(created_at) AS created_at,chat_id,chat_title,person_id,name,name_folded,message_id,CASE WHEN max(source='owner') THEN 'owner' ELSE min(source) END AS source,target_id,tag_id,task_id,tag_type,max(auto) AS auto FROM (SELECT u.*, CASE u.type WHEN 'identity' THEN 'contact' WHEN 'email_thread' THEN 'chat' WHEN 'email' THEN 'message' ELSE u.type END AS tag_type, (u.type = 'chat' AND EXISTS (SELECT 1 FROM canonical_auto_tag_claims ac JOIN resolved_tags rt ON rt.id=ac.tag_id WHERE ac.chat_id = u.target_id AND rt.canonical_id = u.tag_id)) AS auto FROM (${union}) u) GROUP BY tag,type,target_id) x WHERE ${where.length === 0 ? "1" : where.map(({ sql: sql2 }) => `(${sql2})`).join(" AND ")} ORDER BY x.tag, x.type, x.created_at, x.chat_id, x.person_id, x.message_id, x.target_id` + (filter.window ? " LIMIT ? OFFSET ?" : "")).all(...chosen.flatMap(({ params }) => selectedTag === void 0 ? params : [...params, selectedTag]), ...where.flatMap(({ params }) => params), ...filter.window ? [filter.window.limit, filter.window.offset] : []);
|
|
23402
23402
|
const result = rows.map((row2) => {
|
|
23403
23403
|
const type = TAG_TYPE[String(row2.type)];
|
|
23404
23404
|
const chatId = row2.chat_id == null ? void 0 : String(row2.chat_id);
|
|
@@ -23417,7 +23417,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
23417
23417
|
return result;
|
|
23418
23418
|
}, "tagsOf");
|
|
23419
23419
|
|
|
23420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
23421
23421
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
23422
23422
|
var SPEECH = speech("att");
|
|
23423
23423
|
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");
|
|
@@ -23907,7 +23907,7 @@ var FIELD_COMPILERS = {
|
|
|
23907
23907
|
subject
|
|
23908
23908
|
};
|
|
23909
23909
|
|
|
23910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
23911
23911
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
23912
23912
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
23913
23913
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -23923,11 +23923,11 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
23923
23923
|
};
|
|
23924
23924
|
}, "placeOf");
|
|
23925
23925
|
|
|
23926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
23927
23927
|
var DRAIN_ON_WRITE = 500;
|
|
23928
23928
|
var METHOD = "rules";
|
|
23929
23929
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
23930
|
-
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, id AS target_id, 'rules' AS author FROM chats WHERE (? IS NOT NULL AND lower(username) = lower(?)) OR external_id = ? ORDER BY id LIMIT 1");
|
|
23930
|
+
const chat2 = database.prepare("SELECT 'linked' AS status, 'chat' AS target_type, c.id AS target_id, 'rules' AS author FROM chats c JOIN accounts a ON a.id = c.account_id WHERE a.provider = 'telegram' AND ((? IS NOT NULL AND lower(c.username) = lower(?)) OR c.external_id = ?) ORDER BY c.id LIMIT 1");
|
|
23931
23931
|
const account = database.prepare("SELECT 'linked' AS status, 'identity' AS target_type, id AS target_id, 'rules' AS author FROM identities WHERE provider = 'telegram' AND lower(username) = lower(?) ORDER BY id LIMIT 1");
|
|
23932
23932
|
return (value) => {
|
|
23933
23933
|
const target = telegramTarget(value);
|
|
@@ -24089,7 +24089,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
24089
24089
|
return queued.length;
|
|
24090
24090
|
}, "drainMentions");
|
|
24091
24091
|
|
|
24092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
24093
24093
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
24094
24094
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
24095
24095
|
if (!exists2)
|
|
@@ -24097,7 +24097,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
24097
24097
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
24098
24098
|
}, "indexRow");
|
|
24099
24099
|
|
|
24100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
24101
24101
|
var INDEX = "message_stems";
|
|
24102
24102
|
var SETTING2 = "searchStemmers";
|
|
24103
24103
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -24219,7 +24219,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
24219
24219
|
};
|
|
24220
24220
|
}, "stemmerCache");
|
|
24221
24221
|
|
|
24222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
24223
24223
|
var rehearsal = new AsyncLocalStorage();
|
|
24224
24224
|
var SQLITE_BUSY = 5;
|
|
24225
24225
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -24362,7 +24362,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
24362
24362
|
}
|
|
24363
24363
|
}, "read");
|
|
24364
24364
|
|
|
24365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
24366
24366
|
var FOLDED = [
|
|
24367
24367
|
{ table: "tasks", column: "title" },
|
|
24368
24368
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -24399,7 +24399,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
24399
24399
|
return filled2;
|
|
24400
24400
|
}, "fillFolded");
|
|
24401
24401
|
|
|
24402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
24403
24403
|
import { createHash as createHash3 } from "node:crypto";
|
|
24404
24404
|
var CHUNK_CHARS = 1200;
|
|
24405
24405
|
var CHUNK_OVERLAP = 150;
|
|
@@ -24504,7 +24504,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
24504
24504
|
return chunks2;
|
|
24505
24505
|
}, "cutChunks");
|
|
24506
24506
|
|
|
24507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
24508
24508
|
var DAY = 864e5;
|
|
24509
24509
|
var CURRENCY = [
|
|
24510
24510
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -24630,7 +24630,7 @@ var dueDayOf = /* @__PURE__ */ __name((text7, createdMs) => {
|
|
|
24630
24630
|
return best?.day ?? null;
|
|
24631
24631
|
}, "dueDayOf");
|
|
24632
24632
|
|
|
24633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
24634
24634
|
var DAY2 = 864e5;
|
|
24635
24635
|
var STOP_WORDS = new Set([
|
|
24636
24636
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -24785,7 +24785,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
24785
24785
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
24786
24786
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
24787
24787
|
|
|
24788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
24789
24789
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
24790
24790
|
coalesce(CASE k.chunkable_type
|
|
24791
24791
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -24927,7 +24927,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
24927
24927
|
}, "dropUnusedVectors");
|
|
24928
24928
|
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");
|
|
24929
24929
|
|
|
24930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
24931
24931
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
24932
24932
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
24933
24933
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -25202,7 +25202,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
25202
25202
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
25203
25203
|
])), "vectorCounts");
|
|
25204
25204
|
|
|
25205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
25206
25206
|
var DOCUMENT_PICTURE = "document_picture";
|
|
25207
25207
|
var SCAN_PAGE2 = 5e3;
|
|
25208
25208
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -25265,12 +25265,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
25265
25265
|
}, "nearestPictures")
|
|
25266
25266
|
}), "documentPicturesOver");
|
|
25267
25267
|
|
|
25268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
25269
25269
|
var noteIndexText = /* @__PURE__ */ __name((title2, text7) => title2 ? `${title2}
|
|
25270
25270
|
|
|
25271
25271
|
${text7}` : text7, "noteIndexText");
|
|
25272
25272
|
|
|
25273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
25274
25274
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
25275
25275
|
var ENRICHMENT_POSITION = 1e6;
|
|
25276
25276
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -25364,7 +25364,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
25364
25364
|
}), "clear")
|
|
25365
25365
|
}), "enrichmentsOver");
|
|
25366
25366
|
|
|
25367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
25368
25368
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
25369
25369
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
25370
25370
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -25405,7 +25405,7 @@ var leaf = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25405
25405
|
}
|
|
25406
25406
|
case "time": {
|
|
25407
25407
|
const range = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
25408
|
-
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], options.zone
|
|
25408
|
+
const { lower, upper, lower_inclusive, upper_inclusive } = dateRange(range[0], range[1], range[2], range[3], timezoneOf(options.zone), node.span, options.now);
|
|
25409
25409
|
return all([
|
|
25410
25410
|
{ sql: `${sql2} IS NOT NULL`, params: [] },
|
|
25411
25411
|
...lower === void 0 ? [] : [{ sql: `${sql2} ${lower_inclusive ? ">=" : ">"} ?`, params: [lower] }],
|
|
@@ -25440,7 +25440,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
25440
25440
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options = {}) => compile(ast.root, columns2, options), "queryFilter");
|
|
25441
25441
|
var bound2 = /* @__PURE__ */ __name(({ sql: text7, params }) => sql.join(text7.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
25442
25442
|
|
|
25443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
25444
25444
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
25445
25445
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
25446
25446
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -25530,7 +25530,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
25530
25530
|
});
|
|
25531
25531
|
}, "linkMeeting");
|
|
25532
25532
|
|
|
25533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
25534
25534
|
var MAX_TITLE = 120;
|
|
25535
25535
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
25536
25536
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -25592,7 +25592,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
25592
25592
|
}
|
|
25593
25593
|
}, "fillFoundTaskTitles");
|
|
25594
25594
|
|
|
25595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
25596
25596
|
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), ''))";
|
|
25597
25597
|
var UNSEARCHED_EVENT_TYPES = [
|
|
25598
25598
|
"working-location",
|
|
@@ -25839,7 +25839,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
25839
25839
|
return true;
|
|
25840
25840
|
}, "resetNoteIndex");
|
|
25841
25841
|
|
|
25842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
25843
25843
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
25844
25844
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
25845
25845
|
for (const key2 of new Set(names2.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -25858,7 +25858,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names2) => {
|
|
|
25858
25858
|
}
|
|
25859
25859
|
}, "resolvePersonLinks");
|
|
25860
25860
|
|
|
25861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
25862
25862
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
25863
25863
|
id: integer("id").primaryKey(),
|
|
25864
25864
|
name: text("name").notNull().unique(),
|
|
@@ -25867,7 +25867,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
25867
25867
|
updatedAt: integer("updated_at").notNull()
|
|
25868
25868
|
});
|
|
25869
25869
|
|
|
25870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25870
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
25871
25871
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
25872
25872
|
id: integer("id").primaryKey(),
|
|
25873
25873
|
linkId: integer("link_id").notNull(),
|
|
@@ -25879,7 +25879,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
25879
25879
|
createdAt: integer("created_at").notNull()
|
|
25880
25880
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
25881
25881
|
|
|
25882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
25883
25883
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
25884
25884
|
sourceKey: text("source_key").notNull(),
|
|
25885
25885
|
collection: text("collection").notNull(),
|
|
@@ -25889,13 +25889,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
25889
25889
|
createdAt: integer("created_at").notNull()
|
|
25890
25890
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
25891
25891
|
|
|
25892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
25893
25893
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
25894
25894
|
id: integer("id").notNull(),
|
|
25895
25895
|
indexableType: text("indexable_type").notNull()
|
|
25896
25896
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
25897
25897
|
|
|
25898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
25899
25899
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
25900
25900
|
id: integer("id").primaryKey(),
|
|
25901
25901
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -25915,7 +25915,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
25915
25915
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
25916
25916
|
]);
|
|
25917
25917
|
|
|
25918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
25919
25919
|
var enrichments = sqliteTable("enrichments", {
|
|
25920
25920
|
subjectType: text("subject_type").notNull(),
|
|
25921
25921
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -25927,7 +25927,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
25927
25927
|
createdAt: integer("created_at").notNull()
|
|
25928
25928
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
25929
25929
|
|
|
25930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
25931
25931
|
var templates = sqliteTable("templates", {
|
|
25932
25932
|
key: text("key").notNull(),
|
|
25933
25933
|
channel: text("channel").notNull(),
|
|
@@ -25949,7 +25949,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
25949
25949
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
25950
25950
|
]);
|
|
25951
25951
|
|
|
25952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
25953
25953
|
var links = sqliteTable("links", {
|
|
25954
25954
|
id: integer("id").primaryKey(),
|
|
25955
25955
|
fromType: text("from_type").notNull(),
|
|
@@ -25980,7 +25980,7 @@ var links = sqliteTable("links", {
|
|
|
25980
25980
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
25981
25981
|
]);
|
|
25982
25982
|
|
|
25983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
25984
25984
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
25985
25985
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
25986
25986
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -26006,7 +26006,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
26006
26006
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
26007
26007
|
]);
|
|
26008
26008
|
|
|
26009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
26010
26010
|
var accounts = sqliteTable("accounts", {
|
|
26011
26011
|
id: integer("id").primaryKey(),
|
|
26012
26012
|
provider: text("provider").notNull(),
|
|
@@ -28016,7 +28016,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
28016
28016
|
at: integer("at").notNull()
|
|
28017
28017
|
});
|
|
28018
28018
|
|
|
28019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
28020
28020
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
28021
28021
|
if (phones2 === void 0 && emails3 === void 0)
|
|
28022
28022
|
return void 0;
|
|
@@ -28262,7 +28262,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
28262
28262
|
}, "meetingIdentityPk");
|
|
28263
28263
|
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");
|
|
28264
28264
|
|
|
28265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
28266
28266
|
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");
|
|
28267
28267
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
28268
28268
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -28277,7 +28277,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
28277
28277
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
28278
28278
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
28279
28279
|
|
|
28280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
28281
28281
|
var MESSAGE_FIELDS = {
|
|
28282
28282
|
pk: messages.id,
|
|
28283
28283
|
nativeId: messages.externalId,
|
|
@@ -28457,7 +28457,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
28457
28457
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
28458
28458
|
}), "chatActivity");
|
|
28459
28459
|
|
|
28460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
28461
28461
|
var HIT_FIELDS = {
|
|
28462
28462
|
...MESSAGE_FIELDS,
|
|
28463
28463
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -28556,7 +28556,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
28556
28556
|
};
|
|
28557
28557
|
}, "directReplies");
|
|
28558
28558
|
|
|
28559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
28560
28560
|
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");
|
|
28561
28561
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
28562
28562
|
const found2 = identityRow(context, ref3);
|
|
@@ -28769,7 +28769,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
28769
28769
|
}, "mentioning");
|
|
28770
28770
|
var escaped = /* @__PURE__ */ __name((text7) => text7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
28771
28771
|
|
|
28772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28773
28773
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
28774
28774
|
var unregistered = /* @__PURE__ */ __name((provider) => `no CLI has registered ${provider} in this store yet; run its CLI once`, "unregistered");
|
|
28775
28775
|
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");
|
|
@@ -28868,7 +28868,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
28868
28868
|
return `${WORDS2[summary.kind]} ${named2}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
28869
28869
|
}, "refLabel");
|
|
28870
28870
|
|
|
28871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28872
28872
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
28873
28873
|
const unique2 = [...new Set(ids3)];
|
|
28874
28874
|
if (unique2.length === 0)
|
|
@@ -28957,7 +28957,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text7) => {
|
|
|
28957
28957
|
}, "refEndsOf");
|
|
28958
28958
|
var refAccountsOf = /* @__PURE__ */ __name((database, text7) => refEndsOf(database, text7)?.flat(), "refAccountsOf");
|
|
28959
28959
|
|
|
28960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28961
28961
|
var EXCERPT_CHARS = 280;
|
|
28962
28962
|
var TITLE_CHARS = 120;
|
|
28963
28963
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -29381,7 +29381,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
29381
29381
|
ends: /* @__PURE__ */ __name(async (text7) => refEndsOf(context.database, text7), "ends")
|
|
29382
29382
|
}), "refsStoreOver");
|
|
29383
29383
|
|
|
29384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
29385
29385
|
var sourceOf3 = /* @__PURE__ */ __name((read3, ref3) => ({
|
|
29386
29386
|
ref: ref3,
|
|
29387
29387
|
kind: read3.kind,
|
|
@@ -29419,7 +29419,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
29419
29419
|
});
|
|
29420
29420
|
}, "evidenceSourcesOf");
|
|
29421
29421
|
|
|
29422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
29423
29423
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
29424
29424
|
var MAX_TEXT_CHARS = 2e6;
|
|
29425
29425
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -29445,7 +29445,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
29445
29445
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
29446
29446
|
}, "pdfPreviewLimits");
|
|
29447
29447
|
|
|
29448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
29449
29449
|
import { randomBytes } from "node:crypto";
|
|
29450
29450
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
29451
29451
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -29458,7 +29458,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
29458
29458
|
return time3 + random;
|
|
29459
29459
|
}, "ulid");
|
|
29460
29460
|
|
|
29461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
29462
29462
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
29463
29463
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
29464
29464
|
if (!meta && !sections?.length)
|
|
@@ -29479,7 +29479,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
29479
29479
|
return typeof language === "string" && language !== "" ? language : null;
|
|
29480
29480
|
}, "languageOf");
|
|
29481
29481
|
|
|
29482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
29483
29483
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
29484
29484
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
29485
29485
|
if (isObject2(value))
|
|
@@ -29726,7 +29726,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29726
29726
|
};
|
|
29727
29727
|
}, "filesStoreOver");
|
|
29728
29728
|
|
|
29729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29730
29730
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29731
29731
|
entity: "document",
|
|
29732
29732
|
backend: "sql",
|
|
@@ -29772,7 +29772,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29772
29772
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2);
|
|
29773
29773
|
}, "importedDocumentWhere");
|
|
29774
29774
|
|
|
29775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29776
29776
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29777
29777
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29778
29778
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29780,7 +29780,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29780
29780
|
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);
|
|
29781
29781
|
}, "reviewLink");
|
|
29782
29782
|
|
|
29783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29784
29784
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29785
29785
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29786
29786
|
var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
@@ -29813,7 +29813,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29813
29813
|
};
|
|
29814
29814
|
}, "linkOf");
|
|
29815
29815
|
|
|
29816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29817
29817
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29818
29818
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29819
29819
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29834,7 +29834,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29834
29834
|
return changed;
|
|
29835
29835
|
}, "dateFileNotes");
|
|
29836
29836
|
|
|
29837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29838
29838
|
var textOf2 = /* @__PURE__ */ __name((text7, what, max = 1e5, allowEmpty = false) => {
|
|
29839
29839
|
const value = text7.trim();
|
|
29840
29840
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29847,7 +29847,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29847
29847
|
return value;
|
|
29848
29848
|
}, "oneOf");
|
|
29849
29849
|
|
|
29850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29851
29851
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29852
29852
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29853
29853
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30362,10 +30362,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30362
30362
|
};
|
|
30363
30363
|
}, "notesStoreOver");
|
|
30364
30364
|
|
|
30365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
30366
30366
|
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");
|
|
30367
30367
|
|
|
30368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
30369
30369
|
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";
|
|
30370
30370
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30371
30371
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30630,7 +30630,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30630
30630
|
};
|
|
30631
30631
|
}, "memoriesStoreOver");
|
|
30632
30632
|
|
|
30633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30634
30634
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30635
30635
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30636
30636
|
throw new CliError(code, message3, { reason });
|
|
@@ -30778,7 +30778,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30778
30778
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30779
30779
|
}, "reviewedRowsOver");
|
|
30780
30780
|
|
|
30781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30782
30782
|
var MAX_LINES = 500;
|
|
30783
30783
|
var PARENTS = {
|
|
30784
30784
|
invoice: {
|
|
@@ -30878,7 +30878,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30878
30878
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30879
30879
|
}, "moneyLinesOver");
|
|
30880
30880
|
|
|
30881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30882
30882
|
var COUNTED = {
|
|
30883
30883
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30884
30884
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30953,7 +30953,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30953
30953
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30954
30954
|
}, "refundRulesOver");
|
|
30955
30955
|
|
|
30956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30957
30957
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30958
30958
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30959
30959
|
var PAID = netPaidSql("i.id");
|
|
@@ -31357,7 +31357,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31357
31357
|
};
|
|
31358
31358
|
}, "financeStoreOver");
|
|
31359
31359
|
|
|
31360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
31361
31361
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
31362
31362
|
throw new CliError("validation_error", message3, { reason });
|
|
31363
31363
|
}, "refuse");
|
|
@@ -31435,7 +31435,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31435
31435
|
};
|
|
31436
31436
|
}, "paymentEntriesOver");
|
|
31437
31437
|
|
|
31438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31439
31439
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31440
31440
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31441
31441
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31462,7 +31462,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31462
31462
|
return valid;
|
|
31463
31463
|
}, "validateEvidenceFindings");
|
|
31464
31464
|
|
|
31465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31466
31466
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31467
31467
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31468
31468
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31656,7 +31656,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31656
31656
|
};
|
|
31657
31657
|
}, "proposedActionsStoreOver");
|
|
31658
31658
|
|
|
31659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31660
31660
|
var CONFIRMED = "proposal";
|
|
31661
31661
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31662
31662
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -32006,7 +32006,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
32006
32006
|
return { items, hasMore: rows.length > limit };
|
|
32007
32007
|
}, "identityLinkRows");
|
|
32008
32008
|
|
|
32009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
32010
32010
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
32011
32011
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
32012
32012
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -32109,7 +32109,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
32109
32109
|
return recordOf(context, alone);
|
|
32110
32110
|
}, "split");
|
|
32111
32111
|
|
|
32112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
32113
32113
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
32114
32114
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
32115
32115
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -32286,7 +32286,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
32286
32286
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32287
32287
|
}, "forgetErasedSplits");
|
|
32288
32288
|
|
|
32289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
32290
32290
|
var SEED_PEOPLE = [
|
|
32291
32291
|
{ name: "Owner", username: "owner" },
|
|
32292
32292
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -32303,7 +32303,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
32303
32303
|
];
|
|
32304
32304
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
32305
32305
|
|
|
32306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
32307
32307
|
var TEST_DATA_KIND = "test_data";
|
|
32308
32308
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
32309
32309
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -32372,7 +32372,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
32372
32372
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
32373
32373
|
}, "forgetErasedTestData");
|
|
32374
32374
|
|
|
32375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
32376
32376
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
32377
32377
|
provider,
|
|
32378
32378
|
externalId: account,
|
|
@@ -32573,7 +32573,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32573
32573
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32574
32574
|
}, "dropOrphanPeople");
|
|
32575
32575
|
|
|
32576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32577
32577
|
var HISTORY_KEY = "$history";
|
|
32578
32578
|
var objectOf2 = /* @__PURE__ */ __name((text7) => {
|
|
32579
32579
|
if (typeof text7 !== "string")
|
|
@@ -32649,7 +32649,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32649
32649
|
return rest;
|
|
32650
32650
|
}, "withoutHistory");
|
|
32651
32651
|
|
|
32652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32653
32653
|
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");
|
|
32654
32654
|
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");
|
|
32655
32655
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32947,7 +32947,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32947
32947
|
}
|
|
32948
32948
|
}, "replaceAutoTags");
|
|
32949
32949
|
|
|
32950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32951
32951
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32952
32952
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32953
32953
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32987,7 +32987,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32987
32987
|
}, "maskStoredBotTokens");
|
|
32988
32988
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32989
32989
|
|
|
32990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32991
32991
|
import { createHash as createHash4 } from "node:crypto";
|
|
32992
32992
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32993
32993
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -33085,7 +33085,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
33085
33085
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
33086
33086
|
}, "contextEvidenceRequest");
|
|
33087
33087
|
|
|
33088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
33089
33089
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
33090
33090
|
var ACTIVITY = `
|
|
33091
33091
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -33215,7 +33215,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
33215
33215
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
33216
33216
|
}), "mailActivity");
|
|
33217
33217
|
|
|
33218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
33219
33219
|
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");
|
|
33220
33220
|
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;
|
|
33221
33221
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -33296,7 +33296,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
33296
33296
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
33297
33297
|
}, "mailCore");
|
|
33298
33298
|
|
|
33299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
33300
33300
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
33301
33301
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
33302
33302
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -33409,7 +33409,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
33409
33409
|
return emails3 + threads;
|
|
33410
33410
|
}, "drainEmailIndex");
|
|
33411
33411
|
|
|
33412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
33413
33413
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
33414
33414
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
33415
33415
|
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,
|
|
@@ -33507,7 +33507,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33507
33507
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33508
33508
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33509
33509
|
|
|
33510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33511
33511
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33512
33512
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33513
33513
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33557,7 +33557,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33557
33557
|
return threads.length;
|
|
33558
33558
|
}, "markEmailsRestored");
|
|
33559
33559
|
|
|
33560
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33561
33561
|
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
|
|
33562
33562
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33563
33563
|
WHERE p.account_id = ?
|
|
@@ -33617,7 +33617,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33617
33617
|
}, "indexedMailPieces");
|
|
33618
33618
|
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");
|
|
33619
33619
|
|
|
33620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33621
33621
|
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");
|
|
33622
33622
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33623
33623
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33684,7 +33684,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33684
33684
|
}
|
|
33685
33685
|
}), "mailRulesOver");
|
|
33686
33686
|
|
|
33687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33688
33688
|
function checkMeetingCancelled(signal) {
|
|
33689
33689
|
if (!signal?.aborted)
|
|
33690
33690
|
return;
|
|
@@ -33695,7 +33695,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33695
33695
|
}
|
|
33696
33696
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33697
33697
|
|
|
33698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33699
33699
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
33700
33700
|
id: Number(row2.id),
|
|
33701
33701
|
accountId: Number(row2.account_id),
|
|
@@ -33745,7 +33745,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33745
33745
|
createdAt: Number(row2.created_at)
|
|
33746
33746
|
}), "transcriptRowOf");
|
|
33747
33747
|
|
|
33748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33749
33749
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33750
33750
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33751
33751
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33912,7 +33912,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33912
33912
|
}
|
|
33913
33913
|
}), "meetingReadsOver");
|
|
33914
33914
|
|
|
33915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33916
33916
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33917
33917
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33918
33918
|
const params = [input.accountId];
|
|
@@ -33955,7 +33955,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33955
33955
|
return { clauses, params };
|
|
33956
33956
|
}, "meetingSelectionSql");
|
|
33957
33957
|
|
|
33958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33959
33959
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33960
33960
|
async meetingChatLines(input) {
|
|
33961
33961
|
checkMeetingCancelled(input.signal);
|
|
@@ -33983,7 +33983,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33983
33983
|
}
|
|
33984
33984
|
}), "meetingChatLinesOver");
|
|
33985
33985
|
|
|
33986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33987
33987
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33988
33988
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33989
33989
|
}, "missing");
|
|
@@ -34106,7 +34106,7 @@ function meetingContextLinksOver(context) {
|
|
|
34106
34106
|
}
|
|
34107
34107
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
34108
34108
|
|
|
34109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
34110
34110
|
var TRANSCRIPT_ROLE = "transcript";
|
|
34111
34111
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
34112
34112
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -34180,7 +34180,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
34180
34180
|
};
|
|
34181
34181
|
}, "meetingTranscriptDocumentsOver");
|
|
34182
34182
|
|
|
34183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
34184
34184
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
34185
34185
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
34186
34186
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -34209,7 +34209,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34209
34209
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
34210
34210
|
}, "indexedText");
|
|
34211
34211
|
|
|
34212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
34213
34213
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
34214
34214
|
var meetingCurrentIndexRows = `
|
|
34215
34215
|
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
|
|
@@ -34240,7 +34240,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
34240
34240
|
}, "invalidateMeetingStems");
|
|
34241
34241
|
var meetingStemmableText = /* @__PURE__ */ __name((text7) => text7.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
34242
34242
|
|
|
34243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
34244
34244
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
34245
34245
|
return {
|
|
34246
34246
|
async indexSearch(original) {
|
|
@@ -34308,10 +34308,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
34308
34308
|
}
|
|
34309
34309
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
34310
34310
|
|
|
34311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34312
34312
|
import { createHash as createHash5 } from "node:crypto";
|
|
34313
34313
|
|
|
34314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/plain.js
|
|
34315
34315
|
var REPAIRED = /* @__PURE__ */ new Set([
|
|
34316
34316
|
"query.invalid-syntax",
|
|
34317
34317
|
"query.unclosed-literal",
|
|
@@ -34454,7 +34454,7 @@ var plainQuery = /* @__PURE__ */ __name((text7, fields4 = SEARCH_FIELDS) => {
|
|
|
34454
34454
|
return text7;
|
|
34455
34455
|
}, "plainQuery");
|
|
34456
34456
|
|
|
34457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
34458
34458
|
var SHORTEST_CORRECTION = 3;
|
|
34459
34459
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
34460
34460
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -34501,7 +34501,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
34501
34501
|
return corrections;
|
|
34502
34502
|
}, "correctWords");
|
|
34503
34503
|
|
|
34504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
34505
34505
|
var SHORTEST_GARBLED = 4;
|
|
34506
34506
|
var MOST_WIDENED = 64;
|
|
34507
34507
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34593,7 +34593,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34593
34593
|
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));
|
|
34594
34594
|
}, "widenWords");
|
|
34595
34595
|
|
|
34596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34596
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34597
34597
|
import { readFileSync } from "node:fs";
|
|
34598
34598
|
var loaded;
|
|
34599
34599
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34652,7 +34652,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34652
34652
|
return false;
|
|
34653
34653
|
}, "knownRussianWord");
|
|
34654
34654
|
|
|
34655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34656
34656
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34657
34657
|
var MOST_WORDS = 128;
|
|
34658
34658
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34908,7 +34908,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text7, stemmer2) => {
|
|
|
34908
34908
|
return [...found2];
|
|
34909
34909
|
}, "matchedMeetingWords");
|
|
34910
34910
|
|
|
34911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34912
34912
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34913
34913
|
throw new CliError("validation_error", message3);
|
|
34914
34914
|
}, "fail");
|
|
@@ -35092,7 +35092,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
35092
35092
|
}
|
|
35093
35093
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
35094
35094
|
|
|
35095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
35096
35096
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35097
35097
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
35098
35098
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -35124,7 +35124,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35124
35124
|
}
|
|
35125
35125
|
}), "meetingLanguagesOver");
|
|
35126
35126
|
|
|
35127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
35128
35128
|
import { createHash as createHash6 } from "node:crypto";
|
|
35129
35129
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
35130
35130
|
if (value === void 0)
|
|
@@ -35217,7 +35217,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
35217
35217
|
}
|
|
35218
35218
|
}), "meetingParticipantSearchOver");
|
|
35219
35219
|
|
|
35220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
35221
35221
|
var preparationQueries = {
|
|
35222
35222
|
participants: {
|
|
35223
35223
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -35267,7 +35267,7 @@ var preparationQueries = {
|
|
|
35267
35267
|
}
|
|
35268
35268
|
};
|
|
35269
35269
|
|
|
35270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
35271
35271
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35272
35272
|
async preparationContext(original) {
|
|
35273
35273
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -35308,7 +35308,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35308
35308
|
}
|
|
35309
35309
|
}), "meetingPreparationContextOver");
|
|
35310
35310
|
|
|
35311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
35312
35312
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
35313
35313
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
35314
35314
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -35322,7 +35322,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
35322
35322
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
35323
35323
|
)`, "preparationSubjects");
|
|
35324
35324
|
|
|
35325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
35326
35326
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35327
35327
|
async preparationKnowledge(original) {
|
|
35328
35328
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35367,7 +35367,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
35367
35367
|
}
|
|
35368
35368
|
}), "meetingPreparationKnowledgeOver");
|
|
35369
35369
|
|
|
35370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
35371
35371
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35372
35372
|
async preparationNotes(original) {
|
|
35373
35373
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -35420,7 +35420,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35420
35420
|
}
|
|
35421
35421
|
}), "meetingPreparationNotesOver");
|
|
35422
35422
|
|
|
35423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
35424
35424
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35425
35425
|
async relatedHistory(original) {
|
|
35426
35426
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -35491,7 +35491,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35491
35491
|
}
|
|
35492
35492
|
}), "meetingRelatedHistoryOver");
|
|
35493
35493
|
|
|
35494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
35495
35495
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
35496
35496
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
35497
35497
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35572,7 +35572,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35572
35572
|
}
|
|
35573
35573
|
}), "meetingReviewOver");
|
|
35574
35574
|
|
|
35575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35576
35576
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35577
35577
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35578
35578
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35626,7 +35626,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35626
35626
|
}
|
|
35627
35627
|
}), "meetingSeriesHistoryOver");
|
|
35628
35628
|
|
|
35629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35630
35630
|
var MOST_ROWS = 5e5;
|
|
35631
35631
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35632
35632
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35695,7 +35695,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35695
35695
|
}
|
|
35696
35696
|
}), "meetingStatsOver");
|
|
35697
35697
|
|
|
35698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35699
35699
|
var CYRILLIC_TO_LATIN = {
|
|
35700
35700
|
\u0430: "a",
|
|
35701
35701
|
\u0431: "b",
|
|
@@ -35917,7 +35917,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35917
35917
|
}
|
|
35918
35918
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35919
35919
|
|
|
35920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35921
35921
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35922
35922
|
const found2 = /* @__PURE__ */ new Map();
|
|
35923
35923
|
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()) {
|
|
@@ -36033,7 +36033,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
36033
36033
|
}
|
|
36034
36034
|
__name(sharedTraces, "sharedTraces");
|
|
36035
36035
|
|
|
36036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
36037
36037
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
36038
36038
|
var PERSON_BY = {
|
|
36039
36039
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -36056,7 +36056,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
36056
36056
|
return [...found2].sort((a, b) => a - b);
|
|
36057
36057
|
}, "personsByIdentifiers");
|
|
36058
36058
|
|
|
36059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
36060
36060
|
var BY = "rule";
|
|
36061
36061
|
var RULE = { bot: "rule", kind: "rule" };
|
|
36062
36062
|
var MOST_SHARING = 6;
|
|
@@ -36503,7 +36503,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
36503
36503
|
return pass.result;
|
|
36504
36504
|
}, "linkPhones");
|
|
36505
36505
|
|
|
36506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
36507
36507
|
var CURSOR_KEY = "meetings";
|
|
36508
36508
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
36509
36509
|
id: Number(row2.id),
|
|
@@ -36855,6 +36855,7 @@ var MEETING_COLUMNS = {
|
|
|
36855
36855
|
ended_at: { type: "time", sql: "ended_at" },
|
|
36856
36856
|
duration_ms: { type: "num", sql: "duration_ms" },
|
|
36857
36857
|
participants_count: { type: "num", sql: "participants_count" },
|
|
36858
|
+
provider_id: { type: "kw", sql: "external_id" },
|
|
36858
36859
|
created_at: { type: "time", sql: "created_at" },
|
|
36859
36860
|
updated_at: { type: "time", sql: "updated_at" }
|
|
36860
36861
|
};
|
|
@@ -36877,8 +36878,14 @@ var filtered = /* @__PURE__ */ __name((filter = {}) => {
|
|
|
36877
36878
|
add2("started_at >= ?", filter.since);
|
|
36878
36879
|
if (filter.until !== void 0)
|
|
36879
36880
|
add2("started_at <= ?", filter.until);
|
|
36881
|
+
if (filter.ids !== void 0)
|
|
36882
|
+
add2("id IN (SELECT value FROM json_each(?))", JSON.stringify(filter.ids));
|
|
36880
36883
|
if (filter.query !== void 0) {
|
|
36881
|
-
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
36884
|
+
const compiled = queryFilter(filter.query, MEETING_COLUMNS, {
|
|
36885
|
+
command: "meetings list",
|
|
36886
|
+
...filter.timezone === void 0 ? {} : { zone: filter.timezone },
|
|
36887
|
+
...filter.now === void 0 ? {} : { now: filter.now }
|
|
36888
|
+
});
|
|
36882
36889
|
where.push(`(${compiled.sql})`);
|
|
36883
36890
|
params.push(...compiled.params);
|
|
36884
36891
|
}
|
|
@@ -37051,6 +37058,10 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37051
37058
|
async meeting(id2) {
|
|
37052
37059
|
return details(database, id2);
|
|
37053
37060
|
},
|
|
37061
|
+
async meetingByExternalId(accountId, externalId) {
|
|
37062
|
+
const row2 = database.prepare("SELECT id FROM meetings WHERE account_id = ? AND external_id = ?").get(accountId, externalId);
|
|
37063
|
+
return row2 ? details(database, Number(row2.id)) : null;
|
|
37064
|
+
},
|
|
37054
37065
|
async participants(query, accountId) {
|
|
37055
37066
|
return participants2(database, query, accountId);
|
|
37056
37067
|
},
|
|
@@ -37091,7 +37102,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
37091
37102
|
};
|
|
37092
37103
|
}, "meetingStoreOver");
|
|
37093
37104
|
|
|
37094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
37095
37106
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
37096
37107
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
37097
37108
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -37117,7 +37128,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
37117
37128
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
37118
37129
|
}, "release");
|
|
37119
37130
|
|
|
37120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
37121
37132
|
var THREAD_COLUMNS = {
|
|
37122
37133
|
subject: {
|
|
37123
37134
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -37134,7 +37145,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
37134
37145
|
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);
|
|
37135
37146
|
}, "threadRows");
|
|
37136
37147
|
|
|
37137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
37138
37149
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
37139
37150
|
id: `email:${place.emailId}`,
|
|
37140
37151
|
chatId: place.threadExternalId,
|
|
@@ -37676,7 +37687,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37676
37687
|
}
|
|
37677
37688
|
}), "mailStoreOver");
|
|
37678
37689
|
|
|
37679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37680
37691
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37681
37692
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37682
37693
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37766,7 +37777,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37766
37777
|
}, "knownWord");
|
|
37767
37778
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37768
37779
|
|
|
37769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37770
37781
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37771
37782
|
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");
|
|
37772
37783
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37852,7 +37863,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37852
37863
|
return found2;
|
|
37853
37864
|
}, "spokenTranscripts");
|
|
37854
37865
|
|
|
37855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37856
37867
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37857
37868
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37858
37869
|
const start = startOf(node);
|
|
@@ -37910,7 +37921,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37910
37921
|
});
|
|
37911
37922
|
}, "placeHits");
|
|
37912
37923
|
|
|
37913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37914
37925
|
var GROUPS = {
|
|
37915
37926
|
chat: {
|
|
37916
37927
|
key: "m.chat_id",
|
|
@@ -37932,7 +37943,7 @@ var GROUPS = {
|
|
|
37932
37943
|
}
|
|
37933
37944
|
};
|
|
37934
37945
|
|
|
37935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37936
37947
|
var MESSAGES2 = {
|
|
37937
37948
|
rows: "messages",
|
|
37938
37949
|
threads: "chats",
|
|
@@ -38425,7 +38436,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
38425
38436
|
};
|
|
38426
38437
|
}, "runCompiled");
|
|
38427
38438
|
|
|
38428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
38429
38440
|
function invalidMetadata() {
|
|
38430
38441
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
38431
38442
|
}
|
|
@@ -38527,7 +38538,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
38527
38538
|
};
|
|
38528
38539
|
}), "counterTargets");
|
|
38529
38540
|
|
|
38530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
38531
38542
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
38532
38543
|
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,
|
|
38533
38544
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38646,7 +38657,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38646
38657
|
}));
|
|
38647
38658
|
}, "attachmentViews");
|
|
38648
38659
|
|
|
38649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38650
38661
|
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");
|
|
38651
38662
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text7, source2) => {
|
|
38652
38663
|
const { orm, database, now: now2 } = context;
|
|
@@ -38684,7 +38695,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38684
38695
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38685
38696
|
}, "intoVoiceAttachment");
|
|
38686
38697
|
|
|
38687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38688
38699
|
var FIELDS = [
|
|
38689
38700
|
"threadExternalId",
|
|
38690
38701
|
"senderIdentityId",
|
|
@@ -38794,6 +38805,11 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
38794
38805
|
} else {
|
|
38795
38806
|
pk = found2.pk;
|
|
38796
38807
|
const edit = message3.editedAt !== null;
|
|
38808
|
+
const stale4 = !revived && found2.editedAt !== null && (fields4.editedAt !== null ? Number(fields4.editedAt) < found2.editedAt : seenAt !== void 0 && seenAt < found2.editedAt);
|
|
38809
|
+
if (stale4) {
|
|
38810
|
+
fields4.editedAt = null;
|
|
38811
|
+
fields4.normalizedText = null;
|
|
38812
|
+
}
|
|
38797
38813
|
if (edit) {
|
|
38798
38814
|
const incoming = Number(fields4.sentAt);
|
|
38799
38815
|
if (found2.sentAt > 0 && (incoming <= 0 || found2.sentAt < incoming))
|
|
@@ -38815,7 +38831,7 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
38815
38831
|
}
|
|
38816
38832
|
}
|
|
38817
38833
|
statements.update.run({ ...fields4, pk });
|
|
38818
|
-
if (found2.text !== message3.text && !revived) {
|
|
38834
|
+
if (found2.text !== message3.text && !revived && !stale4) {
|
|
38819
38835
|
orm.insert(messageRevisions).values({ messageId: pk, text: found2.text, editedAt: found2.editedAt, createdAt: now2() }).run();
|
|
38820
38836
|
orm.update(messages).set({ text: message3.text }).where(eq(messages.id, pk)).run();
|
|
38821
38837
|
purgeVectorsOf(context, pk);
|
|
@@ -39003,7 +39019,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
39003
39019
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
39004
39020
|
}, "writeDerivedReactions");
|
|
39005
39021
|
|
|
39006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
39007
39023
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
39008
39024
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
39009
39025
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -39024,7 +39040,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
39024
39040
|
};
|
|
39025
39041
|
}, "keysOver");
|
|
39026
39042
|
|
|
39027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
39028
39044
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
39029
39045
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
39030
39046
|
if (!row2)
|
|
@@ -39071,7 +39087,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
39071
39087
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
39072
39088
|
}, "forgetProfile");
|
|
39073
39089
|
|
|
39074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39075
39091
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39076
39092
|
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");
|
|
39077
39093
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39130,7 +39146,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39130
39146
|
return personOf2(context, ref3);
|
|
39131
39147
|
}, "linkToOwner");
|
|
39132
39148
|
|
|
39133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39134
39150
|
var PROVIDERS_SETTING = "providers";
|
|
39135
39151
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39136
39152
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39178,7 +39194,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39178
39194
|
});
|
|
39179
39195
|
}, "registerProvider");
|
|
39180
39196
|
|
|
39181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39182
39198
|
var DAY3 = 864e5;
|
|
39183
39199
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
39184
39200
|
var TEXT_LIMIT = 20;
|
|
@@ -39376,7 +39392,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39376
39392
|
};
|
|
39377
39393
|
}, "taskSimilarityOver");
|
|
39378
39394
|
|
|
39379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39380
39396
|
var SETTING3 = "taskCategories";
|
|
39381
39397
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39382
39398
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39395,7 +39411,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39395
39411
|
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);
|
|
39396
39412
|
}, "saveTaskCategories");
|
|
39397
39413
|
|
|
39398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39399
39415
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39400
39416
|
var ALLOWED = "taskAgentClose";
|
|
39401
39417
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39451,7 +39467,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39451
39467
|
];
|
|
39452
39468
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39453
39469
|
|
|
39454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39455
39471
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39456
39472
|
var KEY = "taskFirstPassPerChat";
|
|
39457
39473
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39471,7 +39487,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39471
39487
|
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);
|
|
39472
39488
|
}, "saveFirstPassPerChat");
|
|
39473
39489
|
|
|
39474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39475
39491
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39476
39492
|
var EXTERNAL_ID_CHARS = 200;
|
|
39477
39493
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39498,7 +39514,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39498
39514
|
return text7;
|
|
39499
39515
|
}, "sourceUrlOf");
|
|
39500
39516
|
|
|
39501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39502
39518
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39503
39519
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39504
39520
|
name,
|
|
@@ -39750,7 +39766,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
39750
39766
|
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 ?`;
|
|
39751
39767
|
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");
|
|
39752
39768
|
|
|
39753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
39754
39770
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
39755
39771
|
if (row2.author_type == null)
|
|
39756
39772
|
return null;
|
|
@@ -39778,7 +39794,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
39778
39794
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
39779
39795
|
}, "addComment");
|
|
39780
39796
|
|
|
39781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
39782
39798
|
var TASK_RELATION_KINDS = [
|
|
39783
39799
|
"blocked-by",
|
|
39784
39800
|
"follow-up-of",
|
|
@@ -39908,7 +39924,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
39908
39924
|
};
|
|
39909
39925
|
}, "taskRelationsStoreOver");
|
|
39910
39926
|
|
|
39911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
39912
39928
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
39913
39929
|
var TASK_EVENT_KINDS = [
|
|
39914
39930
|
"created",
|
|
@@ -40467,7 +40483,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40467
40483
|
};
|
|
40468
40484
|
}, "workTasksOver");
|
|
40469
40485
|
|
|
40470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40471
40487
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40472
40488
|
const { database, now: now2 } = context;
|
|
40473
40489
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40516,7 +40532,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40516
40532
|
};
|
|
40517
40533
|
}, "taskCloseOver");
|
|
40518
40534
|
|
|
40519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40520
40536
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40521
40537
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40522
40538
|
const { database, now: now2 } = context;
|
|
@@ -40735,7 +40751,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
40735
40751
|
};
|
|
40736
40752
|
}, "taskPairsOver");
|
|
40737
40753
|
|
|
40738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
40739
40755
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
40740
40756
|
var TASK_STATS_SQL = {
|
|
40741
40757
|
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"),
|
|
@@ -40774,7 +40790,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
40774
40790
|
}, "statNames")
|
|
40775
40791
|
}), "taskStatsOver");
|
|
40776
40792
|
|
|
40777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
40778
40794
|
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";
|
|
40779
40795
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
40780
40796
|
const key2 = inboxKey(account);
|
|
@@ -40990,7 +41006,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
40990
41006
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
40991
41007
|
}, "oneOf");
|
|
40992
41008
|
|
|
40993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
40994
41010
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
40995
41011
|
const { database } = context;
|
|
40996
41012
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41060,7 +41076,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41060
41076
|
};
|
|
41061
41077
|
}, "accountsStoreOver");
|
|
41062
41078
|
|
|
41063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41064
41080
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41065
41081
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41066
41082
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41084,7 +41100,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41084
41100
|
})), "keepDownloads");
|
|
41085
41101
|
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");
|
|
41086
41102
|
|
|
41087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41088
41104
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41089
41105
|
const { database } = context;
|
|
41090
41106
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41141,7 +41157,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41141
41157
|
}, "keepAttachmentText")
|
|
41142
41158
|
}), "attachmentsStoreOver");
|
|
41143
41159
|
|
|
41144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41145
41161
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41146
41162
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41147
41163
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41326,7 +41342,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41326
41342
|
return done;
|
|
41327
41343
|
}, "rekeyChats");
|
|
41328
41344
|
|
|
41329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41330
41346
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41331
41347
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41332
41348
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41384,7 +41400,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41384
41400
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41385
41401
|
}, "chatCoverage");
|
|
41386
41402
|
|
|
41387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41388
41404
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41389
41405
|
const { database } = context;
|
|
41390
41406
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41533,7 +41549,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41533
41549
|
};
|
|
41534
41550
|
}, "chatsStoreOver");
|
|
41535
41551
|
|
|
41536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41537
41553
|
import { createHash as createHash7 } from "node:crypto";
|
|
41538
41554
|
var BATCH_CONTEXT = 50;
|
|
41539
41555
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -41671,7 +41687,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
41671
41687
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
41672
41688
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
41673
41689
|
|
|
41674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
41675
41691
|
import { setTimeout } from "node:timers/promises";
|
|
41676
41692
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
41677
41693
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -41983,7 +41999,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
41983
41999
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
41984
42000
|
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");
|
|
41985
42001
|
|
|
41986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
41987
42003
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41988
42004
|
const { database } = context;
|
|
41989
42005
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42090,7 +42106,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42090
42106
|
};
|
|
42091
42107
|
}, "conversationsStoreOver");
|
|
42092
42108
|
|
|
42093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42094
42110
|
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";
|
|
42095
42111
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42096
42112
|
const { database } = context;
|
|
@@ -42115,7 +42131,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42115
42131
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42116
42132
|
}), "countersStoreOver");
|
|
42117
42133
|
|
|
42118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42119
42135
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42120
42136
|
var MENTION_QUERY = defineQuery({
|
|
42121
42137
|
entity: "mention",
|
|
@@ -42334,7 +42350,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42334
42350
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42335
42351
|
}, "listPlaces");
|
|
42336
42352
|
|
|
42337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42338
42354
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42339
42355
|
const { database } = context;
|
|
42340
42356
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42369,7 +42385,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42369
42385
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42370
42386
|
}), "mentionsStoreOver");
|
|
42371
42387
|
|
|
42372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42373
42389
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42374
42390
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42375
42391
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42468,7 +42484,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42468
42484
|
});
|
|
42469
42485
|
}, "waitingChats");
|
|
42470
42486
|
|
|
42471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42472
42488
|
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 = ?`;
|
|
42473
42489
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42474
42490
|
const statement = database.prepare(SQL);
|
|
@@ -42488,7 +42504,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42488
42504
|
return found2;
|
|
42489
42505
|
}, "chatActivityCounts");
|
|
42490
42506
|
|
|
42491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42492
42508
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42493
42509
|
const read3 = 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");
|
|
42494
42510
|
const rows = messageId === void 0 ? read3.all(chatKey) : read3.all(chatKey, messageId);
|
|
@@ -42503,7 +42519,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42503
42519
|
}));
|
|
42504
42520
|
}, "documentLinkMessages");
|
|
42505
42521
|
|
|
42506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42507
42523
|
var stemmerFor = stemmerCache();
|
|
42508
42524
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42509
42525
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42547,7 +42563,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42547
42563
|
});
|
|
42548
42564
|
}, "laterSharingRare");
|
|
42549
42565
|
|
|
42550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42551
42567
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42552
42568
|
const { database } = context;
|
|
42553
42569
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -42688,7 +42704,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42688
42704
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
42689
42705
|
}), "messagesStoreOver");
|
|
42690
42706
|
|
|
42691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
42692
42708
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
42693
42709
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
42694
42710
|
"noreply",
|
|
@@ -42751,7 +42767,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
42751
42767
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
42752
42768
|
}, "isCompanyName");
|
|
42753
42769
|
|
|
42754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
42755
42771
|
var SMALL_GROUP_MEMBERS = 10;
|
|
42756
42772
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
42757
42773
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -42806,7 +42822,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
42806
42822
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
42807
42823
|
}, "shownReasons");
|
|
42808
42824
|
|
|
42809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
42810
42826
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
42811
42827
|
var MIN_QUERY = 3;
|
|
42812
42828
|
var ftsPhrase = /* @__PURE__ */ __name((text7) => `"${text7.replaceAll('"', '""')}"`, "ftsPhrase");
|
|
@@ -43152,7 +43168,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43152
43168
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43153
43169
|
}, "similarPeople");
|
|
43154
43170
|
|
|
43155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43156
43172
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43157
43173
|
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";
|
|
43158
43174
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -43408,7 +43424,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
43408
43424
|
return { person: `person:${person2}`, identities: identities2 };
|
|
43409
43425
|
}, "markTestData");
|
|
43410
43426
|
|
|
43411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
43412
43428
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
43413
43429
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
43414
43430
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -43477,7 +43493,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
43477
43493
|
});
|
|
43478
43494
|
}, "personPreparation");
|
|
43479
43495
|
|
|
43480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
43481
43497
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
43482
43498
|
const id2 = Number(uid);
|
|
43483
43499
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -43485,7 +43501,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
43485
43501
|
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)));
|
|
43486
43502
|
}, "personSeenInAccounts");
|
|
43487
43503
|
|
|
43488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
43489
43505
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
43490
43506
|
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);
|
|
43491
43507
|
if (!row2)
|
|
@@ -43552,7 +43568,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
43552
43568
|
return { id: id2, personId, removed: true };
|
|
43553
43569
|
}, "removeNote");
|
|
43554
43570
|
|
|
43555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
43556
43572
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
43557
43573
|
const { database } = context;
|
|
43558
43574
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -43679,13 +43695,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
43679
43695
|
};
|
|
43680
43696
|
}, "peopleStoreOver");
|
|
43681
43697
|
|
|
43682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
43683
43699
|
import { createHash as createHash9 } from "node:crypto";
|
|
43684
43700
|
|
|
43685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43686
43702
|
import { createHash as createHash8 } from "node:crypto";
|
|
43687
43703
|
|
|
43688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
43689
43705
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
43690
43706
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
43691
43707
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -43907,7 +43923,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
43907
43923
|
};
|
|
43908
43924
|
}, "rankReplyGraph");
|
|
43909
43925
|
|
|
43910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
43911
43927
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
43912
43928
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
43913
43929
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44081,7 +44097,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44081
44097
|
return { items, evidence, summary, graph: graph.quality };
|
|
44082
44098
|
}, "calculateAdminStatistics");
|
|
44083
44099
|
|
|
44084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44085
44101
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44086
44102
|
const dates = [];
|
|
44087
44103
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44103,7 +44119,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44103
44119
|
return dates[0].node.resolution.date;
|
|
44104
44120
|
}, "rankingContextRange");
|
|
44105
44121
|
|
|
44106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44107
44123
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44108
44124
|
let counts;
|
|
44109
44125
|
try {
|
|
@@ -44398,7 +44414,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
44398
44414
|
});
|
|
44399
44415
|
}, "rankQuery");
|
|
44400
44416
|
|
|
44401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44402
44418
|
function fail2(message3, reason = "query.too-large") {
|
|
44403
44419
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
44404
44420
|
}
|
|
@@ -44575,7 +44591,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
44575
44591
|
return result;
|
|
44576
44592
|
}), "adminStatisticsQuery");
|
|
44577
44593
|
|
|
44578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
44579
44595
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
44580
44596
|
if (!execution.accounts.length)
|
|
44581
44597
|
return { conversations: [], chats: [] };
|
|
@@ -44593,7 +44609,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
44593
44609
|
return { conversations: conversations2, chats: chats2 };
|
|
44594
44610
|
}, "conversationEligibility");
|
|
44595
44611
|
|
|
44596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
44597
44613
|
import { createHash as createHash10 } from "node:crypto";
|
|
44598
44614
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
44599
44615
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -44743,7 +44759,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
44743
44759
|
return result;
|
|
44744
44760
|
}, "rankingEvidence");
|
|
44745
44761
|
|
|
44746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
44747
44763
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
44748
44764
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
44749
44765
|
if (execution.corpus === "mail")
|
|
@@ -44764,7 +44780,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
44764
44780
|
};
|
|
44765
44781
|
}, "queriesStoreOver");
|
|
44766
44782
|
|
|
44767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
44768
44784
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
44769
44785
|
const { database, now: now2 } = context;
|
|
44770
44786
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -44803,10 +44819,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
44803
44819
|
}));
|
|
44804
44820
|
}, "chatEventsOf");
|
|
44805
44821
|
|
|
44806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44807
44823
|
import { createHash as createHash11 } from "node:crypto";
|
|
44808
44824
|
|
|
44809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
44810
44826
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
44811
44827
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
44812
44828
|
timeZone: zone,
|
|
@@ -44826,7 +44842,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
44826
44842
|
return date3.toISOString().slice(0, 10);
|
|
44827
44843
|
}, "weekKey");
|
|
44828
44844
|
|
|
44829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
44830
44846
|
var RETENTION_TOLERANCE = 864e5;
|
|
44831
44847
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
44832
44848
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -44880,7 +44896,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
44880
44896
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
44881
44897
|
}, "retentionCohorts");
|
|
44882
44898
|
|
|
44883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
44884
44900
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
44885
44901
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
44886
44902
|
validateRetentionOptions(options);
|
|
@@ -45011,7 +45027,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45011
45027
|
};
|
|
45012
45028
|
}, "retentionQuery");
|
|
45013
45029
|
|
|
45014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45015
45031
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45016
45032
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45017
45033
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45140,7 +45156,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45140
45156
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45141
45157
|
})), "trackedChats");
|
|
45142
45158
|
|
|
45143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45144
45160
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45145
45161
|
const { database } = context;
|
|
45146
45162
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45196,7 +45212,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45196
45212
|
};
|
|
45197
45213
|
}, "rosterStoreOver");
|
|
45198
45214
|
|
|
45199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45200
45216
|
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");
|
|
45201
45217
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45202
45218
|
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 ?`);
|
|
@@ -45220,7 +45236,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45220
45236
|
}
|
|
45221
45237
|
}, "backfillNormalized");
|
|
45222
45238
|
|
|
45223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45224
45240
|
var INDEX2 = "message_words";
|
|
45225
45241
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45226
45242
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -45347,7 +45363,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
45347
45363
|
});
|
|
45348
45364
|
}, "resetSearchIndex");
|
|
45349
45365
|
|
|
45350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
45351
45367
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
45352
45368
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
45353
45369
|
const before2 = stemsState(database);
|
|
@@ -45442,7 +45458,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
45442
45458
|
return resetStems(database, { now: now2 });
|
|
45443
45459
|
}, "followDefaultStemmers");
|
|
45444
45460
|
|
|
45445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
45446
45462
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
45447
45463
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
45448
45464
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -45464,7 +45480,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
45464
45480
|
});
|
|
45465
45481
|
}, "termCandidates");
|
|
45466
45482
|
|
|
45467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
45468
45484
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45469
45485
|
const { database } = context;
|
|
45470
45486
|
const stemmerFor2 = stemmerCache();
|
|
@@ -45488,7 +45504,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45488
45504
|
};
|
|
45489
45505
|
}, "searchIndexStoreOver");
|
|
45490
45506
|
|
|
45491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
45492
45508
|
var HISTORY_KEPT = 1e3;
|
|
45493
45509
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
45494
45510
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -45558,7 +45574,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
45558
45574
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
45559
45575
|
}, "clearHistory");
|
|
45560
45576
|
|
|
45561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
45562
45578
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45563
45579
|
const { database } = context;
|
|
45564
45580
|
return {
|
|
@@ -45582,7 +45598,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45582
45598
|
};
|
|
45583
45599
|
}, "searchesStoreOver");
|
|
45584
45600
|
|
|
45585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
45586
45602
|
import { createHash as createHash12 } from "node:crypto";
|
|
45587
45603
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
45588
45604
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -45824,7 +45840,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
45824
45840
|
};
|
|
45825
45841
|
}, "addedSourcesOver");
|
|
45826
45842
|
|
|
45827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
45828
45844
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
45829
45845
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
45830
45846
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -45872,7 +45888,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
45872
45888
|
};
|
|
45873
45889
|
}, "agentActionsStoreOver");
|
|
45874
45890
|
|
|
45875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
45876
45892
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
45877
45893
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
45878
45894
|
if (typeof value !== "string")
|
|
@@ -45918,7 +45934,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
45918
45934
|
}
|
|
45919
45935
|
}, "suggestBaseStages");
|
|
45920
45936
|
|
|
45921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
45922
45938
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
45923
45939
|
var SOURCE = "crm";
|
|
45924
45940
|
var crmIdentityId = /* @__PURE__ */ __name((key2, externalId, type = "contact") => `${idPart(key2.account)}/${type}/${idPart(externalId)}`, "crmIdentityId");
|
|
@@ -46049,7 +46065,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46049
46065
|
return { savePipeline, saveItemRow };
|
|
46050
46066
|
}, "crmRowsOver");
|
|
46051
46067
|
|
|
46052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46053
46069
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46054
46070
|
var MOST_BODY = 2e4;
|
|
46055
46071
|
var MOST_SUBJECT = 500;
|
|
@@ -46129,7 +46145,7 @@ var crmActivitiesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46129
46145
|
return { save: save2, of };
|
|
46130
46146
|
}, "crmActivitiesOver");
|
|
46131
46147
|
|
|
46132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
46133
46149
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
46134
46150
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cutoff) => {
|
|
46135
46151
|
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);
|
|
@@ -46146,7 +46162,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, cuto
|
|
|
46146
46162
|
});
|
|
46147
46163
|
}, "stageAmountsOf");
|
|
46148
46164
|
|
|
46149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
46150
46166
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
46151
46167
|
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");
|
|
46152
46168
|
var MAX_STAGES = 30;
|
|
@@ -46625,7 +46641,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46625
46641
|
};
|
|
46626
46642
|
}, "dealsStoreOver");
|
|
46627
46643
|
|
|
46628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
46629
46645
|
var KEY2 = "ownerLanguages";
|
|
46630
46646
|
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(" "));
|
|
46631
46647
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -46655,7 +46671,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
46655
46671
|
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);
|
|
46656
46672
|
}, "saveOwnerLanguages");
|
|
46657
46673
|
|
|
46658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
46659
46675
|
var OUTCOMES = {
|
|
46660
46676
|
lead: ["open", "open", "open", "won", "lost"],
|
|
46661
46677
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -46988,7 +47004,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46988
47004
|
};
|
|
46989
47005
|
}, "baseStagesStoreOver");
|
|
46990
47006
|
|
|
46991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
46992
47008
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
46993
47009
|
}) => {
|
|
46994
47010
|
const { database, now: now2 } = context;
|
|
@@ -47047,7 +47063,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
47047
47063
|
};
|
|
47048
47064
|
}, "botUpdateStoreOver");
|
|
47049
47065
|
|
|
47050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
47051
47067
|
var IMPORTER = { bot: "import" };
|
|
47052
47068
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
47053
47069
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -47092,7 +47108,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
47092
47108
|
};
|
|
47093
47109
|
}), "moneyLinesOf");
|
|
47094
47110
|
|
|
47095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
47096
47112
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
47097
47113
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
47098
47114
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -47176,7 +47192,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
47176
47192
|
};
|
|
47177
47193
|
}, "relationRolesOver");
|
|
47178
47194
|
|
|
47179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
47180
47196
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
47181
47197
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
47182
47198
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -47371,7 +47387,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
47371
47387
|
return [{ setting: String(row2.key), value: settingValue(database, parsed4.key, parsed4.name) }];
|
|
47372
47388
|
}), "crmSettingsOf");
|
|
47373
47389
|
|
|
47374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
47375
47391
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
47376
47392
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
47377
47393
|
id: link3.id,
|
|
@@ -47731,7 +47747,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
47731
47747
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
47732
47748
|
}, "decidedOrigin");
|
|
47733
47749
|
|
|
47734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
47735
47751
|
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");
|
|
47736
47752
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
47737
47753
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -47869,7 +47885,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
47869
47885
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
47870
47886
|
}), "relationsStoreOver");
|
|
47871
47887
|
|
|
47872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
47873
47889
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
47874
47890
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
47875
47891
|
added: 0,
|
|
@@ -48059,7 +48075,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
48059
48075
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
48060
48076
|
}, "recordRelationshipsOver");
|
|
48061
48077
|
|
|
48062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
48063
48079
|
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";
|
|
48064
48080
|
var DAY_MS2 = 864e5;
|
|
48065
48081
|
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");
|
|
@@ -48218,7 +48234,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48218
48234
|
};
|
|
48219
48235
|
}, "contractsStoreOver");
|
|
48220
48236
|
|
|
48221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
48222
48238
|
var BUSINESS_FIND_MAX = 2001;
|
|
48223
48239
|
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");
|
|
48224
48240
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -48323,7 +48339,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
48323
48339
|
};
|
|
48324
48340
|
}, "businessSearchOver");
|
|
48325
48341
|
|
|
48326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
48327
48343
|
var DAY4 = 864e5;
|
|
48328
48344
|
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}')`;
|
|
48329
48345
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -48439,7 +48455,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
48439
48455
|
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);
|
|
48440
48456
|
}, "listEvents");
|
|
48441
48457
|
|
|
48442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
48443
48459
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
48444
48460
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
48445
48461
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -48496,7 +48512,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
48496
48512
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
48497
48513
|
}, "forgetCalendarRows");
|
|
48498
48514
|
|
|
48499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
48500
48516
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
48501
48517
|
id: Number(row2.id),
|
|
48502
48518
|
accountId: Number(row2.account_id),
|
|
@@ -49099,7 +49115,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49099
49115
|
};
|
|
49100
49116
|
}, "eventStoreOver");
|
|
49101
49117
|
|
|
49102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49103
49119
|
var CATALOG_QUERY = defineQuery({
|
|
49104
49120
|
entity: "document",
|
|
49105
49121
|
backend: "sql",
|
|
@@ -49341,7 +49357,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49341
49357
|
};
|
|
49342
49358
|
}, "catalogStoreOver");
|
|
49343
49359
|
|
|
49344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
49345
49361
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
49346
49362
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
49347
49363
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -49354,7 +49370,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
49354
49370
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
49355
49371
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
49356
49372
|
|
|
49357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
49358
49374
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
49359
49375
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
49360
49376
|
signal?.throwIfAborted();
|
|
@@ -49453,7 +49469,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
49453
49469
|
});
|
|
49454
49470
|
}, "readMeetingContextEvidence");
|
|
49455
49471
|
|
|
49456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
49457
49473
|
var corpora = {
|
|
49458
49474
|
message: {
|
|
49459
49475
|
table: "messages",
|
|
@@ -49692,7 +49708,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49692
49708
|
}
|
|
49693
49709
|
}), "contextRecordsOver");
|
|
49694
49710
|
|
|
49695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
49696
49712
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
49697
49713
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
49698
49714
|
var DryRun = class extends Error {
|
|
@@ -49769,7 +49785,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
49769
49785
|
}
|
|
49770
49786
|
}, "removeCrmContacts");
|
|
49771
49787
|
|
|
49772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
49773
49789
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
49774
49790
|
var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
49775
49791
|
const { database, now: now2 } = context;
|
|
@@ -49816,7 +49832,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49816
49832
|
return { save: save2, pending, handled };
|
|
49817
49833
|
}, "crmStageEntriesOver");
|
|
49818
49834
|
|
|
49819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
49820
49836
|
var PENDING = "crm:pending-relations";
|
|
49821
49837
|
var PENDING_DAYS = 30;
|
|
49822
49838
|
var PENDING_MOST = 5e3;
|
|
@@ -50325,10 +50341,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
50325
50341
|
};
|
|
50326
50342
|
}, "crmCopiesOver");
|
|
50327
50343
|
|
|
50328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50329
50345
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
50330
50346
|
|
|
50331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
50332
50348
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
50333
50349
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
50334
50350
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -50342,7 +50358,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
50342
50358
|
}, "callbackDataOf");
|
|
50343
50359
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
50344
50360
|
|
|
50345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50346
50362
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
50347
50363
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
50348
50364
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -50441,7 +50457,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
50441
50457
|
};
|
|
50442
50458
|
}, "decisionRequestStoreOver");
|
|
50443
50459
|
|
|
50444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
50445
50461
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
50446
50462
|
var DAY5 = 864e5;
|
|
50447
50463
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -50802,7 +50818,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
50802
50818
|
};
|
|
50803
50819
|
}, "meetingListingOver");
|
|
50804
50820
|
|
|
50805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
50806
50822
|
var DOCUMENT_KINDS = [
|
|
50807
50823
|
"transcript",
|
|
50808
50824
|
"doc",
|
|
@@ -51039,7 +51055,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51039
51055
|
};
|
|
51040
51056
|
}, "documentListingOver");
|
|
51041
51057
|
|
|
51042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
51043
51059
|
var NOTE_FIELDS = [
|
|
51044
51060
|
"text",
|
|
51045
51061
|
"exact",
|
|
@@ -51480,7 +51496,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
51480
51496
|
};
|
|
51481
51497
|
}, "noteSearchOver");
|
|
51482
51498
|
|
|
51483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
51484
51500
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
51485
51501
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
51486
51502
|
var EVENT_CORPUS = {
|
|
@@ -51612,7 +51628,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
51612
51628
|
};
|
|
51613
51629
|
}, "eventSearchOver");
|
|
51614
51630
|
|
|
51615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
51616
51632
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
51617
51633
|
try {
|
|
51618
51634
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -51624,7 +51640,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
51624
51640
|
}
|
|
51625
51641
|
}, "calendarMoment");
|
|
51626
51642
|
|
|
51627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
51628
51644
|
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";
|
|
51629
51645
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
51630
51646
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -51847,7 +51863,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
51847
51863
|
};
|
|
51848
51864
|
}, "factsStoreOver");
|
|
51849
51865
|
|
|
51850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
51851
51867
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
51852
51868
|
throw new CliError("validation_error", message3);
|
|
51853
51869
|
}, "invalid");
|
|
@@ -52015,7 +52031,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
52015
52031
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
52016
52032
|
}, "findingsCoreOver");
|
|
52017
52033
|
|
|
52018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
52019
52035
|
var stale = /* @__PURE__ */ __name(() => {
|
|
52020
52036
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
52021
52037
|
reason: "evidence-findings.stale"
|
|
@@ -52279,7 +52295,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52279
52295
|
};
|
|
52280
52296
|
}, "evidenceFindingsStoreOver");
|
|
52281
52297
|
|
|
52282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
52283
52299
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
52284
52300
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
52285
52301
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -52333,7 +52349,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
52333
52349
|
}, "forPerson")
|
|
52334
52350
|
}), "involvementStoreOver");
|
|
52335
52351
|
|
|
52336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
52337
52353
|
var LABELLED = {
|
|
52338
52354
|
note: "note",
|
|
52339
52355
|
document: "document",
|
|
@@ -52345,7 +52361,7 @@ var LABELLED = {
|
|
|
52345
52361
|
account: "folder"
|
|
52346
52362
|
};
|
|
52347
52363
|
|
|
52348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
52349
52365
|
import { createHash as createHash14 } from "node:crypto";
|
|
52350
52366
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
52351
52367
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -52431,7 +52447,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
52431
52447
|
};
|
|
52432
52448
|
}, "meetingProjectsStoreOver");
|
|
52433
52449
|
|
|
52434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
52435
52451
|
var ORGANIZATIONS_QUERY = {
|
|
52436
52452
|
entity: "organization",
|
|
52437
52453
|
backend: "sql",
|
|
@@ -52472,7 +52488,7 @@ var REMINDERS_QUERY = {
|
|
|
52472
52488
|
})
|
|
52473
52489
|
};
|
|
52474
52490
|
|
|
52475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
52476
52492
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
52477
52493
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
52478
52494
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -52493,7 +52509,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
52493
52509
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
52494
52510
|
}, "categorySql");
|
|
52495
52511
|
|
|
52496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
52497
52513
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
52498
52514
|
id: String(row2.id),
|
|
52499
52515
|
ref: `organization:${row2.id}`,
|
|
@@ -52538,7 +52554,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
52538
52554
|
}), "setOwnOrganization")
|
|
52539
52555
|
}), "organizationsStoreOver");
|
|
52540
52556
|
|
|
52541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
52542
52558
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
52543
52559
|
var ACCOUNT_ENDS = [
|
|
52544
52560
|
["deal", "deals"],
|
|
@@ -52689,13 +52705,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
52689
52705
|
__name(proposalItem, "proposalItem");
|
|
52690
52706
|
}, "relationListOver");
|
|
52691
52707
|
|
|
52692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
52693
52709
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
52694
52710
|
...relationListOver(context),
|
|
52695
52711
|
...relationRolesOver(context)
|
|
52696
52712
|
}), "relationReadsOver");
|
|
52697
52713
|
|
|
52698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
52699
52715
|
var TABLES5 = { memory: "memories", fact: "facts" };
|
|
52700
52716
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
52701
52717
|
var DEFAULT_LIMIT = 500;
|
|
@@ -52938,16 +52954,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52938
52954
|
};
|
|
52939
52955
|
}, "sourceReviewStoreOver");
|
|
52940
52956
|
|
|
52941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
52942
52958
|
import { createHash as createHash17 } from "node:crypto";
|
|
52943
52959
|
|
|
52944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
52945
52961
|
import { createHash as createHash16 } from "node:crypto";
|
|
52946
52962
|
|
|
52947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
52948
52964
|
import { createHash as createHash15 } from "node:crypto";
|
|
52949
52965
|
|
|
52950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
52951
52967
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
52952
52968
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
52953
52969
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -52998,7 +53014,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
52998
53014
|
return input;
|
|
52999
53015
|
}, "consolidationApplyInput");
|
|
53000
53016
|
|
|
53001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53002
53018
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
53003
53019
|
id: String(row2.id),
|
|
53004
53020
|
sourceId: String(row2.source_id),
|
|
@@ -53073,7 +53089,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
53073
53089
|
}, { beforeCommit: check3 });
|
|
53074
53090
|
}, "applyTagConsolidation");
|
|
53075
53091
|
|
|
53076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
53077
53093
|
var selections = [
|
|
53078
53094
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
53079
53095
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -53217,7 +53233,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
53217
53233
|
};
|
|
53218
53234
|
}, "previewRows");
|
|
53219
53235
|
|
|
53220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
53221
53237
|
var kinds = ["project", "tag", "topic"];
|
|
53222
53238
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
53223
53239
|
if (signal?.aborted)
|
|
@@ -53481,7 +53497,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53481
53497
|
};
|
|
53482
53498
|
}, "vocabularyStoreOver");
|
|
53483
53499
|
|
|
53484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
53485
53501
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
53486
53502
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
53487
53503
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -54032,7 +54048,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
54032
54048
|
return key2.padEnd(3, "X");
|
|
54033
54049
|
}, "projectKey");
|
|
54034
54050
|
|
|
54035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
54036
54052
|
var DAY6 = 864e5;
|
|
54037
54053
|
var SETTING5 = "logs_pruned_at";
|
|
54038
54054
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY6, botUpdatePayloadsMs: 30 * DAY6 };
|
|
@@ -54059,7 +54075,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54059
54075
|
};
|
|
54060
54076
|
}, "logPruner");
|
|
54061
54077
|
|
|
54062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
54063
54079
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
54064
54080
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
54065
54081
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -54435,7 +54451,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
54435
54451
|
}, "checkMailFindings");
|
|
54436
54452
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
54437
54453
|
|
|
54438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
54439
54455
|
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";
|
|
54440
54456
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
54441
54457
|
const { database, now: now2 } = context;
|
|
@@ -54650,7 +54666,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54650
54666
|
};
|
|
54651
54667
|
}, "ordersStoreOver");
|
|
54652
54668
|
|
|
54653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
54654
54670
|
var MAIL_EDITS = {
|
|
54655
54671
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
54656
54672
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -55139,7 +55155,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
55139
55155
|
};
|
|
55140
55156
|
}, "mailFindingsStoreOver");
|
|
55141
55157
|
|
|
55142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
55143
55159
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
55144
55160
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
55145
55161
|
reason: "meeting-findings.stale"
|
|
@@ -55352,7 +55368,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55352
55368
|
};
|
|
55353
55369
|
}, "meetingFindingsStoreOver");
|
|
55354
55370
|
|
|
55355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
55356
55372
|
var RANK_BATCH = 512;
|
|
55357
55373
|
var LIVE5 = "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";
|
|
55358
55374
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -55623,7 +55639,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
55623
55639
|
}
|
|
55624
55640
|
}), "meetingVectorsOver");
|
|
55625
55641
|
|
|
55626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
55627
55643
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
55628
55644
|
var TEXTS = {
|
|
55629
55645
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -55724,7 +55740,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55724
55740
|
};
|
|
55725
55741
|
}, "sourceMentionStoreOver");
|
|
55726
55742
|
|
|
55727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
55728
55744
|
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";
|
|
55729
55745
|
var MAX_SPLITS = 100;
|
|
55730
55746
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -55958,11 +55974,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55958
55974
|
};
|
|
55959
55975
|
}, "transactionsStoreOver");
|
|
55960
55976
|
|
|
55961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
55962
55978
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
55963
55979
|
import { dirname as dirname2 } from "node:path";
|
|
55964
55980
|
|
|
55965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
55966
55982
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
55967
55983
|
var CLIENTS_SETTING = "clients";
|
|
55968
55984
|
var coreVersion = (() => {
|
|
@@ -56023,7 +56039,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
56023
56039
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
56024
56040
|
}, "refusalAdvice");
|
|
56025
56041
|
|
|
56026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
56027
56043
|
var GENERATED = [
|
|
56028
56044
|
{
|
|
56029
56045
|
"name": "20261010184427_initial",
|
|
@@ -57377,7 +57393,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
57377
57393
|
}
|
|
57378
57394
|
];
|
|
57379
57395
|
|
|
57380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
57381
57397
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
57382
57398
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
57383
57399
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -57610,7 +57626,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
57610
57626
|
return { ...result, foreignKeyViolations };
|
|
57611
57627
|
}, "rollBack");
|
|
57612
57628
|
|
|
57613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
57614
57630
|
var V31_TABLES = [
|
|
57615
57631
|
"accounts",
|
|
57616
57632
|
"account_identities",
|
|
@@ -57775,7 +57791,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
57775
57791
|
return migrations;
|
|
57776
57792
|
}, "generatedMigrations");
|
|
57777
57793
|
|
|
57778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
57779
57795
|
var MIGRATIONS = generatedMigrations();
|
|
57780
57796
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
57781
57797
|
version INTEGER PRIMARY KEY,
|
|
@@ -57872,7 +57888,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
57872
57888
|
}
|
|
57873
57889
|
}, "migrate");
|
|
57874
57890
|
|
|
57875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
57876
57892
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
57877
57893
|
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 ?");
|
|
57878
57894
|
if (pending.get(0, 1) === void 0)
|
|
@@ -57894,7 +57910,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
57894
57910
|
}
|
|
57895
57911
|
}, "fillJoinKeys");
|
|
57896
57912
|
|
|
57897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
57898
57914
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
57899
57915
|
refuseOwnerStoreInTests(path);
|
|
57900
57916
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -57908,8 +57924,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
57908
57924
|
}, "openSqlite");
|
|
57909
57925
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57910
57926
|
quietSqliteWarning();
|
|
57911
|
-
const { drizzle } = await import("./node-
|
|
57912
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
57927
|
+
const { drizzle } = await import("./node-IEVT2FSJ.js");
|
|
57928
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-O4C6IWSM.js");
|
|
57913
57929
|
const client = await nodeClient(path, { readOnly });
|
|
57914
57930
|
try {
|
|
57915
57931
|
if (!readOnly)
|
|
@@ -57923,8 +57939,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57923
57939
|
}
|
|
57924
57940
|
}, "openUnderNode");
|
|
57925
57941
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
57926
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
57927
|
-
const { drizzle } = await import("./bun-
|
|
57942
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-X2YZPHDS.js");
|
|
57943
|
+
const { drizzle } = await import("./bun-V5QLYBZU.js");
|
|
57928
57944
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
57929
57945
|
try {
|
|
57930
57946
|
if (!readOnly)
|
|
@@ -57938,7 +57954,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
57938
57954
|
}
|
|
57939
57955
|
}, "openUnderBun");
|
|
57940
57956
|
|
|
57941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
57942
57958
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
57943
57959
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
57944
57960
|
try {
|
|
@@ -58006,7 +58022,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
58006
58022
|
});
|
|
58007
58023
|
}, "movePaymentFacts");
|
|
58008
58024
|
|
|
58009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
58010
58026
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
58011
58027
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
58012
58028
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -58024,7 +58040,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
58024
58040
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
58025
58041
|
}, "assertReadCompatible");
|
|
58026
58042
|
|
|
58027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
58028
58044
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
58029
58045
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
58030
58046
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -58070,7 +58086,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
58070
58086
|
});
|
|
58071
58087
|
}, "moveSuggestedLinks");
|
|
58072
58088
|
|
|
58073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
58074
58090
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
58075
58091
|
var TEST_PROVIDER = "chat";
|
|
58076
58092
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -58091,7 +58107,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
58091
58107
|
}
|
|
58092
58108
|
}, "purgeTestAccounts");
|
|
58093
58109
|
|
|
58094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
58095
58111
|
var BACKFILL_ON_OPEN = 5e3;
|
|
58096
58112
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
58097
58113
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -58203,7 +58219,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
58203
58219
|
}
|
|
58204
58220
|
}, "openStoreContext");
|
|
58205
58221
|
|
|
58206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
58207
58223
|
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";
|
|
58208
58224
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
58209
58225
|
const { database, now: now2 } = context;
|
|
@@ -58311,13 +58327,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58311
58327
|
};
|
|
58312
58328
|
}, "productsStoreOver");
|
|
58313
58329
|
|
|
58314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
58315
58331
|
import { createHash as createHash19 } from "node:crypto";
|
|
58316
58332
|
|
|
58317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
58318
58334
|
import { createHash as createHash18 } from "node:crypto";
|
|
58319
58335
|
|
|
58320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
58321
58337
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58322
58338
|
var ref = text5(2048);
|
|
58323
58339
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58387,7 +58403,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
58387
58403
|
}))
|
|
58388
58404
|
});
|
|
58389
58405
|
|
|
58390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
58391
58407
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
58392
58408
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
58393
58409
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -58520,7 +58536,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58520
58536
|
return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
58521
58537
|
}, "projectAnnotationsFingerprint");
|
|
58522
58538
|
|
|
58523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
58524
58540
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
58525
58541
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
58526
58542
|
var targetSchema = strictObject({
|
|
@@ -58627,7 +58643,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
58627
58643
|
}, "planBoundProjectAnnotations");
|
|
58628
58644
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
58629
58645
|
|
|
58630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
58631
58647
|
import { createHash as createHash20 } from "node:crypto";
|
|
58632
58648
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58633
58649
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -58721,7 +58737,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
58721
58737
|
})).digest("hex");
|
|
58722
58738
|
}, "projectAnnotationSnapshotFingerprint");
|
|
58723
58739
|
|
|
58724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
58725
58741
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
58726
58742
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
58727
58743
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -58738,7 +58754,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
58738
58754
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
58739
58755
|
}, "projectAnnotationRequest");
|
|
58740
58756
|
|
|
58741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
58742
58758
|
var SnapshotBudget = class {
|
|
58743
58759
|
static {
|
|
58744
58760
|
__name(this, "SnapshotBudget");
|
|
@@ -58764,13 +58780,13 @@ var SnapshotBudget = class {
|
|
|
58764
58780
|
}
|
|
58765
58781
|
};
|
|
58766
58782
|
|
|
58767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
58768
58784
|
import { createHash as createHash22 } from "node:crypto";
|
|
58769
58785
|
|
|
58770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
58771
58787
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
58772
58788
|
|
|
58773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
58774
58790
|
import { createHash as createHash21 } from "node:crypto";
|
|
58775
58791
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
58776
58792
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -58913,7 +58929,7 @@ var ProjectSnapshotSources = class {
|
|
|
58913
58929
|
}
|
|
58914
58930
|
};
|
|
58915
58931
|
|
|
58916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
58917
58933
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
58918
58934
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
58919
58935
|
}, "unsupported");
|
|
@@ -59091,7 +59107,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
59091
59107
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
59092
59108
|
}), "projectAnnotationSnapshot");
|
|
59093
59109
|
|
|
59094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59095
59111
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
59096
59112
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
59097
59113
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -59153,7 +59169,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
59153
59169
|
};
|
|
59154
59170
|
}), "previewAnnotationSnapshot");
|
|
59155
59171
|
|
|
59156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
59157
59173
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
59158
59174
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
59159
59175
|
if (link3.kind === "evidence" && to)
|
|
@@ -59220,7 +59236,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
59220
59236
|
return mappings;
|
|
59221
59237
|
}, "restoreAnnotationRecords");
|
|
59222
59238
|
|
|
59223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
59224
59240
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
59225
59241
|
async preview(request) {
|
|
59226
59242
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -59250,7 +59266,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
59250
59266
|
}
|
|
59251
59267
|
}), "projectAnnotationStoreOver");
|
|
59252
59268
|
|
|
59253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
59254
59270
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
59255
59271
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
59256
59272
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
@@ -59321,7 +59337,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
59321
59337
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
59322
59338
|
}, "recordRelationsOver");
|
|
59323
59339
|
|
|
59324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
59325
59341
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
59326
59342
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
59327
59343
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -59375,7 +59391,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
59375
59391
|
return { pointedAt, remap };
|
|
59376
59392
|
}, "recordRemapOver");
|
|
59377
59393
|
|
|
59378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
59379
59395
|
var runs = 0;
|
|
59380
59396
|
var PAGE = 500;
|
|
59381
59397
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -59588,7 +59604,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
59588
59604
|
return pointerOf("records", index2, "fields", key2);
|
|
59589
59605
|
}, "waitingPointer");
|
|
59590
59606
|
|
|
59591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
59592
59608
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
59593
59609
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
59594
59610
|
var ORG_EMAIL = "org-email";
|
|
@@ -59754,7 +59770,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
59754
59770
|
]);
|
|
59755
59771
|
}, "renameMade");
|
|
59756
59772
|
|
|
59757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
59758
59774
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
59759
59775
|
name: given(fields4, "name"),
|
|
59760
59776
|
unit: given(fields4, "unit"),
|
|
@@ -59877,7 +59893,7 @@ var DIRECT_PROJECTORS = {
|
|
|
59877
59893
|
lead: dealProjector("lead")
|
|
59878
59894
|
};
|
|
59879
59895
|
|
|
59880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
59881
59897
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
59882
59898
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
59883
59899
|
const text7 = String(fields4.text ?? "");
|
|
@@ -59946,7 +59962,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
59946
59962
|
}
|
|
59947
59963
|
};
|
|
59948
59964
|
|
|
59949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
59950
59966
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
59951
59967
|
const importer = authorActor(context, IMPORTER).actor;
|
|
59952
59968
|
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;
|
|
@@ -60156,7 +60172,7 @@ var MONEY_PROJECTORS = {
|
|
|
60156
60172
|
}
|
|
60157
60173
|
};
|
|
60158
60174
|
|
|
60159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
60160
60176
|
var CALLS_CALENDAR = "calls";
|
|
60161
60177
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
60162
60178
|
if (!isImportedProvider(source2.provider))
|
|
@@ -60331,7 +60347,7 @@ var PHONE_PROJECTORS = {
|
|
|
60331
60347
|
}
|
|
60332
60348
|
};
|
|
60333
60349
|
|
|
60334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
60335
60351
|
var RECORD_PROJECTORS = {
|
|
60336
60352
|
...MONEY_PROJECTORS,
|
|
60337
60353
|
...DIRECT_PROJECTORS,
|
|
@@ -60342,7 +60358,7 @@ var RECORD_PROJECTORS = {
|
|
|
60342
60358
|
project: null
|
|
60343
60359
|
};
|
|
60344
60360
|
|
|
60345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
60346
60362
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
60347
60363
|
const sql2 = /* @__PURE__ */ __name((text7) => database.prepare(text7), "sql");
|
|
60348
60364
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -60404,7 +60420,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
60404
60420
|
return { settle, checkShares };
|
|
60405
60421
|
}, "recordSettlingOver");
|
|
60406
60422
|
|
|
60407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
60408
60424
|
import { createHash as createHash23 } from "node:crypto";
|
|
60409
60425
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
60410
60426
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -60420,7 +60436,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60420
60436
|
return { stamp, untouched };
|
|
60421
60437
|
}, "importStampsOver");
|
|
60422
60438
|
|
|
60423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
60424
60440
|
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";
|
|
60425
60441
|
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";
|
|
60426
60442
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -60657,7 +60673,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60657
60673
|
};
|
|
60658
60674
|
}, "subscriptionsStoreOver");
|
|
60659
60675
|
|
|
60660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
60661
60677
|
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";
|
|
60662
60678
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
60663
60679
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -60782,7 +60798,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
60782
60798
|
};
|
|
60783
60799
|
}, "walletsStoreOver");
|
|
60784
60800
|
|
|
60785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
60786
60802
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
60787
60803
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
60788
60804
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -61041,7 +61057,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
61041
61057
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
61042
61058
|
}, "recordWritesOver");
|
|
61043
61059
|
|
|
61044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
61045
61061
|
var LIMIT = 1e3;
|
|
61046
61062
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
61047
61063
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -61265,7 +61281,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61265
61281
|
};
|
|
61266
61282
|
}, "recordStoreOver");
|
|
61267
61283
|
|
|
61268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
61269
61285
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
61270
61286
|
key: row2.key,
|
|
61271
61287
|
channel: row2.channel,
|
|
@@ -61320,7 +61336,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
61320
61336
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
61321
61337
|
}, "storedTemplateBodies");
|
|
61322
61338
|
|
|
61323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
61324
61340
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
61325
61341
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
61326
61342
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -61355,7 +61371,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
61355
61371
|
return proxy;
|
|
61356
61372
|
}, "storeErrors");
|
|
61357
61373
|
|
|
61358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
61359
61375
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
61360
61376
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
61361
61377
|
let merged2 = { from: from2, to };
|
|
@@ -61368,7 +61384,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
61368
61384
|
}, "markRange");
|
|
61369
61385
|
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");
|
|
61370
61386
|
|
|
61371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
61372
61388
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
61373
61389
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
61374
61390
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -61389,7 +61405,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
61389
61405
|
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);
|
|
61390
61406
|
}, "setTaskAnalysisMark");
|
|
61391
61407
|
|
|
61392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
61393
61409
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
61394
61410
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
61395
61411
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -61399,7 +61415,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
61399
61415
|
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);
|
|
61400
61416
|
}, "setTaskRulesStop");
|
|
61401
61417
|
|
|
61402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
61403
61419
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
61404
61420
|
const { database } = context;
|
|
61405
61421
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -61458,7 +61474,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61458
61474
|
};
|
|
61459
61475
|
}, "syncStoreOver");
|
|
61460
61476
|
|
|
61461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
61462
61478
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
61463
61479
|
const { database } = context;
|
|
61464
61480
|
return {
|
|
@@ -61480,7 +61496,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61480
61496
|
};
|
|
61481
61497
|
}, "tagsStoreOver");
|
|
61482
61498
|
|
|
61483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
61484
61500
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
61485
61501
|
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
|
|
61486
61502
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -61607,7 +61623,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
61607
61623
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
61608
61624
|
}, "savePictureChunks");
|
|
61609
61625
|
|
|
61610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
61611
61627
|
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,
|
|
61612
61628
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
61613
61629
|
FROM messages m
|
|
@@ -61696,7 +61712,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
61696
61712
|
return plain2(best(found2));
|
|
61697
61713
|
}, "nearestMessages");
|
|
61698
61714
|
|
|
61699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
61700
61716
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
61701
61717
|
const { database } = context;
|
|
61702
61718
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -61955,7 +61971,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
61955
61971
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
61956
61972
|
}), "vectorsStoreOver");
|
|
61957
61973
|
|
|
61958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
61959
61975
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
61960
61976
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
61961
61977
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -62043,10 +62059,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
62043
62059
|
}
|
|
62044
62060
|
}, "lastBackup");
|
|
62045
62061
|
|
|
62046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
62047
62063
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
62048
62064
|
|
|
62049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
62050
62066
|
var COUNTED_TABLES = [
|
|
62051
62067
|
"accounts",
|
|
62052
62068
|
"chats",
|
|
@@ -62131,7 +62147,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
62131
62147
|
};
|
|
62132
62148
|
}, "storeContents");
|
|
62133
62149
|
|
|
62134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
62135
62151
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
62136
62152
|
const context = await openStoreContext(options);
|
|
62137
62153
|
try {
|