@wirecat/drive-cli 0.49.0 → 0.51.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/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-WK2XXGPU.js → all-profiles-H3APJWSO.js} +8 -8
- package/dist/bundle/{anthropic-R354D7GT.js → anthropic-P7DXFYFE.js} +5 -5
- package/dist/bundle/{app-server-3YHJ757G.js → app-server-IQUR7ZC2.js} +52 -52
- package/dist/bundle/{bun-JVDJVDHL.js → bun-LZUEW2ML.js} +2 -2
- package/dist/bundle/{bun-sqlite-KZCZWSRZ.js → bun-sqlite-6LUE7UA6.js} +4 -4
- package/dist/bundle/{chunk-NFU3OBCC.js → chunk-2TPENYCK.js} +4 -4
- package/dist/bundle/{chunk-SSD2V4HR.js → chunk-35IHF562.js} +280 -259
- package/dist/bundle/{chunk-U77RLMOK.js → chunk-3KTDFSSK.js} +2 -2
- package/dist/bundle/{chunk-463NMG57.js → chunk-4GFAOETW.js} +3 -3
- package/dist/bundle/{chunk-EOZPMJJP.js → chunk-4YG2FZ53.js} +7 -7
- package/dist/bundle/{chunk-JMRHDZMV.js → chunk-5C7RKU7O.js} +33 -32
- package/dist/bundle/{chunk-75VCGSNB.js → chunk-6FXFYXTR.js} +15 -15
- package/dist/bundle/{chunk-QEM3MOSB.js → chunk-7LYVWMKD.js} +8 -8
- package/dist/bundle/{chunk-467AQO7E.js → chunk-7ZNM6KXP.js} +7 -7
- package/dist/bundle/{chunk-P7INAZIT.js → chunk-AKW5MNQP.js} +5 -5
- package/dist/bundle/{chunk-HD3TFIT4.js → chunk-AUW45JPI.js} +6 -6
- package/dist/bundle/{chunk-JZ3SUK2M.js → chunk-BMI5VCR4.js} +5 -5
- package/dist/bundle/{chunk-22LTNYO2.js → chunk-BVDAP3FQ.js} +9 -9
- package/dist/bundle/{chunk-CCLDCM7J.js → chunk-CT6Z6Z64.js} +410 -244
- package/dist/bundle/{chunk-ABVFH76X.js → chunk-CX7HQ6KK.js} +5 -5
- package/dist/bundle/{chunk-MC77UZVA.js → chunk-D222O57O.js} +6 -6
- package/dist/bundle/{chunk-HF2T7E67.js → chunk-D3UFQC7K.js} +49 -49
- package/dist/bundle/{chunk-KK3BA4IS.js → chunk-DDD3FS6G.js} +2 -2
- package/dist/bundle/{chunk-254VYUWN.js → chunk-DEVPGI27.js} +17 -17
- package/dist/bundle/{chunk-BJ3JRO34.js → chunk-EY4CUQW2.js} +7 -7
- package/dist/bundle/{chunk-RAAI3JLI.js → chunk-F3PPSIKI.js} +3 -3
- package/dist/bundle/{chunk-6Z3W7LTD.js → chunk-FCZ762RV.js} +8 -8
- package/dist/bundle/{chunk-Y2AUB4TJ.js → chunk-FV5WG4WU.js} +80 -33
- package/dist/bundle/{chunk-R2QRP7EJ.js → chunk-G75FZQAZ.js} +13 -9
- package/dist/bundle/{chunk-2BADVV4A.js → chunk-GK2VUKQY.js} +2 -2
- package/dist/bundle/{chunk-3UHJC6HH.js → chunk-HBRTKJ3J.js} +7 -7
- package/dist/bundle/{chunk-VHT2WI4I.js → chunk-HGWMX7BM.js} +101 -73
- package/dist/bundle/{chunk-XVXXWNAA.js → chunk-HYT3FJVB.js} +4 -4
- package/dist/bundle/{chunk-HIAO4MPA.js → chunk-I7EP3VPJ.js} +1 -1
- package/dist/bundle/{chunk-P4OU3OVF.js → chunk-J2S7QDOP.js} +14 -14
- package/dist/bundle/{chunk-FB7I5JWC.js → chunk-JI5KFKTL.js} +6 -6
- package/dist/bundle/{chunk-IRDGH7DV.js → chunk-K3EK4MTU.js} +3 -3
- package/dist/bundle/{chunk-5KR7BKDV.js → chunk-K6JSVXDN.js} +5 -5
- package/dist/bundle/{chunk-5ISHP4TK.js → chunk-LLMHJE5Q.js} +2 -2
- package/dist/bundle/{chunk-7BA3HL7N.js → chunk-LZKPT7GY.js} +35 -35
- package/dist/bundle/{chunk-CB5NGX6E.js → chunk-MPTD5P53.js} +2 -2
- package/dist/bundle/{chunk-MP2UCK3Z.js → chunk-N33EOINW.js} +4 -4
- package/dist/bundle/{chunk-KYJYOZYG.js → chunk-NO34DAIB.js} +6 -6
- package/dist/bundle/{chunk-PPXNEHYX.js → chunk-NRWDEBJB.js} +8 -8
- package/dist/bundle/{chunk-FZQSGLHU.js → chunk-NVHPYKYC.js} +11 -11
- package/dist/bundle/{chunk-2ZFR67KY.js → chunk-OASIFIXM.js} +2 -2
- package/dist/bundle/{chunk-MFS52LTZ.js → chunk-OKSS7YUN.js} +1 -1
- package/dist/bundle/{chunk-HVM5LS5Z.js → chunk-OQVJQSEH.js} +3 -3
- package/dist/bundle/{chunk-MAXN7COO.js → chunk-P3T2SZW2.js} +1 -1
- package/dist/bundle/{chunk-A3FU4RR6.js → chunk-PNUS224S.js} +4 -4
- package/dist/bundle/{chunk-FUJZ5S2Q.js → chunk-POFLDSTX.js} +10 -10
- package/dist/bundle/{chunk-R235IRSJ.js → chunk-PQGIV36R.js} +2 -2
- package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-PRBPVOW4.js} +1 -1
- package/dist/bundle/{chunk-ITZI7T2X.js → chunk-PT6XDCOY.js} +2 -2
- package/dist/bundle/{chunk-2CKGGIWF.js → chunk-Q5CLTK5R.js} +3 -3
- package/dist/bundle/{chunk-NVHB2MHX.js → chunk-SRIPLP7N.js} +4 -4
- package/dist/bundle/{chunk-46X7Z4FD.js → chunk-SRONUWOM.js} +343 -282
- package/dist/bundle/{chunk-E2Y6GJZX.js → chunk-SZWQFR5X.js} +4 -4
- package/dist/bundle/{chunk-IRNX4CO5.js → chunk-TEH76MZK.js} +27 -27
- package/dist/bundle/{chunk-45TPBTR3.js → chunk-TSZJXI4N.js} +21 -21
- package/dist/bundle/{chunk-7WEISHFA.js → chunk-TVJU245P.js} +2 -2
- package/dist/bundle/{chunk-JMOX454R.js → chunk-U3OS6V6S.js} +1 -1
- package/dist/bundle/{chunk-AN7HENGZ.js → chunk-U7DPS46V.js} +108 -96
- package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-UM4E2OFL.js} +1 -1
- package/dist/bundle/{chunk-DKJGYYCP.js → chunk-UMY4IQE2.js} +46 -46
- package/dist/bundle/{chunk-L5RZI2M5.js → chunk-UW7VXKKZ.js} +19 -19
- package/dist/bundle/{chunk-4ORK4UAY.js → chunk-VCPS7Q2W.js} +3 -3
- package/dist/bundle/{chunk-KKZYZ32J.js → chunk-VH4GVA2N.js} +2 -2
- package/dist/bundle/{chunk-IEAZAPC3.js → chunk-WACVI3CS.js} +42 -17
- package/dist/bundle/{chunk-LF7ACSTK.js → chunk-WX2NQO2D.js} +1 -1
- package/dist/bundle/{chunk-HBYE4EP2.js → chunk-WYWXOIGT.js} +1 -1
- package/dist/bundle/{chunk-P4NOTS3U.js → chunk-XBENRRBS.js} +2 -2
- package/dist/bundle/{chunk-W5IDHD6C.js → chunk-XCXUP76D.js} +27 -27
- package/dist/bundle/{chunk-NXFEZQDL.js → chunk-XE2GEE3E.js} +26 -26
- package/dist/bundle/{chunk-BQV3WYXW.js → chunk-XXLTVVMT.js} +31 -21
- package/dist/bundle/{chunk-YYMHFXHK.js → chunk-Y4YBW5S4.js} +2 -2
- package/dist/bundle/{chunk-VAGF723Z.js → chunk-Y73IZWRI.js} +1 -1
- package/dist/bundle/{chunk-624B6G64.js → chunk-YLC4JVQZ.js} +5 -5
- package/dist/bundle/{chunk-2DLAJGRN.js → chunk-YOABRW2M.js} +1 -1
- package/dist/bundle/{chunk-YOF5BC4G.js → chunk-YVQJPLPU.js} +2 -2
- package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-YXHMEFL7.js} +1 -1
- package/dist/bundle/{chunk-W5EUHV3J.js → chunk-Z3GWVRW3.js} +1 -1
- package/dist/bundle/{chunk-65AW2AEQ.js → chunk-Z6KTSXE3.js} +2 -2
- package/dist/bundle/{chunk-HQ2PGEOK.js → chunk-ZKAAFY4C.js} +11 -11
- package/dist/bundle/command-contract-R6CGYG7L.js +38 -0
- package/dist/bundle/{decode-BE3VDYTJ.js → decode-4EENADOV.js} +4 -4
- package/dist/bundle/drive.js +7 -7
- package/dist/bundle/{echarts-4OQHS575.js → echarts-ZFC37XW7.js} +2 -2
- package/dist/bundle/{embed-QR76SJDI.js → embed-UZMNP26C.js} +5 -5
- package/dist/bundle/{embedder-EMIDKBYV.js → embedder-7VDWDBKF.js} +8 -8
- package/dist/bundle/{entry-FE4REJDO.js → entry-JJKCHVIK.js} +6 -6
- package/dist/bundle/failure-VBQBKCD5.js +37 -0
- package/dist/bundle/{first-run-ALPI62PX.js → first-run-FJTEUJBF.js} +9 -9
- package/dist/bundle/first-screen-NSPQWNMQ.js +36 -0
- package/dist/bundle/{google-NV75VSCD.js → google-JBJASYKY.js} +9 -9
- package/dist/bundle/google-api-2FKF4UUN.js +82 -0
- package/dist/bundle/{identity-NZ7SP6OL.js → identity-XE73ALJH.js} +2 -2
- package/dist/bundle/{instructions-3QZBKKPF.js → instructions-Q4ASITKO.js} +1 -1
- package/dist/bundle/{login-KNBM6XUX.js → login-BD2WQT5F.js} +62 -62
- package/dist/bundle/{mcp-XY2FGGUM.js → mcp-G6U2Q63E.js} +76 -76
- package/dist/bundle/mcp-H3XD47NW.js +95 -0
- package/dist/bundle/{mcp-OQBZXELQ.js → mcp-ZYZ4DFW2.js} +2 -2
- package/dist/bundle/{node-R2BLYUSB.js → node-CYM7VXFR.js} +2 -2
- package/dist/bundle/{node-sqlite-PMRVP442.js → node-sqlite-RK4MHW57.js} +4 -4
- package/dist/bundle/{oauth-NM2AKRRT.js → oauth-CQXQRHJR.js} +6 -6
- package/dist/bundle/{open-XZH5ZNDA.js → open-WSE4NBD2.js} +3 -3
- package/dist/bundle/{process-IX5YWGDP.js → process-7HHZZZLA.js} +1 -1
- package/dist/bundle/{program-MDWQHGBY.js → program-ZMQYZNV5.js} +95 -88
- package/dist/bundle/{prompt-5K6XGWSK.js → prompt-YSBBQJGF.js} +4 -4
- package/dist/bundle/{reasons-GF2TYGX6.js → reasons-366PI7OV.js} +3 -3
- package/dist/bundle/{recognize-U7GDD6T2.js → recognize-AZKGPCAS.js} +3 -3
- package/dist/bundle/{remote-ZWXOGNQX.js → remote-EYSK3XKD.js} +6 -6
- package/dist/bundle/{rerank-YRQBCS63.js → rerank-LOW6VIDF.js} +6 -6
- package/dist/bundle/{serve-6PQ7K5RK.js → serve-UJ52HGA7.js} +8 -8
- package/dist/bundle/server-CA2VLY25.js +56 -0
- package/dist/bundle/server-TW75RDEP.js +69 -0
- package/dist/bundle/{services-QBIQX236.js → services-B4QUSCFN.js} +28 -28
- package/dist/bundle/{sqlite-runtime-7Q5UD2VR.js → sqlite-runtime-GEURBVK5.js} +4 -4
- package/dist/bundle/{state-U72TC26L.js → state-OJNSKOXO.js} +5 -5
- package/dist/bundle/{store-B4RAJ63G.js → store-62SBP45X.js} +14 -14
- package/dist/bundle/{store-FYABCSIH.js → store-FTS2HVVB.js} +16 -16
- package/dist/bundle/store-maintenance-command-FQMB3R4E.js +57 -0
- package/dist/bundle/tokens-JALZUGEM.js +103 -0
- package/dist/commands/search.js +1 -1
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/contract-overrides.js +1 -1
- package/dist/contract-overrides.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +2 -2
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-AEA45IX7.js +0 -38
- package/dist/bundle/failure-GYOTW6NN.js +0 -37
- package/dist/bundle/first-screen-JLS57PIT.js +0 -36
- package/dist/bundle/google-api-6623OUF2.js +0 -82
- package/dist/bundle/mcp-4NPK6BM3.js +0 -95
- package/dist/bundle/server-O7SS6NAY.js +0 -56
- package/dist/bundle/server-WT57TF6S.js +0 -69
- package/dist/bundle/store-maintenance-command-DAF5NI3T.js +0 -57
- package/dist/bundle/tokens-DISQJKDM.js +0 -103
- /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-2WNDZFGG.js} +0 -0
- /package/dist/bundle/{chunk-YLBNPI7H.js → chunk-UO5O3665.js} +0 -0
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
MAX_TEXT_CHARS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3KTDFSSK.js";
|
|
6
6
|
import {
|
|
7
7
|
COUNTER_FIELDS,
|
|
8
8
|
DOCUMENT_ACCOUNT_PROVIDERS,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
rankingWords,
|
|
35
35
|
useStoredProviders,
|
|
36
36
|
validCounter
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7ZNM6KXP.js";
|
|
38
38
|
import {
|
|
39
39
|
FACT_STATUSES,
|
|
40
40
|
FACT_TYPES,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
WORK_TASK_TYPES,
|
|
52
52
|
linkKind,
|
|
53
53
|
matches
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AUW45JPI.js";
|
|
55
55
|
import {
|
|
56
56
|
CHAT_MESSAGES_READ,
|
|
57
57
|
MEETING_FINDINGS_KIND,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
validateMeetingPreparationContext,
|
|
81
81
|
validateMeetingRelatedHistory,
|
|
82
82
|
validateMeetingSeriesHistory
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-UMY4IQE2.js";
|
|
84
84
|
import {
|
|
85
85
|
QUERY_LIMITS,
|
|
86
86
|
dateRange,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
validateQuery,
|
|
92
92
|
walkQuery,
|
|
93
93
|
zonedMoment
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-G75FZQAZ.js";
|
|
95
95
|
import {
|
|
96
96
|
DEFAULT_STEMMERS,
|
|
97
97
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -104,24 +104,24 @@ import {
|
|
|
104
104
|
fold,
|
|
105
105
|
normalize,
|
|
106
106
|
parseStemmers
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-FCZ762RV.js";
|
|
108
108
|
import {
|
|
109
109
|
DEFAULT_TASK_CATEGORIES,
|
|
110
110
|
sharedConfigPath,
|
|
111
111
|
storedTaskCategories,
|
|
112
112
|
taskCategoriesReader
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-JI5KFKTL.js";
|
|
114
114
|
import {
|
|
115
115
|
storePath
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-Z6KTSXE3.js";
|
|
117
117
|
import {
|
|
118
118
|
PRAGMAS,
|
|
119
119
|
quietSqliteWarning,
|
|
120
120
|
storeCapable
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-NO34DAIB.js";
|
|
122
122
|
import {
|
|
123
123
|
singleLine
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-HGWMX7BM.js";
|
|
125
125
|
import {
|
|
126
126
|
CliError,
|
|
127
127
|
array,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
safeParse,
|
|
140
140
|
strictObject,
|
|
141
141
|
string
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-EY4CUQW2.js";
|
|
143
143
|
import {
|
|
144
144
|
resolveFrom
|
|
145
145
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -167,12 +167,12 @@ import {
|
|
|
167
167
|
sql,
|
|
168
168
|
sqliteTable,
|
|
169
169
|
text
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-I7EP3VPJ.js";
|
|
171
171
|
import {
|
|
172
172
|
__name
|
|
173
173
|
} from "./chunk-ZVVMGPBJ.js";
|
|
174
174
|
|
|
175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
176
176
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
177
177
|
const methods = whole;
|
|
178
178
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -300,7 +300,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
300
300
|
};
|
|
301
301
|
}, "bindAccount");
|
|
302
302
|
|
|
303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
304
304
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
305
305
|
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");
|
|
306
306
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -323,7 +323,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
323
323
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
324
324
|
}, "sourceOf");
|
|
325
325
|
|
|
326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
327
327
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
328
328
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
329
329
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -510,7 +510,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
510
510
|
return { accounts: [...chosen.values()], skipped };
|
|
511
511
|
}, "fitting");
|
|
512
512
|
|
|
513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
514
514
|
var IndexBuilderOn = class {
|
|
515
515
|
static {
|
|
516
516
|
__name(this, "IndexBuilderOn");
|
|
@@ -705,7 +705,7 @@ function alias(table, alias2) {
|
|
|
705
705
|
}
|
|
706
706
|
__name(alias, "alias");
|
|
707
707
|
|
|
708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
709
709
|
var ENTITY_TABLES = {
|
|
710
710
|
account: "accounts",
|
|
711
711
|
attachment: "attachments",
|
|
@@ -745,7 +745,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
745
745
|
return { table, pointer, type, count, known: known2 };
|
|
746
746
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
747
747
|
|
|
748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
749
749
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
750
750
|
id: integer("id").primaryKey(),
|
|
751
751
|
name: text("name").notNull().unique(),
|
|
@@ -754,7 +754,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
754
754
|
updatedAt: integer("updated_at").notNull()
|
|
755
755
|
});
|
|
756
756
|
|
|
757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
758
758
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
759
759
|
sourceKey: text("source_key").notNull(),
|
|
760
760
|
collection: text("collection").notNull(),
|
|
@@ -764,13 +764,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
764
764
|
createdAt: integer("created_at").notNull()
|
|
765
765
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
766
766
|
|
|
767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
768
768
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
769
769
|
id: integer("id").notNull(),
|
|
770
770
|
indexableType: text("indexable_type").notNull()
|
|
771
771
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
772
772
|
|
|
773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
774
774
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
775
775
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
776
776
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -796,7 +796,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
796
796
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
797
797
|
]);
|
|
798
798
|
|
|
799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
800
800
|
var accounts = sqliteTable("accounts", {
|
|
801
801
|
id: integer("id").primaryKey(),
|
|
802
802
|
provider: text("provider").notNull(),
|
|
@@ -2292,7 +2292,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2292
2292
|
at: integer("at").notNull()
|
|
2293
2293
|
});
|
|
2294
2294
|
|
|
2295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2296
2296
|
var ARMS = [
|
|
2297
2297
|
[
|
|
2298
2298
|
"message",
|
|
@@ -2419,7 +2419,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2419
2419
|
return recomputed;
|
|
2420
2420
|
}, "drainInvolvementQueue");
|
|
2421
2421
|
|
|
2422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2423
2423
|
import { domainToUnicode } from "node:url";
|
|
2424
2424
|
|
|
2425
2425
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12441,7 +12441,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12441
12441
|
}, "oa");
|
|
12442
12442
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12443
12443
|
|
|
12444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12445
12445
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12446
12446
|
var ID = /^[\w-]{10,}$/;
|
|
12447
12447
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12482,7 +12482,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12482
12482
|
return { url, documentId: googleDocumentId(url) };
|
|
12483
12483
|
}), "googleDocumentLinks");
|
|
12484
12484
|
|
|
12485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12486
12486
|
var PHONE_PLANS = [
|
|
12487
12487
|
{
|
|
12488
12488
|
country: "us",
|
|
@@ -12862,7 +12862,7 @@ var PHONE_PLANS = [
|
|
|
12862
12862
|
}
|
|
12863
12863
|
];
|
|
12864
12864
|
|
|
12865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12866
12866
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12867
12867
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12868
12868
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12903,7 +12903,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12903
12903
|
return void 0;
|
|
12904
12904
|
}, "nationalPhone");
|
|
12905
12905
|
|
|
12906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12907
12907
|
var BEFORE = [
|
|
12908
12908
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12909
12909
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13163,7 +13163,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13163
13163
|
return found2.sort((a, b) => a.start - b.start);
|
|
13164
13164
|
}, "findPlaces");
|
|
13165
13165
|
|
|
13166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13167
13167
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13168
13168
|
var MENTION_VERSIONS = {
|
|
13169
13169
|
phone: 1,
|
|
@@ -13353,7 +13353,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13353
13353
|
};
|
|
13354
13354
|
}, "typedPhone");
|
|
13355
13355
|
|
|
13356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13357
13357
|
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";
|
|
13358
13358
|
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";
|
|
13359
13359
|
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";
|
|
@@ -13361,7 +13361,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13361
13361
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13362
13362
|
var NAME_WORDS = WORDS.split(" ");
|
|
13363
13363
|
|
|
13364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13365
13365
|
var LATIN_TO_CYRILLIC = {
|
|
13366
13366
|
shch: "\u0449",
|
|
13367
13367
|
sch: "\u0449",
|
|
@@ -13569,7 +13569,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13569
13569
|
return found2;
|
|
13570
13570
|
}, "findUnknownNames");
|
|
13571
13571
|
|
|
13572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13573
13573
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13574
13574
|
"webpage",
|
|
13575
13575
|
"share",
|
|
@@ -13601,7 +13601,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13601
13601
|
});
|
|
13602
13602
|
}, "matchDownloads");
|
|
13603
13603
|
|
|
13604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13605
13605
|
var QUERY_VERSION = 1;
|
|
13606
13606
|
var QUERY_LIMITS2 = {
|
|
13607
13607
|
...QUERY_LIMITS,
|
|
@@ -13632,7 +13632,7 @@ function exhausted(budget) {
|
|
|
13632
13632
|
}
|
|
13633
13633
|
__name(exhausted, "exhausted");
|
|
13634
13634
|
|
|
13635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13636
13636
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13637
13637
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13638
13638
|
kind: "char",
|
|
@@ -14032,7 +14032,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14032
14032
|
return out;
|
|
14033
14033
|
}, "foldRegex");
|
|
14034
14034
|
|
|
14035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14036
14036
|
var PRESET_VERSION = 1;
|
|
14037
14037
|
var PRESETS = {
|
|
14038
14038
|
password: {
|
|
@@ -14086,7 +14086,7 @@ var PRESETS = {
|
|
|
14086
14086
|
}
|
|
14087
14087
|
};
|
|
14088
14088
|
|
|
14089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14090
14090
|
var FIELD_VERSION = 2;
|
|
14091
14091
|
var UNITS = {
|
|
14092
14092
|
"": 1,
|
|
@@ -14586,12 +14586,12 @@ var QUERY_OPERATORS = [
|
|
|
14586
14586
|
{ name: "boost / minimum / intervals", example: "invoice^2", semantics: "query.unsupported-operator" }
|
|
14587
14587
|
];
|
|
14588
14588
|
|
|
14589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14590
14590
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14591
14591
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14592
14592
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14593
14593
|
|
|
14594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14595
14595
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14596
14596
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14597
14597
|
var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
@@ -14615,7 +14615,7 @@ var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
|
14615
14615
|
};
|
|
14616
14616
|
}, "linkMatch");
|
|
14617
14617
|
|
|
14618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14619
14619
|
var SETTING = "phoneCountries";
|
|
14620
14620
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14621
14621
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14646,7 +14646,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14646
14646
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14647
14647
|
}, "valueMatch");
|
|
14648
14648
|
|
|
14649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14650
14650
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14651
14651
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14652
14652
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14674,7 +14674,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14674
14674
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14675
14675
|
}, "vocabularySimilarity");
|
|
14676
14676
|
|
|
14677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14678
14678
|
import { createHash } from "node:crypto";
|
|
14679
14679
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14680
14680
|
try {
|
|
@@ -14740,7 +14740,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14740
14740
|
});
|
|
14741
14741
|
}, "guardTagCreation");
|
|
14742
14742
|
|
|
14743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14744
14744
|
var invalid = /* @__PURE__ */ __name((message2) => {
|
|
14745
14745
|
throw new CliError("validation_error", message2);
|
|
14746
14746
|
}, "invalid");
|
|
@@ -14817,7 +14817,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14817
14817
|
};
|
|
14818
14818
|
}, "createTagRedirectIndex");
|
|
14819
14819
|
|
|
14820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14821
14821
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14822
14822
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14823
14823
|
if (!row2)
|
|
@@ -14845,7 +14845,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14845
14845
|
return snapshot2;
|
|
14846
14846
|
}, "tagRedirectSnapshot");
|
|
14847
14847
|
|
|
14848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14849
14849
|
import { createHash as createHash2 } from "node:crypto";
|
|
14850
14850
|
var TASK_KEY_PREFIXES = {
|
|
14851
14851
|
question: "Q",
|
|
@@ -14873,7 +14873,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14873
14873
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14874
14874
|
}, "taskAccountOf");
|
|
14875
14875
|
|
|
14876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14877
14877
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14878
14878
|
var REFERABLE = {
|
|
14879
14879
|
note: { tombstone: true },
|
|
@@ -15031,7 +15031,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15031
15031
|
}, "taskIdOf");
|
|
15032
15032
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15033
15033
|
|
|
15034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15035
15035
|
var toMs = /* @__PURE__ */ __name((iso10) => {
|
|
15036
15036
|
if (iso10 === null || iso10 === void 0)
|
|
15037
15037
|
return null;
|
|
@@ -15045,7 +15045,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15045
15045
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15046
15046
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15047
15047
|
|
|
15048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15049
15049
|
var TAG_KINDS = ["tag", "topic"];
|
|
15050
15050
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15051
15051
|
var TAG_TYPE = {
|
|
@@ -15236,7 +15236,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15236
15236
|
return result;
|
|
15237
15237
|
}, "tagsOf");
|
|
15238
15238
|
|
|
15239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15240
15240
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15241
15241
|
var SPEECH = speech("att");
|
|
15242
15242
|
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");
|
|
@@ -15591,7 +15591,7 @@ var FIELD_COMPILERS = {
|
|
|
15591
15591
|
subject
|
|
15592
15592
|
};
|
|
15593
15593
|
|
|
15594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15595
15595
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15596
15596
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15597
15597
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15607,7 +15607,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15607
15607
|
};
|
|
15608
15608
|
}, "placeOf");
|
|
15609
15609
|
|
|
15610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15611
15611
|
var DRAIN_ON_WRITE = 500;
|
|
15612
15612
|
var METHOD = "rules";
|
|
15613
15613
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15770,7 +15770,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15770
15770
|
return queued.length;
|
|
15771
15771
|
}, "drainMentions");
|
|
15772
15772
|
|
|
15773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15774
15774
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15775
15775
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15776
15776
|
if (!exists2)
|
|
@@ -15778,7 +15778,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15778
15778
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15779
15779
|
}, "indexRow");
|
|
15780
15780
|
|
|
15781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15782
15782
|
var INDEX = "message_stems";
|
|
15783
15783
|
var SETTING2 = "searchStemmers";
|
|
15784
15784
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -15881,14 +15881,14 @@ var stemWriter = /* @__PURE__ */ __name((database, stemmer) => {
|
|
|
15881
15881
|
};
|
|
15882
15882
|
}, "stemWriter");
|
|
15883
15883
|
var nextQueued = /* @__PURE__ */ __name((database, limit) => database.prepare("SELECT id AS pk FROM message_stems_pending ORDER BY id LIMIT ?").all(limit).map((row2) => Number(row2.pk)), "nextQueued");
|
|
15884
|
-
var drainStems = /* @__PURE__ */ __name((database,
|
|
15884
|
+
var drainStems = /* @__PURE__ */ __name((database, stemmerFor2, limit = DRAIN_ON_WRITE2) => {
|
|
15885
15885
|
const pks = nextQueued(database, limit);
|
|
15886
15886
|
if (pks.length === 0)
|
|
15887
15887
|
return 0;
|
|
15888
15888
|
const stemmers = storeStemmers(database);
|
|
15889
15889
|
if (!stemmers)
|
|
15890
15890
|
return 0;
|
|
15891
|
-
const stemmer =
|
|
15891
|
+
const stemmer = stemmerFor2(stemmers);
|
|
15892
15892
|
return claim(database, stemmer.identity) ? stemWriter(database, stemmer).queued(pks) : 0;
|
|
15893
15893
|
}, "drainStems");
|
|
15894
15894
|
var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
@@ -15900,7 +15900,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
15900
15900
|
};
|
|
15901
15901
|
}, "stemmerCache");
|
|
15902
15902
|
|
|
15903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
15904
15904
|
var SQLITE_BUSY = 5;
|
|
15905
15905
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
15906
15906
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -15988,7 +15988,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
15988
15988
|
}
|
|
15989
15989
|
}, "read");
|
|
15990
15990
|
|
|
15991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
15992
15992
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
15993
15993
|
coalesce(CASE k.chunkable_type
|
|
15994
15994
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16130,7 +16130,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16130
16130
|
}, "dropUnusedVectors");
|
|
16131
16131
|
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");
|
|
16132
16132
|
|
|
16133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16134
16134
|
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({
|
|
16135
16135
|
target: [accounts.provider, accounts.externalId],
|
|
16136
16136
|
set: {
|
|
@@ -16236,7 +16236,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16236
16236
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16237
16237
|
}, "dropOrphanPeople");
|
|
16238
16238
|
|
|
16239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16240
16240
|
var FOLDED = [
|
|
16241
16241
|
{ table: "tasks", column: "title" },
|
|
16242
16242
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16273,7 +16273,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16273
16273
|
return filled2;
|
|
16274
16274
|
}, "fillFolded");
|
|
16275
16275
|
|
|
16276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16277
16277
|
import { createHash as createHash3 } from "node:crypto";
|
|
16278
16278
|
var CHUNK_CHARS = 1200;
|
|
16279
16279
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16378,7 +16378,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16378
16378
|
return chunks2;
|
|
16379
16379
|
}, "cutChunks");
|
|
16380
16380
|
|
|
16381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16382
16382
|
var DAY = 864e5;
|
|
16383
16383
|
var CURRENCY = [
|
|
16384
16384
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16495,7 +16495,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16495
16495
|
return best?.day ?? null;
|
|
16496
16496
|
}, "dueDayOf");
|
|
16497
16497
|
|
|
16498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16499
16499
|
var DAY2 = 864e5;
|
|
16500
16500
|
var STOP_WORDS = new Set([
|
|
16501
16501
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16650,7 +16650,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16650
16650
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16651
16651
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16652
16652
|
|
|
16653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16654
16654
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16655
16655
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16656
16656
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -16921,7 +16921,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
16921
16921
|
};
|
|
16922
16922
|
}, "readiness");
|
|
16923
16923
|
|
|
16924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
16925
16925
|
var DOCUMENT_PICTURE = "document_picture";
|
|
16926
16926
|
var SCAN_PAGE2 = 5e3;
|
|
16927
16927
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -16984,7 +16984,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
16984
16984
|
}, "nearestPictures")
|
|
16985
16985
|
}), "documentPicturesOver");
|
|
16986
16986
|
|
|
16987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
16988
16988
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
16989
16989
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
16990
16990
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17049,7 +17049,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17049
17049
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17050
17050
|
var bound2 = /* @__PURE__ */ __name(({ sql: text5, params }) => sql.join(text5.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
|
|
17051
17051
|
|
|
17052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17053
17053
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17054
17054
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17055
17055
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17139,7 +17139,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17139
17139
|
});
|
|
17140
17140
|
}, "linkMeeting");
|
|
17141
17141
|
|
|
17142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17143
17143
|
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), ''))";
|
|
17144
17144
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17145
17145
|
"working-location",
|
|
@@ -17323,7 +17323,7 @@ var writer2 = /* @__PURE__ */ __name((database, corpus, stemmer) => {
|
|
|
17323
17323
|
statements.dequeue.run(queuedAs(corpus), id2);
|
|
17324
17324
|
};
|
|
17325
17325
|
}, "writer");
|
|
17326
|
-
var drainCorpus = /* @__PURE__ */ __name((database, corpus,
|
|
17326
|
+
var drainCorpus = /* @__PURE__ */ __name((database, corpus, stemmerFor2, { batch = 200, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
17327
17327
|
if (corpus.type === "email" || corpus.type === "document")
|
|
17328
17328
|
database.prepare(`UPDATE chunks SET account_id = (SELECT account_id FROM ${corpus.table} WHERE id = chunks.chunkable_id)
|
|
17329
17329
|
WHERE chunkable_type = ? AND account_id IS NULL`).run(corpus.type);
|
|
@@ -17331,7 +17331,7 @@ var drainCorpus = /* @__PURE__ */ __name((database, corpus, stemmerFor, { batch
|
|
|
17331
17331
|
const state = corpusIndexState(database, corpus);
|
|
17332
17332
|
if (state.wanted === null)
|
|
17333
17333
|
return 0;
|
|
17334
|
-
const stemmer =
|
|
17334
|
+
const stemmer = stemmerFor2(savedStemmers(database) ?? DEFAULT_STEMMERS);
|
|
17335
17335
|
const queue = `${corpus.type}_index_pending`;
|
|
17336
17336
|
if (state.built !== stemmer.identity) {
|
|
17337
17337
|
write(database, () => {
|
|
@@ -17360,7 +17360,7 @@ var drainCorpus = /* @__PURE__ */ __name((database, corpus, stemmerFor, { batch
|
|
|
17360
17360
|
}
|
|
17361
17361
|
return done;
|
|
17362
17362
|
}, "drainCorpus");
|
|
17363
|
-
var drainNoteIndex = /* @__PURE__ */ __name((database,
|
|
17363
|
+
var drainNoteIndex = /* @__PURE__ */ __name((database, stemmerFor2, options = {}) => drainCorpus(database, CORPORA.document, stemmerFor2, options) + drainCorpus(database, CORPORA.note, stemmerFor2, options) + fillTrigrams(database, options), "drainNoteIndex");
|
|
17364
17364
|
var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
17365
17365
|
write(database, () => {
|
|
17366
17366
|
for (const corpus of Object.values(CORPORA))
|
|
@@ -17369,7 +17369,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17369
17369
|
return true;
|
|
17370
17370
|
}, "resetNoteIndex");
|
|
17371
17371
|
|
|
17372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17373
17373
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17374
17374
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17375
17375
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17388,7 +17388,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17388
17388
|
}
|
|
17389
17389
|
}, "resolvePersonLinks");
|
|
17390
17390
|
|
|
17391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17392
17392
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17393
17393
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17394
17394
|
find: orm.select({
|
|
@@ -17613,7 +17613,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17613
17613
|
}, "meetingIdentityPk");
|
|
17614
17614
|
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");
|
|
17615
17615
|
|
|
17616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17617
17617
|
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");
|
|
17618
17618
|
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");
|
|
17619
17619
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -17893,7 +17893,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
17893
17893
|
}
|
|
17894
17894
|
}, "replaceAutoTags");
|
|
17895
17895
|
|
|
17896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
17897
17897
|
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");
|
|
17898
17898
|
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;
|
|
17899
17899
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -17974,7 +17974,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
17974
17974
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
17975
17975
|
}, "mailCore");
|
|
17976
17976
|
|
|
17977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
17978
17978
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
17979
17979
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
17980
17980
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18041,7 +18041,7 @@ var chunkAttachments = /* @__PURE__ */ __name((database, accountId, emailId, now
|
|
|
18041
18041
|
}, "chunkAttachments");
|
|
18042
18042
|
var MAIL_CUT = "mail_pieces_cut";
|
|
18043
18043
|
var CUT = "email";
|
|
18044
|
-
var drainEmailIndex = /* @__PURE__ */ __name((database,
|
|
18044
|
+
var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
18045
18045
|
if (database.prepare("SELECT value FROM store_settings WHERE key = ?").get(MAIL_CUT)?.value !== CUT)
|
|
18046
18046
|
write(database, () => {
|
|
18047
18047
|
const single = database.prepare("SELECT DISTINCT content_hash AS hash FROM chunks WHERE chunkable_type = 'email'").all().map(({ hash: hash2 }) => String(hash2));
|
|
@@ -18064,7 +18064,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor) => {
|
|
|
18064
18064
|
dropUnusedVectors(database, before2);
|
|
18065
18065
|
}
|
|
18066
18066
|
});
|
|
18067
|
-
const emails3 = drainCorpus(database, CORPORA.email,
|
|
18067
|
+
const emails3 = drainCorpus(database, CORPORA.email, stemmerFor2);
|
|
18068
18068
|
const next = database.prepare("SELECT id FROM email_index_pending WHERE indexable_type = 'email_thread' ORDER BY id LIMIT 50");
|
|
18069
18069
|
const done = database.prepare("DELETE FROM email_index_pending WHERE indexable_type = 'email_thread' AND id = ?");
|
|
18070
18070
|
let threads = 0;
|
|
@@ -18084,7 +18084,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor) => {
|
|
|
18084
18084
|
return emails3 + threads;
|
|
18085
18085
|
}, "drainEmailIndex");
|
|
18086
18086
|
|
|
18087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18088
18088
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18089
18089
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18090
18090
|
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,
|
|
@@ -18130,7 +18130,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18130
18130
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18131
18131
|
}, "forgetLocations");
|
|
18132
18132
|
|
|
18133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18134
18134
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18135
18135
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18136
18136
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18180,7 +18180,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18180
18180
|
return threads.length;
|
|
18181
18181
|
}, "markEmailsRestored");
|
|
18182
18182
|
|
|
18183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18184
18184
|
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");
|
|
18185
18185
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18186
18186
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18247,7 +18247,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18247
18247
|
}
|
|
18248
18248
|
}), "mailRulesOver");
|
|
18249
18249
|
|
|
18250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18251
18251
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18252
18252
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18253
18253
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18255,7 +18255,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18255
18255
|
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);
|
|
18256
18256
|
}, "reviewLink");
|
|
18257
18257
|
|
|
18258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18259
18259
|
function checkMeetingCancelled(signal) {
|
|
18260
18260
|
if (!signal?.aborted)
|
|
18261
18261
|
return;
|
|
@@ -18266,7 +18266,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18266
18266
|
}
|
|
18267
18267
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18268
18268
|
|
|
18269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18270
18270
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18271
18271
|
id: Number(row2.id),
|
|
18272
18272
|
accountId: Number(row2.account_id),
|
|
@@ -18316,7 +18316,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18316
18316
|
createdAt: Number(row2.created_at)
|
|
18317
18317
|
}), "transcriptRowOf");
|
|
18318
18318
|
|
|
18319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18320
18320
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18321
18321
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18322
18322
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18483,7 +18483,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18483
18483
|
}
|
|
18484
18484
|
}), "meetingReadsOver");
|
|
18485
18485
|
|
|
18486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18487
18487
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18488
18488
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18489
18489
|
const params = [input.accountId];
|
|
@@ -18526,7 +18526,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18526
18526
|
return { clauses, params };
|
|
18527
18527
|
}, "meetingSelectionSql");
|
|
18528
18528
|
|
|
18529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18530
18530
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18531
18531
|
async meetingChatLines(input) {
|
|
18532
18532
|
checkMeetingCancelled(input.signal);
|
|
@@ -18554,7 +18554,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18554
18554
|
}
|
|
18555
18555
|
}), "meetingChatLinesOver");
|
|
18556
18556
|
|
|
18557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18558
18558
|
var MESSAGE_FIELDS = {
|
|
18559
18559
|
pk: messages.id,
|
|
18560
18560
|
nativeId: messages.externalId,
|
|
@@ -18721,7 +18721,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18721
18721
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18722
18722
|
}), "chatActivity");
|
|
18723
18723
|
|
|
18724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18725
18725
|
var HIT_FIELDS = {
|
|
18726
18726
|
...MESSAGE_FIELDS,
|
|
18727
18727
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18820,7 +18820,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18820
18820
|
};
|
|
18821
18821
|
}, "directReplies");
|
|
18822
18822
|
|
|
18823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18824
18824
|
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");
|
|
18825
18825
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18826
18826
|
const found2 = identityRow(context, ref3);
|
|
@@ -18951,7 +18951,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
18951
18951
|
}, "mentioning");
|
|
18952
18952
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18953
18953
|
|
|
18954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
18955
18955
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
18956
18956
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
18957
18957
|
}, "missing");
|
|
@@ -19073,7 +19073,7 @@ function meetingContextLinksOver(context) {
|
|
|
19073
19073
|
}
|
|
19074
19074
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19075
19075
|
|
|
19076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19077
19077
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19078
19078
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19079
19079
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19102,7 +19102,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19102
19102
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19103
19103
|
}, "indexedText");
|
|
19104
19104
|
|
|
19105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19106
19106
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19107
19107
|
var meetingCurrentIndexRows = `
|
|
19108
19108
|
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
|
|
@@ -19133,7 +19133,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19133
19133
|
}, "invalidateMeetingStems");
|
|
19134
19134
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19135
19135
|
|
|
19136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19137
19137
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19138
19138
|
return {
|
|
19139
19139
|
async indexSearch(original) {
|
|
@@ -19201,10 +19201,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19201
19201
|
}
|
|
19202
19202
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19203
19203
|
|
|
19204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19205
19205
|
import { createHash as createHash4 } from "node:crypto";
|
|
19206
19206
|
|
|
19207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19208
19208
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19209
19209
|
const padded = ` ${term} `;
|
|
19210
19210
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19213,7 +19213,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19213
19213
|
return [...pieces];
|
|
19214
19214
|
}, "trigrams");
|
|
19215
19215
|
|
|
19216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19217
19217
|
var SHORTEST_CORRECTION = 3;
|
|
19218
19218
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19219
19219
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19260,7 +19260,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19260
19260
|
return corrections;
|
|
19261
19261
|
}, "correctWords");
|
|
19262
19262
|
|
|
19263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19264
19264
|
var SHORTEST_GARBLED = 4;
|
|
19265
19265
|
var MOST_WIDENED = 64;
|
|
19266
19266
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19352,7 +19352,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19352
19352
|
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));
|
|
19353
19353
|
}, "widenWords");
|
|
19354
19354
|
|
|
19355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19356
19356
|
import { readFileSync } from "node:fs";
|
|
19357
19357
|
var loaded;
|
|
19358
19358
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19411,7 +19411,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19411
19411
|
return false;
|
|
19412
19412
|
}, "knownRussianWord");
|
|
19413
19413
|
|
|
19414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19415
19415
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19416
19416
|
var MOST_WORDS = 128;
|
|
19417
19417
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19638,7 +19638,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19638
19638
|
return check3(tree);
|
|
19639
19639
|
}, "matchMeetingText");
|
|
19640
19640
|
|
|
19641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19642
19642
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19643
19643
|
throw new CliError("validation_error", message2);
|
|
19644
19644
|
}, "fail");
|
|
@@ -19815,7 +19815,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19815
19815
|
}
|
|
19816
19816
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19817
19817
|
|
|
19818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19819
19819
|
import { createHash as createHash5 } from "node:crypto";
|
|
19820
19820
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19821
19821
|
if (value === void 0)
|
|
@@ -19905,7 +19905,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
19905
19905
|
}
|
|
19906
19906
|
}), "meetingParticipantSearchOver");
|
|
19907
19907
|
|
|
19908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
19909
19909
|
var preparationQueries = {
|
|
19910
19910
|
participants: {
|
|
19911
19911
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -19955,7 +19955,7 @@ var preparationQueries = {
|
|
|
19955
19955
|
}
|
|
19956
19956
|
};
|
|
19957
19957
|
|
|
19958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
19959
19959
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19960
19960
|
async preparationContext(original) {
|
|
19961
19961
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -19996,7 +19996,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19996
19996
|
}
|
|
19997
19997
|
}), "meetingPreparationContextOver");
|
|
19998
19998
|
|
|
19999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
20000
20000
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
20001
20001
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
20002
20002
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20010,7 +20010,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20010
20010
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20011
20011
|
)`, "preparationSubjects");
|
|
20012
20012
|
|
|
20013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20014
20014
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20015
20015
|
async preparationKnowledge(original) {
|
|
20016
20016
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20055,7 +20055,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20055
20055
|
}
|
|
20056
20056
|
}), "meetingPreparationKnowledgeOver");
|
|
20057
20057
|
|
|
20058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20059
20059
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20060
20060
|
async preparationNotes(original) {
|
|
20061
20061
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20108,7 +20108,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20108
20108
|
}
|
|
20109
20109
|
}), "meetingPreparationNotesOver");
|
|
20110
20110
|
|
|
20111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20112
20112
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20113
20113
|
async relatedHistory(original) {
|
|
20114
20114
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20179,7 +20179,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20179
20179
|
}
|
|
20180
20180
|
}), "meetingRelatedHistoryOver");
|
|
20181
20181
|
|
|
20182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20183
20183
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20184
20184
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20185
20185
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20260,7 +20260,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20260
20260
|
}
|
|
20261
20261
|
}), "meetingReviewOver");
|
|
20262
20262
|
|
|
20263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20264
20264
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20265
20265
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20266
20266
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20314,7 +20314,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20314
20314
|
}
|
|
20315
20315
|
}), "meetingSeriesHistoryOver");
|
|
20316
20316
|
|
|
20317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20318
20318
|
var MOST_ROWS = 5e5;
|
|
20319
20319
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20320
20320
|
async meetingStats(input) {
|
|
@@ -20361,7 +20361,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20361
20361
|
}
|
|
20362
20362
|
}), "meetingStatsOver");
|
|
20363
20363
|
|
|
20364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20365
20365
|
var CURSOR_KEY = "meetings";
|
|
20366
20366
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20367
20367
|
id: Number(row2.id),
|
|
@@ -20913,7 +20913,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
20913
20913
|
};
|
|
20914
20914
|
}, "meetingStoreOver");
|
|
20915
20915
|
|
|
20916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
20917
20917
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
20918
20918
|
id: `email:${place.emailId}`,
|
|
20919
20919
|
chatId: place.threadExternalId,
|
|
@@ -21246,7 +21246,7 @@ var emailHitsByPk = /* @__PURE__ */ __name((database, pks) => {
|
|
|
21246
21246
|
];
|
|
21247
21247
|
});
|
|
21248
21248
|
}, "emailHitsByPk");
|
|
21249
|
-
var mailStoreOver = /* @__PURE__ */ __name(({ database, orm },
|
|
21249
|
+
var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = stemmerCache()) => ({
|
|
21250
21250
|
rules: mailRulesOver(database),
|
|
21251
21251
|
async saveThread(input) {
|
|
21252
21252
|
const id2 = write(database, () => saveThread(database, orm, input));
|
|
@@ -21368,7 +21368,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor = stem
|
|
|
21368
21368
|
markDeleted: /* @__PURE__ */ __name(async (accountId, externalIds, now2) => write(database, () => markEmailsDeleted(database, accountId, externalIds, now2)), "markDeleted"),
|
|
21369
21369
|
markRestored: /* @__PURE__ */ __name(async (accountId, externalIds, now2) => write(database, () => markEmailsRestored(database, accountId, externalIds, now2)), "markRestored"),
|
|
21370
21370
|
async chunksToEmbed(model, { after: after2, limit }) {
|
|
21371
|
-
drainEmailIndex(database,
|
|
21371
|
+
drainEmailIndex(database, stemmerFor2);
|
|
21372
21372
|
const file = database.prepare("SELECT text FROM attachments WHERE id = ?");
|
|
21373
21373
|
const threads = /* @__PURE__ */ new Map();
|
|
21374
21374
|
return database.prepare(`SELECT p.content_hash AS hash, min(p.type || ':' || p.owner) AS owner, p.position, p.start_offset AS start,
|
|
@@ -21390,7 +21390,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor = stem
|
|
|
21390
21390
|
});
|
|
21391
21391
|
},
|
|
21392
21392
|
async nearest(model, query, { accountId, limit, threadExternalId, since }) {
|
|
21393
|
-
drainEmailIndex(database,
|
|
21393
|
+
drainEmailIndex(database, stemmerFor2);
|
|
21394
21394
|
const page3 = database.prepare(`SELECT p.id, p.type, p.owner, p.position, p.email_id AS email, v.vector FROM ${MAIL_PIECES}
|
|
21395
21395
|
JOIN embeddings v ON v.model = ? AND v.content_hash = p.content_hash
|
|
21396
21396
|
WHERE p.id > ? AND p.account_id = ?
|
|
@@ -21453,7 +21453,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor = stem
|
|
|
21453
21453
|
if (match === null)
|
|
21454
21454
|
return [];
|
|
21455
21455
|
const [limit, offset] = page(filter);
|
|
21456
|
-
drainEmailIndex(database,
|
|
21456
|
+
drainEmailIndex(database, stemmerFor2);
|
|
21457
21457
|
const [where, params] = emailWhere({ ...filter, includeDeleted: false });
|
|
21458
21458
|
return database.prepare(`SELECT e.* FROM email_words w JOIN emails e ON e.id = w.rowid
|
|
21459
21459
|
WHERE email_words MATCH ? AND ${where}
|
|
@@ -21461,7 +21461,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor = stem
|
|
|
21461
21461
|
}
|
|
21462
21462
|
}), "mailStoreOver");
|
|
21463
21463
|
|
|
21464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21465
21465
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21466
21466
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21467
21467
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21551,7 +21551,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21551
21551
|
}, "knownWord");
|
|
21552
21552
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21553
21553
|
|
|
21554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21555
21555
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21556
21556
|
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");
|
|
21557
21557
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21637,7 +21637,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21637
21637
|
return found2;
|
|
21638
21638
|
}, "spokenTranscripts");
|
|
21639
21639
|
|
|
21640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21641
21641
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21642
21642
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21643
21643
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21684,7 +21684,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21684
21684
|
});
|
|
21685
21685
|
}, "placeHits");
|
|
21686
21686
|
|
|
21687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21688
21688
|
var MESSAGES2 = {
|
|
21689
21689
|
rows: "messages",
|
|
21690
21690
|
threads: "chats",
|
|
@@ -22146,7 +22146,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22146
22146
|
};
|
|
22147
22147
|
}, "runQuery");
|
|
22148
22148
|
|
|
22149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22150
22150
|
function invalidMetadata() {
|
|
22151
22151
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22152
22152
|
}
|
|
@@ -22248,7 +22248,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22248
22248
|
};
|
|
22249
22249
|
}), "counterTargets");
|
|
22250
22250
|
|
|
22251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22252
22252
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22253
22253
|
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,
|
|
22254
22254
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22367,7 +22367,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22367
22367
|
}));
|
|
22368
22368
|
}, "attachmentViews");
|
|
22369
22369
|
|
|
22370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22371
22371
|
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");
|
|
22372
22372
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22373
22373
|
const { orm, database, now: now2 } = context;
|
|
@@ -22405,7 +22405,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22405
22405
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22406
22406
|
}, "intoVoiceAttachment");
|
|
22407
22407
|
|
|
22408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22409
22409
|
var FIELDS = [
|
|
22410
22410
|
"threadExternalId",
|
|
22411
22411
|
"senderIdentityId",
|
|
@@ -22722,7 +22722,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22722
22722
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22723
22723
|
}, "writeDerivedReactions");
|
|
22724
22724
|
|
|
22725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
22726
22726
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
22727
22727
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
22728
22728
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -22748,7 +22748,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
22748
22748
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
22749
22749
|
}, "release");
|
|
22750
22750
|
|
|
22751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22752
22752
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22753
22753
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22754
22754
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22769,7 +22769,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22769
22769
|
};
|
|
22770
22770
|
}, "keysOver");
|
|
22771
22771
|
|
|
22772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22773
22773
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22774
22774
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22775
22775
|
if (!row2)
|
|
@@ -22804,7 +22804,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22804
22804
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22805
22805
|
}, "saveProfile");
|
|
22806
22806
|
|
|
22807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22808
22808
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22809
22809
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22810
22810
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -22840,7 +22840,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
22840
22840
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
22841
22841
|
}, "originOfActor");
|
|
22842
22842
|
|
|
22843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
22844
22844
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
22845
22845
|
const owner = ownerPerson(context.database).id;
|
|
22846
22846
|
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);
|
|
@@ -22861,7 +22861,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
22861
22861
|
return personOf(context, ref3);
|
|
22862
22862
|
}, "linkToOwner");
|
|
22863
22863
|
|
|
22864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
22865
22865
|
var PROVIDERS_SETTING = "providers";
|
|
22866
22866
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
22867
22867
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -22896,7 +22896,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
22896
22896
|
});
|
|
22897
22897
|
}, "registerProvider");
|
|
22898
22898
|
|
|
22899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
22900
22900
|
var DAY3 = 864e5;
|
|
22901
22901
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
22902
22902
|
var TEXT_LIMIT = 20;
|
|
@@ -22909,7 +22909,7 @@ var ABOUT_TASK = ["related-to", "evidence", "created-from"];
|
|
|
22909
22909
|
var PLACEHOLDER = /* @__PURE__ */ __name((row2) => `${String(row2.type)} \u2014 ${String(row2.source_locator ?? "")}`, "PLACEHOLDER");
|
|
22910
22910
|
var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
22911
22911
|
const { database, now: now2 } = context;
|
|
22912
|
-
const
|
|
22912
|
+
const stemmerFor2 = stemmerCache();
|
|
22913
22913
|
const MESSAGE = "SELECT m.id, m.text, m.sent_at, m.outgoing, p.id AS person, p.owner FROM messages m LEFT JOIN identity_links il ON il.identity_id = m.sender_identity_id LEFT JOIN persons p ON p.id = il.person_id";
|
|
22914
22914
|
const messageOf = /* @__PURE__ */ __name((row2) => {
|
|
22915
22915
|
const own = Number(row2.outgoing) === 1 || Number(row2.owner) === 1;
|
|
@@ -23017,7 +23017,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23017
23017
|
const row2 = id2 === void 0 ? void 0 : rowOf(id2);
|
|
23018
23018
|
if (!side || !row2)
|
|
23019
23019
|
throw new CliError("not_found", `no task ${other}`);
|
|
23020
|
-
const stemmer =
|
|
23020
|
+
const stemmer = stemmerFor2(storeStemmers(database) ?? DEFAULT_STEMMERS);
|
|
23021
23021
|
const one = linkedOf(side);
|
|
23022
23022
|
const otherSide = linkedOf(sideOf(row2));
|
|
23023
23023
|
const chain = chainOf(one);
|
|
@@ -23032,8 +23032,8 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23032
23032
|
if (!named2)
|
|
23033
23033
|
return [];
|
|
23034
23034
|
const side = linkedOf(named2);
|
|
23035
|
-
drainCorpus(database, CORPORA.task,
|
|
23036
|
-
const stemmer =
|
|
23035
|
+
drainCorpus(database, CORPORA.task, stemmerFor2);
|
|
23036
|
+
const stemmer = stemmerFor2(storeStemmers(database) ?? DEFAULT_STEMMERS);
|
|
23037
23037
|
const since = now2() - RECENTLY_CLOSED_MS;
|
|
23038
23038
|
const live2 = "t.project_id = ? AND t.deleted_at IS NULL AND t.id <> ? AND (t.status = 'open' OR t.closed_at >= ?)";
|
|
23039
23039
|
const scope3 = [side.project, side.row ?? -1, since];
|
|
@@ -23095,7 +23095,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23095
23095
|
};
|
|
23096
23096
|
}, "taskSimilarityOver");
|
|
23097
23097
|
|
|
23098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23099
23099
|
var SETTING3 = "taskCategories";
|
|
23100
23100
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23101
23101
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23114,7 +23114,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23114
23114
|
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);
|
|
23115
23115
|
}, "saveTaskCategories");
|
|
23116
23116
|
|
|
23117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23118
23118
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23119
23119
|
var ALLOWED = "taskAgentClose";
|
|
23120
23120
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23170,7 +23170,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23170
23170
|
];
|
|
23171
23171
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23172
23172
|
|
|
23173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23174
23174
|
import { randomBytes } from "node:crypto";
|
|
23175
23175
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23176
23176
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23183,7 +23183,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23183
23183
|
return time3 + random;
|
|
23184
23184
|
}, "ulid");
|
|
23185
23185
|
|
|
23186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23187
23187
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23188
23188
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23189
23189
|
if (!meta && !sections?.length)
|
|
@@ -23204,7 +23204,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23204
23204
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23205
23205
|
}, "languageOf");
|
|
23206
23206
|
|
|
23207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23208
23208
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23209
23209
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23210
23210
|
if (isObject(value))
|
|
@@ -23447,7 +23447,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23447
23447
|
};
|
|
23448
23448
|
}, "filesStoreOver");
|
|
23449
23449
|
|
|
23450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23451
23451
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23452
23452
|
entity: "document",
|
|
23453
23453
|
backend: "sql",
|
|
@@ -23493,7 +23493,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23493
23493
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23494
23494
|
}, "importedDocumentWhere");
|
|
23495
23495
|
|
|
23496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23497
23497
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23498
23498
|
var iso = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23499
23499
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso(value), "optionalIso");
|
|
@@ -24003,7 +24003,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24003
24003
|
};
|
|
24004
24004
|
}, "notesStoreOver");
|
|
24005
24005
|
|
|
24006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24007
24007
|
var NAMED = "SELECT m.*, b.name AS author_name FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
|
|
24008
24008
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24009
24009
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24035,7 +24035,7 @@ var linkEvidence = /* @__PURE__ */ __name((context, from2, references, author) =
|
|
|
24035
24035
|
var evidenceOf = /* @__PURE__ */ __name((context, from2) => context.database.prepare(`SELECT to_type, to_id FROM links WHERE from_type = ? AND from_id = ? AND kind = ${linkKind("evidence")} AND to_id IS NOT NULL ORDER BY id`).all(from2.type, from2.id).flatMap((row2) => referenceOfThing(context.database, storedThing(row2.to_type, row2.to_id)) ?? []), "evidenceOf");
|
|
24036
24036
|
var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
24037
24037
|
const { database, now: now2 } = context;
|
|
24038
|
-
const
|
|
24038
|
+
const stemmerFor2 = stemmerCache();
|
|
24039
24039
|
const memoryOf = /* @__PURE__ */ __name((row2) => ({
|
|
24040
24040
|
id: String(row2.id),
|
|
24041
24041
|
ref: `memory:${row2.id}`,
|
|
@@ -24108,7 +24108,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24108
24108
|
markStale: /* @__PURE__ */ __name(async (reference2) => setStatus(reference2, "stale", false), "markStale"),
|
|
24109
24109
|
search: /* @__PURE__ */ __name(async (text5, { subject: subjectRef, scope: scope3, limit = 20 } = {}) => {
|
|
24110
24110
|
const subject2 = subjectRef === void 0 ? void 0 : requiredThing(database, subjectRef);
|
|
24111
|
-
drainCorpus(database, CORPORA.memory,
|
|
24111
|
+
drainCorpus(database, CORPORA.memory, stemmerFor2);
|
|
24112
24112
|
const words3 = normalize(text5).split(/\s+/).filter((word) => /[\p{L}\p{N}]/u.test(word));
|
|
24113
24113
|
if (words3.length === 0)
|
|
24114
24114
|
throw new CliError("validation_error", "say what to find in the memories");
|
|
@@ -24119,7 +24119,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24119
24119
|
};
|
|
24120
24120
|
}, "memoriesStoreOver");
|
|
24121
24121
|
|
|
24122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24123
24123
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24124
24124
|
var KEY = "taskFirstPassPerChat";
|
|
24125
24125
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24139,7 +24139,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24139
24139
|
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);
|
|
24140
24140
|
}, "saveFirstPassPerChat");
|
|
24141
24141
|
|
|
24142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24143
24143
|
var TASK_RELATION_KINDS = [
|
|
24144
24144
|
"blocked-by",
|
|
24145
24145
|
"follow-up-of",
|
|
@@ -24269,7 +24269,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24269
24269
|
};
|
|
24270
24270
|
}, "taskRelationsStoreOver");
|
|
24271
24271
|
|
|
24272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24273
24273
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24274
24274
|
var TASK_EVENT_KINDS = [
|
|
24275
24275
|
"created",
|
|
@@ -24556,7 +24556,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
24556
24556
|
};
|
|
24557
24557
|
}, "workTasksOver");
|
|
24558
24558
|
|
|
24559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
24560
24560
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
24561
24561
|
const { database, now: now2 } = context;
|
|
24562
24562
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -24602,7 +24602,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
24602
24602
|
};
|
|
24603
24603
|
}, "taskCloseOver");
|
|
24604
24604
|
|
|
24605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
24606
24606
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
24607
24607
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
24608
24608
|
const { database, now: now2 } = context;
|
|
@@ -24821,7 +24821,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
24821
24821
|
};
|
|
24822
24822
|
}, "taskPairsOver");
|
|
24823
24823
|
|
|
24824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
24825
24825
|
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";
|
|
24826
24826
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
24827
24827
|
const { database, now: now2 } = context;
|
|
@@ -25016,7 +25016,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25016
25016
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25017
25017
|
}, "oneOf");
|
|
25018
25018
|
|
|
25019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25020
25020
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25021
25021
|
const { database } = context;
|
|
25022
25022
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25061,7 +25061,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25061
25061
|
};
|
|
25062
25062
|
}, "accountsStoreOver");
|
|
25063
25063
|
|
|
25064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25065
25065
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25066
25066
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25067
25067
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25085,7 +25085,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25085
25085
|
})), "keepDownloads");
|
|
25086
25086
|
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");
|
|
25087
25087
|
|
|
25088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25089
25089
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25090
25090
|
const { database } = context;
|
|
25091
25091
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25142,7 +25142,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25142
25142
|
}, "keepAttachmentText")
|
|
25143
25143
|
}), "attachmentsStoreOver");
|
|
25144
25144
|
|
|
25145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25146
25146
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25147
25147
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25148
25148
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25322,7 +25322,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25322
25322
|
return done;
|
|
25323
25323
|
}, "rekeyChats");
|
|
25324
25324
|
|
|
25325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25326
25326
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25327
25327
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25328
25328
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25354,7 +25354,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25354
25354
|
});
|
|
25355
25355
|
}, "chatCompleteness");
|
|
25356
25356
|
|
|
25357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25358
25358
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25359
25359
|
const { database } = context;
|
|
25360
25360
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -25438,6 +25438,13 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25438
25438
|
const row2 = context.database.prepare("SELECT kind FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId);
|
|
25439
25439
|
return row2 ? String(row2.kind) : void 0;
|
|
25440
25440
|
}, "chatKind"),
|
|
25441
|
+
chatTitle: /* @__PURE__ */ __name(async (key2, chatId) => {
|
|
25442
|
+
const accountKey = findAccountPk2(key2);
|
|
25443
|
+
if (accountKey === void 0)
|
|
25444
|
+
return null;
|
|
25445
|
+
const row2 = context.database.prepare("SELECT title FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId);
|
|
25446
|
+
return row2?.title == null ? null : String(row2.title);
|
|
25447
|
+
}, "chatTitle"),
|
|
25441
25448
|
chatActivity: /* @__PURE__ */ __name(async (key2, since, where) => {
|
|
25442
25449
|
const accountKey = findAccountPk2(key2);
|
|
25443
25450
|
return accountKey === void 0 ? { chats: [], storedAt: null } : chatActivity(context, accountKey, since, where);
|
|
@@ -25454,7 +25461,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25454
25461
|
};
|
|
25455
25462
|
}, "chatsStoreOver");
|
|
25456
25463
|
|
|
25457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
25458
25465
|
import { createHash as createHash6 } from "node:crypto";
|
|
25459
25466
|
var BATCH_CONTEXT = 50;
|
|
25460
25467
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -25592,7 +25599,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
25592
25599
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
25593
25600
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
25594
25601
|
|
|
25595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
25596
25603
|
import { setTimeout } from "node:timers/promises";
|
|
25597
25604
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
25598
25605
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -25904,7 +25911,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
25904
25911
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
25905
25912
|
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");
|
|
25906
25913
|
|
|
25907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
25908
25915
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25909
25916
|
const { database } = context;
|
|
25910
25917
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26011,7 +26018,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26011
26018
|
};
|
|
26012
26019
|
}, "conversationsStoreOver");
|
|
26013
26020
|
|
|
26014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26015
26022
|
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";
|
|
26016
26023
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26017
26024
|
const { database } = context;
|
|
@@ -26036,7 +26043,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26036
26043
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26037
26044
|
}), "countersStoreOver");
|
|
26038
26045
|
|
|
26039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26040
26047
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26041
26048
|
var MENTION_QUERY = defineQuery({
|
|
26042
26049
|
entity: "mention",
|
|
@@ -26252,7 +26259,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26252
26259
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26253
26260
|
}, "listPlaces");
|
|
26254
26261
|
|
|
26255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26256
26263
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26257
26264
|
const { database } = context;
|
|
26258
26265
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26287,7 +26294,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26287
26294
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26288
26295
|
}), "mentionsStoreOver");
|
|
26289
26296
|
|
|
26290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26291
26298
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26292
26299
|
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");
|
|
26293
26300
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26302,7 +26309,52 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26302
26309
|
}));
|
|
26303
26310
|
}, "documentLinkMessages");
|
|
26304
26311
|
|
|
26305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26313
|
+
var stemmerFor = stemmerCache();
|
|
26314
|
+
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26315
|
+
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
26316
|
+
throw new CliError("validation_error", "a follow-up lookup takes at most 50 messages and 1\u2013100 results each");
|
|
26317
|
+
const { database } = context;
|
|
26318
|
+
const stemmers = storeStemmers(database);
|
|
26319
|
+
if (!wanted.length || !stemmers || !stemsState(database)?.ready)
|
|
26320
|
+
return wanted.map(() => []);
|
|
26321
|
+
const stemmer = stemmerFor(stemmers);
|
|
26322
|
+
database.exec("CREATE VIRTUAL TABLE IF NOT EXISTS temp.message_stem_counts USING fts5vocab(main, message_stems, col)");
|
|
26323
|
+
const count = database.prepare("SELECT doc FROM temp.message_stem_counts WHERE term = ? AND col = 'stems'");
|
|
26324
|
+
const counts = /* @__PURE__ */ new Map();
|
|
26325
|
+
const countOf = /* @__PURE__ */ __name((stem) => {
|
|
26326
|
+
let found2 = counts.get(stem);
|
|
26327
|
+
if (found2 === void 0) {
|
|
26328
|
+
found2 = Number(count.get(stem)?.doc ?? 0);
|
|
26329
|
+
counts.set(stem, found2);
|
|
26330
|
+
}
|
|
26331
|
+
return found2;
|
|
26332
|
+
}, "countOf");
|
|
26333
|
+
const message2 = database.prepare(`
|
|
26334
|
+
SELECT m.text, m.sent_at FROM accounts ac
|
|
26335
|
+
JOIN chats c ON c.account_id = ac.id AND c.external_id = ?
|
|
26336
|
+
JOIN messages m ON m.chat_id = c.id AND m.external_id = ?
|
|
26337
|
+
WHERE ac.provider = ? AND ac.external_id = ? AND m.deleted_at IS NULL
|
|
26338
|
+
`);
|
|
26339
|
+
const later = database.prepare(`
|
|
26340
|
+
SELECT m.id FROM message_stems s JOIN messages m ON m.id = s.rowid
|
|
26341
|
+
WHERE message_stems MATCH ? AND m.deleted_at IS NULL AND m.sent_at > ?
|
|
26342
|
+
ORDER BY m.sent_at DESC, m.id DESC LIMIT ?
|
|
26343
|
+
`);
|
|
26344
|
+
return wanted.map(({ account, chatId, id: id2 }) => {
|
|
26345
|
+
const row2 = message2.get(chatId, id2, account.provider, account.account);
|
|
26346
|
+
if (!row2)
|
|
26347
|
+
return [];
|
|
26348
|
+
const stems = new Set(stemmer.explain(String(row2.text)).filter(({ word }) => new RegExp("^\\p{L}{3,}$", "u").test(word)).map(({ word }) => stemmer.stemToken(word)).filter(Boolean));
|
|
26349
|
+
const rare = [...stems].filter((stem) => countOf(stem) <= rareAt);
|
|
26350
|
+
if (!rare.length)
|
|
26351
|
+
return [];
|
|
26352
|
+
const match = `stems : (${rare.map((stem) => `"${stem.replaceAll('"', '""')}"`).join(" OR ")})`;
|
|
26353
|
+
return hitsByPk(context, later.all(match, Number(row2.sent_at), limit).map((one) => Number(one.id)));
|
|
26354
|
+
});
|
|
26355
|
+
}, "laterSharingRare");
|
|
26356
|
+
|
|
26357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26306
26358
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26307
26359
|
const { database } = context;
|
|
26308
26360
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -26433,10 +26485,11 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26433
26485
|
...keyed,
|
|
26434
26486
|
search: /* @__PURE__ */ __name(async (query, { limit, account }) => find(context, { text: query, limit, ...account ? { account } : {} }), "search"),
|
|
26435
26487
|
find: /* @__PURE__ */ __name(async (filter) => find(context, filter), "find"),
|
|
26436
|
-
directReplies: /* @__PURE__ */ __name(async (parents, limit) => directReplies(context, parents, limit), "directReplies")
|
|
26488
|
+
directReplies: /* @__PURE__ */ __name(async (parents, limit) => directReplies(context, parents, limit), "directReplies"),
|
|
26489
|
+
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
26437
26490
|
}), "messagesStoreOver");
|
|
26438
26491
|
|
|
26439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
26440
26493
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
26441
26494
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
26442
26495
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -26493,7 +26546,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
26493
26546
|
});
|
|
26494
26547
|
}, "personPreparation");
|
|
26495
26548
|
|
|
26496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
26497
26550
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
26498
26551
|
const id2 = Number(uid);
|
|
26499
26552
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -26501,7 +26554,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
26501
26554
|
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)));
|
|
26502
26555
|
}, "personSeenInAccounts");
|
|
26503
26556
|
|
|
26504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
26505
26558
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
26506
26559
|
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);
|
|
26507
26560
|
if (!row2)
|
|
@@ -26567,7 +26620,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
26567
26620
|
return { id: id2, personId, removed: true };
|
|
26568
26621
|
}, "removeNote");
|
|
26569
26622
|
|
|
26570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
26571
26624
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
26572
26625
|
const { database } = context;
|
|
26573
26626
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -26642,13 +26695,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
26642
26695
|
};
|
|
26643
26696
|
}, "peopleStoreOver");
|
|
26644
26697
|
|
|
26645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
26646
26699
|
import { createHash as createHash8 } from "node:crypto";
|
|
26647
26700
|
|
|
26648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26649
26702
|
import { createHash as createHash7 } from "node:crypto";
|
|
26650
26703
|
|
|
26651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
26652
26705
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
26653
26706
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
26654
26707
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -26870,7 +26923,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
26870
26923
|
};
|
|
26871
26924
|
}, "rankReplyGraph");
|
|
26872
26925
|
|
|
26873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26874
26927
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
26875
26928
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
26876
26929
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27044,7 +27097,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27044
27097
|
return { items, evidence, summary, graph: graph.quality };
|
|
27045
27098
|
}, "calculateAdminStatistics");
|
|
27046
27099
|
|
|
27047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27048
27101
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27049
27102
|
const dates = [];
|
|
27050
27103
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27066,7 +27119,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27066
27119
|
return dates[0].node.resolution.date;
|
|
27067
27120
|
}, "rankingContextRange");
|
|
27068
27121
|
|
|
27069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27070
27123
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27071
27124
|
let counts;
|
|
27072
27125
|
try {
|
|
@@ -27361,7 +27414,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27361
27414
|
});
|
|
27362
27415
|
}, "rankQuery");
|
|
27363
27416
|
|
|
27364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27365
27418
|
function fail4(message2, reason = "query.too-large") {
|
|
27366
27419
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27367
27420
|
}
|
|
@@ -27538,7 +27591,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
27538
27591
|
return result;
|
|
27539
27592
|
}), "adminStatisticsQuery");
|
|
27540
27593
|
|
|
27541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
27542
27595
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
27543
27596
|
if (!execution.accounts.length)
|
|
27544
27597
|
return { conversations: [], chats: [] };
|
|
@@ -27556,7 +27609,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
27556
27609
|
return { conversations: conversations2, chats: chats2 };
|
|
27557
27610
|
}, "conversationEligibility");
|
|
27558
27611
|
|
|
27559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
27560
27613
|
import { createHash as createHash9 } from "node:crypto";
|
|
27561
27614
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
27562
27615
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -27706,11 +27759,11 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
27706
27759
|
return result;
|
|
27707
27760
|
}, "rankingEvidence");
|
|
27708
27761
|
|
|
27709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27710
|
-
var queriesStoreOver = /* @__PURE__ */ __name((context,
|
|
27762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
27763
|
+
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
27711
27764
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
27712
27765
|
if (execution.corpus === "mail")
|
|
27713
|
-
drainEmailIndex(context.database,
|
|
27766
|
+
drainEmailIndex(context.database, stemmerFor2);
|
|
27714
27767
|
return execution;
|
|
27715
27768
|
}, "mailIndexed");
|
|
27716
27769
|
return {
|
|
@@ -27723,7 +27776,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor) => {
|
|
|
27723
27776
|
};
|
|
27724
27777
|
}, "queriesStoreOver");
|
|
27725
27778
|
|
|
27726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
27727
27780
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
27728
27781
|
const { database, now: now2 } = context;
|
|
27729
27782
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -27762,10 +27815,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
27762
27815
|
}));
|
|
27763
27816
|
}, "chatEventsOf");
|
|
27764
27817
|
|
|
27765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27766
27819
|
import { createHash as createHash10 } from "node:crypto";
|
|
27767
27820
|
|
|
27768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
27769
27822
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
27770
27823
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
27771
27824
|
timeZone: zone,
|
|
@@ -27780,7 +27833,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
27780
27833
|
};
|
|
27781
27834
|
}, "calendarKey");
|
|
27782
27835
|
|
|
27783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
27784
27837
|
var RETENTION_TOLERANCE = 864e5;
|
|
27785
27838
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
27786
27839
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -27834,7 +27887,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
27834
27887
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
27835
27888
|
}, "retentionCohorts");
|
|
27836
27889
|
|
|
27837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27838
27891
|
var iso5 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
27839
27892
|
var week = /* @__PURE__ */ __name((day) => {
|
|
27840
27893
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -27970,7 +28023,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
27970
28023
|
};
|
|
27971
28024
|
}, "retentionQuery");
|
|
27972
28025
|
|
|
27973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
27974
28027
|
var iso6 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
27975
28028
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
27976
28029
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28101,7 +28154,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28101
28154
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28102
28155
|
})), "trackedChats");
|
|
28103
28156
|
|
|
28104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28105
28158
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28106
28159
|
const { database } = context;
|
|
28107
28160
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28157,7 +28210,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28157
28210
|
};
|
|
28158
28211
|
}, "rosterStoreOver");
|
|
28159
28212
|
|
|
28160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28161
28214
|
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");
|
|
28162
28215
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28163
28216
|
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 ?`);
|
|
@@ -28181,7 +28234,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28181
28234
|
}
|
|
28182
28235
|
}, "backfillNormalized");
|
|
28183
28236
|
|
|
28184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28185
28238
|
var INDEX2 = "message_words";
|
|
28186
28239
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28187
28240
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28308,7 +28361,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28308
28361
|
});
|
|
28309
28362
|
}, "resetSearchIndex");
|
|
28310
28363
|
|
|
28311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28312
28365
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28313
28366
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28314
28367
|
const before2 = stemsState(database);
|
|
@@ -28403,7 +28456,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
28403
28456
|
return resetStems(database, { now: now2 });
|
|
28404
28457
|
}, "followDefaultStemmers");
|
|
28405
28458
|
|
|
28406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
28407
28460
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
28408
28461
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
28409
28462
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -28425,10 +28478,10 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
28425
28478
|
});
|
|
28426
28479
|
}, "termCandidates");
|
|
28427
28480
|
|
|
28428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
28429
28482
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28430
28483
|
const { database } = context;
|
|
28431
|
-
const
|
|
28484
|
+
const stemmerFor2 = stemmerCache();
|
|
28432
28485
|
return {
|
|
28433
28486
|
knownTerms: /* @__PURE__ */ __name(async (terms2) => knownTerms(context, terms2), "knownTerms"),
|
|
28434
28487
|
termCandidates: /* @__PURE__ */ __name(async (trigrams2, lengths) => termCandidates(context, trigrams2, lengths), "termCandidates"),
|
|
@@ -28439,7 +28492,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28439
28492
|
const filled2 = fillStems(database, { now: context.now, ...until ? { until } : {} });
|
|
28440
28493
|
const transcripts = corpusIndexState(database, CORPORA.transcript);
|
|
28441
28494
|
if (transcripts.wanted !== null && (transcripts.pending > 0 || transcripts.built !== transcripts.wanted))
|
|
28442
|
-
drainCorpus(database, CORPORA.transcript,
|
|
28495
|
+
drainCorpus(database, CORPORA.transcript, stemmerFor2, until ? { until } : {});
|
|
28443
28496
|
return filled2;
|
|
28444
28497
|
}, "fillStems"),
|
|
28445
28498
|
stemmers: /* @__PURE__ */ __name(async () => savedStemmers(database), "stemmers"),
|
|
@@ -28447,7 +28500,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28447
28500
|
};
|
|
28448
28501
|
}, "searchIndexStoreOver");
|
|
28449
28502
|
|
|
28450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
28451
28504
|
var HISTORY_KEPT = 1e3;
|
|
28452
28505
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
28453
28506
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -28516,7 +28569,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
28516
28569
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
28517
28570
|
}, "clearHistory");
|
|
28518
28571
|
|
|
28519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
28520
28573
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28521
28574
|
const { database } = context;
|
|
28522
28575
|
return {
|
|
@@ -28540,7 +28593,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28540
28593
|
};
|
|
28541
28594
|
}, "searchesStoreOver");
|
|
28542
28595
|
|
|
28543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28596
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
28544
28597
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
28545
28598
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
28546
28599
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -28583,7 +28636,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
28583
28636
|
};
|
|
28584
28637
|
}, "agentActionsStoreOver");
|
|
28585
28638
|
|
|
28586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
28587
28640
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
28588
28641
|
}) => {
|
|
28589
28642
|
const { database, now: now2 } = context;
|
|
@@ -28642,7 +28695,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
28642
28695
|
};
|
|
28643
28696
|
}, "botUpdateStoreOver");
|
|
28644
28697
|
|
|
28645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
28646
28699
|
var DAY4 = 864e5;
|
|
28647
28700
|
var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
28648
28701
|
const clauses = ["e.deleted_at IS NULL"];
|
|
@@ -28722,7 +28775,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
28722
28775
|
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);
|
|
28723
28776
|
}, "listEvents");
|
|
28724
28777
|
|
|
28725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
28726
28779
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
28727
28780
|
id: Number(row2.id),
|
|
28728
28781
|
accountId: Number(row2.account_id),
|
|
@@ -29302,7 +29355,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29302
29355
|
};
|
|
29303
29356
|
}, "eventStoreOver");
|
|
29304
29357
|
|
|
29305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29306
29359
|
var CATALOG_QUERY = defineQuery({
|
|
29307
29360
|
entity: "document",
|
|
29308
29361
|
backend: "sql",
|
|
@@ -29544,7 +29597,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29544
29597
|
};
|
|
29545
29598
|
}, "catalogStoreOver");
|
|
29546
29599
|
|
|
29547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29548
29601
|
import { createHash as createHash11 } from "node:crypto";
|
|
29549
29602
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29550
29603
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29642,7 +29695,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29642
29695
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29643
29696
|
}, "contextEvidenceRequest");
|
|
29644
29697
|
|
|
29645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
29646
29699
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
29647
29700
|
var field2 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
29648
29701
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -29655,7 +29708,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
29655
29708
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
29656
29709
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field2("sourceUrl")})`;
|
|
29657
29710
|
|
|
29658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
29659
29712
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
29660
29713
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
29661
29714
|
signal?.throwIfAborted();
|
|
@@ -29754,7 +29807,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
29754
29807
|
});
|
|
29755
29808
|
}, "readMeetingContextEvidence");
|
|
29756
29809
|
|
|
29757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
29758
29811
|
var corpora = {
|
|
29759
29812
|
message: {
|
|
29760
29813
|
table: "messages",
|
|
@@ -29941,12 +29994,12 @@ var contextEvidenceOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29941
29994
|
});
|
|
29942
29995
|
}
|
|
29943
29996
|
}), "contextEvidenceOver");
|
|
29944
|
-
var contextIndexOver = /* @__PURE__ */ __name(({ database },
|
|
29997
|
+
var contextIndexOver = /* @__PURE__ */ __name(({ database }, stemmerFor2) => ({
|
|
29945
29998
|
async catchUp({ kinds: kinds2, signal }) {
|
|
29946
29999
|
signal?.throwIfAborted();
|
|
29947
|
-
const mail = kinds2.includes("mail") ? drainEmailIndex(database,
|
|
30000
|
+
const mail = kinds2.includes("mail") ? drainEmailIndex(database, stemmerFor2) : 0;
|
|
29948
30001
|
signal?.throwIfAborted();
|
|
29949
|
-
const documents2 = kinds2.includes("document") ? drainNoteIndex(database,
|
|
30002
|
+
const documents2 = kinds2.includes("document") ? drainNoteIndex(database, stemmerFor2) : 0;
|
|
29950
30003
|
return { mail, documents: documents2 };
|
|
29951
30004
|
}
|
|
29952
30005
|
}), "contextIndexOver");
|
|
@@ -29983,7 +30036,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29983
30036
|
}
|
|
29984
30037
|
}), "contextRecordsOver");
|
|
29985
30038
|
|
|
29986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
29987
30040
|
var NOTE_FIELDS = [
|
|
29988
30041
|
"text",
|
|
29989
30042
|
"exact",
|
|
@@ -30011,7 +30064,7 @@ var CORPORA2 = [
|
|
|
30011
30064
|
type: "document",
|
|
30012
30065
|
noun: "note",
|
|
30013
30066
|
fields: NOTE_FIELDS,
|
|
30014
|
-
view:
|
|
30067
|
+
view: `(SELECT n.id, n.account_id AS folder_id, n.external_id AS path, n.title, coalesce(n.body, '') AS text, n.metadata, ${contextDocumentTime} AS at, n.deleted_at FROM documents n)`,
|
|
30015
30068
|
words: "document_words",
|
|
30016
30069
|
stems: "document_stems",
|
|
30017
30070
|
live: "coalesce(json_extract(n.metadata, '$.catalog.active'), 1)=1",
|
|
@@ -30031,7 +30084,13 @@ var CORPORA2 = [
|
|
|
30031
30084
|
var searchNotes = /* @__PURE__ */ __name((context, query) => {
|
|
30032
30085
|
const offset = query.offset ?? 0;
|
|
30033
30086
|
const chosen = CORPORA2.filter(({ type }) => (query.source === void 0 || query.source === "file" === (type === "document")) && (!query.folderIds?.length || query.withInternal === true || type === "document"));
|
|
30034
|
-
const
|
|
30087
|
+
const idsOf = /* @__PURE__ */ __name((type) => query.refs?.flatMap((ref3) => ref3.startsWith(`${type}:`) ? [Number(ref3.slice(type.length + 1))] : []), "idsOf");
|
|
30088
|
+
const rows = chosen.flatMap((corpus) => {
|
|
30089
|
+
const ids = idsOf(corpus.type);
|
|
30090
|
+
if (ids?.length === 0)
|
|
30091
|
+
return [];
|
|
30092
|
+
return searchCorpus(context, { ...query, ...query.folderIds ? { accountIds: query.folderIds } : {}, ...ids ? { ids } : {} }, corpus);
|
|
30093
|
+
});
|
|
30035
30094
|
const exactFirst = rows.some((row2) => row2.exact !== void 0);
|
|
30036
30095
|
rows.sort((a, b) => query.newest ? (b.at ?? 0) - (a.at ?? 0) || a.id - b.id : (exactFirst ? Number(b.exact === true) - Number(a.exact === true) : 0) || Number(a.relevance === null) - Number(b.relevance === null) || (a.relevance ?? 0) - (b.relevance ?? 0) || (b.at ?? 0) - (a.at ?? 0) || a.id - b.id);
|
|
30037
30096
|
const read2 = {
|
|
@@ -30046,7 +30105,8 @@ var searchNotes = /* @__PURE__ */ __name((context, query) => {
|
|
|
30046
30105
|
ref: note2.ref,
|
|
30047
30106
|
note: note2,
|
|
30048
30107
|
relevance: row2.relevance,
|
|
30049
|
-
...row2.exact === void 0 ? {} : { exact: row2.exact }
|
|
30108
|
+
...row2.exact === void 0 ? {} : { exact: row2.exact },
|
|
30109
|
+
at: new Date(row2.at ?? 0).toISOString()
|
|
30050
30110
|
};
|
|
30051
30111
|
}),
|
|
30052
30112
|
hasMore: rows.length > offset + query.limit
|
|
@@ -30192,7 +30252,8 @@ var searchCorpus = /* @__PURE__ */ __name((context, query, corpus) => {
|
|
|
30192
30252
|
const scope3 = combine2([
|
|
30193
30253
|
bound3("n.deleted_at IS NULL"),
|
|
30194
30254
|
...corpus.live ? [bound3(corpus.live)] : [],
|
|
30195
|
-
...query.accountIds?.length && corpus.inAccounts ? [corpus.inAccounts(JSON.stringify(query.accountIds))] : []
|
|
30255
|
+
...query.accountIds?.length && corpus.inAccounts ? [corpus.inAccounts(JSON.stringify(query.accountIds))] : [],
|
|
30256
|
+
...query.ids ? [bound3("n.id IN (SELECT value FROM json_each(?))", JSON.stringify(query.ids))] : []
|
|
30196
30257
|
], "AND");
|
|
30197
30258
|
const where = combine2([scope3, expression], "AND");
|
|
30198
30259
|
const ranking = query.newest ? void 0 : required3(query.root, stemmed ? "stems" : "fts");
|
|
@@ -30248,8 +30309,8 @@ var SCAN_PAGE3 = 5e3;
|
|
|
30248
30309
|
var LIVE2 = "((k.chunkable_type = 'document' AND EXISTS (SELECT 1 FROM documents d WHERE d.id = k.chunkable_id AND d.deleted_at IS NULL AND coalesce(json_extract(d.metadata, '$.catalog.active'), 1)=1 AND (? IS NULL OR d.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))))) OR (k.chunkable_type = 'note' AND ? IS NULL AND EXISTS (SELECT 1 FROM notes n WHERE n.id = k.chunkable_id AND n.deleted_at IS NULL)))";
|
|
30249
30310
|
var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
30250
30311
|
const { database } = context;
|
|
30251
|
-
const
|
|
30252
|
-
const drain = /* @__PURE__ */ __name(() => drainNoteIndex(database,
|
|
30312
|
+
const stemmerFor2 = stemmerCache();
|
|
30313
|
+
const drain = /* @__PURE__ */ __name(() => drainNoteIndex(database, stemmerFor2), "drain");
|
|
30253
30314
|
const read2 = /* @__PURE__ */ __name((type, id2) => {
|
|
30254
30315
|
const row2 = database.prepare(`SELECT * FROM ${type === "document" ? "documents" : "notes"} WHERE id = ?`).get(id2);
|
|
30255
30316
|
return row2 ? type === "document" ? documentOf(row2) : noteOf(row2) : void 0;
|
|
@@ -30372,7 +30433,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30372
30433
|
};
|
|
30373
30434
|
}, "noteSearchOver");
|
|
30374
30435
|
|
|
30375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
30376
30437
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
30377
30438
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
30378
30439
|
var EVENT_CORPUS = {
|
|
@@ -30392,8 +30453,8 @@ var EVENT_CORPUS = {
|
|
|
30392
30453
|
var SCAN_PAGE4 = 5e3;
|
|
30393
30454
|
var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
30394
30455
|
const { database } = context;
|
|
30395
|
-
const
|
|
30396
|
-
const drain = /* @__PURE__ */ __name(() => drainCorpus(database, CORPORA.event,
|
|
30456
|
+
const stemmerFor2 = stemmerCache();
|
|
30457
|
+
const drain = /* @__PURE__ */ __name(() => drainCorpus(database, CORPORA.event, stemmerFor2), "drain");
|
|
30397
30458
|
const live2 = /* @__PURE__ */ __name((accountIds) => {
|
|
30398
30459
|
const sql2 = ` AND k.chunkable_type = 'event' AND EXISTS (SELECT 1 FROM events e WHERE e.id = k.chunkable_id AND ${EVENT_LIVE})`;
|
|
30399
30460
|
return accountIds?.length ? { sql: `${sql2} AND ${inEventAccounts("k.chunkable_id")}`, params: [JSON.stringify(accountIds)] } : { sql: sql2, params: [] };
|
|
@@ -30504,7 +30565,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30504
30565
|
};
|
|
30505
30566
|
}, "eventSearchOver");
|
|
30506
30567
|
|
|
30507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
30508
30569
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
30509
30570
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
30510
30571
|
if (/^document:[1-9]\d*$/.test(raw))
|
|
@@ -30517,7 +30578,7 @@ var reference = /* @__PURE__ */ __name((raw) => {
|
|
|
30517
30578
|
}, "reference");
|
|
30518
30579
|
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "evidence findings", singular: "evidence finding", cited: "reference", reference }), "validateEvidenceFindings");
|
|
30519
30580
|
|
|
30520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
30521
30582
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
30522
30583
|
try {
|
|
30523
30584
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -30529,7 +30590,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
30529
30590
|
}
|
|
30530
30591
|
}, "calendarMoment");
|
|
30531
30592
|
|
|
30532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
30533
30594
|
var NAMED3 = "SELECT f.*, b.name AS author_name FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
30534
30595
|
var iso7 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30535
30596
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30642,7 +30703,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30642
30703
|
};
|
|
30643
30704
|
}, "factsStoreOver");
|
|
30644
30705
|
|
|
30645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
30646
30707
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
30647
30708
|
throw new CliError("validation_error", message2);
|
|
30648
30709
|
}, "invalid");
|
|
@@ -30732,7 +30793,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
30732
30793
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
30733
30794
|
}, "findingsCoreOver");
|
|
30734
30795
|
|
|
30735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
30736
30797
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
30737
30798
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
30738
30799
|
var iso8 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30878,7 +30939,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30878
30939
|
};
|
|
30879
30940
|
}, "proposedActionsStoreOver");
|
|
30880
30941
|
|
|
30881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
30882
30943
|
var stale = /* @__PURE__ */ __name(() => {
|
|
30883
30944
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
30884
30945
|
reason: "evidence-findings.stale"
|
|
@@ -31044,7 +31105,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31044
31105
|
};
|
|
31045
31106
|
}, "evidenceFindingsStoreOver");
|
|
31046
31107
|
|
|
31047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31048
31109
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31049
31110
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31050
31111
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31097,7 +31158,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31097
31158
|
}, "forPerson")
|
|
31098
31159
|
}), "involvementStoreOver");
|
|
31099
31160
|
|
|
31100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31101
31162
|
import { createHash as createHash12 } from "node:crypto";
|
|
31102
31163
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31103
31164
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31183,16 +31244,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31183
31244
|
};
|
|
31184
31245
|
}, "meetingProjectsStoreOver");
|
|
31185
31246
|
|
|
31186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31187
31248
|
import { createHash as createHash15 } from "node:crypto";
|
|
31188
31249
|
|
|
31189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31190
31251
|
import { createHash as createHash14 } from "node:crypto";
|
|
31191
31252
|
|
|
31192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31193
31254
|
import { createHash as createHash13 } from "node:crypto";
|
|
31194
31255
|
|
|
31195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31196
31257
|
var consolidationId = /* @__PURE__ */ __name((value, field3) => {
|
|
31197
31258
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31198
31259
|
throw new CliError("validation_error", `${field3} must be a positive canonical tag id`);
|
|
@@ -31243,7 +31304,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31243
31304
|
return input;
|
|
31244
31305
|
}, "consolidationApplyInput");
|
|
31245
31306
|
|
|
31246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31247
31308
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31248
31309
|
id: String(row2.id),
|
|
31249
31310
|
sourceId: String(row2.source_id),
|
|
@@ -31318,7 +31379,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
31318
31379
|
}, { beforeCommit: check3 });
|
|
31319
31380
|
}, "applyTagConsolidation");
|
|
31320
31381
|
|
|
31321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31322
31383
|
var selections = [
|
|
31323
31384
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
31324
31385
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -31462,7 +31523,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
31462
31523
|
};
|
|
31463
31524
|
}, "previewRows");
|
|
31464
31525
|
|
|
31465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31466
31527
|
var kinds = ["project", "tag", "topic"];
|
|
31467
31528
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
31468
31529
|
if (signal?.aborted)
|
|
@@ -31726,7 +31787,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31726
31787
|
};
|
|
31727
31788
|
}, "vocabularyStoreOver");
|
|
31728
31789
|
|
|
31729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
31730
31791
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
31731
31792
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
31732
31793
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32248,7 +32309,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32248
32309
|
return key2.padEnd(3, "X");
|
|
32249
32310
|
}, "projectKey");
|
|
32250
32311
|
|
|
32251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32252
32313
|
var DAY5 = 864e5;
|
|
32253
32314
|
var SETTING4 = "logs_pruned_at";
|
|
32254
32315
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -32275,7 +32336,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32275
32336
|
};
|
|
32276
32337
|
}, "logPruner");
|
|
32277
32338
|
|
|
32278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32279
32340
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32280
32341
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32281
32342
|
reason: "meeting-findings.stale"
|
|
@@ -32444,7 +32505,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32444
32505
|
};
|
|
32445
32506
|
}, "meetingFindingsStoreOver");
|
|
32446
32507
|
|
|
32447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
32448
32509
|
var RANK_BATCH = 512;
|
|
32449
32510
|
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";
|
|
32450
32511
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -32715,7 +32776,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32715
32776
|
}
|
|
32716
32777
|
}), "meetingVectorsOver");
|
|
32717
32778
|
|
|
32718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
32719
32780
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
32720
32781
|
var TEXTS = {
|
|
32721
32782
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -32816,11 +32877,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32816
32877
|
};
|
|
32817
32878
|
}, "sourceMentionStoreOver");
|
|
32818
32879
|
|
|
32819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
32820
32881
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
32821
32882
|
import { dirname } from "node:path";
|
|
32822
32883
|
|
|
32823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
32824
32885
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
32825
32886
|
var CLIENTS_SETTING = "clients";
|
|
32826
32887
|
var coreVersion = (() => {
|
|
@@ -32878,7 +32939,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
32878
32939
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
32879
32940
|
}, "refusalAdvice");
|
|
32880
32941
|
|
|
32881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
32882
32943
|
var GENERATED = [
|
|
32883
32944
|
{
|
|
32884
32945
|
"name": "20261010184427_initial",
|
|
@@ -33744,7 +33805,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
33744
33805
|
}
|
|
33745
33806
|
];
|
|
33746
33807
|
|
|
33747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
33748
33809
|
var MANIFEST = [
|
|
33749
33810
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
33750
33811
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -33822,7 +33883,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
33822
33883
|
return migrations;
|
|
33823
33884
|
}, "generatedMigrations");
|
|
33824
33885
|
|
|
33825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
33826
33887
|
var MIGRATIONS = generatedMigrations();
|
|
33827
33888
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
33828
33889
|
version INTEGER PRIMARY KEY,
|
|
@@ -33875,7 +33936,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
33875
33936
|
}
|
|
33876
33937
|
}, "migrate");
|
|
33877
33938
|
|
|
33878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
33879
33940
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
33880
33941
|
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 ?");
|
|
33881
33942
|
if (pending.get(0, 1) === void 0)
|
|
@@ -33897,7 +33958,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
33897
33958
|
}
|
|
33898
33959
|
}, "fillJoinKeys");
|
|
33899
33960
|
|
|
33900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
33901
33962
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
33902
33963
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
33903
33964
|
try {
|
|
@@ -33910,8 +33971,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
33910
33971
|
}, "openSqlite");
|
|
33911
33972
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33912
33973
|
quietSqliteWarning();
|
|
33913
|
-
const { drizzle } = await import("./node-
|
|
33914
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
33974
|
+
const { drizzle } = await import("./node-CYM7VXFR.js");
|
|
33975
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-RK4MHW57.js");
|
|
33915
33976
|
const client = await nodeClient(path, { readOnly });
|
|
33916
33977
|
try {
|
|
33917
33978
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33921,8 +33982,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33921
33982
|
}
|
|
33922
33983
|
}, "openUnderNode");
|
|
33923
33984
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33924
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
33925
|
-
const { drizzle } = await import("./bun-
|
|
33985
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-6LUE7UA6.js");
|
|
33986
|
+
const { drizzle } = await import("./bun-LZUEW2ML.js");
|
|
33926
33987
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
33927
33988
|
try {
|
|
33928
33989
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33932,7 +33993,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33932
33993
|
}
|
|
33933
33994
|
}, "openUnderBun");
|
|
33934
33995
|
|
|
33935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
33936
33997
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
33937
33998
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
33938
33999
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -33947,7 +34008,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
33947
34008
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
33948
34009
|
}, "assertReadCompatible");
|
|
33949
34010
|
|
|
33950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33951
34012
|
var BACKFILL_ON_OPEN = 5e3;
|
|
33952
34013
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
33953
34014
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34003,13 +34064,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34003
34064
|
}
|
|
34004
34065
|
}, "openStoreContext");
|
|
34005
34066
|
|
|
34006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34007
34068
|
import { createHash as createHash17 } from "node:crypto";
|
|
34008
34069
|
|
|
34009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34010
34071
|
import { createHash as createHash16 } from "node:crypto";
|
|
34011
34072
|
|
|
34012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34013
34074
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34014
34075
|
var ref = text3(2048);
|
|
34015
34076
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34075,7 +34136,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34075
34136
|
}))
|
|
34076
34137
|
});
|
|
34077
34138
|
|
|
34078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34079
34140
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34080
34141
|
var invalid5 = /* @__PURE__ */ __name((field3) => {
|
|
34081
34142
|
throw new CliError("validation_error", `invalid project annotations.${field3}`);
|
|
@@ -34208,7 +34269,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34208
34269
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
34209
34270
|
}, "projectAnnotationsFingerprint");
|
|
34210
34271
|
|
|
34211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34212
34273
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34213
34274
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34214
34275
|
var targetSchema = strictObject({
|
|
@@ -34315,7 +34376,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
34315
34376
|
}, "planBoundProjectAnnotations");
|
|
34316
34377
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
34317
34378
|
|
|
34318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
34319
34380
|
import { createHash as createHash18 } from "node:crypto";
|
|
34320
34381
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34321
34382
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34409,7 +34470,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34409
34470
|
})).digest("hex");
|
|
34410
34471
|
}, "projectAnnotationSnapshotFingerprint");
|
|
34411
34472
|
|
|
34412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
34413
34474
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
34414
34475
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
34415
34476
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -34426,7 +34487,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
34426
34487
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
34427
34488
|
}, "projectAnnotationRequest");
|
|
34428
34489
|
|
|
34429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
34430
34491
|
var SnapshotBudget = class {
|
|
34431
34492
|
static {
|
|
34432
34493
|
__name(this, "SnapshotBudget");
|
|
@@ -34452,13 +34513,13 @@ var SnapshotBudget = class {
|
|
|
34452
34513
|
}
|
|
34453
34514
|
};
|
|
34454
34515
|
|
|
34455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34456
34517
|
import { createHash as createHash20 } from "node:crypto";
|
|
34457
34518
|
|
|
34458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
34459
34520
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
34460
34521
|
|
|
34461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
34462
34523
|
import { createHash as createHash19 } from "node:crypto";
|
|
34463
34524
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
34464
34525
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -34601,7 +34662,7 @@ var ProjectSnapshotSources = class {
|
|
|
34601
34662
|
}
|
|
34602
34663
|
};
|
|
34603
34664
|
|
|
34604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
34605
34666
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
34606
34667
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
34607
34668
|
}, "unsupported");
|
|
@@ -34772,7 +34833,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
|
|
|
34772
34833
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
34773
34834
|
}), "projectAnnotationSnapshot");
|
|
34774
34835
|
|
|
34775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34776
34837
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, manifest, bindings, budget) => read(database, () => {
|
|
34777
34838
|
const current = projectAnnotationSnapshot(database, projectId, budget).snapshot;
|
|
34778
34839
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -34834,7 +34895,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
|
|
|
34834
34895
|
};
|
|
34835
34896
|
}), "previewAnnotationSnapshot");
|
|
34836
34897
|
|
|
34837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
34838
34899
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snapshot2, bindings) => {
|
|
34839
34900
|
const mappings = { ...bindings };
|
|
34840
34901
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -34876,7 +34937,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
|
|
|
34876
34937
|
return mappings;
|
|
34877
34938
|
}, "restoreAnnotationRecords");
|
|
34878
34939
|
|
|
34879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
34880
34941
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34881
34942
|
async preview(request) {
|
|
34882
34943
|
const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request);
|
|
@@ -34906,7 +34967,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34906
34967
|
}
|
|
34907
34968
|
}), "projectAnnotationStoreOver");
|
|
34908
34969
|
|
|
34909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
34910
34971
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
34911
34972
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
34912
34973
|
let merged = { from: from2, to };
|
|
@@ -34919,7 +34980,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
34919
34980
|
}, "markRange");
|
|
34920
34981
|
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");
|
|
34921
34982
|
|
|
34922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
34923
34984
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
34924
34985
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
34925
34986
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -34929,7 +34990,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
34929
34990
|
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);
|
|
34930
34991
|
}, "setTaskRulesStop");
|
|
34931
34992
|
|
|
34932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
34933
34994
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34934
34995
|
const { database } = context;
|
|
34935
34996
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -34985,7 +35046,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34985
35046
|
};
|
|
34986
35047
|
}, "syncStoreOver");
|
|
34987
35048
|
|
|
34988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
34989
35050
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34990
35051
|
const { database } = context;
|
|
34991
35052
|
return {
|
|
@@ -35007,7 +35068,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35007
35068
|
};
|
|
35008
35069
|
}, "tagsStoreOver");
|
|
35009
35070
|
|
|
35010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35011
35072
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35012
35073
|
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
|
|
35013
35074
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35134,7 +35195,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35134
35195
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35135
35196
|
}, "savePictureChunks");
|
|
35136
35197
|
|
|
35137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35138
35199
|
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,
|
|
35139
35200
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35140
35201
|
FROM messages m
|
|
@@ -35217,7 +35278,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35217
35278
|
return plain2(best(found2));
|
|
35218
35279
|
}, "nearestMessages");
|
|
35219
35280
|
|
|
35220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35221
35282
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35222
35283
|
const { database } = context;
|
|
35223
35284
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -35471,7 +35532,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
35471
35532
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
35472
35533
|
}), "vectorsStoreOver");
|
|
35473
35534
|
|
|
35474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
35475
35536
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
35476
35537
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
35477
35538
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -35559,10 +35620,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
35559
35620
|
}
|
|
35560
35621
|
}, "lastBackup");
|
|
35561
35622
|
|
|
35562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
35563
35624
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
35564
35625
|
|
|
35565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
35566
35627
|
var COUNTED_TABLES = [
|
|
35567
35628
|
"accounts",
|
|
35568
35629
|
"chats",
|
|
@@ -35647,7 +35708,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
35647
35708
|
};
|
|
35648
35709
|
}, "storeContents");
|
|
35649
35710
|
|
|
35650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.496.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_dcbd09250bc4763d29eff57ceeaf10b7/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
35651
35712
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
35652
35713
|
const context = await openStoreContext(options);
|
|
35653
35714
|
try {
|
|
@@ -35670,10 +35731,10 @@ var areaOf = /* @__PURE__ */ __name((keyed, whole) => once3(() => {
|
|
|
35670
35731
|
}), "areaOf");
|
|
35671
35732
|
var storeOver = /* @__PURE__ */ __name((context) => {
|
|
35672
35733
|
const { database } = context;
|
|
35673
|
-
const
|
|
35734
|
+
const stemmerFor2 = stemmerCache();
|
|
35674
35735
|
const pruneLogsWhenDue = logPruner(database, context.now);
|
|
35675
35736
|
const own = /* @__PURE__ */ __name((keyed) => ({ ...keyed }), "own");
|
|
35676
|
-
const mail = once3(() => mailStoreOver(context,
|
|
35737
|
+
const mail = once3(() => mailStoreOver(context, stemmerFor2));
|
|
35677
35738
|
const areas = {
|
|
35678
35739
|
accounts: areaOf(() => accountAccountsOver(context), (keyed) => accountsStoreOver(context, keyed)),
|
|
35679
35740
|
chats: areaOf(() => chatsStoreOver(context), own),
|
|
@@ -35690,10 +35751,10 @@ var storeOver = /* @__PURE__ */ __name((context) => {
|
|
|
35690
35751
|
};
|
|
35691
35752
|
const contextEvidence = once3(() => contextEvidenceOver(context));
|
|
35692
35753
|
const projectAnnotations = once3(() => projectAnnotationStoreOver(context));
|
|
35693
|
-
const contextIndex = once3(() => contextIndexOver(context,
|
|
35754
|
+
const contextIndex = once3(() => contextIndexOver(context, stemmerFor2));
|
|
35694
35755
|
const contextRecords = once3(() => contextRecordsOver(context));
|
|
35695
35756
|
const searches2 = once3(() => searchesStoreOver(context));
|
|
35696
|
-
const queries = once3(() => queriesStoreOver(context,
|
|
35757
|
+
const queries = once3(() => queriesStoreOver(context, stemmerFor2));
|
|
35697
35758
|
const searchIndex2 = once3(() => searchIndexStoreOver(context));
|
|
35698
35759
|
const botUpdates2 = once3(() => botUpdateStoreOver(context, pruneLogsWhenDue));
|
|
35699
35760
|
const involvements2 = once3(() => involvementStoreOver(context));
|