@wirecat/hubspot-cli 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/dist/bin/hubspot.js +2 -2
- package/dist/bundle/agent-RBQMA24N.js +40 -0
- package/dist/bundle/{all-profiles-JVEE4PXX.js → all-profiles-PGFXLOKN.js} +11 -11
- package/dist/bundle/{anthropic-6HT57GNF.js → anthropic-LPOJ3TYF.js} +5 -5
- package/dist/bundle/{app-server-FOBFF6G6.js → app-server-EYWGCSRY.js} +68 -68
- package/dist/bundle/{bun-GW443QB3.js → bun-ZJOOKIIW.js} +2 -2
- package/dist/bundle/{bun-sqlite-TGIAICDN.js → bun-sqlite-Y6KKH2OW.js} +6 -6
- package/dist/bundle/{chunk-RFGIUCKU.js → chunk-23CLSKY7.js} +3 -3
- package/dist/bundle/{chunk-ETKLP4VE.js → chunk-34HDRZIL.js} +14 -14
- package/dist/bundle/{chunk-PQUZ2YDC.js → chunk-3CHJYWA2.js} +6 -6
- package/dist/bundle/{chunk-7QH5BZUG.js → chunk-4RZ4DUQT.js} +3 -3
- package/dist/bundle/{chunk-NLZADZ4F.js → chunk-5ENY4POG.js} +61 -61
- package/dist/bundle/{chunk-W5X37TBC.js → chunk-5HGS65I3.js} +2 -2
- package/dist/bundle/{chunk-HPRKSL5S.js → chunk-5UPNDUAA.js} +2 -2
- package/dist/bundle/{chunk-LS4S7PAP.js → chunk-5WADRBQG.js} +3 -3
- package/dist/bundle/{chunk-DBPFHJXX.js → chunk-6PWRJGX4.js} +4 -4
- package/dist/bundle/{chunk-Q7DIEU6L.js → chunk-6S422S22.js} +7 -7
- package/dist/bundle/{chunk-E33KM3DB.js → chunk-7Q64D56R.js} +11 -11
- package/dist/bundle/{chunk-HM72O37C.js → chunk-7RIE3DAW.js} +174 -161
- package/dist/bundle/{chunk-LX7QMRRG.js → chunk-A5UTNGI4.js} +13 -13
- package/dist/bundle/{chunk-FWW2CUXH.js → chunk-ABPZOI3C.js} +4 -4
- package/dist/bundle/{chunk-MQACXJLG.js → chunk-AHZQMSXW.js} +10 -10
- package/dist/bundle/{chunk-3BM6KBWP.js → chunk-AIQT2GGK.js} +19 -19
- package/dist/bundle/{chunk-ATGD64VO.js → chunk-AVBKXCEY.js} +8 -8
- package/dist/bundle/{chunk-3SRGN5MQ.js → chunk-BCW7DAVV.js} +2 -2
- package/dist/bundle/{chunk-QNQ4V4UT.js → chunk-BGUGTMTS.js} +8 -8
- package/dist/bundle/{chunk-EU7AVWSX.js → chunk-BH5FEFZB.js} +2 -2
- package/dist/bundle/{chunk-XDDTJYGA.js → chunk-BVK4GUUI.js} +1254 -803
- package/dist/bundle/{chunk-HQYJ66ZX.js → chunk-BW7NPFVC.js} +18 -8
- package/dist/bundle/{chunk-QJHRRJKD.js → chunk-CWCJEAHZ.js} +3 -3
- package/dist/bundle/{chunk-Z3YOKGVZ.js → chunk-DDMBPYHP.js} +2 -2
- package/dist/bundle/{chunk-3MUHCLRY.js → chunk-DEUCWBBH.js} +81 -5
- package/dist/bundle/{chunk-GJSHLF43.js → chunk-DJUUQG6Y.js} +8 -8
- package/dist/bundle/{chunk-7JVKQ6NM.js → chunk-EGR3YUWD.js} +4 -4
- package/dist/bundle/{chunk-FOLKK6FW.js → chunk-EPBHJMF6.js} +20 -14
- package/dist/bundle/{chunk-VMF2UIQI.js → chunk-GZJP3KQQ.js} +3 -4
- package/dist/bundle/{chunk-YYYRE4AV.js → chunk-HBFSGL5E.js} +26 -26
- package/dist/bundle/{chunk-NL3RKJR6.js → chunk-HPRGUUHY.js} +1 -1
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-HPSESLOZ.js} +1 -1
- package/dist/bundle/{chunk-WBUVNKHJ.js → chunk-I334AT2H.js} +7 -7
- package/dist/bundle/{chunk-K4DWBOO6.js → chunk-K3WCBNH4.js} +6 -6
- package/dist/bundle/{chunk-XCDRFC6G.js → chunk-K5S7MKBB.js} +17 -17
- package/dist/bundle/{chunk-3LMW7U7F.js → chunk-KAW5VEER.js} +21 -8
- package/dist/bundle/{chunk-3MPMYAII.js → chunk-KC4ILAKO.js} +1 -1
- package/dist/bundle/{chunk-UHHXZKB2.js → chunk-KRTXJMCD.js} +16 -16
- package/dist/bundle/{chunk-5KLNBGPU.js → chunk-KXWRVLSU.js} +1 -1
- package/dist/bundle/{chunk-7OJ43BAH.js → chunk-L4SVHQ7H.js} +7 -7
- package/dist/bundle/{chunk-2BCWK5BF.js → chunk-L6WSFVTD.js} +8 -8
- package/dist/bundle/{chunk-A6PVEUGN.js → chunk-LWS5AO3H.js} +17 -17
- package/dist/bundle/{chunk-OLDIP4CV.js → chunk-LXLXF2OE.js} +3 -3
- package/dist/bundle/{chunk-QV4GDVBN.js → chunk-MENMD5Y5.js} +8 -8
- package/dist/bundle/{chunk-EBJYK7UM.js → chunk-MFWECOO3.js} +77 -62
- package/dist/bundle/{chunk-TAF4PKDS.js → chunk-MGMLSPIY.js} +1 -1
- package/dist/bundle/{chunk-F4ZLRS4B.js → chunk-MKBQFD37.js} +1 -1
- package/dist/bundle/{chunk-QIFCH5DZ.js → chunk-MPNMEWHA.js} +341 -278
- package/dist/bundle/{chunk-XMWMA2N5.js → chunk-MPQ4SPZG.js} +46 -32
- package/dist/bundle/{chunk-V23OHBGM.js → chunk-MW4ROXQ6.js} +3 -3
- package/dist/bundle/{chunk-QODPEZC5.js → chunk-NEDV6RCQ.js} +10 -3
- package/dist/bundle/{chunk-F3HJ2E3P.js → chunk-NEP67GLY.js} +6 -6
- package/dist/bundle/{chunk-5G4L6NQJ.js → chunk-NKIKMG33.js} +35 -35
- package/dist/bundle/{chunk-T3GZKV5A.js → chunk-NLPGUYCG.js} +12 -12
- package/dist/bundle/{chunk-6NUXFVJQ.js → chunk-OCISQFMW.js} +1 -1
- package/dist/bundle/{chunk-PKFLSX5F.js → chunk-ODRF47VS.js} +8 -8
- package/dist/bundle/{chunk-WATDMTDC.js → chunk-OFOA6VJ2.js} +3 -3
- package/dist/bundle/{chunk-HM6AMYHR.js → chunk-PMGAU6AP.js} +2 -2
- package/dist/bundle/{chunk-JWO3PB5Z.js → chunk-POTS24SH.js} +18 -18
- package/dist/bundle/{chunk-5ZVYIA56.js → chunk-PPQRWFJZ.js} +5 -5
- package/dist/bundle/{chunk-DG4RBKIV.js → chunk-QCHW7R7L.js} +1 -1
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-QDNYJOWJ.js} +1 -1
- package/dist/bundle/{chunk-M25KVDHA.js → chunk-QIHJKE4K.js} +7 -7
- package/dist/bundle/{chunk-WLFYEAZ6.js → chunk-QLFD3MOL.js} +402 -390
- package/dist/bundle/{chunk-N4EIJ53V.js → chunk-QPTHEZZ5.js} +2 -2
- package/dist/bundle/{chunk-PMJCZIV4.js → chunk-R7ZOCDNG.js} +1 -1
- package/dist/bundle/{chunk-AT43MYQL.js → chunk-RJBKDZGV.js} +8 -8
- package/dist/bundle/{chunk-UIWWAT3C.js → chunk-RZS7N3OZ.js} +7 -7
- package/dist/bundle/{chunk-Z4PY5BDP.js → chunk-SBNZYRVZ.js} +4 -4
- package/dist/bundle/{chunk-4OPN3KCN.js → chunk-STTHRJBX.js} +5 -5
- package/dist/bundle/{chunk-VDAYIXV4.js → chunk-V5VMAHDQ.js} +6 -6
- package/dist/bundle/{chunk-JKNUCEII.js → chunk-VCYUYFIV.js} +1 -1
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-VIJV474N.js} +1 -1
- package/dist/bundle/{chunk-5OBVICFK.js → chunk-WDR77HPO.js} +15 -1
- package/dist/bundle/{chunk-6ULR7N3T.js → chunk-WEM4FZPM.js} +2 -2
- package/dist/bundle/{chunk-FK4LEJZM.js → chunk-WQZENAPE.js} +3 -3
- package/dist/bundle/{chunk-X5U7GLHD.js → chunk-WXEN6AXQ.js} +16 -3
- package/dist/bundle/{chunk-IED6MKPU.js → chunk-YJLJZMEA.js} +25 -25
- package/dist/bundle/{chunk-XJVFXHDI.js → chunk-YQBGPBYN.js} +2 -2
- package/dist/bundle/{chunk-BXZRSXBL.js → chunk-YZ5MULJM.js} +3 -3
- package/dist/bundle/{chunk-2Q2XIXDL.js → chunk-Z7FC6VVM.js} +1 -1
- package/dist/bundle/{chunk-5WKJFMC3.js → chunk-ZKPM53YG.js} +4 -4
- package/dist/bundle/{chunk-V2B2OWTC.js → chunk-ZLWQPUPB.js} +2 -2
- package/dist/bundle/{chunk-GOOXUCJW.js → chunk-ZMHD76RE.js} +2 -2
- package/dist/bundle/command-contract-O2UKYHLD.js +40 -0
- package/dist/bundle/{command-server-entry-OJQ55UA2.js → command-server-entry-B7S5AUE6.js} +28 -28
- package/dist/bundle/{decode-CDQDRPRJ.js → decode-7L33C5UJ.js} +5 -5
- package/dist/bundle/{dispatch-JQBAZWCL.js → dispatch-BIGHHSXV.js} +8 -8
- package/dist/bundle/{echarts-GJ5JJG2A.js → echarts-CWR3QH55.js} +2 -2
- package/dist/bundle/{embed-BUQXGMKR.js → embed-GXQ3HOQ6.js} +6 -6
- package/dist/bundle/{embedder-FCX6LE4O.js → embedder-47OYXGLS.js} +9 -9
- package/dist/bundle/{failure-I6AAF5R5.js → failure-VMZOU5GZ.js} +2 -2
- package/dist/bundle/{first-run-RPYEXXQK.js → first-run-YVQQOUQG.js} +12 -12
- package/dist/bundle/first-screen-TU3KE2B5.js +40 -0
- package/dist/bundle/hubspot.js +27 -25
- package/dist/bundle/{instructions-LPVTPERS.js → instructions-QFS2MPK3.js} +1 -1
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-Z2KZNCXB.js} +2 -2
- package/dist/bundle/meeting-combined-WBEOLQMP.js +25 -0
- package/dist/bundle/{meeting-model-TRGBEWCY.js → meeting-model-GLF2HVJG.js} +11 -11
- package/dist/bundle/{meeting-semantic-RSF5KNKD.js → meeting-semantic-RG56F4YX.js} +6 -6
- package/dist/bundle/{node-UAT3EIAP.js → node-3TSWTXGI.js} +2 -2
- package/dist/bundle/{node-sqlite-3HKDQNFD.js → node-sqlite-UPQCG7DJ.js} +7 -7
- package/dist/bundle/{oauth-DYW2NSZP.js → oauth-MCVEENW3.js} +7 -7
- package/dist/bundle/{open-KBRXJ5BC.js → open-JMUTKUYJ.js} +5 -5
- package/dist/bundle/{openai-YNCLRTSK.js → openai-HT7YDOK7.js} +15 -15
- package/dist/bundle/{process-63BB7LKP.js → process-7RC6DAGM.js} +1 -1
- package/dist/bundle/{program-VX52OB3O.js → program-3DLBMOEJ.js} +134 -114
- package/dist/bundle/{prompt-TWLJ3M2O.js → prompt-7EROPXPF.js} +5 -5
- package/dist/bundle/{recognize-GQ6DLGE7.js → recognize-B232GXD2.js} +4 -4
- package/dist/bundle/{remote-RKNSF3TT.js → remote-HGV64VRC.js} +9 -9
- package/dist/bundle/{rerank-H4HSGQUJ.js → rerank-5S6TDXHD.js} +7 -7
- package/dist/bundle/{schemas-LDK7O6VW.js → schemas-SB42IXEX.js} +1 -1
- package/dist/bundle/{serve-4ZNIAL7H.js → serve-D2WFCV6Z.js} +9 -9
- package/dist/bundle/{server-4G4QB3QN.js → server-4AXPTJPV.js} +60 -60
- package/dist/bundle/server-FFHVNABP.js +86 -0
- package/dist/bundle/{source-2UCNCCO7.js → source-DF63EC2B.js} +114 -86
- package/dist/bundle/{sqlite-runtime-C2JYC7JF.js → sqlite-runtime-DAFMZNLI.js} +6 -6
- package/dist/bundle/{state-3KDXCXHG.js → state-7OEBDXVV.js} +6 -6
- package/dist/bundle/{store-LXLG5HTS.js → store-2ZWSWF76.js} +24 -24
- package/dist/bundle/{store-J5FQBZYR.js → store-KC6US326.js} +22 -22
- package/dist/bundle/store-Q3ZKD4FJ.js +34 -0
- package/dist/bundle/store-maintenance-command-24A4GBRP.js +73 -0
- package/dist/bundle/surface-SPTM57EP.js +72 -0
- package/dist/bundle/writer-EQQ55HOS.js +86 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -2
- package/dist/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/agent-NST4YXJR.js +0 -40
- package/dist/bundle/command-contract-LYX2QNIA.js +0 -40
- package/dist/bundle/first-screen-Y4EH3HZS.js +0 -40
- package/dist/bundle/meeting-combined-FEEVVUGC.js +0 -25
- package/dist/bundle/server-3IYIZEEQ.js +0 -86
- package/dist/bundle/store-2MNUHHZC.js +0 -32
- package/dist/bundle/store-maintenance-command-DDB7TR6V.js +0 -73
- package/dist/bundle/surface-ZTZANYKC.js +0 -72
- package/dist/bundle/writer-X7PGBLDH.js +0 -86
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
analyzerIdentity,
|
|
11
11
|
createStemmer,
|
|
12
12
|
parseStemmers
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BGUGTMTS.js";
|
|
14
14
|
import {
|
|
15
15
|
calendarMoment,
|
|
16
16
|
dayIn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CWCJEAHZ.js";
|
|
18
18
|
import {
|
|
19
19
|
PRESENCE,
|
|
20
20
|
fuseRanked,
|
|
21
21
|
isPresence,
|
|
22
22
|
parseBytes,
|
|
23
23
|
plainQuery
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-I334AT2H.js";
|
|
25
25
|
import {
|
|
26
26
|
ACCOUNT_GROUPS,
|
|
27
27
|
CATEGORIES,
|
|
@@ -59,16 +59,10 @@ import {
|
|
|
59
59
|
runEvent,
|
|
60
60
|
severity,
|
|
61
61
|
sourceOf2 as sourceOf
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YJLJZMEA.js";
|
|
63
63
|
import {
|
|
64
64
|
sqliteCode
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import {
|
|
67
|
-
DEFAULT_TASK_CATEGORIES,
|
|
68
|
-
sharedConfigPath,
|
|
69
|
-
storedTaskCategories,
|
|
70
|
-
taskCategoriesReader
|
|
71
|
-
} from "./chunk-UIWWAT3C.js";
|
|
65
|
+
} from "./chunk-DDMBPYHP.js";
|
|
72
66
|
import {
|
|
73
67
|
AMOUNT_ROLES,
|
|
74
68
|
BARE_INTERNATIONAL_PROVIDERS,
|
|
@@ -119,19 +113,20 @@ import {
|
|
|
119
113
|
typedPhone,
|
|
120
114
|
validCounter,
|
|
121
115
|
wildcardPattern
|
|
122
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-POTS24SH.js";
|
|
123
117
|
import {
|
|
124
118
|
QUERY_LIMITS,
|
|
125
119
|
exhausted,
|
|
126
120
|
outOfTime,
|
|
127
121
|
searchError,
|
|
122
|
+
sqliteLimit,
|
|
128
123
|
tooWideTerm
|
|
129
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-NEDV6RCQ.js";
|
|
130
125
|
import {
|
|
131
126
|
NORMALIZER_VERSION,
|
|
132
127
|
fold,
|
|
133
128
|
normalize
|
|
134
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-KXWRVLSU.js";
|
|
135
130
|
import {
|
|
136
131
|
ADDED_ACCOUNT,
|
|
137
132
|
ADDED_PROVIDER,
|
|
@@ -220,11 +215,11 @@ import {
|
|
|
220
215
|
usableLinkSql,
|
|
221
216
|
useStoredProviders,
|
|
222
217
|
walletLine
|
|
223
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-NLPGUYCG.js";
|
|
224
219
|
import {
|
|
225
220
|
normalizeTag,
|
|
226
221
|
tagOf
|
|
227
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-ZMHD76RE.js";
|
|
228
223
|
import {
|
|
229
224
|
CHAT_MESSAGES_READ,
|
|
230
225
|
FACT_TYPES,
|
|
@@ -280,21 +275,27 @@ import {
|
|
|
280
275
|
validateQuery,
|
|
281
276
|
walkQuery,
|
|
282
277
|
zonedMoment
|
|
283
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-5ENY4POG.js";
|
|
279
|
+
import {
|
|
280
|
+
DEFAULT_TASK_CATEGORIES,
|
|
281
|
+
sharedConfigPath,
|
|
282
|
+
storedTaskCategories,
|
|
283
|
+
taskCategoriesReader
|
|
284
|
+
} from "./chunk-RZS7N3OZ.js";
|
|
284
285
|
import {
|
|
285
286
|
refuseOwnerStoreInTests,
|
|
286
287
|
storePath
|
|
287
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-WEM4FZPM.js";
|
|
288
289
|
import {
|
|
289
290
|
quietSqliteWarning,
|
|
290
291
|
storeCapable
|
|
291
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-3CHJYWA2.js";
|
|
292
293
|
import {
|
|
293
294
|
PRAGMAS,
|
|
294
295
|
TIME_LIMIT_FUNCTION,
|
|
295
296
|
TimeLimitReached,
|
|
296
297
|
isQueryOnly
|
|
297
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-Z7FC6VVM.js";
|
|
298
299
|
import {
|
|
299
300
|
array,
|
|
300
301
|
boolean,
|
|
@@ -320,7 +321,7 @@ import {
|
|
|
320
321
|
CliError,
|
|
321
322
|
isCliError,
|
|
322
323
|
singleLine
|
|
323
|
-
} from "./chunk-
|
|
324
|
+
} from "./chunk-PMGAU6AP.js";
|
|
324
325
|
import {
|
|
325
326
|
SQLiteTable,
|
|
326
327
|
TableAliasProxyHandler,
|
|
@@ -345,7 +346,7 @@ import {
|
|
|
345
346
|
sql,
|
|
346
347
|
sqliteTable,
|
|
347
348
|
text
|
|
348
|
-
} from "./chunk-
|
|
349
|
+
} from "./chunk-QCHW7R7L.js";
|
|
349
350
|
import {
|
|
350
351
|
__commonJS,
|
|
351
352
|
__name,
|
|
@@ -10089,7 +10090,7 @@ var require_cjs = __commonJS({
|
|
|
10089
10090
|
}
|
|
10090
10091
|
});
|
|
10091
10092
|
|
|
10092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
10093
10094
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
10094
10095
|
const methods = whole;
|
|
10095
10096
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -10217,7 +10218,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
10217
10218
|
};
|
|
10218
10219
|
}, "bindAccount");
|
|
10219
10220
|
|
|
10220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
10221
10222
|
var IndexBuilderOn = class {
|
|
10222
10223
|
static {
|
|
10223
10224
|
__name(this, "IndexBuilderOn");
|
|
@@ -10412,7 +10413,7 @@ function alias(table, alias2) {
|
|
|
10412
10413
|
}
|
|
10413
10414
|
__name(alias, "alias");
|
|
10414
10415
|
|
|
10415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
10416
10417
|
var ENTITY_TABLES = {
|
|
10417
10418
|
...RECORD_TABLES,
|
|
10418
10419
|
account: "accounts",
|
|
@@ -10452,7 +10453,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
10452
10453
|
return { table, pointer, type, count: count2, known: known2 };
|
|
10453
10454
|
}).filter(({ count: count2 }) => count2 > 0)), "orphanPointers");
|
|
10454
10455
|
|
|
10455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/identity-links.js
|
|
10456
10457
|
var IDENTITY_LINK_KIND = "identity_link";
|
|
10457
10458
|
var IDENTITY_LINK_SIGNALS = ["agent", "phone", "email", "guest-email", "name", "account"];
|
|
10458
10459
|
var LINK_WEAKNESSES = [
|
|
@@ -10465,7 +10466,7 @@ var LINK_WEAKNESSES = [
|
|
|
10465
10466
|
"not-own-number"
|
|
10466
10467
|
];
|
|
10467
10468
|
|
|
10468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/merged-persons.js
|
|
10469
10470
|
var SEPARATIONS = ["unlink", "split", "undo-merge"];
|
|
10470
10471
|
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");
|
|
10471
10472
|
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");
|
|
@@ -10497,7 +10498,7 @@ var samePersons = /* @__PURE__ */ __name((database, pk) => {
|
|
|
10497
10498
|
}, "samePersons");
|
|
10498
10499
|
var idsOf = /* @__PURE__ */ __name((database, type, id2) => JSON.stringify(type === "person" ? samePersons(database, id2) : [id2]), "idsOf");
|
|
10499
10500
|
|
|
10500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-link-rows.js
|
|
10501
10502
|
var pairOf = /* @__PURE__ */ __name((a, b) => [Number(a), Number(b)].sort((x, y) => x - y).join("-"), "pairOf");
|
|
10502
10503
|
var pkOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
10503
10504
|
const at2 = ref3.indexOf(":");
|
|
@@ -10604,13 +10605,13 @@ var forgetErasedLinks = /* @__PURE__ */ __name((database) => {
|
|
|
10604
10605
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
10605
10606
|
}, "forgetErasedLinks");
|
|
10606
10607
|
|
|
10607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/identity-splits.js
|
|
10608
10609
|
var IDENTITY_SPLIT_KIND = "identity_split";
|
|
10609
10610
|
|
|
10610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
10611
10612
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
10612
10613
|
|
|
10613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
10614
10615
|
var TASK_CLOSE_KIND = "task_close";
|
|
10615
10616
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
10616
10617
|
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");
|
|
@@ -10658,7 +10659,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
10658
10659
|
}, "assertMayDecide");
|
|
10659
10660
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
10660
10661
|
|
|
10661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mail/score.js
|
|
10662
10663
|
var import_disposable_email_domains_js = __toESM(require_dist(), 1);
|
|
10663
10664
|
var import_tldts = __toESM(require_cjs(), 1);
|
|
10664
10665
|
var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
@@ -10688,7 +10689,7 @@ var FREE_MAIL = /* @__PURE__ */ new Set([
|
|
|
10688
10689
|
]);
|
|
10689
10690
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
10690
10691
|
|
|
10691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/address-organization.js
|
|
10692
10693
|
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 ";
|
|
10693
10694
|
var idsOf2 = /* @__PURE__ */ __name((rows) => rows.map((row2) => Number(row2.id)), "idsOf");
|
|
10694
10695
|
var holdAddress = /* @__PURE__ */ __name(({ database, now: now2 }, organization2, email, { method, author }) => {
|
|
@@ -10713,10 +10714,10 @@ var organizationOfAddress = /* @__PURE__ */ __name((context, { name, email, meth
|
|
|
10713
10714
|
return id2;
|
|
10714
10715
|
}, "organizationOfAddress");
|
|
10715
10716
|
|
|
10716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
10717
10718
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10718
10719
|
|
|
10719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/journal.js
|
|
10720
10721
|
import { existsSync, statSync } from "node:fs";
|
|
10721
10722
|
var watched = /* @__PURE__ */ new WeakMap();
|
|
10722
10723
|
var walInode = /* @__PURE__ */ __name((store) => statSync(`${store}-wal`, { throwIfNoEntry: false })?.ino, "walInode");
|
|
@@ -10742,7 +10743,7 @@ var checkJournal = /* @__PURE__ */ __name((database) => {
|
|
|
10742
10743
|
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" });
|
|
10743
10744
|
}, "checkJournal");
|
|
10744
10745
|
|
|
10745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/write-events.js
|
|
10746
10747
|
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;
|
|
10747
10748
|
var writeTarget = /* @__PURE__ */ __name((sql2) => {
|
|
10748
10749
|
const match = WRITE.exec(sql2);
|
|
@@ -10822,7 +10823,7 @@ var committedWrites = /* @__PURE__ */ __name((database) => {
|
|
|
10822
10823
|
}, "committedWrites");
|
|
10823
10824
|
var droppedWrites = /* @__PURE__ */ __name((database) => tallies.get(database)?.pending.clear(), "droppedWrites");
|
|
10824
10825
|
|
|
10825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
10826
10827
|
var ARMS = [
|
|
10827
10828
|
[
|
|
10828
10829
|
"message",
|
|
@@ -10950,7 +10951,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
10950
10951
|
return recomputed;
|
|
10951
10952
|
}, "drainInvolvementQueue");
|
|
10952
10953
|
|
|
10953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
10954
10955
|
import { domainToUnicode } from "node:url";
|
|
10955
10956
|
|
|
10956
10957
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -20972,7 +20973,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
20972
20973
|
}, "oa");
|
|
20973
20974
|
var na = { parse: O, get: aa, isValid: oa };
|
|
20974
20975
|
|
|
20975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
20976
20977
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
20977
20978
|
var ID = /^[\w-]{10,}$/;
|
|
20978
20979
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -21014,7 +21015,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text8) => [...text8.matchAll(L
|
|
|
21014
21015
|
return { url, documentId: googleDocumentId(url) };
|
|
21015
21016
|
}), "googleDocumentLinks");
|
|
21016
21017
|
|
|
21017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
21018
21019
|
var BEFORE = [
|
|
21019
21020
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
21020
21021
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -21274,7 +21275,7 @@ var findPlaces = /* @__PURE__ */ __name((text8) => {
|
|
|
21274
21275
|
return found2.sort((a, b) => a.start - b.start);
|
|
21275
21276
|
}, "findPlaces");
|
|
21276
21277
|
|
|
21277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
21278
21279
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
21279
21280
|
var MENTION_VERSIONS = {
|
|
21280
21281
|
phone: 1,
|
|
@@ -21450,7 +21451,7 @@ var exactlyOne = /* @__PURE__ */ __name((text8, options) => {
|
|
|
21450
21451
|
return one2 && one2.start === 0 && one2.end === text8.length ? one2.value : void 0;
|
|
21451
21452
|
}, "exactlyOne");
|
|
21452
21453
|
|
|
21453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
21454
21455
|
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";
|
|
21455
21456
|
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";
|
|
21456
21457
|
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";
|
|
@@ -21458,7 +21459,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
21458
21459
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
21459
21460
|
var NAME_WORDS = WORDS.split(" ");
|
|
21460
21461
|
|
|
21461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
21462
21463
|
var LATIN_TO_CYRILLIC = {
|
|
21463
21464
|
shch: "\u0449",
|
|
21464
21465
|
sch: "\u0449",
|
|
@@ -21666,7 +21667,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text8, stem, taken) => {
|
|
|
21666
21667
|
return found2;
|
|
21667
21668
|
}, "findUnknownNames");
|
|
21668
21669
|
|
|
21669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
21670
21671
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
21671
21672
|
"webpage",
|
|
21672
21673
|
"share",
|
|
@@ -21707,7 +21708,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored4, files2) => {
|
|
|
21707
21708
|
});
|
|
21708
21709
|
}, "matchDownloads");
|
|
21709
21710
|
|
|
21710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
21711
21712
|
var PRESET_VERSION = 1;
|
|
21712
21713
|
var PRESETS = {
|
|
21713
21714
|
password: {
|
|
@@ -21761,12 +21762,12 @@ var PRESETS = {
|
|
|
21761
21762
|
}
|
|
21762
21763
|
};
|
|
21763
21764
|
|
|
21764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
21765
21766
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
21766
21767
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
21767
21768
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
21768
21769
|
|
|
21769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
21770
21771
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
21771
21772
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
21772
21773
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -21790,7 +21791,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
21790
21791
|
};
|
|
21791
21792
|
}, "linkMatch");
|
|
21792
21793
|
|
|
21793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
21794
21795
|
var SETTING = "phoneCountries";
|
|
21795
21796
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
21796
21797
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -21821,7 +21822,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
21821
21822
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
21822
21823
|
}, "valueMatch");
|
|
21823
21824
|
|
|
21824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
21825
21826
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
21826
21827
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
21827
21828
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -21849,7 +21850,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
21849
21850
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
21850
21851
|
}, "vocabularySimilarity");
|
|
21851
21852
|
|
|
21852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
21853
21854
|
import { createHash } from "node:crypto";
|
|
21854
21855
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
21855
21856
|
try {
|
|
@@ -21915,7 +21916,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
21915
21916
|
});
|
|
21916
21917
|
}, "guardTagCreation");
|
|
21917
21918
|
|
|
21918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
21919
21920
|
var invalid = /* @__PURE__ */ __name((message3) => {
|
|
21920
21921
|
throw new CliError("validation_error", message3);
|
|
21921
21922
|
}, "invalid");
|
|
@@ -21992,7 +21993,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
21992
21993
|
};
|
|
21993
21994
|
}, "createTagRedirectIndex");
|
|
21994
21995
|
|
|
21995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
21996
21997
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
21997
21998
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
21998
21999
|
if (!row2)
|
|
@@ -22020,7 +22021,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
22020
22021
|
return snapshot2;
|
|
22021
22022
|
}, "tagRedirectSnapshot");
|
|
22022
22023
|
|
|
22023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
22024
22025
|
import { createHash as createHash2 } from "node:crypto";
|
|
22025
22026
|
var TASK_KEY_PREFIXES = {
|
|
22026
22027
|
question: "Q",
|
|
@@ -22048,7 +22049,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22048
22049
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
22049
22050
|
}, "taskAccountOf");
|
|
22050
22051
|
|
|
22051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
22052
22053
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
22053
22054
|
var REFERABLE = {
|
|
22054
22055
|
...Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, { tombstone: tombstone2 }]) => [type, { tombstone: tombstone2 }])),
|
|
@@ -22212,7 +22213,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
22212
22213
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
22213
22214
|
}, "taskIdOf");
|
|
22214
22215
|
|
|
22215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
22216
22217
|
var toMs = /* @__PURE__ */ __name((iso17) => {
|
|
22217
22218
|
if (iso17 === null || iso17 === void 0)
|
|
22218
22219
|
return null;
|
|
@@ -22226,7 +22227,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
22226
22227
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
22227
22228
|
var deliveryOf = /* @__PURE__ */ __name((stored4) => stored4 === DELIVERY.read ? "read" : stored4 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
22228
22229
|
|
|
22229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
22230
22231
|
var TAG_KINDS = ["tag", "topic"];
|
|
22231
22232
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
22232
22233
|
var TAG_TYPE = {
|
|
@@ -22429,7 +22430,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
22429
22430
|
return result;
|
|
22430
22431
|
}, "tagsOf");
|
|
22431
22432
|
|
|
22432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/trigram-match.js
|
|
22433
22434
|
var MOST_YO_SPELLINGS = 64;
|
|
22434
22435
|
var yoSpellings = /* @__PURE__ */ __name((run) => {
|
|
22435
22436
|
let spellings2 = [""];
|
|
@@ -22451,7 +22452,7 @@ var anyCaseGlob = /* @__PURE__ */ __name((word2) => `*${[...word2.normalize("NFC
|
|
|
22451
22452
|
return forms2.size === 1 ? c : `[${[...forms2].join("")}]`;
|
|
22452
22453
|
}).join("")}*`, "anyCaseGlob");
|
|
22453
22454
|
|
|
22454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
22455
22456
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
22456
22457
|
var SPEECH = speech("att");
|
|
22457
22458
|
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");
|
|
@@ -22939,7 +22940,7 @@ var FIELD_COMPILERS = {
|
|
|
22939
22940
|
subject
|
|
22940
22941
|
};
|
|
22941
22942
|
|
|
22942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
22943
22944
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
22944
22945
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
22945
22946
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -22955,7 +22956,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
22955
22956
|
};
|
|
22956
22957
|
}, "placeOf");
|
|
22957
22958
|
|
|
22958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
22959
22960
|
var DRAIN_ON_WRITE = 500;
|
|
22960
22961
|
var METHOD = "rules";
|
|
22961
22962
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -23121,7 +23122,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
23121
23122
|
return queued.length;
|
|
23122
23123
|
}, "drainMentions");
|
|
23123
23124
|
|
|
23124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
23125
23126
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
23126
23127
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
23127
23128
|
if (!exists2)
|
|
@@ -23129,7 +23130,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
23129
23130
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
23130
23131
|
}, "indexRow");
|
|
23131
23132
|
|
|
23132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
23133
23134
|
var INDEX = "message_stems";
|
|
23134
23135
|
var SETTING2 = "searchStemmers";
|
|
23135
23136
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -23255,7 +23256,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
23255
23256
|
};
|
|
23256
23257
|
}, "stemmerCache");
|
|
23257
23258
|
|
|
23258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
23259
23260
|
var rehearsal = new AsyncLocalStorage();
|
|
23260
23261
|
var SQLITE_BUSY = 5;
|
|
23261
23262
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
@@ -23398,7 +23399,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
23398
23399
|
}
|
|
23399
23400
|
}, "read");
|
|
23400
23401
|
|
|
23401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
23402
23403
|
var FOLDED = [
|
|
23403
23404
|
{ table: "tasks", column: "title" },
|
|
23404
23405
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -23435,7 +23436,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
23435
23436
|
return filled;
|
|
23436
23437
|
}, "fillFolded");
|
|
23437
23438
|
|
|
23438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
23439
23440
|
import { createHash as createHash3 } from "node:crypto";
|
|
23440
23441
|
var CHUNK_CHARS = 1200;
|
|
23441
23442
|
var CHUNK_OVERLAP = 150;
|
|
@@ -23540,7 +23541,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
23540
23541
|
return chunks2;
|
|
23541
23542
|
}, "cutChunks");
|
|
23542
23543
|
|
|
23543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
23544
23545
|
var DAY = 864e5;
|
|
23545
23546
|
var CURRENCY = [
|
|
23546
23547
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -23666,7 +23667,7 @@ var dueDayOf = /* @__PURE__ */ __name((text8, createdMs) => {
|
|
|
23666
23667
|
return best?.day ?? null;
|
|
23667
23668
|
}, "dueDayOf");
|
|
23668
23669
|
|
|
23669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
23670
23671
|
var DAY2 = 864e5;
|
|
23671
23672
|
var STOP_WORDS = new Set([
|
|
23672
23673
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -23821,7 +23822,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
23821
23822
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
23822
23823
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
23823
23824
|
|
|
23824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
23825
23826
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
23826
23827
|
coalesce(CASE k.chunkable_type
|
|
23827
23828
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -23963,7 +23964,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
23963
23964
|
}, "dropUnusedVectors");
|
|
23964
23965
|
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");
|
|
23965
23966
|
|
|
23966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
23967
23968
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
23968
23969
|
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
23969
23970
|
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
@@ -24308,7 +24309,7 @@ var vectorCounts = /* @__PURE__ */ __name(({ orm }, models) => new Map(models.ma
|
|
|
24308
24309
|
Number(orm.get(sql`SELECT count(*) AS n FROM embeddings WHERE model = ${model}`)?.n ?? 0)
|
|
24309
24310
|
])), "vectorCounts");
|
|
24310
24311
|
|
|
24311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
24312
24313
|
var DOCUMENT_PICTURE = "document_picture";
|
|
24313
24314
|
var SCAN_PAGE2 = 5e3;
|
|
24314
24315
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -24371,12 +24372,12 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
24371
24372
|
}, "nearestPictures")
|
|
24372
24373
|
}), "documentPicturesOver");
|
|
24373
24374
|
|
|
24374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/index-text.js
|
|
24375
24376
|
var noteIndexText = /* @__PURE__ */ __name((title2, text8) => title2 ? `${title2}
|
|
24376
24377
|
|
|
24377
24378
|
${text8}` : text8, "noteIndexText");
|
|
24378
24379
|
|
|
24379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/enrichments.js
|
|
24380
24381
|
var ENRICHMENT_SUBJECTS = ["document", "note", "email"];
|
|
24381
24382
|
var ENRICHMENT_POSITION = 1e6;
|
|
24382
24383
|
var EMAIL_ENRICHMENT = "email_enrichment";
|
|
@@ -24470,7 +24471,7 @@ var enrichmentsOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
|
24470
24471
|
}), "clear")
|
|
24471
24472
|
}), "enrichmentsOver");
|
|
24472
24473
|
|
|
24473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
24474
24475
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
24475
24476
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
24476
24477
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -24546,7 +24547,7 @@ var compile = /* @__PURE__ */ __name((node, columns2, options) => {
|
|
|
24546
24547
|
var queryFilter = /* @__PURE__ */ __name((ast, columns2, options) => compile(ast.root, columns2, options), "queryFilter");
|
|
24547
24548
|
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");
|
|
24548
24549
|
|
|
24549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
24550
24551
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
24551
24552
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
24552
24553
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -24636,7 +24637,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
24636
24637
|
});
|
|
24637
24638
|
}, "linkMeeting");
|
|
24638
24639
|
|
|
24639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-titles.js
|
|
24640
24641
|
var MAX_TITLE = 120;
|
|
24641
24642
|
var placeholderTitleOf = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "placeholderTitleOf");
|
|
24642
24643
|
var PLACEHOLDER_TITLE_SQL = "title = type || ' \u2014 ' || coalesce(source_locator, '')";
|
|
@@ -24698,7 +24699,7 @@ var fillFoundTaskTitles = /* @__PURE__ */ __name((database, warn, { batch = 500
|
|
|
24698
24699
|
}
|
|
24699
24700
|
}, "fillFoundTaskTitles");
|
|
24700
24701
|
|
|
24701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
24702
24703
|
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), ''))";
|
|
24703
24704
|
var UNSEARCHED_EVENT_TYPES = [
|
|
24704
24705
|
"working-location",
|
|
@@ -24945,7 +24946,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
24945
24946
|
return true;
|
|
24946
24947
|
}, "resetNoteIndex");
|
|
24947
24948
|
|
|
24948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
24949
24950
|
var keyOf2 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
24950
24951
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
24951
24952
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf2))) {
|
|
@@ -24964,7 +24965,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
24964
24965
|
}
|
|
24965
24966
|
}, "resolvePersonLinks");
|
|
24966
24967
|
|
|
24967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
24968
24969
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
24969
24970
|
id: integer("id").primaryKey(),
|
|
24970
24971
|
name: text("name").notNull().unique(),
|
|
@@ -24973,7 +24974,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
24973
24974
|
updatedAt: integer("updated_at").notNull()
|
|
24974
24975
|
});
|
|
24975
24976
|
|
|
24976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/link-revisions.js
|
|
24977
24978
|
var linkRevisions = sqliteTable("link_revisions", {
|
|
24978
24979
|
id: integer("id").primaryKey(),
|
|
24979
24980
|
linkId: integer("link_id").notNull(),
|
|
@@ -24985,7 +24986,7 @@ var linkRevisions = sqliteTable("link_revisions", {
|
|
|
24985
24986
|
createdAt: integer("created_at").notNull()
|
|
24986
24987
|
}, (table) => [index("link_revisions_by_link_id_created_at").on(table.linkId, table.createdAt)]);
|
|
24987
24988
|
|
|
24988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
24989
24990
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
24990
24991
|
sourceKey: text("source_key").notNull(),
|
|
24991
24992
|
collection: text("collection").notNull(),
|
|
@@ -24995,13 +24996,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
24995
24996
|
createdAt: integer("created_at").notNull()
|
|
24996
24997
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
24997
24998
|
|
|
24998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
24999
25000
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
25000
25001
|
id: integer("id").notNull(),
|
|
25001
25002
|
indexableType: text("indexable_type").notNull()
|
|
25002
25003
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
25003
25004
|
|
|
25004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/decision-requests.js
|
|
25005
25006
|
var decisionRequests = sqliteTable("decision_requests", {
|
|
25006
25007
|
id: integer("id").primaryKey(),
|
|
25007
25008
|
tokenDigest: text("token_digest").notNull().unique(),
|
|
@@ -25021,7 +25022,7 @@ var decisionRequests = sqliteTable("decision_requests", {
|
|
|
25021
25022
|
index("decision_requests_by_channel_bot_profile_chat_id_message_id").on(table.channel, table.botProfile, table.chatId, table.messageId)
|
|
25022
25023
|
]);
|
|
25023
25024
|
|
|
25024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/enrichments.js
|
|
25025
25026
|
var enrichments = sqliteTable("enrichments", {
|
|
25026
25027
|
subjectType: text("subject_type").notNull(),
|
|
25027
25028
|
subjectId: integer("subject_id").notNull(),
|
|
@@ -25033,7 +25034,7 @@ var enrichments = sqliteTable("enrichments", {
|
|
|
25033
25034
|
createdAt: integer("created_at").notNull()
|
|
25034
25035
|
}, (table) => [primaryKey({ columns: [table.subjectType, table.subjectId] })]);
|
|
25035
25036
|
|
|
25036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/templates.js
|
|
25037
25038
|
var templates = sqliteTable("templates", {
|
|
25038
25039
|
key: text("key").notNull(),
|
|
25039
25040
|
channel: text("channel").notNull(),
|
|
@@ -25055,7 +25056,7 @@ var templatesHistory = sqliteTable("templates_history", {
|
|
|
25055
25056
|
index("templates_history_by_key_channel_language_id").on(table.key, table.channel, table.language, table.id)
|
|
25056
25057
|
]);
|
|
25057
25058
|
|
|
25058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/links.js
|
|
25059
25060
|
var links = sqliteTable("links", {
|
|
25060
25061
|
id: integer("id").primaryKey(),
|
|
25061
25062
|
fromType: text("from_type").notNull(),
|
|
@@ -25086,7 +25087,7 @@ var links = sqliteTable("links", {
|
|
|
25086
25087
|
index("links_by_to_type_to_id").on(table.toType, table.toId)
|
|
25087
25088
|
]);
|
|
25088
25089
|
|
|
25089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
25090
25091
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
25091
25092
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
25092
25093
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -25112,7 +25113,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
25112
25113
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
25113
25114
|
]);
|
|
25114
25115
|
|
|
25115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
25116
25117
|
var accounts = sqliteTable("accounts", {
|
|
25117
25118
|
id: integer("id").primaryKey(),
|
|
25118
25119
|
provider: text("provider").notNull(),
|
|
@@ -27279,7 +27280,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
27279
27280
|
at: integer("at").notNull()
|
|
27280
27281
|
});
|
|
27281
27282
|
|
|
27282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
27283
27284
|
var contactsOf = /* @__PURE__ */ __name(({ phones: phones2, emails: emails3 }) => {
|
|
27284
27285
|
if (phones2 === void 0 && emails3 === void 0)
|
|
27285
27286
|
return void 0;
|
|
@@ -27525,7 +27526,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
27525
27526
|
}, "meetingIdentityPk");
|
|
27526
27527
|
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");
|
|
27527
27528
|
|
|
27528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-separation.js
|
|
27529
27530
|
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");
|
|
27530
27531
|
var MOVED_AWAY = `moved.identity_id IN (SELECT value FROM json_each(?))
|
|
27531
27532
|
AND (moved.from_person_id IN (SELECT value FROM json_each(?))
|
|
@@ -27540,7 +27541,7 @@ var apart = /* @__PURE__ */ __name(({ database }, one2, other) => {
|
|
|
27540
27541
|
var separated = /* @__PURE__ */ __name((context, one2, other) => one2 !== other && apart(context, { identities: identitiesOf(context, one2), person: one2 }, { identities: identitiesOf(context, other), person: other }), "separated");
|
|
27541
27542
|
var identitySeparated = /* @__PURE__ */ __name((context, identity, person2) => apart(context, { identities: [identity] }, { identities: identitiesOf(context, person2).filter((pk) => pk !== identity), person: person2 }), "identitySeparated");
|
|
27542
27543
|
|
|
27543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
27544
27545
|
var MESSAGE_FIELDS = {
|
|
27545
27546
|
pk: messages.id,
|
|
27546
27547
|
nativeId: messages.externalId,
|
|
@@ -27720,7 +27721,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
27720
27721
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
27721
27722
|
}), "chatActivity");
|
|
27722
27723
|
|
|
27723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
27724
27725
|
var HIT_FIELDS = {
|
|
27725
27726
|
...MESSAGE_FIELDS,
|
|
27726
27727
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -27821,7 +27822,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
27821
27822
|
};
|
|
27822
27823
|
}, "directReplies");
|
|
27823
27824
|
|
|
27824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
27825
27826
|
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");
|
|
27826
27827
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
27827
27828
|
const found2 = identityRow(context, ref3);
|
|
@@ -28034,7 +28035,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
28034
28035
|
}, "mentioning");
|
|
28035
28036
|
var escaped = /* @__PURE__ */ __name((text8) => text8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
28036
28037
|
|
|
28037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
28038
28039
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
28039
28040
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
28040
28041
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -28091,7 +28092,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
28091
28092
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
28092
28093
|
}, "proposedBySql");
|
|
28093
28094
|
|
|
28094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review-marks.js
|
|
28095
28096
|
var TABLES = { memory: "memories", fact: "facts" };
|
|
28096
28097
|
var HOLDING = { memory: ["proposed", "confirmed"], fact: ["proposed", "accepted"] };
|
|
28097
28098
|
var KEPT = 20;
|
|
@@ -28186,7 +28187,7 @@ var scrubSourceReviews = /* @__PURE__ */ __name((database, erased, { refs }) =>
|
|
|
28186
28187
|
return scrubbed;
|
|
28187
28188
|
}, "scrubSourceReviews");
|
|
28188
28189
|
|
|
28189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-signature.js
|
|
28190
28191
|
var QUOTE_LIMIT = 500;
|
|
28191
28192
|
var GONE = { sig: "gone", rev: null, deleted: true, changedAt: null };
|
|
28192
28193
|
var part = /* @__PURE__ */ __name((value) => value == null ? "" : String(value), "part");
|
|
@@ -28465,11 +28466,11 @@ var deleteDocumentRow = /* @__PURE__ */ __name((database, id2, at2) => {
|
|
|
28465
28466
|
database.prepare("DELETE FROM documents WHERE id = ?").run(id2);
|
|
28466
28467
|
}, "deleteDocumentRow");
|
|
28467
28468
|
|
|
28468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
28469
28470
|
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");
|
|
28470
28471
|
var oneLine = /* @__PURE__ */ __name((text8) => singleLine(text8.replace(/\s+/g, " ").trim()), "oneLine");
|
|
28471
28472
|
|
|
28472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-accounts.js
|
|
28473
28474
|
var accountKeys = /* @__PURE__ */ __name((database, ids3) => {
|
|
28474
28475
|
const unique2 = [...new Set(ids3)];
|
|
28475
28476
|
if (unique2.length === 0)
|
|
@@ -28558,7 +28559,7 @@ var refEndsOf = /* @__PURE__ */ __name((database, text8) => {
|
|
|
28558
28559
|
}, "refEndsOf");
|
|
28559
28560
|
var refAccountsOf = /* @__PURE__ */ __name((database, text8) => refEndsOf(database, text8)?.flat(), "refAccountsOf");
|
|
28560
28561
|
|
|
28561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
28562
28563
|
var EXCERPT_CHARS = 280;
|
|
28563
28564
|
var TITLE_CHARS = 120;
|
|
28564
28565
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -28982,7 +28983,7 @@ var refsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
28982
28983
|
ends: /* @__PURE__ */ __name(async (text8) => refEndsOf(context.database, text8), "ends")
|
|
28983
28984
|
}), "refsStoreOver");
|
|
28984
28985
|
|
|
28985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
28986
28987
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
28987
28988
|
ref: ref3,
|
|
28988
28989
|
kind: read2.kind,
|
|
@@ -29020,7 +29021,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
29020
29021
|
});
|
|
29021
29022
|
}, "evidenceSourcesOf");
|
|
29022
29023
|
|
|
29023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
29024
29025
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
29025
29026
|
var MAX_TEXT_CHARS = 2e6;
|
|
29026
29027
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -29046,7 +29047,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
29046
29047
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
29047
29048
|
}, "pdfPreviewLimits");
|
|
29048
29049
|
|
|
29049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
29050
29051
|
import { randomBytes } from "node:crypto";
|
|
29051
29052
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
29052
29053
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -29059,7 +29060,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
29059
29060
|
return time3 + random;
|
|
29060
29061
|
}, "ulid");
|
|
29061
29062
|
|
|
29062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
29063
29064
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
29064
29065
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
29065
29066
|
if (!meta && !sections?.length)
|
|
@@ -29080,11 +29081,11 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
29080
29081
|
return typeof language === "string" && language !== "" ? language : null;
|
|
29081
29082
|
}, "languageOf");
|
|
29082
29083
|
|
|
29083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/file-note.js
|
|
29084
29085
|
var LIVE3 = "f.deleted_at IS NULL AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1";
|
|
29085
29086
|
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");
|
|
29086
29087
|
|
|
29087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
29088
29089
|
var isObject2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
29089
29090
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
29090
29091
|
if (isObject2(value))
|
|
@@ -29331,7 +29332,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29331
29332
|
};
|
|
29332
29333
|
}, "filesStoreOver");
|
|
29333
29334
|
|
|
29334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
29335
29336
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
29336
29337
|
entity: "document",
|
|
29337
29338
|
backend: "sql",
|
|
@@ -29377,7 +29378,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
29377
29378
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns2, { zone: timezoneOf() });
|
|
29378
29379
|
}, "importedDocumentWhere");
|
|
29379
29380
|
|
|
29380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
29381
29382
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
29382
29383
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
29383
29384
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -29385,7 +29386,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
29385
29386
|
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);
|
|
29386
29387
|
}, "reviewLink");
|
|
29387
29388
|
|
|
29388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/link-row.js
|
|
29389
29390
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29390
29391
|
var thingRef = /* @__PURE__ */ __name((database, type, id2) => type == null || id2 == null ? null : referenceOfThing(database, storedThing(type, id2)) ?? null, "thingRef");
|
|
29391
29392
|
var hasBothEnds = /* @__PURE__ */ __name((link3) => link3.from !== null && link3.to !== null, "hasBothEnds");
|
|
@@ -29419,7 +29420,7 @@ var linkOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
29419
29420
|
};
|
|
29420
29421
|
}, "linkOf");
|
|
29421
29422
|
|
|
29422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/note-dates.js
|
|
29423
29424
|
var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
29424
29425
|
const fileAt = database.prepare("SELECT id, document_id FROM files WHERE account_id = ? AND external_id = ? AND kind <> 'folder' AND deleted_at IS NULL");
|
|
29425
29426
|
const legacy = database.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL");
|
|
@@ -29440,7 +29441,7 @@ var dateFileNotes = /* @__PURE__ */ __name((database, folder, dates) => {
|
|
|
29440
29441
|
return changed;
|
|
29441
29442
|
}, "dateFileNotes");
|
|
29442
29443
|
|
|
29443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/text-input.js
|
|
29444
29445
|
var textOf2 = /* @__PURE__ */ __name((text8, what, max = 1e5, allowEmpty = false) => {
|
|
29445
29446
|
const value = text8.trim();
|
|
29446
29447
|
if (!value && !allowEmpty || value.length > max)
|
|
@@ -29453,7 +29454,7 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
|
29453
29454
|
return value;
|
|
29454
29455
|
}, "oneOf");
|
|
29455
29456
|
|
|
29456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
29457
29458
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
29458
29459
|
var RELATIONSHIPS = RELATION_KINDS.map(linkKind).join(", ");
|
|
29459
29460
|
var iso4 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
@@ -29975,10 +29976,10 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29975
29976
|
};
|
|
29976
29977
|
}, "notesStoreOver");
|
|
29977
29978
|
|
|
29978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/rows-page.js
|
|
29979
29980
|
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");
|
|
29980
29981
|
|
|
29981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
29982
29983
|
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";
|
|
29983
29984
|
var iso5 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
29984
29985
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30243,7 +30244,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30243
30244
|
};
|
|
30244
30245
|
}, "memoriesStoreOver");
|
|
30245
30246
|
|
|
30246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/reviewed.js
|
|
30247
30248
|
var prefixesText = /* @__PURE__ */ __name((types) => `${article(types[0] ?? "")} ${types.map((type) => `${type}:`).join(" or ")}`, "prefixesText");
|
|
30248
30249
|
var refuse = /* @__PURE__ */ __name((message3, reason, code = "validation_error") => {
|
|
30249
30250
|
throw new CliError(code, message3, { reason });
|
|
@@ -30391,7 +30392,7 @@ var reviewedRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
30391
30392
|
return { partyOf, partyThing, reviewedOf, written, keepEvidence, ownerOnly: ownerOnly2, linkedId, ...decisionsOver(context) };
|
|
30392
30393
|
}, "reviewedRowsOver");
|
|
30393
30394
|
|
|
30394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/money-lines.js
|
|
30395
30396
|
var MAX_LINES = 500;
|
|
30396
30397
|
var PARENTS = {
|
|
30397
30398
|
invoice: {
|
|
@@ -30491,7 +30492,7 @@ var moneyLinesOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
30491
30492
|
return { linesOf, insertLines, shownLines, appendLine, deleteLine, sumOf, retotal };
|
|
30492
30493
|
}, "moneyLinesOver");
|
|
30493
30494
|
|
|
30494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/refunds.js
|
|
30495
30496
|
var COUNTED = {
|
|
30496
30497
|
confirmed: "np.review = 'confirmed' AND np.deleted_at IS NULL",
|
|
30497
30498
|
// A proposed refund promises nothing back yet, so it must not free room an import could then fill.
|
|
@@ -30566,7 +30567,7 @@ var refundRulesOver = /* @__PURE__ */ __name((context) => {
|
|
|
30566
30567
|
return { originalFor, refundShare, confirmable, keepsRefunded, keepsShare, keepsInvoice };
|
|
30567
30568
|
}, "refundRulesOver");
|
|
30568
30569
|
|
|
30569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
30570
30571
|
var FINANCE_TYPES = ["invoice", "payment"];
|
|
30571
30572
|
var isFinanceType = /* @__PURE__ */ __name((type) => FINANCE_TYPES.includes(type), "isFinanceType");
|
|
30572
30573
|
var PAID = netPaidSql("i.id");
|
|
@@ -30970,7 +30971,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30970
30971
|
};
|
|
30971
30972
|
}, "financeStoreOver");
|
|
30972
30973
|
|
|
30973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
30974
30975
|
var refuse2 = /* @__PURE__ */ __name((message3, reason) => {
|
|
30975
30976
|
throw new CliError("validation_error", message3, { reason });
|
|
30976
30977
|
}, "refuse");
|
|
@@ -31048,7 +31049,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
31048
31049
|
};
|
|
31049
31050
|
}, "paymentEntriesOver");
|
|
31050
31051
|
|
|
31051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31052
31053
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31053
31054
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31054
31055
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31075,7 +31076,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
31075
31076
|
return valid;
|
|
31076
31077
|
}, "validateEvidenceFindings");
|
|
31077
31078
|
|
|
31078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31079
31080
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31080
31081
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31081
31082
|
var iso7 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31269,7 +31270,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31269
31270
|
};
|
|
31270
31271
|
}, "proposedActionsStoreOver");
|
|
31271
31272
|
|
|
31272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-proposals.js
|
|
31273
31274
|
var CONFIRMED = "proposal";
|
|
31274
31275
|
var refOf = /* @__PURE__ */ __name(({ database }, pk) => {
|
|
31275
31276
|
const row2 = database.prepare("SELECT provider, external_id FROM identities WHERE id = ?").get(pk);
|
|
@@ -31621,7 +31622,7 @@ var identityLinkRows = /* @__PURE__ */ __name((context, { person: person2, statu
|
|
|
31621
31622
|
return { items, hasMore: rows.length > limit };
|
|
31622
31623
|
}, "identityLinkRows");
|
|
31623
31624
|
|
|
31624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-merges.js
|
|
31625
31626
|
var mergeId = /* @__PURE__ */ __name((to, from2) => `merge:${to}-${from2}`, "mergeId");
|
|
31626
31627
|
var parseMergeId = /* @__PURE__ */ __name((id2) => {
|
|
31627
31628
|
const found2 = /^merge:([1-9]\d*)-([1-9]\d*)$/.exec(id2.trim());
|
|
@@ -31724,7 +31725,7 @@ var split = /* @__PURE__ */ __name((context, uid, refs, by) => {
|
|
|
31724
31725
|
return recordOf(context, alone);
|
|
31725
31726
|
}, "split");
|
|
31726
31727
|
|
|
31727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-split-proposals.js
|
|
31728
31729
|
var refOf2 = /* @__PURE__ */ __name(({ provider, id: id2 }) => `${provider}:${id2}`, "refOf");
|
|
31729
31730
|
var keyOf3 = /* @__PURE__ */ __name((split2, person2, identities2) => `${split2} ${person2} ${[...identities2].sort().join(" ")}`, "keyOf");
|
|
31730
31731
|
var planOf = /* @__PURE__ */ __name((context, input) => {
|
|
@@ -31901,7 +31902,7 @@ var forgetErasedSplits = /* @__PURE__ */ __name((database) => {
|
|
|
31901
31902
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
31902
31903
|
}, "forgetErasedSplits");
|
|
31903
31904
|
|
|
31904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/test-data.js
|
|
31905
31906
|
var SEED_PEOPLE = [
|
|
31906
31907
|
{ name: "Owner", username: "owner" },
|
|
31907
31908
|
{ name: "Ann Lee", username: "ann" },
|
|
@@ -31918,7 +31919,7 @@ var RESERVED_ADDRESS_GLOBS = [
|
|
|
31918
31919
|
];
|
|
31919
31920
|
var SEED_ID_GLOBS = ["person-[0-9]*"];
|
|
31920
31921
|
|
|
31921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/test-people.js
|
|
31922
31923
|
var TEST_DATA_KIND = "test_data";
|
|
31923
31924
|
var globs = /* @__PURE__ */ __name((column2, patterns) => patterns.map((pattern) => `${column2} GLOB '${pattern}'`).join(" OR "), "globs");
|
|
31924
31925
|
var SURE = `(${globs("i.external_id", SEED_ID_GLOBS)} OR ${globs("lower(i.email)", RESERVED_ADDRESS_GLOBS)})`;
|
|
@@ -31987,7 +31988,7 @@ var forgetErasedTestData = /* @__PURE__ */ __name((database) => {
|
|
|
31987
31988
|
database.prepare("DELETE FROM proposed_actions WHERE id = ?").run(Number(row2.id));
|
|
31988
31989
|
}, "forgetErasedTestData");
|
|
31989
31990
|
|
|
31990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
31991
31992
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null, startScope) => Number(orm.insert(accounts).values({
|
|
31992
31993
|
provider,
|
|
31993
31994
|
externalId: account,
|
|
@@ -32081,7 +32082,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
32081
32082
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
32082
32083
|
}, "dropOrphanPeople");
|
|
32083
32084
|
|
|
32084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
32085
32086
|
var HISTORY_KEY = "$history";
|
|
32086
32087
|
var objectOf2 = /* @__PURE__ */ __name((text8) => {
|
|
32087
32088
|
if (typeof text8 !== "string")
|
|
@@ -32157,7 +32158,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
32157
32158
|
return rest;
|
|
32158
32159
|
}, "withoutHistory");
|
|
32159
32160
|
|
|
32160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
32161
32162
|
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");
|
|
32162
32163
|
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");
|
|
32163
32164
|
var setChatScope = /* @__PURE__ */ __name((context, accountKey, chatId, scope3) => {
|
|
@@ -32455,7 +32456,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
32455
32456
|
}
|
|
32456
32457
|
}, "replaceAutoTags");
|
|
32457
32458
|
|
|
32458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-tokens.js
|
|
32459
32460
|
var BOT_TOKEN = /(?<!\d)(\d{6,12}):[A-Za-z0-9_-]{30,40}(?![A-Za-z0-9_-])/g;
|
|
32460
32461
|
var MAY_HOLD = "*[0-9][0-9][0-9][0-9][0-9][0-9]:*";
|
|
32461
32462
|
var MASKED_THROUGH = "bot_tokens_masked_through";
|
|
@@ -32495,7 +32496,7 @@ var maskStoredBotTokens = /* @__PURE__ */ __name((context) => {
|
|
|
32495
32496
|
}, "maskStoredBotTokens");
|
|
32496
32497
|
var masks = /* @__PURE__ */ __name((value) => value != null && withoutBotTokens(String(value)) !== value, "masks");
|
|
32497
32498
|
|
|
32498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
32499
32500
|
import { createHash as createHash4 } from "node:crypto";
|
|
32500
32501
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
32501
32502
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -32593,7 +32594,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
32593
32594
|
return { source: source2, query, chat: chat2, senders, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
32594
32595
|
}, "contextEvidenceRequest");
|
|
32595
32596
|
|
|
32596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
32597
32598
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
32598
32599
|
var ACTIVITY = `
|
|
32599
32600
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -32723,7 +32724,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
32723
32724
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
32724
32725
|
}), "mailActivity");
|
|
32725
32726
|
|
|
32726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
32727
32728
|
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");
|
|
32728
32729
|
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;
|
|
32729
32730
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -32804,7 +32805,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
32804
32805
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
32805
32806
|
}, "mailCore");
|
|
32806
32807
|
|
|
32807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
32808
32809
|
var titleOf2 = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
32809
32810
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
32810
32811
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at,
|
|
@@ -32917,7 +32918,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
32917
32918
|
return emails3 + threads;
|
|
32918
32919
|
}, "drainEmailIndex");
|
|
32919
32920
|
|
|
32920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
32921
32922
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
32922
32923
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
32923
32924
|
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,
|
|
@@ -33015,7 +33016,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
33015
33016
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
33016
33017
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
33017
33018
|
|
|
33018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
33019
33020
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
33020
33021
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
33021
33022
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -33065,7 +33066,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
33065
33066
|
return threads.length;
|
|
33066
33067
|
}, "markEmailsRestored");
|
|
33067
33068
|
|
|
33068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-nearest.js
|
|
33069
33070
|
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
|
|
33070
33071
|
FROM ${MAIL_PIECES} JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
33071
33072
|
WHERE p.account_id = ?
|
|
@@ -33125,7 +33126,7 @@ var indexedMailPieces = /* @__PURE__ */ __name((database, model, query, filter,
|
|
|
33125
33126
|
}, "indexedMailPieces");
|
|
33126
33127
|
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");
|
|
33127
33128
|
|
|
33128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
33129
33130
|
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");
|
|
33130
33131
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
33131
33132
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33192,7 +33193,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
33192
33193
|
}
|
|
33193
33194
|
}), "mailRulesOver");
|
|
33194
33195
|
|
|
33195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
33196
33197
|
function checkMeetingCancelled(signal) {
|
|
33197
33198
|
if (!signal?.aborted)
|
|
33198
33199
|
return;
|
|
@@ -33203,7 +33204,7 @@ function checkMeetingCancelled(signal) {
|
|
|
33203
33204
|
}
|
|
33204
33205
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
33205
33206
|
|
|
33206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
33207
33208
|
var managerOf = /* @__PURE__ */ __name((database, meetingId) => {
|
|
33208
33209
|
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);
|
|
33209
33210
|
if (!found2)
|
|
@@ -33268,7 +33269,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
33268
33269
|
createdAt: Number(row2.created_at)
|
|
33269
33270
|
}), "transcriptRowOf");
|
|
33270
33271
|
|
|
33271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
33272
33273
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
33273
33274
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
33274
33275
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -33435,7 +33436,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33435
33436
|
}
|
|
33436
33437
|
}), "meetingReadsOver");
|
|
33437
33438
|
|
|
33438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
33439
33440
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
33440
33441
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
33441
33442
|
const params = [input.accountId];
|
|
@@ -33478,7 +33479,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
33478
33479
|
return { clauses, params };
|
|
33479
33480
|
}, "meetingSelectionSql");
|
|
33480
33481
|
|
|
33481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-calls.js
|
|
33482
33483
|
var MOST_CALLS = 2e5;
|
|
33483
33484
|
var parsed3 = /* @__PURE__ */ __name((value) => {
|
|
33484
33485
|
if (typeof value !== "string")
|
|
@@ -33533,7 +33534,7 @@ var meetingCallsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33533
33534
|
}
|
|
33534
33535
|
}), "meetingCallsOver");
|
|
33535
33536
|
|
|
33536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
33537
33538
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
33538
33539
|
async meetingChatLines(input) {
|
|
33539
33540
|
checkMeetingCancelled(input.signal);
|
|
@@ -33561,7 +33562,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
33561
33562
|
}
|
|
33562
33563
|
}), "meetingChatLinesOver");
|
|
33563
33564
|
|
|
33564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
33565
33566
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
33566
33567
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
33567
33568
|
}, "missing");
|
|
@@ -33684,7 +33685,7 @@ function meetingContextLinksOver(context) {
|
|
|
33684
33685
|
}
|
|
33685
33686
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
33686
33687
|
|
|
33687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-documents.js
|
|
33688
33689
|
var TRANSCRIPT_ROLE = "transcript";
|
|
33689
33690
|
var roleOf3 = /* @__PURE__ */ __name((value) => MEETING_DOCUMENT_ROLES.find((role) => role === value), "roleOf");
|
|
33690
33691
|
var attach = /* @__PURE__ */ __name((database, meetingId, fileId, role, metadata3, listed, now2) => {
|
|
@@ -33758,7 +33759,7 @@ var meetingTranscriptDocumentsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
33758
33759
|
};
|
|
33759
33760
|
}, "meetingTranscriptDocumentsOver");
|
|
33760
33761
|
|
|
33761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
33762
33763
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
33763
33764
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
33764
33765
|
var summaryOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -33787,7 +33788,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33787
33788
|
return row2 ? summaryText(summaryOf2(row2)) : null;
|
|
33788
33789
|
}, "indexedText");
|
|
33789
33790
|
|
|
33790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
33791
33792
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
33792
33793
|
var meetingCurrentIndexRows = `
|
|
33793
33794
|
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
|
|
@@ -33818,7 +33819,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
33818
33819
|
}, "invalidateMeetingStems");
|
|
33819
33820
|
var meetingStemmableText = /* @__PURE__ */ __name((text8) => text8.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
33820
33821
|
|
|
33821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
33822
33823
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
33823
33824
|
return {
|
|
33824
33825
|
async indexSearch(original) {
|
|
@@ -33886,10 +33887,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
33886
33887
|
}
|
|
33887
33888
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
33888
33889
|
|
|
33889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
33890
33891
|
import { createHash as createHash5 } from "node:crypto";
|
|
33891
33892
|
|
|
33892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
33893
33894
|
var SHORTEST_CORRECTION = 3;
|
|
33894
33895
|
var maxEdits = /* @__PURE__ */ __name((word2) => word2.length <= 4 ? 1 : 2, "maxEdits");
|
|
33895
33896
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -33936,7 +33937,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words4) => {
|
|
|
33936
33937
|
return corrections;
|
|
33937
33938
|
}, "correctWords");
|
|
33938
33939
|
|
|
33939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
33940
33941
|
var SHORTEST_GARBLED = 4;
|
|
33941
33942
|
var MOST_WIDENED = 64;
|
|
33942
33943
|
var plain = /* @__PURE__ */ __name((word2) => word2.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -34028,7 +34029,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
34028
34029
|
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));
|
|
34029
34030
|
}, "widenWords");
|
|
34030
34031
|
|
|
34031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
34032
34033
|
import { readFileSync } from "node:fs";
|
|
34033
34034
|
var loaded;
|
|
34034
34035
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -34087,7 +34088,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word2) => {
|
|
|
34087
34088
|
return false;
|
|
34088
34089
|
}, "knownRussianWord");
|
|
34089
34090
|
|
|
34090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
34091
34092
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
34092
34093
|
var MOST_WORDS = 128;
|
|
34093
34094
|
var quote = /* @__PURE__ */ __name((word2) => `"${word2.replaceAll('"', '""')}"`, "quote");
|
|
@@ -34343,7 +34344,7 @@ var matchedMeetingWords = /* @__PURE__ */ __name((tree, text8, stemmer2) => {
|
|
|
34343
34344
|
return [...found2];
|
|
34344
34345
|
}, "matchedMeetingWords");
|
|
34345
34346
|
|
|
34346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
34347
34348
|
var fail = /* @__PURE__ */ __name((message3) => {
|
|
34348
34349
|
throw new CliError("validation_error", message3);
|
|
34349
34350
|
}, "fail");
|
|
@@ -34527,7 +34528,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
34527
34528
|
}
|
|
34528
34529
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
34529
34530
|
|
|
34530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
34531
34532
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34532
34533
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
34533
34534
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -34559,7 +34560,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34559
34560
|
}
|
|
34560
34561
|
}), "meetingLanguagesOver");
|
|
34561
34562
|
|
|
34562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
34563
34564
|
import { createHash as createHash6 } from "node:crypto";
|
|
34564
34565
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
34565
34566
|
if (value === void 0)
|
|
@@ -34652,7 +34653,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
34652
34653
|
}
|
|
34653
34654
|
}), "meetingParticipantSearchOver");
|
|
34654
34655
|
|
|
34655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
34656
34657
|
var preparationQueries = {
|
|
34657
34658
|
participants: {
|
|
34658
34659
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -34702,7 +34703,7 @@ var preparationQueries = {
|
|
|
34702
34703
|
}
|
|
34703
34704
|
};
|
|
34704
34705
|
|
|
34705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
34706
34707
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34707
34708
|
async preparationContext(original) {
|
|
34708
34709
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -34743,7 +34744,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34743
34744
|
}
|
|
34744
34745
|
}), "meetingPreparationContextOver");
|
|
34745
34746
|
|
|
34746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
34747
34748
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
34748
34749
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
34749
34750
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -34757,7 +34758,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
34757
34758
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
34758
34759
|
)`, "preparationSubjects");
|
|
34759
34760
|
|
|
34760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
34761
34762
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34762
34763
|
async preparationKnowledge(original) {
|
|
34763
34764
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -34802,7 +34803,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
34802
34803
|
}
|
|
34803
34804
|
}), "meetingPreparationKnowledgeOver");
|
|
34804
34805
|
|
|
34805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
34806
34807
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34807
34808
|
async preparationNotes(original) {
|
|
34808
34809
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -34855,7 +34856,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34855
34856
|
}
|
|
34856
34857
|
}), "meetingPreparationNotesOver");
|
|
34857
34858
|
|
|
34858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
34859
34860
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34860
34861
|
async relatedHistory(original) {
|
|
34861
34862
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -34926,7 +34927,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34926
34927
|
}
|
|
34927
34928
|
}), "meetingRelatedHistoryOver");
|
|
34928
34929
|
|
|
34929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
34930
34931
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
34931
34932
|
var text3 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
34932
34933
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -35007,7 +35008,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35007
35008
|
}
|
|
35008
35009
|
}), "meetingReviewOver");
|
|
35009
35010
|
|
|
35010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
35011
35012
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
35012
35013
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
35013
35014
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -35061,7 +35062,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35061
35062
|
}
|
|
35062
35063
|
}), "meetingSeriesHistoryOver");
|
|
35063
35064
|
|
|
35064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
35065
35066
|
var MOST_ROWS = 5e5;
|
|
35066
35067
|
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
35067
35068
|
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
@@ -35130,7 +35131,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35130
35131
|
}
|
|
35131
35132
|
}), "meetingStatsOver");
|
|
35132
35133
|
|
|
35133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/name-variants.js
|
|
35134
35135
|
var CYRILLIC_TO_LATIN = {
|
|
35135
35136
|
\u0430: "a",
|
|
35136
35137
|
\u0431: "b",
|
|
@@ -35352,7 +35353,7 @@ for (const [full, short] of Object.entries(SHORT_FORMS))
|
|
|
35352
35353
|
}
|
|
35353
35354
|
var fullNames = /* @__PURE__ */ __name((skeleton) => [skeleton, ...FULL_NAMES.get(skeleton) ?? []], "fullNames");
|
|
35354
35355
|
|
|
35355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/name-traces.js
|
|
35356
35357
|
var peopleByNameKey = /* @__PURE__ */ __name((database) => {
|
|
35357
35358
|
const found2 = /* @__PURE__ */ new Map();
|
|
35358
35359
|
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()) {
|
|
@@ -35468,7 +35469,7 @@ function* sharedTraces(database, a, b, name, except) {
|
|
|
35468
35469
|
}
|
|
35469
35470
|
__name(sharedTraces, "sharedTraces");
|
|
35470
35471
|
|
|
35471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-matcher.js
|
|
35472
35473
|
var spellingsOf = /* @__PURE__ */ __name((value) => [value, value.slice(1)], "spellingsOf");
|
|
35473
35474
|
var PERSON_BY = {
|
|
35474
35475
|
// UNION, not OR: each branch reads its own index.
|
|
@@ -35491,7 +35492,7 @@ var personsByIdentifiers = /* @__PURE__ */ __name((database, ids3) => {
|
|
|
35491
35492
|
return [...found2].sort((a, b) => a - b);
|
|
35492
35493
|
}, "personsByIdentifiers");
|
|
35493
35494
|
|
|
35494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-match-scan.js
|
|
35495
35496
|
var BY = "rule";
|
|
35496
35497
|
var RULE = { bot: "rule", kind: "rule" };
|
|
35497
35498
|
var MOST_SHARING = 6;
|
|
@@ -35940,7 +35941,7 @@ var linkPhones = /* @__PURE__ */ __name((context, identities2) => {
|
|
|
35940
35941
|
return pass.result;
|
|
35941
35942
|
}, "linkPhones");
|
|
35942
35943
|
|
|
35943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
35944
35945
|
var CURSOR_KEY = "meetings";
|
|
35945
35946
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
35946
35947
|
id: Number(row2.id),
|
|
@@ -36547,7 +36548,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36547
36548
|
};
|
|
36548
36549
|
}, "meetingStoreOver");
|
|
36549
36550
|
|
|
36550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
36551
36552
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
36552
36553
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
36553
36554
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -36573,7 +36574,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder2) => {
|
|
|
36573
36574
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder2))).run();
|
|
36574
36575
|
}, "release");
|
|
36575
36576
|
|
|
36576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
36577
36578
|
var THREAD_COLUMNS = {
|
|
36578
36579
|
subject: {
|
|
36579
36580
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -36590,7 +36591,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
36590
36591
|
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);
|
|
36591
36592
|
}, "threadRows");
|
|
36592
36593
|
|
|
36593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
36594
36595
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
36595
36596
|
id: `email:${place.emailId}`,
|
|
36596
36597
|
chatId: place.threadExternalId,
|
|
@@ -37132,7 +37133,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
37132
37133
|
}
|
|
37133
37134
|
}), "mailStoreOver");
|
|
37134
37135
|
|
|
37135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
37136
37137
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
37137
37138
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
37138
37139
|
var folded5 = /* @__PURE__ */ __name((word2) => /^[а-яё'-]*$/.test(word2) ? word2.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word2), "folded");
|
|
@@ -37222,7 +37223,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
37222
37223
|
}, "knownWord");
|
|
37223
37224
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
37224
37225
|
|
|
37225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
37226
37227
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
37227
37228
|
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");
|
|
37228
37229
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -37308,7 +37309,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
37308
37309
|
return found2;
|
|
37309
37310
|
}, "spokenTranscripts");
|
|
37310
37311
|
|
|
37311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
37312
37313
|
var startOf = /* @__PURE__ */ __name((node) => node.operator === "wildcard" && node.implicit ? /^([\p{L}\p{N}]+)\*$/u.exec(normalize(node.value))?.[1] : void 0, "startOf");
|
|
37313
37314
|
var matchOf = /* @__PURE__ */ __name((node) => {
|
|
37314
37315
|
const start = startOf(node);
|
|
@@ -37366,7 +37367,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
37366
37367
|
});
|
|
37367
37368
|
}, "placeHits");
|
|
37368
37369
|
|
|
37369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
37370
37371
|
var GROUPS = {
|
|
37371
37372
|
chat: {
|
|
37372
37373
|
key: "m.chat_id",
|
|
@@ -37388,7 +37389,7 @@ var GROUPS = {
|
|
|
37388
37389
|
}
|
|
37389
37390
|
};
|
|
37390
37391
|
|
|
37391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
37392
37393
|
var MESSAGES = {
|
|
37393
37394
|
rows: "messages",
|
|
37394
37395
|
threads: "chats",
|
|
@@ -37427,7 +37428,7 @@ var matchingPks = /* @__PURE__ */ __name((context, execution, cap) => inTime(()
|
|
|
37427
37428
|
var timeLimited = /* @__PURE__ */ __name((limitMs) => (error) => {
|
|
37428
37429
|
if (error instanceof TimeLimitReached)
|
|
37429
37430
|
outOfTime(limitMs);
|
|
37430
|
-
throw error;
|
|
37431
|
+
throw sqliteLimit(error);
|
|
37431
37432
|
}, "timeLimited");
|
|
37432
37433
|
var inTime = /* @__PURE__ */ __name((work, limitMs) => {
|
|
37433
37434
|
try {
|
|
@@ -37884,7 +37885,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
37884
37885
|
};
|
|
37885
37886
|
}, "runCompiled");
|
|
37886
37887
|
|
|
37887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
37888
37889
|
function invalidMetadata() {
|
|
37889
37890
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
37890
37891
|
}
|
|
@@ -37986,7 +37987,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
37986
37987
|
};
|
|
37987
37988
|
}), "counterTargets");
|
|
37988
37989
|
|
|
37989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
37990
37991
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
37991
37992
|
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,
|
|
37992
37993
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -38105,7 +38106,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
38105
38106
|
}));
|
|
38106
38107
|
}, "attachmentViews");
|
|
38107
38108
|
|
|
38108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
38109
38110
|
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");
|
|
38110
38111
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text8, source2) => {
|
|
38111
38112
|
const { orm, database, now: now2 } = context;
|
|
@@ -38143,7 +38144,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
38143
38144
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
38144
38145
|
}, "intoVoiceAttachment");
|
|
38145
38146
|
|
|
38146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
38147
38148
|
var FIELDS = [
|
|
38148
38149
|
"threadExternalId",
|
|
38149
38150
|
"senderIdentityId",
|
|
@@ -38467,7 +38468,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
38467
38468
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
38468
38469
|
}, "writeDerivedReactions");
|
|
38469
38470
|
|
|
38470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
38471
38472
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
38472
38473
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
38473
38474
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -38488,7 +38489,16 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
38488
38489
|
};
|
|
38489
38490
|
}, "keysOver");
|
|
38490
38491
|
|
|
38491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
38493
|
+
var unquoted2 = /* @__PURE__ */ __name((value) => {
|
|
38494
|
+
if (typeof value !== "string")
|
|
38495
|
+
return value;
|
|
38496
|
+
try {
|
|
38497
|
+
return JSON.parse(value);
|
|
38498
|
+
} catch {
|
|
38499
|
+
return value;
|
|
38500
|
+
}
|
|
38501
|
+
}, "unquoted");
|
|
38492
38502
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
38493
38503
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
38494
38504
|
if (!row2)
|
|
@@ -38497,7 +38507,7 @@ var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
|
38497
38507
|
const value = JSON.parse(String(row2.value));
|
|
38498
38508
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
38499
38509
|
return {};
|
|
38500
|
-
return Object.fromEntries(Object.entries(value).filter((entry2) => Array.isArray(entry2[1]) && entry2[1].every((member) => typeof member === "string")));
|
|
38510
|
+
return Object.fromEntries(Object.entries(value).map(([name, members2]) => [name, unquoted2(members2)]).filter((entry2) => Array.isArray(entry2[1]) && entry2[1].every((member) => typeof member === "string")));
|
|
38501
38511
|
} catch {
|
|
38502
38512
|
return {};
|
|
38503
38513
|
}
|
|
@@ -38509,7 +38519,9 @@ var profilesOf = /* @__PURE__ */ __name((database) => {
|
|
|
38509
38519
|
return {};
|
|
38510
38520
|
try {
|
|
38511
38521
|
const value = JSON.parse(String(row2.value));
|
|
38512
|
-
|
|
38522
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
38523
|
+
return {};
|
|
38524
|
+
return Object.fromEntries(Object.entries(value).map(([app, own]) => [app, unquoted2(own)]));
|
|
38513
38525
|
} catch {
|
|
38514
38526
|
return {};
|
|
38515
38527
|
}
|
|
@@ -38535,7 +38547,7 @@ var forgetProfile = /* @__PURE__ */ __name((database, app, profile, now2) => {
|
|
|
38535
38547
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
38536
38548
|
}, "forgetProfile");
|
|
38537
38549
|
|
|
38538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
38539
38551
|
var DAY3 = 864e5;
|
|
38540
38552
|
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}')`;
|
|
38541
38553
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
@@ -38651,7 +38663,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
38651
38663
|
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);
|
|
38652
38664
|
}, "listEvents");
|
|
38653
38665
|
|
|
38654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
38655
38667
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
38656
38668
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey, now: now2 }, refresh) => {
|
|
38657
38669
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -38708,7 +38720,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
38708
38720
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
38709
38721
|
}, "forgetCalendarRows");
|
|
38710
38722
|
|
|
38711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
38712
38724
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
38713
38725
|
id: Number(row2.id),
|
|
38714
38726
|
accountId: Number(row2.account_id),
|
|
@@ -39311,7 +39323,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
39311
39323
|
};
|
|
39312
39324
|
}, "eventStoreOver");
|
|
39313
39325
|
|
|
39314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/account-purge.js
|
|
39315
39327
|
var purgeAccount = /* @__PURE__ */ __name((context, accountKey) => {
|
|
39316
39328
|
const { orm, database, now: now2 } = context;
|
|
39317
39329
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -39435,7 +39447,7 @@ var purgeCrmCopies = /* @__PURE__ */ __name((database, accountKey) => {
|
|
|
39435
39447
|
run("DELETE FROM pipelines WHERE account_id = ?", accountKey);
|
|
39436
39448
|
}, "purgeCrmCopies");
|
|
39437
39449
|
|
|
39438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
39439
39451
|
var ACCOUNT_REASON = "an account you connected, under another name: a mailbox or messenger you read may be someone else's";
|
|
39440
39452
|
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");
|
|
39441
39453
|
var ownersName = /* @__PURE__ */ __name((name, owner, alone) => {
|
|
@@ -39494,7 +39506,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
39494
39506
|
return personOf2(context, ref3);
|
|
39495
39507
|
}, "linkToOwner");
|
|
39496
39508
|
|
|
39497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
39498
39510
|
var PROVIDERS_SETTING = "providers";
|
|
39499
39511
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
39500
39512
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -39542,7 +39554,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39542
39554
|
});
|
|
39543
39555
|
}, "registerProvider");
|
|
39544
39556
|
|
|
39545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
39546
39558
|
var DAY4 = 864e5;
|
|
39547
39559
|
var RECENTLY_CLOSED_MS = 14 * DAY4;
|
|
39548
39560
|
var TEXT_LIMIT = 20;
|
|
@@ -39740,7 +39752,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
39740
39752
|
};
|
|
39741
39753
|
}, "taskSimilarityOver");
|
|
39742
39754
|
|
|
39743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
39744
39756
|
var SETTING3 = "taskCategories";
|
|
39745
39757
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
39746
39758
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -39759,7 +39771,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
39759
39771
|
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);
|
|
39760
39772
|
}, "saveTaskCategories");
|
|
39761
39773
|
|
|
39762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
39763
39775
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
39764
39776
|
var ALLOWED = "taskAgentClose";
|
|
39765
39777
|
var MIN = "taskAgentCloseMin";
|
|
@@ -39815,7 +39827,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
39815
39827
|
];
|
|
39816
39828
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
39817
39829
|
|
|
39818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
39819
39831
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
39820
39832
|
var KEY = "taskFirstPassPerChat";
|
|
39821
39833
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -39835,7 +39847,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
39835
39847
|
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);
|
|
39836
39848
|
}, "saveFirstPassPerChat");
|
|
39837
39849
|
|
|
39838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/external-links.js
|
|
39839
39851
|
var EXTERNAL_SERVICE = /^[a-z][a-z0-9-]{0,31}$/;
|
|
39840
39852
|
var EXTERNAL_ID_CHARS = 200;
|
|
39841
39853
|
var SOURCE_URL_CHARS = 2e3;
|
|
@@ -39862,7 +39874,7 @@ var sourceUrlOf = /* @__PURE__ */ __name((value, reason = "task.source-url") =>
|
|
|
39862
39874
|
return text8;
|
|
39863
39875
|
}, "sourceUrlOf");
|
|
39864
39876
|
|
|
39865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
39866
39878
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
39867
39879
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
39868
39880
|
name,
|
|
@@ -40114,7 +40126,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
40114
40126
|
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 ?`;
|
|
40115
40127
|
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");
|
|
40116
40128
|
|
|
40117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
40118
40130
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
40119
40131
|
if (row2.author_type == null)
|
|
40120
40132
|
return null;
|
|
@@ -40142,7 +40154,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
40142
40154
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
40143
40155
|
}, "addComment");
|
|
40144
40156
|
|
|
40145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
40146
40158
|
var TASK_RELATION_KINDS = [
|
|
40147
40159
|
"blocked-by",
|
|
40148
40160
|
"follow-up-of",
|
|
@@ -40272,7 +40284,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record3) => {
|
|
|
40272
40284
|
};
|
|
40273
40285
|
}, "taskRelationsStoreOver");
|
|
40274
40286
|
|
|
40275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
40276
40288
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
40277
40289
|
var TASK_EVENT_KINDS = [
|
|
40278
40290
|
"created",
|
|
@@ -40831,7 +40843,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
40831
40843
|
};
|
|
40832
40844
|
}, "workTasksOver");
|
|
40833
40845
|
|
|
40834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
40835
40847
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
40836
40848
|
const { database, now: now2 } = context;
|
|
40837
40849
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -40880,7 +40892,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
40880
40892
|
};
|
|
40881
40893
|
}, "taskCloseOver");
|
|
40882
40894
|
|
|
40883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
40884
40896
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
40885
40897
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
40886
40898
|
const { database, now: now2 } = context;
|
|
@@ -41099,7 +41111,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
41099
41111
|
};
|
|
41100
41112
|
}, "taskPairsOver");
|
|
41101
41113
|
|
|
41102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
41103
41115
|
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
41104
41116
|
var TASK_STATS_SQL = {
|
|
41105
41117
|
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"),
|
|
@@ -41138,7 +41150,7 @@ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
|
41138
41150
|
}, "statNames")
|
|
41139
41151
|
}), "taskStatsOver");
|
|
41140
41152
|
|
|
41141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
41142
41154
|
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";
|
|
41143
41155
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
41144
41156
|
const key2 = inboxKey(account);
|
|
@@ -41354,7 +41366,7 @@ var oneOf4 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
41354
41366
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
41355
41367
|
}, "oneOf");
|
|
41356
41368
|
|
|
41357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
41358
41370
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
41359
41371
|
const { database } = context;
|
|
41360
41372
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -41424,7 +41436,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
41424
41436
|
};
|
|
41425
41437
|
}, "accountsStoreOver");
|
|
41426
41438
|
|
|
41427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
41428
41440
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
41429
41441
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
41430
41442
|
const message3 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -41448,7 +41460,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
41448
41460
|
})), "keepDownloads");
|
|
41449
41461
|
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");
|
|
41450
41462
|
|
|
41451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
41452
41464
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
41453
41465
|
const { database } = context;
|
|
41454
41466
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -41505,7 +41517,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
41505
41517
|
}, "keepAttachmentText")
|
|
41506
41518
|
}), "attachmentsStoreOver");
|
|
41507
41519
|
|
|
41508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
41509
41521
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
41510
41522
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
41511
41523
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -41690,7 +41702,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
41690
41702
|
return done;
|
|
41691
41703
|
}, "rekeyChats");
|
|
41692
41704
|
|
|
41693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
41694
41706
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
41695
41707
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
41696
41708
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -41748,7 +41760,7 @@ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
|
41748
41760
|
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
41749
41761
|
}, "chatCoverage");
|
|
41750
41762
|
|
|
41751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
41752
41764
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
41753
41765
|
const { database } = context;
|
|
41754
41766
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -41897,7 +41909,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
41897
41909
|
};
|
|
41898
41910
|
}, "chatsStoreOver");
|
|
41899
41911
|
|
|
41900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
41912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
41901
41913
|
import { createHash as createHash7 } from "node:crypto";
|
|
41902
41914
|
var BATCH_CONTEXT = 50;
|
|
41903
41915
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -42037,7 +42049,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
42037
42049
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
42038
42050
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
42039
42051
|
|
|
42040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
42041
42053
|
import { setTimeout } from "node:timers/promises";
|
|
42042
42054
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
42043
42055
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -42349,7 +42361,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
42349
42361
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
42350
42362
|
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");
|
|
42351
42363
|
|
|
42352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
42353
42365
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
42354
42366
|
const { database } = context;
|
|
42355
42367
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -42456,7 +42468,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
42456
42468
|
};
|
|
42457
42469
|
}, "conversationsStoreOver");
|
|
42458
42470
|
|
|
42459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
42460
42472
|
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";
|
|
42461
42473
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
42462
42474
|
const { database } = context;
|
|
@@ -42481,7 +42493,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42481
42493
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
42482
42494
|
}), "countersStoreOver");
|
|
42483
42495
|
|
|
42484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
42485
42497
|
var MENTION_STATUSES = ["found", "linked", "proposed", "dismissed"];
|
|
42486
42498
|
var MENTION_QUERY = defineQuery({
|
|
42487
42499
|
entity: "mention",
|
|
@@ -42700,7 +42712,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
42700
42712
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
42701
42713
|
}, "listPlaces");
|
|
42702
42714
|
|
|
42703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
42704
42716
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
42705
42717
|
const { database } = context;
|
|
42706
42718
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -42735,7 +42747,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
42735
42747
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
42736
42748
|
}), "mentionsStoreOver");
|
|
42737
42749
|
|
|
42738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
42739
42751
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
42740
42752
|
var MUTED_NOW = "(coalesce(c.muted,0)=1 AND (c.muted_until IS NULL OR c.muted_until>?))";
|
|
42741
42753
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2, now2) => {
|
|
@@ -42834,7 +42846,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
42834
42846
|
});
|
|
42835
42847
|
}, "waitingChats");
|
|
42836
42848
|
|
|
42837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-activity-counts.js
|
|
42838
42850
|
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 = ?`;
|
|
42839
42851
|
var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since, until, now: now2 }) => {
|
|
42840
42852
|
const statement = database.prepare(SQL);
|
|
@@ -42854,7 +42866,7 @@ var chatActivityCounts = /* @__PURE__ */ __name(({ database }, chatKeys, { since
|
|
|
42854
42866
|
return found2;
|
|
42855
42867
|
}, "chatActivityCounts");
|
|
42856
42868
|
|
|
42857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
42858
42870
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
42859
42871
|
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");
|
|
42860
42872
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -42869,7 +42881,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
42869
42881
|
}));
|
|
42870
42882
|
}, "documentLinkMessages");
|
|
42871
42883
|
|
|
42872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
42873
42885
|
var stemmerFor = stemmerCache();
|
|
42874
42886
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
42875
42887
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -42913,7 +42925,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
42913
42925
|
});
|
|
42914
42926
|
}, "laterSharingRare");
|
|
42915
42927
|
|
|
42916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
42917
42929
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
42918
42930
|
const { database } = context;
|
|
42919
42931
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -43054,7 +43066,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
43054
43066
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
43055
43067
|
}), "messagesStoreOver");
|
|
43056
43068
|
|
|
43057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-links.js
|
|
43058
43070
|
var AGENT_METHOD = "agent";
|
|
43059
43071
|
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");
|
|
43060
43072
|
var weaknessOf = /* @__PURE__ */ __name((context, kind3, value, holders, sides, others) => {
|
|
@@ -43198,7 +43210,7 @@ var agentMerges = /* @__PURE__ */ __name((context, { limit, offset }) => {
|
|
|
43198
43210
|
return { items: found2.slice(offset, offset + limit), hasMore: found2.length > offset + limit };
|
|
43199
43211
|
}, "agentMerges");
|
|
43200
43212
|
|
|
43201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/identity-rekey.js
|
|
43202
43214
|
var quoted2 = /* @__PURE__ */ __name((name) => `"${name.replace(/"/g, '""')}"`, "quoted");
|
|
43203
43215
|
var columnsOf3 = /* @__PURE__ */ __name((database, table) => database.prepare("SELECT name, pk, type FROM pragma_table_info(?)").all(table), "columnsOf");
|
|
43204
43216
|
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
|
|
@@ -43342,7 +43354,7 @@ var rekeyIdentities = /* @__PURE__ */ __name((context, provider, pairs, { lockMs
|
|
|
43342
43354
|
return done;
|
|
43343
43355
|
}, "rekeyIdentities");
|
|
43344
43356
|
|
|
43345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/person-kinds.js
|
|
43346
43358
|
var PERSON_KINDS = ["person", "organization", "automated", "stranger", "unsorted", "test"];
|
|
43347
43359
|
var AUTOMATED_WORDS = /* @__PURE__ */ new Set([
|
|
43348
43360
|
"noreply",
|
|
@@ -43405,7 +43417,7 @@ var isCompanyName = /* @__PURE__ */ __name((name) => {
|
|
|
43405
43417
|
return wordsOf3(name.replaceAll(".", "")).some((word2) => LEGAL_FORMS.has(word2) || COMPANY_WORDS.has(word2));
|
|
43406
43418
|
}, "isCompanyName");
|
|
43407
43419
|
|
|
43408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-ties.js
|
|
43409
43421
|
var SMALL_GROUP_MEMBERS = 10;
|
|
43410
43422
|
var PERSON_TIES = ["chat", "small-group", "mail", "meeting", "crm", "phone-book"];
|
|
43411
43423
|
var ALWAYS_SHOWN = ["owner", "added", "task"];
|
|
@@ -43460,7 +43472,7 @@ var shownReasons = /* @__PURE__ */ __name((database, people2) => {
|
|
|
43460
43472
|
return new Map([...found2].map(([person2, reasons]) => [person2, ORDER.filter((one2) => reasons.has(one2))]));
|
|
43461
43473
|
}, "shownReasons");
|
|
43462
43474
|
|
|
43463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/people-list.js
|
|
43464
43476
|
var PEOPLE_SORTS = ["interactions", "recent", "name", "tasks"];
|
|
43465
43477
|
var MIN_QUERY = 3;
|
|
43466
43478
|
var matching2 = /* @__PURE__ */ __name((query) => {
|
|
@@ -43805,7 +43817,7 @@ var similarPeople = /* @__PURE__ */ __name((database, typed, limit) => {
|
|
|
43805
43817
|
return withLastContact(database, rows).map((person2, at2) => ({ ...person2, sameName: same[at2] === true }));
|
|
43806
43818
|
}, "similarPeople");
|
|
43807
43819
|
|
|
43808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-doubts.js
|
|
43809
43821
|
var DOUBT_REASONS = ["owner-other-name", "test-data", "shared-address", "mixed-names"];
|
|
43810
43822
|
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";
|
|
43811
43823
|
var text4 = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? value : null, "text");
|
|
@@ -44061,7 +44073,7 @@ var markTestData = /* @__PURE__ */ __name((context, uid, by) => {
|
|
|
44061
44073
|
return { person: `person:${person2}`, identities: identities2 };
|
|
44062
44074
|
}, "markTestData");
|
|
44063
44075
|
|
|
44064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
44065
44077
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
44066
44078
|
var IN_SCOPES = "IN (SELECT value FROM json_each(?))";
|
|
44067
44079
|
var projectScope = /* @__PURE__ */ __name((id2) => `(SELECT p.scope FROM main.projects p WHERE p.id=${id2})`, "projectScope");
|
|
@@ -44130,7 +44142,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database, now: now2 }, uid, {
|
|
|
44130
44142
|
});
|
|
44131
44143
|
}, "personPreparation");
|
|
44132
44144
|
|
|
44133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
44134
44146
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
44135
44147
|
const id2 = Number(uid);
|
|
44136
44148
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -44138,7 +44150,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
44138
44150
|
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)));
|
|
44139
44151
|
}, "personSeenInAccounts");
|
|
44140
44152
|
|
|
44141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
44142
44154
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
44143
44155
|
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);
|
|
44144
44156
|
if (!row2)
|
|
@@ -44205,7 +44217,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
44205
44217
|
return { id: id2, personId, removed: true };
|
|
44206
44218
|
}, "removeNote");
|
|
44207
44219
|
|
|
44208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
44209
44221
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
44210
44222
|
const { database } = context;
|
|
44211
44223
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -44348,13 +44360,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
44348
44360
|
};
|
|
44349
44361
|
}, "peopleStoreOver");
|
|
44350
44362
|
|
|
44351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
44352
44364
|
import { createHash as createHash9 } from "node:crypto";
|
|
44353
44365
|
|
|
44354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44355
44367
|
import { createHash as createHash8 } from "node:crypto";
|
|
44356
44368
|
|
|
44357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
44358
44370
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
44359
44371
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
44360
44372
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -44576,7 +44588,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
44576
44588
|
};
|
|
44577
44589
|
}, "rankReplyGraph");
|
|
44578
44590
|
|
|
44579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
44580
44592
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
44581
44593
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
44582
44594
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -44750,7 +44762,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
44750
44762
|
return { items, evidence, summary, graph: graph.quality };
|
|
44751
44763
|
}, "calculateAdminStatistics");
|
|
44752
44764
|
|
|
44753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
44754
44766
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
44755
44767
|
const dates = [];
|
|
44756
44768
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -44772,7 +44784,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
44772
44784
|
return dates[0].node.resolution.date;
|
|
44773
44785
|
}, "rankingContextRange");
|
|
44774
44786
|
|
|
44775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
44787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
44776
44788
|
var reactionCounts = /* @__PURE__ */ __name((stored4) => {
|
|
44777
44789
|
let counts;
|
|
44778
44790
|
try {
|
|
@@ -45067,14 +45079,14 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
45067
45079
|
});
|
|
45068
45080
|
}, "rankQuery");
|
|
45069
45081
|
|
|
45070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
45071
45083
|
function fail2(message3, reason = "query.too-large") {
|
|
45072
45084
|
throw new CliError("validation_error", message3, { reason, complete: false });
|
|
45073
45085
|
}
|
|
45074
45086
|
__name(fail2, "fail");
|
|
45075
45087
|
var joined2 = "FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id LEFT JOIN identities i ON i.id=m.sender_identity_id";
|
|
45076
|
-
var attachmentSnapshot = `(SELECT json_group_array(json_object('position',position,'kind',kind,'mime',mime,'name',name,'title',title,'url',url,'size',size,'width',width,'height',height,'duration',duration,'localPath',local_path)) FROM attachments WHERE attachable_type='message' AND attachable_id=m.id)`;
|
|
45077
|
-
var snapshot = `json_object('edited',m.edited_at,'senderName',m.sender_name,'reply',m.reply_to,'forward',m.forward,'reactions',m.reactions,'outgoing',m.outgoing,'thread',m.thread_external_id,'attachments',${attachmentSnapshot},'counterObservations',(SELECT json_group_array(json_object('counter',counter,'value',value,'at',created_at,'source',source)) FROM message_counter_observations WHERE message_id=m.id))`;
|
|
45088
|
+
var attachmentSnapshot = `json((SELECT json_group_array(json_object('position',position,'kind',kind,'mime',mime,'name',name,'title',title,'url',url,'size',size,'width',width,'height',height,'duration',duration,'localPath',local_path)) FROM attachments WHERE attachable_type='message' AND attachable_id=m.id))`;
|
|
45089
|
+
var snapshot = `json_object('edited',m.edited_at,'senderName',m.sender_name,'reply',m.reply_to,'forward',m.forward,'reactions',m.reactions,'outgoing',m.outgoing,'thread',m.thread_external_id,'attachments',${attachmentSnapshot},'counterObservations',json((SELECT json_group_array(json_object('counter',counter,'value',value,'at',created_at,'source',source)) FROM message_counter_observations WHERE message_id=m.id)))`;
|
|
45078
45090
|
var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request) => withQuerySelection(context, execution, (selection, check3) => {
|
|
45079
45091
|
const { database } = context, { options } = request;
|
|
45080
45092
|
const prefix = `WITH selected AS (${selection.sql}) `;
|
|
@@ -45244,7 +45256,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
45244
45256
|
return result;
|
|
45245
45257
|
}), "adminStatisticsQuery");
|
|
45246
45258
|
|
|
45247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
45248
45260
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
45249
45261
|
if (!execution.accounts.length)
|
|
45250
45262
|
return { conversations: [], chats: [] };
|
|
@@ -45262,7 +45274,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
45262
45274
|
return { conversations: conversations2, chats: chats2 };
|
|
45263
45275
|
}, "conversationEligibility");
|
|
45264
45276
|
|
|
45265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
45266
45278
|
import { createHash as createHash10 } from "node:crypto";
|
|
45267
45279
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
45268
45280
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -45412,7 +45424,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
45412
45424
|
return result;
|
|
45413
45425
|
}, "rankingEvidence");
|
|
45414
45426
|
|
|
45415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
45416
45428
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
45417
45429
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
45418
45430
|
if (execution.corpus === "mail")
|
|
@@ -45433,7 +45445,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
45433
45445
|
};
|
|
45434
45446
|
}, "queriesStoreOver");
|
|
45435
45447
|
|
|
45436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
45437
45449
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
45438
45450
|
const { database, now: now2 } = context;
|
|
45439
45451
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -45472,10 +45484,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
45472
45484
|
}));
|
|
45473
45485
|
}, "chatEventsOf");
|
|
45474
45486
|
|
|
45475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45476
45488
|
import { createHash as createHash11 } from "node:crypto";
|
|
45477
45489
|
|
|
45478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
45479
45491
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
45480
45492
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
45481
45493
|
timeZone: zone,
|
|
@@ -45495,7 +45507,7 @@ var weekKey = /* @__PURE__ */ __name((day2) => {
|
|
|
45495
45507
|
return date3.toISOString().slice(0, 10);
|
|
45496
45508
|
}, "weekKey");
|
|
45497
45509
|
|
|
45498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
45499
45511
|
var RETENTION_TOLERANCE = 864e5;
|
|
45500
45512
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
45501
45513
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -45549,7 +45561,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
45549
45561
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
45550
45562
|
}, "retentionCohorts");
|
|
45551
45563
|
|
|
45552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
45553
45565
|
var iso10 = /* @__PURE__ */ __name((at2) => new Date(at2).toISOString(), "iso");
|
|
45554
45566
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
45555
45567
|
validateRetentionOptions(options);
|
|
@@ -45680,7 +45692,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
45680
45692
|
};
|
|
45681
45693
|
}, "retentionQuery");
|
|
45682
45694
|
|
|
45683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
45684
45696
|
var iso11 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
45685
45697
|
var marksOf = /* @__PURE__ */ __name(({ isBot: isBot2, flagged, deleted, hasPhoto }) => ({
|
|
45686
45698
|
...isBot2 === void 0 ? {} : { bot: isBot2 },
|
|
@@ -45809,7 +45821,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
45809
45821
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
45810
45822
|
})), "trackedChats");
|
|
45811
45823
|
|
|
45812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
45813
45825
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
45814
45826
|
const { database } = context;
|
|
45815
45827
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -45865,7 +45877,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
45865
45877
|
};
|
|
45866
45878
|
}, "rosterStoreOver");
|
|
45867
45879
|
|
|
45868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
45869
45881
|
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");
|
|
45870
45882
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
45871
45883
|
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 ?`);
|
|
@@ -45889,7 +45901,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
45889
45901
|
}
|
|
45890
45902
|
}, "backfillNormalized");
|
|
45891
45903
|
|
|
45892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
45893
45905
|
var INDEX2 = "message_words";
|
|
45894
45906
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
45895
45907
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -46016,7 +46028,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
46016
46028
|
});
|
|
46017
46029
|
}, "resetSearchIndex");
|
|
46018
46030
|
|
|
46019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
46020
46032
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
46021
46033
|
const filled = { stemmed: 0, drained: 0 };
|
|
46022
46034
|
const before2 = stemsState(database);
|
|
@@ -46111,7 +46123,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
46111
46123
|
return resetStems(database, { now: now2 });
|
|
46112
46124
|
}, "followDefaultStemmers");
|
|
46113
46125
|
|
|
46114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
46115
46127
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
46116
46128
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms) => {
|
|
46117
46129
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -46133,7 +46145,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
46133
46145
|
});
|
|
46134
46146
|
}, "termCandidates");
|
|
46135
46147
|
|
|
46136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
46137
46149
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46138
46150
|
const { database } = context;
|
|
46139
46151
|
const stemmerFor2 = stemmerCache();
|
|
@@ -46158,7 +46170,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46158
46170
|
};
|
|
46159
46171
|
}, "searchIndexStoreOver");
|
|
46160
46172
|
|
|
46161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
46162
46174
|
var HISTORY_KEPT = 1e3;
|
|
46163
46175
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
46164
46176
|
var COLUMNS6 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -46228,7 +46240,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
46228
46240
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
46229
46241
|
}, "clearHistory");
|
|
46230
46242
|
|
|
46231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
46232
46244
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
46233
46245
|
const { database } = context;
|
|
46234
46246
|
return {
|
|
@@ -46252,7 +46264,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
46252
46264
|
};
|
|
46253
46265
|
}, "searchesStoreOver");
|
|
46254
46266
|
|
|
46255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/added-sources.js
|
|
46256
46268
|
import { createHash as createHash12 } from "node:crypto";
|
|
46257
46269
|
var ADDED_KINDS = ["text", "file", "page"];
|
|
46258
46270
|
var TEXT_COLUMNS = "kind = ?, title = ?, file_name = ?, extension = ?, url = ?, mime = ?, size = ?, content_hash = ?, body = ?, extraction = ?, metadata = ?, language = ?";
|
|
@@ -46494,7 +46506,7 @@ var addedSourcesOver = /* @__PURE__ */ __name((context) => {
|
|
|
46494
46506
|
};
|
|
46495
46507
|
}, "addedSourcesOver");
|
|
46496
46508
|
|
|
46497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
46498
46510
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
46499
46511
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
46500
46512
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -46542,7 +46554,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
46542
46554
|
};
|
|
46543
46555
|
}, "agentActionsStoreOver");
|
|
46544
46556
|
|
|
46545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/base-suggest.js
|
|
46546
46558
|
var baseSettingKey = /* @__PURE__ */ __name((kind3) => `stages.base.${kind3}`, "baseSettingKey");
|
|
46547
46559
|
var storedPipeline = /* @__PURE__ */ __name((value) => {
|
|
46548
46560
|
if (typeof value !== "string")
|
|
@@ -46588,11 +46600,11 @@ var suggestBaseStages = /* @__PURE__ */ __name((database, kind3, pipelines2, { o
|
|
|
46588
46600
|
}
|
|
46589
46601
|
}, "suggestBaseStages");
|
|
46590
46602
|
|
|
46591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/copy-viewer.js
|
|
46592
46604
|
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");
|
|
46593
46605
|
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");
|
|
46594
46606
|
|
|
46595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-rows.js
|
|
46596
46608
|
var TABLES2 = { deal: "deals", lead: "leads" };
|
|
46597
46609
|
var MONEY_REFUSALS = ["money.currency", "money.amount"];
|
|
46598
46610
|
var amountFault = /* @__PURE__ */ __name((item, code) => {
|
|
@@ -46764,7 +46776,7 @@ var crmRowsOver = /* @__PURE__ */ __name((context) => {
|
|
|
46764
46776
|
return { savePipeline, saveItemRow };
|
|
46765
46777
|
}, "crmRowsOver");
|
|
46766
46778
|
|
|
46767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-activities.js
|
|
46768
46780
|
var ACTIVITY_RECORD = "crm.activity";
|
|
46769
46781
|
var forgetActivitiesOn = /* @__PURE__ */ __name((database, accountId, kind3, externalIds, at2) => {
|
|
46770
46782
|
const removed = "rr.target_type = ? AND rr.target_external_id IN (SELECT value FROM json_each(?))";
|
|
@@ -46952,7 +46964,7 @@ var seenSql = /* @__PURE__ */ __name((viewer) => {
|
|
|
46952
46964
|
};
|
|
46953
46965
|
}, "seenSql");
|
|
46954
46966
|
|
|
46955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-stage-entries.js
|
|
46956
46968
|
var STAGE_ENTRY_RECORD = "crm.stage-entry";
|
|
46957
46969
|
var STAGE_ENTRY_DAYS = 90;
|
|
46958
46970
|
var STAGE_TASK_DAYS = 7;
|
|
@@ -47020,7 +47032,7 @@ var crmStageEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
47020
47032
|
return { save: save2, pending, handled, expire };
|
|
47021
47033
|
}, "crmStageEntriesOver");
|
|
47022
47034
|
|
|
47023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/stage-amounts.js
|
|
47024
47036
|
var TABLES3 = { deal: "deals", lead: "leads" };
|
|
47025
47037
|
var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { since, until }, viewer) => {
|
|
47026
47038
|
const seen = viewerSql("d", viewer);
|
|
@@ -47038,7 +47050,7 @@ var stageAmountsOf = /* @__PURE__ */ __name(({ database }, kind3, stageIds, { si
|
|
|
47038
47050
|
});
|
|
47039
47051
|
}, "stageAmountsOf");
|
|
47040
47052
|
|
|
47041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/pipeline-period.js
|
|
47042
47054
|
var TABLES4 = { deal: "deals", lead: "leads" };
|
|
47043
47055
|
var DAY6 = 864e5;
|
|
47044
47056
|
var LOST_REASONS = 10;
|
|
@@ -47195,7 +47207,7 @@ var pipelinePeriod = /* @__PURE__ */ __name((context, pipeline, window, zone, vi
|
|
|
47195
47207
|
};
|
|
47196
47208
|
}, "pipelinePeriod");
|
|
47197
47209
|
|
|
47198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/deals.js
|
|
47199
47211
|
var TABLES5 = { deal: "deals", lead: "leads" };
|
|
47200
47212
|
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");
|
|
47201
47213
|
var MAX_STAGES = 30;
|
|
@@ -47668,7 +47680,7 @@ var dealsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
47668
47680
|
};
|
|
47669
47681
|
}, "dealsStoreOver");
|
|
47670
47682
|
|
|
47671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/owner-languages.js
|
|
47672
47684
|
var KEY2 = "ownerLanguages";
|
|
47673
47685
|
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(" "));
|
|
47674
47686
|
var DEFAULT_OWNER_LANGUAGES = ["ru"];
|
|
@@ -47698,7 +47710,7 @@ var saveOwnerLanguages = /* @__PURE__ */ __name((database, languages, now2) => {
|
|
|
47698
47710
|
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);
|
|
47699
47711
|
}, "saveOwnerLanguages");
|
|
47700
47712
|
|
|
47701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/base-stages.js
|
|
47702
47714
|
var OUTCOMES = {
|
|
47703
47715
|
lead: ["open", "open", "open", "won", "lost"],
|
|
47704
47716
|
deal: ["open", "open", "open", "open", "won", "lost"]
|
|
@@ -48031,7 +48043,7 @@ var baseStagesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
48031
48043
|
};
|
|
48032
48044
|
}, "baseStagesStoreOver");
|
|
48033
48045
|
|
|
48034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
48035
48047
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
48036
48048
|
}) => {
|
|
48037
48049
|
const { database, now: now2 } = context;
|
|
@@ -48090,7 +48102,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
48090
48102
|
};
|
|
48091
48103
|
}, "botUpdateStoreOver");
|
|
48092
48104
|
|
|
48093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projection.js
|
|
48094
48106
|
var IMPORTER = { bot: "import" };
|
|
48095
48107
|
var importersProposal = /* @__PURE__ */ __name((entity) => entity.review === "proposed" && entity.author.type === "bot" && entity.author.name === IMPORTER.bot, "importersProposal");
|
|
48096
48108
|
var codeOf = /* @__PURE__ */ __name((error) => {
|
|
@@ -48135,7 +48147,7 @@ var moneyLinesOf = /* @__PURE__ */ __name((projection, list2) => (Array.isArray(
|
|
|
48135
48147
|
};
|
|
48136
48148
|
}), "moneyLinesOf");
|
|
48137
48149
|
|
|
48138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-roles.js
|
|
48139
48151
|
var settingOf = /* @__PURE__ */ __name((list2) => `relationships.roles.${list2}`, "settingOf");
|
|
48140
48152
|
var isList = /* @__PURE__ */ __name((list2) => Object.hasOwn(ROLE_LISTS, list2), "isList");
|
|
48141
48153
|
var listOf2 = /* @__PURE__ */ __name((list2) => {
|
|
@@ -48219,7 +48231,7 @@ var relationRolesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
48219
48231
|
};
|
|
48220
48232
|
}, "relationRolesOver");
|
|
48221
48233
|
|
|
48222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-settings.js
|
|
48223
48235
|
var CRM_LINK_MODES = ["reported", "review"];
|
|
48224
48236
|
var COMPANY_TYPE_MEANINGS = ["customer-of", "supplier", "partner-of"];
|
|
48225
48237
|
var CRM_SCOPES = ["mine", "all"];
|
|
@@ -48450,7 +48462,7 @@ var crmSettingsOf = /* @__PURE__ */ __name((database) => database.prepare("SELEC
|
|
|
48450
48462
|
return [{ setting: String(row2.key), value: settingValue(database, parsed5.key, parsed5.name) }];
|
|
48451
48463
|
}), "crmSettingsOf");
|
|
48452
48464
|
|
|
48453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
48454
48466
|
var isoOf = /* @__PURE__ */ __name((ms) => ms === void 0 ? null : new Date(ms).toISOString(), "isoOf");
|
|
48455
48467
|
var relationOf = /* @__PURE__ */ __name((link3, now2) => ({
|
|
48456
48468
|
id: link3.id,
|
|
@@ -48810,7 +48822,7 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
48810
48822
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
48811
48823
|
}, "decidedOrigin");
|
|
48812
48824
|
|
|
48813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/reported-relations.js
|
|
48814
48826
|
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");
|
|
48815
48827
|
var metadataOf = /* @__PURE__ */ __name((relation) => relation.metadata && Object.keys(relation.metadata).length ? JSON.stringify(relation.metadata) : null, "metadataOf");
|
|
48816
48828
|
var syncReportedIn = /* @__PURE__ */ __name((context, key2, relationships, scope3, { source: source2 = "import", by = { bot: key2.provider, kind: "rule" }, onOutcome } = {}) => {
|
|
@@ -48948,7 +48960,7 @@ var relationsStoreOver = /* @__PURE__ */ __name((context) => ({
|
|
|
48948
48960
|
syncReported: /* @__PURE__ */ __name(async (key2, relationships, scope3, options) => write(context.database, () => syncReportedIn(context, key2, relationships, scope3, options)), "syncReported")
|
|
48949
48961
|
}), "relationsStoreOver");
|
|
48950
48962
|
|
|
48951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
48963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relationships.js
|
|
48952
48964
|
var importSource = /* @__PURE__ */ __name((provider) => `import:${provider}`, "importSource");
|
|
48953
48965
|
var noRelationships = /* @__PURE__ */ __name(() => ({
|
|
48954
48966
|
added: 0,
|
|
@@ -49138,7 +49150,7 @@ var recordRelationshipsOver = /* @__PURE__ */ __name((context) => {
|
|
|
49138
49150
|
return { report, placeOf: placeOf2, withdrawFrom };
|
|
49139
49151
|
}, "recordRelationshipsOver");
|
|
49140
49152
|
|
|
49141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/business-contracts.js
|
|
49142
49154
|
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";
|
|
49143
49155
|
var DAY_MS2 = 864e5;
|
|
49144
49156
|
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");
|
|
@@ -49297,7 +49309,7 @@ var contractsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
49297
49309
|
};
|
|
49298
49310
|
}, "contractsStoreOver");
|
|
49299
49311
|
|
|
49300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/business-search.js
|
|
49301
49313
|
var BUSINESS_FIND_MAX = 2001;
|
|
49302
49314
|
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");
|
|
49303
49315
|
var partyName = /* @__PURE__ */ __name((as) => `coalesce(${as}p.name, ${as}o.name, ${as}j.name)`, "partyName");
|
|
@@ -49402,7 +49414,7 @@ var businessSearchOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
49402
49414
|
};
|
|
49403
49415
|
}, "businessSearchOver");
|
|
49404
49416
|
|
|
49405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
49406
49418
|
var CATALOG_QUERY = defineQuery({
|
|
49407
49419
|
entity: "document",
|
|
49408
49420
|
backend: "sql",
|
|
@@ -49635,10 +49647,10 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
49635
49647
|
};
|
|
49636
49648
|
}, "catalogStoreOver");
|
|
49637
49649
|
|
|
49638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
49639
49651
|
import { createHash as createHash13 } from "node:crypto";
|
|
49640
49652
|
|
|
49641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-files.js
|
|
49642
49654
|
import { sep } from "node:path";
|
|
49643
49655
|
var MOST = 500;
|
|
49644
49656
|
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");
|
|
@@ -49763,7 +49775,7 @@ var crmFilesOver = /* @__PURE__ */ __name((context) => {
|
|
|
49763
49775
|
};
|
|
49764
49776
|
}, "crmFilesOver");
|
|
49765
49777
|
|
|
49766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/content.js
|
|
49767
49779
|
var MOST2 = 500;
|
|
49768
49780
|
var TABLE = {
|
|
49769
49781
|
author: "content_authors",
|
|
@@ -50042,7 +50054,7 @@ var contentStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
50042
50054
|
};
|
|
50043
50055
|
}, "contentStoreOver");
|
|
50044
50056
|
|
|
50045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
50046
50058
|
var remote = /* @__PURE__ */ __name(() => `CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source') IN (${documentAccountProvidersSql()}) ELSE 0 END`, "remote");
|
|
50047
50059
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${remote()}) THEN
|
|
50048
50060
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -50055,7 +50067,7 @@ var contextDocumentTimeKind = /* @__PURE__ */ __name(() => `CASE WHEN (${remoteT
|
|
|
50055
50067
|
THEN 'source-modified' ELSE 'stored-update' END`, "contextDocumentTimeKind");
|
|
50056
50068
|
var contextDocumentUrl = /* @__PURE__ */ __name(() => `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`, "contextDocumentUrl");
|
|
50057
50069
|
|
|
50058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
50059
50071
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
50060
50072
|
const { source: source2, words: words4, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
50061
50073
|
signal?.throwIfAborted();
|
|
@@ -50154,7 +50166,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
50154
50166
|
});
|
|
50155
50167
|
}, "readMeetingContextEvidence");
|
|
50156
50168
|
|
|
50157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
50158
50170
|
var corpora = {
|
|
50159
50171
|
message: {
|
|
50160
50172
|
table: "messages",
|
|
@@ -50399,7 +50411,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
50399
50411
|
}
|
|
50400
50412
|
}), "contextRecordsOver");
|
|
50401
50413
|
|
|
50402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-changes.js
|
|
50403
50415
|
var CRM_CHANGES = [
|
|
50404
50416
|
"created",
|
|
50405
50417
|
"moved",
|
|
@@ -50542,7 +50554,7 @@ var crmReadsOver = /* @__PURE__ */ __name((context) => {
|
|
|
50542
50554
|
};
|
|
50543
50555
|
}, "crmReadsOver");
|
|
50544
50556
|
|
|
50545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm-contacts.js
|
|
50546
50558
|
var PLACEHOLDER = /(?:^|\s)null(?:\s+#\d+)?(?=\s|$)/gi;
|
|
50547
50559
|
var withoutPlaceholder = /* @__PURE__ */ __name((name) => name.replace(PLACEHOLDER, " ").replace(/\s+/g, " ").trim() || null, "withoutPlaceholder");
|
|
50548
50560
|
var DryRun = class extends Error {
|
|
@@ -50621,7 +50633,7 @@ var removeCrmContacts = /* @__PURE__ */ __name((context, key2, { users, before:
|
|
|
50621
50633
|
}
|
|
50622
50634
|
}, "removeCrmContacts");
|
|
50623
50635
|
|
|
50624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/crm.js
|
|
50625
50637
|
var PENDING = "crm:pending-relations";
|
|
50626
50638
|
var PENDING_DAYS = 30;
|
|
50627
50639
|
var PENDING_MOST = 5e3;
|
|
@@ -51176,10 +51188,10 @@ var crmCopiesOver = /* @__PURE__ */ __name((context, people2) => {
|
|
|
51176
51188
|
};
|
|
51177
51189
|
}, "crmCopiesOver");
|
|
51178
51190
|
|
|
51179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51180
51192
|
import { createHash as createHash14, randomBytes as randomBytes2 } from "node:crypto";
|
|
51181
51193
|
|
|
51182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/decision-requests.js
|
|
51183
51195
|
var DECISION_ACTIONS = ["confirm", "reject", "ask-confirm", "ask-reject", "back", "later"];
|
|
51184
51196
|
var DECISION_TTL_MS = 72 * 60 * 60 * 1e3;
|
|
51185
51197
|
var CALLBACK_PREFIX = "wcr1:";
|
|
@@ -51193,7 +51205,7 @@ var callbackDataOf = /* @__PURE__ */ __name((token) => {
|
|
|
51193
51205
|
}, "callbackDataOf");
|
|
51194
51206
|
var parseCallbackData = /* @__PURE__ */ __name((data) => typeof data === "string" ? CALLBACK.exec(data)?.[1] : void 0, "parseCallbackData");
|
|
51195
51207
|
|
|
51196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/decision-requests.js
|
|
51197
51209
|
var digestOf = /* @__PURE__ */ __name((token) => createHash14("sha256").update(token).digest("hex"), "digestOf");
|
|
51198
51210
|
var newToken = /* @__PURE__ */ __name(() => randomBytes2(16).toString("base64url"), "newToken");
|
|
51199
51211
|
var requestOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -51292,7 +51304,7 @@ var decisionRequestStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
51292
51304
|
};
|
|
51293
51305
|
}, "decisionRequestStoreOver");
|
|
51294
51306
|
|
|
51295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-listing.js
|
|
51296
51308
|
var MEETING_ROW_KINDS = ["meeting", "call", "event"];
|
|
51297
51309
|
var DAY8 = 864e5;
|
|
51298
51310
|
var JOINED = `(SELECT ce.event_id FROM calendar_entries ce JOIN events je ON je.id = ce.event_id
|
|
@@ -51679,7 +51691,7 @@ var meetingListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51679
51691
|
};
|
|
51680
51692
|
}, "meetingListingOver");
|
|
51681
51693
|
|
|
51682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/document-listing.js
|
|
51683
51695
|
var DOCUMENT_KINDS = [
|
|
51684
51696
|
"transcript",
|
|
51685
51697
|
"doc",
|
|
@@ -51916,7 +51928,7 @@ var documentListingOver = /* @__PURE__ */ __name((context) => {
|
|
|
51916
51928
|
};
|
|
51917
51929
|
}, "documentListingOver");
|
|
51918
51930
|
|
|
51919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
51920
51932
|
var NOTE_FIELDS = [
|
|
51921
51933
|
"text",
|
|
51922
51934
|
"exact",
|
|
@@ -52413,7 +52425,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52413
52425
|
};
|
|
52414
52426
|
}, "noteSearchOver");
|
|
52415
52427
|
|
|
52416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
52417
52429
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
52418
52430
|
var inEventAccounts = /* @__PURE__ */ __name((event2) => searchableCopy(event2, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
52419
52431
|
var EVENT_CORPUS = {
|
|
@@ -52553,7 +52565,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
52553
52565
|
};
|
|
52554
52566
|
}, "eventSearchOver");
|
|
52555
52567
|
|
|
52556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
52557
52569
|
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";
|
|
52558
52570
|
var iso13 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
52559
52571
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -52816,7 +52828,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
52816
52828
|
};
|
|
52817
52829
|
}, "factsStoreOver");
|
|
52818
52830
|
|
|
52819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
52820
52832
|
var invalid4 = /* @__PURE__ */ __name((message3) => {
|
|
52821
52833
|
throw new CliError("validation_error", message3);
|
|
52822
52834
|
}, "invalid");
|
|
@@ -52984,7 +52996,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
52984
52996
|
return { snapshot: snapshot2, snapshotParts, previous, settle, keepWaiting, named: named2, sameDecision, create };
|
|
52985
52997
|
}, "findingsCoreOver");
|
|
52986
52998
|
|
|
52987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
52999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
52988
53000
|
var stale = /* @__PURE__ */ __name(() => {
|
|
52989
53001
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
52990
53002
|
reason: "evidence-findings.stale"
|
|
@@ -53248,7 +53260,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53248
53260
|
};
|
|
53249
53261
|
}, "evidenceFindingsStoreOver");
|
|
53250
53262
|
|
|
53251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
53252
53264
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
53253
53265
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
53254
53266
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -53302,7 +53314,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
53302
53314
|
}, "forPerson")
|
|
53303
53315
|
}), "involvementStoreOver");
|
|
53304
53316
|
|
|
53305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/labelled.js
|
|
53306
53318
|
var LABELLED = {
|
|
53307
53319
|
note: "note",
|
|
53308
53320
|
document: "document",
|
|
@@ -53315,7 +53327,7 @@ var LABELLED = {
|
|
|
53315
53327
|
};
|
|
53316
53328
|
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");
|
|
53317
53329
|
|
|
53318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
53319
53331
|
import { createHash as createHash15 } from "node:crypto";
|
|
53320
53332
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
53321
53333
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -53401,7 +53413,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
53401
53413
|
};
|
|
53402
53414
|
}, "meetingProjectsStoreOver");
|
|
53403
53415
|
|
|
53404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
53405
53417
|
var ORGANIZATIONS_QUERY = {
|
|
53406
53418
|
entity: "organization",
|
|
53407
53419
|
backend: "sql",
|
|
@@ -53442,7 +53454,7 @@ var REMINDERS_QUERY = {
|
|
|
53442
53454
|
})
|
|
53443
53455
|
};
|
|
53444
53456
|
|
|
53445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/organization-categories.js
|
|
53446
53458
|
var OWN2 = "(SELECT id FROM organizations WHERE deleted_at IS NULL AND json_extract(metadata, '$.own') = 1)";
|
|
53447
53459
|
var EMPLOYED = "('employee', 'contractor', 'founder')";
|
|
53448
53460
|
var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now2) => {
|
|
@@ -53463,7 +53475,7 @@ var categorySql = /* @__PURE__ */ __name(({ category, accounts: accounts2 }, now
|
|
|
53463
53475
|
return { sql: `EXISTS (SELECT 1 FROM links l WHERE ${where} AND ${usable})`, params: keys };
|
|
53464
53476
|
}, "categorySql");
|
|
53465
53477
|
|
|
53466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/organizations.js
|
|
53467
53479
|
var organizationOf = /* @__PURE__ */ __name((row2) => ({
|
|
53468
53480
|
id: String(row2.id),
|
|
53469
53481
|
ref: `organization:${row2.id}`,
|
|
@@ -53508,7 +53520,7 @@ var organizationsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) =>
|
|
|
53508
53520
|
}), "setOwnOrganization")
|
|
53509
53521
|
}), "organizationsStoreOver");
|
|
53510
53522
|
|
|
53511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-list.js
|
|
53512
53524
|
var KINDS = RELATION_KINDS.map(linkKind).join(", ");
|
|
53513
53525
|
var ACCOUNT_ENDS = [
|
|
53514
53526
|
["deal", "deals"],
|
|
@@ -53671,13 +53683,13 @@ var relationListOver = /* @__PURE__ */ __name((context) => {
|
|
|
53671
53683
|
__name(proposalItem, "proposalItem");
|
|
53672
53684
|
}, "relationListOver");
|
|
53673
53685
|
|
|
53674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-reads.js
|
|
53675
53687
|
var relationReadsOver = /* @__PURE__ */ __name((context) => ({
|
|
53676
53688
|
...relationListOver(context),
|
|
53677
53689
|
...relationRolesOver(context)
|
|
53678
53690
|
}), "relationReadsOver");
|
|
53679
53691
|
|
|
53680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/source-review.js
|
|
53681
53693
|
var TABLES6 = { memory: "memories", fact: "facts" };
|
|
53682
53694
|
var RETIRED = /* @__PURE__ */ new Set(["superseded", "reversed", "rejected", "stale"]);
|
|
53683
53695
|
var DEFAULT_LIMIT = 500;
|
|
@@ -53920,16 +53932,16 @@ var sourceReviewStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
53920
53932
|
};
|
|
53921
53933
|
}, "sourceReviewStoreOver");
|
|
53922
53934
|
|
|
53923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
53924
53936
|
import { createHash as createHash18 } from "node:crypto";
|
|
53925
53937
|
|
|
53926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
53927
53939
|
import { createHash as createHash17 } from "node:crypto";
|
|
53928
53940
|
|
|
53929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53930
53942
|
import { createHash as createHash16 } from "node:crypto";
|
|
53931
53943
|
|
|
53932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
53933
53945
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
53934
53946
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
53935
53947
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -53980,7 +53992,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
53980
53992
|
return input;
|
|
53981
53993
|
}, "consolidationApplyInput");
|
|
53982
53994
|
|
|
53983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
53995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
53984
53996
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
53985
53997
|
id: String(row2.id),
|
|
53986
53998
|
sourceId: String(row2.source_id),
|
|
@@ -54055,7 +54067,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
54055
54067
|
}, { beforeCommit: check3 });
|
|
54056
54068
|
}, "applyTagConsolidation");
|
|
54057
54069
|
|
|
54058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
54059
54071
|
var selections = [
|
|
54060
54072
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
54061
54073
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -54199,7 +54211,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
54199
54211
|
};
|
|
54200
54212
|
}, "previewRows");
|
|
54201
54213
|
|
|
54202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
54203
54215
|
var kinds = ["project", "tag", "topic"];
|
|
54204
54216
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
54205
54217
|
if (signal?.aborted)
|
|
@@ -54463,7 +54475,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
54463
54475
|
};
|
|
54464
54476
|
}, "vocabularyStoreOver");
|
|
54465
54477
|
|
|
54466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
54478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
54467
54479
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
54468
54480
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
54469
54481
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -55017,7 +55029,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
55017
55029
|
return key2.padEnd(3, "X");
|
|
55018
55030
|
}, "projectKey");
|
|
55019
55031
|
|
|
55020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
55021
55033
|
var DAY9 = 864e5;
|
|
55022
55034
|
var SETTING5 = "logs_pruned_at";
|
|
55023
55035
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY9, botUpdatePayloadsMs: 30 * DAY9 };
|
|
@@ -55044,7 +55056,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
55044
55056
|
};
|
|
55045
55057
|
}, "logPruner");
|
|
55046
55058
|
|
|
55047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
55048
55060
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
55049
55061
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
55050
55062
|
var invalid6 = /* @__PURE__ */ __name((message3) => {
|
|
@@ -55403,7 +55415,7 @@ var checkMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
55403
55415
|
}, "checkMailFindings");
|
|
55404
55416
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
55405
55417
|
|
|
55406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/orders.js
|
|
55407
55419
|
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";
|
|
55408
55420
|
var orderOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
55409
55421
|
const { database, now: now2 } = context;
|
|
@@ -55618,7 +55630,7 @@ var ordersStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
55618
55630
|
};
|
|
55619
55631
|
}, "ordersStoreOver");
|
|
55620
55632
|
|
|
55621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
55622
55634
|
var MAIL_EDITS = {
|
|
55623
55635
|
task: ["title", "type", "reason", "commitment", "project", "dueAt", "dueEvidence", "assignee", "assigneeEvidence"],
|
|
55624
55636
|
fact: ["statement", "type", "reason", "subject", "project"],
|
|
@@ -56107,7 +56119,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
56107
56119
|
};
|
|
56108
56120
|
}, "mailFindingsStoreOver");
|
|
56109
56121
|
|
|
56110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
56111
56123
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
56112
56124
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
56113
56125
|
reason: "meeting-findings.stale"
|
|
@@ -56320,7 +56332,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56320
56332
|
};
|
|
56321
56333
|
}, "meetingFindingsStoreOver");
|
|
56322
56334
|
|
|
56323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
56324
56336
|
var RANK_BATCH = 512;
|
|
56325
56337
|
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";
|
|
56326
56338
|
var limitOf2 = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -56591,7 +56603,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
56591
56603
|
}
|
|
56592
56604
|
}), "meetingVectorsOver");
|
|
56593
56605
|
|
|
56594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
56595
56607
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
56596
56608
|
var TEXTS = {
|
|
56597
56609
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -56692,7 +56704,7 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56692
56704
|
};
|
|
56693
56705
|
}, "sourceMentionStoreOver");
|
|
56694
56706
|
|
|
56695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/money-transactions.js
|
|
56696
56708
|
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";
|
|
56697
56709
|
var MAX_SPLITS = 100;
|
|
56698
56710
|
var transactionOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -56926,11 +56938,11 @@ var transactionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
56926
56938
|
};
|
|
56927
56939
|
}, "transactionsStoreOver");
|
|
56928
56940
|
|
|
56929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
56930
56942
|
import { accessSync, constants, existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
56931
56943
|
import { dirname as dirname2 } from "node:path";
|
|
56932
56944
|
|
|
56933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
56934
56946
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
56935
56947
|
var CLIENTS_SETTING = "clients";
|
|
56936
56948
|
var coreVersion = (() => {
|
|
@@ -56991,7 +57003,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
56991
57003
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
56992
57004
|
}, "refusalAdvice");
|
|
56993
57005
|
|
|
56994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
56995
57007
|
var GENERATED = [
|
|
56996
57008
|
{
|
|
56997
57009
|
"name": "20261010184427_initial",
|
|
@@ -57668,8 +57680,8 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
57668
57680
|
"UPDATE mention_pending SET source_id = (SELECT account_id FROM temp.drive_moves WHERE folder_id = mention_pending.source_id)\nWHERE source_type = 'account' AND source_id IN (SELECT folder_id FROM temp.drive_moves);",
|
|
57669
57681
|
"UPDATE mentions SET source_id = (SELECT account_id FROM temp.drive_moves WHERE folder_id = mentions.source_id)\nWHERE source_type = 'account' AND source_id IN (SELECT folder_id FROM temp.drive_moves);",
|
|
57670
57682
|
"UPDATE mentions SET target_id = (SELECT account_id FROM temp.drive_moves WHERE folder_id = mentions.target_id)\nWHERE target_type = 'account' AND target_id IN (SELECT folder_id FROM temp.drive_moves);",
|
|
57671
|
-
"-- A profile that named the folder names the account: `{ provider: \"google-drive\", account: <principal> }`.\nUPDATE store_settings SET value = (\n SELECT json_group_object(app.key, CASE WHEN app.type = 'object' THEN (\n SELECT json_group_object(profile.key, CASE\n WHEN profile.type = 'object' AND json_extract(profile.value, '$.provider') = 'folder'\n AND json_extract(profile.value, '$.account') IN (SELECT 'google-drive:' || principal FROM temp.drive_moves)\n THEN json_set(profile.value, '$.provider', 'google-drive', '$.account', substr(json_extract(profile.value, '$.account'), 14))\n WHEN profile.type IN ('object', 'array') THEN json(profile.value)\n ELSE profile.value END)\n FROM json_each(app.value) profile\n ) WHEN app.type = 'array' THEN json(app.value) ELSE app.value END)\n FROM json_each(store_settings.value) app\n)\nWHERE key = 'profiles' AND json_valid(value) AND json_type(value) = 'object'\n AND EXISTS (SELECT 1 FROM temp.drive_moves);",
|
|
57672
|
-
"-- A group member `notes:<folder id>` follows the documents to `notes:<account id>`.\nUPDATE store_settings SET value = (\n SELECT json_group_object(grp.key, CASE WHEN grp.type = 'array' THEN (\n SELECT json_group_array(coalesce(\n (SELECT 'notes:' || m.account_id FROM temp.drive_moves m WHERE 'notes:' || m.folder_id = member.value),\n member.value))\n FROM json_each(grp.value) member\n ) WHEN grp.type = 'object' THEN json(grp.value) ELSE grp.value END)\n FROM json_each(store_settings.value) grp\n)\nWHERE key = 'accountGroups' AND json_valid(value) AND json_type(value) = 'object'\n AND EXISTS (SELECT 1 FROM temp.drive_moves);",
|
|
57683
|
+
"-- A profile that named the folder names the account: `{ provider: \"google-drive\", account: <principal> }`.\n-- json() keeps the inner object an object: SQLite 3.54 (Node 24.22) no longer passes a subquery's JSON subtype up.\nUPDATE store_settings SET value = (\n SELECT json_group_object(app.key, CASE WHEN app.type = 'object' THEN json((\n SELECT json_group_object(profile.key, CASE\n WHEN profile.type = 'object' AND json_extract(profile.value, '$.provider') = 'folder'\n AND json_extract(profile.value, '$.account') IN (SELECT 'google-drive:' || principal FROM temp.drive_moves)\n THEN json_set(profile.value, '$.provider', 'google-drive', '$.account', substr(json_extract(profile.value, '$.account'), 14))\n WHEN profile.type IN ('object', 'array') THEN json(profile.value)\n ELSE profile.value END)\n FROM json_each(app.value) profile\n )) WHEN app.type = 'array' THEN json(app.value) ELSE app.value END)\n FROM json_each(store_settings.value) app\n)\nWHERE key = 'profiles' AND json_valid(value) AND json_type(value) = 'object'\n AND EXISTS (SELECT 1 FROM temp.drive_moves);",
|
|
57684
|
+
"-- A group member `notes:<folder id>` follows the documents to `notes:<account id>`.\nUPDATE store_settings SET value = (\n SELECT json_group_object(grp.key, CASE WHEN grp.type = 'array' THEN json((\n SELECT json_group_array(coalesce(\n (SELECT 'notes:' || m.account_id FROM temp.drive_moves m WHERE 'notes:' || m.folder_id = member.value),\n member.value))\n FROM json_each(grp.value) member\n )) WHEN grp.type = 'object' THEN json(grp.value) ELSE grp.value END)\n FROM json_each(store_settings.value) grp\n)\nWHERE key = 'accountGroups' AND json_valid(value) AND json_type(value) = 'object'\n AND EXISTS (SELECT 1 FROM temp.drive_moves);",
|
|
57673
57685
|
"DELETE FROM accounts WHERE id IN (SELECT folder_id FROM temp.drive_moves);",
|
|
57674
57686
|
"DROP TABLE temp.drive_moves;"
|
|
57675
57687
|
]
|
|
@@ -58434,7 +58446,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
58434
58446
|
}
|
|
58435
58447
|
];
|
|
58436
58448
|
|
|
58437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/rollback-copy.js
|
|
58438
58450
|
import { mkdirSync, rmSync, statfsSync, writeFileSync } from "node:fs";
|
|
58439
58451
|
import { basename, dirname, join as join3, parse } from "node:path";
|
|
58440
58452
|
var DERIVED = /(_fts|_words|_stems|_trigrams|_pending)$|^(embeddings|chunks|chunk_messages|mentions|involvements|search_terms)$|^vector_index/;
|
|
@@ -58667,7 +58679,7 @@ var rollBack2 = /* @__PURE__ */ __name((database, path) => {
|
|
|
58667
58679
|
return { ...result, foreignKeyViolations };
|
|
58668
58680
|
}, "rollBack");
|
|
58669
58681
|
|
|
58670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
58671
58683
|
var V31_TABLES = [
|
|
58672
58684
|
"accounts",
|
|
58673
58685
|
"account_identities",
|
|
@@ -58841,7 +58853,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
58841
58853
|
return migrations;
|
|
58842
58854
|
}, "generatedMigrations");
|
|
58843
58855
|
|
|
58844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
58845
58857
|
var MIGRATIONS = generatedMigrations();
|
|
58846
58858
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
58847
58859
|
version INTEGER PRIMARY KEY,
|
|
@@ -58938,7 +58950,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
58938
58950
|
}
|
|
58939
58951
|
}, "migrate");
|
|
58940
58952
|
|
|
58941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
58942
58954
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
58943
58955
|
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 ?");
|
|
58944
58956
|
if (pending.get(0, 1) === void 0)
|
|
@@ -58960,7 +58972,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
58960
58972
|
}
|
|
58961
58973
|
}, "fillJoinKeys");
|
|
58962
58974
|
|
|
58963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
58964
58976
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
58965
58977
|
refuseOwnerStoreInTests(path);
|
|
58966
58978
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -58974,8 +58986,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
58974
58986
|
}, "openSqlite");
|
|
58975
58987
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
58976
58988
|
quietSqliteWarning();
|
|
58977
|
-
const { drizzle } = await import("./node-
|
|
58978
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
58989
|
+
const { drizzle } = await import("./node-3TSWTXGI.js");
|
|
58990
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-UPQCG7DJ.js");
|
|
58979
58991
|
const client = await nodeClient(path, { readOnly });
|
|
58980
58992
|
try {
|
|
58981
58993
|
if (!readOnly)
|
|
@@ -58989,8 +59001,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
58989
59001
|
}
|
|
58990
59002
|
}, "openUnderNode");
|
|
58991
59003
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
58992
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
58993
|
-
const { drizzle } = await import("./bun-
|
|
59004
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-Y6KKH2OW.js");
|
|
59005
|
+
const { drizzle } = await import("./bun-ZJOOKIIW.js");
|
|
58994
59006
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
58995
59007
|
try {
|
|
58996
59008
|
if (!readOnly)
|
|
@@ -59004,7 +59016,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
59004
59016
|
}
|
|
59005
59017
|
}, "openUnderBun");
|
|
59006
59018
|
|
|
59007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
59008
59020
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
59009
59021
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
59010
59022
|
try {
|
|
@@ -59072,7 +59084,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
59072
59084
|
});
|
|
59073
59085
|
}, "movePaymentFacts");
|
|
59074
59086
|
|
|
59075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
59076
59088
|
var readCompatibility = /* @__PURE__ */ __name((database, command) => {
|
|
59077
59089
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
59078
59090
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -59090,7 +59102,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
59090
59102
|
throw new CliError("configuration_error", `The store needs schema ${MIGRATIONS.at(-1)?.version ?? 0} maintenance before a read-only open`);
|
|
59091
59103
|
}, "assertReadCompatible");
|
|
59092
59104
|
|
|
59093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
59094
59106
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
59095
59107
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
59096
59108
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -59136,7 +59148,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
59136
59148
|
});
|
|
59137
59149
|
}, "moveSuggestedLinks");
|
|
59138
59150
|
|
|
59139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
59140
59152
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
59141
59153
|
var TEST_PROVIDER = "chat";
|
|
59142
59154
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -59157,7 +59169,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
59157
59169
|
}
|
|
59158
59170
|
}, "purgeTestAccounts");
|
|
59159
59171
|
|
|
59160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
59161
59173
|
var BACKFILL_ON_OPEN = 5e3;
|
|
59162
59174
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
59163
59175
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -59269,7 +59281,7 @@ var openStoreContext = /* @__PURE__ */ __name(async (options = {}) => {
|
|
|
59269
59281
|
}
|
|
59270
59282
|
}, "openStoreContext");
|
|
59271
59283
|
|
|
59272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/products.js
|
|
59273
59285
|
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";
|
|
59274
59286
|
var productOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
59275
59287
|
const { database, now: now2 } = context;
|
|
@@ -59377,13 +59389,13 @@ var productsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
59377
59389
|
};
|
|
59378
59390
|
}, "productsStoreOver");
|
|
59379
59391
|
|
|
59380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59381
59393
|
import { createHash as createHash20 } from "node:crypto";
|
|
59382
59394
|
|
|
59383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59384
59396
|
import { createHash as createHash19 } from "node:crypto";
|
|
59385
59397
|
|
|
59386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
59387
59399
|
var text6 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59388
59400
|
var ref = text6(2048);
|
|
59389
59401
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59453,7 +59465,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
59453
59465
|
}))
|
|
59454
59466
|
});
|
|
59455
59467
|
|
|
59456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
59457
59469
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
59458
59470
|
var invalid9 = /* @__PURE__ */ __name((field4) => {
|
|
59459
59471
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -59586,7 +59598,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59586
59598
|
return createHash19("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
59587
59599
|
}, "projectAnnotationsFingerprint");
|
|
59588
59600
|
|
|
59589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
59590
59602
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
59591
59603
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
59592
59604
|
var targetSchema = strictObject({
|
|
@@ -59693,7 +59705,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
59693
59705
|
}, "planBoundProjectAnnotations");
|
|
59694
59706
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
59695
59707
|
|
|
59696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
59697
59709
|
import { createHash as createHash21 } from "node:crypto";
|
|
59698
59710
|
var text7 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
59699
59711
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -59787,7 +59799,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
59787
59799
|
})).digest("hex");
|
|
59788
59800
|
}, "projectAnnotationSnapshotFingerprint");
|
|
59789
59801
|
|
|
59790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
59791
59803
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
59792
59804
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
59793
59805
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -59804,7 +59816,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
59804
59816
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
59805
59817
|
}, "projectAnnotationRequest");
|
|
59806
59818
|
|
|
59807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
59808
59820
|
var SnapshotBudget = class {
|
|
59809
59821
|
static {
|
|
59810
59822
|
__name(this, "SnapshotBudget");
|
|
@@ -59830,13 +59842,13 @@ var SnapshotBudget = class {
|
|
|
59830
59842
|
}
|
|
59831
59843
|
};
|
|
59832
59844
|
|
|
59833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
59834
59846
|
import { createHash as createHash23 } from "node:crypto";
|
|
59835
59847
|
|
|
59836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
59837
59849
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
59838
59850
|
|
|
59839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
59840
59852
|
import { createHash as createHash22 } from "node:crypto";
|
|
59841
59853
|
var invalid11 = /* @__PURE__ */ __name(() => {
|
|
59842
59854
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -59979,7 +59991,7 @@ var ProjectSnapshotSources = class {
|
|
|
59979
59991
|
}
|
|
59980
59992
|
};
|
|
59981
59993
|
|
|
59982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
59994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
59983
59995
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
59984
59996
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
59985
59997
|
}, "unsupported");
|
|
@@ -60157,7 +60169,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
60157
60169
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
60158
60170
|
}), "projectAnnotationSnapshot");
|
|
60159
60171
|
|
|
60160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
60161
60173
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
60162
60174
|
const current2 = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
60163
60175
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -60219,7 +60231,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
60219
60231
|
};
|
|
60220
60232
|
}), "previewAnnotationSnapshot");
|
|
60221
60233
|
|
|
60222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
60223
60235
|
var metadataOf2 = /* @__PURE__ */ __name((database, link3, to) => {
|
|
60224
60236
|
const provenance2 = link3.provenance === null ? {} : { provenance: link3.provenance };
|
|
60225
60237
|
if (link3.kind === "evidence" && to)
|
|
@@ -60286,7 +60298,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
60286
60298
|
return mappings;
|
|
60287
60299
|
}, "restoreAnnotationRecords");
|
|
60288
60300
|
|
|
60289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
60290
60302
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
60291
60303
|
async preview(request) {
|
|
60292
60304
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -60316,7 +60328,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
60316
60328
|
}
|
|
60317
60329
|
}), "projectAnnotationStoreOver");
|
|
60318
60330
|
|
|
60319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-relations.js
|
|
60320
60332
|
var isDerived = /* @__PURE__ */ __name((role) => role.startsWith("fields."), "isDerived");
|
|
60321
60333
|
var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
60322
60334
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
@@ -60387,7 +60399,7 @@ var recordRelationsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
60387
60399
|
return { entityRef, relatedOf, storedRelations, relate, missingOf };
|
|
60388
60400
|
}, "recordRelationsOver");
|
|
60389
60401
|
|
|
60390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-remap.js
|
|
60391
60403
|
var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
60392
60404
|
const pointedAt = /* @__PURE__ */ __name((type, id2) => {
|
|
60393
60405
|
for (const { table, pointer } of pointerPairs(database))
|
|
@@ -60441,7 +60453,7 @@ var recordRemapOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
60441
60453
|
return { pointedAt, remap };
|
|
60442
60454
|
}, "recordRemapOver");
|
|
60443
60455
|
|
|
60444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60456
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-run.js
|
|
60445
60457
|
var runs = 0;
|
|
60446
60458
|
var PAGE = 500;
|
|
60447
60459
|
var recordRunOver = /* @__PURE__ */ __name((context, writes) => {
|
|
@@ -60654,7 +60666,7 @@ var waitingPointer = /* @__PURE__ */ __name((index2, missing4) => {
|
|
|
60654
60666
|
return pointerOf("records", index2, "fields", key2);
|
|
60655
60667
|
}, "waitingPointer");
|
|
60656
60668
|
|
|
60657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-matching.js
|
|
60658
60670
|
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one2) => typeof one2 === "string"), "valuesOf");
|
|
60659
60671
|
var SCHEME = /^(email|domain|tax-id:[a-z]{2}|registration:[a-z]{2})$/;
|
|
60660
60672
|
var ORG_EMAIL = "org-email";
|
|
@@ -60820,7 +60832,7 @@ var renameMade = /* @__PURE__ */ __name(({ database, now: now2 }, type, id2, nam
|
|
|
60820
60832
|
]);
|
|
60821
60833
|
}, "renameMade");
|
|
60822
60834
|
|
|
60823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-direct.js
|
|
60824
60836
|
var productFields = /* @__PURE__ */ __name((fields4) => ({
|
|
60825
60837
|
name: given(fields4, "name"),
|
|
60826
60838
|
unit: given(fields4, "unit"),
|
|
@@ -60943,7 +60955,7 @@ var DIRECT_PROJECTORS = {
|
|
|
60943
60955
|
lead: dealProjector("lead")
|
|
60944
60956
|
};
|
|
60945
60957
|
|
|
60946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-document.js
|
|
60947
60959
|
var TEXT_ONLY = { storage: "text", localPath: null };
|
|
60948
60960
|
var textOf7 = /* @__PURE__ */ __name(({ fields: fields4, externalId }) => {
|
|
60949
60961
|
const text8 = String(fields4.text ?? "");
|
|
@@ -61012,7 +61024,7 @@ var DOCUMENT_PROJECTORS = {
|
|
|
61012
61024
|
}
|
|
61013
61025
|
};
|
|
61014
61026
|
|
|
61015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-money.js
|
|
61016
61028
|
var allocatedByOthers = /* @__PURE__ */ __name((context, paymentId) => {
|
|
61017
61029
|
const importer = authorActor(context, IMPORTER).actor;
|
|
61018
61030
|
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;
|
|
@@ -61222,7 +61234,7 @@ var MONEY_PROJECTORS = {
|
|
|
61222
61234
|
}
|
|
61223
61235
|
};
|
|
61224
61236
|
|
|
61225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors-phone.js
|
|
61226
61238
|
var CALLS_CALENDAR = "calls";
|
|
61227
61239
|
var importOnly = /* @__PURE__ */ __name((source2, type) => {
|
|
61228
61240
|
if (!isImportedProvider(source2.provider))
|
|
@@ -61397,7 +61409,7 @@ var PHONE_PROJECTORS = {
|
|
|
61397
61409
|
}
|
|
61398
61410
|
};
|
|
61399
61411
|
|
|
61400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-projectors.js
|
|
61401
61413
|
var RECORD_PROJECTORS = {
|
|
61402
61414
|
...MONEY_PROJECTORS,
|
|
61403
61415
|
...DIRECT_PROJECTORS,
|
|
@@ -61408,7 +61420,7 @@ var RECORD_PROJECTORS = {
|
|
|
61408
61420
|
project: null
|
|
61409
61421
|
};
|
|
61410
61422
|
|
|
61411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-settling.js
|
|
61412
61424
|
var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
61413
61425
|
const sql2 = /* @__PURE__ */ __name((text8) => database.prepare(text8), "sql");
|
|
61414
61426
|
const freeOn = /* @__PURE__ */ __name((invoice, payment) => {
|
|
@@ -61470,7 +61482,7 @@ var recordSettlingOver = /* @__PURE__ */ __name(({ database }, finance) => {
|
|
|
61470
61482
|
return { settle, checkShares };
|
|
61471
61483
|
}, "recordSettlingOver");
|
|
61472
61484
|
|
|
61473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-stamps.js
|
|
61474
61486
|
import { createHash as createHash24 } from "node:crypto";
|
|
61475
61487
|
var VOLATILE = /* @__PURE__ */ new Set(["id", "created_at", "updated_at", "metadata"]);
|
|
61476
61488
|
var content = /* @__PURE__ */ __name((row2) => row2 === void 0 ? null : Object.fromEntries(Object.entries(row2).filter(([column2]) => !VOLATILE.has(column2))), "content");
|
|
@@ -61486,7 +61498,7 @@ var importStampsOver = /* @__PURE__ */ __name(({ database }) => {
|
|
|
61486
61498
|
return { stamp, untouched };
|
|
61487
61499
|
}, "importStampsOver");
|
|
61488
61500
|
|
|
61489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/subscriptions.js
|
|
61490
61502
|
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";
|
|
61491
61503
|
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";
|
|
61492
61504
|
var PRICE_REF = /^subscription_price:([1-9]\d{0,15})$/;
|
|
@@ -61723,7 +61735,7 @@ var subscriptionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61723
61735
|
};
|
|
61724
61736
|
}, "subscriptionsStoreOver");
|
|
61725
61737
|
|
|
61726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/wallets.js
|
|
61727
61739
|
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";
|
|
61728
61740
|
var SIGNED = "CASE t.direction WHEN 'in' THEN t.amount ELSE -t.amount END";
|
|
61729
61741
|
var walletOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
@@ -61848,7 +61860,7 @@ var walletsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
61848
61860
|
};
|
|
61849
61861
|
}, "walletsStoreOver");
|
|
61850
61862
|
|
|
61851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/record-writes.js
|
|
61852
61864
|
var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
|
|
61853
61865
|
var unsettled = /* @__PURE__ */ __name((fields4, relations) => recordFingerprint(fields4, relations.filter((relation) => !AMOUNT_ROLES.includes(relation.role))), "unsettled");
|
|
61854
61866
|
var tableOf2 = /* @__PURE__ */ __name((type) => typeof type === "string" && Object.hasOwn(DECIDED_TABLES, type) ? DECIDED_TABLES[type] : void 0, "tableOf");
|
|
@@ -62107,7 +62119,7 @@ var recordWritesOver = /* @__PURE__ */ __name((context) => {
|
|
|
62107
62119
|
return { writeOne, project: project2, completeDependents, entityRef, missingOf: relations.missingOf };
|
|
62108
62120
|
}, "recordWritesOver");
|
|
62109
62121
|
|
|
62110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
62111
62123
|
var LIMIT = 1e3;
|
|
62112
62124
|
var iso16 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
62113
62125
|
var checkLimit = /* @__PURE__ */ __name((limit) => {
|
|
@@ -62331,7 +62343,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62331
62343
|
};
|
|
62332
62344
|
}, "recordStoreOver");
|
|
62333
62345
|
|
|
62334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/templates.js
|
|
62335
62347
|
var templateOf = /* @__PURE__ */ __name((row2) => ({
|
|
62336
62348
|
key: row2.key,
|
|
62337
62349
|
channel: row2.channel,
|
|
@@ -62386,12 +62398,12 @@ var storedTemplateBodies = /* @__PURE__ */ __name((database, key2, language) =>
|
|
|
62386
62398
|
return Object.fromEntries(rows.map((row2) => [row2.channel, row2.body]));
|
|
62387
62399
|
}, "storedTemplateBodies");
|
|
62388
62400
|
|
|
62389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/domain/tracker.js
|
|
62390
62402
|
var trackerTitleOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "issue" ? record3.title : kind3 === "comment" ? record3.body.split("\n")[0]?.slice(0, 120) || "(comment)" : record3.name, "trackerTitleOf");
|
|
62391
62403
|
var trackerBodyOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.body : kind3 === "issue" || kind3 === "project" ? record3.description : null, "trackerBodyOf");
|
|
62392
62404
|
var trackerParentOf = /* @__PURE__ */ __name((kind3, record3) => kind3 === "comment" ? record3.issue : kind3 === "state" || kind3 === "label" ? record3.team : kind3 === "issue" ? record3.team : null, "trackerParentOf");
|
|
62393
62405
|
|
|
62394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/tracker.js
|
|
62395
62407
|
var MOST3 = 500;
|
|
62396
62408
|
var itemOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
62397
62409
|
kind: String(row2.kind),
|
|
@@ -62561,7 +62573,7 @@ var trackerStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62561
62573
|
};
|
|
62562
62574
|
}, "trackerStoreOver");
|
|
62563
62575
|
|
|
62564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/store-errors.js
|
|
62565
62577
|
var refusalOf2 = /* @__PURE__ */ __name((error) => error instanceof Error && error.name === "DrizzleQueryError" && error.cause instanceof CliError ? error.cause : error, "refusalOf");
|
|
62566
62578
|
var wrapped2 = /* @__PURE__ */ new WeakMap();
|
|
62567
62579
|
var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
@@ -62596,7 +62608,7 @@ var storeErrors = /* @__PURE__ */ __name((area) => {
|
|
|
62596
62608
|
return proxy;
|
|
62597
62609
|
}, "storeErrors");
|
|
62598
62610
|
|
|
62599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
62600
62612
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
62601
62613
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
62602
62614
|
let merged2 = { from: from2, to };
|
|
@@ -62609,7 +62621,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
62609
62621
|
}, "markRange");
|
|
62610
62622
|
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");
|
|
62611
62623
|
|
|
62612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
62613
62625
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
62614
62626
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
62615
62627
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -62630,7 +62642,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
62630
62642
|
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);
|
|
62631
62643
|
}, "setTaskAnalysisMark");
|
|
62632
62644
|
|
|
62633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
62634
62646
|
var keyOf6 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
62635
62647
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
62636
62648
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf6(account));
|
|
@@ -62640,7 +62652,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
62640
62652
|
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);
|
|
62641
62653
|
}, "setTaskRulesStop");
|
|
62642
62654
|
|
|
62643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
62644
62656
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62645
62657
|
const { database } = context;
|
|
62646
62658
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -62699,7 +62711,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62699
62711
|
};
|
|
62700
62712
|
}, "syncStoreOver");
|
|
62701
62713
|
|
|
62702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
62703
62715
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
62704
62716
|
const { database } = context;
|
|
62705
62717
|
return {
|
|
@@ -62721,7 +62733,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
62721
62733
|
};
|
|
62722
62734
|
}, "tagsStoreOver");
|
|
62723
62735
|
|
|
62724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
62725
62737
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
62726
62738
|
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
|
|
62727
62739
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -62848,7 +62860,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
62848
62860
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
62849
62861
|
}, "savePictureChunks");
|
|
62850
62862
|
|
|
62851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
62852
62864
|
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,
|
|
62853
62865
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
62854
62866
|
FROM messages m
|
|
@@ -62937,7 +62949,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
62937
62949
|
return plain2(best(found2));
|
|
62938
62950
|
}, "nearestMessages");
|
|
62939
62951
|
|
|
62940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
62952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
62941
62953
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
62942
62954
|
const { database } = context;
|
|
62943
62955
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -63201,7 +63213,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
63201
63213
|
vectorCounts: /* @__PURE__ */ __name(async (models) => vectorCounts(context, models), "vectorCounts")
|
|
63202
63214
|
}), "vectorsStoreOver");
|
|
63203
63215
|
|
|
63204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
63205
63217
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
63206
63218
|
import { dirname as dirname3, join as join4 } from "node:path";
|
|
63207
63219
|
var BOOKKEEPING2 = ["schema_migrations", "store_settings"];
|
|
@@ -63289,10 +63301,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
63289
63301
|
}
|
|
63290
63302
|
}, "lastBackup");
|
|
63291
63303
|
|
|
63292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
63293
63305
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
63294
63306
|
|
|
63295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
63296
63308
|
var COUNTED_TABLES = [
|
|
63297
63309
|
"accounts",
|
|
63298
63310
|
"chats",
|
|
@@ -63377,7 +63389,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
63377
63389
|
};
|
|
63378
63390
|
}, "storeContents");
|
|
63379
63391
|
|
|
63380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.715.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_f3540c99972bb5f0aa92997a79a368b4/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
63381
63393
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
63382
63394
|
const context = await openStoreContext(options);
|
|
63383
63395
|
try {
|