@wirecat/zoom-cli 0.79.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/answer-output.d.ts +1 -1
- package/dist/answer-output.js +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-LDSHUH5W.js → all-profiles-5GOKWOT4.js} +6 -6
- package/dist/bundle/answer-policy-7PYXHK2I.js +122 -0
- package/dist/bundle/{anthropic-UH3QWA3F.js → anthropic-NHXMOFYS.js} +2 -2
- package/dist/bundle/{app-server-LFANTLAJ.js → app-server-HFW5Z5PI.js} +58 -58
- package/dist/bundle/{bun-M3J2QTR3.js → bun-M5IGY2TG.js} +2 -2
- package/dist/bundle/{bun-sqlite-NYP5UH23.js → bun-sqlite-MTP5JJQ2.js} +3 -3
- package/dist/bundle/{chunk-OLMEJNL4.js → chunk-2P6MQH4V.js} +5 -5
- package/dist/bundle/{chunk-4BQN5IFQ.js → chunk-2XZ2YKW4.js} +3 -3
- package/dist/bundle/{chunk-PP6SZLCY.js → chunk-3AOESMW6.js} +27 -17
- package/dist/bundle/{chunk-3AFZ6Q5N.js → chunk-3BTRJYIT.js} +9 -9
- package/dist/bundle/{chunk-W7HM2VGO.js → chunk-3UONR5HW.js} +1 -1
- package/dist/bundle/{chunk-2N57GL4L.js → chunk-3Z7CFQTI.js} +1 -1
- package/dist/bundle/{chunk-X2M6NIQG.js → chunk-475P3LWG.js} +1 -1
- package/dist/bundle/{chunk-2PUMYKGV.js → chunk-4F7Q5CET.js} +15 -15
- package/dist/bundle/{chunk-HZRQLAHO.js → chunk-4OAR7BGU.js} +1 -1
- package/dist/bundle/{chunk-FO5UNFFN.js → chunk-5CJ6AAUI.js} +2 -2
- package/dist/bundle/{chunk-65DOVVHQ.js → chunk-5K54M6RD.js} +1 -1
- package/dist/bundle/{chunk-E5WLE7BM.js → chunk-5QXQIZJY.js} +1 -1
- package/dist/bundle/{chunk-I6VDTYML.js → chunk-5XO2AY6D.js} +6 -6
- package/dist/bundle/{chunk-XFMVDQ6J.js → chunk-6CDMGT6Q.js} +1 -1
- package/dist/bundle/{chunk-ND7TBQKO.js → chunk-6I4C4ZFT.js} +1 -1
- package/dist/bundle/{chunk-Y4UDPQ3L.js → chunk-6LY4LBSD.js} +5 -5
- package/dist/bundle/{chunk-ZKVYV25H.js → chunk-6MDL2LZA.js} +5 -5
- package/dist/bundle/{chunk-NQMHYLZO.js → chunk-6PIXP5IH.js} +18 -18
- package/dist/bundle/{chunk-DFCHHR5M.js → chunk-6QCBTBDA.js} +1 -1
- package/dist/bundle/{chunk-SGFNQFP4.js → chunk-75JW7X2W.js} +29 -29
- package/dist/bundle/{chunk-W5HRTC6X.js → chunk-7U5X37TE.js} +5 -5
- package/dist/bundle/{chunk-WE4UFASG.js → chunk-A3TUG2DP.js} +1 -1
- package/dist/bundle/{chunk-4T3J4NCF.js → chunk-ARL2TTPZ.js} +7 -7
- package/dist/bundle/{chunk-YCW422X7.js → chunk-BIKHHFD2.js} +414 -358
- package/dist/bundle/{chunk-3QPAD6YI.js → chunk-BPSURRAD.js} +5 -5
- package/dist/bundle/{chunk-M4RXPZ6K.js → chunk-BRMV33MO.js} +2 -2
- package/dist/bundle/{chunk-2LJARGNG.js → chunk-BW5JEOBE.js} +10 -10
- package/dist/bundle/{chunk-GTUBQQU2.js → chunk-CHEHK6IW.js} +55 -55
- package/dist/bundle/{chunk-5KEOCHBZ.js → chunk-CW6CPQHI.js} +3 -3
- package/dist/bundle/{chunk-BTFPDS52.js → chunk-CWCDCNXA.js} +5 -5
- package/dist/bundle/{chunk-M5FW654Z.js → chunk-D4HKTC2T.js} +1 -1
- package/dist/bundle/{chunk-2OTETB4A.js → chunk-DYRISFHZ.js} +4 -4
- package/dist/bundle/{chunk-2IPIBDXI.js → chunk-DZ6H3YJH.js} +10 -10
- package/dist/bundle/{chunk-XDBGGOE2.js → chunk-E3JVLVVB.js} +26 -24
- package/dist/bundle/{chunk-XAOSZGTD.js → chunk-EI37UXDR.js} +1 -1
- package/dist/bundle/{chunk-YOBTKYIX.js → chunk-EMYRUJCV.js} +34 -11
- package/dist/bundle/{chunk-HOXBHGP2.js → chunk-EPIA2UUM.js} +9 -9
- package/dist/bundle/{chunk-JJGUHWLB.js → chunk-FSLR2YGR.js} +6 -6
- package/dist/bundle/{chunk-7DTWT7BN.js → chunk-G5VH4WUF.js} +1 -1
- package/dist/bundle/{chunk-AWLZZTPW.js → chunk-GCPO7T2X.js} +2 -2
- package/dist/bundle/{chunk-W656MRJD.js → chunk-GCUOZ2OA.js} +4 -4
- package/dist/bundle/{chunk-2W6QGFHF.js → chunk-GGKEQQME.js} +5 -5
- package/dist/bundle/{chunk-BOVYOUB3.js → chunk-GRYXOSN6.js} +7 -7
- package/dist/bundle/{chunk-XOYMIEAZ.js → chunk-GVKZZT7E.js} +2 -2
- package/dist/bundle/{chunk-UQKVZFIX.js → chunk-HGSBLY6M.js} +11 -11
- package/dist/bundle/{chunk-Y64L7A7E.js → chunk-HH7GR6TN.js} +2 -2
- package/dist/bundle/{chunk-XEIL6VNA.js → chunk-IQWBGMCR.js} +3 -3
- package/dist/bundle/{chunk-TUECY6LV.js → chunk-JGSVWLL2.js} +1 -1
- package/dist/bundle/{chunk-P4WHDL2F.js → chunk-JJX4HKDV.js} +3 -3
- package/dist/bundle/{chunk-QRKSASGP.js → chunk-JXSEH64A.js} +2 -2
- package/dist/bundle/{chunk-LCCVEX4R.js → chunk-K672XJ2P.js} +10 -10
- package/dist/bundle/{chunk-I75KOOUD.js → chunk-L2TURFT6.js} +1 -1
- package/dist/bundle/{chunk-N5O3XVX3.js → chunk-L6FM5RQY.js} +2 -2
- package/dist/bundle/{chunk-RUE3WP7K.js → chunk-M4LAF627.js} +43 -21
- package/dist/bundle/{chunk-J62BQBVG.js → chunk-MH4L5LL6.js} +2 -2
- package/dist/bundle/{chunk-NKFEEY5M.js → chunk-N5YUHN6S.js} +10 -10
- package/dist/bundle/{chunk-PJFVE7UH.js → chunk-NMETTKCV.js} +30 -15
- package/dist/bundle/{chunk-P4MZOAPC.js → chunk-NRVMK5H3.js} +537 -400
- package/dist/bundle/{chunk-2GI63IPV.js → chunk-NXFKZFTC.js} +2 -2
- package/dist/bundle/{chunk-VX6ZSKXM.js → chunk-O4ZBFATF.js} +10 -10
- package/dist/bundle/{chunk-63WT3HCY.js → chunk-OXPHJEJ2.js} +1 -1
- package/dist/bundle/{chunk-RMQ7EALU.js → chunk-P2JTVRGU.js} +16 -16
- package/dist/bundle/{chunk-NI7UYGTF.js → chunk-PKW3TPNP.js} +11 -11
- package/dist/bundle/{chunk-525BI32C.js → chunk-PMO2Z6DQ.js} +2 -2
- package/dist/bundle/{chunk-U7QXC75C.js → chunk-Q5LUGY2V.js} +5 -5
- package/dist/bundle/{chunk-QX3PO5UE.js → chunk-Q6MISDKJ.js} +2 -2
- package/dist/bundle/{chunk-4S7RUA3U.js → chunk-RFXJLG5V.js} +7420 -7177
- package/dist/bundle/{chunk-TP7GDWVF.js → chunk-RT7C3SSJ.js} +1 -1
- package/dist/bundle/{chunk-DQVCCO7G.js → chunk-SUG6YGAF.js} +168 -154
- package/dist/bundle/{chunk-HVQVCGME.js → chunk-TDBVM2SS.js} +1 -1
- package/dist/bundle/{chunk-RJ5JAYNZ.js → chunk-TMYZKDQ7.js} +61 -61
- package/dist/bundle/{chunk-73L5R7AS.js → chunk-TNL3YQ33.js} +1 -1
- package/dist/bundle/{chunk-IIFRJV3A.js → chunk-U5N2PKKM.js} +2 -2
- package/dist/bundle/{chunk-AZB6QXZU.js → chunk-UX4JZMA4.js} +24 -2
- package/dist/bundle/{chunk-W53EJOFQ.js → chunk-VN7TKMOW.js} +1 -1
- package/dist/bundle/{chunk-FMT4CIGN.js → chunk-W2QDYMAM.js} +5 -5
- package/dist/bundle/{chunk-LITZ7KPO.js → chunk-W32HK7KG.js} +2 -2
- package/dist/bundle/{chunk-FKA7DOCK.js → chunk-W3GZ7JUO.js} +1 -1
- package/dist/bundle/{chunk-52ZQ72HL.js → chunk-W7M4JYEE.js} +1 -1
- package/dist/bundle/{chunk-DI5JX4SD.js → chunk-XKLU5KV2.js} +1 -1
- package/dist/bundle/{chunk-TLO62ROR.js → chunk-XL4ND7CZ.js} +23 -23
- package/dist/bundle/{chunk-D264RGZ4.js → chunk-XTCAWNBP.js} +4 -4
- package/dist/bundle/{chunk-OZQSTX4J.js → chunk-YAA2D6RP.js} +3 -3
- package/dist/bundle/{chunk-T6LA664Z.js → chunk-YR5TRWT2.js} +15 -15
- package/dist/bundle/{cli-AVQU63FT.js → cli-QNBYDOKV.js} +69 -67
- package/dist/bundle/command-contract-CT6MV6YG.js +45 -0
- package/dist/bundle/{command-server-entry-JZP7Y73G.js → command-server-entry-WMA4SWJ5.js} +28 -28
- package/dist/bundle/config-ZFQFDEVL.js +109 -0
- package/dist/bundle/{decode-JLAYH7GC.js → decode-7PXUXNIP.js} +2 -2
- package/dist/bundle/{dist-TBLTUL5M.js → dist-TSBH4FOU.js} +15 -15
- package/dist/bundle/{echarts-FVTUDXDU.js → echarts-WIDIUEO6.js} +2 -2
- package/dist/bundle/{embed-CJRENDF7.js → embed-EIRVQF5E.js} +3 -3
- package/dist/bundle/{embedder-RPE67QJD.js → embedder-MXPM6OXK.js} +6 -6
- package/dist/bundle/{first-run-QEASX5J5.js → first-run-K6EHRAIM.js} +6 -6
- package/dist/bundle/first-screen-C6AF4KT4.js +45 -0
- package/dist/bundle/{instructions-HET7BCYK.js → instructions-D5LNE6NJ.js} +1 -1
- package/dist/bundle/{main-QRJ6NRCD.js → main-OHW5Z56X.js} +15 -15
- package/dist/bundle/{meeting-combined-AZXCDXCV.js → meeting-combined-3OKFXZNA.js} +11 -11
- package/dist/bundle/{meeting-model-7HNQ4I3J.js → meeting-model-4XNF725D.js} +8 -8
- package/dist/bundle/{meeting-semantic-4MURLQCA.js → meeting-semantic-FYOVY4S2.js} +2 -2
- package/dist/bundle/{meetings-QFZWKHI4.js → meetings-WI4SXPBJ.js} +1 -1
- package/dist/bundle/{node-CXZIFHZC.js → node-UEWUFR7N.js} +2 -2
- package/dist/bundle/{node-sqlite-CZPYFROO.js → node-sqlite-FJWKJHYU.js} +4 -4
- package/dist/bundle/{oauth-T45MPIZF.js → oauth-KOONTGLW.js} +4 -4
- package/dist/bundle/{open-3AONZFET.js → open-EFYTWUGC.js} +2 -2
- package/dist/bundle/{openai-LHWUXEBO.js → openai-6Y2JRDNY.js} +10 -10
- package/dist/bundle/{process-5RUXWGYS.js → process-U5PLNIDC.js} +1 -1
- package/dist/bundle/{program-2O4YSRWY.js → program-3JICCSA6.js} +81 -80
- package/dist/bundle/{prompt-NDLUFCJV.js → prompt-YPDMSOKC.js} +2 -2
- package/dist/bundle/{recognize-CZOIAJQX.js → recognize-Z2SSWUKH.js} +1 -1
- package/dist/bundle/{remote-O3CE4Q3B.js → remote-R5HMDHOG.js} +6 -6
- package/dist/bundle/{rerank-MZOL746K.js → rerank-6NGBEMQ2.js} +4 -4
- package/dist/bundle/{run-log-GX6LNMWY.js → run-log-LG3TI3WI.js} +67 -67
- package/dist/bundle/{serve-43IBHMFM.js → serve-CU3RMWU7.js} +6 -6
- package/dist/bundle/{server-6LTMPPTO.js → server-SOQSVX2Q.js} +50 -50
- package/dist/bundle/server-X7JYRMKX.js +85 -0
- package/dist/bundle/{services-UIRD5PHE.js → services-LROZ3RDT.js} +42 -42
- package/dist/bundle/{speech-6QVKIJVR.js → speech-AS77HFIF.js} +19 -19
- package/dist/bundle/{sqlite-runtime-PKCIBVHZ.js → sqlite-runtime-U25NS6BK.js} +3 -3
- package/dist/bundle/{state-AC55V3IE.js → state-CPEVKK66.js} +3 -3
- package/dist/bundle/{store-OAGA2ZK3.js → store-6CHRMJM7.js} +20 -18
- package/dist/bundle/{store-QOCYJNKX.js → store-QKHCZOYR.js} +20 -20
- package/dist/bundle/store-connection-FCDVOPWB.js +102 -0
- package/dist/bundle/store-maintenance-command-6HVOAHOZ.js +77 -0
- package/dist/bundle/{tokens-LN442AO6.js → tokens-JBN2OHQB.js} +4 -4
- package/dist/bundle/zm.js +2 -2
- package/dist/bundle/{zoom-app-TOCQ7LB5.js → zoom-app-Q4IKYNG3.js} +2 -2
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +2 -2
- package/dist/program-bindings.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/answer-policy-VJK4ID2F.js +0 -122
- package/dist/bundle/command-contract-MCWBL5VS.js +0 -45
- package/dist/bundle/config-G3C54VH6.js +0 -109
- package/dist/bundle/first-screen-NGCQD3CU.js +0 -45
- package/dist/bundle/server-3E2PJGYK.js +0 -85
- package/dist/bundle/store-connection-PBZMFY56.js +0 -102
- package/dist/bundle/store-maintenance-command-VBCHEOGI.js +0 -77
|
@@ -6,17 +6,18 @@ import {
|
|
|
6
6
|
isPresence,
|
|
7
7
|
parseBytes,
|
|
8
8
|
plainQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Q5LUGY2V.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_STEMMERS,
|
|
12
12
|
DEFAULT_STEMMERS_VERSION,
|
|
13
13
|
LANGUAGES,
|
|
14
14
|
SNOWBALL_VERSION,
|
|
15
|
+
START_LETTERS,
|
|
15
16
|
STEM_SEPARATOR,
|
|
16
17
|
analyzerIdentity,
|
|
17
18
|
createStemmer,
|
|
18
19
|
parseStemmers
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EMYRUJCV.js";
|
|
20
21
|
import {
|
|
21
22
|
AMOUNT_ROLES,
|
|
22
23
|
BARE_INTERNATIONAL_PROVIDERS,
|
|
@@ -67,19 +68,19 @@ import {
|
|
|
67
68
|
typedPhone,
|
|
68
69
|
validCounter,
|
|
69
70
|
wildcardPattern
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-6PIXP5IH.js";
|
|
71
72
|
import {
|
|
72
73
|
QUERY_LIMITS,
|
|
73
74
|
exhausted,
|
|
74
75
|
outOfTime,
|
|
75
76
|
searchError,
|
|
76
77
|
tooWideTerm
|
|
77
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-L2TURFT6.js";
|
|
78
79
|
import {
|
|
79
80
|
NORMALIZER_VERSION,
|
|
80
81
|
fold,
|
|
81
82
|
normalize
|
|
82
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-4OAR7BGU.js";
|
|
83
84
|
import {
|
|
84
85
|
ACCOUNT_GROUPS,
|
|
85
86
|
CATEGORIES,
|
|
@@ -116,13 +117,13 @@ import {
|
|
|
116
117
|
reminder,
|
|
117
118
|
severity,
|
|
118
119
|
sourceOf
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-M4LAF627.js";
|
|
120
121
|
import {
|
|
121
122
|
runEvent
|
|
122
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-2P6MQH4V.js";
|
|
123
124
|
import {
|
|
124
125
|
sqliteCode
|
|
125
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-6I4C4ZFT.js";
|
|
126
127
|
import {
|
|
127
128
|
ADDED_ACCOUNT,
|
|
128
129
|
ADDED_PROVIDER,
|
|
@@ -211,17 +212,17 @@ import {
|
|
|
211
212
|
usableLinkSql,
|
|
212
213
|
useStoredProviders,
|
|
213
214
|
walletLine
|
|
214
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-PKW3TPNP.js";
|
|
215
216
|
import {
|
|
216
217
|
normalizeTag,
|
|
217
218
|
tagOf
|
|
218
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-OXPHJEJ2.js";
|
|
219
220
|
import {
|
|
220
221
|
DEFAULT_TASK_CATEGORIES,
|
|
221
222
|
sharedConfigPath,
|
|
222
223
|
storedTaskCategories,
|
|
223
224
|
taskCategoriesReader
|
|
224
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-6MDL2LZA.js";
|
|
225
226
|
import {
|
|
226
227
|
SQLiteTable,
|
|
227
228
|
TableAliasProxyHandler,
|
|
@@ -246,21 +247,21 @@ import {
|
|
|
246
247
|
sql,
|
|
247
248
|
sqliteTable,
|
|
248
249
|
text
|
|
249
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-RT7C3SSJ.js";
|
|
250
251
|
import {
|
|
251
252
|
refuseOwnerStoreInTests,
|
|
252
253
|
storePath
|
|
253
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-TNL3YQ33.js";
|
|
254
255
|
import {
|
|
255
256
|
quietSqliteWarning,
|
|
256
257
|
storeCapable
|
|
257
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-7U5X37TE.js";
|
|
258
259
|
import {
|
|
259
260
|
PRAGMAS,
|
|
260
261
|
TIME_LIMIT_FUNCTION,
|
|
261
262
|
TimeLimitReached,
|
|
262
263
|
isQueryOnly
|
|
263
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-6QCBTBDA.js";
|
|
264
265
|
import {
|
|
265
266
|
CHAT_MESSAGES_READ,
|
|
266
267
|
FACT_TYPES,
|
|
@@ -306,7 +307,7 @@ import {
|
|
|
306
307
|
validateMeetingRelatedHistory,
|
|
307
308
|
validateMeetingSeriesHistory,
|
|
308
309
|
validatePayment
|
|
309
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-TMYZKDQ7.js";
|
|
310
311
|
import {
|
|
311
312
|
OPERATORS_BY_TYPE,
|
|
312
313
|
dateRange,
|
|
@@ -10091,7 +10092,7 @@ var require_cjs = __commonJS({
|
|
|
10091
10092
|
}
|
|
10092
10093
|
});
|
|
10093
10094
|
|
|
10094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10095
10096
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10096
10097
|
const methods = whole;
|
|
10097
10098
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10219,7 +10220,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10219
10220
|
};
|
|
10220
10221
|
}, "bindAccount");
|
|
10221
10222
|
|
|
10222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10223
10224
|
var IndexBuilderOn = class {
|
|
10224
10225
|
static {
|
|
10225
10226
|
__name(this, "IndexBuilderOn");
|
|
@@ -10414,7 +10415,7 @@ function alias(table, alias2) {
|
|
|
10414
10415
|
}
|
|
10415
10416
|
__name(alias, "alias");
|
|
10416
10417
|
|
|
10417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10418
10419
|
var ENTITY_TABLES = {
|
|
10419
10420
|
...RECORD_TABLES,
|
|
10420
10421
|
account: "accounts",
|
|
@@ -10453,7 +10454,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10453
10454
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10454
10455
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10455
10456
|
|
|
10456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10457
10458
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10458
10459
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10459
10460
|
var LINK_WEAKNESSES = [
|
|
@@ -10466,7 +10467,7 @@ var LINK_WEAKNESSES = [
|
|
|
10466
10467
|
"not-own-number"
|
|
10467
10468
|
];
|
|
10468
10469
|
|
|
10469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10470
10471
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10471
10472
|
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");
|
|
10472
10473
|
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");
|
|
@@ -10498,7 +10499,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10498
10499
|
}, "samePersons");
|
|
10499
10500
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10500
10501
|
|
|
10501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10502
10503
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10503
10504
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10504
10505
|
const at2 = ref3.indexOf(":");
|
|
@@ -10605,13 +10606,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
10605
10606
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
10606
10607
|
}, "forgetErasedLinks");
|
|
10607
10608
|
|
|
10608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
10609
10610
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
10610
10611
|
|
|
10611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
10612
10613
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
10613
10614
|
|
|
10614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
10615
10616
|
var TASK_CLOSE_KIND = "task_close";
|
|
10616
10617
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
10617
10618
|
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");
|
|
@@ -10659,7 +10660,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
10659
10660
|
}, "assertMayDecide");
|
|
10660
10661
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
10661
10662
|
|
|
10662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
10663
10664
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
10664
10665
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
10665
10666
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -10689,7 +10690,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
10689
10690
|
]);
|
|
10690
10691
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
10691
10692
|
|
|
10692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
10693
10694
|
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 ";
|
|
10694
10695
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
10695
10696
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -10714,10 +10715,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
10714
10715
|
return id2;
|
|
10715
10716
|
}, "organizationOfAddress");
|
|
10716
10717
|
|
|
10717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
10718
10719
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10719
10720
|
|
|
10720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
10721
10722
|
import { existsSync, statSync } from "node:fs";
|
|
10722
10723
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
10723
10724
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -10743,7 +10744,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
10743
10744
|
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" });
|
|
10744
10745
|
}, "checkJournal");
|
|
10745
10746
|
|
|
10746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
10747
10748
|
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;
|
|
10748
10749
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
10749
10750
|
const match = WRITE.exec(sql2);
|
|
@@ -10823,7 +10824,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
10823
10824
|
}, "committedWrites");
|
|
10824
10825
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
10825
10826
|
|
|
10826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
10827
10828
|
var ARMS = [
|
|
10828
10829
|
[
|
|
10829
10830
|
"message",
|
|
@@ -10951,7 +10952,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
10951
10952
|
return recomputed;
|
|
10952
10953
|
}, "drainInvolvementQueue");
|
|
10953
10954
|
|
|
10954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
10955
10956
|
import { domainToUnicode } from "node:url";
|
|
10956
10957
|
|
|
10957
10958
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -20973,7 +20974,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
20973
20974
|
}, "oa");
|
|
20974
20975
|
var na = { parse: O, get: aa, isValid: oa };
|
|
20975
20976
|
|
|
20976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
20977
20978
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
20978
20979
|
var ID = /^[\w-]{10,}$/;
|
|
20979
20980
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21015,7 +21016,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text8) => [...text8.matchAll(L
|
|
|
21015
21016
|
return { url, documentId: googleDocumentId(url) };
|
|
21016
21017
|
}), "googleDocumentLinks");
|
|
21017
21018
|
|
|
21018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21019
21020
|
var BEFORE = [
|
|
21020
21021
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21021
21022
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21275,7 +21276,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
21275
21276
|
return found2.sort((a, b) => a.start - b.start);
|
|
21276
21277
|
}, "findPlaces");
|
|
21277
21278
|
|
|
21278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21279
21280
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21280
21281
|
var MENTION_VERSIONS = {
|
|
21281
21282
|
phone: 1,
|
|
@@ -21451,7 +21452,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
21451
21452
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
21452
21453
|
}, "exactlyOne");
|
|
21453
21454
|
|
|
21454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
21455
21456
|
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";
|
|
21456
21457
|
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";
|
|
21457
21458
|
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";
|
|
@@ -21459,7 +21460,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
21459
21460
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
21460
21461
|
var NAME_WORDS = WORDS.split(" ");
|
|
21461
21462
|
|
|
21462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
21463
21464
|
var LATIN_TO_CYRILLIC = {
|
|
21464
21465
|
shch: "\u0449",
|
|
21465
21466
|
sch: "\u0449",
|
|
@@ -21667,7 +21668,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
21667
21668
|
return found2;
|
|
21668
21669
|
}, "findUnknownNames");
|
|
21669
21670
|
|
|
21670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
21671
21672
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
21672
21673
|
"webpage",
|
|
21673
21674
|
"share",
|
|
@@ -21708,7 +21709,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
21708
21709
|
});
|
|
21709
21710
|
}, "matchDownloads");
|
|
21710
21711
|
|
|
21711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
21712
21713
|
var PRESET_VERSION = 1;
|
|
21713
21714
|
var PRESETS = {
|
|
21714
21715
|
password: {
|
|
@@ -21762,12 +21763,12 @@ var PRESETS = {
|
|
|
21762
21763
|
}
|
|
21763
21764
|
};
|
|
21764
21765
|
|
|
21765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
21766
21767
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
21767
21768
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
21768
21769
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
21769
21770
|
|
|
21770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
21771
21772
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
21772
21773
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
21773
21774
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -21791,7 +21792,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
21791
21792
|
};
|
|
21792
21793
|
}, "linkMatch");
|
|
21793
21794
|
|
|
21794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
21795
21796
|
var SETTING = "phoneCountries";
|
|
21796
21797
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
21797
21798
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -21822,7 +21823,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
21822
21823
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
21823
21824
|
}, "valueMatch");
|
|
21824
21825
|
|
|
21825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
21826
21827
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
21827
21828
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
21828
21829
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -21850,7 +21851,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
21850
21851
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
21851
21852
|
}, "vocabularySimilarity");
|
|
21852
21853
|
|
|
21853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
21854
21855
|
import { createHash } from "node:crypto";
|
|
21855
21856
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
21856
21857
|
try {
|
|
@@ -21916,7 +21917,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
21916
21917
|
});
|
|
21917
21918
|
}, "guardTagCreation");
|
|
21918
21919
|
|
|
21919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
21920
21921
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
21921
21922
|
throw new CliError("validation_error", message3);
|
|
21922
21923
|
}, "invalid");
|
|
@@ -21993,7 +21994,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
21993
21994
|
};
|
|
21994
21995
|
}, "createTagRedirectIndex");
|
|
21995
21996
|
|
|
21996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
21997
21998
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
21998
21999
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
21999
22000
|
if (!row2)
|
|
@@ -22021,7 +22022,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
22021
22022
|
return snapshot2;
|
|
22022
22023
|
}, "tagRedirectSnapshot");
|
|
22023
22024
|
|
|
22024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
22025
22026
|
import { createHash as createHash2 } from "node:crypto";
|
|
22026
22027
|
var TASK_KEY_PREFIXES = {
|
|
22027
22028
|
question: "Q",
|
|
@@ -22049,7 +22050,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22049
22050
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
22050
22051
|
}, "taskAccountOf");
|
|
22051
22052
|
|
|
22052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
22053
22054
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
22054
22055
|
var REFERABLE = {
|
|
22055
22056
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -22213,7 +22214,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22213
22214
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
22214
22215
|
}, "taskIdOf");
|
|
22215
22216
|
|
|
22216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
22217
22218
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
22218
22219
|
if (iso17 === null || iso17 === void 0)
|
|
22219
22220
|
return null;
|
|
@@ -22227,7 +22228,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
22227
22228
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
22228
22229
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
22229
22230
|
|
|
22230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
22231
22232
|
var TAG_KINDS = ["tag", "topic"];
|
|
22232
22233
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
22233
22234
|
var TAG_TYPE = {
|
|
@@ -22430,7 +22431,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
22430
22431
|
return result;
|
|
22431
22432
|
}, "tagsOf");
|
|
22432
22433
|
|
|
22433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
22434
22435
|
var MOST_YO_SPELLINGS = 64;
|
|
22435
22436
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
22436
22437
|
let spellings2 = [""];
|
|
@@ -22452,7 +22453,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
22452
22453
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
22453
22454
|
}).join("")}*`, "anyCaseGlob");
|
|
22454
22455
|
|
|
22455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
22456
22457
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
22457
22458
|
var SPEECH = speech("att");
|
|
22458
22459
|
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");
|
|
@@ -22553,13 +22554,15 @@ var stemmedText = /* @__PURE__ */ __name((node, scope3) => {
|
|
|
22553
22554
|
throw new Error("a stemmed leaf reached the compiler without the store's stemmer");
|
|
22554
22555
|
const text8 = normalize(node.value);
|
|
22555
22556
|
const match = ftsMatch(node);
|
|
22557
|
+
const start = node.operator === "term" && /^[\p{L}\p{N}]+$/u.test(text8) && [...text8].length >= START_LETTERS ? text8 : void 0;
|
|
22556
22558
|
const stems = stemsOf(scope3, node);
|
|
22557
22559
|
const byStems = stems && node.slop !== void 0 ? nearStems(scope3, node, stems) : stems ? bound(`m.id IN (SELECT rowid FROM ${corpus.stems} WHERE ${corpus.stems} MATCH ?)`, `stems : (${stems})`) : void 0;
|
|
22558
22560
|
return always(/[\p{L}\p{N}]/u.test(text8) ? scope3.everywhere(node, {
|
|
22559
22561
|
sql: `m.id IN (SELECT rowid FROM ${corpus.words} WHERE ${corpus.words} MATCH ?)${byStems ? ` OR ${byStems.sql}` : ""}`,
|
|
22560
|
-
params: [`normalized_text : (${match})`, ...byStems?.params ?? []],
|
|
22562
|
+
params: [`normalized_text : (${start ? `${match} *` : match})`, ...byStems?.params ?? []],
|
|
22561
22563
|
exact: true,
|
|
22562
22564
|
fts: match,
|
|
22565
|
+
...start ? { begins: `${match} *` } : {},
|
|
22563
22566
|
...stems ? { stems } : {}
|
|
22564
22567
|
}) : bound("0"));
|
|
22565
22568
|
}, "stemmedText");
|
|
@@ -22938,7 +22941,7 @@ var FIELD_COMPILERS = {
|
|
|
22938
22941
|
subject
|
|
22939
22942
|
};
|
|
22940
22943
|
|
|
22941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
22942
22945
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
22943
22946
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
22944
22947
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -22954,7 +22957,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
22954
22957
|
};
|
|
22955
22958
|
}, "placeOf");
|
|
22956
22959
|
|
|
22957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
22958
22961
|
var DRAIN_ON_WRITE = 500;
|
|
22959
22962
|
var METHOD = "rules";
|
|
22960
22963
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -23120,7 +23123,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
23120
23123
|
return queued.length;
|
|
23121
23124
|
}, "drainMentions");
|
|
23122
23125
|
|
|
23123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
23124
23127
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
23125
23128
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
23126
23129
|
if (!exists2)
|
|
@@ -23128,7 +23131,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
23128
23131
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
23129
23132
|
}, "indexRow");
|
|
23130
23133
|
|
|
23131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
23132
23135
|
var INDEX = "message_stems";
|
|
23133
23136
|
var SETTING2 = "searchStemmers";
|
|
23134
23137
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -23165,6 +23168,10 @@ var stemmersOrigin = /* @__PURE__ */ __name((database) => {
|
|
|
23165
23168
|
return { origin: "owner" };
|
|
23166
23169
|
}
|
|
23167
23170
|
}, "stemmersOrigin");
|
|
23171
|
+
var heldStems = /* @__PURE__ */ __name((database, stems) => {
|
|
23172
|
+
const lookup = database.prepare(`SELECT 1 FROM ${INDEX} WHERE ${INDEX} MATCH ? LIMIT 1`);
|
|
23173
|
+
return new Set(stems.filter((stem) => lookup.get(`stems : "${stem.replaceAll('"', '""')}"`) !== void 0));
|
|
23174
|
+
}, "heldStems");
|
|
23168
23175
|
var stemsState = /* @__PURE__ */ __name((database) => {
|
|
23169
23176
|
const row2 = indexRow(database, INDEX);
|
|
23170
23177
|
if (!row2)
|
|
@@ -23250,7 +23257,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
23250
23257
|
};
|
|
23251
23258
|
}, "stemmerCache");
|
|
23252
23259
|
|
|
23253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
23254
23261
|
var rehearsal = new AsyncLocalStorage();
|
|
23255
23262
|
var SQLITE_BUSY = 5;
|
|
23256
23263
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -23393,7 +23400,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
23393
23400
|
}
|
|
23394
23401
|
}, "read");
|
|
23395
23402
|
|
|
23396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
23397
23404
|
var FOLDED = [
|
|
23398
23405
|
{ table: "tasks", column: "title" },
|
|
23399
23406
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -23430,7 +23437,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
23430
23437
|
return filled;
|
|
23431
23438
|
}, "fillFolded");
|
|
23432
23439
|
|
|
23433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
23434
23441
|
import { createHash as createHash3 } from "node:crypto";
|
|
23435
23442
|
var CHUNK_CHARS = 1200;
|
|
23436
23443
|
var CHUNK_OVERLAP = 150;
|
|
@@ -23535,7 +23542,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
23535
23542
|
return chunks2;
|
|
23536
23543
|
}, "cutChunks");
|
|
23537
23544
|
|
|
23538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
23539
23546
|
var DAY = 864e5;
|
|
23540
23547
|
var CURRENCY = [
|
|
23541
23548
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -23661,7 +23668,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
23661
23668
|
return best?.day ?? null;
|
|
23662
23669
|
}, "dueDayOf");
|
|
23663
23670
|
|
|
23664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
23665
23672
|
var DAY2 = 864e5;
|
|
23666
23673
|
var STOP_WORDS = new Set([
|
|
23667
23674
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -23816,7 +23823,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
23816
23823
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
23817
23824
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
23818
23825
|
|
|
23819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
23820
23827
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
23821
23828
|
coalesce(CASE k.chunkable_type
|
|
23822
23829
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -23958,7 +23965,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
23958
23965
|
}, "dropUnusedVectors");
|
|
23959
23966
|
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");
|
|
23960
23967
|
|
|
23961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
23962
23969
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
23963
23970
|
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
23964
23971
|
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
@@ -24186,12 +24193,64 @@ var unbuiltGroups = /* @__PURE__ */ __name(({ orm }, accountPk2) => orm.all(sql`
|
|
|
24186
24193
|
AND NOT EXISTS (SELECT 1 FROM conversation_state s WHERE s.chat_id = ch.id)
|
|
24187
24194
|
AND EXISTS (SELECT 1 FROM messages m WHERE m.chat_id = ch.id AND m.deleted_at IS NULL)
|
|
24188
24195
|
ORDER BY (SELECT max(m.sent_at) FROM messages m WHERE m.chat_id = ch.id) DESC, ch.external_id`).map(({ id: id2 }) => id2), "unbuiltGroups");
|
|
24189
|
-
var readiness = /* @__PURE__ */ __name((
|
|
24196
|
+
var readiness = /* @__PURE__ */ __name((context, chatKey, model, counted) => {
|
|
24197
|
+
const { orm } = context;
|
|
24190
24198
|
const state = orm.get(sql`SELECT built_at AS builtAt, algorithm_version AS algorithmVersion, current_build AS build
|
|
24191
24199
|
FROM conversation_state WHERE chat_id = ${chatKey}`);
|
|
24192
24200
|
if (!state || state.builtAt === null || state.build === null)
|
|
24193
24201
|
return void 0;
|
|
24194
24202
|
const { builtAt, build } = state;
|
|
24203
|
+
const saved = orm.get(sql`SELECT new_count AS new, edited_count AS edited, deleted_count AS deleted, chunks,
|
|
24204
|
+
embedded_count AS embedded, current, stale FROM conversation_readiness
|
|
24205
|
+
WHERE chat_id = ${chatKey} AND model = ${model}`);
|
|
24206
|
+
const counts = saved ?? countReadiness(context, chatKey, model, builtAt, build);
|
|
24207
|
+
if (!saved)
|
|
24208
|
+
counted.push({ chatKey, counts });
|
|
24209
|
+
return {
|
|
24210
|
+
builtAt,
|
|
24211
|
+
algorithmVersion: state.algorithmVersion,
|
|
24212
|
+
pending: { new: counts.new, edited: counts.edited, deleted: counts.deleted },
|
|
24213
|
+
vectors: {
|
|
24214
|
+
chunks: counts.chunks,
|
|
24215
|
+
embedded: counts.embedded,
|
|
24216
|
+
current: counts.current,
|
|
24217
|
+
stale: counts.stale,
|
|
24218
|
+
missing: counts.chunks - counts.current - counts.stale
|
|
24219
|
+
}
|
|
24220
|
+
};
|
|
24221
|
+
}, "readiness");
|
|
24222
|
+
var dataVersion = /* @__PURE__ */ __name(({ database }) => Number(Object.values(database.prepare("PRAGMA data_version").get() ?? {})[0]), "dataVersion");
|
|
24223
|
+
var saveReadiness = /* @__PURE__ */ __name((context, model, counted, since) => {
|
|
24224
|
+
const { database } = context;
|
|
24225
|
+
if (counted.length === 0 || isQueryOnly(database))
|
|
24226
|
+
return;
|
|
24227
|
+
const timeout = Number(database.prepare("PRAGMA busy_timeout").get()?.timeout ?? 0);
|
|
24228
|
+
database.exec("PRAGMA busy_timeout = 0");
|
|
24229
|
+
try {
|
|
24230
|
+
database.exec("BEGIN IMMEDIATE");
|
|
24231
|
+
} catch (error) {
|
|
24232
|
+
if (isBusy(error))
|
|
24233
|
+
return;
|
|
24234
|
+
throw error;
|
|
24235
|
+
} finally {
|
|
24236
|
+
database.exec(`PRAGMA busy_timeout = ${timeout}`);
|
|
24237
|
+
}
|
|
24238
|
+
try {
|
|
24239
|
+
if (dataVersion(context) === since) {
|
|
24240
|
+
const insert = database.prepare(`INSERT OR REPLACE INTO conversation_readiness
|
|
24241
|
+
(chat_id, model, new_count, edited_count, deleted_count, chunks, embedded_count, current, stale, counted_at)
|
|
24242
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
24243
|
+
const at2 = Date.now();
|
|
24244
|
+
for (const { chatKey, counts: c } of counted)
|
|
24245
|
+
insert.run(chatKey, model, c.new, c.edited, c.deleted, c.chunks, c.embedded, c.current, c.stale, at2);
|
|
24246
|
+
}
|
|
24247
|
+
database.exec("COMMIT");
|
|
24248
|
+
} catch (error) {
|
|
24249
|
+
rollBack(database);
|
|
24250
|
+
throw error;
|
|
24251
|
+
}
|
|
24252
|
+
}, "saveReadiness");
|
|
24253
|
+
var countReadiness = /* @__PURE__ */ __name(({ orm }, chatKey, model, builtAt, build) => {
|
|
24195
24254
|
const member = /* @__PURE__ */ __name((pk) => sql`EXISTS (SELECT 1 FROM conversation_messages cm
|
|
24196
24255
|
JOIN conversations c ON c.id = cm.conversation_id WHERE cm.message_id = ${pk} AND c.build = ${build})`, "member");
|
|
24197
24256
|
const editedSince = /* @__PURE__ */ __name((pk) => sql`EXISTS (SELECT 1 FROM message_revisions r WHERE r.message_id = ${pk} AND r.created_at >= ${builtAt})`, "editedSince");
|
|
@@ -24215,26 +24274,22 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
24215
24274
|
FROM (${currentChunks(chatKey)}) h)
|
|
24216
24275
|
SELECT count(*) AS chunks, sum(vector) AS embedded, sum(vector AND NOT stale) AS current, sum(stale) AS stale
|
|
24217
24276
|
FROM hashes`);
|
|
24218
|
-
const chunks2 = Number(vectors?.chunks ?? 0);
|
|
24219
|
-
const current2 = Number(vectors?.current ?? 0);
|
|
24220
|
-
const stale4 = Number(vectors?.stale ?? 0);
|
|
24221
24277
|
return {
|
|
24222
|
-
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
|
|
24226
|
-
|
|
24227
|
-
|
|
24228
|
-
|
|
24229
|
-
vectors: { chunks: chunks2, embedded: Number(vectors?.embedded ?? 0), current: current2, stale: stale4, missing: chunks2 - current2 - stale4 }
|
|
24278
|
+
new: Number(pending?.new ?? 0),
|
|
24279
|
+
edited: Number(pending?.edited ?? 0),
|
|
24280
|
+
deleted: Number(pending?.deleted ?? 0),
|
|
24281
|
+
chunks: Number(vectors?.chunks ?? 0),
|
|
24282
|
+
embedded: Number(vectors?.embedded ?? 0),
|
|
24283
|
+
current: Number(vectors?.current ?? 0),
|
|
24284
|
+
stale: Number(vectors?.stale ?? 0)
|
|
24230
24285
|
};
|
|
24231
|
-
}, "
|
|
24286
|
+
}, "countReadiness");
|
|
24232
24287
|
var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.map((model) => [
|
|
24233
24288
|
model,
|
|
24234
24289
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
24235
24290
|
])), "vectorCounts");
|
|
24236
24291
|
|
|
24237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
24238
24293
|
var DOCUMENT_PICTURE = "document_picture";
|
|
24239
24294
|
var SCAN_PAGE2 = 5e3;
|
|
24240
24295
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -24297,12 +24352,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
24297
24352
|
}, "nearestPictures")
|
|
24298
24353
|
}), "documentPicturesOver");
|
|
24299
24354
|
|
|
24300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
24301
24356
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
24302
24357
|
|
|
24303
24358
|
${text8}` : text8, "noteIndexText");
|
|
24304
24359
|
|
|
24305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
24306
24361
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
24307
24362
|
var ENRICHMENT_POSITION = 1e6;
|
|
24308
24363
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -24396,7 +24451,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
24396
24451
|
}), "clear")
|
|
24397
24452
|
}), "enrichmentsOver");
|
|
24398
24453
|
|
|
24399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
24400
24455
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
24401
24456
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
24402
24457
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -24472,7 +24527,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
24472
24527
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
24473
24528
|
var bound2 = /* @__PURE__ */ __name(({ sql: text8, params }) => sql.join(text8.split("?").map((part2, at2) => at2 < params.length ? sql`${sql.raw(part2)}${params[at2]}` : sql.raw(part2)), sql``), "bound");
|
|
24474
24529
|
|
|
24475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
24476
24531
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
24477
24532
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
24478
24533
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -24562,7 +24617,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
24562
24617
|
});
|
|
24563
24618
|
}, "linkMeeting");
|
|
24564
24619
|
|
|
24565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
24566
24621
|
var MAX_TITLE = 120;
|
|
24567
24622
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
24568
24623
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -24624,7 +24679,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
24624
24679
|
}
|
|
24625
24680
|
}, "fillFoundTaskTitles");
|
|
24626
24681
|
|
|
24627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
24628
24683
|
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), ''))";
|
|
24629
24684
|
var UNSEARCHED_EVENT_TYPES = [
|
|
24630
24685
|
"working-location",
|
|
@@ -24871,7 +24926,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
24871
24926
|
return true;
|
|
24872
24927
|
}, "resetNoteIndex");
|
|
24873
24928
|
|
|
24874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
24875
24930
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
24876
24931
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
24877
24932
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -24890,7 +24945,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
24890
24945
|
}
|
|
24891
24946
|
}, "resolvePersonLinks");
|
|
24892
24947
|
|
|
24893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
24894
24949
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
24895
24950
|
id: integer("id").primaryKey(),
|
|
24896
24951
|
name: text("name").notNull().unique(),
|
|
@@ -24899,7 +24954,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
24899
24954
|
updatedAt: integer("updated_at").notNull()
|
|
24900
24955
|
});
|
|
24901
24956
|
|
|
24902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
24903
24958
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
24904
24959
|
id: integer("id").primaryKey(),
|
|
24905
24960
|
linkId: integer("link_id").notNull(),
|
|
@@ -24911,7 +24966,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
24911
24966
|
createdAt: integer("created_at").notNull()
|
|
24912
24967
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
24913
24968
|
|
|
24914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
24915
24970
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
24916
24971
|
sourceKey: text("source_key").notNull(),
|
|
24917
24972
|
collection: text("collection").notNull(),
|
|
@@ -24921,13 +24976,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
24921
24976
|
createdAt: integer("created_at").notNull()
|
|
24922
24977
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
24923
24978
|
|
|
24924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
24925
24980
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
24926
24981
|
id: integer("id").notNull(),
|
|
24927
24982
|
indexableType: text("indexable_type").notNull()
|
|
24928
24983
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
24929
24984
|
|
|
24930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
24931
24986
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
24932
24987
|
id: integer("id").primaryKey(),
|
|
24933
24988
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -24947,7 +25002,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
24947
25002
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
24948
25003
|
]);
|
|
24949
25004
|
|
|
24950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
24951
25006
|
var enrichments = sqliteTable("enrichments", {
|
|
24952
25007
|
subjectType: text("subject_type").notNull(),
|
|
24953
25008
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -24959,7 +25014,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
24959
25014
|
createdAt: integer("created_at").notNull()
|
|
24960
25015
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
24961
25016
|
|
|
24962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
24963
25018
|
var templates = sqliteTable("templates", {
|
|
24964
25019
|
key: text("key").notNull(),
|
|
24965
25020
|
channel: text("channel").notNull(),
|
|
@@ -24981,7 +25036,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
24981
25036
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
24982
25037
|
]);
|
|
24983
25038
|
|
|
24984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
24985
25040
|
var links = sqliteTable("links", {
|
|
24986
25041
|
id: integer("id").primaryKey(),
|
|
24987
25042
|
fromType: text("from_type").notNull(),
|
|
@@ -25012,7 +25067,7 @@ var links = sqliteTable("links", {
|
|
|
25012
25067
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
25013
25068
|
]);
|
|
25014
25069
|
|
|
25015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
25016
25071
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
25017
25072
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
25018
25073
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -25038,7 +25093,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
25038
25093
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
25039
25094
|
]);
|
|
25040
25095
|
|
|
25041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
25042
25097
|
var accounts = sqliteTable("accounts", {
|
|
25043
25098
|
id: integer("id").primaryKey(),
|
|
25044
25099
|
provider: text("provider").notNull(),
|
|
@@ -27078,13 +27133,28 @@ var vectorIndexes = sqliteTable("vector_indexes", {
|
|
|
27078
27133
|
var vectorIndexRedo = sqliteTable("vector_index_redo", {
|
|
27079
27134
|
chunkId: integer("chunk_id").notNull()
|
|
27080
27135
|
});
|
|
27136
|
+
var conversationReadiness = sqliteTable("conversation_readiness", {
|
|
27137
|
+
chatId: integer("chat_id").notNull().references(() => chats.id, { onDelete: "cascade" }),
|
|
27138
|
+
model: text("model").notNull(),
|
|
27139
|
+
newCount: integer("new_count").notNull(),
|
|
27140
|
+
editedCount: integer("edited_count").notNull(),
|
|
27141
|
+
deletedCount: integer("deleted_count").notNull(),
|
|
27142
|
+
chunks: integer("chunks").notNull(),
|
|
27143
|
+
embeddedCount: integer("embedded_count").notNull(),
|
|
27144
|
+
current: integer("current").notNull(),
|
|
27145
|
+
stale: integer("stale").notNull(),
|
|
27146
|
+
countedAt: integer("counted_at").notNull()
|
|
27147
|
+
}, (table) => [
|
|
27148
|
+
primaryKey({ columns: [table.chatId, table.model] }),
|
|
27149
|
+
index("conversation_readiness_by_model").on(table.model)
|
|
27150
|
+
]);
|
|
27081
27151
|
var storeSettings = sqliteTable("store_settings", {
|
|
27082
27152
|
key: text("key").primaryKey(),
|
|
27083
27153
|
value: text("value").notNull(),
|
|
27084
27154
|
at: integer("at").notNull()
|
|
27085
27155
|
});
|
|
27086
27156
|
|
|
27087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27088
27158
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
27089
27159
|
if (phones2 === void 0 && emails3 === void 0)
|
|
27090
27160
|
return void 0;
|
|
@@ -27330,7 +27400,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
27330
27400
|
}, "meetingIdentityPk");
|
|
27331
27401
|
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");
|
|
27332
27402
|
|
|
27333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
27334
27404
|
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");
|
|
27335
27405
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
27336
27406
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -27345,7 +27415,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
27345
27415
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
27346
27416
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
27347
27417
|
|
|
27348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
27349
27419
|
var MESSAGE_FIELDS = {
|
|
27350
27420
|
pk: messages.id,
|
|
27351
27421
|
nativeId: messages.externalId,
|
|
@@ -27525,7 +27595,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
27525
27595
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
27526
27596
|
}), "chatActivity");
|
|
27527
27597
|
|
|
27528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
27529
27599
|
var HIT_FIELDS = {
|
|
27530
27600
|
...MESSAGE_FIELDS,
|
|
27531
27601
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -27626,7 +27696,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
27626
27696
|
};
|
|
27627
27697
|
}, "directReplies");
|
|
27628
27698
|
|
|
27629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
27630
27700
|
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");
|
|
27631
27701
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
27632
27702
|
const found2 = identityRow(context, ref3);
|
|
@@ -27839,7 +27909,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
27839
27909
|
}, "mentioning");
|
|
27840
27910
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27841
27911
|
|
|
27842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
27843
27913
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
27844
27914
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
27845
27915
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -27896,7 +27966,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
27896
27966
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
27897
27967
|
}, "proposedBySql");
|
|
27898
27968
|
|
|
27899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
27900
27970
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
27901
27971
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
27902
27972
|
var KEPT = 20;
|
|
@@ -27991,7 +28061,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
27991
28061
|
return scrubbed;
|
|
27992
28062
|
}, "scrubSourceReviews");
|
|
27993
28063
|
|
|
27994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
27995
28065
|
var QUOTE_LIMIT = 500;
|
|
27996
28066
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
27997
28067
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -28270,7 +28340,7 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
28270
28340
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
28271
28341
|
}, "deleteDocumentRow");
|
|
28272
28342
|
|
|
28273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28274
28344
|
var PROFILE_PLACEHOLDER = "<profile>";
|
|
28275
28345
|
var unregistered = /* @__PURE__ */ __name((provider) => `no CLI has registered ${provider} in this store yet; run its CLI once`, "unregistered");
|
|
28276
28346
|
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");
|
|
@@ -28369,7 +28439,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
|
|
|
28369
28439
|
return `${WORDS2[summary.kind]} ${named2}${notes2 === "" ? "" : ` (${notes2})`}`;
|
|
28370
28440
|
}, "refLabel");
|
|
28371
28441
|
|
|
28372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28373
28443
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
28374
28444
|
const unique2 = [...new Set(ids3)];
|
|
28375
28445
|
if (unique2.length === 0)
|
|
@@ -28458,7 +28528,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
28458
28528
|
}, "refEndsOf");
|
|
28459
28529
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
28460
28530
|
|
|
28461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28462
28532
|
var EXCERPT_CHARS = 280;
|
|
28463
28533
|
var TITLE_CHARS = 120;
|
|
28464
28534
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -28882,7 +28952,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
28882
28952
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
28883
28953
|
}), "refsStoreOver");
|
|
28884
28954
|
|
|
28885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
28886
28956
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
28887
28957
|
ref: ref3,
|
|
28888
28958
|
kind: read2.kind,
|
|
@@ -28920,7 +28990,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
28920
28990
|
});
|
|
28921
28991
|
}, "evidenceSourcesOf");
|
|
28922
28992
|
|
|
28923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
28924
28994
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
28925
28995
|
var MAX_TEXT_CHARS = 2e6;
|
|
28926
28996
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -28946,7 +29016,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
28946
29016
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
28947
29017
|
}, "pdfPreviewLimits");
|
|
28948
29018
|
|
|
28949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
28950
29020
|
import { randomBytes } from "node:crypto";
|
|
28951
29021
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
28952
29022
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -28959,7 +29029,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
28959
29029
|
return time3 + random;
|
|
28960
29030
|
}, "ulid");
|
|
28961
29031
|
|
|
28962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
28963
29033
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
28964
29034
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
28965
29035
|
if (!meta && !sections?.length)
|
|
@@ -28980,11 +29050,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
28980
29050
|
return typeof language === "string" && language !== "" ? language : null;
|
|
28981
29051
|
}, "languageOf");
|
|
28982
29052
|
|
|
28983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
28984
29054
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
28985
29055
|
var fileNoteRow = /* @__PURE__ */ __name((database, account, local, path) => database.prepare(local ? `SELECT d.*, f.account_id AS account_id, f.external_id AS external_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM files f JOIN documents d ON d.id = f.document_id WHERE f.account_id = ? AND f.external_id = ? AND ${LIVE3} ORDER BY d.created_at, d.id LIMIT 1` : `SELECT d.*, f.account_id AS account_id, coalesce(f.external_updated_at, d.external_updated_at) AS external_updated_at FROM documents d JOIN files f ON f.document_id = d.id AND f.account_id = d.account_id WHERE d.account_id = ? AND d.external_id = ? AND ${LIVE3} LIMIT 1`).get(account, path), "fileNoteRow");
|
|
28986
29056
|
|
|
28987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
28988
29058
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
28989
29059
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
28990
29060
|
if (isObject2(value))
|
|
@@ -29231,7 +29301,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29231
29301
|
};
|
|
29232
29302
|
}, "filesStoreOver");
|
|
29233
29303
|
|
|
29234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29235
29305
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29236
29306
|
entity: "document",
|
|
29237
29307
|
backend: "sql",
|
|
@@ -29277,7 +29347,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29277
29347
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
29278
29348
|
}, "importedDocumentWhere");
|
|
29279
29349
|
|
|
29280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29281
29351
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29282
29352
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29283
29353
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29285,7 +29355,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29285
29355
|
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);
|
|
29286
29356
|
}, "reviewLink");
|
|
29287
29357
|
|
|
29288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29289
29359
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29290
29360
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29291
29361
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -29319,7 +29389,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29319
29389
|
};
|
|
29320
29390
|
}, "linkOf");
|
|
29321
29391
|
|
|
29322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29323
29393
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29324
29394
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29325
29395
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29340,7 +29410,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29340
29410
|
return changed;
|
|
29341
29411
|
}, "dateFileNotes");
|
|
29342
29412
|
|
|
29343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29344
29414
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
29345
29415
|
const value = text8.trim();
|
|
29346
29416
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29353,7 +29423,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29353
29423
|
return value;
|
|
29354
29424
|
}, "oneOf");
|
|
29355
29425
|
|
|
29356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29357
29427
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29358
29428
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29359
29429
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -29875,10 +29945,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29875
29945
|
};
|
|
29876
29946
|
}, "notesStoreOver");
|
|
29877
29947
|
|
|
29878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
29879
29949
|
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");
|
|
29880
29950
|
|
|
29881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
29882
29952
|
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";
|
|
29883
29953
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29884
29954
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30143,7 +30213,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30143
30213
|
};
|
|
30144
30214
|
}, "memoriesStoreOver");
|
|
30145
30215
|
|
|
30146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30147
30217
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30148
30218
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30149
30219
|
throw new CliError(code, message3, { reason });
|
|
@@ -30291,7 +30361,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30291
30361
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30292
30362
|
}, "reviewedRowsOver");
|
|
30293
30363
|
|
|
30294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30295
30365
|
var MAX_LINES = 500;
|
|
30296
30366
|
var PARENTS = {
|
|
30297
30367
|
invoice: {
|
|
@@ -30391,7 +30461,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30391
30461
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30392
30462
|
}, "moneyLinesOver");
|
|
30393
30463
|
|
|
30394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30395
30465
|
var COUNTED = {
|
|
30396
30466
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30397
30467
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30466,7 +30536,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30466
30536
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30467
30537
|
}, "refundRulesOver");
|
|
30468
30538
|
|
|
30469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30470
30540
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30471
30541
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30472
30542
|
var PAID = netPaidSql("i.id");
|
|
@@ -30870,7 +30940,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30870
30940
|
};
|
|
30871
30941
|
}, "financeStoreOver");
|
|
30872
30942
|
|
|
30873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
30874
30944
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
30875
30945
|
throw new CliError("validation_error", message3, { reason });
|
|
30876
30946
|
}, "refuse");
|
|
@@ -30948,7 +31018,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30948
31018
|
};
|
|
30949
31019
|
}, "paymentEntriesOver");
|
|
30950
31020
|
|
|
30951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
30952
31022
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
30953
31023
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
30954
31024
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -30975,7 +31045,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
30975
31045
|
return valid;
|
|
30976
31046
|
}, "validateEvidenceFindings");
|
|
30977
31047
|
|
|
30978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
30979
31049
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
30980
31050
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
30981
31051
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31169,7 +31239,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31169
31239
|
};
|
|
31170
31240
|
}, "proposedActionsStoreOver");
|
|
31171
31241
|
|
|
31172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31173
31243
|
var CONFIRMED = "proposal";
|
|
31174
31244
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31175
31245
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31521,7 +31591,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31521
31591
|
return { items, hasMore: rows.length > limit };
|
|
31522
31592
|
}, "identityLinkRows");
|
|
31523
31593
|
|
|
31524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31525
31595
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31526
31596
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31527
31597
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -31624,7 +31694,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
31624
31694
|
return recordOf(context, alone);
|
|
31625
31695
|
}, "split");
|
|
31626
31696
|
|
|
31627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
31628
31698
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
31629
31699
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
31630
31700
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -31801,7 +31871,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
31801
31871
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
31802
31872
|
}, "forgetErasedSplits");
|
|
31803
31873
|
|
|
31804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
31805
31875
|
var SEED_PEOPLE = [
|
|
31806
31876
|
{ name: "Owner", username: "owner" },
|
|
31807
31877
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -31818,7 +31888,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
31818
31888
|
];
|
|
31819
31889
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
31820
31890
|
|
|
31821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
31822
31892
|
var TEST_DATA_KIND = "test_data";
|
|
31823
31893
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
31824
31894
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -31887,7 +31957,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
31887
31957
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
31888
31958
|
}, "forgetErasedTestData");
|
|
31889
31959
|
|
|
31890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
31891
31961
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
31892
31962
|
provider,
|
|
31893
31963
|
externalId: account,
|
|
@@ -31981,7 +32051,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
31981
32051
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
31982
32052
|
}, "dropOrphanPeople");
|
|
31983
32053
|
|
|
31984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
31985
32055
|
var HISTORY_KEY = "$history";
|
|
31986
32056
|
var objectOf2 = /* @__PURE__ */ __name((text8) => {
|
|
31987
32057
|
if (typeof text8 !== "string")
|
|
@@ -32057,7 +32127,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32057
32127
|
return rest;
|
|
32058
32128
|
}, "withoutHistory");
|
|
32059
32129
|
|
|
32060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32061
32131
|
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");
|
|
32062
32132
|
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");
|
|
32063
32133
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32355,7 +32425,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32355
32425
|
}
|
|
32356
32426
|
}, "replaceAutoTags");
|
|
32357
32427
|
|
|
32358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32359
32429
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32360
32430
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32361
32431
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32395,7 +32465,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32395
32465
|
}, "maskStoredBotTokens");
|
|
32396
32466
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32397
32467
|
|
|
32398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32399
32469
|
import { createHash as createHash4 } from "node:crypto";
|
|
32400
32470
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32401
32471
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -32493,7 +32563,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
32493
32563
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
32494
32564
|
}, "contextEvidenceRequest");
|
|
32495
32565
|
|
|
32496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
32497
32567
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
32498
32568
|
var ACTIVITY = `
|
|
32499
32569
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -32623,7 +32693,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
32623
32693
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
32624
32694
|
}), "mailActivity");
|
|
32625
32695
|
|
|
32626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
32627
32697
|
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");
|
|
32628
32698
|
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;
|
|
32629
32699
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -32704,7 +32774,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
32704
32774
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
32705
32775
|
}, "mailCore");
|
|
32706
32776
|
|
|
32707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
32708
32778
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
32709
32779
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
32710
32780
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -32817,7 +32887,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
32817
32887
|
return emails3 + threads;
|
|
32818
32888
|
}, "drainEmailIndex");
|
|
32819
32889
|
|
|
32820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
32821
32891
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
32822
32892
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
32823
32893
|
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,
|
|
@@ -32915,7 +32985,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
32915
32985
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
32916
32986
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
32917
32987
|
|
|
32918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
32919
32989
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
32920
32990
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
32921
32991
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -32965,7 +33035,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
32965
33035
|
return threads.length;
|
|
32966
33036
|
}, "markEmailsRestored");
|
|
32967
33037
|
|
|
32968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
32969
33039
|
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
|
|
32970
33040
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
32971
33041
|
WHERE p.account_id = ?
|
|
@@ -33025,7 +33095,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33025
33095
|
}, "indexedMailPieces");
|
|
33026
33096
|
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");
|
|
33027
33097
|
|
|
33028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33029
33099
|
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");
|
|
33030
33100
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33031
33101
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33092,7 +33162,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33092
33162
|
}
|
|
33093
33163
|
}), "mailRulesOver");
|
|
33094
33164
|
|
|
33095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33096
33166
|
function checkMeetingCancelled(signal) {
|
|
33097
33167
|
if (!signal?.aborted)
|
|
33098
33168
|
return;
|
|
@@ -33103,7 +33173,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33103
33173
|
}
|
|
33104
33174
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33105
33175
|
|
|
33106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33107
33177
|
var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
|
|
33108
33178
|
const found2 = database.prepare("SELECT p.display_name, i.name, l.person_id FROM meeting_participants p JOIN identities i ON i.id = p.identity_id LEFT JOIN identity_links l ON l.identity_id = p.identity_id WHERE p.meeting_id = ? AND p.role = 'manager' ORDER BY p.id LIMIT 1").get(meetingId);
|
|
33109
33179
|
if (!found2)
|
|
@@ -33168,7 +33238,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33168
33238
|
createdAt: Number(row2.created_at)
|
|
33169
33239
|
}), "transcriptRowOf");
|
|
33170
33240
|
|
|
33171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33172
33242
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33173
33243
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33174
33244
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33335,7 +33405,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33335
33405
|
}
|
|
33336
33406
|
}), "meetingReadsOver");
|
|
33337
33407
|
|
|
33338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33339
33409
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33340
33410
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33341
33411
|
const params = [input.accountId];
|
|
@@ -33378,7 +33448,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33378
33448
|
return { clauses, params };
|
|
33379
33449
|
}, "meetingSelectionSql");
|
|
33380
33450
|
|
|
33381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
33382
33452
|
var MOST_CALLS = 2e5;
|
|
33383
33453
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
33384
33454
|
if (typeof value !== "string")
|
|
@@ -33433,7 +33503,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33433
33503
|
}
|
|
33434
33504
|
}), "meetingCallsOver");
|
|
33435
33505
|
|
|
33436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33437
33507
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33438
33508
|
async meetingChatLines(input) {
|
|
33439
33509
|
checkMeetingCancelled(input.signal);
|
|
@@ -33461,7 +33531,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33461
33531
|
}
|
|
33462
33532
|
}), "meetingChatLinesOver");
|
|
33463
33533
|
|
|
33464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33465
33535
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33466
33536
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33467
33537
|
}, "missing");
|
|
@@ -33584,7 +33654,7 @@ function meetingContextLinksOver(context) {
|
|
|
33584
33654
|
}
|
|
33585
33655
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
33586
33656
|
|
|
33587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
33588
33658
|
var TRANSCRIPT_ROLE = "transcript";
|
|
33589
33659
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
33590
33660
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -33658,7 +33728,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
33658
33728
|
};
|
|
33659
33729
|
}, "meetingTranscriptDocumentsOver");
|
|
33660
33730
|
|
|
33661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
33662
33732
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
33663
33733
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
33664
33734
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33687,7 +33757,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33687
33757
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
33688
33758
|
}, "indexedText");
|
|
33689
33759
|
|
|
33690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
33691
33761
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
33692
33762
|
var meetingCurrentIndexRows = `
|
|
33693
33763
|
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
|
|
@@ -33718,7 +33788,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33718
33788
|
}, "invalidateMeetingStems");
|
|
33719
33789
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
33720
33790
|
|
|
33721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
33722
33792
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
33723
33793
|
return {
|
|
33724
33794
|
async indexSearch(original) {
|
|
@@ -33786,10 +33856,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
33786
33856
|
}
|
|
33787
33857
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
33788
33858
|
|
|
33789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
33790
33860
|
import { createHash as createHash5 } from "node:crypto";
|
|
33791
33861
|
|
|
33792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
33793
33863
|
var SHORTEST_CORRECTION = 3;
|
|
33794
33864
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
33795
33865
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -33836,7 +33906,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
33836
33906
|
return corrections;
|
|
33837
33907
|
}, "correctWords");
|
|
33838
33908
|
|
|
33839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
33840
33910
|
var SHORTEST_GARBLED = 4;
|
|
33841
33911
|
var MOST_WIDENED = 64;
|
|
33842
33912
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -33928,7 +33998,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
33928
33998
|
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));
|
|
33929
33999
|
}, "widenWords");
|
|
33930
34000
|
|
|
33931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
33932
34002
|
import { readFileSync } from "node:fs";
|
|
33933
34003
|
var loaded;
|
|
33934
34004
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -33987,7 +34057,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
33987
34057
|
return false;
|
|
33988
34058
|
}, "knownRussianWord");
|
|
33989
34059
|
|
|
33990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
33991
34061
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
33992
34062
|
var MOST_WORDS = 128;
|
|
33993
34063
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34243,7 +34313,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
34243
34313
|
return [...found2];
|
|
34244
34314
|
}, "matchedMeetingWords");
|
|
34245
34315
|
|
|
34246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34247
34317
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34248
34318
|
throw new CliError("validation_error", message3);
|
|
34249
34319
|
}, "fail");
|
|
@@ -34427,7 +34497,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
34427
34497
|
}
|
|
34428
34498
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
34429
34499
|
|
|
34430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
34431
34501
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34432
34502
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
34433
34503
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -34459,7 +34529,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34459
34529
|
}
|
|
34460
34530
|
}), "meetingLanguagesOver");
|
|
34461
34531
|
|
|
34462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
34463
34533
|
import { createHash as createHash6 } from "node:crypto";
|
|
34464
34534
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
34465
34535
|
if (value === void 0)
|
|
@@ -34552,7 +34622,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
34552
34622
|
}
|
|
34553
34623
|
}), "meetingParticipantSearchOver");
|
|
34554
34624
|
|
|
34555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
34556
34626
|
var preparationQueries = {
|
|
34557
34627
|
participants: {
|
|
34558
34628
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -34602,7 +34672,7 @@ var preparationQueries = {
|
|
|
34602
34672
|
}
|
|
34603
34673
|
};
|
|
34604
34674
|
|
|
34605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
34606
34676
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34607
34677
|
async preparationContext(original) {
|
|
34608
34678
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -34643,7 +34713,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34643
34713
|
}
|
|
34644
34714
|
}), "meetingPreparationContextOver");
|
|
34645
34715
|
|
|
34646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
34647
34717
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
34648
34718
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
34649
34719
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -34657,7 +34727,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
34657
34727
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
34658
34728
|
)`, "preparationSubjects");
|
|
34659
34729
|
|
|
34660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
34661
34731
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34662
34732
|
async preparationKnowledge(original) {
|
|
34663
34733
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -34702,7 +34772,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
34702
34772
|
}
|
|
34703
34773
|
}), "meetingPreparationKnowledgeOver");
|
|
34704
34774
|
|
|
34705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
34706
34776
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34707
34777
|
async preparationNotes(original) {
|
|
34708
34778
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -34755,7 +34825,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34755
34825
|
}
|
|
34756
34826
|
}), "meetingPreparationNotesOver");
|
|
34757
34827
|
|
|
34758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
34759
34829
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34760
34830
|
async relatedHistory(original) {
|
|
34761
34831
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -34826,7 +34896,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34826
34896
|
}
|
|
34827
34897
|
}), "meetingRelatedHistoryOver");
|
|
34828
34898
|
|
|
34829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
34830
34900
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
34831
34901
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
34832
34902
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -34907,7 +34977,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34907
34977
|
}
|
|
34908
34978
|
}), "meetingReviewOver");
|
|
34909
34979
|
|
|
34910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
34911
34981
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
34912
34982
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
34913
34983
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -34961,7 +35031,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34961
35031
|
}
|
|
34962
35032
|
}), "meetingSeriesHistoryOver");
|
|
34963
35033
|
|
|
34964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
34965
35035
|
var MOST_ROWS = 5e5;
|
|
34966
35036
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
34967
35037
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35030,7 +35100,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35030
35100
|
}
|
|
35031
35101
|
}), "meetingStatsOver");
|
|
35032
35102
|
|
|
35033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35034
35104
|
var CYRILLIC_TO_LATIN = {
|
|
35035
35105
|
\u0430: "a",
|
|
35036
35106
|
\u0431: "b",
|
|
@@ -35252,7 +35322,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35252
35322
|
}
|
|
35253
35323
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35254
35324
|
|
|
35255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35256
35326
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35257
35327
|
const found2 = /* @__PURE__ */ new Map();
|
|
35258
35328
|
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()) {
|
|
@@ -35368,7 +35438,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
35368
35438
|
}
|
|
35369
35439
|
__name(sharedTraces, "sharedTraces");
|
|
35370
35440
|
|
|
35371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
35372
35442
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
35373
35443
|
var PERSON_BY = {
|
|
35374
35444
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -35391,7 +35461,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
35391
35461
|
return [...found2].sort((a, b) => a - b);
|
|
35392
35462
|
}, "personsByIdentifiers");
|
|
35393
35463
|
|
|
35394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
35395
35465
|
var BY = "rule";
|
|
35396
35466
|
var RULE = { bot: "rule", kind: "rule" };
|
|
35397
35467
|
var MOST_SHARING = 6;
|
|
@@ -35840,7 +35910,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
35840
35910
|
return pass.result;
|
|
35841
35911
|
}, "linkPhones");
|
|
35842
35912
|
|
|
35843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
35844
35914
|
var CURSOR_KEY = "meetings";
|
|
35845
35915
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
35846
35916
|
id: Number(row2.id),
|
|
@@ -36447,7 +36517,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36447
36517
|
};
|
|
36448
36518
|
}, "meetingStoreOver");
|
|
36449
36519
|
|
|
36450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
36451
36521
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
36452
36522
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
36453
36523
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -36473,7 +36543,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
36473
36543
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
36474
36544
|
}, "release");
|
|
36475
36545
|
|
|
36476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
36477
36547
|
var THREAD_COLUMNS = {
|
|
36478
36548
|
subject: {
|
|
36479
36549
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -36490,7 +36560,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
36490
36560
|
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);
|
|
36491
36561
|
}, "threadRows");
|
|
36492
36562
|
|
|
36493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
36494
36564
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
36495
36565
|
id: `email:${place.emailId}`,
|
|
36496
36566
|
chatId: place.threadExternalId,
|
|
@@ -37032,7 +37102,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37032
37102
|
}
|
|
37033
37103
|
}), "mailStoreOver");
|
|
37034
37104
|
|
|
37035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37036
37106
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37037
37107
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37038
37108
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37122,7 +37192,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37122
37192
|
}, "knownWord");
|
|
37123
37193
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37124
37194
|
|
|
37125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37126
37196
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37127
37197
|
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");
|
|
37128
37198
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37208,7 +37278,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37208
37278
|
return found2;
|
|
37209
37279
|
}, "spokenTranscripts");
|
|
37210
37280
|
|
|
37211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37212
37282
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37213
37283
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37214
37284
|
const start = startOf(node);
|
|
@@ -37266,7 +37336,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37266
37336
|
});
|
|
37267
37337
|
}, "placeHits");
|
|
37268
37338
|
|
|
37269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37270
37340
|
var GROUPS = {
|
|
37271
37341
|
chat: {
|
|
37272
37342
|
key: "m.chat_id",
|
|
@@ -37288,7 +37358,7 @@ var GROUPS = {
|
|
|
37288
37358
|
}
|
|
37289
37359
|
};
|
|
37290
37360
|
|
|
37291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37292
37362
|
var MESSAGES = {
|
|
37293
37363
|
rows: "messages",
|
|
37294
37364
|
threads: "chats",
|
|
@@ -37518,13 +37588,13 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
|
|
|
37518
37588
|
}
|
|
37519
37589
|
const driverOf = /* @__PURE__ */ __name((node) => {
|
|
37520
37590
|
if (node.kind === "predicate") {
|
|
37521
|
-
const { fts, stems, elsewhere: other } = fragments.get(node)?.fragment ?? {};
|
|
37591
|
+
const { fts, stems, elsewhere: other, begins } = fragments.get(node)?.fragment ?? {};
|
|
37522
37592
|
if (fts === void 0)
|
|
37523
37593
|
return void 0;
|
|
37524
37594
|
const words4 = `SELECT rowid AS id FROM ${corpus.words} WHERE ${corpus.words} MATCH ?`;
|
|
37525
37595
|
const own = isStemmed(node) && stems ? {
|
|
37526
37596
|
sql: `${words4} UNION SELECT rowid FROM ${corpus.stems} WHERE ${corpus.stems} MATCH ?`,
|
|
37527
|
-
params: [`normalized_text : (${fts})`, `stems : (${stems})`]
|
|
37597
|
+
params: [`normalized_text : (${begins ?? fts})`, `stems : (${stems})`]
|
|
37528
37598
|
} : { sql: words4, params: [`normalized_text : (${fts})`] };
|
|
37529
37599
|
return other ? { sql: `${own.sql} UNION ${other.sql}`, params: [...own.params, ...other.params] } : own;
|
|
37530
37600
|
}
|
|
@@ -37784,7 +37854,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
37784
37854
|
};
|
|
37785
37855
|
}, "runCompiled");
|
|
37786
37856
|
|
|
37787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
37788
37858
|
function invalidMetadata() {
|
|
37789
37859
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
37790
37860
|
}
|
|
@@ -37886,7 +37956,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
37886
37956
|
};
|
|
37887
37957
|
}), "counterTargets");
|
|
37888
37958
|
|
|
37889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
37890
37960
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
37891
37961
|
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,
|
|
37892
37962
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38005,7 +38075,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38005
38075
|
}));
|
|
38006
38076
|
}, "attachmentViews");
|
|
38007
38077
|
|
|
38008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38009
38079
|
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");
|
|
38010
38080
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
38011
38081
|
const { orm, database, now: now2 } = context;
|
|
@@ -38043,7 +38113,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38043
38113
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38044
38114
|
}, "intoVoiceAttachment");
|
|
38045
38115
|
|
|
38046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38047
38117
|
var FIELDS = [
|
|
38048
38118
|
"threadExternalId",
|
|
38049
38119
|
"senderIdentityId",
|
|
@@ -38367,7 +38437,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
38367
38437
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
38368
38438
|
}, "writeDerivedReactions");
|
|
38369
38439
|
|
|
38370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
38371
38441
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
38372
38442
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
38373
38443
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -38388,7 +38458,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
38388
38458
|
};
|
|
38389
38459
|
}, "keysOver");
|
|
38390
38460
|
|
|
38391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
38392
38462
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
38393
38463
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
38394
38464
|
if (!row2)
|
|
@@ -38435,7 +38505,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
38435
38505
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
38436
38506
|
}, "forgetProfile");
|
|
38437
38507
|
|
|
38438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
38439
38509
|
var DAY3 = 864e5;
|
|
38440
38510
|
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}')`;
|
|
38441
38511
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -38551,7 +38621,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38551
38621
|
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);
|
|
38552
38622
|
}, "listEvents");
|
|
38553
38623
|
|
|
38554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
38555
38625
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
38556
38626
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
38557
38627
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -38608,7 +38678,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
38608
38678
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
38609
38679
|
}, "forgetCalendarRows");
|
|
38610
38680
|
|
|
38611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
38612
38682
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
38613
38683
|
id: Number(row2.id),
|
|
38614
38684
|
accountId: Number(row2.account_id),
|
|
@@ -39211,7 +39281,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39211
39281
|
};
|
|
39212
39282
|
}, "eventStoreOver");
|
|
39213
39283
|
|
|
39214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
39215
39285
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
39216
39286
|
const { orm, database, now: now2 } = context;
|
|
39217
39287
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -39327,7 +39397,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
39327
39397
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
39328
39398
|
}, "purgeCrmCopies");
|
|
39329
39399
|
|
|
39330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39331
39401
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39332
39402
|
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");
|
|
39333
39403
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39386,7 +39456,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39386
39456
|
return personOf2(context, ref3);
|
|
39387
39457
|
}, "linkToOwner");
|
|
39388
39458
|
|
|
39389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39390
39460
|
var PROVIDERS_SETTING = "providers";
|
|
39391
39461
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39392
39462
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39434,7 +39504,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39434
39504
|
});
|
|
39435
39505
|
}, "registerProvider");
|
|
39436
39506
|
|
|
39437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39438
39508
|
var DAY4 = 864e5;
|
|
39439
39509
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
39440
39510
|
var TEXT_LIMIT = 20;
|
|
@@ -39632,7 +39702,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39632
39702
|
};
|
|
39633
39703
|
}, "taskSimilarityOver");
|
|
39634
39704
|
|
|
39635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39636
39706
|
var SETTING3 = "taskCategories";
|
|
39637
39707
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39638
39708
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39651,7 +39721,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39651
39721
|
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);
|
|
39652
39722
|
}, "saveTaskCategories");
|
|
39653
39723
|
|
|
39654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39655
39725
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39656
39726
|
var ALLOWED = "taskAgentClose";
|
|
39657
39727
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39707,7 +39777,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39707
39777
|
];
|
|
39708
39778
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39709
39779
|
|
|
39710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39711
39781
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39712
39782
|
var KEY = "taskFirstPassPerChat";
|
|
39713
39783
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39727,7 +39797,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39727
39797
|
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);
|
|
39728
39798
|
}, "saveFirstPassPerChat");
|
|
39729
39799
|
|
|
39730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39731
39801
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39732
39802
|
var EXTERNAL_ID_CHARS = 200;
|
|
39733
39803
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39754,7 +39824,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39754
39824
|
return text8;
|
|
39755
39825
|
}, "sourceUrlOf");
|
|
39756
39826
|
|
|
39757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39758
39828
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39759
39829
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39760
39830
|
name,
|
|
@@ -40006,7 +40076,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
40006
40076
|
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 ?`;
|
|
40007
40077
|
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");
|
|
40008
40078
|
|
|
40009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
40010
40080
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
40011
40081
|
if (row2.author_type == null)
|
|
40012
40082
|
return null;
|
|
@@ -40034,7 +40104,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
40034
40104
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
40035
40105
|
}, "addComment");
|
|
40036
40106
|
|
|
40037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
40038
40108
|
var TASK_RELATION_KINDS = [
|
|
40039
40109
|
"blocked-by",
|
|
40040
40110
|
"follow-up-of",
|
|
@@ -40164,7 +40234,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
40164
40234
|
};
|
|
40165
40235
|
}, "taskRelationsStoreOver");
|
|
40166
40236
|
|
|
40167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
40168
40238
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
40169
40239
|
var TASK_EVENT_KINDS = [
|
|
40170
40240
|
"created",
|
|
@@ -40723,7 +40793,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40723
40793
|
};
|
|
40724
40794
|
}, "workTasksOver");
|
|
40725
40795
|
|
|
40726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40727
40797
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40728
40798
|
const { database, now: now2 } = context;
|
|
40729
40799
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40772,7 +40842,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40772
40842
|
};
|
|
40773
40843
|
}, "taskCloseOver");
|
|
40774
40844
|
|
|
40775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40776
40846
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40777
40847
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40778
40848
|
const { database, now: now2 } = context;
|
|
@@ -40991,7 +41061,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
40991
41061
|
};
|
|
40992
41062
|
}, "taskPairsOver");
|
|
40993
41063
|
|
|
40994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
40995
41065
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
40996
41066
|
var TASK_STATS_SQL = {
|
|
40997
41067
|
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"),
|
|
@@ -41030,7 +41100,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
41030
41100
|
}, "statNames")
|
|
41031
41101
|
}), "taskStatsOver");
|
|
41032
41102
|
|
|
41033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
41034
41104
|
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";
|
|
41035
41105
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
41036
41106
|
const key2 = inboxKey(account);
|
|
@@ -41246,7 +41316,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
41246
41316
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
41247
41317
|
}, "oneOf");
|
|
41248
41318
|
|
|
41249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
41250
41320
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
41251
41321
|
const { database } = context;
|
|
41252
41322
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41316,7 +41386,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41316
41386
|
};
|
|
41317
41387
|
}, "accountsStoreOver");
|
|
41318
41388
|
|
|
41319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41320
41390
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41321
41391
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41322
41392
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41340,7 +41410,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41340
41410
|
})), "keepDownloads");
|
|
41341
41411
|
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");
|
|
41342
41412
|
|
|
41343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41344
41414
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41345
41415
|
const { database } = context;
|
|
41346
41416
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41397,7 +41467,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41397
41467
|
}, "keepAttachmentText")
|
|
41398
41468
|
}), "attachmentsStoreOver");
|
|
41399
41469
|
|
|
41400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41401
41471
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41402
41472
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41403
41473
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41582,7 +41652,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41582
41652
|
return done;
|
|
41583
41653
|
}, "rekeyChats");
|
|
41584
41654
|
|
|
41585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41586
41656
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41587
41657
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41588
41658
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41640,7 +41710,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41640
41710
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41641
41711
|
}, "chatCoverage");
|
|
41642
41712
|
|
|
41643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41644
41714
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41645
41715
|
const { database } = context;
|
|
41646
41716
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41789,7 +41859,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41789
41859
|
};
|
|
41790
41860
|
}, "chatsStoreOver");
|
|
41791
41861
|
|
|
41792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41793
41863
|
import { createHash as createHash7 } from "node:crypto";
|
|
41794
41864
|
var BATCH_CONTEXT = 50;
|
|
41795
41865
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -41927,7 +41997,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
41927
41997
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
41928
41998
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
41929
41999
|
|
|
41930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
41931
42001
|
import { setTimeout } from "node:timers/promises";
|
|
41932
42002
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
41933
42003
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -42239,7 +42309,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
42239
42309
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
42240
42310
|
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");
|
|
42241
42311
|
|
|
42242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
42243
42313
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42244
42314
|
const { database } = context;
|
|
42245
42315
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42346,7 +42416,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42346
42416
|
};
|
|
42347
42417
|
}, "conversationsStoreOver");
|
|
42348
42418
|
|
|
42349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42350
42420
|
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";
|
|
42351
42421
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42352
42422
|
const { database } = context;
|
|
@@ -42371,7 +42441,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42371
42441
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42372
42442
|
}), "countersStoreOver");
|
|
42373
42443
|
|
|
42374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42375
42445
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42376
42446
|
var MENTION_QUERY = defineQuery({
|
|
42377
42447
|
entity: "mention",
|
|
@@ -42590,7 +42660,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42590
42660
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42591
42661
|
}, "listPlaces");
|
|
42592
42662
|
|
|
42593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42594
42664
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42595
42665
|
const { database } = context;
|
|
42596
42666
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42625,7 +42695,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42625
42695
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42626
42696
|
}), "mentionsStoreOver");
|
|
42627
42697
|
|
|
42628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42629
42699
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42630
42700
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42631
42701
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42724,7 +42794,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42724
42794
|
});
|
|
42725
42795
|
}, "waitingChats");
|
|
42726
42796
|
|
|
42727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42728
42798
|
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 = ?`;
|
|
42729
42799
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42730
42800
|
const statement = database.prepare(SQL);
|
|
@@ -42744,7 +42814,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42744
42814
|
return found2;
|
|
42745
42815
|
}, "chatActivityCounts");
|
|
42746
42816
|
|
|
42747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42748
42818
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42749
42819
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
42750
42820
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -42759,7 +42829,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42759
42829
|
}));
|
|
42760
42830
|
}, "documentLinkMessages");
|
|
42761
42831
|
|
|
42762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42763
42833
|
var stemmerFor = stemmerCache();
|
|
42764
42834
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42765
42835
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42803,7 +42873,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42803
42873
|
});
|
|
42804
42874
|
}, "laterSharingRare");
|
|
42805
42875
|
|
|
42806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42807
42877
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42808
42878
|
const { database } = context;
|
|
42809
42879
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -42944,7 +43014,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42944
43014
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
42945
43015
|
}), "messagesStoreOver");
|
|
42946
43016
|
|
|
42947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
|
|
42948
43018
|
var AGENT_METHOD = "agent";
|
|
42949
43019
|
var personsOf = /* @__PURE__ */ __name(({ database }) => new Map(database.prepare("SELECT identity_id, person_id FROM identity_links").all().map((row2) => [Number(row2.identity_id), Number(row2.person_id)])), "personsOf");
|
|
42950
43020
|
var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
|
|
@@ -43088,7 +43158,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
|
|
|
43088
43158
|
return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
|
|
43089
43159
|
}, "agentMerges");
|
|
43090
43160
|
|
|
43091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
|
|
43092
43162
|
var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
|
|
43093
43163
|
var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
|
|
43094
43164
|
var foreignKeysTo = /* @__PURE__ */ __name((database, table) => database.prepare(`SELECT m.name AS tbl, f."from" AS col FROM sqlite_master m JOIN pragma_foreign_key_list(m.name) f
|
|
@@ -43232,7 +43302,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
|
|
|
43232
43302
|
return done;
|
|
43233
43303
|
}, "rekeyIdentities");
|
|
43234
43304
|
|
|
43235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
43236
43306
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
43237
43307
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
43238
43308
|
"noreply",
|
|
@@ -43295,7 +43365,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
43295
43365
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
43296
43366
|
}, "isCompanyName");
|
|
43297
43367
|
|
|
43298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
43299
43369
|
var SMALL_GROUP_MEMBERS = 10;
|
|
43300
43370
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
43301
43371
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -43350,7 +43420,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
43350
43420
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
43351
43421
|
}, "shownReasons");
|
|
43352
43422
|
|
|
43353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
43354
43424
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
43355
43425
|
var MIN_QUERY = 3;
|
|
43356
43426
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -43521,7 +43591,7 @@ var RULES_KEY = "people.kind_rules";
|
|
|
43521
43591
|
var WHOLE_PASS = 2e4;
|
|
43522
43592
|
var UNDER_LOCK = 5e3;
|
|
43523
43593
|
var TRIES = 3;
|
|
43524
|
-
var
|
|
43594
|
+
var dataVersion2 = /* @__PURE__ */ __name((database) => Number(Object.values(database.prepare("PRAGMA data_version").get() ?? {})[0]), "dataVersion");
|
|
43525
43595
|
var rulesOf = /* @__PURE__ */ __name((database) => {
|
|
43526
43596
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(RULES_KEY);
|
|
43527
43597
|
return row2 === void 0 ? void 0 : String(row2.value);
|
|
@@ -43570,12 +43640,12 @@ var storeKinds = /* @__PURE__ */ __name((database) => {
|
|
|
43570
43640
|
if (few)
|
|
43571
43641
|
return true;
|
|
43572
43642
|
for (let attempt = 0; attempt < TRIES; attempt++) {
|
|
43573
|
-
const before2 =
|
|
43643
|
+
const before2 = dataVersion2(database);
|
|
43574
43644
|
const worked = read(database, () => workOut(database, rulesOf(database) !== KIND_RULES));
|
|
43575
43645
|
if (worked === void 0)
|
|
43576
43646
|
return true;
|
|
43577
43647
|
const kept = writeBatch(database, () => {
|
|
43578
|
-
if (
|
|
43648
|
+
if (dataVersion2(database) !== before2)
|
|
43579
43649
|
return false;
|
|
43580
43650
|
keep(database, worked);
|
|
43581
43651
|
return true;
|
|
@@ -43695,7 +43765,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43695
43765
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43696
43766
|
}, "similarPeople");
|
|
43697
43767
|
|
|
43698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43699
43769
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43700
43770
|
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";
|
|
43701
43771
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -43951,7 +44021,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
43951
44021
|
return { person: `person:${person2}`, identities: identities2 };
|
|
43952
44022
|
}, "markTestData");
|
|
43953
44023
|
|
|
43954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
43955
44025
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
43956
44026
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
43957
44027
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -44020,7 +44090,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
44020
44090
|
});
|
|
44021
44091
|
}, "personPreparation");
|
|
44022
44092
|
|
|
44023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
44024
44094
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
44025
44095
|
const id2 = Number(uid);
|
|
44026
44096
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -44028,7 +44098,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
44028
44098
|
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)));
|
|
44029
44099
|
}, "personSeenInAccounts");
|
|
44030
44100
|
|
|
44031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
44032
44102
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
44033
44103
|
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);
|
|
44034
44104
|
if (!row2)
|
|
@@ -44095,7 +44165,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
44095
44165
|
return { id: id2, personId, removed: true };
|
|
44096
44166
|
}, "removeNote");
|
|
44097
44167
|
|
|
44098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
44099
44169
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
44100
44170
|
const { database } = context;
|
|
44101
44171
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -44238,13 +44308,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
44238
44308
|
};
|
|
44239
44309
|
}, "peopleStoreOver");
|
|
44240
44310
|
|
|
44241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44242
44312
|
import { createHash as createHash9 } from "node:crypto";
|
|
44243
44313
|
|
|
44244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44245
44315
|
import { createHash as createHash8 } from "node:crypto";
|
|
44246
44316
|
|
|
44247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
44248
44318
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
44249
44319
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
44250
44320
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -44466,7 +44536,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
44466
44536
|
};
|
|
44467
44537
|
}, "rankReplyGraph");
|
|
44468
44538
|
|
|
44469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44470
44540
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
44471
44541
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
44472
44542
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44640,7 +44710,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44640
44710
|
return { items, evidence, summary, graph: graph.quality };
|
|
44641
44711
|
}, "calculateAdminStatistics");
|
|
44642
44712
|
|
|
44643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44644
44714
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44645
44715
|
const dates = [];
|
|
44646
44716
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44662,7 +44732,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44662
44732
|
return dates[0].node.resolution.date;
|
|
44663
44733
|
}, "rankingContextRange");
|
|
44664
44734
|
|
|
44665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44666
44736
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44667
44737
|
let counts;
|
|
44668
44738
|
try {
|
|
@@ -44957,7 +45027,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
44957
45027
|
});
|
|
44958
45028
|
}, "rankQuery");
|
|
44959
45029
|
|
|
44960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44961
45031
|
function fail2(message3, reason = "query.too-large") {
|
|
44962
45032
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
44963
45033
|
}
|
|
@@ -45134,7 +45204,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
45134
45204
|
return result;
|
|
45135
45205
|
}), "adminStatisticsQuery");
|
|
45136
45206
|
|
|
45137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
45138
45208
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
45139
45209
|
if (!execution.accounts.length)
|
|
45140
45210
|
return { conversations: [], chats: [] };
|
|
@@ -45152,7 +45222,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
45152
45222
|
return { conversations: conversations2, chats: chats2 };
|
|
45153
45223
|
}, "conversationEligibility");
|
|
45154
45224
|
|
|
45155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
45156
45226
|
import { createHash as createHash10 } from "node:crypto";
|
|
45157
45227
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
45158
45228
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -45302,7 +45372,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
45302
45372
|
return result;
|
|
45303
45373
|
}, "rankingEvidence");
|
|
45304
45374
|
|
|
45305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
45306
45376
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
45307
45377
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
45308
45378
|
if (execution.corpus === "mail")
|
|
@@ -45323,7 +45393,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
45323
45393
|
};
|
|
45324
45394
|
}, "queriesStoreOver");
|
|
45325
45395
|
|
|
45326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
45327
45397
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
45328
45398
|
const { database, now: now2 } = context;
|
|
45329
45399
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -45362,10 +45432,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
45362
45432
|
}));
|
|
45363
45433
|
}, "chatEventsOf");
|
|
45364
45434
|
|
|
45365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45366
45436
|
import { createHash as createHash11 } from "node:crypto";
|
|
45367
45437
|
|
|
45368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
45369
45439
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
45370
45440
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
45371
45441
|
timeZone: zone,
|
|
@@ -45385,7 +45455,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
45385
45455
|
return date3.toISOString().slice(0, 10);
|
|
45386
45456
|
}, "weekKey");
|
|
45387
45457
|
|
|
45388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
45389
45459
|
var RETENTION_TOLERANCE = 864e5;
|
|
45390
45460
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
45391
45461
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -45439,7 +45509,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
45439
45509
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
45440
45510
|
}, "retentionCohorts");
|
|
45441
45511
|
|
|
45442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45443
45513
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
45444
45514
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
45445
45515
|
validateRetentionOptions(options);
|
|
@@ -45570,7 +45640,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45570
45640
|
};
|
|
45571
45641
|
}, "retentionQuery");
|
|
45572
45642
|
|
|
45573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45574
45644
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45575
45645
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45576
45646
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45699,7 +45769,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45699
45769
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45700
45770
|
})), "trackedChats");
|
|
45701
45771
|
|
|
45702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45703
45773
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45704
45774
|
const { database } = context;
|
|
45705
45775
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45755,7 +45825,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45755
45825
|
};
|
|
45756
45826
|
}, "rosterStoreOver");
|
|
45757
45827
|
|
|
45758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45759
45829
|
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");
|
|
45760
45830
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45761
45831
|
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 ?`);
|
|
@@ -45779,7 +45849,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45779
45849
|
}
|
|
45780
45850
|
}, "backfillNormalized");
|
|
45781
45851
|
|
|
45782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45783
45853
|
var INDEX2 = "message_words";
|
|
45784
45854
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45785
45855
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -45906,7 +45976,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
45906
45976
|
});
|
|
45907
45977
|
}, "resetSearchIndex");
|
|
45908
45978
|
|
|
45909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
45910
45980
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
45911
45981
|
const filled = { stemmed: 0, drained: 0 };
|
|
45912
45982
|
const before2 = stemsState(database);
|
|
@@ -46001,7 +46071,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
46001
46071
|
return resetStems(database, { now: now2 });
|
|
46002
46072
|
}, "followDefaultStemmers");
|
|
46003
46073
|
|
|
46004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
46005
46075
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
46006
46076
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
46007
46077
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -46023,7 +46093,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
46023
46093
|
});
|
|
46024
46094
|
}, "termCandidates");
|
|
46025
46095
|
|
|
46026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
46027
46097
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46028
46098
|
const { database } = context;
|
|
46029
46099
|
const stemmerFor2 = stemmerCache();
|
|
@@ -46033,6 +46103,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46033
46103
|
searchIndexState: /* @__PURE__ */ __name(async () => searchIndexState2(database), "searchIndexState"),
|
|
46034
46104
|
fillSearchIndex: /* @__PURE__ */ __name(async ({ until } = {}) => isQueryOnly(database) ? { normalized: 0, indexed: 0, terms: 0 } : fillSearchIndex(database, { now: context.now, ...until ? { until } : {} }), "fillSearchIndex"),
|
|
46035
46105
|
stemsState: /* @__PURE__ */ __name(async () => stemsState(database), "stemsState"),
|
|
46106
|
+
heldStems: /* @__PURE__ */ __name(async (held2) => heldStems(database, held2), "heldStems"),
|
|
46036
46107
|
fillStems: /* @__PURE__ */ __name(async ({ until } = {}) => {
|
|
46037
46108
|
if (isQueryOnly(database))
|
|
46038
46109
|
return { stemmed: 0, drained: 0 };
|
|
@@ -46047,7 +46118,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46047
46118
|
};
|
|
46048
46119
|
}, "searchIndexStoreOver");
|
|
46049
46120
|
|
|
46050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
46051
46122
|
var HISTORY_KEPT = 1e3;
|
|
46052
46123
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
46053
46124
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -46117,7 +46188,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
46117
46188
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
46118
46189
|
}, "clearHistory");
|
|
46119
46190
|
|
|
46120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
46121
46192
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46122
46193
|
const { database } = context;
|
|
46123
46194
|
return {
|
|
@@ -46141,7 +46212,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46141
46212
|
};
|
|
46142
46213
|
}, "searchesStoreOver");
|
|
46143
46214
|
|
|
46144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
46145
46216
|
import { createHash as createHash12 } from "node:crypto";
|
|
46146
46217
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
46147
46218
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -46383,7 +46454,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46383
46454
|
};
|
|
46384
46455
|
}, "addedSourcesOver");
|
|
46385
46456
|
|
|
46386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
46387
46458
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
46388
46459
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
46389
46460
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -46431,7 +46502,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
46431
46502
|
};
|
|
46432
46503
|
}, "agentActionsStoreOver");
|
|
46433
46504
|
|
|
46434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
46435
46506
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
46436
46507
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
46437
46508
|
if (typeof value !== "string")
|
|
@@ -46477,7 +46548,7 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
46477
46548
|
}
|
|
46478
46549
|
}, "suggestBaseStages");
|
|
46479
46550
|
|
|
46480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
46481
46552
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
46482
46553
|
try {
|
|
46483
46554
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -46536,11 +46607,11 @@ var aheadOf = /* @__PURE__ */ __name((reference2, flag6, now2 = Date.now(), opti
|
|
|
46536
46607
|
return read2.time;
|
|
46537
46608
|
}, "aheadOf");
|
|
46538
46609
|
|
|
46539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
|
|
46540
46611
|
var viewerSql = /* @__PURE__ */ __name((alias2, viewer) => viewer === void 0 ? { sql: "1", params: [] } : viewer.assignee === null ? { sql: "0", params: [] } : { sql: `json_extract(${alias2}.metadata, '$.assignee') = ?`, params: [viewer.assignee] }, "viewerSql");
|
|
46541
46612
|
var seenBy = /* @__PURE__ */ __name((viewer, row2) => viewer === void 0 || row2.provider !== viewer.account.provider || row2.account !== viewer.account.account || viewer.assignee !== null && row2.assignee === viewer.assignee, "seenBy");
|
|
46542
46613
|
|
|
46543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
46544
46615
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
46545
46616
|
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
46546
46617
|
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
@@ -46712,7 +46783,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46712
46783
|
return { savePipeline, saveItemRow };
|
|
46713
46784
|
}, "crmRowsOver");
|
|
46714
46785
|
|
|
46715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46716
46787
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46717
46788
|
var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
|
|
46718
46789
|
const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
|
|
@@ -46900,7 +46971,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
|
46900
46971
|
};
|
|
46901
46972
|
}, "seenSql");
|
|
46902
46973
|
|
|
46903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
46904
46975
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
46905
46976
|
var STAGE_ENTRY_DAYS = 90;
|
|
46906
46977
|
var STAGE_TASK_DAYS = 7;
|
|
@@ -46968,7 +47039,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46968
47039
|
return { save: save2, pending, handled, expire };
|
|
46969
47040
|
}, "crmStageEntriesOver");
|
|
46970
47041
|
|
|
46971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
46972
47043
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
46973
47044
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
|
|
46974
47045
|
const seen = viewerSql("d", viewer);
|
|
@@ -46986,7 +47057,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
|
|
|
46986
47057
|
});
|
|
46987
47058
|
}, "stageAmountsOf");
|
|
46988
47059
|
|
|
46989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
|
|
46990
47061
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
46991
47062
|
var DAY6 = 864e5;
|
|
46992
47063
|
var LOST_REASONS = 10;
|
|
@@ -47143,7 +47214,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
|
|
|
47143
47214
|
};
|
|
47144
47215
|
}, "pipelinePeriod");
|
|
47145
47216
|
|
|
47146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47147
47218
|
var TABLES5 = { deal: "deals", lead: "leads" };
|
|
47148
47219
|
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 ${TABLES5[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");
|
|
47149
47220
|
var MAX_STAGES = 30;
|
|
@@ -47616,7 +47687,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47616
47687
|
};
|
|
47617
47688
|
}, "dealsStoreOver");
|
|
47618
47689
|
|
|
47619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
47620
47691
|
var KEY2 = "ownerLanguages";
|
|
47621
47692
|
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(" "));
|
|
47622
47693
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -47646,7 +47717,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
47646
47717
|
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);
|
|
47647
47718
|
}, "saveOwnerLanguages");
|
|
47648
47719
|
|
|
47649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
47650
47721
|
var OUTCOMES = {
|
|
47651
47722
|
lead: ["open", "open", "open", "won", "lost"],
|
|
47652
47723
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -47979,7 +48050,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47979
48050
|
};
|
|
47980
48051
|
}, "baseStagesStoreOver");
|
|
47981
48052
|
|
|
47982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
47983
48054
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
47984
48055
|
}) => {
|
|
47985
48056
|
const { database, now: now2 } = context;
|
|
@@ -48038,7 +48109,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
48038
48109
|
};
|
|
48039
48110
|
}, "botUpdateStoreOver");
|
|
48040
48111
|
|
|
48041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
48042
48113
|
var IMPORTER = { bot: "import" };
|
|
48043
48114
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
48044
48115
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -48083,7 +48154,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
48083
48154
|
};
|
|
48084
48155
|
}), "moneyLinesOf");
|
|
48085
48156
|
|
|
48086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
48087
48158
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
48088
48159
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
48089
48160
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -48167,13 +48238,31 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
48167
48238
|
};
|
|
48168
48239
|
}, "relationRolesOver");
|
|
48169
48240
|
|
|
48170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
48171
48242
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
48172
48243
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
48173
48244
|
var CRM_SCOPES = ["mine", "all"];
|
|
48174
48245
|
var CRM_ACTIVITIES = ["on", "off"];
|
|
48175
|
-
var
|
|
48176
|
-
|
|
48246
|
+
var CRM_FILE_LIMITS = {
|
|
48247
|
+
max_files: { default: 50, min: 1, max: 500 },
|
|
48248
|
+
max_file_mb: { default: 20, min: 1, max: 50 },
|
|
48249
|
+
max_run_mb: { default: 200, min: 10, max: 2e3 },
|
|
48250
|
+
run_minutes: { default: 10, min: 1, max: 60 },
|
|
48251
|
+
days: { default: 7, min: 1, max: 90 },
|
|
48252
|
+
max_total_mb: { default: 2e3, min: 100, max: 5e4 }
|
|
48253
|
+
};
|
|
48254
|
+
var FILE_LIMIT_NAMES = Object.keys(CRM_FILE_LIMITS).map((name) => `files.${name}`);
|
|
48255
|
+
var NAMES2 = [
|
|
48256
|
+
"links",
|
|
48257
|
+
"company-types",
|
|
48258
|
+
"scope",
|
|
48259
|
+
"unassigned",
|
|
48260
|
+
"self",
|
|
48261
|
+
"stage-tasks",
|
|
48262
|
+
"activities",
|
|
48263
|
+
...FILE_LIMIT_NAMES
|
|
48264
|
+
];
|
|
48265
|
+
var SETTING4 = new RegExp(`^crm\\.([a-z0-9-]+):(.+)\\.(${NAMES2.map((name) => name.replace(".", "\\.")).join("|")})$`);
|
|
48177
48266
|
var crmSettingKey = /* @__PURE__ */ __name((key2, name) => `crm.${key2.provider}:${key2.account}.${name}`, "crmSettingKey");
|
|
48178
48267
|
var parseCrmSetting = /* @__PURE__ */ __name((setting) => {
|
|
48179
48268
|
const match = SETTING4.exec(setting);
|
|
@@ -48296,8 +48385,25 @@ var crmStageTasksSince = /* @__PURE__ */ __name((database, key2) => {
|
|
|
48296
48385
|
var saveStageMovesMark = /* @__PURE__ */ __name((database, key2, through, now2) => {
|
|
48297
48386
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value").run(stageTasksMark(crmSettingKey(key2, "stage-tasks")), JSON.stringify(through), now2);
|
|
48298
48387
|
}, "saveStageMovesMark");
|
|
48388
|
+
var fileLimitOf = /* @__PURE__ */ __name((name) => name.startsWith("files.") ? name.slice("files.".length) : void 0, "fileLimitOf");
|
|
48389
|
+
var crmFileLimits = /* @__PURE__ */ __name((database, key2) => Object.fromEntries(Object.entries(CRM_FILE_LIMITS).map(([name, range]) => {
|
|
48390
|
+
const value = stored2(database, crmSettingKey(key2, `files.${name}`));
|
|
48391
|
+
const fits = Number.isSafeInteger(value) && value >= range.min && value <= range.max;
|
|
48392
|
+
return [name, fits ? value : range.default];
|
|
48393
|
+
})), "crmFileLimits");
|
|
48299
48394
|
var parseCrmSettingValue = /* @__PURE__ */ __name((name, value) => {
|
|
48300
48395
|
const text8 = value.trim();
|
|
48396
|
+
const limit = fileLimitOf(name);
|
|
48397
|
+
if (limit) {
|
|
48398
|
+
const { min, max } = CRM_FILE_LIMITS[limit];
|
|
48399
|
+
if (!/^\d+$/u.test(text8) || Number(text8) < min || Number(text8) > max)
|
|
48400
|
+
throw new CliError("validation_error", `${name} takes a whole number from ${min} to ${max}, not "${text8}"`, {
|
|
48401
|
+
reason: "crm.files-limit-range",
|
|
48402
|
+
min,
|
|
48403
|
+
max
|
|
48404
|
+
});
|
|
48405
|
+
return Number(text8);
|
|
48406
|
+
}
|
|
48301
48407
|
if (name === "stage-tasks")
|
|
48302
48408
|
return parseStageTasks(text8);
|
|
48303
48409
|
if (name === "links")
|
|
@@ -48351,6 +48457,9 @@ var settingValue = /* @__PURE__ */ __name((database, key2, name) => {
|
|
|
48351
48457
|
return stored2(database, crmSettingKey(key2, name)) ?? {};
|
|
48352
48458
|
if (name === "activities")
|
|
48353
48459
|
return crmActivitiesOn(database, key2) ? "on" : "off";
|
|
48460
|
+
const limit = fileLimitOf(name);
|
|
48461
|
+
if (limit)
|
|
48462
|
+
return crmFileLimits(database, key2)[limit];
|
|
48354
48463
|
return userIds(stored2(database, crmSettingKey(key2, name)));
|
|
48355
48464
|
}, "settingValue");
|
|
48356
48465
|
var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELECT key, value FROM store_settings WHERE key LIKE 'crm.%' ORDER BY key").all().flatMap((row2) => {
|
|
@@ -48360,7 +48469,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
48360
48469
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
48361
48470
|
}), "crmSettingsOf");
|
|
48362
48471
|
|
|
48363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
48364
48473
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
48365
48474
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
48366
48475
|
id: link3.id,
|
|
@@ -48720,7 +48829,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
48720
48829
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
48721
48830
|
}, "decidedOrigin");
|
|
48722
48831
|
|
|
48723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
48724
48833
|
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");
|
|
48725
48834
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
48726
48835
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -48858,7 +48967,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
48858
48967
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
48859
48968
|
}), "relationsStoreOver");
|
|
48860
48969
|
|
|
48861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
48862
48971
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
48863
48972
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
48864
48973
|
added: 0,
|
|
@@ -49048,7 +49157,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
49048
49157
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
49049
49158
|
}, "recordRelationshipsOver");
|
|
49050
49159
|
|
|
49051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
49052
49161
|
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";
|
|
49053
49162
|
var DAY_MS2 = 864e5;
|
|
49054
49163
|
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");
|
|
@@ -49207,7 +49316,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49207
49316
|
};
|
|
49208
49317
|
}, "contractsStoreOver");
|
|
49209
49318
|
|
|
49210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
49211
49320
|
var BUSINESS_FIND_MAX = 2001;
|
|
49212
49321
|
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");
|
|
49213
49322
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -49312,7 +49421,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
49312
49421
|
};
|
|
49313
49422
|
}, "businessSearchOver");
|
|
49314
49423
|
|
|
49315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49316
49425
|
var CATALOG_QUERY = defineQuery({
|
|
49317
49426
|
entity: "document",
|
|
49318
49427
|
backend: "sql",
|
|
@@ -49545,7 +49654,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49545
49654
|
};
|
|
49546
49655
|
}, "catalogStoreOver");
|
|
49547
49656
|
|
|
49548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
49549
49658
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
49550
49659
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
49551
49660
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -49558,7 +49667,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
49558
49667
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
49559
49668
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
49560
49669
|
|
|
49561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
49562
49671
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
49563
49672
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
49564
49673
|
signal?.throwIfAborted();
|
|
@@ -49657,7 +49766,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
49657
49766
|
});
|
|
49658
49767
|
}, "readMeetingContextEvidence");
|
|
49659
49768
|
|
|
49660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
49661
49770
|
var corpora = {
|
|
49662
49771
|
message: {
|
|
49663
49772
|
table: "messages",
|
|
@@ -49902,7 +50011,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
49902
50011
|
}
|
|
49903
50012
|
}), "contextRecordsOver");
|
|
49904
50013
|
|
|
49905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
|
|
49906
50015
|
var CRM_CHANGES = [
|
|
49907
50016
|
"created",
|
|
49908
50017
|
"moved",
|
|
@@ -50045,7 +50154,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50045
50154
|
};
|
|
50046
50155
|
}, "crmReadsOver");
|
|
50047
50156
|
|
|
50048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
50049
50158
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
50050
50159
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
50051
50160
|
var DryRun = class extends Error {
|
|
@@ -50124,7 +50233,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
50124
50233
|
}
|
|
50125
50234
|
}, "removeCrmContacts");
|
|
50126
50235
|
|
|
50127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
50128
50237
|
var PENDING = "crm:pending-relations";
|
|
50129
50238
|
var PENDING_DAYS = 30;
|
|
50130
50239
|
var PENDING_MOST = 5e3;
|
|
@@ -50679,7 +50788,7 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
50679
50788
|
};
|
|
50680
50789
|
}, "crmCopiesOver");
|
|
50681
50790
|
|
|
50682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
|
|
50683
50792
|
import { sep } from "node:path";
|
|
50684
50793
|
var MOST = 500;
|
|
50685
50794
|
var CURRENTLY = /* @__PURE__ */ __name((table) => `EXISTS (SELECT 1 FROM ${table} r WHERE r.account_id = f.account_id AND r.external_id = f.owner_id AND r.deleted_at IS NULL AND json_extract(r.metadata, '$.assignee') = ?)`, "CURRENTLY");
|
|
@@ -50799,14 +50908,15 @@ var crmFilesOver = /* @__PURE__ */ __name((context) => {
|
|
|
50799
50908
|
return;
|
|
50800
50909
|
write(database, () => database.prepare("UPDATE crm_files SET local_path = NULL WHERE account_id = ? AND external_id = ?").run(accountId, externalId));
|
|
50801
50910
|
}, "forgetFile"),
|
|
50802
|
-
find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find")
|
|
50911
|
+
find: /* @__PURE__ */ __name(async (search2) => find2(search2), "find"),
|
|
50912
|
+
limits: /* @__PURE__ */ __name(async (key2) => crmFileLimits(database, key2), "limits")
|
|
50803
50913
|
};
|
|
50804
50914
|
}, "crmFilesOver");
|
|
50805
50915
|
|
|
50806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50807
50917
|
import { createHash as createHash13, randomBytes as randomBytes2 } from "node:crypto";
|
|
50808
50918
|
|
|
50809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
50810
50920
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
50811
50921
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
50812
50922
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -50820,7 +50930,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
50820
50930
|
}, "callbackDataOf");
|
|
50821
50931
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
50822
50932
|
|
|
50823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
50824
50934
|
var digestOf = /* @__PURE__ */ __name((token) => createHash13("sha256").update(token).digest("hex"), "digestOf");
|
|
50825
50935
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
50826
50936
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -50919,7 +51029,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
50919
51029
|
};
|
|
50920
51030
|
}, "decisionRequestStoreOver");
|
|
50921
51031
|
|
|
50922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
50923
51033
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
50924
51034
|
var DAY8 = 864e5;
|
|
50925
51035
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -51306,7 +51416,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51306
51416
|
};
|
|
51307
51417
|
}, "meetingListingOver");
|
|
51308
51418
|
|
|
51309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
51310
51420
|
var DOCUMENT_KINDS = [
|
|
51311
51421
|
"transcript",
|
|
51312
51422
|
"doc",
|
|
@@ -51543,7 +51653,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51543
51653
|
};
|
|
51544
51654
|
}, "documentListingOver");
|
|
51545
51655
|
|
|
51546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
51547
51657
|
var NOTE_FIELDS = [
|
|
51548
51658
|
"text",
|
|
51549
51659
|
"exact",
|
|
@@ -52040,7 +52150,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52040
52150
|
};
|
|
52041
52151
|
}, "noteSearchOver");
|
|
52042
52152
|
|
|
52043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
52044
52154
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
52045
52155
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
52046
52156
|
var EVENT_CORPUS = {
|
|
@@ -52180,7 +52290,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52180
52290
|
};
|
|
52181
52291
|
}, "eventSearchOver");
|
|
52182
52292
|
|
|
52183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
52184
52294
|
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";
|
|
52185
52295
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
52186
52296
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -52443,7 +52553,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52443
52553
|
};
|
|
52444
52554
|
}, "factsStoreOver");
|
|
52445
52555
|
|
|
52446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
52447
52557
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
52448
52558
|
throw new CliError("validation_error", message3);
|
|
52449
52559
|
}, "invalid");
|
|
@@ -52611,7 +52721,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
52611
52721
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
52612
52722
|
}, "findingsCoreOver");
|
|
52613
52723
|
|
|
52614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
52615
52725
|
var stale = /* @__PURE__ */ __name(() => {
|
|
52616
52726
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
52617
52727
|
reason: "evidence-findings.stale"
|
|
@@ -52875,7 +52985,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52875
52985
|
};
|
|
52876
52986
|
}, "evidenceFindingsStoreOver");
|
|
52877
52987
|
|
|
52878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
52879
52989
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
52880
52990
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
52881
52991
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -52929,7 +53039,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
52929
53039
|
}, "forPerson")
|
|
52930
53040
|
}), "involvementStoreOver");
|
|
52931
53041
|
|
|
52932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
52933
53043
|
var LABELLED = {
|
|
52934
53044
|
note: "note",
|
|
52935
53045
|
document: "document",
|
|
@@ -52942,7 +53052,7 @@ var LABELLED = {
|
|
|
52942
53052
|
};
|
|
52943
53053
|
var accountMeetingTagging = /* @__PURE__ */ __name((alias2) => `(${alias2}.taggable_type <> 'meeting' OR EXISTS (SELECT 1 FROM meetings mt WHERE mt.id = ${alias2}.taggable_id AND mt.deleted_at IS NULL AND (? IS NULL OR mt.account_id = ?)))`, "accountMeetingTagging");
|
|
52944
53054
|
|
|
52945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
52946
53056
|
import { createHash as createHash14 } from "node:crypto";
|
|
52947
53057
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
52948
53058
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -53028,7 +53138,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
53028
53138
|
};
|
|
53029
53139
|
}, "meetingProjectsStoreOver");
|
|
53030
53140
|
|
|
53031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
53032
53142
|
var ORGANIZATIONS_QUERY = {
|
|
53033
53143
|
entity: "organization",
|
|
53034
53144
|
backend: "sql",
|
|
@@ -53069,7 +53179,7 @@ var REMINDERS_QUERY = {
|
|
|
53069
53179
|
})
|
|
53070
53180
|
};
|
|
53071
53181
|
|
|
53072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
53073
53183
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
53074
53184
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
53075
53185
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -53090,7 +53200,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
53090
53200
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
53091
53201
|
}, "categorySql");
|
|
53092
53202
|
|
|
53093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
53094
53204
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
53095
53205
|
id: String(row2.id),
|
|
53096
53206
|
ref: `organization:${row2.id}`,
|
|
@@ -53135,7 +53245,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
53135
53245
|
}), "setOwnOrganization")
|
|
53136
53246
|
}), "organizationsStoreOver");
|
|
53137
53247
|
|
|
53138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
53139
53249
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
53140
53250
|
var ACCOUNT_ENDS = [
|
|
53141
53251
|
["deal", "deals"],
|
|
@@ -53298,13 +53408,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
53298
53408
|
__name(proposalItem, "proposalItem");
|
|
53299
53409
|
}, "relationListOver");
|
|
53300
53410
|
|
|
53301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
53302
53412
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
53303
53413
|
...relationListOver(context),
|
|
53304
53414
|
...relationRolesOver(context)
|
|
53305
53415
|
}), "relationReadsOver");
|
|
53306
53416
|
|
|
53307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
53308
53418
|
var TABLES6 = { memory: "memories", fact: "facts" };
|
|
53309
53419
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
53310
53420
|
var DEFAULT_LIMIT = 500;
|
|
@@ -53547,16 +53657,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53547
53657
|
};
|
|
53548
53658
|
}, "sourceReviewStoreOver");
|
|
53549
53659
|
|
|
53550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
53551
53661
|
import { createHash as createHash17 } from "node:crypto";
|
|
53552
53662
|
|
|
53553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
53554
53664
|
import { createHash as createHash16 } from "node:crypto";
|
|
53555
53665
|
|
|
53556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53557
53667
|
import { createHash as createHash15 } from "node:crypto";
|
|
53558
53668
|
|
|
53559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
53560
53670
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
53561
53671
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
53562
53672
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -53607,7 +53717,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
53607
53717
|
return input;
|
|
53608
53718
|
}, "consolidationApplyInput");
|
|
53609
53719
|
|
|
53610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53611
53721
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
53612
53722
|
id: String(row2.id),
|
|
53613
53723
|
sourceId: String(row2.source_id),
|
|
@@ -53682,7 +53792,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
53682
53792
|
}, { beforeCommit: check3 });
|
|
53683
53793
|
}, "applyTagConsolidation");
|
|
53684
53794
|
|
|
53685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
53686
53796
|
var selections = [
|
|
53687
53797
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
53688
53798
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -53826,7 +53936,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
53826
53936
|
};
|
|
53827
53937
|
}, "previewRows");
|
|
53828
53938
|
|
|
53829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
53830
53940
|
var kinds = ["project", "tag", "topic"];
|
|
53831
53941
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
53832
53942
|
if (signal?.aborted)
|
|
@@ -54090,7 +54200,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54090
54200
|
};
|
|
54091
54201
|
}, "vocabularyStoreOver");
|
|
54092
54202
|
|
|
54093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
54094
54204
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
54095
54205
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
54096
54206
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -54644,7 +54754,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
54644
54754
|
return key2.padEnd(3, "X");
|
|
54645
54755
|
}, "projectKey");
|
|
54646
54756
|
|
|
54647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
54648
54758
|
var DAY9 = 864e5;
|
|
54649
54759
|
var SETTING5 = "logs_pruned_at";
|
|
54650
54760
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY9, botUpdatePayloadsMs: 30 * DAY9 };
|
|
@@ -54671,7 +54781,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
54671
54781
|
};
|
|
54672
54782
|
}, "logPruner");
|
|
54673
54783
|
|
|
54674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
54675
54785
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
54676
54786
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
54677
54787
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -55047,7 +55157,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
55047
55157
|
}, "checkMailFindings");
|
|
55048
55158
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
55049
55159
|
|
|
55050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
55051
55161
|
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";
|
|
55052
55162
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
55053
55163
|
const { database, now: now2 } = context;
|
|
@@ -55262,7 +55372,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55262
55372
|
};
|
|
55263
55373
|
}, "ordersStoreOver");
|
|
55264
55374
|
|
|
55265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
55266
55376
|
var MAIL_EDITS = {
|
|
55267
55377
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
55268
55378
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -55751,7 +55861,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
55751
55861
|
};
|
|
55752
55862
|
}, "mailFindingsStoreOver");
|
|
55753
55863
|
|
|
55754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
55755
55865
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
55756
55866
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
55757
55867
|
reason: "meeting-findings.stale"
|
|
@@ -55964,7 +56074,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55964
56074
|
};
|
|
55965
56075
|
}, "meetingFindingsStoreOver");
|
|
55966
56076
|
|
|
55967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
55968
56078
|
var RANK_BATCH = 512;
|
|
55969
56079
|
var LIVE6 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
55970
56080
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -56235,7 +56345,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
56235
56345
|
}
|
|
56236
56346
|
}), "meetingVectorsOver");
|
|
56237
56347
|
|
|
56238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
56239
56349
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
56240
56350
|
var TEXTS = {
|
|
56241
56351
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -56336,7 +56446,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56336
56446
|
};
|
|
56337
56447
|
}, "sourceMentionStoreOver");
|
|
56338
56448
|
|
|
56339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
56340
56450
|
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";
|
|
56341
56451
|
var MAX_SPLITS = 100;
|
|
56342
56452
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -56570,11 +56680,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56570
56680
|
};
|
|
56571
56681
|
}, "transactionsStoreOver");
|
|
56572
56682
|
|
|
56573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
56574
56684
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
56575
56685
|
import { dirname as dirname2 } from "node:path";
|
|
56576
56686
|
|
|
56577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
56578
56688
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
56579
56689
|
var CLIENTS_SETTING = "clients";
|
|
56580
56690
|
var coreVersion = (() => {
|
|
@@ -56635,7 +56745,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
56635
56745
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
56636
56746
|
}, "refusalAdvice");
|
|
56637
56747
|
|
|
56638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
56639
56749
|
var GENERATED = [
|
|
56640
56750
|
{
|
|
56641
56751
|
"name": "20261010184427_initial",
|
|
@@ -58012,10 +58122,30 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
58012
58122
|
"CREATE TRIGGER crm_file_words_au AFTER UPDATE OF normalized_text ON crm_files\n WHEN old.normalized_text IS NOT new.normalized_text BEGIN\n DELETE FROM crm_file_words WHERE rowid = old.id;\n INSERT INTO crm_file_words (rowid, normalized_text)\n SELECT new.id, new.normalized_text WHERE new.normalized_text <> '';\nEND;",
|
|
58013
58123
|
"CREATE TRIGGER crm_file_words_ad AFTER DELETE ON crm_files BEGIN\n DELETE FROM crm_file_words WHERE rowid = old.id;\nEND;"
|
|
58014
58124
|
]
|
|
58125
|
+
},
|
|
58126
|
+
{
|
|
58127
|
+
"name": "20261117015456_version-69-conversation-readiness",
|
|
58128
|
+
"statements": [
|
|
58129
|
+
"CREATE TABLE `conversation_readiness` (\n `chat_id` integer NOT NULL,\n `model` text NOT NULL,\n `new_count` integer NOT NULL,\n `edited_count` integer NOT NULL,\n `deleted_count` integer NOT NULL,\n `chunks` integer NOT NULL,\n `embedded_count` integer NOT NULL,\n `current` integer NOT NULL,\n `stale` integer NOT NULL,\n `counted_at` integer NOT NULL,\n CONSTRAINT `conversation_readiness_pk` PRIMARY KEY(`chat_id`, `model`),\n CONSTRAINT `fk_conversation_readiness_chat_id_chats_id_fk` FOREIGN KEY (`chat_id`) REFERENCES `chats`(`id`) ON DELETE CASCADE\n);",
|
|
58130
|
+
"CREATE INDEX `conversation_readiness_by_model` ON `conversation_readiness` (`model`);"
|
|
58131
|
+
]
|
|
58132
|
+
},
|
|
58133
|
+
{
|
|
58134
|
+
"name": "20261117015457_version-69-conversation-readiness-triggers",
|
|
58135
|
+
"statements": [
|
|
58136
|
+
"-- A stored readiness row stays only while nothing it counts has changed; any such write drops it, and the next\n-- search counts that chat again.\nCREATE TRIGGER conversation_readiness_message_ai AFTER INSERT ON messages BEGIN\n DELETE FROM conversation_readiness WHERE chat_id = NEW.chat_id;\nEND;",
|
|
58137
|
+
"CREATE TRIGGER conversation_readiness_message_au AFTER UPDATE OF chat_id, deleted_at ON messages\nWHEN OLD.chat_id IS NOT NEW.chat_id OR OLD.deleted_at IS NOT NEW.deleted_at BEGIN\n DELETE FROM conversation_readiness WHERE chat_id IN (OLD.chat_id, NEW.chat_id);\nEND;",
|
|
58138
|
+
"CREATE TRIGGER conversation_readiness_message_ad AFTER DELETE ON messages BEGIN\n DELETE FROM conversation_readiness WHERE chat_id = OLD.chat_id;\nEND;",
|
|
58139
|
+
"CREATE TRIGGER conversation_readiness_revision_ai AFTER INSERT ON message_revisions BEGIN\n DELETE FROM conversation_readiness WHERE chat_id = (SELECT chat_id FROM messages WHERE id = NEW.message_id);\nEND;",
|
|
58140
|
+
"CREATE TRIGGER conversation_readiness_state_ai AFTER INSERT ON conversation_state BEGIN\n DELETE FROM conversation_readiness WHERE chat_id = NEW.chat_id;\nEND;",
|
|
58141
|
+
"CREATE TRIGGER conversation_readiness_state_au AFTER UPDATE ON conversation_state BEGIN\n DELETE FROM conversation_readiness WHERE chat_id IN (OLD.chat_id, NEW.chat_id);\nEND;",
|
|
58142
|
+
"-- A chat whose every chunk text already has a vector cannot gain from a new one: (model, content_hash) is unique.\nCREATE TRIGGER conversation_readiness_embedding_ai AFTER INSERT ON embeddings BEGIN\n DELETE FROM conversation_readiness WHERE model = NEW.model AND embedded_count < chunks;\nEND;",
|
|
58143
|
+
"CREATE TRIGGER conversation_readiness_embedding_ad AFTER DELETE ON embeddings BEGIN\n DELETE FROM conversation_readiness WHERE model = OLD.model AND embedded_count > 0;\nEND;"
|
|
58144
|
+
]
|
|
58015
58145
|
}
|
|
58016
58146
|
];
|
|
58017
58147
|
|
|
58018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
58019
58149
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
58020
58150
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
58021
58151
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -58248,7 +58378,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
58248
58378
|
return { ...result, foreignKeyViolations };
|
|
58249
58379
|
}, "rollBack");
|
|
58250
58380
|
|
|
58251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
58252
58382
|
var V31_TABLES = [
|
|
58253
58383
|
"accounts",
|
|
58254
58384
|
"account_identities",
|
|
@@ -58380,7 +58510,9 @@ var MANIFEST = [
|
|
|
58380
58510
|
{ name: "20261110233711_version-66-identity-name-trigger", version: 66, minCompatible: 56 },
|
|
58381
58511
|
{ name: "20261113154357_version-67-fact-removals-call-fields", version: 67, minCompatible: 56 },
|
|
58382
58512
|
{ name: "20261116204138_version-68-crm-files", version: 68, minCompatible: 56 },
|
|
58383
|
-
{ name: "20261116204204_version-68-crm-file-words", version: 68, minCompatible: 56 }
|
|
58513
|
+
{ name: "20261116204204_version-68-crm-file-words", version: 68, minCompatible: 56 },
|
|
58514
|
+
{ name: "20261117015456_version-69-conversation-readiness", version: 69, minCompatible: 56 },
|
|
58515
|
+
{ name: "20261117015457_version-69-conversation-readiness-triggers", version: 69, minCompatible: 56 }
|
|
58384
58516
|
];
|
|
58385
58517
|
var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
|
|
58386
58518
|
const migrations = [];
|
|
@@ -58416,7 +58548,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
58416
58548
|
return migrations;
|
|
58417
58549
|
}, "generatedMigrations");
|
|
58418
58550
|
|
|
58419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
58420
58552
|
var MIGRATIONS = generatedMigrations();
|
|
58421
58553
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
58422
58554
|
version INTEGER PRIMARY KEY,
|
|
@@ -58513,7 +58645,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
58513
58645
|
}
|
|
58514
58646
|
}, "migrate");
|
|
58515
58647
|
|
|
58516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
58517
58649
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
58518
58650
|
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 ?");
|
|
58519
58651
|
if (pending.get(0, 1) === void 0)
|
|
@@ -58535,7 +58667,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
58535
58667
|
}
|
|
58536
58668
|
}, "fillJoinKeys");
|
|
58537
58669
|
|
|
58538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
58539
58671
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
58540
58672
|
refuseOwnerStoreInTests(path);
|
|
58541
58673
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -58549,8 +58681,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
58549
58681
|
}, "openSqlite");
|
|
58550
58682
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
58551
58683
|
quietSqliteWarning();
|
|
58552
|
-
const { drizzle } = await import("./node-
|
|
58553
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
58684
|
+
const { drizzle } = await import("./node-UEWUFR7N.js");
|
|
58685
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FJWKJHYU.js");
|
|
58554
58686
|
const client = await nodeClient(path, { readOnly });
|
|
58555
58687
|
try {
|
|
58556
58688
|
if (!readOnly)
|
|
@@ -58564,8 +58696,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
58564
58696
|
}
|
|
58565
58697
|
}, "openUnderNode");
|
|
58566
58698
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
58567
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
58568
|
-
const { drizzle } = await import("./bun-
|
|
58699
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-MTP5JJQ2.js");
|
|
58700
|
+
const { drizzle } = await import("./bun-M5IGY2TG.js");
|
|
58569
58701
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
58570
58702
|
try {
|
|
58571
58703
|
if (!readOnly)
|
|
@@ -58579,7 +58711,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
58579
58711
|
}
|
|
58580
58712
|
}, "openUnderBun");
|
|
58581
58713
|
|
|
58582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
58583
58715
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
58584
58716
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
58585
58717
|
try {
|
|
@@ -58647,7 +58779,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
58647
58779
|
});
|
|
58648
58780
|
}, "movePaymentFacts");
|
|
58649
58781
|
|
|
58650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
58651
58783
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
58652
58784
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
58653
58785
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -58665,7 +58797,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
58665
58797
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
58666
58798
|
}, "assertReadCompatible");
|
|
58667
58799
|
|
|
58668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
58669
58801
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
58670
58802
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
58671
58803
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -58711,7 +58843,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
58711
58843
|
});
|
|
58712
58844
|
}, "moveSuggestedLinks");
|
|
58713
58845
|
|
|
58714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
58715
58847
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
58716
58848
|
var TEST_PROVIDER = "chat";
|
|
58717
58849
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -58732,7 +58864,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
58732
58864
|
}
|
|
58733
58865
|
}, "purgeTestAccounts");
|
|
58734
58866
|
|
|
58735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
58736
58868
|
var BACKFILL_ON_OPEN = 5e3;
|
|
58737
58869
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
58738
58870
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -58844,7 +58976,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
58844
58976
|
}
|
|
58845
58977
|
}, "openStoreContext");
|
|
58846
58978
|
|
|
58847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
58848
58980
|
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";
|
|
58849
58981
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
58850
58982
|
const { database, now: now2 } = context;
|
|
@@ -58952,13 +59084,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
58952
59084
|
};
|
|
58953
59085
|
}, "productsStoreOver");
|
|
58954
59086
|
|
|
58955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
58956
59088
|
import { createHash as createHash19 } from "node:crypto";
|
|
58957
59089
|
|
|
58958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
58959
59091
|
import { createHash as createHash18 } from "node:crypto";
|
|
58960
59092
|
|
|
58961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
58962
59094
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
58963
59095
|
var ref = text6(2048);
|
|
58964
59096
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59028,7 +59160,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
59028
59160
|
}))
|
|
59029
59161
|
});
|
|
59030
59162
|
|
|
59031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59032
59164
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
59033
59165
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
59034
59166
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -59161,7 +59293,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59161
59293
|
return createHash18("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
59162
59294
|
}, "projectAnnotationsFingerprint");
|
|
59163
59295
|
|
|
59164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59165
59297
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
59166
59298
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
59167
59299
|
var targetSchema = strictObject({
|
|
@@ -59268,7 +59400,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
59268
59400
|
}, "planBoundProjectAnnotations");
|
|
59269
59401
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
59270
59402
|
|
|
59271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
59272
59404
|
import { createHash as createHash20 } from "node:crypto";
|
|
59273
59405
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59274
59406
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59362,7 +59494,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59362
59494
|
})).digest("hex");
|
|
59363
59495
|
}, "projectAnnotationSnapshotFingerprint");
|
|
59364
59496
|
|
|
59365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
59366
59498
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
59367
59499
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
59368
59500
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -59379,7 +59511,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
59379
59511
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
59380
59512
|
}, "projectAnnotationRequest");
|
|
59381
59513
|
|
|
59382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
59383
59515
|
var SnapshotBudget = class {
|
|
59384
59516
|
static {
|
|
59385
59517
|
__name(this, "SnapshotBudget");
|
|
@@ -59405,13 +59537,13 @@ var SnapshotBudget = class {
|
|
|
59405
59537
|
}
|
|
59406
59538
|
};
|
|
59407
59539
|
|
|
59408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59409
59541
|
import { createHash as createHash22 } from "node:crypto";
|
|
59410
59542
|
|
|
59411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
59412
59544
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
59413
59545
|
|
|
59414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
59415
59547
|
import { createHash as createHash21 } from "node:crypto";
|
|
59416
59548
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
59417
59549
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -59554,7 +59686,7 @@ var ProjectSnapshotSources = class {
|
|
|
59554
59686
|
}
|
|
59555
59687
|
};
|
|
59556
59688
|
|
|
59557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
59558
59690
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
59559
59691
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
59560
59692
|
}, "unsupported");
|
|
@@ -59732,7 +59864,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
59732
59864
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
59733
59865
|
}), "projectAnnotationSnapshot");
|
|
59734
59866
|
|
|
59735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59736
59868
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
59737
59869
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
59738
59870
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -59794,7 +59926,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
59794
59926
|
};
|
|
59795
59927
|
}), "previewAnnotationSnapshot");
|
|
59796
59928
|
|
|
59797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
59798
59930
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
59799
59931
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
59800
59932
|
if (link3.kind === "evidence" && to)
|
|
@@ -59861,7 +59993,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
59861
59993
|
return mappings;
|
|
59862
59994
|
}, "restoreAnnotationRecords");
|
|
59863
59995
|
|
|
59864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
59865
59997
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
59866
59998
|
async preview(request) {
|
|
59867
59999
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -59891,7 +60023,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
59891
60023
|
}
|
|
59892
60024
|
}), "projectAnnotationStoreOver");
|
|
59893
60025
|
|
|
59894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
59895
60027
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
59896
60028
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
59897
60029
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -59962,7 +60094,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
59962
60094
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
59963
60095
|
}, "recordRelationsOver");
|
|
59964
60096
|
|
|
59965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
59966
60098
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
59967
60099
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
59968
60100
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -60016,7 +60148,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
60016
60148
|
return { pointedAt, remap };
|
|
60017
60149
|
}, "recordRemapOver");
|
|
60018
60150
|
|
|
60019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
60020
60152
|
var runs = 0;
|
|
60021
60153
|
var PAGE = 500;
|
|
60022
60154
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -60229,7 +60361,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
60229
60361
|
return pointerOf("records", index2, "fields", key2);
|
|
60230
60362
|
}, "waitingPointer");
|
|
60231
60363
|
|
|
60232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
60233
60365
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
60234
60366
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
60235
60367
|
var ORG_EMAIL = "org-email";
|
|
@@ -60395,7 +60527,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
60395
60527
|
]);
|
|
60396
60528
|
}, "renameMade");
|
|
60397
60529
|
|
|
60398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
60399
60531
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
60400
60532
|
name: given(fields4, "name"),
|
|
60401
60533
|
unit: given(fields4, "unit"),
|
|
@@ -60518,7 +60650,7 @@ var DIRECT_PROJECTORS = {
|
|
|
60518
60650
|
lead: dealProjector("lead")
|
|
60519
60651
|
};
|
|
60520
60652
|
|
|
60521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
60522
60654
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
60523
60655
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
60524
60656
|
const text8 = String(fields4.text ?? "");
|
|
@@ -60587,7 +60719,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
60587
60719
|
}
|
|
60588
60720
|
};
|
|
60589
60721
|
|
|
60590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
60591
60723
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
60592
60724
|
const importer = authorActor(context, IMPORTER).actor;
|
|
60593
60725
|
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;
|
|
@@ -60797,7 +60929,7 @@ var MONEY_PROJECTORS = {
|
|
|
60797
60929
|
}
|
|
60798
60930
|
};
|
|
60799
60931
|
|
|
60800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
60801
60933
|
var CALLS_CALENDAR = "calls";
|
|
60802
60934
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
60803
60935
|
if (!isImportedProvider(source2.provider))
|
|
@@ -60972,7 +61104,7 @@ var PHONE_PROJECTORS = {
|
|
|
60972
61104
|
}
|
|
60973
61105
|
};
|
|
60974
61106
|
|
|
60975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
60976
61108
|
var RECORD_PROJECTORS = {
|
|
60977
61109
|
...MONEY_PROJECTORS,
|
|
60978
61110
|
...DIRECT_PROJECTORS,
|
|
@@ -60983,7 +61115,7 @@ var RECORD_PROJECTORS = {
|
|
|
60983
61115
|
project: null
|
|
60984
61116
|
};
|
|
60985
61117
|
|
|
60986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
60987
61119
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
60988
61120
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
60989
61121
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -61045,7 +61177,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
61045
61177
|
return { settle, checkShares };
|
|
61046
61178
|
}, "recordSettlingOver");
|
|
61047
61179
|
|
|
61048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
61049
61181
|
import { createHash as createHash23 } from "node:crypto";
|
|
61050
61182
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
61051
61183
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -61061,7 +61193,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61061
61193
|
return { stamp, untouched };
|
|
61062
61194
|
}, "importStampsOver");
|
|
61063
61195
|
|
|
61064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
61065
61197
|
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";
|
|
61066
61198
|
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";
|
|
61067
61199
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -61298,7 +61430,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61298
61430
|
};
|
|
61299
61431
|
}, "subscriptionsStoreOver");
|
|
61300
61432
|
|
|
61301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
61302
61434
|
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";
|
|
61303
61435
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
61304
61436
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -61423,7 +61555,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61423
61555
|
};
|
|
61424
61556
|
}, "walletsStoreOver");
|
|
61425
61557
|
|
|
61426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
61427
61559
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
61428
61560
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
61429
61561
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -61682,7 +61814,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
61682
61814
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
61683
61815
|
}, "recordWritesOver");
|
|
61684
61816
|
|
|
61685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
61686
61818
|
var LIMIT = 1e3;
|
|
61687
61819
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
61688
61820
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -61906,7 +62038,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61906
62038
|
};
|
|
61907
62039
|
}, "recordStoreOver");
|
|
61908
62040
|
|
|
61909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
61910
62042
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
61911
62043
|
key: row2.key,
|
|
61912
62044
|
channel: row2.channel,
|
|
@@ -61961,7 +62093,7 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
61961
62093
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
61962
62094
|
}, "storedTemplateBodies");
|
|
61963
62095
|
|
|
61964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
61965
62097
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
61966
62098
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
61967
62099
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -61996,7 +62128,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
61996
62128
|
return proxy;
|
|
61997
62129
|
}, "storeErrors");
|
|
61998
62130
|
|
|
61999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
62000
62132
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
62001
62133
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
62002
62134
|
let merged2 = { from: from2, to };
|
|
@@ -62009,7 +62141,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
62009
62141
|
}, "markRange");
|
|
62010
62142
|
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");
|
|
62011
62143
|
|
|
62012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
62013
62145
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
62014
62146
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
62015
62147
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -62030,7 +62162,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
62030
62162
|
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);
|
|
62031
62163
|
}, "setTaskAnalysisMark");
|
|
62032
62164
|
|
|
62033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
62034
62166
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
62035
62167
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
62036
62168
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -62040,7 +62172,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
62040
62172
|
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);
|
|
62041
62173
|
}, "setTaskRulesStop");
|
|
62042
62174
|
|
|
62043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
62044
62176
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62045
62177
|
const { database } = context;
|
|
62046
62178
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -62099,7 +62231,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62099
62231
|
};
|
|
62100
62232
|
}, "syncStoreOver");
|
|
62101
62233
|
|
|
62102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
62103
62235
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62104
62236
|
const { database } = context;
|
|
62105
62237
|
return {
|
|
@@ -62121,7 +62253,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62121
62253
|
};
|
|
62122
62254
|
}, "tagsStoreOver");
|
|
62123
62255
|
|
|
62124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
62125
62257
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
62126
62258
|
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
|
|
62127
62259
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -62248,7 +62380,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
62248
62380
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
62249
62381
|
}, "savePictureChunks");
|
|
62250
62382
|
|
|
62251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
62252
62384
|
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,
|
|
62253
62385
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
62254
62386
|
FROM messages m
|
|
@@ -62337,7 +62469,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
62337
62469
|
return plain2(best(found2));
|
|
62338
62470
|
}, "nearestMessages");
|
|
62339
62471
|
|
|
62340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
62341
62473
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
62342
62474
|
const { database } = context;
|
|
62343
62475
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -62561,9 +62693,11 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
|
62561
62693
|
if (accountPk2 === void 0)
|
|
62562
62694
|
return [];
|
|
62563
62695
|
const chats2 = chatId === void 0 ? builtChats(context, accountPk2, searchableOnly) : [{ chatKey: chatKeyOf(key2, chatId), id: chatId }].flatMap(({ chatKey, id: id2 }) => chatKey === void 0 ? [] : [{ chatKey, id: id2 }]);
|
|
62564
|
-
|
|
62565
|
-
|
|
62566
|
-
|
|
62696
|
+
const since = dataVersion(context);
|
|
62697
|
+
const counted = [];
|
|
62698
|
+
const found2 = chats2.map(({ chatKey, id: id2 }) => {
|
|
62699
|
+
const found3 = readiness(context, chatKey, model, counted);
|
|
62700
|
+
return found3 ? { chatId: id2, ...found3, builtAt: new Date(found3.builtAt).toISOString() } : {
|
|
62567
62701
|
chatId: id2,
|
|
62568
62702
|
builtAt: null,
|
|
62569
62703
|
algorithmVersion: null,
|
|
@@ -62571,6 +62705,8 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
|
62571
62705
|
vectors: { chunks: 0, embedded: 0, current: 0, stale: 0, missing: 0 }
|
|
62572
62706
|
};
|
|
62573
62707
|
});
|
|
62708
|
+
saveReadiness(context, model, counted, since);
|
|
62709
|
+
return found2;
|
|
62574
62710
|
}, "readiness"),
|
|
62575
62711
|
unbuiltGroups: /* @__PURE__ */ __name(async (key2) => {
|
|
62576
62712
|
const accountPk2 = findAccountPk2(key2);
|
|
@@ -62596,7 +62732,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
62596
62732
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
62597
62733
|
}), "vectorsStoreOver");
|
|
62598
62734
|
|
|
62599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
62600
62736
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
62601
62737
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
62602
62738
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -62684,10 +62820,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
62684
62820
|
}
|
|
62685
62821
|
}, "lastBackup");
|
|
62686
62822
|
|
|
62687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
62688
62824
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
62689
62825
|
|
|
62690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
62691
62827
|
var COUNTED_TABLES = [
|
|
62692
62828
|
"accounts",
|
|
62693
62829
|
"chats",
|
|
@@ -62772,7 +62908,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
62772
62908
|
};
|
|
62773
62909
|
}, "storeContents");
|
|
62774
62910
|
|
|
62775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
62776
62912
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
62777
62913
|
const context = await openStoreContext(options);
|
|
62778
62914
|
try {
|
|
@@ -63183,6 +63319,7 @@ export {
|
|
|
63183
63319
|
saveOwnerLanguages,
|
|
63184
63320
|
CRM_LINK_MODES,
|
|
63185
63321
|
COMPANY_TYPE_MEANINGS,
|
|
63322
|
+
CRM_FILE_LIMITS,
|
|
63186
63323
|
crmSettingKey,
|
|
63187
63324
|
parseCrmSetting,
|
|
63188
63325
|
parseCrmSettingValue,
|