@wirecat/drive-cli 0.49.0 → 0.50.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-WQTVOCIS.js} +8 -8
- package/dist/bundle/{anthropic-R354D7GT.js → anthropic-YCA2AWIJ.js} +5 -5
- package/dist/bundle/{app-server-3YHJ757G.js → app-server-ZQOYUQJH.js} +52 -52
- package/dist/bundle/{bun-JVDJVDHL.js → bun-5NFIDHGM.js} +2 -2
- package/dist/bundle/{bun-sqlite-KZCZWSRZ.js → bun-sqlite-OAQE4M2E.js} +4 -4
- package/dist/bundle/{chunk-2BADVV4A.js → chunk-24TOKSZE.js} +2 -2
- package/dist/bundle/{chunk-CCLDCM7J.js → chunk-2M5XEGVE.js} +290 -208
- package/dist/bundle/{chunk-HBYE4EP2.js → chunk-3CQNJKJT.js} +1 -1
- package/dist/bundle/{chunk-MC77UZVA.js → chunk-3HNUH632.js} +6 -6
- package/dist/bundle/{chunk-U77RLMOK.js → chunk-3XX52F42.js} +2 -2
- package/dist/bundle/{chunk-5KR7BKDV.js → chunk-4J7UGHPK.js} +5 -5
- package/dist/bundle/{chunk-IRDGH7DV.js → chunk-4OLWMHS6.js} +3 -3
- package/dist/bundle/{chunk-7WEISHFA.js → chunk-4SSUKRO4.js} +2 -2
- package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-4VLUX3V5.js} +1 -1
- package/dist/bundle/{chunk-W5EUHV3J.js → chunk-53UWCVSU.js} +1 -1
- package/dist/bundle/{chunk-PPXNEHYX.js → chunk-5OMLYNYB.js} +8 -8
- package/dist/bundle/{chunk-NXFEZQDL.js → chunk-5WN7JHQE.js} +26 -26
- package/dist/bundle/{chunk-FB7I5JWC.js → chunk-5Z63NTC7.js} +6 -6
- package/dist/bundle/{chunk-2ZFR67KY.js → chunk-5ZJHQ4TN.js} +2 -2
- package/dist/bundle/{chunk-75VCGSNB.js → chunk-652YTDT5.js} +15 -15
- package/dist/bundle/{chunk-YYMHFXHK.js → chunk-6DDXB5WB.js} +2 -2
- package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-6E4PFCQ4.js} +1 -1
- package/dist/bundle/{chunk-P4NOTS3U.js → chunk-7SYSC7KX.js} +2 -2
- package/dist/bundle/{chunk-6Z3W7LTD.js → chunk-AO3NCZNT.js} +8 -8
- package/dist/bundle/{chunk-LF7ACSTK.js → chunk-BUALWXBT.js} +1 -1
- package/dist/bundle/{chunk-FZQSGLHU.js → chunk-C4PNAHI4.js} +11 -11
- package/dist/bundle/{chunk-XVXXWNAA.js → chunk-CCEVICWU.js} +4 -4
- package/dist/bundle/{chunk-Y2AUB4TJ.js → chunk-CEUEXMIR.js} +80 -33
- package/dist/bundle/{chunk-254VYUWN.js → chunk-CTIQ77AB.js} +17 -17
- package/dist/bundle/{chunk-JZ3SUK2M.js → chunk-DTHWL5YU.js} +5 -5
- package/dist/bundle/{chunk-JMOX454R.js → chunk-E656DAZT.js} +1 -1
- package/dist/bundle/{chunk-KKZYZ32J.js → chunk-EXYEDKTX.js} +2 -2
- package/dist/bundle/{chunk-BJ3JRO34.js → chunk-EY4CUQW2.js} +7 -7
- package/dist/bundle/{chunk-YOF5BC4G.js → chunk-FABKIQ24.js} +2 -2
- package/dist/bundle/{chunk-QEM3MOSB.js → chunk-FSAM4Y2S.js} +8 -8
- package/dist/bundle/{chunk-R2QRP7EJ.js → chunk-G75FZQAZ.js} +13 -9
- package/dist/bundle/{chunk-VHT2WI4I.js → chunk-HGWMX7BM.js} +101 -73
- package/dist/bundle/{chunk-45TPBTR3.js → chunk-HURI56SB.js} +21 -21
- package/dist/bundle/{chunk-624B6G64.js → chunk-IA6LNKCF.js} +5 -5
- package/dist/bundle/{chunk-ITZI7T2X.js → chunk-IFM2APQB.js} +2 -2
- package/dist/bundle/{chunk-AN7HENGZ.js → chunk-IGG4RBIZ.js} +108 -96
- package/dist/bundle/{chunk-FUJZ5S2Q.js → chunk-INVF3GXW.js} +10 -10
- package/dist/bundle/{chunk-R235IRSJ.js → chunk-IUZ4PT2V.js} +2 -2
- package/dist/bundle/{chunk-3UHJC6HH.js → chunk-JA2YY7D4.js} +7 -7
- package/dist/bundle/{chunk-7BA3HL7N.js → chunk-JHBX53SK.js} +35 -35
- package/dist/bundle/{chunk-RAAI3JLI.js → chunk-JSMPSOEM.js} +3 -3
- package/dist/bundle/{chunk-HVM5LS5Z.js → chunk-KEQ35HQQ.js} +3 -3
- package/dist/bundle/{chunk-HIAO4MPA.js → chunk-KYMGVMOS.js} +1 -1
- package/dist/bundle/{chunk-467AQO7E.js → chunk-KZEOWOZV.js} +7 -7
- package/dist/bundle/{chunk-KYJYOZYG.js → chunk-LNWRRK2H.js} +6 -6
- package/dist/bundle/{chunk-P7INAZIT.js → chunk-M2D4FXKY.js} +5 -5
- package/dist/bundle/{chunk-SSD2V4HR.js → chunk-M6FQOGUW.js} +279 -258
- package/dist/bundle/{chunk-5ISHP4TK.js → chunk-MMOG7ZVF.js} +2 -2
- package/dist/bundle/{chunk-KK3BA4IS.js → chunk-NHRJW3PH.js} +2 -2
- package/dist/bundle/{chunk-MFS52LTZ.js → chunk-OKSS7YUN.js} +1 -1
- package/dist/bundle/{chunk-E2Y6GJZX.js → chunk-OL22OOIW.js} +4 -4
- package/dist/bundle/{chunk-DKJGYYCP.js → chunk-OQEBGY74.js} +46 -46
- package/dist/bundle/{chunk-MAXN7COO.js → chunk-P3T2SZW2.js} +1 -1
- package/dist/bundle/{chunk-NFU3OBCC.js → chunk-P6VN5UB4.js} +4 -4
- package/dist/bundle/{chunk-A3FU4RR6.js → chunk-PNUS224S.js} +4 -4
- package/dist/bundle/{chunk-L5RZI2M5.js → chunk-POD2GHQB.js} +19 -19
- package/dist/bundle/{chunk-46X7Z4FD.js → chunk-Q27HCATD.js} +324 -278
- package/dist/bundle/{chunk-HQ2PGEOK.js → chunk-Q3VG3UYV.js} +11 -11
- package/dist/bundle/{chunk-JMRHDZMV.js → chunk-QBECV7NO.js} +33 -32
- package/dist/bundle/{chunk-EOZPMJJP.js → chunk-QNLD7Y6Z.js} +7 -7
- package/dist/bundle/{chunk-NVHB2MHX.js → chunk-QSDXVUJG.js} +4 -4
- package/dist/bundle/{chunk-ABVFH76X.js → chunk-QY3LK3OT.js} +5 -5
- package/dist/bundle/{chunk-BQV3WYXW.js → chunk-R7XMCREL.js} +31 -21
- package/dist/bundle/{chunk-463NMG57.js → chunk-RTIMGPLN.js} +3 -3
- package/dist/bundle/{chunk-CB5NGX6E.js → chunk-T7UZHKAS.js} +2 -2
- package/dist/bundle/{chunk-4ORK4UAY.js → chunk-TATRMMOG.js} +3 -3
- package/dist/bundle/{chunk-MP2UCK3Z.js → chunk-UVPKSZSC.js} +4 -4
- package/dist/bundle/{chunk-IEAZAPC3.js → chunk-VAETCXRI.js} +42 -17
- package/dist/bundle/{chunk-P4OU3OVF.js → chunk-VAK2Q2XG.js} +14 -14
- package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-XEETGCOC.js} +1 -1
- package/dist/bundle/{chunk-IRNX4CO5.js → chunk-XGJUEH5C.js} +27 -27
- package/dist/bundle/{chunk-VAGF723Z.js → chunk-Y73IZWRI.js} +1 -1
- package/dist/bundle/{chunk-2DLAJGRN.js → chunk-YOABRW2M.js} +1 -1
- package/dist/bundle/{chunk-65AW2AEQ.js → chunk-YROVFHPJ.js} +2 -2
- package/dist/bundle/{chunk-HD3TFIT4.js → chunk-Z54E5LKF.js} +6 -6
- package/dist/bundle/{chunk-W5IDHD6C.js → chunk-ZJBRKR42.js} +27 -27
- package/dist/bundle/{chunk-22LTNYO2.js → chunk-ZKGYW63J.js} +9 -9
- package/dist/bundle/{chunk-2CKGGIWF.js → chunk-ZP735UUT.js} +3 -3
- package/dist/bundle/{chunk-HF2T7E67.js → chunk-ZXD2I5ZQ.js} +49 -49
- package/dist/bundle/command-contract-TAWVO2G3.js +38 -0
- package/dist/bundle/{decode-BE3VDYTJ.js → decode-YZRTP54O.js} +4 -4
- package/dist/bundle/drive.js +7 -7
- package/dist/bundle/{echarts-4OQHS575.js → echarts-C6HUK2FL.js} +2 -2
- package/dist/bundle/{embed-QR76SJDI.js → embed-QRQ7ITFC.js} +5 -5
- package/dist/bundle/{embedder-EMIDKBYV.js → embedder-EZDB3JPA.js} +8 -8
- package/dist/bundle/{entry-FE4REJDO.js → entry-4WQQKSYG.js} +6 -6
- package/dist/bundle/failure-EEJGMWEP.js +37 -0
- package/dist/bundle/{first-run-ALPI62PX.js → first-run-ZAS4OV3T.js} +9 -9
- package/dist/bundle/first-screen-6ICWD2N3.js +36 -0
- package/dist/bundle/{google-NV75VSCD.js → google-KNILTIDW.js} +9 -9
- package/dist/bundle/google-api-CZACYX5T.js +82 -0
- package/dist/bundle/{identity-NZ7SP6OL.js → identity-VBCGUXT5.js} +2 -2
- package/dist/bundle/{instructions-3QZBKKPF.js → instructions-II4M2WL3.js} +1 -1
- package/dist/bundle/{login-KNBM6XUX.js → login-4JACQVMD.js} +62 -62
- package/dist/bundle/mcp-2BR2EX7L.js +95 -0
- package/dist/bundle/{mcp-XY2FGGUM.js → mcp-6ZIAWU3N.js} +76 -76
- package/dist/bundle/{mcp-OQBZXELQ.js → mcp-ZYZ4DFW2.js} +2 -2
- package/dist/bundle/{node-R2BLYUSB.js → node-LIN7L4VQ.js} +2 -2
- package/dist/bundle/{node-sqlite-PMRVP442.js → node-sqlite-VAH4KZN3.js} +4 -4
- package/dist/bundle/{oauth-NM2AKRRT.js → oauth-QUE3VCTU.js} +6 -6
- package/dist/bundle/{open-XZH5ZNDA.js → open-DQ3EVYPB.js} +3 -3
- package/dist/bundle/{process-IX5YWGDP.js → process-46XDWPVW.js} +1 -1
- package/dist/bundle/{program-MDWQHGBY.js → program-X3CZ4XDN.js} +93 -86
- package/dist/bundle/{prompt-5K6XGWSK.js → prompt-SAZYCZV3.js} +4 -4
- package/dist/bundle/{reasons-GF2TYGX6.js → reasons-366PI7OV.js} +3 -3
- package/dist/bundle/{recognize-U7GDD6T2.js → recognize-SSBOHOTW.js} +3 -3
- package/dist/bundle/{remote-ZWXOGNQX.js → remote-EL3FWCQE.js} +6 -6
- package/dist/bundle/{rerank-YRQBCS63.js → rerank-RPIQRJIW.js} +6 -6
- package/dist/bundle/{serve-6PQ7K5RK.js → serve-AX44DIKK.js} +8 -8
- package/dist/bundle/server-DCJIGUW2.js +56 -0
- package/dist/bundle/server-WWQSQBFT.js +69 -0
- package/dist/bundle/{services-QBIQX236.js → services-K4UOEMQD.js} +28 -28
- package/dist/bundle/{sqlite-runtime-7Q5UD2VR.js → sqlite-runtime-N7N3EYGH.js} +4 -4
- package/dist/bundle/{state-U72TC26L.js → state-C3S5FD7V.js} +5 -5
- package/dist/bundle/{store-B4RAJ63G.js → store-4N3NBUGX.js} +14 -14
- package/dist/bundle/{store-FYABCSIH.js → store-QV4ZNEQ3.js} +16 -16
- package/dist/bundle/store-maintenance-command-QL4AECBD.js +57 -0
- package/dist/bundle/tokens-Y7HCOXOA.js +103 -0
- 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/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-VDZZ46RT.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-3XX52F42.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-KZEOWOZV.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-Z54E5LKF.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-OQEBGY74.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-AO3NCZNT.js";
|
|
108
108
|
import {
|
|
109
109
|
DEFAULT_TASK_CATEGORIES,
|
|
110
110
|
sharedConfigPath,
|
|
111
111
|
storedTaskCategories,
|
|
112
112
|
taskCategoriesReader
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-5Z63NTC7.js";
|
|
114
114
|
import {
|
|
115
115
|
storePath
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-YROVFHPJ.js";
|
|
117
117
|
import {
|
|
118
118
|
PRAGMAS,
|
|
119
119
|
quietSqliteWarning,
|
|
120
120
|
storeCapable
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-LNWRRK2H.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-KYMGVMOS.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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/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);
|
|
@@ -25454,7 +25454,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25454
25454
|
};
|
|
25455
25455
|
}, "chatsStoreOver");
|
|
25456
25456
|
|
|
25457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
25458
25458
|
import { createHash as createHash6 } from "node:crypto";
|
|
25459
25459
|
var BATCH_CONTEXT = 50;
|
|
25460
25460
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -25592,7 +25592,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
25592
25592
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
25593
25593
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
25594
25594
|
|
|
25595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
25596
25596
|
import { setTimeout } from "node:timers/promises";
|
|
25597
25597
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
25598
25598
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -25904,7 +25904,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
25904
25904
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
25905
25905
|
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
25906
|
|
|
25907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
25908
25908
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25909
25909
|
const { database } = context;
|
|
25910
25910
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26011,7 +26011,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26011
26011
|
};
|
|
26012
26012
|
}, "conversationsStoreOver");
|
|
26013
26013
|
|
|
26014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26015
26015
|
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
26016
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26017
26017
|
const { database } = context;
|
|
@@ -26036,7 +26036,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26036
26036
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26037
26037
|
}), "countersStoreOver");
|
|
26038
26038
|
|
|
26039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26040
26040
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26041
26041
|
var MENTION_QUERY = defineQuery({
|
|
26042
26042
|
entity: "mention",
|
|
@@ -26252,7 +26252,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26252
26252
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26253
26253
|
}, "listPlaces");
|
|
26254
26254
|
|
|
26255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26256
26256
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26257
26257
|
const { database } = context;
|
|
26258
26258
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26287,7 +26287,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26287
26287
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26288
26288
|
}), "mentionsStoreOver");
|
|
26289
26289
|
|
|
26290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26291
26291
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26292
26292
|
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
26293
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26302,7 +26302,52 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26302
26302
|
}));
|
|
26303
26303
|
}, "documentLinkMessages");
|
|
26304
26304
|
|
|
26305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26306
|
+
var stemmerFor = stemmerCache();
|
|
26307
|
+
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26308
|
+
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
26309
|
+
throw new CliError("validation_error", "a follow-up lookup takes at most 50 messages and 1\u2013100 results each");
|
|
26310
|
+
const { database } = context;
|
|
26311
|
+
const stemmers = storeStemmers(database);
|
|
26312
|
+
if (!wanted.length || !stemmers || !stemsState(database)?.ready)
|
|
26313
|
+
return wanted.map(() => []);
|
|
26314
|
+
const stemmer = stemmerFor(stemmers);
|
|
26315
|
+
database.exec("CREATE VIRTUAL TABLE IF NOT EXISTS temp.message_stem_counts USING fts5vocab(main, message_stems, col)");
|
|
26316
|
+
const count = database.prepare("SELECT doc FROM temp.message_stem_counts WHERE term = ? AND col = 'stems'");
|
|
26317
|
+
const counts = /* @__PURE__ */ new Map();
|
|
26318
|
+
const countOf = /* @__PURE__ */ __name((stem) => {
|
|
26319
|
+
let found2 = counts.get(stem);
|
|
26320
|
+
if (found2 === void 0) {
|
|
26321
|
+
found2 = Number(count.get(stem)?.doc ?? 0);
|
|
26322
|
+
counts.set(stem, found2);
|
|
26323
|
+
}
|
|
26324
|
+
return found2;
|
|
26325
|
+
}, "countOf");
|
|
26326
|
+
const message2 = database.prepare(`
|
|
26327
|
+
SELECT m.text, m.sent_at FROM accounts ac
|
|
26328
|
+
JOIN chats c ON c.account_id = ac.id AND c.external_id = ?
|
|
26329
|
+
JOIN messages m ON m.chat_id = c.id AND m.external_id = ?
|
|
26330
|
+
WHERE ac.provider = ? AND ac.external_id = ? AND m.deleted_at IS NULL
|
|
26331
|
+
`);
|
|
26332
|
+
const later = database.prepare(`
|
|
26333
|
+
SELECT m.id FROM message_stems s JOIN messages m ON m.id = s.rowid
|
|
26334
|
+
WHERE message_stems MATCH ? AND m.deleted_at IS NULL AND m.sent_at > ?
|
|
26335
|
+
ORDER BY m.sent_at DESC, m.id DESC LIMIT ?
|
|
26336
|
+
`);
|
|
26337
|
+
return wanted.map(({ account, chatId, id: id2 }) => {
|
|
26338
|
+
const row2 = message2.get(chatId, id2, account.provider, account.account);
|
|
26339
|
+
if (!row2)
|
|
26340
|
+
return [];
|
|
26341
|
+
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));
|
|
26342
|
+
const rare = [...stems].filter((stem) => countOf(stem) <= rareAt);
|
|
26343
|
+
if (!rare.length)
|
|
26344
|
+
return [];
|
|
26345
|
+
const match = `stems : (${rare.map((stem) => `"${stem.replaceAll('"', '""')}"`).join(" OR ")})`;
|
|
26346
|
+
return hitsByPk(context, later.all(match, Number(row2.sent_at), limit).map((one) => Number(one.id)));
|
|
26347
|
+
});
|
|
26348
|
+
}, "laterSharingRare");
|
|
26349
|
+
|
|
26350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26306
26351
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26307
26352
|
const { database } = context;
|
|
26308
26353
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -26433,10 +26478,11 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26433
26478
|
...keyed,
|
|
26434
26479
|
search: /* @__PURE__ */ __name(async (query, { limit, account }) => find(context, { text: query, limit, ...account ? { account } : {} }), "search"),
|
|
26435
26480
|
find: /* @__PURE__ */ __name(async (filter) => find(context, filter), "find"),
|
|
26436
|
-
directReplies: /* @__PURE__ */ __name(async (parents, limit) => directReplies(context, parents, limit), "directReplies")
|
|
26481
|
+
directReplies: /* @__PURE__ */ __name(async (parents, limit) => directReplies(context, parents, limit), "directReplies"),
|
|
26482
|
+
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
26437
26483
|
}), "messagesStoreOver");
|
|
26438
26484
|
|
|
26439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
26440
26486
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
26441
26487
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
26442
26488
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -26493,7 +26539,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
26493
26539
|
});
|
|
26494
26540
|
}, "personPreparation");
|
|
26495
26541
|
|
|
26496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
26497
26543
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
26498
26544
|
const id2 = Number(uid);
|
|
26499
26545
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -26501,7 +26547,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
26501
26547
|
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
26548
|
}, "personSeenInAccounts");
|
|
26503
26549
|
|
|
26504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
26505
26551
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
26506
26552
|
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
26553
|
if (!row2)
|
|
@@ -26567,7 +26613,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
26567
26613
|
return { id: id2, personId, removed: true };
|
|
26568
26614
|
}, "removeNote");
|
|
26569
26615
|
|
|
26570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
26571
26617
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
26572
26618
|
const { database } = context;
|
|
26573
26619
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -26642,13 +26688,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
26642
26688
|
};
|
|
26643
26689
|
}, "peopleStoreOver");
|
|
26644
26690
|
|
|
26645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
26646
26692
|
import { createHash as createHash8 } from "node:crypto";
|
|
26647
26693
|
|
|
26648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26649
26695
|
import { createHash as createHash7 } from "node:crypto";
|
|
26650
26696
|
|
|
26651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
26652
26698
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
26653
26699
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
26654
26700
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -26870,7 +26916,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
26870
26916
|
};
|
|
26871
26917
|
}, "rankReplyGraph");
|
|
26872
26918
|
|
|
26873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26874
26920
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
26875
26921
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
26876
26922
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27044,7 +27090,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27044
27090
|
return { items, evidence, summary, graph: graph.quality };
|
|
27045
27091
|
}, "calculateAdminStatistics");
|
|
27046
27092
|
|
|
27047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27048
27094
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27049
27095
|
const dates = [];
|
|
27050
27096
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27066,7 +27112,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27066
27112
|
return dates[0].node.resolution.date;
|
|
27067
27113
|
}, "rankingContextRange");
|
|
27068
27114
|
|
|
27069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27070
27116
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27071
27117
|
let counts;
|
|
27072
27118
|
try {
|
|
@@ -27361,7 +27407,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27361
27407
|
});
|
|
27362
27408
|
}, "rankQuery");
|
|
27363
27409
|
|
|
27364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27365
27411
|
function fail4(message2, reason = "query.too-large") {
|
|
27366
27412
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27367
27413
|
}
|
|
@@ -27538,7 +27584,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
27538
27584
|
return result;
|
|
27539
27585
|
}), "adminStatisticsQuery");
|
|
27540
27586
|
|
|
27541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
27542
27588
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
27543
27589
|
if (!execution.accounts.length)
|
|
27544
27590
|
return { conversations: [], chats: [] };
|
|
@@ -27556,7 +27602,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
27556
27602
|
return { conversations: conversations2, chats: chats2 };
|
|
27557
27603
|
}, "conversationEligibility");
|
|
27558
27604
|
|
|
27559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
27560
27606
|
import { createHash as createHash9 } from "node:crypto";
|
|
27561
27607
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
27562
27608
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -27706,11 +27752,11 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
27706
27752
|
return result;
|
|
27707
27753
|
}, "rankingEvidence");
|
|
27708
27754
|
|
|
27709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27710
|
-
var queriesStoreOver = /* @__PURE__ */ __name((context,
|
|
27755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
27756
|
+
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
27711
27757
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
27712
27758
|
if (execution.corpus === "mail")
|
|
27713
|
-
drainEmailIndex(context.database,
|
|
27759
|
+
drainEmailIndex(context.database, stemmerFor2);
|
|
27714
27760
|
return execution;
|
|
27715
27761
|
}, "mailIndexed");
|
|
27716
27762
|
return {
|
|
@@ -27723,7 +27769,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor) => {
|
|
|
27723
27769
|
};
|
|
27724
27770
|
}, "queriesStoreOver");
|
|
27725
27771
|
|
|
27726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
27727
27773
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
27728
27774
|
const { database, now: now2 } = context;
|
|
27729
27775
|
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 +27808,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
27762
27808
|
}));
|
|
27763
27809
|
}, "chatEventsOf");
|
|
27764
27810
|
|
|
27765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27766
27812
|
import { createHash as createHash10 } from "node:crypto";
|
|
27767
27813
|
|
|
27768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
27769
27815
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
27770
27816
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
27771
27817
|
timeZone: zone,
|
|
@@ -27780,7 +27826,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
27780
27826
|
};
|
|
27781
27827
|
}, "calendarKey");
|
|
27782
27828
|
|
|
27783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
27784
27830
|
var RETENTION_TOLERANCE = 864e5;
|
|
27785
27831
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
27786
27832
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -27834,7 +27880,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
27834
27880
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
27835
27881
|
}, "retentionCohorts");
|
|
27836
27882
|
|
|
27837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27838
27884
|
var iso5 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
27839
27885
|
var week = /* @__PURE__ */ __name((day) => {
|
|
27840
27886
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -27970,7 +28016,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
27970
28016
|
};
|
|
27971
28017
|
}, "retentionQuery");
|
|
27972
28018
|
|
|
27973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
27974
28020
|
var iso6 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
27975
28021
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
27976
28022
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28101,7 +28147,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28101
28147
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28102
28148
|
})), "trackedChats");
|
|
28103
28149
|
|
|
28104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28105
28151
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28106
28152
|
const { database } = context;
|
|
28107
28153
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28157,7 +28203,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28157
28203
|
};
|
|
28158
28204
|
}, "rosterStoreOver");
|
|
28159
28205
|
|
|
28160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28161
28207
|
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
28208
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28163
28209
|
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 +28227,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28181
28227
|
}
|
|
28182
28228
|
}, "backfillNormalized");
|
|
28183
28229
|
|
|
28184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28185
28231
|
var INDEX2 = "message_words";
|
|
28186
28232
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28187
28233
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28308,7 +28354,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28308
28354
|
});
|
|
28309
28355
|
}, "resetSearchIndex");
|
|
28310
28356
|
|
|
28311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28312
28358
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28313
28359
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28314
28360
|
const before2 = stemsState(database);
|
|
@@ -28403,7 +28449,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
28403
28449
|
return resetStems(database, { now: now2 });
|
|
28404
28450
|
}, "followDefaultStemmers");
|
|
28405
28451
|
|
|
28406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
28407
28453
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
28408
28454
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
28409
28455
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -28425,10 +28471,10 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
28425
28471
|
});
|
|
28426
28472
|
}, "termCandidates");
|
|
28427
28473
|
|
|
28428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
28429
28475
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28430
28476
|
const { database } = context;
|
|
28431
|
-
const
|
|
28477
|
+
const stemmerFor2 = stemmerCache();
|
|
28432
28478
|
return {
|
|
28433
28479
|
knownTerms: /* @__PURE__ */ __name(async (terms2) => knownTerms(context, terms2), "knownTerms"),
|
|
28434
28480
|
termCandidates: /* @__PURE__ */ __name(async (trigrams2, lengths) => termCandidates(context, trigrams2, lengths), "termCandidates"),
|
|
@@ -28439,7 +28485,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28439
28485
|
const filled2 = fillStems(database, { now: context.now, ...until ? { until } : {} });
|
|
28440
28486
|
const transcripts = corpusIndexState(database, CORPORA.transcript);
|
|
28441
28487
|
if (transcripts.wanted !== null && (transcripts.pending > 0 || transcripts.built !== transcripts.wanted))
|
|
28442
|
-
drainCorpus(database, CORPORA.transcript,
|
|
28488
|
+
drainCorpus(database, CORPORA.transcript, stemmerFor2, until ? { until } : {});
|
|
28443
28489
|
return filled2;
|
|
28444
28490
|
}, "fillStems"),
|
|
28445
28491
|
stemmers: /* @__PURE__ */ __name(async () => savedStemmers(database), "stemmers"),
|
|
@@ -28447,7 +28493,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28447
28493
|
};
|
|
28448
28494
|
}, "searchIndexStoreOver");
|
|
28449
28495
|
|
|
28450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
28451
28497
|
var HISTORY_KEPT = 1e3;
|
|
28452
28498
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
28453
28499
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -28516,7 +28562,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
28516
28562
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
28517
28563
|
}, "clearHistory");
|
|
28518
28564
|
|
|
28519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
28520
28566
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28521
28567
|
const { database } = context;
|
|
28522
28568
|
return {
|
|
@@ -28540,7 +28586,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28540
28586
|
};
|
|
28541
28587
|
}, "searchesStoreOver");
|
|
28542
28588
|
|
|
28543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
28544
28590
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
28545
28591
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
28546
28592
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -28583,7 +28629,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
28583
28629
|
};
|
|
28584
28630
|
}, "agentActionsStoreOver");
|
|
28585
28631
|
|
|
28586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
28587
28633
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
28588
28634
|
}) => {
|
|
28589
28635
|
const { database, now: now2 } = context;
|
|
@@ -28642,7 +28688,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
28642
28688
|
};
|
|
28643
28689
|
}, "botUpdateStoreOver");
|
|
28644
28690
|
|
|
28645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
28646
28692
|
var DAY4 = 864e5;
|
|
28647
28693
|
var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
28648
28694
|
const clauses = ["e.deleted_at IS NULL"];
|
|
@@ -28722,7 +28768,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
28722
28768
|
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
28769
|
}, "listEvents");
|
|
28724
28770
|
|
|
28725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
28726
28772
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
28727
28773
|
id: Number(row2.id),
|
|
28728
28774
|
accountId: Number(row2.account_id),
|
|
@@ -29302,7 +29348,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29302
29348
|
};
|
|
29303
29349
|
}, "eventStoreOver");
|
|
29304
29350
|
|
|
29305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29306
29352
|
var CATALOG_QUERY = defineQuery({
|
|
29307
29353
|
entity: "document",
|
|
29308
29354
|
backend: "sql",
|
|
@@ -29544,7 +29590,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29544
29590
|
};
|
|
29545
29591
|
}, "catalogStoreOver");
|
|
29546
29592
|
|
|
29547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29548
29594
|
import { createHash as createHash11 } from "node:crypto";
|
|
29549
29595
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29550
29596
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29642,7 +29688,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29642
29688
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29643
29689
|
}, "contextEvidenceRequest");
|
|
29644
29690
|
|
|
29645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
29646
29692
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
29647
29693
|
var field2 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
29648
29694
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -29655,7 +29701,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
29655
29701
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
29656
29702
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field2("sourceUrl")})`;
|
|
29657
29703
|
|
|
29658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
29659
29705
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
29660
29706
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
29661
29707
|
signal?.throwIfAborted();
|
|
@@ -29754,7 +29800,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
29754
29800
|
});
|
|
29755
29801
|
}, "readMeetingContextEvidence");
|
|
29756
29802
|
|
|
29757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
29758
29804
|
var corpora = {
|
|
29759
29805
|
message: {
|
|
29760
29806
|
table: "messages",
|
|
@@ -29941,12 +29987,12 @@ var contextEvidenceOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29941
29987
|
});
|
|
29942
29988
|
}
|
|
29943
29989
|
}), "contextEvidenceOver");
|
|
29944
|
-
var contextIndexOver = /* @__PURE__ */ __name(({ database },
|
|
29990
|
+
var contextIndexOver = /* @__PURE__ */ __name(({ database }, stemmerFor2) => ({
|
|
29945
29991
|
async catchUp({ kinds: kinds2, signal }) {
|
|
29946
29992
|
signal?.throwIfAborted();
|
|
29947
|
-
const mail = kinds2.includes("mail") ? drainEmailIndex(database,
|
|
29993
|
+
const mail = kinds2.includes("mail") ? drainEmailIndex(database, stemmerFor2) : 0;
|
|
29948
29994
|
signal?.throwIfAborted();
|
|
29949
|
-
const documents2 = kinds2.includes("document") ? drainNoteIndex(database,
|
|
29995
|
+
const documents2 = kinds2.includes("document") ? drainNoteIndex(database, stemmerFor2) : 0;
|
|
29950
29996
|
return { mail, documents: documents2 };
|
|
29951
29997
|
}
|
|
29952
29998
|
}), "contextIndexOver");
|
|
@@ -29983,7 +30029,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29983
30029
|
}
|
|
29984
30030
|
}), "contextRecordsOver");
|
|
29985
30031
|
|
|
29986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
29987
30033
|
var NOTE_FIELDS = [
|
|
29988
30034
|
"text",
|
|
29989
30035
|
"exact",
|
|
@@ -30248,8 +30294,8 @@ var SCAN_PAGE3 = 5e3;
|
|
|
30248
30294
|
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
30295
|
var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
30250
30296
|
const { database } = context;
|
|
30251
|
-
const
|
|
30252
|
-
const drain = /* @__PURE__ */ __name(() => drainNoteIndex(database,
|
|
30297
|
+
const stemmerFor2 = stemmerCache();
|
|
30298
|
+
const drain = /* @__PURE__ */ __name(() => drainNoteIndex(database, stemmerFor2), "drain");
|
|
30253
30299
|
const read2 = /* @__PURE__ */ __name((type, id2) => {
|
|
30254
30300
|
const row2 = database.prepare(`SELECT * FROM ${type === "document" ? "documents" : "notes"} WHERE id = ?`).get(id2);
|
|
30255
30301
|
return row2 ? type === "document" ? documentOf(row2) : noteOf(row2) : void 0;
|
|
@@ -30372,7 +30418,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30372
30418
|
};
|
|
30373
30419
|
}, "noteSearchOver");
|
|
30374
30420
|
|
|
30375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
30376
30422
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
30377
30423
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
30378
30424
|
var EVENT_CORPUS = {
|
|
@@ -30392,8 +30438,8 @@ var EVENT_CORPUS = {
|
|
|
30392
30438
|
var SCAN_PAGE4 = 5e3;
|
|
30393
30439
|
var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
30394
30440
|
const { database } = context;
|
|
30395
|
-
const
|
|
30396
|
-
const drain = /* @__PURE__ */ __name(() => drainCorpus(database, CORPORA.event,
|
|
30441
|
+
const stemmerFor2 = stemmerCache();
|
|
30442
|
+
const drain = /* @__PURE__ */ __name(() => drainCorpus(database, CORPORA.event, stemmerFor2), "drain");
|
|
30397
30443
|
const live2 = /* @__PURE__ */ __name((accountIds) => {
|
|
30398
30444
|
const sql2 = ` AND k.chunkable_type = 'event' AND EXISTS (SELECT 1 FROM events e WHERE e.id = k.chunkable_id AND ${EVENT_LIVE})`;
|
|
30399
30445
|
return accountIds?.length ? { sql: `${sql2} AND ${inEventAccounts("k.chunkable_id")}`, params: [JSON.stringify(accountIds)] } : { sql: sql2, params: [] };
|
|
@@ -30504,7 +30550,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30504
30550
|
};
|
|
30505
30551
|
}, "eventSearchOver");
|
|
30506
30552
|
|
|
30507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
30508
30554
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
30509
30555
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
30510
30556
|
if (/^document:[1-9]\d*$/.test(raw))
|
|
@@ -30517,7 +30563,7 @@ var reference = /* @__PURE__ */ __name((raw) => {
|
|
|
30517
30563
|
}, "reference");
|
|
30518
30564
|
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "evidence findings", singular: "evidence finding", cited: "reference", reference }), "validateEvidenceFindings");
|
|
30519
30565
|
|
|
30520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
30521
30567
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
30522
30568
|
try {
|
|
30523
30569
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -30529,7 +30575,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
30529
30575
|
}
|
|
30530
30576
|
}, "calendarMoment");
|
|
30531
30577
|
|
|
30532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
30533
30579
|
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
30580
|
var iso7 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30535
30581
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30642,7 +30688,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30642
30688
|
};
|
|
30643
30689
|
}, "factsStoreOver");
|
|
30644
30690
|
|
|
30645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
30646
30692
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
30647
30693
|
throw new CliError("validation_error", message2);
|
|
30648
30694
|
}, "invalid");
|
|
@@ -30732,7 +30778,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
30732
30778
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
30733
30779
|
}, "findingsCoreOver");
|
|
30734
30780
|
|
|
30735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
30736
30782
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
30737
30783
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
30738
30784
|
var iso8 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30878,7 +30924,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30878
30924
|
};
|
|
30879
30925
|
}, "proposedActionsStoreOver");
|
|
30880
30926
|
|
|
30881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
30882
30928
|
var stale = /* @__PURE__ */ __name(() => {
|
|
30883
30929
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
30884
30930
|
reason: "evidence-findings.stale"
|
|
@@ -31044,7 +31090,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31044
31090
|
};
|
|
31045
31091
|
}, "evidenceFindingsStoreOver");
|
|
31046
31092
|
|
|
31047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31048
31094
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31049
31095
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31050
31096
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31097,7 +31143,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31097
31143
|
}, "forPerson")
|
|
31098
31144
|
}), "involvementStoreOver");
|
|
31099
31145
|
|
|
31100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31101
31147
|
import { createHash as createHash12 } from "node:crypto";
|
|
31102
31148
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31103
31149
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31183,16 +31229,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31183
31229
|
};
|
|
31184
31230
|
}, "meetingProjectsStoreOver");
|
|
31185
31231
|
|
|
31186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31187
31233
|
import { createHash as createHash15 } from "node:crypto";
|
|
31188
31234
|
|
|
31189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31190
31236
|
import { createHash as createHash14 } from "node:crypto";
|
|
31191
31237
|
|
|
31192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31193
31239
|
import { createHash as createHash13 } from "node:crypto";
|
|
31194
31240
|
|
|
31195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31196
31242
|
var consolidationId = /* @__PURE__ */ __name((value, field3) => {
|
|
31197
31243
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31198
31244
|
throw new CliError("validation_error", `${field3} must be a positive canonical tag id`);
|
|
@@ -31243,7 +31289,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31243
31289
|
return input;
|
|
31244
31290
|
}, "consolidationApplyInput");
|
|
31245
31291
|
|
|
31246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31247
31293
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31248
31294
|
id: String(row2.id),
|
|
31249
31295
|
sourceId: String(row2.source_id),
|
|
@@ -31318,7 +31364,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
31318
31364
|
}, { beforeCommit: check3 });
|
|
31319
31365
|
}, "applyTagConsolidation");
|
|
31320
31366
|
|
|
31321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31322
31368
|
var selections = [
|
|
31323
31369
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
31324
31370
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -31462,7 +31508,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
31462
31508
|
};
|
|
31463
31509
|
}, "previewRows");
|
|
31464
31510
|
|
|
31465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31466
31512
|
var kinds = ["project", "tag", "topic"];
|
|
31467
31513
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
31468
31514
|
if (signal?.aborted)
|
|
@@ -31726,7 +31772,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31726
31772
|
};
|
|
31727
31773
|
}, "vocabularyStoreOver");
|
|
31728
31774
|
|
|
31729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
31730
31776
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
31731
31777
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
31732
31778
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32248,7 +32294,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32248
32294
|
return key2.padEnd(3, "X");
|
|
32249
32295
|
}, "projectKey");
|
|
32250
32296
|
|
|
32251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32252
32298
|
var DAY5 = 864e5;
|
|
32253
32299
|
var SETTING4 = "logs_pruned_at";
|
|
32254
32300
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -32275,7 +32321,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32275
32321
|
};
|
|
32276
32322
|
}, "logPruner");
|
|
32277
32323
|
|
|
32278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32279
32325
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32280
32326
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32281
32327
|
reason: "meeting-findings.stale"
|
|
@@ -32444,7 +32490,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32444
32490
|
};
|
|
32445
32491
|
}, "meetingFindingsStoreOver");
|
|
32446
32492
|
|
|
32447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
32448
32494
|
var RANK_BATCH = 512;
|
|
32449
32495
|
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
32496
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -32715,7 +32761,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32715
32761
|
}
|
|
32716
32762
|
}), "meetingVectorsOver");
|
|
32717
32763
|
|
|
32718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
32719
32765
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
32720
32766
|
var TEXTS = {
|
|
32721
32767
|
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 +32862,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32816
32862
|
};
|
|
32817
32863
|
}, "sourceMentionStoreOver");
|
|
32818
32864
|
|
|
32819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
32820
32866
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
32821
32867
|
import { dirname } from "node:path";
|
|
32822
32868
|
|
|
32823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
32824
32870
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
32825
32871
|
var CLIENTS_SETTING = "clients";
|
|
32826
32872
|
var coreVersion = (() => {
|
|
@@ -32878,7 +32924,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
32878
32924
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
32879
32925
|
}, "refusalAdvice");
|
|
32880
32926
|
|
|
32881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
32882
32928
|
var GENERATED = [
|
|
32883
32929
|
{
|
|
32884
32930
|
"name": "20261010184427_initial",
|
|
@@ -33744,7 +33790,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
33744
33790
|
}
|
|
33745
33791
|
];
|
|
33746
33792
|
|
|
33747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
33748
33794
|
var MANIFEST = [
|
|
33749
33795
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
33750
33796
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -33822,7 +33868,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
33822
33868
|
return migrations;
|
|
33823
33869
|
}, "generatedMigrations");
|
|
33824
33870
|
|
|
33825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
33826
33872
|
var MIGRATIONS = generatedMigrations();
|
|
33827
33873
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
33828
33874
|
version INTEGER PRIMARY KEY,
|
|
@@ -33875,7 +33921,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
33875
33921
|
}
|
|
33876
33922
|
}, "migrate");
|
|
33877
33923
|
|
|
33878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
33879
33925
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
33880
33926
|
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
33927
|
if (pending.get(0, 1) === void 0)
|
|
@@ -33897,7 +33943,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
33897
33943
|
}
|
|
33898
33944
|
}, "fillJoinKeys");
|
|
33899
33945
|
|
|
33900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
33901
33947
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
33902
33948
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
33903
33949
|
try {
|
|
@@ -33910,8 +33956,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
33910
33956
|
}, "openSqlite");
|
|
33911
33957
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33912
33958
|
quietSqliteWarning();
|
|
33913
|
-
const { drizzle } = await import("./node-
|
|
33914
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
33959
|
+
const { drizzle } = await import("./node-LIN7L4VQ.js");
|
|
33960
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-VAH4KZN3.js");
|
|
33915
33961
|
const client = await nodeClient(path, { readOnly });
|
|
33916
33962
|
try {
|
|
33917
33963
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33921,8 +33967,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33921
33967
|
}
|
|
33922
33968
|
}, "openUnderNode");
|
|
33923
33969
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33924
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
33925
|
-
const { drizzle } = await import("./bun-
|
|
33970
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-OAQE4M2E.js");
|
|
33971
|
+
const { drizzle } = await import("./bun-5NFIDHGM.js");
|
|
33926
33972
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
33927
33973
|
try {
|
|
33928
33974
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33932,7 +33978,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33932
33978
|
}
|
|
33933
33979
|
}, "openUnderBun");
|
|
33934
33980
|
|
|
33935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
33936
33982
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
33937
33983
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
33938
33984
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -33947,7 +33993,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
33947
33993
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
33948
33994
|
}, "assertReadCompatible");
|
|
33949
33995
|
|
|
33950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33951
33997
|
var BACKFILL_ON_OPEN = 5e3;
|
|
33952
33998
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
33953
33999
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34003,13 +34049,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34003
34049
|
}
|
|
34004
34050
|
}, "openStoreContext");
|
|
34005
34051
|
|
|
34006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34007
34053
|
import { createHash as createHash17 } from "node:crypto";
|
|
34008
34054
|
|
|
34009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34010
34056
|
import { createHash as createHash16 } from "node:crypto";
|
|
34011
34057
|
|
|
34012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34013
34059
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34014
34060
|
var ref = text3(2048);
|
|
34015
34061
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34075,7 +34121,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34075
34121
|
}))
|
|
34076
34122
|
});
|
|
34077
34123
|
|
|
34078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34079
34125
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34080
34126
|
var invalid5 = /* @__PURE__ */ __name((field3) => {
|
|
34081
34127
|
throw new CliError("validation_error", `invalid project annotations.${field3}`);
|
|
@@ -34208,7 +34254,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34208
34254
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
34209
34255
|
}, "projectAnnotationsFingerprint");
|
|
34210
34256
|
|
|
34211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34212
34258
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34213
34259
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34214
34260
|
var targetSchema = strictObject({
|
|
@@ -34315,7 +34361,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
34315
34361
|
}, "planBoundProjectAnnotations");
|
|
34316
34362
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
34317
34363
|
|
|
34318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
34319
34365
|
import { createHash as createHash18 } from "node:crypto";
|
|
34320
34366
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34321
34367
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34409,7 +34455,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34409
34455
|
})).digest("hex");
|
|
34410
34456
|
}, "projectAnnotationSnapshotFingerprint");
|
|
34411
34457
|
|
|
34412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
34413
34459
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
34414
34460
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
34415
34461
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -34426,7 +34472,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
34426
34472
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
34427
34473
|
}, "projectAnnotationRequest");
|
|
34428
34474
|
|
|
34429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
34430
34476
|
var SnapshotBudget = class {
|
|
34431
34477
|
static {
|
|
34432
34478
|
__name(this, "SnapshotBudget");
|
|
@@ -34452,13 +34498,13 @@ var SnapshotBudget = class {
|
|
|
34452
34498
|
}
|
|
34453
34499
|
};
|
|
34454
34500
|
|
|
34455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34456
34502
|
import { createHash as createHash20 } from "node:crypto";
|
|
34457
34503
|
|
|
34458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
34459
34505
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
34460
34506
|
|
|
34461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
34462
34508
|
import { createHash as createHash19 } from "node:crypto";
|
|
34463
34509
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
34464
34510
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -34601,7 +34647,7 @@ var ProjectSnapshotSources = class {
|
|
|
34601
34647
|
}
|
|
34602
34648
|
};
|
|
34603
34649
|
|
|
34604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
34605
34651
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
34606
34652
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
34607
34653
|
}, "unsupported");
|
|
@@ -34772,7 +34818,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
|
|
|
34772
34818
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
34773
34819
|
}), "projectAnnotationSnapshot");
|
|
34774
34820
|
|
|
34775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34776
34822
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, manifest, bindings, budget) => read(database, () => {
|
|
34777
34823
|
const current = projectAnnotationSnapshot(database, projectId, budget).snapshot;
|
|
34778
34824
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -34834,7 +34880,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
|
|
|
34834
34880
|
};
|
|
34835
34881
|
}), "previewAnnotationSnapshot");
|
|
34836
34882
|
|
|
34837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
34838
34884
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snapshot2, bindings) => {
|
|
34839
34885
|
const mappings = { ...bindings };
|
|
34840
34886
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -34876,7 +34922,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
|
|
|
34876
34922
|
return mappings;
|
|
34877
34923
|
}, "restoreAnnotationRecords");
|
|
34878
34924
|
|
|
34879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
34880
34926
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34881
34927
|
async preview(request) {
|
|
34882
34928
|
const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request);
|
|
@@ -34906,7 +34952,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34906
34952
|
}
|
|
34907
34953
|
}), "projectAnnotationStoreOver");
|
|
34908
34954
|
|
|
34909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
34910
34956
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
34911
34957
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
34912
34958
|
let merged = { from: from2, to };
|
|
@@ -34919,7 +34965,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
34919
34965
|
}, "markRange");
|
|
34920
34966
|
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
34967
|
|
|
34922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
34923
34969
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
34924
34970
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
34925
34971
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -34929,7 +34975,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
34929
34975
|
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
34976
|
}, "setTaskRulesStop");
|
|
34931
34977
|
|
|
34932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
34933
34979
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34934
34980
|
const { database } = context;
|
|
34935
34981
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -34985,7 +35031,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34985
35031
|
};
|
|
34986
35032
|
}, "syncStoreOver");
|
|
34987
35033
|
|
|
34988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
34989
35035
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34990
35036
|
const { database } = context;
|
|
34991
35037
|
return {
|
|
@@ -35007,7 +35053,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35007
35053
|
};
|
|
35008
35054
|
}, "tagsStoreOver");
|
|
35009
35055
|
|
|
35010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35011
35057
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35012
35058
|
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
35059
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35134,7 +35180,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35134
35180
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35135
35181
|
}, "savePictureChunks");
|
|
35136
35182
|
|
|
35137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35138
35184
|
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
35185
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35140
35186
|
FROM messages m
|
|
@@ -35217,7 +35263,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35217
35263
|
return plain2(best(found2));
|
|
35218
35264
|
}, "nearestMessages");
|
|
35219
35265
|
|
|
35220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35221
35267
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35222
35268
|
const { database } = context;
|
|
35223
35269
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -35471,7 +35517,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
35471
35517
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
35472
35518
|
}), "vectorsStoreOver");
|
|
35473
35519
|
|
|
35474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
35475
35521
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
35476
35522
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
35477
35523
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -35559,10 +35605,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
35559
35605
|
}
|
|
35560
35606
|
}, "lastBackup");
|
|
35561
35607
|
|
|
35562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
35563
35609
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
35564
35610
|
|
|
35565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
35566
35612
|
var COUNTED_TABLES = [
|
|
35567
35613
|
"accounts",
|
|
35568
35614
|
"chats",
|
|
@@ -35647,7 +35693,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
35647
35693
|
};
|
|
35648
35694
|
}, "storeContents");
|
|
35649
35695
|
|
|
35650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
35651
35697
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
35652
35698
|
const context = await openStoreContext(options);
|
|
35653
35699
|
try {
|
|
@@ -35670,10 +35716,10 @@ var areaOf = /* @__PURE__ */ __name((keyed, whole) => once3(() => {
|
|
|
35670
35716
|
}), "areaOf");
|
|
35671
35717
|
var storeOver = /* @__PURE__ */ __name((context) => {
|
|
35672
35718
|
const { database } = context;
|
|
35673
|
-
const
|
|
35719
|
+
const stemmerFor2 = stemmerCache();
|
|
35674
35720
|
const pruneLogsWhenDue = logPruner(database, context.now);
|
|
35675
35721
|
const own = /* @__PURE__ */ __name((keyed) => ({ ...keyed }), "own");
|
|
35676
|
-
const mail = once3(() => mailStoreOver(context,
|
|
35722
|
+
const mail = once3(() => mailStoreOver(context, stemmerFor2));
|
|
35677
35723
|
const areas = {
|
|
35678
35724
|
accounts: areaOf(() => accountAccountsOver(context), (keyed) => accountsStoreOver(context, keyed)),
|
|
35679
35725
|
chats: areaOf(() => chatsStoreOver(context), own),
|
|
@@ -35690,10 +35736,10 @@ var storeOver = /* @__PURE__ */ __name((context) => {
|
|
|
35690
35736
|
};
|
|
35691
35737
|
const contextEvidence = once3(() => contextEvidenceOver(context));
|
|
35692
35738
|
const projectAnnotations = once3(() => projectAnnotationStoreOver(context));
|
|
35693
|
-
const contextIndex = once3(() => contextIndexOver(context,
|
|
35739
|
+
const contextIndex = once3(() => contextIndexOver(context, stemmerFor2));
|
|
35694
35740
|
const contextRecords = once3(() => contextRecordsOver(context));
|
|
35695
35741
|
const searches2 = once3(() => searchesStoreOver(context));
|
|
35696
|
-
const queries = once3(() => queriesStoreOver(context,
|
|
35742
|
+
const queries = once3(() => queriesStoreOver(context, stemmerFor2));
|
|
35697
35743
|
const searchIndex2 = once3(() => searchIndexStoreOver(context));
|
|
35698
35744
|
const botUpdates2 = once3(() => botUpdateStoreOver(context, pruneLogsWhenDue));
|
|
35699
35745
|
const involvements2 = once3(() => involvementStoreOver(context));
|