@wirecat/mail-cli 0.14.0 → 0.16.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 +60 -0
- package/README.md +5 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-O7HQNZOF.js → all-profiles-TUDREUUW.js} +10 -10
- package/dist/bundle/{anthropic-SNA6PTVO.js → anthropic-KQOVSP6C.js} +6 -6
- package/dist/bundle/{app-server-LBKMJMKN.js → app-server-QK7PKVT7.js} +47 -47
- package/dist/bundle/{bun-KF5QK2YN.js → bun-2NMWL5YB.js} +2 -2
- package/dist/bundle/{bun-sqlite-2DKMM2PT.js → bun-sqlite-Y4FP6SDX.js} +5 -5
- package/dist/bundle/{chunk-UJEO3VWA.js → chunk-3CVDHJER.js} +1 -1
- package/dist/bundle/{chunk-6EZ7XGRG.js → chunk-3ZJE5TIG.js} +2 -2
- package/dist/bundle/{chunk-UHHARH5X.js → chunk-4IEDXIUN.js} +308 -236
- package/dist/bundle/{chunk-KBFIKUCA.js → chunk-4IIH5PXR.js} +28 -28
- package/dist/bundle/{chunk-ZCPUKUST.js → chunk-5FPQGUJA.js} +1 -1
- package/dist/bundle/{chunk-DPKHVBP3.js → chunk-6DVPPLAN.js} +5 -5
- package/dist/bundle/{chunk-XRJIQC6P.js → chunk-7LMTWOTP.js} +2 -2
- package/dist/bundle/{chunk-H2ZURG7Q.js → chunk-ANFIIXBL.js} +2 -2
- package/dist/bundle/{chunk-KQ5P5NLL.js → chunk-ARDUJR5Z.js} +1 -1
- package/dist/bundle/{chunk-AOVOIXGR.js → chunk-B2NDDA2W.js} +10 -10
- package/dist/bundle/{chunk-MQK2UNG4.js → chunk-CGH6UH3T.js} +8 -8
- package/dist/bundle/{chunk-BP3TZ4EY.js → chunk-CRYWPLJP.js} +1 -1
- package/dist/bundle/{chunk-Q5EYTU3Q.js → chunk-CT2MIWXY.js} +3 -3
- package/dist/bundle/{chunk-7LDC275M.js → chunk-DDQXDX4U.js} +7 -7
- package/dist/bundle/{chunk-2KVR7FF3.js → chunk-DKIAHQRN.js} +9 -9
- package/dist/bundle/{chunk-CCHHEMPM.js → chunk-EB2IULWB.js} +3 -2
- package/dist/bundle/{chunk-MXG4L7NH.js → chunk-EBEYU7RW.js} +10 -10
- package/dist/bundle/{chunk-2F7D6YMB.js → chunk-EDJQDR5X.js} +4 -4
- package/dist/bundle/{chunk-E7BTD4P6.js → chunk-EZIJPXDZ.js} +6 -6
- package/dist/bundle/{chunk-RE5SEGSR.js → chunk-FHY664YS.js} +4 -4
- package/dist/bundle/{chunk-B5XAETYU.js → chunk-FROWEHK7.js} +2 -2
- package/dist/bundle/{chunk-IVDUR5Y4.js → chunk-G6RG2AZV.js} +15 -8
- package/dist/bundle/{chunk-P547HU26.js → chunk-GAYW2JRW.js} +10 -10
- package/dist/bundle/{chunk-2A4BAMNF.js → chunk-GIKNAOER.js} +4 -4
- package/dist/bundle/{chunk-UMWR5PKA.js → chunk-HN3EDDVX.js} +13 -13
- package/dist/bundle/{chunk-7GSE57K3.js → chunk-HVAXTTOT.js} +3 -3
- package/dist/bundle/{chunk-G53HRGTK.js → chunk-I3K6JG4I.js} +17 -17
- package/dist/bundle/{chunk-YG4OI3HJ.js → chunk-IJYYD2JU.js} +383 -204
- package/dist/bundle/{chunk-M2YIJDBL.js → chunk-K2OQCQ2N.js} +6 -6
- package/dist/bundle/{chunk-P62Z3Q35.js → chunk-KJV3BI7S.js} +14 -14
- package/dist/bundle/{chunk-DIP3ENSY.js → chunk-KMZRXGTF.js} +1 -1
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-KV4267S4.js} +1 -1
- package/dist/bundle/{chunk-QWRBAQZ7.js → chunk-LMN7SYX4.js} +1 -1
- package/dist/bundle/{chunk-I7EWIIBC.js → chunk-M24BGP7M.js} +2 -3
- package/dist/bundle/{chunk-V5ZID7KC.js → chunk-M6O4DH5F.js} +1 -1
- package/dist/bundle/{chunk-WVWNKZI4.js → chunk-MLWN27HF.js} +465 -280
- package/dist/bundle/{chunk-VA3JKERH.js → chunk-N7DLDEFU.js} +2 -2
- package/dist/bundle/{chunk-QZXHMQCM.js → chunk-OYB3FUYQ.js} +1 -1
- package/dist/bundle/{chunk-I62OTHDE.js → chunk-POS35G6D.js} +3 -3
- package/dist/bundle/{chunk-5C74F7XX.js → chunk-PWTEWT4M.js} +4 -4
- package/dist/bundle/{chunk-NVQUK2DH.js → chunk-PYX6K527.js} +47 -47
- package/dist/bundle/{chunk-VERSKGJV.js → chunk-Q4T2HBZP.js} +2 -2
- package/dist/bundle/{chunk-3EAAEF5U.js → chunk-QCNK3YUZ.js} +95 -36
- package/dist/bundle/{chunk-OGK7LMYT.js → chunk-R6SBRHVG.js} +6 -6
- package/dist/bundle/{chunk-WBJQEB6E.js → chunk-RPEW7E3S.js} +12 -12
- package/dist/bundle/{chunk-X5XIFNTI.js → chunk-TTOKDZQX.js} +2 -2
- package/dist/bundle/{chunk-NGZW2JPK.js → chunk-UBLFUQ7O.js} +7 -7
- package/dist/bundle/{chunk-W643XZIR.js → chunk-VD6GZ3W2.js} +2 -2
- package/dist/bundle/{chunk-6CZQJ5XR.js → chunk-VP5FL5JQ.js} +8 -8
- package/dist/bundle/{chunk-XPREXN3W.js → chunk-VTJ5TMGN.js} +3 -3
- package/dist/bundle/{chunk-IPKXRW6W.js → chunk-WKHHCCJE.js} +26 -25
- package/dist/bundle/{chunk-KLLKDOO2.js → chunk-X7EBOXBY.js} +485 -309
- package/dist/bundle/{chunk-H7OQ4YZV.js → chunk-XAANQN4R.js} +47 -28
- package/dist/bundle/{chunk-EW3XTUPB.js → chunk-XBIPSSKI.js} +4 -4
- package/dist/bundle/{chunk-3YGYB3LJ.js → chunk-XEIGKPYU.js} +27 -6
- package/dist/bundle/{chunk-FTGCXIQA.js → chunk-YGJO5VNR.js} +47 -33
- package/dist/bundle/{chunk-PQLBPYJR.js → chunk-YPF6OS37.js} +1 -1
- package/dist/bundle/{chunk-ER6PJAPK.js → chunk-ZNW4E3SG.js} +3 -3
- package/dist/bundle/{chunk-F5SZVO3A.js → chunk-ZS6YKNYS.js} +4 -4
- package/dist/bundle/command-contract-GVNLRXWS.js +34 -0
- package/dist/bundle/{decode-X7Y2VSYZ.js → decode-WCS4KOHV.js} +5 -5
- package/dist/bundle/{dispatch-OWNO2CMC.js → dispatch-3ILCYZ4Q.js} +8 -8
- package/dist/bundle/{dist-L7FNC74Q.js → dist-FL422DTA.js} +14 -14
- package/dist/bundle/{echarts-5AB3LFVD.js → echarts-45D6USAX.js} +2 -2
- package/dist/bundle/{embed-VBS5LRCE.js → embed-4B4ATLCN.js} +6 -6
- package/dist/bundle/{embedder-VFSYBDKK.js → embedder-ASWGJXNV.js} +9 -9
- package/dist/bundle/{failure-E534GZDF.js → failure-UDL5QZRZ.js} +2 -2
- package/dist/bundle/{first-run-NO2ODH2W.js → first-run-5K3UD4BU.js} +11 -11
- package/dist/bundle/first-screen-NNX54MYC.js +32 -0
- package/dist/bundle/{instructions-52W6ZQTU.js → instructions-6EFSPC7C.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-PPVOM4SE.js} +2 -2
- package/dist/bundle/{node-TL2PBNKO.js → node-OXC26QXO.js} +2 -2
- package/dist/bundle/{node-sqlite-757HNQAD.js → node-sqlite-PXHZAG7Y.js} +6 -6
- package/dist/bundle/{oauth-VDRNJ7KN.js → oauth-YK2QLC7U.js} +7 -7
- package/dist/bundle/{open-NUWYOKPO.js → open-SABDXZ4B.js} +5 -5
- package/dist/bundle/{openai-YLBFVK5X.js → openai-DPURPXEU.js} +14 -14
- package/dist/bundle/{process-PWAGP6YY.js → process-YWPAOI6G.js} +1 -1
- package/dist/bundle/{program-PPUPVL7O.js → program-L43S7DRF.js} +12245 -11133
- package/dist/bundle/{prompt-M5U66RVJ.js → prompt-GKVNFGFE.js} +5 -5
- package/dist/bundle/{recognize-DCMDZA2U.js → recognize-344YDSLX.js} +4 -4
- package/dist/bundle/{remote-4SHI5WJG.js → remote-53UZUJJU.js} +7 -7
- package/dist/bundle/{rerank-DYMZMNPQ.js → rerank-PAIRND6R.js} +7 -7
- package/dist/bundle/{serve-HO3WME4G.js → serve-DZSO7LJK.js} +9 -9
- package/dist/bundle/{server-R3TIPRZN.js → server-EGG3V67I.js} +39 -39
- package/dist/bundle/server-SGGMRV2K.js +64 -0
- package/dist/bundle/{sqlite-runtime-DWRITUIH.js → sqlite-runtime-ZQ6F3VYZ.js} +6 -6
- package/dist/bundle/{state-QOMUDOGF.js → state-LXPOWLZ5.js} +6 -6
- package/dist/bundle/{store-RGO6IABA.js → store-4ZMSK5R5.js} +15 -15
- package/dist/bundle/{store-LHHMOE5V.js → store-PHT75I6S.js} +21 -19
- package/dist/bundle/store-maintenance-command-C6ONZNRX.js +54 -0
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +149 -3
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/import.d.ts +3 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +92 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +29 -3
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +9 -7
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +49 -2
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +38 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +12 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +30 -1
- package/dist/config.js.map +1 -1
- package/dist/mail/doctor.d.ts +3 -2
- package/dist/mail/doctor.d.ts.map +1 -1
- package/dist/mail/doctor.js +14 -16
- package/dist/mail/doctor.js.map +1 -1
- package/dist/mail/domain-age.d.ts +29 -0
- package/dist/mail/domain-age.d.ts.map +1 -0
- package/dist/mail/domain-age.js +157 -0
- package/dist/mail/domain-age.js.map +1 -0
- package/dist/mail/mbox.d.ts +9 -0
- package/dist/mail/mbox.d.ts.map +1 -0
- package/dist/mail/mbox.js +230 -0
- package/dist/mail/mbox.js.map +1 -0
- package/dist/oauth.d.ts +13 -9
- package/dist/oauth.d.ts.map +1 -1
- package/dist/oauth.js +12 -25
- package/dist/oauth.js.map +1 -1
- package/dist/profile.d.ts +4 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +6 -1
- package/dist/profile.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +15 -2
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -1
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/mail-cli/SKILL.md +2 -0
- package/dist/bundle/command-contract-B3OGAIDB.js +0 -34
- package/dist/bundle/first-screen-7VJLGMJJ.js +0 -32
- package/dist/bundle/server-244FHPY4.js +0 -64
- package/dist/bundle/store-maintenance-command-LU2ZBDUY.js +0 -54
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
settledStatus,
|
|
53
53
|
useStoredProviders,
|
|
54
54
|
validCounter
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-EBEYU7RW.js";
|
|
56
56
|
import {
|
|
57
57
|
FACT_STATUSES,
|
|
58
58
|
LINK_KINDS,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
matches,
|
|
75
75
|
priorityBand,
|
|
76
76
|
priorityLabel
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-UBLFUQ7O.js";
|
|
78
78
|
import {
|
|
79
79
|
CHAT_MESSAGES_READ,
|
|
80
80
|
FACT_TYPES,
|
|
@@ -83,6 +83,7 @@ import {
|
|
|
83
83
|
OPERATORS_BY_TYPE,
|
|
84
84
|
QUERY_LIMITS,
|
|
85
85
|
REVIEW_LIMIT,
|
|
86
|
+
aggregateMeetingCounts,
|
|
86
87
|
aggregateMeetingStats,
|
|
87
88
|
calendarText,
|
|
88
89
|
canonicalMeetingReference,
|
|
@@ -125,7 +126,7 @@ import {
|
|
|
125
126
|
validateQuery,
|
|
126
127
|
walkQuery,
|
|
127
128
|
zonedMoment
|
|
128
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-4IEDXIUN.js";
|
|
129
130
|
import {
|
|
130
131
|
DEFAULT_STEMMERS,
|
|
131
132
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -138,26 +139,26 @@ import {
|
|
|
138
139
|
fold,
|
|
139
140
|
normalize,
|
|
140
141
|
parseStemmers
|
|
141
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-CGH6UH3T.js";
|
|
142
143
|
import {
|
|
143
144
|
DEFAULT_TASK_CATEGORIES,
|
|
144
145
|
sharedConfigPath,
|
|
145
146
|
storedTaskCategories,
|
|
146
147
|
taskCategoriesReader
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-K2OQCQ2N.js";
|
|
148
149
|
import {
|
|
149
150
|
refuseOwnerStoreInTests,
|
|
150
151
|
storePath
|
|
151
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-TTOKDZQX.js";
|
|
152
153
|
import {
|
|
153
154
|
quietSqliteWarning,
|
|
154
155
|
storeCapable
|
|
155
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-EZIJPXDZ.js";
|
|
156
157
|
import {
|
|
157
158
|
PRAGMAS,
|
|
158
159
|
TIME_LIMIT_FUNCTION,
|
|
159
160
|
TimeLimitReached
|
|
160
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-KMZRXGTF.js";
|
|
161
162
|
import {
|
|
162
163
|
array,
|
|
163
164
|
boolean,
|
|
@@ -174,7 +175,7 @@ import {
|
|
|
174
175
|
safeParse,
|
|
175
176
|
strictObject,
|
|
176
177
|
string
|
|
177
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-G6RG2AZV.js";
|
|
178
179
|
import {
|
|
179
180
|
resolveFrom
|
|
180
181
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -182,7 +183,7 @@ import {
|
|
|
182
183
|
CliError,
|
|
183
184
|
isCliError,
|
|
184
185
|
singleLine
|
|
185
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-EB2IULWB.js";
|
|
186
187
|
import {
|
|
187
188
|
SQLiteTable,
|
|
188
189
|
TableAliasProxyHandler,
|
|
@@ -207,12 +208,12 @@ import {
|
|
|
207
208
|
sql,
|
|
208
209
|
sqliteTable,
|
|
209
210
|
text
|
|
210
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-LMN7SYX4.js";
|
|
211
212
|
import {
|
|
212
213
|
__name
|
|
213
214
|
} from "./chunk-ZVVMGPBJ.js";
|
|
214
215
|
|
|
215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
216
217
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
217
218
|
const methods = whole;
|
|
218
219
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -340,7 +341,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
340
341
|
};
|
|
341
342
|
}, "bindAccount");
|
|
342
343
|
|
|
343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
344
345
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
345
346
|
var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
|
|
346
347
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -363,7 +364,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
363
364
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
364
365
|
}, "sourceOf");
|
|
365
366
|
|
|
366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
367
368
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
368
369
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
369
370
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -550,7 +551,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind3)
|
|
|
550
551
|
return { accounts: [...chosen.values()], skipped };
|
|
551
552
|
}, "fitting");
|
|
552
553
|
|
|
553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
554
555
|
var IndexBuilderOn = class {
|
|
555
556
|
static {
|
|
556
557
|
__name(this, "IndexBuilderOn");
|
|
@@ -745,7 +746,7 @@ function alias(table, alias2) {
|
|
|
745
746
|
}
|
|
746
747
|
__name(alias, "alias");
|
|
747
748
|
|
|
748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
749
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
749
750
|
var ENTITY_TABLES = {
|
|
750
751
|
account: "accounts",
|
|
751
752
|
attachment: "attachments",
|
|
@@ -787,7 +788,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
787
788
|
return { table, pointer, type, count, known: known2 };
|
|
788
789
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
789
790
|
|
|
790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
791
792
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
792
793
|
id: integer("id").primaryKey(),
|
|
793
794
|
name: text("name").notNull().unique(),
|
|
@@ -796,7 +797,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
796
797
|
updatedAt: integer("updated_at").notNull()
|
|
797
798
|
});
|
|
798
799
|
|
|
799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
800
801
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
801
802
|
sourceKey: text("source_key").notNull(),
|
|
802
803
|
collection: text("collection").notNull(),
|
|
@@ -806,13 +807,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
806
807
|
createdAt: integer("created_at").notNull()
|
|
807
808
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
808
809
|
|
|
809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
810
811
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
811
812
|
id: integer("id").notNull(),
|
|
812
813
|
indexableType: text("indexable_type").notNull()
|
|
813
814
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
814
815
|
|
|
815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
816
817
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
817
818
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
818
819
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -838,7 +839,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
838
839
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
839
840
|
]);
|
|
840
841
|
|
|
841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
842
843
|
var accounts = sqliteTable("accounts", {
|
|
843
844
|
id: integer("id").primaryKey(),
|
|
844
845
|
provider: text("provider").notNull(),
|
|
@@ -2461,7 +2462,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2461
2462
|
at: integer("at").notNull()
|
|
2462
2463
|
});
|
|
2463
2464
|
|
|
2464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2465
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2465
2466
|
var ARMS = [
|
|
2466
2467
|
[
|
|
2467
2468
|
"message",
|
|
@@ -2588,7 +2589,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2588
2589
|
return recomputed;
|
|
2589
2590
|
}, "drainInvolvementQueue");
|
|
2590
2591
|
|
|
2591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2592
2593
|
import { domainToUnicode } from "node:url";
|
|
2593
2594
|
|
|
2594
2595
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12610,7 +12611,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12610
12611
|
}, "oa");
|
|
12611
12612
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12612
12613
|
|
|
12613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12614
12615
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12615
12616
|
var ID = /^[\w-]{10,}$/;
|
|
12616
12617
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12651,7 +12652,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
|
|
|
12651
12652
|
return { url, documentId: googleDocumentId(url) };
|
|
12652
12653
|
}), "googleDocumentLinks");
|
|
12653
12654
|
|
|
12654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12655
12656
|
var PHONE_PLANS = [
|
|
12656
12657
|
{
|
|
12657
12658
|
country: "us",
|
|
@@ -13031,7 +13032,7 @@ var PHONE_PLANS = [
|
|
|
13031
13032
|
}
|
|
13032
13033
|
];
|
|
13033
13034
|
|
|
13034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
13035
13036
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
13036
13037
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
13037
13038
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -13072,7 +13073,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
13072
13073
|
return void 0;
|
|
13073
13074
|
}, "nationalPhone");
|
|
13074
13075
|
|
|
13075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
13076
13077
|
var BEFORE = [
|
|
13077
13078
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
13078
13079
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13332,7 +13333,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
|
|
|
13332
13333
|
return found2.sort((a, b) => a.start - b.start);
|
|
13333
13334
|
}, "findPlaces");
|
|
13334
13335
|
|
|
13335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13336
13337
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13337
13338
|
var MENTION_VERSIONS = {
|
|
13338
13339
|
phone: 1,
|
|
@@ -13522,7 +13523,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13522
13523
|
};
|
|
13523
13524
|
}, "typedPhone");
|
|
13524
13525
|
|
|
13525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13526
13527
|
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";
|
|
13527
13528
|
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";
|
|
13528
13529
|
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";
|
|
@@ -13530,7 +13531,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13530
13531
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13531
13532
|
var NAME_WORDS = WORDS.split(" ");
|
|
13532
13533
|
|
|
13533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13534
13535
|
var LATIN_TO_CYRILLIC = {
|
|
13535
13536
|
shch: "\u0449",
|
|
13536
13537
|
sch: "\u0449",
|
|
@@ -13738,7 +13739,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
|
|
|
13738
13739
|
return found2;
|
|
13739
13740
|
}, "findUnknownNames");
|
|
13740
13741
|
|
|
13741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13742
13743
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13743
13744
|
"webpage",
|
|
13744
13745
|
"share",
|
|
@@ -13778,7 +13779,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13778
13779
|
});
|
|
13779
13780
|
}, "matchDownloads");
|
|
13780
13781
|
|
|
13781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13782
13783
|
var QUERY_VERSION = 1;
|
|
13783
13784
|
var QUERY_LIMITS2 = {
|
|
13784
13785
|
...QUERY_LIMITS,
|
|
@@ -13814,7 +13815,7 @@ function exhausted(budget) {
|
|
|
13814
13815
|
}
|
|
13815
13816
|
__name(exhausted, "exhausted");
|
|
13816
13817
|
|
|
13817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13818
13819
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13819
13820
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13820
13821
|
kind: "char",
|
|
@@ -14214,7 +14215,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14214
14215
|
return out;
|
|
14215
14216
|
}, "foldRegex");
|
|
14216
14217
|
|
|
14217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14218
14219
|
var PRESET_VERSION = 1;
|
|
14219
14220
|
var PRESETS = {
|
|
14220
14221
|
password: {
|
|
@@ -14268,7 +14269,7 @@ var PRESETS = {
|
|
|
14268
14269
|
}
|
|
14269
14270
|
};
|
|
14270
14271
|
|
|
14271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14272
14273
|
var FIELD_VERSION = 2;
|
|
14273
14274
|
var UNITS = {
|
|
14274
14275
|
"": 1,
|
|
@@ -14458,7 +14459,7 @@ var QUERY_FIELDS = [
|
|
|
14458
14459
|
{
|
|
14459
14460
|
name: "has",
|
|
14460
14461
|
example: "has:file",
|
|
14461
|
-
index: "attachments / messages_fts links",
|
|
14462
|
+
index: "attachments / messages_fts links / message_transcripts",
|
|
14462
14463
|
aliases: [],
|
|
14463
14464
|
type: "enum",
|
|
14464
14465
|
operators: terms,
|
|
@@ -14477,7 +14478,8 @@ var QUERY_FIELDS = [
|
|
|
14477
14478
|
"sticker",
|
|
14478
14479
|
"contact",
|
|
14479
14480
|
"location",
|
|
14480
|
-
"poll"
|
|
14481
|
+
"poll",
|
|
14482
|
+
"transcript"
|
|
14481
14483
|
]
|
|
14482
14484
|
},
|
|
14483
14485
|
{
|
|
@@ -14728,12 +14730,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14728
14730
|
return validateFields(parsed3.output);
|
|
14729
14731
|
}, "validateAst");
|
|
14730
14732
|
|
|
14731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14733
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14732
14734
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14733
14735
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14734
14736
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14735
14737
|
|
|
14736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14737
14739
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14738
14740
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14739
14741
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14757,7 +14759,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14757
14759
|
};
|
|
14758
14760
|
}, "linkMatch");
|
|
14759
14761
|
|
|
14760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14761
14763
|
var SETTING = "phoneCountries";
|
|
14762
14764
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14763
14765
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14788,7 +14790,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14788
14790
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14789
14791
|
}, "valueMatch");
|
|
14790
14792
|
|
|
14791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14792
14794
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14793
14795
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14794
14796
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14816,7 +14818,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14816
14818
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14817
14819
|
}, "vocabularySimilarity");
|
|
14818
14820
|
|
|
14819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14820
14822
|
import { createHash } from "node:crypto";
|
|
14821
14823
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14822
14824
|
try {
|
|
@@ -14882,7 +14884,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14882
14884
|
});
|
|
14883
14885
|
}, "guardTagCreation");
|
|
14884
14886
|
|
|
14885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14886
14888
|
var invalid = /* @__PURE__ */ __name((message2) => {
|
|
14887
14889
|
throw new CliError("validation_error", message2);
|
|
14888
14890
|
}, "invalid");
|
|
@@ -14959,7 +14961,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14959
14961
|
};
|
|
14960
14962
|
}, "createTagRedirectIndex");
|
|
14961
14963
|
|
|
14962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14963
14965
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14964
14966
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14965
14967
|
if (!row2)
|
|
@@ -14987,7 +14989,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14987
14989
|
return snapshot2;
|
|
14988
14990
|
}, "tagRedirectSnapshot");
|
|
14989
14991
|
|
|
14990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14991
14993
|
import { createHash as createHash2 } from "node:crypto";
|
|
14992
14994
|
var TASK_KEY_PREFIXES = {
|
|
14993
14995
|
question: "Q",
|
|
@@ -15015,7 +15017,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15015
15017
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
15016
15018
|
}, "taskAccountOf");
|
|
15017
15019
|
|
|
15018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
15019
15021
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
15020
15022
|
var REFERABLE = {
|
|
15021
15023
|
note: { tombstone: true },
|
|
@@ -15179,7 +15181,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15179
15181
|
return row2 ? String(row2.id ?? row2.key) : void 0;
|
|
15180
15182
|
}, "taskIdOf");
|
|
15181
15183
|
|
|
15182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15183
15185
|
var toMs = /* @__PURE__ */ __name((iso13) => {
|
|
15184
15186
|
if (iso13 === null || iso13 === void 0)
|
|
15185
15187
|
return null;
|
|
@@ -15193,7 +15195,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15193
15195
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15194
15196
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15195
15197
|
|
|
15196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15197
15199
|
var TAG_KINDS = ["tag", "topic"];
|
|
15198
15200
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15199
15201
|
var TAG_TYPE = {
|
|
@@ -15396,7 +15398,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15396
15398
|
return result;
|
|
15397
15399
|
}, "tagsOf");
|
|
15398
15400
|
|
|
15399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15400
15402
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15401
15403
|
var SPEECH = speech("att");
|
|
15402
15404
|
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");
|
|
@@ -15674,6 +15676,8 @@ var PEER_KIND = "CASE WHEN json_extract(c.metadata,'$.peerKind') IN ('private','
|
|
|
15674
15676
|
var kind = messengerOnly(({ value }) => always(bound(`${PEER_KIND} = ?`, value.toLowerCase())));
|
|
15675
15677
|
var has = /* @__PURE__ */ __name(({ value }, { corpus, mail }) => {
|
|
15676
15678
|
const wanted = value.toLowerCase();
|
|
15679
|
+
if (wanted === "transcript")
|
|
15680
|
+
return always(bound(mail ? "0" : "EXISTS (SELECT 1 FROM message_transcripts t WHERE t.message_id = m.id)"));
|
|
15677
15681
|
return always(wanted === "text" ? bound("length(trim(coalesce(m.text,''))) > 0") : wanted === "link" ? bound(`(${mail ? "m.text LIKE '%' || ? || '%'" : "m.id IN (SELECT rowid FROM messages_fts WHERE messages_fts MATCH ?)"} OR EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id AND att.kind IN ('share','webpage')))`, mail ? "://" : quoted("://")) : wanted === "attachment" ? bound(`EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id)`) : bound(`EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id AND att.kind IN (${storedKinds(wanted).map(() => "?").join(",")}))`, ...storedKinds(wanted)));
|
|
15678
15682
|
}, "has");
|
|
15679
15683
|
var inSourceField = /* @__PURE__ */ __name(({ value }, { execution }) => {
|
|
@@ -15758,7 +15762,7 @@ var FIELD_COMPILERS = {
|
|
|
15758
15762
|
subject
|
|
15759
15763
|
};
|
|
15760
15764
|
|
|
15761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15762
15766
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15763
15767
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15764
15768
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15774,7 +15778,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15774
15778
|
};
|
|
15775
15779
|
}, "placeOf");
|
|
15776
15780
|
|
|
15777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15778
15782
|
var DRAIN_ON_WRITE = 500;
|
|
15779
15783
|
var METHOD = "rules";
|
|
15780
15784
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15937,7 +15941,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15937
15941
|
return queued.length;
|
|
15938
15942
|
}, "drainMentions");
|
|
15939
15943
|
|
|
15940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15941
15945
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15942
15946
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15943
15947
|
if (!exists2)
|
|
@@ -15945,7 +15949,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15945
15949
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15946
15950
|
}, "indexRow");
|
|
15947
15951
|
|
|
15948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15949
15953
|
var INDEX = "message_stems";
|
|
15950
15954
|
var SETTING2 = "searchStemmers";
|
|
15951
15955
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -16067,7 +16071,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
16067
16071
|
};
|
|
16068
16072
|
}, "stemmerCache");
|
|
16069
16073
|
|
|
16070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
16071
16075
|
var SQLITE_BUSY = 5;
|
|
16072
16076
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
16073
16077
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -16162,7 +16166,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
16162
16166
|
}
|
|
16163
16167
|
}, "read");
|
|
16164
16168
|
|
|
16165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
16166
16170
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
16167
16171
|
coalesce(CASE k.chunkable_type
|
|
16168
16172
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16304,7 +16308,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16304
16308
|
}, "dropUnusedVectors");
|
|
16305
16309
|
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");
|
|
16306
16310
|
|
|
16307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16308
16312
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
16309
16313
|
target: [accounts.provider, accounts.externalId],
|
|
16310
16314
|
set: {
|
|
@@ -16413,7 +16417,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16413
16417
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16414
16418
|
}, "dropOrphanPeople");
|
|
16415
16419
|
|
|
16416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16417
16421
|
var FOLDED = [
|
|
16418
16422
|
{ table: "tasks", column: "title" },
|
|
16419
16423
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16450,7 +16454,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16450
16454
|
return filled2;
|
|
16451
16455
|
}, "fillFolded");
|
|
16452
16456
|
|
|
16453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
|
|
16454
16458
|
var HISTORY_KEY = "$history";
|
|
16455
16459
|
var objectOf = /* @__PURE__ */ __name((text6) => {
|
|
16456
16460
|
if (typeof text6 !== "string")
|
|
@@ -16526,7 +16530,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
|
|
|
16526
16530
|
return rest;
|
|
16527
16531
|
}, "withoutHistory");
|
|
16528
16532
|
|
|
16529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16530
16534
|
import { createHash as createHash3 } from "node:crypto";
|
|
16531
16535
|
var CHUNK_CHARS = 1200;
|
|
16532
16536
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16631,7 +16635,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16631
16635
|
return chunks2;
|
|
16632
16636
|
}, "cutChunks");
|
|
16633
16637
|
|
|
16634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16635
16639
|
var DAY = 864e5;
|
|
16636
16640
|
var CURRENCY = [
|
|
16637
16641
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16757,7 +16761,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
|
|
|
16757
16761
|
return best?.day ?? null;
|
|
16758
16762
|
}, "dueDayOf");
|
|
16759
16763
|
|
|
16760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16761
16765
|
var DAY2 = 864e5;
|
|
16762
16766
|
var STOP_WORDS = new Set([
|
|
16763
16767
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16912,7 +16916,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16912
16916
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16913
16917
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16914
16918
|
|
|
16915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16916
16920
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16917
16921
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16918
16922
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -17183,7 +17187,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
17183
17187
|
};
|
|
17184
17188
|
}, "readiness");
|
|
17185
17189
|
|
|
17186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
17187
17191
|
var DOCUMENT_PICTURE = "document_picture";
|
|
17188
17192
|
var SCAN_PAGE2 = 5e3;
|
|
17189
17193
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -17246,7 +17250,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
17246
17250
|
}, "nearestPictures")
|
|
17247
17251
|
}), "documentPicturesOver");
|
|
17248
17252
|
|
|
17249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
17250
17254
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
17251
17255
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
17252
17256
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17311,7 +17315,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17311
17315
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17312
17316
|
var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
|
|
17313
17317
|
|
|
17314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17315
17319
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17316
17320
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17317
17321
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17401,7 +17405,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17401
17405
|
});
|
|
17402
17406
|
}, "linkMeeting");
|
|
17403
17407
|
|
|
17404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17405
17409
|
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), ''))";
|
|
17406
17410
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17407
17411
|
"working-location",
|
|
@@ -17631,7 +17635,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17631
17635
|
return true;
|
|
17632
17636
|
}, "resetNoteIndex");
|
|
17633
17637
|
|
|
17634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17635
17639
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17636
17640
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17637
17641
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17650,7 +17654,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17650
17654
|
}
|
|
17651
17655
|
}, "resolvePersonLinks");
|
|
17652
17656
|
|
|
17653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17654
17658
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17655
17659
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17656
17660
|
find: orm.select({
|
|
@@ -17875,7 +17879,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17875
17879
|
}, "meetingIdentityPk");
|
|
17876
17880
|
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");
|
|
17877
17881
|
|
|
17878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17879
17883
|
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");
|
|
17880
17884
|
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");
|
|
17881
17885
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -18155,7 +18159,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
18155
18159
|
}
|
|
18156
18160
|
}, "replaceAutoTags");
|
|
18157
18161
|
|
|
18158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
18159
18163
|
import { createHash as createHash4 } from "node:crypto";
|
|
18160
18164
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
18161
18165
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -18253,7 +18257,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
18253
18257
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
18254
18258
|
}, "contextEvidenceRequest");
|
|
18255
18259
|
|
|
18256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
|
|
18257
18261
|
var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
18258
18262
|
var ACTIVITY = `
|
|
18259
18263
|
SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
|
|
@@ -18369,7 +18373,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
|
|
|
18369
18373
|
threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
|
|
18370
18374
|
}), "mailActivity");
|
|
18371
18375
|
|
|
18372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
18373
18377
|
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");
|
|
18374
18378
|
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;
|
|
18375
18379
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -18449,8 +18453,68 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
18449
18453
|
const kept = trimEdges(lines.filter((_, i) => !drop.has(i)));
|
|
18450
18454
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
18451
18455
|
}, "mailCore");
|
|
18452
|
-
|
|
18453
|
-
|
|
18456
|
+
var QUOTED = /^\s*>/;
|
|
18457
|
+
var ATTRIBUTION_END = /(wrote|написал(\(а\)|а|и)?|escribió|a écrit|schrieb\s.+|<[^<>\s]+@[^<>\s]+>)\s*:\s*$/iu;
|
|
18458
|
+
var ATTRIBUTION_START = /^(on|le|am|el|в)\s/iu;
|
|
18459
|
+
var DATED = /^(on|le|am|el|в|\d)/iu;
|
|
18460
|
+
var ORIGINAL = /^-{2,}\s*(original message|ursprüngliche nachricht|message d'origine|mensaje original|исходное сообщение)\s*-{2,}$/iu;
|
|
18461
|
+
var FROM_LINE = /^(from|von|de|от)\s?:\s*\S/iu;
|
|
18462
|
+
var DATE_LINE = /^(sent|date|gesendet|datum|envoyé|enviado|fecha|отправлено|дата)\s?:/iu;
|
|
18463
|
+
var FORWARD = /^(-{2,}\s*(forwarded message|weitergeleitete nachricht|message transféré|mensaje reenviado|пересылаемое сообщение)\s*-{2,}|begin forwarded message:)$/iu;
|
|
18464
|
+
var RULE = /^_{5,}$/;
|
|
18465
|
+
var MOBILE = /^(sent from my |von meinem .+ gesendet$|envoyé de mon |отправлено с |enviado desde mi )/iu;
|
|
18466
|
+
var attributionAt = /* @__PURE__ */ __name((lines, i) => {
|
|
18467
|
+
const line = (lines[i] ?? "").trim();
|
|
18468
|
+
if (!ATTRIBUTION_END.test(line))
|
|
18469
|
+
return -1;
|
|
18470
|
+
const prior = (lines[i - 1] ?? "").trim();
|
|
18471
|
+
return prior && ATTRIBUTION_START.test(prior) && !ATTRIBUTION_START.test(line) ? i - 1 : i;
|
|
18472
|
+
}, "attributionAt");
|
|
18473
|
+
var outlookAt = /* @__PURE__ */ __name((lines, i) => {
|
|
18474
|
+
const line = (lines[i] ?? "").trim();
|
|
18475
|
+
if (ORIGINAL.test(line))
|
|
18476
|
+
return true;
|
|
18477
|
+
return FROM_LINE.test(line) && lines.slice(i + 1, i + 4).some((next) => DATE_LINE.test(next.trim()));
|
|
18478
|
+
}, "outlookAt");
|
|
18479
|
+
var nextText = /* @__PURE__ */ __name((lines, from2) => lines.slice(from2).find((line) => line.trim()) ?? "", "nextText");
|
|
18480
|
+
var ownLines = /* @__PURE__ */ __name((lines) => {
|
|
18481
|
+
const kept = [];
|
|
18482
|
+
for (let i = 0; i < lines.length; i++) {
|
|
18483
|
+
const line = lines[i] ?? "";
|
|
18484
|
+
if (QUOTED.test(line))
|
|
18485
|
+
continue;
|
|
18486
|
+
if (outlookAt(lines, i)) {
|
|
18487
|
+
const last = kept.findLastIndex((one2) => one2.trim());
|
|
18488
|
+
return last !== -1 && RULE.test((kept[last] ?? "").trim()) ? kept.slice(0, last) : kept;
|
|
18489
|
+
}
|
|
18490
|
+
const start = attributionAt(lines, i);
|
|
18491
|
+
if (start === -1) {
|
|
18492
|
+
kept.push(line);
|
|
18493
|
+
continue;
|
|
18494
|
+
}
|
|
18495
|
+
if (start < i)
|
|
18496
|
+
kept.pop();
|
|
18497
|
+
if (QUOTED.test(nextText(lines, i + 1)))
|
|
18498
|
+
continue;
|
|
18499
|
+
const header = lines.slice(start, i + 1).join(" ").trim();
|
|
18500
|
+
if (/\d/.test(header) && (header.includes("@") || DATED.test(header)) && header.length <= 300)
|
|
18501
|
+
return kept;
|
|
18502
|
+
if (start < i)
|
|
18503
|
+
kept.push(lines[start] ?? "");
|
|
18504
|
+
kept.push(line);
|
|
18505
|
+
}
|
|
18506
|
+
return kept;
|
|
18507
|
+
}, "ownLines");
|
|
18508
|
+
var mailOwnText = /* @__PURE__ */ __name((body2) => {
|
|
18509
|
+
const lines = body2.replace(/\r\n?/g, "\n").split("\n");
|
|
18510
|
+
const forward = lines.findIndex((line) => FORWARD.test(line.trim()));
|
|
18511
|
+
const head = forward === -1 ? lines : lines.slice(0, forward);
|
|
18512
|
+
const own = withoutSignOff(trimEdges(ownLines(head).filter((line) => !MOBILE.test(line.trim()))));
|
|
18513
|
+
const text6 = [...own, ...forward === -1 ? [] : ["", ...lines.slice(forward)]].join("\n").trim();
|
|
18514
|
+
return text6 || body2.trim();
|
|
18515
|
+
}, "mailOwnText");
|
|
18516
|
+
|
|
18517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
18454
18518
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
18455
18519
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
18456
18520
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18560,7 +18624,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18560
18624
|
return emails3 + threads;
|
|
18561
18625
|
}, "drainEmailIndex");
|
|
18562
18626
|
|
|
18563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18564
18628
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18565
18629
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18566
18630
|
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,
|
|
@@ -18658,7 +18722,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18658
18722
|
var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
|
|
18659
18723
|
SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
|
|
18660
18724
|
|
|
18661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18662
18726
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18663
18727
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18664
18728
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18708,7 +18772,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18708
18772
|
return threads.length;
|
|
18709
18773
|
}, "markEmailsRestored");
|
|
18710
18774
|
|
|
18711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18712
18776
|
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");
|
|
18713
18777
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18714
18778
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18775,7 +18839,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18775
18839
|
}
|
|
18776
18840
|
}), "mailRulesOver");
|
|
18777
18841
|
|
|
18778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18779
18843
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18780
18844
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18781
18845
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18783,7 +18847,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18783
18847
|
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);
|
|
18784
18848
|
}, "reviewLink");
|
|
18785
18849
|
|
|
18786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18787
18851
|
function checkMeetingCancelled(signal) {
|
|
18788
18852
|
if (!signal?.aborted)
|
|
18789
18853
|
return;
|
|
@@ -18794,7 +18858,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18794
18858
|
}
|
|
18795
18859
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18796
18860
|
|
|
18797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18798
18862
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18799
18863
|
id: Number(row2.id),
|
|
18800
18864
|
accountId: Number(row2.account_id),
|
|
@@ -18844,7 +18908,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18844
18908
|
createdAt: Number(row2.created_at)
|
|
18845
18909
|
}), "transcriptRowOf");
|
|
18846
18910
|
|
|
18847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18848
18912
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18849
18913
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18850
18914
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -19011,7 +19075,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19011
19075
|
}
|
|
19012
19076
|
}), "meetingReadsOver");
|
|
19013
19077
|
|
|
19014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
19015
19079
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
19016
19080
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
19017
19081
|
const params = [input.accountId];
|
|
@@ -19054,7 +19118,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
19054
19118
|
return { clauses, params };
|
|
19055
19119
|
}, "meetingSelectionSql");
|
|
19056
19120
|
|
|
19057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
19058
19122
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19059
19123
|
async meetingChatLines(input) {
|
|
19060
19124
|
checkMeetingCancelled(input.signal);
|
|
@@ -19082,7 +19146,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19082
19146
|
}
|
|
19083
19147
|
}), "meetingChatLinesOver");
|
|
19084
19148
|
|
|
19085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
19086
19150
|
var MESSAGE_FIELDS = {
|
|
19087
19151
|
pk: messages.id,
|
|
19088
19152
|
nativeId: messages.externalId,
|
|
@@ -19253,7 +19317,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
19253
19317
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
19254
19318
|
}), "chatActivity");
|
|
19255
19319
|
|
|
19256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
19257
19321
|
var HIT_FIELDS = {
|
|
19258
19322
|
...MESSAGE_FIELDS,
|
|
19259
19323
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -19352,7 +19416,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
19352
19416
|
};
|
|
19353
19417
|
}, "directReplies");
|
|
19354
19418
|
|
|
19355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
19356
19420
|
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");
|
|
19357
19421
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
19358
19422
|
const found2 = identityRow(context, ref3);
|
|
@@ -19483,7 +19547,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
19483
19547
|
}, "mentioning");
|
|
19484
19548
|
var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
19485
19549
|
|
|
19486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
19487
19551
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
19488
19552
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
19489
19553
|
}, "missing");
|
|
@@ -19605,7 +19669,7 @@ function meetingContextLinksOver(context) {
|
|
|
19605
19669
|
}
|
|
19606
19670
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19607
19671
|
|
|
19608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19609
19673
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19610
19674
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19611
19675
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19634,7 +19698,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19634
19698
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19635
19699
|
}, "indexedText");
|
|
19636
19700
|
|
|
19637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19638
19702
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19639
19703
|
var meetingCurrentIndexRows = `
|
|
19640
19704
|
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
|
|
@@ -19665,7 +19729,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19665
19729
|
}, "invalidateMeetingStems");
|
|
19666
19730
|
var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19667
19731
|
|
|
19668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19669
19733
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19670
19734
|
return {
|
|
19671
19735
|
async indexSearch(original) {
|
|
@@ -19733,10 +19797,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19733
19797
|
}
|
|
19734
19798
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19735
19799
|
|
|
19736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19737
19801
|
import { createHash as createHash5 } from "node:crypto";
|
|
19738
19802
|
|
|
19739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19740
19804
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19741
19805
|
const padded = ` ${term} `;
|
|
19742
19806
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19745,7 +19809,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19745
19809
|
return [...pieces];
|
|
19746
19810
|
}, "trigrams");
|
|
19747
19811
|
|
|
19748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19749
19813
|
var SHORTEST_CORRECTION = 3;
|
|
19750
19814
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19751
19815
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19792,7 +19856,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19792
19856
|
return corrections;
|
|
19793
19857
|
}, "correctWords");
|
|
19794
19858
|
|
|
19795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19796
19860
|
var SHORTEST_GARBLED = 4;
|
|
19797
19861
|
var MOST_WIDENED = 64;
|
|
19798
19862
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19884,7 +19948,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19884
19948
|
return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word) => word.term));
|
|
19885
19949
|
}, "widenWords");
|
|
19886
19950
|
|
|
19887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19888
19952
|
import { readFileSync } from "node:fs";
|
|
19889
19953
|
var loaded;
|
|
19890
19954
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19943,7 +20007,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19943
20007
|
return false;
|
|
19944
20008
|
}, "knownRussianWord");
|
|
19945
20009
|
|
|
19946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19947
20011
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19948
20012
|
var MOST_WORDS = 128;
|
|
19949
20013
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -20170,7 +20234,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
|
|
|
20170
20234
|
return check3(tree);
|
|
20171
20235
|
}, "matchMeetingText");
|
|
20172
20236
|
|
|
20173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
20174
20238
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
20175
20239
|
throw new CliError("validation_error", message2);
|
|
20176
20240
|
}, "fail");
|
|
@@ -20352,7 +20416,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
20352
20416
|
}
|
|
20353
20417
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
20354
20418
|
|
|
20355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
|
|
20356
20420
|
var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20357
20421
|
async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
|
|
20358
20422
|
positiveReadInteger(accountId, "accountId");
|
|
@@ -20384,7 +20448,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20384
20448
|
}
|
|
20385
20449
|
}), "meetingLanguagesOver");
|
|
20386
20450
|
|
|
20387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
20388
20452
|
import { createHash as createHash6 } from "node:crypto";
|
|
20389
20453
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
20390
20454
|
if (value === void 0)
|
|
@@ -20474,7 +20538,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
20474
20538
|
}
|
|
20475
20539
|
}), "meetingParticipantSearchOver");
|
|
20476
20540
|
|
|
20477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
20478
20542
|
var preparationQueries = {
|
|
20479
20543
|
participants: {
|
|
20480
20544
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -20524,7 +20588,7 @@ var preparationQueries = {
|
|
|
20524
20588
|
}
|
|
20525
20589
|
};
|
|
20526
20590
|
|
|
20527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
20528
20592
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20529
20593
|
async preparationContext(original) {
|
|
20530
20594
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -20565,7 +20629,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20565
20629
|
}
|
|
20566
20630
|
}), "meetingPreparationContextOver");
|
|
20567
20631
|
|
|
20568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
20569
20633
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
20570
20634
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
20571
20635
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20579,7 +20643,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20579
20643
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20580
20644
|
)`, "preparationSubjects");
|
|
20581
20645
|
|
|
20582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20583
20647
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20584
20648
|
async preparationKnowledge(original) {
|
|
20585
20649
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20624,7 +20688,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20624
20688
|
}
|
|
20625
20689
|
}), "meetingPreparationKnowledgeOver");
|
|
20626
20690
|
|
|
20627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20628
20692
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20629
20693
|
async preparationNotes(original) {
|
|
20630
20694
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20677,7 +20741,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20677
20741
|
}
|
|
20678
20742
|
}), "meetingPreparationNotesOver");
|
|
20679
20743
|
|
|
20680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20681
20745
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20682
20746
|
async relatedHistory(original) {
|
|
20683
20747
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20748,7 +20812,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20748
20812
|
}
|
|
20749
20813
|
}), "meetingRelatedHistoryOver");
|
|
20750
20814
|
|
|
20751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20752
20816
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20753
20817
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20754
20818
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20829,7 +20893,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20829
20893
|
}
|
|
20830
20894
|
}), "meetingReviewOver");
|
|
20831
20895
|
|
|
20832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20833
20897
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20834
20898
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20835
20899
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20883,8 +20947,14 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20883
20947
|
}
|
|
20884
20948
|
}), "meetingSeriesHistoryOver");
|
|
20885
20949
|
|
|
20886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20887
20951
|
var MOST_ROWS = 5e5;
|
|
20952
|
+
var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
|
|
20953
|
+
EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
|
|
20954
|
+
AND t.superseded_at IS NULL) AS transcribed,
|
|
20955
|
+
s.external_id AS series_key, CASE WHEN s.id IS NULL THEN NULL ELSE coalesce(s.title, m.title) END AS series_title
|
|
20956
|
+
FROM meetings m LEFT JOIN meeting_series s ON s.id = m.meeting_series_id
|
|
20957
|
+
WHERE ${where} ORDER BY m.started_at DESC`, "meetingCountsSql");
|
|
20888
20958
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20889
20959
|
async meetingStats(input) {
|
|
20890
20960
|
checkMeetingCancelled(input.signal);
|
|
@@ -20927,10 +20997,26 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20927
20997
|
speakerName: text6(row2.speaker_name)
|
|
20928
20998
|
})), input.timeZone);
|
|
20929
20999
|
});
|
|
21000
|
+
},
|
|
21001
|
+
async meetingCounts(input) {
|
|
21002
|
+
checkMeetingCancelled(input.signal);
|
|
21003
|
+
positiveReadInteger(input.accountId, "accountId");
|
|
21004
|
+
return read(database, () => {
|
|
21005
|
+
const { clauses, params } = meetingSelectionSql(input);
|
|
21006
|
+
const meetings2 = database.prepare(meetingCountsSql(clauses.join(" AND "))).all(...params).map((row2) => ({
|
|
21007
|
+
startedAt: row2.started_at === null ? null : Number(row2.started_at),
|
|
21008
|
+
durationMs: row2.duration_ms === null ? null : Number(row2.duration_ms),
|
|
21009
|
+
transcribed: Number(row2.transcribed) === 1,
|
|
21010
|
+
seriesKey: row2.series_key === null ? null : String(row2.series_key),
|
|
21011
|
+
seriesTitle: row2.series_title === null ? null : String(row2.series_title)
|
|
21012
|
+
}));
|
|
21013
|
+
checkMeetingCancelled(input.signal);
|
|
21014
|
+
return aggregateMeetingCounts(meetings2, input.by, input.timeZone, input.limit);
|
|
21015
|
+
});
|
|
20930
21016
|
}
|
|
20931
21017
|
}), "meetingStatsOver");
|
|
20932
21018
|
|
|
20933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20934
21020
|
var CURSOR_KEY = "meetings";
|
|
20935
21021
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20936
21022
|
id: Number(row2.id),
|
|
@@ -21499,7 +21585,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
21499
21585
|
};
|
|
21500
21586
|
}, "meetingStoreOver");
|
|
21501
21587
|
|
|
21502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
21503
21589
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
21504
21590
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
21505
21591
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -21525,7 +21611,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
21525
21611
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
21526
21612
|
}, "release");
|
|
21527
21613
|
|
|
21528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
21529
21615
|
var THREAD_COLUMNS = {
|
|
21530
21616
|
subject: {
|
|
21531
21617
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -21542,7 +21628,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
21542
21628
|
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);
|
|
21543
21629
|
}, "threadRows");
|
|
21544
21630
|
|
|
21545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
21546
21632
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
21547
21633
|
id: `email:${place.emailId}`,
|
|
21548
21634
|
chatId: place.threadExternalId,
|
|
@@ -22098,7 +22184,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
22098
22184
|
}
|
|
22099
22185
|
}), "mailStoreOver");
|
|
22100
22186
|
|
|
22101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
22102
22188
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
22103
22189
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
22104
22190
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -22188,7 +22274,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
22188
22274
|
}, "knownWord");
|
|
22189
22275
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
22190
22276
|
|
|
22191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
22192
22278
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
22193
22279
|
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");
|
|
22194
22280
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -22274,7 +22360,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
22274
22360
|
return found2;
|
|
22275
22361
|
}, "spokenTranscripts");
|
|
22276
22362
|
|
|
22277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
22278
22364
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
22279
22365
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
22280
22366
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -22321,7 +22407,29 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
22321
22407
|
});
|
|
22322
22408
|
}, "placeHits");
|
|
22323
22409
|
|
|
22324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
|
|
22411
|
+
var GROUPS = {
|
|
22412
|
+
chat: {
|
|
22413
|
+
key: "m.chat_id",
|
|
22414
|
+
select: "ac.provider AS provider, ac.external_id AS account, c.external_id AS id, c.title AS name"
|
|
22415
|
+
},
|
|
22416
|
+
sender: {
|
|
22417
|
+
key: "coalesce(m.sender_identity_id, -m.account_id)",
|
|
22418
|
+
select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, max(m.outgoing) AS outgoing"
|
|
22419
|
+
},
|
|
22420
|
+
// Quarter hours, so a calendar day or hour in any zone (+05:30, +05:45) is a whole number of buckets.
|
|
22421
|
+
time: { key: "m.sent_at / 900000", select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name" },
|
|
22422
|
+
sender_direction: {
|
|
22423
|
+
key: "coalesce(m.sender_identity_id, -m.account_id), coalesce(m.outgoing, 0)",
|
|
22424
|
+
select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, coalesce(m.outgoing, 0) AS outgoing"
|
|
22425
|
+
},
|
|
22426
|
+
time_direction: {
|
|
22427
|
+
key: "m.sent_at / 900000, coalesce(m.outgoing, 0)",
|
|
22428
|
+
select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name, coalesce(m.outgoing, 0) AS outgoing"
|
|
22429
|
+
}
|
|
22430
|
+
};
|
|
22431
|
+
|
|
22432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
22325
22433
|
var MESSAGES2 = {
|
|
22326
22434
|
rows: "messages",
|
|
22327
22435
|
threads: "chats",
|
|
@@ -22342,18 +22450,6 @@ var MAIL = {
|
|
|
22342
22450
|
item: "email",
|
|
22343
22451
|
thread: "email_thread"
|
|
22344
22452
|
};
|
|
22345
|
-
var GROUPS = {
|
|
22346
|
-
chat: {
|
|
22347
|
-
key: "m.chat_id",
|
|
22348
|
-
select: "ac.provider AS provider, ac.external_id AS account, c.external_id AS id, c.title AS name"
|
|
22349
|
-
},
|
|
22350
|
-
sender: {
|
|
22351
|
-
key: "coalesce(m.sender_identity_id, -m.account_id)",
|
|
22352
|
-
select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, max(m.outgoing) AS outgoing"
|
|
22353
|
-
},
|
|
22354
|
-
// Quarter hours, so a calendar day or hour in any zone (+05:30, +05:45) is a whole number of buckets.
|
|
22355
|
-
time: { key: "m.sent_at / 900000", select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name" }
|
|
22356
|
-
};
|
|
22357
22453
|
var matchQuery = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution), "matchQuery");
|
|
22358
22454
|
var countQuery = /* @__PURE__ */ __name((context, execution, by) => runQuery(context, execution, by), "countQuery");
|
|
22359
22455
|
var queryMessagePks = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution, "pks"), "queryMessagePks");
|
|
@@ -22816,7 +22912,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22816
22912
|
};
|
|
22817
22913
|
}, "runCompiled");
|
|
22818
22914
|
|
|
22819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22820
22916
|
function invalidMetadata() {
|
|
22821
22917
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22822
22918
|
}
|
|
@@ -22918,7 +23014,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22918
23014
|
};
|
|
22919
23015
|
}), "counterTargets");
|
|
22920
23016
|
|
|
22921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22922
23018
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22923
23019
|
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,
|
|
22924
23020
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -23037,7 +23133,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
23037
23133
|
}));
|
|
23038
23134
|
}, "attachmentViews");
|
|
23039
23135
|
|
|
23040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
23041
23137
|
var transcript = /* @__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");
|
|
23042
23138
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
|
|
23043
23139
|
const { orm, database, now: now2 } = context;
|
|
@@ -23075,7 +23171,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
23075
23171
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
23076
23172
|
}, "intoVoiceAttachment");
|
|
23077
23173
|
|
|
23078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
23079
23175
|
var FIELDS = [
|
|
23080
23176
|
"threadExternalId",
|
|
23081
23177
|
"senderIdentityId",
|
|
@@ -23392,7 +23488,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
23392
23488
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
23393
23489
|
}, "writeDerivedReactions");
|
|
23394
23490
|
|
|
23395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
23396
23492
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
23397
23493
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
23398
23494
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -23413,7 +23509,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
23413
23509
|
};
|
|
23414
23510
|
}, "keysOver");
|
|
23415
23511
|
|
|
23416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
23417
23513
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
23418
23514
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
23419
23515
|
if (!row2)
|
|
@@ -23448,7 +23544,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
23448
23544
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
23449
23545
|
}, "saveProfile");
|
|
23450
23546
|
|
|
23451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
23452
23548
|
var BOT_KINDS = ["agent", "rule", "script", "integration"];
|
|
23453
23549
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
23454
23550
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -23505,7 +23601,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
|
|
|
23505
23601
|
return { sql: bot("pb.name = ?"), params: [by.bot] };
|
|
23506
23602
|
}, "proposedBySql");
|
|
23507
23603
|
|
|
23508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
23509
23605
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
23510
23606
|
const owner = ownerPerson(context.database).id;
|
|
23511
23607
|
const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
|
|
@@ -23526,7 +23622,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
23526
23622
|
return personOf(context, ref3);
|
|
23527
23623
|
}, "linkToOwner");
|
|
23528
23624
|
|
|
23529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
23530
23626
|
var PROVIDERS_SETTING = "providers";
|
|
23531
23627
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
23532
23628
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -23561,7 +23657,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
23561
23657
|
});
|
|
23562
23658
|
}, "registerProvider");
|
|
23563
23659
|
|
|
23564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
23565
23661
|
var DAY3 = 864e5;
|
|
23566
23662
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
23567
23663
|
var TEXT_LIMIT = 20;
|
|
@@ -23760,7 +23856,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23760
23856
|
};
|
|
23761
23857
|
}, "taskSimilarityOver");
|
|
23762
23858
|
|
|
23763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23764
23860
|
var SETTING3 = "taskCategories";
|
|
23765
23861
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23766
23862
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23779,7 +23875,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23779
23875
|
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);
|
|
23780
23876
|
}, "saveTaskCategories");
|
|
23781
23877
|
|
|
23782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23783
23879
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23784
23880
|
var ALLOWED = "taskAgentClose";
|
|
23785
23881
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23835,12 +23931,13 @@ var SUGGESTION_COLUMNS = [
|
|
|
23835
23931
|
];
|
|
23836
23932
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23837
23933
|
|
|
23838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
|
|
23839
23935
|
var MAIL_FINDINGS_KIND = "mail_findings";
|
|
23840
23936
|
|
|
23841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/decisions.js
|
|
23938
|
+
var TASK_CLOSE_KIND = "task_close";
|
|
23842
23939
|
var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
|
|
23843
|
-
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND, "isOwnerOnlyKind");
|
|
23940
|
+
var isOwnerOnlyKind = /* @__PURE__ */ __name((kind3) => kind3 === MAIL_FINDINGS_KIND || kind3 === MEETING_FINDINGS_KIND || kind3 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
|
|
23844
23941
|
var mayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISION_POLICY) => {
|
|
23845
23942
|
if (by === "owner")
|
|
23846
23943
|
return null;
|
|
@@ -23885,10 +23982,10 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
|
|
|
23885
23982
|
}, "assertMayDecide");
|
|
23886
23983
|
var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
|
|
23887
23984
|
|
|
23888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
|
|
23889
23986
|
var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
|
|
23890
23987
|
|
|
23891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
|
|
23892
23989
|
var EXCERPT_CHARS = 280;
|
|
23893
23990
|
var TITLE_CHARS = 120;
|
|
23894
23991
|
var MEMORY_TITLE_CHARS = 80;
|
|
@@ -24241,7 +24338,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
|
|
|
24241
24338
|
var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
|
|
24242
24339
|
var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
|
|
24243
24340
|
|
|
24244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
24245
24342
|
var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
|
|
24246
24343
|
ref: ref3,
|
|
24247
24344
|
kind: read2.kind,
|
|
@@ -24277,7 +24374,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
|
|
|
24277
24374
|
});
|
|
24278
24375
|
}, "evidenceSourcesOf");
|
|
24279
24376
|
|
|
24280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
24281
24378
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
24282
24379
|
var MAX_TEXT_CHARS = 2e6;
|
|
24283
24380
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -24303,7 +24400,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
24303
24400
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
24304
24401
|
}, "pdfPreviewLimits");
|
|
24305
24402
|
|
|
24306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24403
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
24307
24404
|
import { randomBytes } from "node:crypto";
|
|
24308
24405
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
24309
24406
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -24316,7 +24413,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
24316
24413
|
return time3 + random;
|
|
24317
24414
|
}, "ulid");
|
|
24318
24415
|
|
|
24319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
24320
24417
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
24321
24418
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
24322
24419
|
if (!meta && !sections?.length)
|
|
@@ -24337,7 +24434,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
24337
24434
|
return typeof language === "string" && language !== "" ? language : null;
|
|
24338
24435
|
}, "languageOf");
|
|
24339
24436
|
|
|
24340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
24341
24438
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
24342
24439
|
var objectOf2 = /* @__PURE__ */ __name((value) => {
|
|
24343
24440
|
if (isObject(value))
|
|
@@ -24580,7 +24677,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
24580
24677
|
};
|
|
24581
24678
|
}, "filesStoreOver");
|
|
24582
24679
|
|
|
24583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
24584
24681
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
24585
24682
|
entity: "document",
|
|
24586
24683
|
backend: "sql",
|
|
@@ -24626,7 +24723,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
24626
24723
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
24627
24724
|
}, "importedDocumentWhere");
|
|
24628
24725
|
|
|
24629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
24630
24727
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
24631
24728
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24632
24729
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -25152,7 +25249,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25152
25249
|
};
|
|
25153
25250
|
}, "notesStoreOver");
|
|
25154
25251
|
|
|
25155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
25156
25253
|
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";
|
|
25157
25254
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
25158
25255
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -25374,7 +25471,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25374
25471
|
};
|
|
25375
25472
|
}, "memoriesStoreOver");
|
|
25376
25473
|
|
|
25377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
25378
25475
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
25379
25476
|
var KEY = "taskFirstPassPerChat";
|
|
25380
25477
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -25394,7 +25491,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
25394
25491
|
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);
|
|
25395
25492
|
}, "saveFirstPassPerChat");
|
|
25396
25493
|
|
|
25397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
25398
25495
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
25399
25496
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
25400
25497
|
name,
|
|
@@ -25426,6 +25523,7 @@ var PROJECT_TASK_FIELDS = [
|
|
|
25426
25523
|
values: ["overdue", "today", "upcoming", "later", "none"],
|
|
25427
25524
|
relation: "the due date as a board groups it: overdue (open work due before today), today, upcoming (the next 7 days after today), later, or none"
|
|
25428
25525
|
}),
|
|
25526
|
+
field("created", "time", "created:>=30d", { relation: "when it was opened" }),
|
|
25429
25527
|
field("closed", "time", "closed:>=14d", { relation: "when it was done or dismissed" }),
|
|
25430
25528
|
field("ready", "bool", "ready:true", { relation: "open work whose blocked-by tasks are all done" }),
|
|
25431
25529
|
field("text", "txt", "text:invoice", { relation: "words of the title and description; a bare word means this" })
|
|
@@ -25559,6 +25657,7 @@ var projectTaskColumns = /* @__PURE__ */ __name((now2, zone) => ({
|
|
|
25559
25657
|
agent: { where: agentWhere },
|
|
25560
25658
|
parent: { where: parentWhere },
|
|
25561
25659
|
due: { type: "time", sql: "t.due_at" },
|
|
25660
|
+
created: { type: "time", sql: "t.created_at" },
|
|
25562
25661
|
closed: { type: "time", sql: "t.closed_at" },
|
|
25563
25662
|
overdue: { where: /* @__PURE__ */ __name((node) => truth(node, dueGroups(now2, zone).overdue), "where") },
|
|
25564
25663
|
when: {
|
|
@@ -25615,7 +25714,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
25615
25714
|
return root === void 0 ? void 0 : { ...query, root };
|
|
25616
25715
|
}, "withoutField");
|
|
25617
25716
|
|
|
25618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
25619
25718
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
25620
25719
|
if (row2.author_type == null)
|
|
25621
25720
|
return null;
|
|
@@ -25643,7 +25742,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
25643
25742
|
return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
|
|
25644
25743
|
}, "addComment");
|
|
25645
25744
|
|
|
25646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
25647
25746
|
var TASK_RELATION_KINDS = [
|
|
25648
25747
|
"blocked-by",
|
|
25649
25748
|
"follow-up-of",
|
|
@@ -25773,7 +25872,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
25773
25872
|
};
|
|
25774
25873
|
}, "taskRelationsStoreOver");
|
|
25775
25874
|
|
|
25776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
25777
25876
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
25778
25877
|
var TASK_EVENT_KINDS = [
|
|
25779
25878
|
"created",
|
|
@@ -25818,7 +25917,7 @@ var timesAsIso = /* @__PURE__ */ __name((changes) => Object.fromEntries(Object.e
|
|
|
25818
25917
|
var checkRevision = /* @__PURE__ */ __name((row2, expected) => {
|
|
25819
25918
|
if (expected === void 0 || Number(row2.revision) === expected)
|
|
25820
25919
|
return;
|
|
25821
|
-
throw new CliError("
|
|
25920
|
+
throw new CliError("conflict", `task ${String(row2.key)} changed since revision ${expected}; it is at ${String(row2.revision)}: read it again`, { reason: "task.stale", revision: Number(row2.revision) });
|
|
25822
25921
|
}, "checkRevision");
|
|
25823
25922
|
var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
25824
25923
|
const { database, now: now2 } = context;
|
|
@@ -26318,7 +26417,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
26318
26417
|
};
|
|
26319
26418
|
}, "workTasksOver");
|
|
26320
26419
|
|
|
26321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
26322
26421
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
26323
26422
|
const { database, now: now2 } = context;
|
|
26324
26423
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -26367,7 +26466,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
26367
26466
|
};
|
|
26368
26467
|
}, "taskCloseOver");
|
|
26369
26468
|
|
|
26370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
26371
26470
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
26372
26471
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
26373
26472
|
const { database, now: now2 } = context;
|
|
@@ -26586,7 +26685,46 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
26586
26685
|
};
|
|
26587
26686
|
}, "taskPairsOver");
|
|
26588
26687
|
|
|
26589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
|
|
26689
|
+
var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
|
|
26690
|
+
var TASK_STATS_SQL = {
|
|
26691
|
+
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 ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
|
|
26692
|
+
chat: "SELECT c.external_id AS id, c.title AS name FROM chats c JOIN accounts a ON a.id = c.account_id WHERE a.provider = ? AND a.external_id = ? AND c.external_id IN (SELECT value FROM json_each(?))",
|
|
26693
|
+
meeting: "SELECT CAST(id AS TEXT) AS id, title AS name FROM meetings WHERE id IN (SELECT value FROM json_each(?))",
|
|
26694
|
+
project: "SELECT CAST(id AS TEXT) AS id, name FROM projects WHERE id IN (SELECT value FROM json_each(?))"
|
|
26695
|
+
};
|
|
26696
|
+
var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
|
|
26697
|
+
statRows: /* @__PURE__ */ __name(async (scope3, where) => {
|
|
26698
|
+
const filter = where === void 0 ? "" : ` AND (${where.sql})`;
|
|
26699
|
+
const board = !("account" in scope3);
|
|
26700
|
+
const project = board ? void 0 : inbox(scope3.account);
|
|
26701
|
+
if (!board && project === void 0)
|
|
26702
|
+
return [];
|
|
26703
|
+
return database.prepare(TASK_STATS_SQL.rows(board, filter)).all(...project === void 0 ? [] : [project], ...where?.params ?? []).map((row2) => ({
|
|
26704
|
+
group: row2.source_group == null ? null : String(row2.source_group),
|
|
26705
|
+
sourceKind: row2.source_kind == null ? null : String(row2.source_kind),
|
|
26706
|
+
projectId: Number(row2.project_id),
|
|
26707
|
+
state: String(row2.status),
|
|
26708
|
+
createdAt: Number(row2.created_at),
|
|
26709
|
+
closedAt: row2.closed_at == null ? null : Number(row2.closed_at)
|
|
26710
|
+
}));
|
|
26711
|
+
}, "statRows"),
|
|
26712
|
+
statNames: /* @__PURE__ */ __name(async (kind3, ids, account) => {
|
|
26713
|
+
if (ids.length === 0)
|
|
26714
|
+
return /* @__PURE__ */ new Map();
|
|
26715
|
+
let params = [JSON.stringify(ids.map(Number))];
|
|
26716
|
+
if (kind3 === "chat") {
|
|
26717
|
+
if (account === void 0)
|
|
26718
|
+
return /* @__PURE__ */ new Map();
|
|
26719
|
+
const at = account.indexOf(":");
|
|
26720
|
+
params = [account.slice(0, at), account.slice(at + 1), JSON.stringify(ids)];
|
|
26721
|
+
}
|
|
26722
|
+
const rows = database.prepare(TASK_STATS_SQL[kind3]).all(...params);
|
|
26723
|
+
return new Map(rows.filter((row2) => row2.name != null).map((row2) => [String(row2.id), String(row2.name)]));
|
|
26724
|
+
}, "statNames")
|
|
26725
|
+
}), "taskStatsOver");
|
|
26726
|
+
|
|
26727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
26590
26728
|
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";
|
|
26591
26729
|
var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
|
|
26592
26730
|
const key2 = inboxKey(account);
|
|
@@ -26651,6 +26789,7 @@ var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26651
26789
|
...workTasksOver(context),
|
|
26652
26790
|
...similarity,
|
|
26653
26791
|
...taskPairsOver(context, similarity),
|
|
26792
|
+
...taskStatsOver(context, (account) => inbox(account, false)),
|
|
26654
26793
|
...taskCloseOver(context),
|
|
26655
26794
|
rowOf: /* @__PURE__ */ __name((id2) => taskRowOf(database, id2), "rowOf"),
|
|
26656
26795
|
categories: /* @__PURE__ */ __name(async () => listOf(), "categories"),
|
|
@@ -26792,7 +26931,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
26792
26931
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
26793
26932
|
}, "oneOf");
|
|
26794
26933
|
|
|
26795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
26796
26935
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
26797
26936
|
const { database } = context;
|
|
26798
26937
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26837,7 +26976,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
26837
26976
|
};
|
|
26838
26977
|
}, "accountsStoreOver");
|
|
26839
26978
|
|
|
26840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
26841
26980
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
26842
26981
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
26843
26982
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -26861,7 +27000,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
26861
27000
|
})), "keepDownloads");
|
|
26862
27001
|
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");
|
|
26863
27002
|
|
|
26864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
26865
27004
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
26866
27005
|
const { database } = context;
|
|
26867
27006
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26918,7 +27057,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26918
27057
|
}, "keepAttachmentText")
|
|
26919
27058
|
}), "attachmentsStoreOver");
|
|
26920
27059
|
|
|
26921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
26922
27061
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
26923
27062
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
26924
27063
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -27098,7 +27237,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
27098
27237
|
return done;
|
|
27099
27238
|
}, "rekeyChats");
|
|
27100
27239
|
|
|
27101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
27102
27241
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
27103
27242
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
27104
27243
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -27114,23 +27253,49 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
27114
27253
|
(SELECT s.updated_at FROM sync_cursors s WHERE s.account_id = c.account_id AND s.key = 'fetched:' || c.external_id)
|
|
27115
27254
|
AS fetched
|
|
27116
27255
|
FROM chats c WHERE c.account_id = ? AND c.external_id IN (SELECT value FROM json_each(?))`).all(accountKey, JSON.stringify(chatIds)).map((row2) => {
|
|
27117
|
-
const
|
|
27118
|
-
|
|
27119
|
-
const upToDate = row2.newest === null ? null : row2.held !== null && Number(row2.held) >= Number(row2.newest);
|
|
27120
|
-
const gaps = stretches > 1;
|
|
27121
|
-
const fetched = stretches > 0 || reachesStart;
|
|
27122
|
-
return {
|
|
27123
|
-
chatId: String(row2.chat),
|
|
27124
|
-
state: !fetched ? "unknown" : upToDate !== false && !gaps && reachesStart ? "complete" : "partial",
|
|
27125
|
-
upToDate,
|
|
27126
|
-
gaps,
|
|
27127
|
-
reachesStart,
|
|
27128
|
-
fetchedAt: toIso(row2.fetched)
|
|
27129
|
-
};
|
|
27256
|
+
const facts2 = factsOf(row2);
|
|
27257
|
+
return { chatId: String(row2.chat), ...facts2, fetchedAt: toIso(row2.fetched) };
|
|
27130
27258
|
});
|
|
27131
27259
|
}, "chatCompleteness");
|
|
27260
|
+
var factsOf = /* @__PURE__ */ __name((row2) => {
|
|
27261
|
+
const stretches = Number(row2.stretches);
|
|
27262
|
+
const reachesStart = Number(row2.start) === 1;
|
|
27263
|
+
const upToDate = row2.newest === null ? null : row2.held !== null && Number(row2.held) >= Number(row2.newest);
|
|
27264
|
+
const gaps = stretches > 1;
|
|
27265
|
+
const fetched = stretches > 0 || reachesStart;
|
|
27266
|
+
const state = !fetched ? "unknown" : upToDate !== false && !gaps && reachesStart ? "complete" : "partial";
|
|
27267
|
+
return { state, upToDate, gaps, reachesStart };
|
|
27268
|
+
}, "factsOf");
|
|
27269
|
+
var COVERAGE_SQL = `SELECT c.last_message_at AS newest, c.message_count AS messages,
|
|
27270
|
+
(SELECT m.sent_at FROM messages m WHERE m.chat_id = c.id AND m.deleted_at IS NULL
|
|
27271
|
+
ORDER BY m.sent_at DESC LIMIT 1) AS held,
|
|
27272
|
+
(SELECT m.sent_at FROM messages m WHERE m.chat_id = c.id AND m.deleted_at IS NULL
|
|
27273
|
+
ORDER BY m.sent_at ASC LIMIT 1) AS oldest,
|
|
27274
|
+
(SELECT count(*) FROM sync_ranges r WHERE r.chat_id = c.id) AS stretches,
|
|
27275
|
+
EXISTS (SELECT 1 FROM sync_cursors s WHERE s.account_id = c.account_id AND s.key = 'history_start:' || c.external_id
|
|
27276
|
+
AND NOT EXISTS (SELECT 1 FROM sync_ranges r WHERE r.chat_id = c.id AND r.from_key < CAST(s.value AS INTEGER)))
|
|
27277
|
+
AS start,
|
|
27278
|
+
EXISTS (SELECT 1 FROM sync_cursors s WHERE s.account_id = c.account_id
|
|
27279
|
+
AND s.key IN ('history_start:' || c.external_id, 'fetched:' || c.external_id)) AS recorded
|
|
27280
|
+
FROM chats c WHERE c.account_id = ? AND c.searchable = 1`;
|
|
27281
|
+
var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
|
|
27282
|
+
const rows = database.prepare(COVERAGE_SQL).all(accountKey);
|
|
27283
|
+
const coverage = { chats: rows.length, fetched: 0, partial: 0, never: 0, oldestMessageAt: null };
|
|
27284
|
+
let oldest = null;
|
|
27285
|
+
for (const row2 of rows) {
|
|
27286
|
+
if (row2.oldest !== null && (oldest === null || Number(row2.oldest) < oldest))
|
|
27287
|
+
oldest = Number(row2.oldest);
|
|
27288
|
+
if (factsOf(row2).state === "complete")
|
|
27289
|
+
coverage.fetched += 1;
|
|
27290
|
+
else if (Number(row2.stretches) === 0 && Number(row2.recorded) === 0 && Number(row2.messages) === 0)
|
|
27291
|
+
coverage.never += 1;
|
|
27292
|
+
else
|
|
27293
|
+
coverage.partial += 1;
|
|
27294
|
+
}
|
|
27295
|
+
return { ...coverage, oldestMessageAt: toIso(oldest) };
|
|
27296
|
+
}, "chatCoverage");
|
|
27132
27297
|
|
|
27133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
27134
27299
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
27135
27300
|
const { database } = context;
|
|
27136
27301
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -27199,6 +27364,10 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
27199
27364
|
const accountKey = findAccountPk2(key2);
|
|
27200
27365
|
return accountKey === void 0 ? [] : chatCompleteness(context, accountKey, chatIds);
|
|
27201
27366
|
}, "chatCompleteness"),
|
|
27367
|
+
chatCoverage: /* @__PURE__ */ __name(async (key2) => {
|
|
27368
|
+
const accountKey = findAccountPk2(key2);
|
|
27369
|
+
return accountKey === void 0 ? { chats: 0, fetched: 0, partial: 0, never: 0, oldestMessageAt: null } : chatCoverage(context, accountKey);
|
|
27370
|
+
}, "chatCoverage"),
|
|
27202
27371
|
chatStats: /* @__PURE__ */ __name(async (key2, chatId) => {
|
|
27203
27372
|
const accountKey = findAccountPk2(key2);
|
|
27204
27373
|
return accountKey === void 0 ? [] : chatStats(context, accountKey, chatId);
|
|
@@ -27261,7 +27430,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
27261
27430
|
};
|
|
27262
27431
|
}, "chatsStoreOver");
|
|
27263
27432
|
|
|
27264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
27265
27434
|
import { createHash as createHash7 } from "node:crypto";
|
|
27266
27435
|
var BATCH_CONTEXT = 50;
|
|
27267
27436
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -27399,7 +27568,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
27399
27568
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
27400
27569
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
27401
27570
|
|
|
27402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
27403
27572
|
import { setTimeout } from "node:timers/promises";
|
|
27404
27573
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
27405
27574
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -27711,7 +27880,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
27711
27880
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
27712
27881
|
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");
|
|
27713
27882
|
|
|
27714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
27715
27884
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
27716
27885
|
const { database } = context;
|
|
27717
27886
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -27818,7 +27987,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
27818
27987
|
};
|
|
27819
27988
|
}, "conversationsStoreOver");
|
|
27820
27989
|
|
|
27821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
27822
27991
|
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";
|
|
27823
27992
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
27824
27993
|
const { database } = context;
|
|
@@ -27843,7 +28012,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27843
28012
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
27844
28013
|
}), "countersStoreOver");
|
|
27845
28014
|
|
|
27846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
27847
28016
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
27848
28017
|
var MENTION_QUERY = defineQuery({
|
|
27849
28018
|
entity: "mention",
|
|
@@ -28059,7 +28228,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
28059
28228
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
28060
28229
|
}, "listPlaces");
|
|
28061
28230
|
|
|
28062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
28063
28232
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
28064
28233
|
const { database } = context;
|
|
28065
28234
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -28094,7 +28263,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
28094
28263
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
28095
28264
|
}), "mentionsStoreOver");
|
|
28096
28265
|
|
|
28097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
28098
28267
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
28099
28268
|
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");
|
|
28100
28269
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -28109,7 +28278,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
28109
28278
|
}));
|
|
28110
28279
|
}, "documentLinkMessages");
|
|
28111
28280
|
|
|
28112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
28113
28282
|
var stemmerFor = stemmerCache();
|
|
28114
28283
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
28115
28284
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -28153,7 +28322,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
28153
28322
|
});
|
|
28154
28323
|
}, "laterSharingRare");
|
|
28155
28324
|
|
|
28156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
28157
28326
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
28158
28327
|
const { database } = context;
|
|
28159
28328
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -28288,7 +28457,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
28288
28457
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
28289
28458
|
}), "messagesStoreOver");
|
|
28290
28459
|
|
|
28291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
28292
28461
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
28293
28462
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
28294
28463
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -28345,7 +28514,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
28345
28514
|
});
|
|
28346
28515
|
}, "personPreparation");
|
|
28347
28516
|
|
|
28348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
28349
28518
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
28350
28519
|
const id2 = Number(uid);
|
|
28351
28520
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -28353,7 +28522,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
28353
28522
|
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(id2, JSON.stringify(accountIds)));
|
|
28354
28523
|
}, "personSeenInAccounts");
|
|
28355
28524
|
|
|
28356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
28357
28526
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
28358
28527
|
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);
|
|
28359
28528
|
if (!row2)
|
|
@@ -28419,7 +28588,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
28419
28588
|
return { id: id2, personId, removed: true };
|
|
28420
28589
|
}, "removeNote");
|
|
28421
28590
|
|
|
28422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
28423
28592
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
28424
28593
|
const { database } = context;
|
|
28425
28594
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -28504,13 +28673,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
28504
28673
|
};
|
|
28505
28674
|
}, "peopleStoreOver");
|
|
28506
28675
|
|
|
28507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
28508
28677
|
import { createHash as createHash9 } from "node:crypto";
|
|
28509
28678
|
|
|
28510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
28511
28680
|
import { createHash as createHash8 } from "node:crypto";
|
|
28512
28681
|
|
|
28513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
28514
28683
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
28515
28684
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
28516
28685
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -28732,7 +28901,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
28732
28901
|
};
|
|
28733
28902
|
}, "rankReplyGraph");
|
|
28734
28903
|
|
|
28735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
28736
28905
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
28737
28906
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
28738
28907
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -28906,7 +29075,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
28906
29075
|
return { items, evidence, summary, graph: graph.quality };
|
|
28907
29076
|
}, "calculateAdminStatistics");
|
|
28908
29077
|
|
|
28909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
28910
29079
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
28911
29080
|
const dates = [];
|
|
28912
29081
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -28928,7 +29097,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
28928
29097
|
return dates[0].node.resolution.date;
|
|
28929
29098
|
}, "rankingContextRange");
|
|
28930
29099
|
|
|
28931
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
28932
29101
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
28933
29102
|
let counts;
|
|
28934
29103
|
try {
|
|
@@ -29223,7 +29392,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
29223
29392
|
});
|
|
29224
29393
|
}, "rankQuery");
|
|
29225
29394
|
|
|
29226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
29227
29396
|
function fail4(message2, reason = "query.too-large") {
|
|
29228
29397
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
29229
29398
|
}
|
|
@@ -29400,7 +29569,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
29400
29569
|
return result;
|
|
29401
29570
|
}), "adminStatisticsQuery");
|
|
29402
29571
|
|
|
29403
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
29404
29573
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
29405
29574
|
if (!execution.accounts.length)
|
|
29406
29575
|
return { conversations: [], chats: [] };
|
|
@@ -29418,7 +29587,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
29418
29587
|
return { conversations: conversations2, chats: chats2 };
|
|
29419
29588
|
}, "conversationEligibility");
|
|
29420
29589
|
|
|
29421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
29422
29591
|
import { createHash as createHash10 } from "node:crypto";
|
|
29423
29592
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
29424
29593
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -29568,7 +29737,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
29568
29737
|
return result;
|
|
29569
29738
|
}, "rankingEvidence");
|
|
29570
29739
|
|
|
29571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
|
|
29572
29741
|
var FAR = Number.MAX_SAFE_INTEGER;
|
|
29573
29742
|
var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
|
|
29574
29743
|
const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
|
|
@@ -29662,7 +29831,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
|
|
|
29662
29831
|
});
|
|
29663
29832
|
}, "waitingChats");
|
|
29664
29833
|
|
|
29665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
29666
29835
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
29667
29836
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
29668
29837
|
if (execution.corpus === "mail")
|
|
@@ -29683,7 +29852,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
29683
29852
|
};
|
|
29684
29853
|
}, "queriesStoreOver");
|
|
29685
29854
|
|
|
29686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29855
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
29687
29856
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
29688
29857
|
const { database, now: now2 } = context;
|
|
29689
29858
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -29722,10 +29891,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
29722
29891
|
}));
|
|
29723
29892
|
}, "chatEventsOf");
|
|
29724
29893
|
|
|
29725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
29726
29895
|
import { createHash as createHash11 } from "node:crypto";
|
|
29727
29896
|
|
|
29728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
29729
29898
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
29730
29899
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
29731
29900
|
timeZone: zone,
|
|
@@ -29739,8 +29908,13 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
29739
29908
|
return `${part.year}-${part.month}-${part.day}${by === "hour" ? `T${part.hour}` : ""}`;
|
|
29740
29909
|
};
|
|
29741
29910
|
}, "calendarKey");
|
|
29911
|
+
var weekKey = /* @__PURE__ */ __name((day) => {
|
|
29912
|
+
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
29913
|
+
date3.setUTCDate(date3.getUTCDate() - (date3.getUTCDay() + 6) % 7);
|
|
29914
|
+
return date3.toISOString().slice(0, 10);
|
|
29915
|
+
}, "weekKey");
|
|
29742
29916
|
|
|
29743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
29744
29918
|
var RETENTION_TOLERANCE = 864e5;
|
|
29745
29919
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
29746
29920
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -29794,13 +29968,8 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
29794
29968
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
29795
29969
|
}, "retentionCohorts");
|
|
29796
29970
|
|
|
29797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
29798
29972
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
29799
|
-
var week = /* @__PURE__ */ __name((day) => {
|
|
29800
|
-
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
29801
|
-
date3.setUTCDate(date3.getUTCDate() - (date3.getUTCDay() + 6) % 7);
|
|
29802
|
-
return date3.toISOString().slice(0, 10);
|
|
29803
|
-
}, "week");
|
|
29804
29973
|
var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
|
|
29805
29974
|
validateRetentionOptions(options);
|
|
29806
29975
|
if (options.cutoff > context.now())
|
|
@@ -29821,7 +29990,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
29821
29990
|
const activityStatement = database.prepare(`SELECT min(sent_at) AS at FROM messages WHERE chat_id=? AND sender_identity_id=? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?`);
|
|
29822
29991
|
const stays = raw.map((row2) => {
|
|
29823
29992
|
const joinedAt = Number(row2.joined_at), pk = Number(row2.pk), end = joinedAt + options.within;
|
|
29824
|
-
const day = dayOf2(joinedAt), cohort = options.by === "week" ?
|
|
29993
|
+
const day = dayOf2(joinedAt), cohort = options.by === "week" ? weekKey(day) : day;
|
|
29825
29994
|
const absence = departureStatement.get(chatPk, Math.max(joinedAt, Number(row2.first_seen_at)), options.cutoff, pk);
|
|
29826
29995
|
const upper = absence ? Number(absence.observed_at) : null;
|
|
29827
29996
|
const positive2 = lastPositiveStatement.get(pk, upper ?? options.cutoff + 1);
|
|
@@ -29930,7 +30099,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
29930
30099
|
};
|
|
29931
30100
|
}, "retentionQuery");
|
|
29932
30101
|
|
|
29933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
29934
30103
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
29935
30104
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
29936
30105
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -30061,7 +30230,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
30061
30230
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
30062
30231
|
})), "trackedChats");
|
|
30063
30232
|
|
|
30064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
30065
30234
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
30066
30235
|
const { database } = context;
|
|
30067
30236
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -30117,7 +30286,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30117
30286
|
};
|
|
30118
30287
|
}, "rosterStoreOver");
|
|
30119
30288
|
|
|
30120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
30121
30290
|
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");
|
|
30122
30291
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
30123
30292
|
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 ?`);
|
|
@@ -30141,7 +30310,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
30141
30310
|
}
|
|
30142
30311
|
}, "backfillNormalized");
|
|
30143
30312
|
|
|
30144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
30145
30314
|
var INDEX2 = "message_words";
|
|
30146
30315
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
30147
30316
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -30268,7 +30437,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
30268
30437
|
});
|
|
30269
30438
|
}, "resetSearchIndex");
|
|
30270
30439
|
|
|
30271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
30272
30441
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
30273
30442
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
30274
30443
|
const before2 = stemsState(database);
|
|
@@ -30363,7 +30532,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
30363
30532
|
return resetStems(database, { now: now2 });
|
|
30364
30533
|
}, "followDefaultStemmers");
|
|
30365
30534
|
|
|
30366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
30367
30536
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
30368
30537
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
30369
30538
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -30385,7 +30554,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
30385
30554
|
});
|
|
30386
30555
|
}, "termCandidates");
|
|
30387
30556
|
|
|
30388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
30389
30558
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
30390
30559
|
const { database } = context;
|
|
30391
30560
|
const stemmerFor2 = stemmerCache();
|
|
@@ -30407,7 +30576,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30407
30576
|
};
|
|
30408
30577
|
}, "searchIndexStoreOver");
|
|
30409
30578
|
|
|
30410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
30411
30580
|
var HISTORY_KEPT = 1e3;
|
|
30412
30581
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
30413
30582
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -30476,7 +30645,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
30476
30645
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
30477
30646
|
}, "clearHistory");
|
|
30478
30647
|
|
|
30479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
30480
30649
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
30481
30650
|
const { database } = context;
|
|
30482
30651
|
return {
|
|
@@ -30500,7 +30669,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30500
30669
|
};
|
|
30501
30670
|
}, "searchesStoreOver");
|
|
30502
30671
|
|
|
30503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
30504
30673
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
30505
30674
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
30506
30675
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -30543,7 +30712,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
30543
30712
|
};
|
|
30544
30713
|
}, "agentActionsStoreOver");
|
|
30545
30714
|
|
|
30546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
30547
30716
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
30548
30717
|
}) => {
|
|
30549
30718
|
const { database, now: now2 } = context;
|
|
@@ -30602,7 +30771,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
30602
30771
|
};
|
|
30603
30772
|
}, "botUpdateStoreOver");
|
|
30604
30773
|
|
|
30605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
30606
30775
|
var DAY4 = 864e5;
|
|
30607
30776
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
30608
30777
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -30711,7 +30880,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
30711
30880
|
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);
|
|
30712
30881
|
}, "listEvents");
|
|
30713
30882
|
|
|
30714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
|
|
30715
30884
|
var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
|
|
30716
30885
|
var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
|
|
30717
30886
|
const unseenBefore = unreferenced(database, "identities");
|
|
@@ -30766,7 +30935,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
|
|
|
30766
30935
|
return { entries: entryIds.length, events: goneEvents.length };
|
|
30767
30936
|
}, "forgetCalendarRows");
|
|
30768
30937
|
|
|
30769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
30770
30939
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
30771
30940
|
id: Number(row2.id),
|
|
30772
30941
|
accountId: Number(row2.account_id),
|
|
@@ -31353,7 +31522,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31353
31522
|
};
|
|
31354
31523
|
}, "eventStoreOver");
|
|
31355
31524
|
|
|
31356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
31357
31526
|
var CATALOG_QUERY = defineQuery({
|
|
31358
31527
|
entity: "document",
|
|
31359
31528
|
backend: "sql",
|
|
@@ -31595,7 +31764,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
31595
31764
|
};
|
|
31596
31765
|
}, "catalogStoreOver");
|
|
31597
31766
|
|
|
31598
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
31599
31768
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
31600
31769
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
31601
31770
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -31608,7 +31777,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
31608
31777
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
31609
31778
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
31610
31779
|
|
|
31611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
31612
31781
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
31613
31782
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
31614
31783
|
signal?.throwIfAborted();
|
|
@@ -31707,7 +31876,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
31707
31876
|
});
|
|
31708
31877
|
}, "readMeetingContextEvidence");
|
|
31709
31878
|
|
|
31710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
31711
31880
|
var corpora = {
|
|
31712
31881
|
message: {
|
|
31713
31882
|
table: "messages",
|
|
@@ -31946,7 +32115,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31946
32115
|
}
|
|
31947
32116
|
}), "contextRecordsOver");
|
|
31948
32117
|
|
|
31949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
31950
32119
|
var NOTE_FIELDS = [
|
|
31951
32120
|
"text",
|
|
31952
32121
|
"exact",
|
|
@@ -32376,7 +32545,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
32376
32545
|
};
|
|
32377
32546
|
}, "noteSearchOver");
|
|
32378
32547
|
|
|
32379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
32380
32549
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
32381
32550
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
32382
32551
|
var EVENT_CORPUS = {
|
|
@@ -32508,7 +32677,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
32508
32677
|
};
|
|
32509
32678
|
}, "eventSearchOver");
|
|
32510
32679
|
|
|
32511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
|
|
32512
32681
|
var refuse = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
|
|
32513
32682
|
throw new CliError(code, message2, { reason });
|
|
32514
32683
|
}, "refuse");
|
|
@@ -32943,7 +33112,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32943
33112
|
};
|
|
32944
33113
|
}, "financeStoreOver");
|
|
32945
33114
|
|
|
32946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
|
|
32947
33116
|
var refuse2 = /* @__PURE__ */ __name((message2, reason) => {
|
|
32948
33117
|
throw new CliError("validation_error", message2, { reason });
|
|
32949
33118
|
}, "refuse");
|
|
@@ -33021,7 +33190,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
|
|
|
33021
33190
|
};
|
|
33022
33191
|
}, "paymentEntriesOver");
|
|
33023
33192
|
|
|
33024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
33025
33194
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
33026
33195
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
33027
33196
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -33047,7 +33216,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
|
|
|
33047
33216
|
return valid;
|
|
33048
33217
|
}, "validateEvidenceFindings");
|
|
33049
33218
|
|
|
33050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
33051
33220
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
33052
33221
|
try {
|
|
33053
33222
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -33059,7 +33228,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
33059
33228
|
}
|
|
33060
33229
|
}, "calendarMoment");
|
|
33061
33230
|
|
|
33062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
33063
33232
|
var NAMED3 = "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";
|
|
33064
33233
|
var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
33065
33234
|
var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -33241,7 +33410,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33241
33410
|
};
|
|
33242
33411
|
}, "factsStoreOver");
|
|
33243
33412
|
|
|
33244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
33245
33414
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
33246
33415
|
throw new CliError("validation_error", message2);
|
|
33247
33416
|
}, "invalid");
|
|
@@ -33343,7 +33512,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
33343
33512
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
|
|
33344
33513
|
}, "findingsCoreOver");
|
|
33345
33514
|
|
|
33346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
33347
33516
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
33348
33517
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
33349
33518
|
var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -33508,7 +33677,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33508
33677
|
};
|
|
33509
33678
|
}, "proposedActionsStoreOver");
|
|
33510
33679
|
|
|
33511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
33512
33681
|
var stale = /* @__PURE__ */ __name(() => {
|
|
33513
33682
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
33514
33683
|
reason: "evidence-findings.stale"
|
|
@@ -33689,7 +33858,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33689
33858
|
};
|
|
33690
33859
|
}, "evidenceFindingsStoreOver");
|
|
33691
33860
|
|
|
33692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
33693
33862
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
33694
33863
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
33695
33864
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -33742,7 +33911,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
33742
33911
|
}, "forPerson")
|
|
33743
33912
|
}), "involvementStoreOver");
|
|
33744
33913
|
|
|
33745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
33746
33915
|
import { createHash as createHash12 } from "node:crypto";
|
|
33747
33916
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
33748
33917
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -33828,7 +33997,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
33828
33997
|
};
|
|
33829
33998
|
}, "meetingProjectsStoreOver");
|
|
33830
33999
|
|
|
33831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
|
|
33832
34001
|
var relationOf = /* @__PURE__ */ __name((link3) => ({
|
|
33833
34002
|
id: link3.id,
|
|
33834
34003
|
from: link3.from,
|
|
@@ -34054,16 +34223,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
|
|
|
34054
34223
|
provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
|
|
34055
34224
|
}, "decidedOrigin");
|
|
34056
34225
|
|
|
34057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
34058
34227
|
import { createHash as createHash15 } from "node:crypto";
|
|
34059
34228
|
|
|
34060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34229
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
34061
34230
|
import { createHash as createHash14 } from "node:crypto";
|
|
34062
34231
|
|
|
34063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
34064
34233
|
import { createHash as createHash13 } from "node:crypto";
|
|
34065
34234
|
|
|
34066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
34067
34236
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
34068
34237
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
34069
34238
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -34114,7 +34283,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
34114
34283
|
return input;
|
|
34115
34284
|
}, "consolidationApplyInput");
|
|
34116
34285
|
|
|
34117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
34118
34287
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
34119
34288
|
id: String(row2.id),
|
|
34120
34289
|
sourceId: String(row2.source_id),
|
|
@@ -34189,7 +34358,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
34189
34358
|
}, { beforeCommit: check3 });
|
|
34190
34359
|
}, "applyTagConsolidation");
|
|
34191
34360
|
|
|
34192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
34193
34362
|
var selections = [
|
|
34194
34363
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
34195
34364
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -34333,7 +34502,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
34333
34502
|
};
|
|
34334
34503
|
}, "previewRows");
|
|
34335
34504
|
|
|
34336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
34337
34506
|
var kinds = ["project", "tag", "topic"];
|
|
34338
34507
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
34339
34508
|
if (signal?.aborted)
|
|
@@ -34597,7 +34766,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34597
34766
|
};
|
|
34598
34767
|
}, "vocabularyStoreOver");
|
|
34599
34768
|
|
|
34600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
34601
34770
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
34602
34771
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
34603
34772
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -35154,7 +35323,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
35154
35323
|
return key2.padEnd(3, "X");
|
|
35155
35324
|
}, "projectKey");
|
|
35156
35325
|
|
|
35157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
35158
35327
|
var DAY5 = 864e5;
|
|
35159
35328
|
var SETTING4 = "logs_pruned_at";
|
|
35160
35329
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -35181,7 +35350,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
35181
35350
|
};
|
|
35182
35351
|
}, "logPruner");
|
|
35183
35352
|
|
|
35184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/mail/findings.js
|
|
35185
35354
|
var MAIL_FINDINGS_PER_RUN = 30;
|
|
35186
35355
|
var MAIL_FINDINGS_PER_SENDER = 5;
|
|
35187
35356
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
@@ -35307,7 +35476,7 @@ var validateMailFindings = /* @__PURE__ */ __name((input) => {
|
|
|
35307
35476
|
}, "validateMailFindings");
|
|
35308
35477
|
var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
|
|
35309
35478
|
|
|
35310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
|
|
35311
35480
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
35312
35481
|
throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
|
|
35313
35482
|
reason: "mail-findings.stale"
|
|
@@ -35367,7 +35536,7 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35367
35536
|
receipt: proposal.result
|
|
35368
35537
|
};
|
|
35369
35538
|
}, "view");
|
|
35370
|
-
const cite = /* @__PURE__ */ __name((findings, account) => {
|
|
35539
|
+
const cite = /* @__PURE__ */ __name((findings, account, deciding = false) => {
|
|
35371
35540
|
const read2 = /* @__PURE__ */ new Map();
|
|
35372
35541
|
const perSender = /* @__PURE__ */ new Map();
|
|
35373
35542
|
let bytes3 = 0;
|
|
@@ -35379,8 +35548,12 @@ var mailFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35379
35548
|
if (!row2) {
|
|
35380
35549
|
const at = parseLocator(reference2);
|
|
35381
35550
|
row2 = database.prepare(EMAIL2).get(at.account, at.chat, at.message);
|
|
35382
|
-
if (!row2)
|
|
35551
|
+
if (!row2 && deciding)
|
|
35383
35552
|
return stale2();
|
|
35553
|
+
if (!row2)
|
|
35554
|
+
throw new CliError("not_found", `no stored email ${reference2}; cite only mail a review gave`, {
|
|
35555
|
+
reason: "mail-findings.not-stored"
|
|
35556
|
+
});
|
|
35384
35557
|
bytes3 += Buffer.byteLength(String(row2.body)) + Buffer.byteLength(String(row2.subject ?? ""));
|
|
35385
35558
|
if (bytes3 > TEXT_BUDGET2)
|
|
35386
35559
|
return invalid5(`finding evidence exceeds the ${TEXT_BUDGET2}-byte stored text budget`);
|
|
@@ -35504,7 +35677,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
35504
35677
|
}
|
|
35505
35678
|
case "new_contact": {
|
|
35506
35679
|
const person2 = Number(identityOfAddress(finding.address)?.person_id);
|
|
35507
|
-
database.prepare("UPDATE persons SET name = ?, updated_at = ? WHERE id = ?
|
|
35680
|
+
database.prepare("UPDATE persons SET name = ?, updated_at = ? WHERE id = ?").run(finding.name, now2(), person2);
|
|
35508
35681
|
return `person:${person2}`;
|
|
35509
35682
|
}
|
|
35510
35683
|
}
|
|
@@ -35568,7 +35741,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
35568
35741
|
const account = accountOf3(proposal);
|
|
35569
35742
|
const chosen = batch.input.findings.filter((finding) => accepted.includes(finding.id));
|
|
35570
35743
|
if (chosen.length)
|
|
35571
|
-
cite(chosen, account);
|
|
35744
|
+
cite(chosen, account, true);
|
|
35572
35745
|
if (proposal.proposedBy.type !== "bot" || !proposal.proposedBy.name)
|
|
35573
35746
|
return invalid5("a findings author must be an agent");
|
|
35574
35747
|
const agent = {
|
|
@@ -35597,7 +35770,7 @@ ${evidence.join("\n")}`, agent);
|
|
|
35597
35770
|
};
|
|
35598
35771
|
}, "mailFindingsStoreOver");
|
|
35599
35772
|
|
|
35600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
35601
35774
|
var stale3 = /* @__PURE__ */ __name(() => {
|
|
35602
35775
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
35603
35776
|
reason: "meeting-findings.stale"
|
|
@@ -35765,7 +35938,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35765
35938
|
};
|
|
35766
35939
|
}, "meetingFindingsStoreOver");
|
|
35767
35940
|
|
|
35768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
35769
35942
|
var RANK_BATCH = 512;
|
|
35770
35943
|
var LIVE3 = "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";
|
|
35771
35944
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -36036,7 +36209,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
36036
36209
|
}
|
|
36037
36210
|
}), "meetingVectorsOver");
|
|
36038
36211
|
|
|
36039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
36040
36213
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
36041
36214
|
var TEXTS = {
|
|
36042
36215
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -36137,11 +36310,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36137
36310
|
};
|
|
36138
36311
|
}, "sourceMentionStoreOver");
|
|
36139
36312
|
|
|
36140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
36141
36314
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
36142
36315
|
import { dirname } from "node:path";
|
|
36143
36316
|
|
|
36144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
36145
36318
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
36146
36319
|
var CLIENTS_SETTING = "clients";
|
|
36147
36320
|
var coreVersion = (() => {
|
|
@@ -36199,7 +36372,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
36199
36372
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
36200
36373
|
}, "refusalAdvice");
|
|
36201
36374
|
|
|
36202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
36203
36376
|
var GENERATED = [
|
|
36204
36377
|
{
|
|
36205
36378
|
"name": "20261010184427_initial",
|
|
@@ -37166,7 +37339,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
37166
37339
|
}
|
|
37167
37340
|
];
|
|
37168
37341
|
|
|
37169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
37170
37343
|
var MANIFEST = [
|
|
37171
37344
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
37172
37345
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -37254,7 +37427,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
37254
37427
|
return migrations;
|
|
37255
37428
|
}, "generatedMigrations");
|
|
37256
37429
|
|
|
37257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
37258
37431
|
var MIGRATIONS = generatedMigrations();
|
|
37259
37432
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
37260
37433
|
version INTEGER PRIMARY KEY,
|
|
@@ -37307,7 +37480,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
37307
37480
|
}
|
|
37308
37481
|
}, "migrate");
|
|
37309
37482
|
|
|
37310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
37311
37484
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
37312
37485
|
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 ?");
|
|
37313
37486
|
if (pending.get(0, 1) === void 0)
|
|
@@ -37329,7 +37502,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
37329
37502
|
}
|
|
37330
37503
|
}, "fillJoinKeys");
|
|
37331
37504
|
|
|
37332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
37333
37506
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
37334
37507
|
refuseOwnerStoreInTests(path);
|
|
37335
37508
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
@@ -37343,8 +37516,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
37343
37516
|
}, "openSqlite");
|
|
37344
37517
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
37345
37518
|
quietSqliteWarning();
|
|
37346
|
-
const { drizzle } = await import("./node-
|
|
37347
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
37519
|
+
const { drizzle } = await import("./node-OXC26QXO.js");
|
|
37520
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-PXHZAG7Y.js");
|
|
37348
37521
|
const client = await nodeClient(path, { readOnly });
|
|
37349
37522
|
try {
|
|
37350
37523
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -37354,8 +37527,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
37354
37527
|
}
|
|
37355
37528
|
}, "openUnderNode");
|
|
37356
37529
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
37357
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
37358
|
-
const { drizzle } = await import("./bun-
|
|
37530
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-Y4FP6SDX.js");
|
|
37531
|
+
const { drizzle } = await import("./bun-2NMWL5YB.js");
|
|
37359
37532
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
37360
37533
|
try {
|
|
37361
37534
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -37365,7 +37538,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
37365
37538
|
}
|
|
37366
37539
|
}, "openUnderBun");
|
|
37367
37540
|
|
|
37368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
|
|
37369
37542
|
var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
|
|
37370
37543
|
var paymentOf = /* @__PURE__ */ __name((metadata3) => {
|
|
37371
37544
|
try {
|
|
@@ -37433,7 +37606,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
|
|
|
37433
37606
|
});
|
|
37434
37607
|
}, "movePaymentFacts");
|
|
37435
37608
|
|
|
37436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
37437
37610
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
37438
37611
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
37439
37612
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -37448,7 +37621,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
37448
37621
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
37449
37622
|
}, "assertReadCompatible");
|
|
37450
37623
|
|
|
37451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
|
|
37452
37625
|
var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
|
|
37453
37626
|
var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
|
|
37454
37627
|
if (provenance2?.startsWith("rule:"))
|
|
@@ -37494,7 +37667,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
|
|
|
37494
37667
|
});
|
|
37495
37668
|
}, "moveSuggestedLinks");
|
|
37496
37669
|
|
|
37497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
|
|
37498
37671
|
var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
|
|
37499
37672
|
var TEST_PROVIDER = "chat";
|
|
37500
37673
|
var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
@@ -37515,7 +37688,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
|
|
|
37515
37688
|
}
|
|
37516
37689
|
}, "purgeTestAccounts");
|
|
37517
37690
|
|
|
37518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
37519
37692
|
var BACKFILL_ON_OPEN = 5e3;
|
|
37520
37693
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
37521
37694
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -37580,13 +37753,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
37580
37753
|
}
|
|
37581
37754
|
}, "openStoreContext");
|
|
37582
37755
|
|
|
37583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
37584
37757
|
import { createHash as createHash17 } from "node:crypto";
|
|
37585
37758
|
|
|
37586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
37587
37760
|
import { createHash as createHash16 } from "node:crypto";
|
|
37588
37761
|
|
|
37589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
37590
37763
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
37591
37764
|
var ref = text4(2048);
|
|
37592
37765
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -37652,7 +37825,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
37652
37825
|
}))
|
|
37653
37826
|
});
|
|
37654
37827
|
|
|
37655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
37656
37829
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
37657
37830
|
var invalid7 = /* @__PURE__ */ __name((field4) => {
|
|
37658
37831
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -37785,7 +37958,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
37785
37958
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
37786
37959
|
}, "projectAnnotationsFingerprint");
|
|
37787
37960
|
|
|
37788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
37789
37962
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
37790
37963
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
37791
37964
|
var targetSchema = strictObject({
|
|
@@ -37892,7 +38065,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
37892
38065
|
}, "planBoundProjectAnnotations");
|
|
37893
38066
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
37894
38067
|
|
|
37895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
37896
38069
|
import { createHash as createHash18 } from "node:crypto";
|
|
37897
38070
|
var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
37898
38071
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -37986,7 +38159,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
37986
38159
|
})).digest("hex");
|
|
37987
38160
|
}, "projectAnnotationSnapshotFingerprint");
|
|
37988
38161
|
|
|
37989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
37990
38163
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
37991
38164
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
37992
38165
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -38003,7 +38176,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
38003
38176
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
38004
38177
|
}, "projectAnnotationRequest");
|
|
38005
38178
|
|
|
38006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
38007
38180
|
var SnapshotBudget = class {
|
|
38008
38181
|
static {
|
|
38009
38182
|
__name(this, "SnapshotBudget");
|
|
@@ -38029,13 +38202,13 @@ var SnapshotBudget = class {
|
|
|
38029
38202
|
}
|
|
38030
38203
|
};
|
|
38031
38204
|
|
|
38032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
38033
38206
|
import { createHash as createHash20 } from "node:crypto";
|
|
38034
38207
|
|
|
38035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
38036
38209
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
38037
38210
|
|
|
38038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
38039
38212
|
import { createHash as createHash19 } from "node:crypto";
|
|
38040
38213
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
38041
38214
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -38178,7 +38351,7 @@ var ProjectSnapshotSources = class {
|
|
|
38178
38351
|
}
|
|
38179
38352
|
};
|
|
38180
38353
|
|
|
38181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
38182
38355
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
38183
38356
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
38184
38357
|
}, "unsupported");
|
|
@@ -38349,7 +38522,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
38349
38522
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
38350
38523
|
}), "projectAnnotationSnapshot");
|
|
38351
38524
|
|
|
38352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
38353
38526
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
38354
38527
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
38355
38528
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -38411,7 +38584,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
38411
38584
|
};
|
|
38412
38585
|
}), "previewAnnotationSnapshot");
|
|
38413
38586
|
|
|
38414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
38415
38588
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
38416
38589
|
const mappings = { ...bindings };
|
|
38417
38590
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -38453,7 +38626,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
38453
38626
|
return mappings;
|
|
38454
38627
|
}, "restoreAnnotationRecords");
|
|
38455
38628
|
|
|
38456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
38457
38630
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
38458
38631
|
async preview(request) {
|
|
38459
38632
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -38483,7 +38656,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
38483
38656
|
}
|
|
38484
38657
|
}), "projectAnnotationStoreOver");
|
|
38485
38658
|
|
|
38486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
|
|
38487
38660
|
var PROJECTED = {
|
|
38488
38661
|
invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
|
|
38489
38662
|
payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
|
|
@@ -38823,7 +38996,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38823
38996
|
};
|
|
38824
38997
|
}, "recordStoreOver");
|
|
38825
38998
|
|
|
38826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
38827
39000
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
38828
39001
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
38829
39002
|
let merged = { from: from2, to };
|
|
@@ -38836,7 +39009,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
38836
39009
|
}, "markRange");
|
|
38837
39010
|
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");
|
|
38838
39011
|
|
|
38839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
|
|
38840
39013
|
var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
|
|
38841
39014
|
var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
|
|
38842
39015
|
chatId: String(row2.key).slice(prefix.length),
|
|
@@ -38857,7 +39030,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
|
|
|
38857
39030
|
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);
|
|
38858
39031
|
}, "setTaskAnalysisMark");
|
|
38859
39032
|
|
|
38860
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
38861
39034
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
38862
39035
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
38863
39036
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -38867,7 +39040,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
38867
39040
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
|
|
38868
39041
|
}, "setTaskRulesStop");
|
|
38869
39042
|
|
|
38870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
38871
39044
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38872
39045
|
const { database } = context;
|
|
38873
39046
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -38926,7 +39099,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38926
39099
|
};
|
|
38927
39100
|
}, "syncStoreOver");
|
|
38928
39101
|
|
|
38929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
38930
39103
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
38931
39104
|
const { database } = context;
|
|
38932
39105
|
return {
|
|
@@ -38948,7 +39121,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
38948
39121
|
};
|
|
38949
39122
|
}, "tagsStoreOver");
|
|
38950
39123
|
|
|
38951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
38952
39125
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
38953
39126
|
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
|
|
38954
39127
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -39075,7 +39248,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
39075
39248
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
39076
39249
|
}, "savePictureChunks");
|
|
39077
39250
|
|
|
39078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
39079
39252
|
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,
|
|
39080
39253
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
39081
39254
|
FROM messages m
|
|
@@ -39164,7 +39337,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
39164
39337
|
return plain2(best(found2));
|
|
39165
39338
|
}, "nearestMessages");
|
|
39166
39339
|
|
|
39167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
39168
39341
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
39169
39342
|
const { database } = context;
|
|
39170
39343
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -39422,7 +39595,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
39422
39595
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
39423
39596
|
}), "vectorsStoreOver");
|
|
39424
39597
|
|
|
39425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
39426
39599
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
39427
39600
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
39428
39601
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -39510,10 +39683,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
39510
39683
|
}
|
|
39511
39684
|
}, "lastBackup");
|
|
39512
39685
|
|
|
39513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
39514
39687
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
39515
39688
|
|
|
39516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
39517
39690
|
var COUNTED_TABLES = [
|
|
39518
39691
|
"accounts",
|
|
39519
39692
|
"chats",
|
|
@@ -39598,7 +39771,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
39598
39771
|
};
|
|
39599
39772
|
}, "storeContents");
|
|
39600
39773
|
|
|
39601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.569.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_8785fed449bbc2a6b34fc086f24a8413/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
39602
39775
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
39603
39776
|
const context = await openStoreContext(options);
|
|
39604
39777
|
try {
|
|
@@ -39870,6 +40043,7 @@ export {
|
|
|
39870
40043
|
contextSource,
|
|
39871
40044
|
contextEvidenceRequest,
|
|
39872
40045
|
MAIL_AGENDA_COLUMNS,
|
|
40046
|
+
mailOwnText,
|
|
39873
40047
|
AGENDA_COLUMNS,
|
|
39874
40048
|
correctWords,
|
|
39875
40049
|
THREAD_COLUMNS,
|
|
@@ -39901,6 +40075,7 @@ export {
|
|
|
39901
40075
|
savedFirstPassPerChat,
|
|
39902
40076
|
TASK_SORTS,
|
|
39903
40077
|
PROJECT_TASK_FIELDS,
|
|
40078
|
+
withoutField,
|
|
39904
40079
|
TASK_RELATION_KINDS,
|
|
39905
40080
|
TASK_ROLES,
|
|
39906
40081
|
TASK_EVENT_KINDS,
|
|
@@ -39914,6 +40089,7 @@ export {
|
|
|
39914
40089
|
delayStats,
|
|
39915
40090
|
rankingContextRange,
|
|
39916
40091
|
calendarKey,
|
|
40092
|
+
weekKey,
|
|
39917
40093
|
pendingNormalization,
|
|
39918
40094
|
backfillNormalized,
|
|
39919
40095
|
searchIndexState2 as searchIndexState,
|