@wirecat/drive-cli 0.53.0 → 0.54.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-WRN35CUF.js → all-profiles-LFIPUPZI.js} +9 -9
- package/dist/bundle/{anthropic-DZASXWG3.js → anthropic-G5ZRRWG4.js} +5 -5
- package/dist/bundle/{app-server-4VHT7QZN.js → app-server-UVWATOQC.js} +46 -46
- package/dist/bundle/{bun-7SYKSCLA.js → bun-DNEFTPTR.js} +2 -2
- package/dist/bundle/{bun-sqlite-2GOM5PM3.js → bun-sqlite-FWBYHIXB.js} +4 -4
- package/dist/bundle/{chunk-PC4UA6UN.js → chunk-2CQT2WWN.js} +5 -5
- package/dist/bundle/{chunk-DZMK255Y.js → chunk-2D6AAGBP.js} +41 -31
- package/dist/bundle/{chunk-FG4XXZZE.js → chunk-2FFXRWI2.js} +2 -2
- package/dist/bundle/{chunk-MK3N7WX7.js → chunk-2HQPJ366.js} +3 -3
- package/dist/bundle/{chunk-54BYJQ77.js → chunk-2HWOGSTA.js} +25 -25
- package/dist/bundle/{chunk-7XKAVMCF.js → chunk-2MSJVFAS.js} +8 -8
- package/dist/bundle/{chunk-NSIFQ5OP.js → chunk-2NWFZ43Q.js} +1 -1
- package/dist/bundle/{chunk-6XYGTRMQ.js → chunk-2Q3S47BC.js} +523 -268
- package/dist/bundle/{chunk-KPBCGUJC.js → chunk-47MEPBWG.js} +21 -21
- package/dist/bundle/{chunk-3RYX7IB6.js → chunk-4RDXCE45.js} +39 -38
- package/dist/bundle/{chunk-7IUMHMTP.js → chunk-5BPOAHVD.js} +2 -2
- package/dist/bundle/{chunk-VZ2I62HN.js → chunk-5LNOVPOR.js} +2 -2
- package/dist/bundle/{chunk-EKFEY3KP.js → chunk-5WQN2TUM.js} +1 -1
- package/dist/bundle/{chunk-ALJWBGD5.js → chunk-6MGSFYGL.js} +1 -1
- package/dist/bundle/{chunk-WUX7AUOQ.js → chunk-6RAEXK7Y.js} +26 -26
- package/dist/bundle/{chunk-RNIHKIQP.js → chunk-6SOQJRGI.js} +4 -4
- package/dist/bundle/{chunk-CKBHR7QO.js → chunk-75DSLCPC.js} +1 -1
- package/dist/bundle/{chunk-YLKQSVLI.js → chunk-76JIVDKC.js} +2 -2
- package/dist/bundle/{chunk-LSGAJYVN.js → chunk-7WCZ2OZ5.js} +6 -6
- package/dist/bundle/{chunk-OQMK6WXQ.js → chunk-7XU3TR7K.js} +2 -2
- package/dist/bundle/{chunk-7SH4JHYW.js → chunk-A4FTLORC.js} +12 -12
- package/dist/bundle/{chunk-CITFEQ6S.js → chunk-AACQA2CO.js} +1 -1
- package/dist/bundle/{chunk-PSNHPFSK.js → chunk-AAHIBA36.js} +1 -1
- package/dist/bundle/{chunk-GPJEYW2J.js → chunk-BWBVBW5T.js} +8 -8
- package/dist/bundle/{chunk-HM352LJR.js → chunk-CVALO727.js} +24 -24
- package/dist/bundle/{chunk-E6XDFMRZ.js → chunk-FHW4ENRF.js} +32 -32
- package/dist/bundle/{chunk-2HHOMN2G.js → chunk-HAHARAJD.js} +23 -23
- package/dist/bundle/{chunk-SQHPJBNO.js → chunk-IBRXVPBI.js} +95 -95
- package/dist/bundle/{chunk-YQOVVCIA.js → chunk-IKODUUQG.js} +17 -16
- package/dist/bundle/{chunk-IJFZKQC4.js → chunk-IOMSC4ZG.js} +3 -3
- package/dist/bundle/{chunk-YKZ4IPLB.js → chunk-JKEAZBEZ.js} +7 -7
- package/dist/bundle/{chunk-VTWADVEQ.js → chunk-KIQIF5M7.js} +2 -2
- package/dist/bundle/{chunk-IAQ4L6SM.js → chunk-KT5G3KVS.js} +3 -3
- package/dist/bundle/{chunk-BEL4XZ3M.js → chunk-L3RV42O3.js} +16 -16
- package/dist/bundle/{chunk-NHBUTCNR.js → chunk-LQXLWHKM.js} +9 -9
- package/dist/bundle/{chunk-PR3DA7KA.js → chunk-MATUQFYL.js} +11 -11
- package/dist/bundle/{chunk-F3KHUJEE.js → chunk-MULPNGM2.js} +10 -10
- package/dist/bundle/{chunk-FJW3DDCF.js → chunk-N4OO3SPQ.js} +5 -5
- package/dist/bundle/{chunk-6DHQTUB2.js → chunk-NDWWGBSM.js} +1 -1
- package/dist/bundle/{chunk-DLAFGSTN.js → chunk-NHDSJMAR.js} +1 -1
- package/dist/bundle/{chunk-CNKILAWA.js → chunk-O6YYFVDD.js} +30 -23
- package/dist/bundle/{chunk-FXWBUTR7.js → chunk-OYGEBFFO.js} +7 -7
- package/dist/bundle/{chunk-DOZOLBXE.js → chunk-P7E7K467.js} +3 -3
- package/dist/bundle/{chunk-GE4DP24O.js → chunk-PKNTBZXN.js} +51 -51
- package/dist/bundle/{chunk-PIMMF67N.js → chunk-PU4GANCD.js} +2 -2
- package/dist/bundle/{chunk-UFWK3L5Z.js → chunk-Q46JLJ5O.js} +6 -6
- package/dist/bundle/{chunk-R276546S.js → chunk-QKHFQHE7.js} +1 -1
- package/dist/bundle/{chunk-6BNALDGA.js → chunk-QUJCD5U7.js} +4 -4
- package/dist/bundle/{chunk-CL4GVCXS.js → chunk-RIYXQFKU.js} +46 -46
- package/dist/bundle/{chunk-DT2YCB2V.js → chunk-RWEFKLXJ.js} +24 -22
- package/dist/bundle/{chunk-R4TE4ZSD.js → chunk-SBOTSSYV.js} +342 -296
- package/dist/bundle/{chunk-SIWBUGBU.js → chunk-U3BOQ63L.js} +8 -8
- package/dist/bundle/{chunk-QXYGK6G5.js → chunk-UBJX5D2O.js} +2 -2
- package/dist/bundle/{chunk-WJRJBQIM.js → chunk-VCGQMTHW.js} +549 -288
- package/dist/bundle/{chunk-ZG6X24ON.js → chunk-VKYCMXEQ.js} +5 -5
- package/dist/bundle/{chunk-ZSXRDF6I.js → chunk-VX4RAT3A.js} +1 -1
- package/dist/bundle/{chunk-2PVDFLJJ.js → chunk-W5SYBHRX.js} +2 -2
- package/dist/bundle/{chunk-KXMJE3XC.js → chunk-WGSTTWM5.js} +6 -6
- package/dist/bundle/{chunk-T334CFU4.js → chunk-WJRE45Z6.js} +4 -4
- package/dist/bundle/{chunk-TZLO3ZZF.js → chunk-WQPTZHHR.js} +17 -26
- package/dist/bundle/{chunk-JEOYFKUK.js → chunk-WSX5UQNT.js} +2 -2
- package/dist/bundle/{chunk-LJAX6YCF.js → chunk-WYDYSQ7T.js} +2 -2
- package/dist/bundle/{chunk-C6Z25IBJ.js → chunk-XCUUYQN7.js} +4 -4
- package/dist/bundle/{chunk-GVCN3GLZ.js → chunk-YOHOQ6ZR.js} +4 -4
- package/dist/bundle/{chunk-SVTYS36O.js → chunk-YZ5VMR2S.js} +3 -3
- package/dist/bundle/{chunk-ZDLIO76S.js → chunk-ZMMOVTUB.js} +2 -2
- package/dist/bundle/command-contract-VZ3ZJLEF.js +35 -0
- package/dist/bundle/{decode-WAPM2VBH.js → decode-DN2DDFET.js} +4 -4
- package/dist/bundle/drive.js +6 -6
- package/dist/bundle/{echarts-GXY34GHA.js → echarts-VMHZ2UYP.js} +2 -2
- package/dist/bundle/{embed-HW3N3KNP.js → embed-MDN7R7BA.js} +5 -5
- package/dist/bundle/{embedder-7WNFXYYP.js → embedder-KEVEDNDJ.js} +8 -8
- package/dist/bundle/{entry-J7YIRDPD.js → entry-HTNK5TJQ.js} +6 -6
- package/dist/bundle/{first-run-53CL2IYH.js → first-run-QNMCMP67.js} +9 -9
- package/dist/bundle/first-screen-RQBEHUQC.js +33 -0
- package/dist/bundle/{google-5NNVARNR.js → google-QAKMV57Q.js} +9 -9
- package/dist/bundle/{google-api-EQQH53QD.js → google-api-UJJS7ECO.js} +51 -51
- package/dist/bundle/grants-VMPKFEC2.js +98 -0
- package/dist/bundle/{identity-LBTXDMTA.js → identity-UODE3QAL.js} +4 -4
- package/dist/bundle/{instructions-K5BEQM4C.js → instructions-IWLHCDC7.js} +1 -1
- package/dist/bundle/{login-Y6ENYKC3.js → login-GIZXEN7I.js} +58 -60
- package/dist/bundle/{mcp-WSGVVZWI.js → mcp-RUYPQVYS.js} +2 -2
- package/dist/bundle/{node-ZYWB7IET.js → node-25IJLDBZ.js} +2 -2
- package/dist/bundle/{node-sqlite-FSQIKGED.js → node-sqlite-DYR4FEI4.js} +4 -4
- package/dist/bundle/{oauth-HF5USWXY.js → oauth-FLHXEDDY.js} +6 -6
- package/dist/bundle/{open-NHGJENCX.js → open-FWDZB7KX.js} +3 -3
- package/dist/bundle/{openai-3JCJYKNX.js → openai-HB7UGKPW.js} +13 -13
- package/dist/bundle/{process-ZXO2MWRJ.js → process-P6TW37HQ.js} +1 -1
- package/dist/bundle/{program-QAJ66K3Z.js → program-DVUNLXXS.js} +73 -73
- package/dist/bundle/{prompt-LQJBCCUF.js → prompt-MKWMYO3B.js} +4 -4
- package/dist/bundle/{reasons-J57GSRWN.js → reasons-25BEO2NE.js} +3 -3
- package/dist/bundle/{recognize-QM3LN4ZF.js → recognize-VXGNPROM.js} +3 -3
- package/dist/bundle/{remote-WREGEZJQ.js → remote-H5ZWLJHR.js} +6 -6
- package/dist/bundle/{rerank-YFUB6J6M.js → rerank-5A3JDK7O.js} +6 -6
- package/dist/bundle/{serve-7NFEZ564.js → serve-QNPNEZVR.js} +8 -8
- package/dist/bundle/{server-KBCFZ2AU.js → server-GWBVIRLY.js} +38 -38
- package/dist/bundle/server-QJU3HEGM.js +63 -0
- package/dist/bundle/{services-C3XWRA2W.js → services-PFXEWHJG.js} +29 -25
- package/dist/bundle/{sqlite-runtime-H3TSAMIN.js → sqlite-runtime-RGFISYXM.js} +4 -4
- package/dist/bundle/{state-S2Q53L6L.js → state-BUSX5BXF.js} +5 -5
- package/dist/bundle/{store-I27LAJPU.js → store-FIEE5HHG.js} +14 -14
- package/dist/bundle/{store-H345VQHP.js → store-HFF5KQ44.js} +12 -12
- package/dist/bundle/store-maintenance-command-Z4SPEQUM.js +52 -0
- package/dist/bundle/tokens-B6MUZRFM.js +96 -0
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -4
- package/dist/login.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +0 -9
- 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-D4UG3D33.js +0 -35
- package/dist/bundle/first-screen-2KT7HM2K.js +0 -33
- package/dist/bundle/grants-4NETZ4MR.js +0 -98
- package/dist/bundle/server-UYVL2CFI.js +0 -63
- package/dist/bundle/store-maintenance-command-3XA73XMC.js +0 -52
- package/dist/bundle/tokens-7MUGKFEM.js +0 -96
- /package/dist/bundle/{chunk-62EDJKGP.js → chunk-HEA3XVAJ.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-WSX5UQNT.js";
|
|
6
6
|
import {
|
|
7
7
|
CHAT_MESSAGES_READ,
|
|
8
8
|
FACT_STATUSES,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
validateMeetingPreparationContext,
|
|
47
47
|
validateMeetingRelatedHistory,
|
|
48
48
|
validateMeetingSeriesHistory
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PKNTBZXN.js";
|
|
50
50
|
import {
|
|
51
51
|
QUERY_LIMITS,
|
|
52
52
|
dateRange,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
validateQuery,
|
|
58
58
|
walkQuery,
|
|
59
59
|
zonedMoment
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LQXLWHKM.js";
|
|
61
61
|
import {
|
|
62
62
|
DEFAULT_STEMMERS,
|
|
63
63
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -70,24 +70,24 @@ import {
|
|
|
70
70
|
fold,
|
|
71
71
|
normalize,
|
|
72
72
|
parseStemmers
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-2MSJVFAS.js";
|
|
74
74
|
import {
|
|
75
75
|
DEFAULT_TASK_CATEGORIES,
|
|
76
76
|
sharedConfigPath,
|
|
77
77
|
storedTaskCategories,
|
|
78
78
|
taskCategoriesReader
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-WGSTTWM5.js";
|
|
80
80
|
import {
|
|
81
81
|
storePath
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-UBJX5D2O.js";
|
|
83
83
|
import {
|
|
84
84
|
PRAGMAS,
|
|
85
85
|
quietSqliteWarning,
|
|
86
86
|
storeCapable
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-7WCZ2OZ5.js";
|
|
88
88
|
import {
|
|
89
89
|
singleLine
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-2D6AAGBP.js";
|
|
91
91
|
import {
|
|
92
92
|
CliError,
|
|
93
93
|
array,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
safeParse,
|
|
106
106
|
strictObject,
|
|
107
107
|
string
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-JKEAZBEZ.js";
|
|
109
109
|
import {
|
|
110
110
|
resolveFrom
|
|
111
111
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -133,12 +133,12 @@ import {
|
|
|
133
133
|
sql,
|
|
134
134
|
sqliteTable,
|
|
135
135
|
text
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-6MGSFYGL.js";
|
|
137
137
|
import {
|
|
138
138
|
__name
|
|
139
139
|
} from "./chunk-ZVVMGPBJ.js";
|
|
140
140
|
|
|
141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
142
142
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
143
143
|
const methods = whole;
|
|
144
144
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -266,7 +266,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
266
266
|
};
|
|
267
267
|
}, "bindAccount");
|
|
268
268
|
|
|
269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
270
270
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
271
271
|
var PROVIDERS = [
|
|
272
272
|
{ name: "telegram", kind: "messages", aliases: ["tg"] },
|
|
@@ -357,7 +357,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
357
357
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
358
358
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
359
359
|
|
|
360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
361
361
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
362
362
|
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");
|
|
363
363
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -380,7 +380,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
380
380
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
381
381
|
}, "sourceOf");
|
|
382
382
|
|
|
383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
384
384
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
385
385
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
386
386
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -567,7 +567,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
567
567
|
return { accounts: [...chosen.values()], skipped };
|
|
568
568
|
}, "fitting");
|
|
569
569
|
|
|
570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
571
571
|
var IndexBuilderOn = class {
|
|
572
572
|
static {
|
|
573
573
|
__name(this, "IndexBuilderOn");
|
|
@@ -762,7 +762,7 @@ function alias(table, alias2) {
|
|
|
762
762
|
}
|
|
763
763
|
__name(alias, "alias");
|
|
764
764
|
|
|
765
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
766
766
|
var ENTITY_TABLES = {
|
|
767
767
|
account: "accounts",
|
|
768
768
|
attachment: "attachments",
|
|
@@ -802,7 +802,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
802
802
|
return { table, pointer, type, count, known: known2 };
|
|
803
803
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
804
804
|
|
|
805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
806
806
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
807
807
|
id: integer("id").primaryKey(),
|
|
808
808
|
name: text("name").notNull().unique(),
|
|
@@ -811,7 +811,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
811
811
|
updatedAt: integer("updated_at").notNull()
|
|
812
812
|
});
|
|
813
813
|
|
|
814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
815
815
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
816
816
|
sourceKey: text("source_key").notNull(),
|
|
817
817
|
collection: text("collection").notNull(),
|
|
@@ -821,13 +821,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
821
821
|
createdAt: integer("created_at").notNull()
|
|
822
822
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
823
823
|
|
|
824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
825
825
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
826
826
|
id: integer("id").notNull(),
|
|
827
827
|
indexableType: text("indexable_type").notNull()
|
|
828
828
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
829
829
|
|
|
830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
831
831
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
832
832
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
833
833
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -853,7 +853,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
853
853
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
854
854
|
]);
|
|
855
855
|
|
|
856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
857
857
|
var accounts = sqliteTable("accounts", {
|
|
858
858
|
id: integer("id").primaryKey(),
|
|
859
859
|
provider: text("provider").notNull(),
|
|
@@ -2349,7 +2349,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2349
2349
|
at: integer("at").notNull()
|
|
2350
2350
|
});
|
|
2351
2351
|
|
|
2352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2353
2353
|
var ARMS = [
|
|
2354
2354
|
[
|
|
2355
2355
|
"message",
|
|
@@ -2476,7 +2476,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2476
2476
|
return recomputed;
|
|
2477
2477
|
}, "drainInvolvementQueue");
|
|
2478
2478
|
|
|
2479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2480
2480
|
import { domainToUnicode } from "node:url";
|
|
2481
2481
|
|
|
2482
2482
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12498,7 +12498,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12498
12498
|
}, "oa");
|
|
12499
12499
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12500
12500
|
|
|
12501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12502
12502
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12503
12503
|
var ID = /^[\w-]{10,}$/;
|
|
12504
12504
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12539,7 +12539,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12539
12539
|
return { url, documentId: googleDocumentId(url) };
|
|
12540
12540
|
}), "googleDocumentLinks");
|
|
12541
12541
|
|
|
12542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12543
12543
|
var PHONE_PLANS = [
|
|
12544
12544
|
{
|
|
12545
12545
|
country: "us",
|
|
@@ -12919,7 +12919,7 @@ var PHONE_PLANS = [
|
|
|
12919
12919
|
}
|
|
12920
12920
|
];
|
|
12921
12921
|
|
|
12922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12923
12923
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12924
12924
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12925
12925
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12960,7 +12960,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12960
12960
|
return void 0;
|
|
12961
12961
|
}, "nationalPhone");
|
|
12962
12962
|
|
|
12963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12964
12964
|
var BEFORE = [
|
|
12965
12965
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12966
12966
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13220,7 +13220,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13220
13220
|
return found2.sort((a, b) => a.start - b.start);
|
|
13221
13221
|
}, "findPlaces");
|
|
13222
13222
|
|
|
13223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13224
13224
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13225
13225
|
var MENTION_VERSIONS = {
|
|
13226
13226
|
phone: 1,
|
|
@@ -13410,7 +13410,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13410
13410
|
};
|
|
13411
13411
|
}, "typedPhone");
|
|
13412
13412
|
|
|
13413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13414
13414
|
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";
|
|
13415
13415
|
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";
|
|
13416
13416
|
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";
|
|
@@ -13418,7 +13418,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13418
13418
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13419
13419
|
var NAME_WORDS = WORDS.split(" ");
|
|
13420
13420
|
|
|
13421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13422
13422
|
var LATIN_TO_CYRILLIC = {
|
|
13423
13423
|
shch: "\u0449",
|
|
13424
13424
|
sch: "\u0449",
|
|
@@ -13626,7 +13626,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13626
13626
|
return found2;
|
|
13627
13627
|
}, "findUnknownNames");
|
|
13628
13628
|
|
|
13629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13630
13630
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13631
13631
|
"webpage",
|
|
13632
13632
|
"share",
|
|
@@ -13658,7 +13658,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13658
13658
|
});
|
|
13659
13659
|
}, "matchDownloads");
|
|
13660
13660
|
|
|
13661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13662
13662
|
var QUERY_VERSION = 1;
|
|
13663
13663
|
var QUERY_LIMITS2 = {
|
|
13664
13664
|
...QUERY_LIMITS,
|
|
@@ -13689,7 +13689,7 @@ function exhausted(budget) {
|
|
|
13689
13689
|
}
|
|
13690
13690
|
__name(exhausted, "exhausted");
|
|
13691
13691
|
|
|
13692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13693
13693
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13694
13694
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13695
13695
|
kind: "char",
|
|
@@ -14089,7 +14089,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14089
14089
|
return out;
|
|
14090
14090
|
}, "foldRegex");
|
|
14091
14091
|
|
|
14092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14093
14093
|
var PRESET_VERSION = 1;
|
|
14094
14094
|
var PRESETS = {
|
|
14095
14095
|
password: {
|
|
@@ -14143,7 +14143,7 @@ var PRESETS = {
|
|
|
14143
14143
|
}
|
|
14144
14144
|
};
|
|
14145
14145
|
|
|
14146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14147
14147
|
var FIELD_VERSION = 2;
|
|
14148
14148
|
var UNITS = {
|
|
14149
14149
|
"": 1,
|
|
@@ -14643,12 +14643,12 @@ var QUERY_OPERATORS = [
|
|
|
14643
14643
|
{ name: "boost / minimum / intervals", example: "invoice^2", semantics: "query.unsupported-operator" }
|
|
14644
14644
|
];
|
|
14645
14645
|
|
|
14646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14647
14647
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14648
14648
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14649
14649
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14650
14650
|
|
|
14651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14652
14652
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14653
14653
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14654
14654
|
var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
@@ -14672,7 +14672,7 @@ var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
|
14672
14672
|
};
|
|
14673
14673
|
}, "linkMatch");
|
|
14674
14674
|
|
|
14675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14676
14676
|
var SETTING = "phoneCountries";
|
|
14677
14677
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14678
14678
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14703,7 +14703,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14703
14703
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14704
14704
|
}, "valueMatch");
|
|
14705
14705
|
|
|
14706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
14707
14707
|
var SCHEME = "msg:";
|
|
14708
14708
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
14709
14709
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -14717,7 +14717,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
14717
14717
|
return { provider, account, chat: chat2, message: message2 };
|
|
14718
14718
|
}, "parseLocator");
|
|
14719
14719
|
|
|
14720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14721
14721
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14722
14722
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14723
14723
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14745,7 +14745,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14745
14745
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14746
14746
|
}, "vocabularySimilarity");
|
|
14747
14747
|
|
|
14748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14749
14749
|
import { createHash } from "node:crypto";
|
|
14750
14750
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14751
14751
|
try {
|
|
@@ -14811,7 +14811,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14811
14811
|
});
|
|
14812
14812
|
}, "guardTagCreation");
|
|
14813
14813
|
|
|
14814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14815
14815
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
14816
14816
|
throw new CliError("validation_error", message2);
|
|
14817
14817
|
}, "invalid");
|
|
@@ -14888,7 +14888,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14888
14888
|
};
|
|
14889
14889
|
}, "createTagRedirectIndex");
|
|
14890
14890
|
|
|
14891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14892
14892
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14893
14893
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14894
14894
|
if (!row2)
|
|
@@ -14916,7 +14916,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14916
14916
|
return snapshot2;
|
|
14917
14917
|
}, "tagRedirectSnapshot");
|
|
14918
14918
|
|
|
14919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14920
14920
|
import { createHash as createHash2 } from "node:crypto";
|
|
14921
14921
|
var TASK_KEY_PREFIXES = {
|
|
14922
14922
|
question: "Q",
|
|
@@ -14944,7 +14944,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14944
14944
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14945
14945
|
}, "taskAccountOf");
|
|
14946
14946
|
|
|
14947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
14948
14948
|
var SIMPLE_REFERENCES = [
|
|
14949
14949
|
"note",
|
|
14950
14950
|
"document",
|
|
@@ -15016,7 +15016,7 @@ var folderPath = /* @__PURE__ */ __name((path) => {
|
|
|
15016
15016
|
}, "folderPath");
|
|
15017
15017
|
var canonicalReference = /* @__PURE__ */ __name((text5) => formatReference(parseReference(text5)), "canonicalReference");
|
|
15018
15018
|
|
|
15019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
15020
15020
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
15021
15021
|
var REFERABLE = {
|
|
15022
15022
|
note: { tombstone: true },
|
|
@@ -15174,7 +15174,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15174
15174
|
}, "taskIdOf");
|
|
15175
15175
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15176
15176
|
|
|
15177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15178
15178
|
var toMs = /* @__PURE__ */ __name((iso11) => {
|
|
15179
15179
|
if (iso11 === null || iso11 === void 0)
|
|
15180
15180
|
return null;
|
|
@@ -15188,7 +15188,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15188
15188
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15189
15189
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15190
15190
|
|
|
15191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15192
15192
|
var TAG_KINDS = ["tag", "topic"];
|
|
15193
15193
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15194
15194
|
var TAG_TYPE = {
|
|
@@ -15379,7 +15379,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15379
15379
|
return result;
|
|
15380
15380
|
}, "tagsOf");
|
|
15381
15381
|
|
|
15382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15383
15383
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15384
15384
|
var SPEECH = speech("att");
|
|
15385
15385
|
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");
|
|
@@ -15734,7 +15734,7 @@ var FIELD_COMPILERS = {
|
|
|
15734
15734
|
subject
|
|
15735
15735
|
};
|
|
15736
15736
|
|
|
15737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15738
15738
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15739
15739
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15740
15740
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15750,7 +15750,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15750
15750
|
};
|
|
15751
15751
|
}, "placeOf");
|
|
15752
15752
|
|
|
15753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15754
15754
|
var DRAIN_ON_WRITE = 500;
|
|
15755
15755
|
var METHOD = "rules";
|
|
15756
15756
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15913,7 +15913,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15913
15913
|
return queued.length;
|
|
15914
15914
|
}, "drainMentions");
|
|
15915
15915
|
|
|
15916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15917
15917
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15918
15918
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15919
15919
|
if (!exists2)
|
|
@@ -15921,7 +15921,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15921
15921
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15922
15922
|
}, "indexRow");
|
|
15923
15923
|
|
|
15924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15925
15925
|
var INDEX = "message_stems";
|
|
15926
15926
|
var SETTING2 = "searchStemmers";
|
|
15927
15927
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -16043,7 +16043,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
16043
16043
|
};
|
|
16044
16044
|
}, "stemmerCache");
|
|
16045
16045
|
|
|
16046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
16047
16047
|
var SQLITE_BUSY = 5;
|
|
16048
16048
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
16049
16049
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -16080,7 +16080,14 @@ var connectionOf = /* @__PURE__ */ __name((database) => {
|
|
|
16080
16080
|
return connection;
|
|
16081
16081
|
}, "connectionOf");
|
|
16082
16082
|
var write = /* @__PURE__ */ __name((database, body2, { beforeCommit } = {}) => transact(database, body2, true, beforeCommit), "write");
|
|
16083
|
-
var writeBatch = /* @__PURE__ */ __name((database, body2) =>
|
|
16083
|
+
var writeBatch = /* @__PURE__ */ __name((database, body2) => {
|
|
16084
|
+
const outer = connectionOf(database).depth === 0;
|
|
16085
|
+
const result = transact(database, body2, false);
|
|
16086
|
+
if (outer)
|
|
16087
|
+
Atomics.wait(pause, 0, 0, BATCH_PAUSE_MS);
|
|
16088
|
+
return result;
|
|
16089
|
+
}, "writeBatch");
|
|
16090
|
+
var BATCH_PAUSE_MS = 2;
|
|
16084
16091
|
var transact = /* @__PURE__ */ __name((database, body2, drain, beforeCommit) => {
|
|
16085
16092
|
const connection = connectionOf(database);
|
|
16086
16093
|
if (connection.reading)
|
|
@@ -16131,7 +16138,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
16131
16138
|
}
|
|
16132
16139
|
}, "read");
|
|
16133
16140
|
|
|
16134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
16135
16142
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
16136
16143
|
coalesce(CASE k.chunkable_type
|
|
16137
16144
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16273,7 +16280,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16273
16280
|
}, "dropUnusedVectors");
|
|
16274
16281
|
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");
|
|
16275
16282
|
|
|
16276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16277
16284
|
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({
|
|
16278
16285
|
target: [accounts.provider, accounts.externalId],
|
|
16279
16286
|
set: {
|
|
@@ -16379,7 +16386,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16379
16386
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16380
16387
|
}, "dropOrphanPeople");
|
|
16381
16388
|
|
|
16382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16383
16390
|
var FOLDED = [
|
|
16384
16391
|
{ table: "tasks", column: "title" },
|
|
16385
16392
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16416,7 +16423,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16416
16423
|
return filled2;
|
|
16417
16424
|
}, "fillFolded");
|
|
16418
16425
|
|
|
16419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16420
16427
|
import { createHash as createHash3 } from "node:crypto";
|
|
16421
16428
|
var CHUNK_CHARS = 1200;
|
|
16422
16429
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16521,7 +16528,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16521
16528
|
return chunks2;
|
|
16522
16529
|
}, "cutChunks");
|
|
16523
16530
|
|
|
16524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16525
16532
|
var DAY = 864e5;
|
|
16526
16533
|
var CURRENCY = [
|
|
16527
16534
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16638,7 +16645,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16638
16645
|
return best?.day ?? null;
|
|
16639
16646
|
}, "dueDayOf");
|
|
16640
16647
|
|
|
16641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16642
16649
|
var DAY2 = 864e5;
|
|
16643
16650
|
var STOP_WORDS = new Set([
|
|
16644
16651
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16793,7 +16800,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16793
16800
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16794
16801
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16795
16802
|
|
|
16796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16797
16804
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16798
16805
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16799
16806
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -17064,7 +17071,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
17064
17071
|
};
|
|
17065
17072
|
}, "readiness");
|
|
17066
17073
|
|
|
17067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
17068
17075
|
var DOCUMENT_PICTURE = "document_picture";
|
|
17069
17076
|
var SCAN_PAGE2 = 5e3;
|
|
17070
17077
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -17127,7 +17134,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
17127
17134
|
}, "nearestPictures")
|
|
17128
17135
|
}), "documentPicturesOver");
|
|
17129
17136
|
|
|
17130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
17131
17138
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
17132
17139
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
17133
17140
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17192,7 +17199,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17192
17199
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17193
17200
|
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");
|
|
17194
17201
|
|
|
17195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17196
17203
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17197
17204
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17198
17205
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17282,7 +17289,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17282
17289
|
});
|
|
17283
17290
|
}, "linkMeeting");
|
|
17284
17291
|
|
|
17285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17286
17293
|
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), ''))";
|
|
17287
17294
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17288
17295
|
"working-location",
|
|
@@ -17512,7 +17519,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17512
17519
|
return true;
|
|
17513
17520
|
}, "resetNoteIndex");
|
|
17514
17521
|
|
|
17515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17516
17523
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17517
17524
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17518
17525
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17531,7 +17538,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17531
17538
|
}
|
|
17532
17539
|
}, "resolvePersonLinks");
|
|
17533
17540
|
|
|
17534
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17535
17542
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17536
17543
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17537
17544
|
find: orm.select({
|
|
@@ -17756,7 +17763,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17756
17763
|
}, "meetingIdentityPk");
|
|
17757
17764
|
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");
|
|
17758
17765
|
|
|
17759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17760
17767
|
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");
|
|
17761
17768
|
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");
|
|
17762
17769
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -18036,7 +18043,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
18036
18043
|
}
|
|
18037
18044
|
}, "replaceAutoTags");
|
|
18038
18045
|
|
|
18039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
18040
18047
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
18041
18048
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
18042
18049
|
var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
|
|
@@ -18055,7 +18062,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
18055
18062
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
18056
18063
|
}, "counterFreshness");
|
|
18057
18064
|
|
|
18058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
18059
18066
|
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");
|
|
18060
18067
|
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;
|
|
18061
18068
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -18136,7 +18143,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
18136
18143
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
18137
18144
|
}, "mailCore");
|
|
18138
18145
|
|
|
18139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
18140
18147
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
18141
18148
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
18142
18149
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18246,7 +18253,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18246
18253
|
return emails3 + threads;
|
|
18247
18254
|
}, "drainEmailIndex");
|
|
18248
18255
|
|
|
18249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18250
18257
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18251
18258
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18252
18259
|
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,
|
|
@@ -18292,7 +18299,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18292
18299
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18293
18300
|
}, "forgetLocations");
|
|
18294
18301
|
|
|
18295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18296
18303
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18297
18304
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18298
18305
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18342,7 +18349,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18342
18349
|
return threads.length;
|
|
18343
18350
|
}, "markEmailsRestored");
|
|
18344
18351
|
|
|
18345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18346
18353
|
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");
|
|
18347
18354
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18348
18355
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18409,7 +18416,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18409
18416
|
}
|
|
18410
18417
|
}), "mailRulesOver");
|
|
18411
18418
|
|
|
18412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18413
18420
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18414
18421
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18415
18422
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18417,7 +18424,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18417
18424
|
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);
|
|
18418
18425
|
}, "reviewLink");
|
|
18419
18426
|
|
|
18420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18421
18428
|
function checkMeetingCancelled(signal) {
|
|
18422
18429
|
if (!signal?.aborted)
|
|
18423
18430
|
return;
|
|
@@ -18428,7 +18435,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18428
18435
|
}
|
|
18429
18436
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18430
18437
|
|
|
18431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18432
18439
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18433
18440
|
id: Number(row2.id),
|
|
18434
18441
|
accountId: Number(row2.account_id),
|
|
@@ -18478,7 +18485,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18478
18485
|
createdAt: Number(row2.created_at)
|
|
18479
18486
|
}), "transcriptRowOf");
|
|
18480
18487
|
|
|
18481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18482
18489
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18483
18490
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18484
18491
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18645,7 +18652,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18645
18652
|
}
|
|
18646
18653
|
}), "meetingReadsOver");
|
|
18647
18654
|
|
|
18648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18649
18656
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18650
18657
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18651
18658
|
const params = [input.accountId];
|
|
@@ -18688,7 +18695,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18688
18695
|
return { clauses, params };
|
|
18689
18696
|
}, "meetingSelectionSql");
|
|
18690
18697
|
|
|
18691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18692
18699
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18693
18700
|
async meetingChatLines(input) {
|
|
18694
18701
|
checkMeetingCancelled(input.signal);
|
|
@@ -18716,7 +18723,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18716
18723
|
}
|
|
18717
18724
|
}), "meetingChatLinesOver");
|
|
18718
18725
|
|
|
18719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18720
18727
|
var MESSAGE_FIELDS = {
|
|
18721
18728
|
pk: messages.id,
|
|
18722
18729
|
nativeId: messages.externalId,
|
|
@@ -18883,7 +18890,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18883
18890
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18884
18891
|
}), "chatActivity");
|
|
18885
18892
|
|
|
18886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18887
18894
|
var HIT_FIELDS = {
|
|
18888
18895
|
...MESSAGE_FIELDS,
|
|
18889
18896
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18982,7 +18989,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18982
18989
|
};
|
|
18983
18990
|
}, "directReplies");
|
|
18984
18991
|
|
|
18985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18986
18993
|
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");
|
|
18987
18994
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18988
18995
|
const found2 = identityRow(context, ref3);
|
|
@@ -19113,7 +19120,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
19113
19120
|
}, "mentioning");
|
|
19114
19121
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
19115
19122
|
|
|
19116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
19117
19124
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
19118
19125
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
19119
19126
|
}, "missing");
|
|
@@ -19235,7 +19242,7 @@ function meetingContextLinksOver(context) {
|
|
|
19235
19242
|
}
|
|
19236
19243
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19237
19244
|
|
|
19238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19239
19246
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19240
19247
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19241
19248
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19264,7 +19271,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19264
19271
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19265
19272
|
}, "indexedText");
|
|
19266
19273
|
|
|
19267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19268
19275
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19269
19276
|
var meetingCurrentIndexRows = `
|
|
19270
19277
|
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
|
|
@@ -19295,7 +19302,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19295
19302
|
}, "invalidateMeetingStems");
|
|
19296
19303
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19297
19304
|
|
|
19298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19299
19306
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19300
19307
|
return {
|
|
19301
19308
|
async indexSearch(original) {
|
|
@@ -19363,10 +19370,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19363
19370
|
}
|
|
19364
19371
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19365
19372
|
|
|
19366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19367
19374
|
import { createHash as createHash4 } from "node:crypto";
|
|
19368
19375
|
|
|
19369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19370
19377
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19371
19378
|
const padded = ` ${term} `;
|
|
19372
19379
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19375,7 +19382,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19375
19382
|
return [...pieces];
|
|
19376
19383
|
}, "trigrams");
|
|
19377
19384
|
|
|
19378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19379
19386
|
var SHORTEST_CORRECTION = 3;
|
|
19380
19387
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19381
19388
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19422,7 +19429,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19422
19429
|
return corrections;
|
|
19423
19430
|
}, "correctWords");
|
|
19424
19431
|
|
|
19425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19426
19433
|
var SHORTEST_GARBLED = 4;
|
|
19427
19434
|
var MOST_WIDENED = 64;
|
|
19428
19435
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19514,7 +19521,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19514
19521
|
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));
|
|
19515
19522
|
}, "widenWords");
|
|
19516
19523
|
|
|
19517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19518
19525
|
import { readFileSync } from "node:fs";
|
|
19519
19526
|
var loaded;
|
|
19520
19527
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19573,7 +19580,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19573
19580
|
return false;
|
|
19574
19581
|
}, "knownRussianWord");
|
|
19575
19582
|
|
|
19576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19577
19584
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19578
19585
|
var MOST_WORDS = 128;
|
|
19579
19586
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19800,7 +19807,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19800
19807
|
return check3(tree);
|
|
19801
19808
|
}, "matchMeetingText");
|
|
19802
19809
|
|
|
19803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19804
19811
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19805
19812
|
throw new CliError("validation_error", message2);
|
|
19806
19813
|
}, "fail");
|
|
@@ -19977,7 +19984,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19977
19984
|
}
|
|
19978
19985
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19979
19986
|
|
|
19980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19981
19988
|
import { createHash as createHash5 } from "node:crypto";
|
|
19982
19989
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19983
19990
|
if (value === void 0)
|
|
@@ -20067,7 +20074,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
20067
20074
|
}
|
|
20068
20075
|
}), "meetingParticipantSearchOver");
|
|
20069
20076
|
|
|
20070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
20071
20078
|
var preparationQueries = {
|
|
20072
20079
|
participants: {
|
|
20073
20080
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -20117,7 +20124,7 @@ var preparationQueries = {
|
|
|
20117
20124
|
}
|
|
20118
20125
|
};
|
|
20119
20126
|
|
|
20120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
20121
20128
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20122
20129
|
async preparationContext(original) {
|
|
20123
20130
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -20158,7 +20165,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20158
20165
|
}
|
|
20159
20166
|
}), "meetingPreparationContextOver");
|
|
20160
20167
|
|
|
20161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
20162
20169
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
20163
20170
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
20164
20171
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20172,7 +20179,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20172
20179
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20173
20180
|
)`, "preparationSubjects");
|
|
20174
20181
|
|
|
20175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20176
20183
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20177
20184
|
async preparationKnowledge(original) {
|
|
20178
20185
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20217,7 +20224,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20217
20224
|
}
|
|
20218
20225
|
}), "meetingPreparationKnowledgeOver");
|
|
20219
20226
|
|
|
20220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20221
20228
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20222
20229
|
async preparationNotes(original) {
|
|
20223
20230
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20270,7 +20277,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20270
20277
|
}
|
|
20271
20278
|
}), "meetingPreparationNotesOver");
|
|
20272
20279
|
|
|
20273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20274
20281
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20275
20282
|
async relatedHistory(original) {
|
|
20276
20283
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20341,7 +20348,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20341
20348
|
}
|
|
20342
20349
|
}), "meetingRelatedHistoryOver");
|
|
20343
20350
|
|
|
20344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20345
20352
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20346
20353
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20347
20354
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20422,7 +20429,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20422
20429
|
}
|
|
20423
20430
|
}), "meetingReviewOver");
|
|
20424
20431
|
|
|
20425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20426
20433
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20427
20434
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20428
20435
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20476,7 +20483,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20476
20483
|
}
|
|
20477
20484
|
}), "meetingSeriesHistoryOver");
|
|
20478
20485
|
|
|
20479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20480
20487
|
var MOST_ROWS = 5e5;
|
|
20481
20488
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20482
20489
|
async meetingStats(input) {
|
|
@@ -20523,7 +20530,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20523
20530
|
}
|
|
20524
20531
|
}), "meetingStatsOver");
|
|
20525
20532
|
|
|
20526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20527
20534
|
var CURSOR_KEY = "meetings";
|
|
20528
20535
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20529
20536
|
id: Number(row2.id),
|
|
@@ -21075,7 +21082,33 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
21075
21082
|
};
|
|
21076
21083
|
}, "meetingStoreOver");
|
|
21077
21084
|
|
|
21078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
21086
|
+
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
21087
|
+
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
21088
|
+
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
21089
|
+
}, "syncStateOf");
|
|
21090
|
+
var writeState = /* @__PURE__ */ __name(({ orm, now: now2 }, accountKey, name, value) => {
|
|
21091
|
+
orm.insert(syncCursors).values({ accountId: accountKey, key: name, value, createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
21092
|
+
target: [syncCursors.accountId, syncCursors.key],
|
|
21093
|
+
set: { value: sql`excluded.value`, updatedAt: sql`excluded.updated_at` }
|
|
21094
|
+
}).run();
|
|
21095
|
+
}, "writeState");
|
|
21096
|
+
var clearState = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
21097
|
+
orm.delete(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).run();
|
|
21098
|
+
}, "clearState");
|
|
21099
|
+
var claim2 = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, anchor, holder, forMs) => {
|
|
21100
|
+
const at = now2();
|
|
21101
|
+
return orm.insert(fetchLeases).values({ chatId: chatKey, anchor, holder, expiresAt: at + forMs }).onConflictDoUpdate({
|
|
21102
|
+
target: [fetchLeases.chatId, fetchLeases.anchor],
|
|
21103
|
+
set: { holder: sql`excluded.holder`, expiresAt: sql`excluded.expires_at` },
|
|
21104
|
+
setWhere: or(eq(fetchLeases.holder, sql`excluded.holder`), lte(fetchLeases.expiresAt, at))
|
|
21105
|
+
}).returning({ chatId: fetchLeases.chatId }).all().length > 0;
|
|
21106
|
+
}, "claim");
|
|
21107
|
+
var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
21108
|
+
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
21109
|
+
}, "release");
|
|
21110
|
+
|
|
21111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
21079
21112
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
21080
21113
|
id: `email:${place.emailId}`,
|
|
21081
21114
|
chatId: place.threadExternalId,
|
|
@@ -21408,12 +21441,21 @@ var emailHitsByPk = /* @__PURE__ */ __name((database, pks) => {
|
|
|
21408
21441
|
];
|
|
21409
21442
|
});
|
|
21410
21443
|
}, "emailHitsByPk");
|
|
21411
|
-
var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = stemmerCache()) => ({
|
|
21444
|
+
var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemmerFor2 = stemmerCache()) => ({
|
|
21412
21445
|
rules: mailRulesOver(database),
|
|
21413
21446
|
async saveThread(input) {
|
|
21414
21447
|
const id2 = write(database, () => saveThread(database, orm, input));
|
|
21415
21448
|
return threadDetails(database, id2);
|
|
21416
21449
|
},
|
|
21450
|
+
async saveThreads(inputs, states = []) {
|
|
21451
|
+
const ids = write(database, () => {
|
|
21452
|
+
const saved = inputs.map((input) => saveThread(database, orm, input));
|
|
21453
|
+
for (const { accountId, name, value } of states)
|
|
21454
|
+
writeState({ orm, now: now2 }, accountId, name, value);
|
|
21455
|
+
return saved;
|
|
21456
|
+
});
|
|
21457
|
+
return ids.map((id2) => threadDetails(database, id2));
|
|
21458
|
+
},
|
|
21417
21459
|
async threads(filter = {}) {
|
|
21418
21460
|
const [limit, offset] = page(filter);
|
|
21419
21461
|
return database.prepare(`SELECT * FROM email_threads WHERE (? IS NULL OR account_id = ?) AND (? OR deleted_at IS NULL)
|
|
@@ -21472,7 +21514,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = ste
|
|
|
21472
21514
|
dmarc: str(row2.dmarc)
|
|
21473
21515
|
}));
|
|
21474
21516
|
},
|
|
21475
|
-
async setSenderScores(accountId, scores,
|
|
21517
|
+
async setSenderScores(accountId, scores, now3) {
|
|
21476
21518
|
return write(database, () => {
|
|
21477
21519
|
const link3 = database.prepare(`INSERT INTO account_identities
|
|
21478
21520
|
(account_id, identity_id, created_at, updated_at, mail_score, mail_signals, mail_scored_at, mail_demoted)
|
|
@@ -21481,7 +21523,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = ste
|
|
|
21481
21523
|
mail_signals = excluded.mail_signals, mail_scored_at = excluded.mail_scored_at,
|
|
21482
21524
|
mail_demoted = excluded.mail_demoted`);
|
|
21483
21525
|
for (const { address, score, signals, demoted } of scores)
|
|
21484
|
-
link3.run(accountId, identityOf2(database, { address, name: null },
|
|
21526
|
+
link3.run(accountId, identityOf2(database, { address, name: null }, now3), now3, now3, score, JSON.stringify(signals), now3, demoted ? 1 : null);
|
|
21485
21527
|
return scores.length;
|
|
21486
21528
|
});
|
|
21487
21529
|
},
|
|
@@ -21494,9 +21536,9 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = ste
|
|
|
21494
21536
|
kind: str(b.kind)
|
|
21495
21537
|
}));
|
|
21496
21538
|
},
|
|
21497
|
-
async setMailboxes(accountId, scanned, found2,
|
|
21539
|
+
async setMailboxes(accountId, scanned, found2, now3) {
|
|
21498
21540
|
return write(database, () => {
|
|
21499
|
-
const boxes = new Map(scanned.map((box) => [box.externalId, mailboxPk(database, accountId, box,
|
|
21541
|
+
const boxes = new Map(scanned.map((box) => [box.externalId, mailboxPk(database, accountId, box, now3)]));
|
|
21500
21542
|
const lookup = database.prepare("SELECT id FROM emails WHERE account_id = ? AND external_id = ?");
|
|
21501
21543
|
const leave = database.prepare(`DELETE FROM email_mailboxes WHERE email_id = ? AND mailbox_id IN (SELECT value FROM json_each(?))
|
|
21502
21544
|
AND mailbox_id NOT IN (SELECT value FROM json_each(?))`);
|
|
@@ -21513,22 +21555,22 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = ste
|
|
|
21513
21555
|
});
|
|
21514
21556
|
leave.run(Number(row2.id), JSON.stringify([...boxes.values()]), JSON.stringify(kept));
|
|
21515
21557
|
for (const pk of kept)
|
|
21516
|
-
join(database, Number(row2.id), pk,
|
|
21558
|
+
join(database, Number(row2.id), pk, now3);
|
|
21517
21559
|
count++;
|
|
21518
21560
|
}
|
|
21519
21561
|
return count;
|
|
21520
21562
|
});
|
|
21521
21563
|
},
|
|
21522
|
-
async setFlags(accountId, flags,
|
|
21564
|
+
async setFlags(accountId, flags, now3) {
|
|
21523
21565
|
return write(database, () => {
|
|
21524
|
-
return setEmailFlags(database, accountId, flags,
|
|
21566
|
+
return setEmailFlags(database, accountId, flags, now3);
|
|
21525
21567
|
});
|
|
21526
21568
|
},
|
|
21527
21569
|
folderEmails: /* @__PURE__ */ __name(async (accountId, folder, uidvalidity) => folderEmails(database, accountId, folder, uidvalidity), "folderEmails"),
|
|
21528
21570
|
setLocations: /* @__PURE__ */ __name(async (accountId, folder, uidvalidity, found2) => write(database, () => setLocations(database, accountId, folder, uidvalidity, found2)), "setLocations"),
|
|
21529
21571
|
forgetLocations: /* @__PURE__ */ __name(async (accountId, folder, uidvalidity, uids) => write(database, () => forgetLocations(database, accountId, folder, uidvalidity, uids)), "forgetLocations"),
|
|
21530
|
-
markDeleted: /* @__PURE__ */ __name(async (accountId, externalIds,
|
|
21531
|
-
markRestored: /* @__PURE__ */ __name(async (accountId, externalIds,
|
|
21572
|
+
markDeleted: /* @__PURE__ */ __name(async (accountId, externalIds, now3) => write(database, () => markEmailsDeleted(database, accountId, externalIds, now3)), "markDeleted"),
|
|
21573
|
+
markRestored: /* @__PURE__ */ __name(async (accountId, externalIds, now3) => write(database, () => markEmailsRestored(database, accountId, externalIds, now3)), "markRestored"),
|
|
21532
21574
|
async chunksToEmbed(model, { after: after2, limit }) {
|
|
21533
21575
|
drainEmailIndex(database, stemmerFor2);
|
|
21534
21576
|
const file = database.prepare("SELECT text FROM attachments WHERE id = ?");
|
|
@@ -21623,7 +21665,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor2 = ste
|
|
|
21623
21665
|
}
|
|
21624
21666
|
}), "mailStoreOver");
|
|
21625
21667
|
|
|
21626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21627
21669
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21628
21670
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21629
21671
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21713,7 +21755,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21713
21755
|
}, "knownWord");
|
|
21714
21756
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21715
21757
|
|
|
21716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21717
21759
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21718
21760
|
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");
|
|
21719
21761
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21799,7 +21841,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21799
21841
|
return found2;
|
|
21800
21842
|
}, "spokenTranscripts");
|
|
21801
21843
|
|
|
21802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21803
21845
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21804
21846
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21805
21847
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21846,7 +21888,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21846
21888
|
});
|
|
21847
21889
|
}, "placeHits");
|
|
21848
21890
|
|
|
21849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21850
21892
|
var MESSAGES2 = {
|
|
21851
21893
|
rows: "messages",
|
|
21852
21894
|
threads: "chats",
|
|
@@ -21882,17 +21924,18 @@ var GROUPS = {
|
|
|
21882
21924
|
var matchQuery = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution), "matchQuery");
|
|
21883
21925
|
var countQuery = /* @__PURE__ */ __name((context, execution, by) => runQuery(context, execution, by), "countQuery");
|
|
21884
21926
|
var queryMessagePks = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution, "pks"), "queryMessagePks");
|
|
21885
|
-
var countMatches = /* @__PURE__ */ __name((context, execution, cap) =>
|
|
21927
|
+
var countMatches = /* @__PURE__ */ __name((context, execution, cap) => matchingPks(context, execution, cap)?.length, "countMatches");
|
|
21928
|
+
var matchingPks = /* @__PURE__ */ __name((context, execution, cap) => {
|
|
21886
21929
|
const { database, check: check3, where, from: from2, withRanking, ranked, leaves } = compileQuery(context, {
|
|
21887
21930
|
...execution,
|
|
21888
21931
|
newest: true
|
|
21889
21932
|
});
|
|
21890
21933
|
if (leaves.some(({ test }) => test))
|
|
21891
21934
|
return void 0;
|
|
21892
|
-
const
|
|
21935
|
+
const rows = database.prepare(`${withRanking}SELECT m.id ${from2} WHERE ${where.sql} LIMIT ?`).all(...ranked.params, ...where.params, cap + 1);
|
|
21893
21936
|
check3();
|
|
21894
|
-
return
|
|
21895
|
-
}, "
|
|
21937
|
+
return rows.map(({ id: id2 }) => Number(id2));
|
|
21938
|
+
}, "matchingPks");
|
|
21896
21939
|
var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachments = false) => {
|
|
21897
21940
|
const { database } = context;
|
|
21898
21941
|
const corpus = execution.corpus === "mail" ? MAIL : MESSAGES2;
|
|
@@ -22319,7 +22362,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22319
22362
|
};
|
|
22320
22363
|
}, "runQuery");
|
|
22321
22364
|
|
|
22322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22323
22366
|
function invalidMetadata() {
|
|
22324
22367
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22325
22368
|
}
|
|
@@ -22421,7 +22464,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22421
22464
|
};
|
|
22422
22465
|
}), "counterTargets");
|
|
22423
22466
|
|
|
22424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22425
22468
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22426
22469
|
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,
|
|
22427
22470
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22540,7 +22583,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22540
22583
|
}));
|
|
22541
22584
|
}, "attachmentViews");
|
|
22542
22585
|
|
|
22543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22544
22587
|
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");
|
|
22545
22588
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22546
22589
|
const { orm, database, now: now2 } = context;
|
|
@@ -22578,7 +22621,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22578
22621
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22579
22622
|
}, "intoVoiceAttachment");
|
|
22580
22623
|
|
|
22581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22582
22625
|
var FIELDS = [
|
|
22583
22626
|
"threadExternalId",
|
|
22584
22627
|
"senderIdentityId",
|
|
@@ -22895,33 +22938,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22895
22938
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22896
22939
|
}, "writeDerivedReactions");
|
|
22897
22940
|
|
|
22898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22899
|
-
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
22900
|
-
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
22901
|
-
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
22902
|
-
}, "syncStateOf");
|
|
22903
|
-
var writeState = /* @__PURE__ */ __name(({ orm, now: now2 }, accountKey, name, value) => {
|
|
22904
|
-
orm.insert(syncCursors).values({ accountId: accountKey, key: name, value, createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
22905
|
-
target: [syncCursors.accountId, syncCursors.key],
|
|
22906
|
-
set: { value: sql`excluded.value`, updatedAt: sql`excluded.updated_at` }
|
|
22907
|
-
}).run();
|
|
22908
|
-
}, "writeState");
|
|
22909
|
-
var clearState = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
22910
|
-
orm.delete(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).run();
|
|
22911
|
-
}, "clearState");
|
|
22912
|
-
var claim2 = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, anchor, holder, forMs) => {
|
|
22913
|
-
const at = now2();
|
|
22914
|
-
return orm.insert(fetchLeases).values({ chatId: chatKey, anchor, holder, expiresAt: at + forMs }).onConflictDoUpdate({
|
|
22915
|
-
target: [fetchLeases.chatId, fetchLeases.anchor],
|
|
22916
|
-
set: { holder: sql`excluded.holder`, expiresAt: sql`excluded.expires_at` },
|
|
22917
|
-
setWhere: or(eq(fetchLeases.holder, sql`excluded.holder`), lte(fetchLeases.expiresAt, at))
|
|
22918
|
-
}).returning({ chatId: fetchLeases.chatId }).all().length > 0;
|
|
22919
|
-
}, "claim");
|
|
22920
|
-
var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
22921
|
-
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
22922
|
-
}, "release");
|
|
22923
|
-
|
|
22924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22941
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22925
22942
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22926
22943
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22927
22944
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22942,7 +22959,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22942
22959
|
};
|
|
22943
22960
|
}, "keysOver");
|
|
22944
22961
|
|
|
22945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22946
22963
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22947
22964
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22948
22965
|
if (!row2)
|
|
@@ -22977,7 +22994,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22977
22994
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22978
22995
|
}, "saveProfile");
|
|
22979
22996
|
|
|
22980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22981
22998
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22982
22999
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22983
23000
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -23013,7 +23030,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
23013
23030
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
23014
23031
|
}, "originOfActor");
|
|
23015
23032
|
|
|
23016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
23017
23034
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
23018
23035
|
const owner = ownerPerson(context.database).id;
|
|
23019
23036
|
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);
|
|
@@ -23034,7 +23051,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
23034
23051
|
return personOf(context, ref3);
|
|
23035
23052
|
}, "linkToOwner");
|
|
23036
23053
|
|
|
23037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
23038
23055
|
var PROVIDERS_SETTING = "providers";
|
|
23039
23056
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
23040
23057
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -23069,7 +23086,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
23069
23086
|
});
|
|
23070
23087
|
}, "registerProvider");
|
|
23071
23088
|
|
|
23072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
23073
23090
|
var DAY3 = 864e5;
|
|
23074
23091
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
23075
23092
|
var TEXT_LIMIT = 20;
|
|
@@ -23268,7 +23285,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23268
23285
|
};
|
|
23269
23286
|
}, "taskSimilarityOver");
|
|
23270
23287
|
|
|
23271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23272
23289
|
var SETTING3 = "taskCategories";
|
|
23273
23290
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23274
23291
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23287,7 +23304,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23287
23304
|
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);
|
|
23288
23305
|
}, "saveTaskCategories");
|
|
23289
23306
|
|
|
23290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23291
23308
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23292
23309
|
var ALLOWED = "taskAgentClose";
|
|
23293
23310
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23343,7 +23360,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23343
23360
|
];
|
|
23344
23361
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23345
23362
|
|
|
23346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
23347
23364
|
var EXCERPT_CHARS = 280;
|
|
23348
23365
|
var excerptOf = /* @__PURE__ */ __name((text5) => {
|
|
23349
23366
|
if (text5 == null)
|
|
@@ -23386,7 +23403,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => database.pre
|
|
|
23386
23403
|
};
|
|
23387
23404
|
}), "evidenceSourcesOf");
|
|
23388
23405
|
|
|
23389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23390
23407
|
import { randomBytes } from "node:crypto";
|
|
23391
23408
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23392
23409
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23399,7 +23416,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23399
23416
|
return time3 + random;
|
|
23400
23417
|
}, "ulid");
|
|
23401
23418
|
|
|
23402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23403
23420
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23404
23421
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23405
23422
|
if (!meta && !sections?.length)
|
|
@@ -23420,7 +23437,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23420
23437
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23421
23438
|
}, "languageOf");
|
|
23422
23439
|
|
|
23423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23424
23441
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23425
23442
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23426
23443
|
if (isObject(value))
|
|
@@ -23663,7 +23680,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23663
23680
|
};
|
|
23664
23681
|
}, "filesStoreOver");
|
|
23665
23682
|
|
|
23666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23667
23684
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23668
23685
|
entity: "document",
|
|
23669
23686
|
backend: "sql",
|
|
@@ -23709,7 +23726,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23709
23726
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23710
23727
|
}, "importedDocumentWhere");
|
|
23711
23728
|
|
|
23712
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23713
23730
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23714
23731
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23715
23732
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -24219,7 +24236,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24219
24236
|
};
|
|
24220
24237
|
}, "notesStoreOver");
|
|
24221
24238
|
|
|
24222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24223
24240
|
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";
|
|
24224
24241
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24225
24242
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24266,6 +24283,16 @@ var subjectOf = /* @__PURE__ */ __name((database, row2) => {
|
|
|
24266
24283
|
subjectIsOwner: Number(named2?.owner) === 1
|
|
24267
24284
|
};
|
|
24268
24285
|
}, "subjectOf");
|
|
24286
|
+
var highestKey = /* @__PURE__ */ __name((table) => `ids.${table}.highest`, "highestKey");
|
|
24287
|
+
var nextId = /* @__PURE__ */ __name((database, table) => {
|
|
24288
|
+
const kept = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(highestKey(table));
|
|
24289
|
+
const highest = database.prepare(`SELECT max(id) AS id FROM ${table}`).get();
|
|
24290
|
+
return Math.max(Number(kept?.value ?? 0), Number(highest?.id ?? 0)) + 1;
|
|
24291
|
+
}, "nextId");
|
|
24292
|
+
var keepHighestId = /* @__PURE__ */ __name((database, table, at) => {
|
|
24293
|
+
const highest = nextId(database, table) - 1;
|
|
24294
|
+
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(highestKey(table), String(highest), at);
|
|
24295
|
+
}, "keepHighestId");
|
|
24269
24296
|
var dropLinksOf = /* @__PURE__ */ __name((database, thing) => {
|
|
24270
24297
|
const count = Number(database.prepare("SELECT count(*) AS n FROM links WHERE (from_type = ? AND from_id = ?) OR (to_type = ? AND to_id = ?)").get(thing.type, thing.id, thing.type, thing.id)?.n);
|
|
24271
24298
|
database.prepare("DELETE FROM links WHERE to_type = ? AND to_id = ?").run(thing.type, thing.id);
|
|
@@ -24344,7 +24371,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24344
24371
|
const subject2 = input.subject === void 0 ? void 0 : requiredThing(database, input.subject, "the subject");
|
|
24345
24372
|
const replaced = input.supersedes === void 0 ? void 0 : Number(rowOf(input.supersedes).id);
|
|
24346
24373
|
const at = now2();
|
|
24347
|
-
const made = Number(database.prepare("INSERT INTO memories (kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(kind3, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, at, at)?.id);
|
|
24374
|
+
const made = Number(database.prepare("INSERT INTO memories (id, kind, body, subject_type, subject_id, author_type, author_id, model, confidence, status, last_verified_at, supersedes_id, scope, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "memories"), kind3, body2, subject2?.type ?? null, subject2?.id ?? null, actor.type, actor.id, model, input.confidence ?? null, status, status === "confirmed" ? at : null, replaced ?? null, scope3, at, at)?.id);
|
|
24348
24375
|
linkEvidence(context, { type: "memory", id: made }, input.evidence, input.author === "owner" ? "owner" : "agent");
|
|
24349
24376
|
if (replaced !== void 0)
|
|
24350
24377
|
database.prepare("UPDATE memories SET status = 'superseded', updated_at = ? WHERE id = ?").run(at, replaced);
|
|
@@ -24362,6 +24389,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24362
24389
|
remove: /* @__PURE__ */ __name(async (reference2) => {
|
|
24363
24390
|
const id2 = Number(rowOf(reference2).id);
|
|
24364
24391
|
const links2 = erase(database, () => {
|
|
24392
|
+
keepHighestId(database, "memories", now2());
|
|
24365
24393
|
database.prepare("UPDATE memories SET supersedes_id = NULL WHERE supersedes_id = ?").run(id2);
|
|
24366
24394
|
const count = dropLinksOf(database, { type: "memory", id: id2 });
|
|
24367
24395
|
database.prepare("DELETE FROM memories WHERE id = ?").run(id2);
|
|
@@ -24383,7 +24411,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24383
24411
|
};
|
|
24384
24412
|
}, "memoriesStoreOver");
|
|
24385
24413
|
|
|
24386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24387
24415
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24388
24416
|
var KEY = "taskFirstPassPerChat";
|
|
24389
24417
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24403,7 +24431,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24403
24431
|
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);
|
|
24404
24432
|
}, "saveFirstPassPerChat");
|
|
24405
24433
|
|
|
24406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24407
24435
|
var TASK_RELATION_KINDS = [
|
|
24408
24436
|
"blocked-by",
|
|
24409
24437
|
"follow-up-of",
|
|
@@ -24533,7 +24561,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24533
24561
|
};
|
|
24534
24562
|
}, "taskRelationsStoreOver");
|
|
24535
24563
|
|
|
24536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24537
24565
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24538
24566
|
var TASK_EVENT_KINDS = [
|
|
24539
24567
|
"created",
|
|
@@ -24820,7 +24848,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
24820
24848
|
};
|
|
24821
24849
|
}, "workTasksOver");
|
|
24822
24850
|
|
|
24823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
24824
24852
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
24825
24853
|
const { database, now: now2 } = context;
|
|
24826
24854
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -24866,7 +24894,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
24866
24894
|
};
|
|
24867
24895
|
}, "taskCloseOver");
|
|
24868
24896
|
|
|
24869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
24870
24898
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
24871
24899
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
24872
24900
|
const { database, now: now2 } = context;
|
|
@@ -25085,7 +25113,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
25085
25113
|
};
|
|
25086
25114
|
}, "taskPairsOver");
|
|
25087
25115
|
|
|
25088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
25089
25117
|
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";
|
|
25090
25118
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25091
25119
|
const { database, now: now2 } = context;
|
|
@@ -25280,7 +25308,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25280
25308
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25281
25309
|
}, "oneOf");
|
|
25282
25310
|
|
|
25283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25284
25312
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25285
25313
|
const { database } = context;
|
|
25286
25314
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25325,7 +25353,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25325
25353
|
};
|
|
25326
25354
|
}, "accountsStoreOver");
|
|
25327
25355
|
|
|
25328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25329
25357
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25330
25358
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25331
25359
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25349,7 +25377,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25349
25377
|
})), "keepDownloads");
|
|
25350
25378
|
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");
|
|
25351
25379
|
|
|
25352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25353
25381
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25354
25382
|
const { database } = context;
|
|
25355
25383
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25406,7 +25434,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25406
25434
|
}, "keepAttachmentText")
|
|
25407
25435
|
}), "attachmentsStoreOver");
|
|
25408
25436
|
|
|
25409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25410
25438
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25411
25439
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25412
25440
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25586,7 +25614,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25586
25614
|
return done;
|
|
25587
25615
|
}, "rekeyChats");
|
|
25588
25616
|
|
|
25589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25590
25618
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25591
25619
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25592
25620
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25618,7 +25646,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25618
25646
|
});
|
|
25619
25647
|
}, "chatCompleteness");
|
|
25620
25648
|
|
|
25621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25622
25650
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25623
25651
|
const { database } = context;
|
|
25624
25652
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -25725,7 +25753,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25725
25753
|
};
|
|
25726
25754
|
}, "chatsStoreOver");
|
|
25727
25755
|
|
|
25728
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
25729
25757
|
import { createHash as createHash6 } from "node:crypto";
|
|
25730
25758
|
var BATCH_CONTEXT = 50;
|
|
25731
25759
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -25863,7 +25891,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
25863
25891
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
25864
25892
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
25865
25893
|
|
|
25866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
25867
25895
|
import { setTimeout } from "node:timers/promises";
|
|
25868
25896
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
25869
25897
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -26175,7 +26203,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
26175
26203
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
26176
26204
|
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");
|
|
26177
26205
|
|
|
26178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
26179
26207
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26180
26208
|
const { database } = context;
|
|
26181
26209
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26282,7 +26310,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26282
26310
|
};
|
|
26283
26311
|
}, "conversationsStoreOver");
|
|
26284
26312
|
|
|
26285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26286
26314
|
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";
|
|
26287
26315
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26288
26316
|
const { database } = context;
|
|
@@ -26307,7 +26335,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26307
26335
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26308
26336
|
}), "countersStoreOver");
|
|
26309
26337
|
|
|
26310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26311
26339
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26312
26340
|
var MENTION_QUERY = defineQuery({
|
|
26313
26341
|
entity: "mention",
|
|
@@ -26523,7 +26551,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26523
26551
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26524
26552
|
}, "listPlaces");
|
|
26525
26553
|
|
|
26526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26527
26555
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26528
26556
|
const { database } = context;
|
|
26529
26557
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26558,7 +26586,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26558
26586
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26559
26587
|
}), "mentionsStoreOver");
|
|
26560
26588
|
|
|
26561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26562
26590
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26563
26591
|
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");
|
|
26564
26592
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26573,7 +26601,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26573
26601
|
}));
|
|
26574
26602
|
}, "documentLinkMessages");
|
|
26575
26603
|
|
|
26576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26577
26605
|
var stemmerFor = stemmerCache();
|
|
26578
26606
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26579
26607
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -26583,13 +26611,12 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
26583
26611
|
if (!wanted.length || !stemmers || !stemsState(database)?.ready)
|
|
26584
26612
|
return wanted.map(() => []);
|
|
26585
26613
|
const stemmer = stemmerFor(stemmers);
|
|
26586
|
-
database.
|
|
26587
|
-
const count = database.prepare("SELECT doc FROM temp.message_stem_counts WHERE term = ? AND col = 'stems'");
|
|
26614
|
+
const count = database.prepare("SELECT count(*) AS doc FROM (SELECT rowid FROM message_stems WHERE message_stems MATCH ? LIMIT ?)");
|
|
26588
26615
|
const counts = /* @__PURE__ */ new Map();
|
|
26589
26616
|
const countOf = /* @__PURE__ */ __name((stem) => {
|
|
26590
26617
|
let found2 = counts.get(stem);
|
|
26591
26618
|
if (found2 === void 0) {
|
|
26592
|
-
found2 = Number(count.get(stem)?.doc ?? 0);
|
|
26619
|
+
found2 = Number(count.get(`stems : "${stem.replaceAll('"', '""')}"`, rareAt + 1)?.doc ?? 0);
|
|
26593
26620
|
counts.set(stem, found2);
|
|
26594
26621
|
}
|
|
26595
26622
|
return found2;
|
|
@@ -26618,7 +26645,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
26618
26645
|
});
|
|
26619
26646
|
}, "laterSharingRare");
|
|
26620
26647
|
|
|
26621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26622
26649
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26623
26650
|
const { database } = context;
|
|
26624
26651
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -26753,7 +26780,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26753
26780
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
26754
26781
|
}), "messagesStoreOver");
|
|
26755
26782
|
|
|
26756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
26757
26784
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
26758
26785
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
26759
26786
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -26810,7 +26837,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
26810
26837
|
});
|
|
26811
26838
|
}, "personPreparation");
|
|
26812
26839
|
|
|
26813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
26814
26841
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
26815
26842
|
const id2 = Number(uid);
|
|
26816
26843
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -26818,7 +26845,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
26818
26845
|
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)));
|
|
26819
26846
|
}, "personSeenInAccounts");
|
|
26820
26847
|
|
|
26821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
26822
26849
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
26823
26850
|
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);
|
|
26824
26851
|
if (!row2)
|
|
@@ -26884,7 +26911,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
26884
26911
|
return { id: id2, personId, removed: true };
|
|
26885
26912
|
}, "removeNote");
|
|
26886
26913
|
|
|
26887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
26888
26915
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
26889
26916
|
const { database } = context;
|
|
26890
26917
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -26959,13 +26986,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
26959
26986
|
};
|
|
26960
26987
|
}, "peopleStoreOver");
|
|
26961
26988
|
|
|
26962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
26963
26990
|
import { createHash as createHash8 } from "node:crypto";
|
|
26964
26991
|
|
|
26965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26966
26993
|
import { createHash as createHash7 } from "node:crypto";
|
|
26967
26994
|
|
|
26968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
26969
26996
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
26970
26997
|
var AUTHOR_MEASURES = [
|
|
26971
26998
|
"messages",
|
|
@@ -27105,7 +27132,7 @@ var withoutUrls = /* @__PURE__ */ __name((text5) => text5.replace(/\S+/gu, (toke
|
|
|
27105
27132
|
var rankingWords = /* @__PURE__ */ __name((text5) => withoutUrls(text5).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
27106
27133
|
var rankingQuestion = /* @__PURE__ */ __name((text5) => withoutUrls(text5).includes("?"), "rankingQuestion");
|
|
27107
27134
|
|
|
27108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
27109
27136
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
27110
27137
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
27111
27138
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -27327,7 +27354,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
27327
27354
|
};
|
|
27328
27355
|
}, "rankReplyGraph");
|
|
27329
27356
|
|
|
27330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27331
27358
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
27332
27359
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
27333
27360
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27501,7 +27528,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27501
27528
|
return { items, evidence, summary, graph: graph.quality };
|
|
27502
27529
|
}, "calculateAdminStatistics");
|
|
27503
27530
|
|
|
27504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27505
27532
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27506
27533
|
const dates = [];
|
|
27507
27534
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27523,7 +27550,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27523
27550
|
return dates[0].node.resolution.date;
|
|
27524
27551
|
}, "rankingContextRange");
|
|
27525
27552
|
|
|
27526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27527
27554
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27528
27555
|
let counts;
|
|
27529
27556
|
try {
|
|
@@ -27818,7 +27845,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27818
27845
|
});
|
|
27819
27846
|
}, "rankQuery");
|
|
27820
27847
|
|
|
27821
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27822
27849
|
function fail4(message2, reason = "query.too-large") {
|
|
27823
27850
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27824
27851
|
}
|
|
@@ -27995,7 +28022,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
27995
28022
|
return result;
|
|
27996
28023
|
}), "adminStatisticsQuery");
|
|
27997
28024
|
|
|
27998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
27999
28026
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
28000
28027
|
if (!execution.accounts.length)
|
|
28001
28028
|
return { conversations: [], chats: [] };
|
|
@@ -28013,7 +28040,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
28013
28040
|
return { conversations: conversations2, chats: chats2 };
|
|
28014
28041
|
}, "conversationEligibility");
|
|
28015
28042
|
|
|
28016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
28017
28044
|
import { createHash as createHash9 } from "node:crypto";
|
|
28018
28045
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
28019
28046
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -28163,7 +28190,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
28163
28190
|
return result;
|
|
28164
28191
|
}, "rankingEvidence");
|
|
28165
28192
|
|
|
28166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
28167
28194
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
28168
28195
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
28169
28196
|
if (execution.corpus === "mail")
|
|
@@ -28174,6 +28201,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28174
28201
|
matchQuery: /* @__PURE__ */ __name(async (execution) => matchQuery(context, mailIndexed(execution)), "matchQuery"),
|
|
28175
28202
|
countQuery: /* @__PURE__ */ __name(async (execution, by) => countQuery(context, mailIndexed(execution), by), "countQuery"),
|
|
28176
28203
|
countMatches: /* @__PURE__ */ __name(async (execution, cap) => countMatches(context, mailIndexed(execution), cap), "countMatches"),
|
|
28204
|
+
matchingPks: /* @__PURE__ */ __name(async (execution, cap) => matchingPks(context, mailIndexed(execution), cap), "matchingPks"),
|
|
28177
28205
|
conversationEligibility: /* @__PURE__ */ __name(async (execution) => conversationEligibility(context, execution), "conversationEligibility"),
|
|
28178
28206
|
rankQuery: /* @__PURE__ */ __name(async (execution, request) => rankQuery(context, execution, request), "rankQuery"),
|
|
28179
28207
|
rankingEvidence: /* @__PURE__ */ __name(async (execution, request) => rankingEvidence(context, execution, request), "rankingEvidence"),
|
|
@@ -28181,7 +28209,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28181
28209
|
};
|
|
28182
28210
|
}, "queriesStoreOver");
|
|
28183
28211
|
|
|
28184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
28185
28213
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
28186
28214
|
const { database, now: now2 } = context;
|
|
28187
28215
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -28220,10 +28248,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
28220
28248
|
}));
|
|
28221
28249
|
}, "chatEventsOf");
|
|
28222
28250
|
|
|
28223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28224
28252
|
import { createHash as createHash10 } from "node:crypto";
|
|
28225
28253
|
|
|
28226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
28227
28255
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
28228
28256
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
28229
28257
|
timeZone: zone,
|
|
@@ -28238,7 +28266,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
28238
28266
|
};
|
|
28239
28267
|
}, "calendarKey");
|
|
28240
28268
|
|
|
28241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
28242
28270
|
var RETENTION_TOLERANCE = 864e5;
|
|
28243
28271
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
28244
28272
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -28292,7 +28320,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
28292
28320
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
28293
28321
|
}, "retentionCohorts");
|
|
28294
28322
|
|
|
28295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28296
28324
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
28297
28325
|
var week = /* @__PURE__ */ __name((day) => {
|
|
28298
28326
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -28428,7 +28456,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
28428
28456
|
};
|
|
28429
28457
|
}, "retentionQuery");
|
|
28430
28458
|
|
|
28431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
28432
28460
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
28433
28461
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
28434
28462
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28559,7 +28587,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28559
28587
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28560
28588
|
})), "trackedChats");
|
|
28561
28589
|
|
|
28562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28563
28591
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28564
28592
|
const { database } = context;
|
|
28565
28593
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28615,7 +28643,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28615
28643
|
};
|
|
28616
28644
|
}, "rosterStoreOver");
|
|
28617
28645
|
|
|
28618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28619
28647
|
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");
|
|
28620
28648
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28621
28649
|
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 ?`);
|
|
@@ -28639,7 +28667,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28639
28667
|
}
|
|
28640
28668
|
}, "backfillNormalized");
|
|
28641
28669
|
|
|
28642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28643
28671
|
var INDEX2 = "message_words";
|
|
28644
28672
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28645
28673
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28766,7 +28794,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28766
28794
|
});
|
|
28767
28795
|
}, "resetSearchIndex");
|
|
28768
28796
|
|
|
28769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28770
28798
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28771
28799
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28772
28800
|
const before2 = stemsState(database);
|
|
@@ -28861,7 +28889,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
28861
28889
|
return resetStems(database, { now: now2 });
|
|
28862
28890
|
}, "followDefaultStemmers");
|
|
28863
28891
|
|
|
28864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
28865
28893
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
28866
28894
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
28867
28895
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -28883,7 +28911,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
28883
28911
|
});
|
|
28884
28912
|
}, "termCandidates");
|
|
28885
28913
|
|
|
28886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
28887
28915
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28888
28916
|
const { database } = context;
|
|
28889
28917
|
const stemmerFor2 = stemmerCache();
|
|
@@ -28905,7 +28933,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28905
28933
|
};
|
|
28906
28934
|
}, "searchIndexStoreOver");
|
|
28907
28935
|
|
|
28908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
28909
28937
|
var HISTORY_KEPT = 1e3;
|
|
28910
28938
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
28911
28939
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -28974,7 +29002,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
28974
29002
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
28975
29003
|
}, "clearHistory");
|
|
28976
29004
|
|
|
28977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
28978
29006
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28979
29007
|
const { database } = context;
|
|
28980
29008
|
return {
|
|
@@ -28998,7 +29026,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28998
29026
|
};
|
|
28999
29027
|
}, "searchesStoreOver");
|
|
29000
29028
|
|
|
29001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
29002
29030
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
29003
29031
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
29004
29032
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -29041,7 +29069,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
29041
29069
|
};
|
|
29042
29070
|
}, "agentActionsStoreOver");
|
|
29043
29071
|
|
|
29044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
29045
29073
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
29046
29074
|
}) => {
|
|
29047
29075
|
const { database, now: now2 } = context;
|
|
@@ -29100,7 +29128,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
29100
29128
|
};
|
|
29101
29129
|
}, "botUpdateStoreOver");
|
|
29102
29130
|
|
|
29103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
29104
29132
|
var DAY4 = 864e5;
|
|
29105
29133
|
var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
29106
29134
|
const clauses = ["e.deleted_at IS NULL"];
|
|
@@ -29119,6 +29147,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29119
29147
|
}, "dated");
|
|
29120
29148
|
dated("end_date > ?", filter.fromDate, "coalesce(e.ends_at, e.starts_at + 1) > ?", filter.from);
|
|
29121
29149
|
dated("start_date < ?", filter.toDate, "e.starts_at < ?", filter.to);
|
|
29150
|
+
dated("start_date >= ?", filter.startsFromDate, "e.starts_at >= ?", filter.startsFrom);
|
|
29122
29151
|
const longest = /* @__PURE__ */ __name(() => Number(database.prepare("SELECT coalesce(max(ends_at - starts_at), 0) AS ms FROM events WHERE deleted_at IS NULL").get()?.ms ?? 0), "longest");
|
|
29123
29152
|
if (filter.from !== void 0) {
|
|
29124
29153
|
clauses.push("e.starts_at >= ?");
|
|
@@ -29128,6 +29157,10 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29128
29157
|
clauses.push("e.starts_at < ?");
|
|
29129
29158
|
params.push(filter.to + DAY4);
|
|
29130
29159
|
}
|
|
29160
|
+
if (filter.startsFrom !== void 0 && filter.startsFromDate !== void 0) {
|
|
29161
|
+
clauses.push("e.starts_at >= ?");
|
|
29162
|
+
params.push(filter.startsFrom - DAY4);
|
|
29163
|
+
}
|
|
29131
29164
|
if (filter.calendarId !== void 0) {
|
|
29132
29165
|
clauses.push(entries("ce.calendar_id = ?"));
|
|
29133
29166
|
params.push(filter.calendarId);
|
|
@@ -29180,7 +29213,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29180
29213
|
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);
|
|
29181
29214
|
}, "listEvents");
|
|
29182
29215
|
|
|
29183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
29184
29217
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
29185
29218
|
id: Number(row2.id),
|
|
29186
29219
|
accountId: Number(row2.account_id),
|
|
@@ -29760,7 +29793,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29760
29793
|
};
|
|
29761
29794
|
}, "eventStoreOver");
|
|
29762
29795
|
|
|
29763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29764
29797
|
var CATALOG_QUERY = defineQuery({
|
|
29765
29798
|
entity: "document",
|
|
29766
29799
|
backend: "sql",
|
|
@@ -30002,7 +30035,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30002
30035
|
};
|
|
30003
30036
|
}, "catalogStoreOver");
|
|
30004
30037
|
|
|
30005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
30006
30039
|
import { createHash as createHash11 } from "node:crypto";
|
|
30007
30040
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
30008
30041
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -30100,7 +30133,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
30100
30133
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
30101
30134
|
}, "contextEvidenceRequest");
|
|
30102
30135
|
|
|
30103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
30104
30137
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
30105
30138
|
var field2 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
30106
30139
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -30113,7 +30146,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
30113
30146
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
30114
30147
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field2("sourceUrl")})`;
|
|
30115
30148
|
|
|
30116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
30117
30150
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
30118
30151
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
30119
30152
|
signal?.throwIfAborted();
|
|
@@ -30212,7 +30245,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
30212
30245
|
});
|
|
30213
30246
|
}, "readMeetingContextEvidence");
|
|
30214
30247
|
|
|
30215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
30216
30249
|
var corpora = {
|
|
30217
30250
|
message: {
|
|
30218
30251
|
table: "messages",
|
|
@@ -30441,7 +30474,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30441
30474
|
}
|
|
30442
30475
|
}), "contextRecordsOver");
|
|
30443
30476
|
|
|
30444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
30445
30478
|
var NOTE_FIELDS = [
|
|
30446
30479
|
"text",
|
|
30447
30480
|
"exact",
|
|
@@ -30871,7 +30904,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30871
30904
|
};
|
|
30872
30905
|
}, "noteSearchOver");
|
|
30873
30906
|
|
|
30874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
30875
30908
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
30876
30909
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
30877
30910
|
var EVENT_CORPUS = {
|
|
@@ -31003,7 +31036,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31003
31036
|
};
|
|
31004
31037
|
}, "eventSearchOver");
|
|
31005
31038
|
|
|
31006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31007
31040
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31008
31041
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31009
31042
|
if (/^document:[1-9]\d*$/.test(raw))
|
|
@@ -31016,7 +31049,7 @@ var reference = /* @__PURE__ */ __name((raw) => {
|
|
|
31016
31049
|
}, "reference");
|
|
31017
31050
|
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "evidence findings", singular: "evidence finding", cited: "reference", reference }), "validateEvidenceFindings");
|
|
31018
31051
|
|
|
31019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
31020
31053
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
31021
31054
|
try {
|
|
31022
31055
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -31028,7 +31061,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
31028
31061
|
}
|
|
31029
31062
|
}, "calendarMoment");
|
|
31030
31063
|
|
|
31031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
31032
31065
|
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";
|
|
31033
31066
|
var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31034
31067
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31096,7 +31129,7 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
31096
31129
|
const owner = input.by === "owner";
|
|
31097
31130
|
const { actor, model } = authorActor(context, input.by);
|
|
31098
31131
|
const at = now2();
|
|
31099
|
-
const made = Number(database.prepare("INSERT INTO facts (type, statement, status, project_id, subject_type, subject_id, occurred_at, supersedes_id, author_type, author_id, model, scope, source, created_at, updated_at) VALUES (?, ?, 'proposed', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(type, statement, project?.id ?? null, subject2?.type ?? null, subject2?.id ?? null, occurredAt, replaced === void 0 ? null : Number(replaced.id), actor.type, actor.id, model, scope3, owner ? "owner" : "agent", at, at)?.id);
|
|
31132
|
+
const made = Number(database.prepare("INSERT INTO facts (id, type, statement, status, project_id, subject_type, subject_id, occurred_at, supersedes_id, author_type, author_id, model, scope, source, created_at, updated_at) VALUES (?, ?, ?, 'proposed', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id").get(nextId(database, "facts"), type, statement, project?.id ?? null, subject2?.type ?? null, subject2?.id ?? null, occurredAt, replaced === void 0 ? null : Number(replaced.id), actor.type, actor.id, model, scope3, owner ? "owner" : "agent", at, at)?.id);
|
|
31100
31133
|
linkEvidence(context, { type: "fact", id: made }, input.evidence ?? [], owner ? "owner" : "agent");
|
|
31101
31134
|
if (input.createdFrom !== void 0) {
|
|
31102
31135
|
const from2 = requiredThing(database, input.createdFrom, "the source");
|
|
@@ -31140,6 +31173,9 @@ var factOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
31140
31173
|
const id2 = Number(row2.id);
|
|
31141
31174
|
const twin = row2.source === "memory" && row2.metadata != null ? migratedFrom(String(row2.metadata)) : void 0;
|
|
31142
31175
|
const links2 = erase(database, () => {
|
|
31176
|
+
keepHighestId(database, "facts", now2());
|
|
31177
|
+
if (twin !== void 0)
|
|
31178
|
+
keepHighestId(database, "memories", now2());
|
|
31143
31179
|
database.prepare("UPDATE facts SET supersedes_id = NULL WHERE supersedes_id = ?").run(id2);
|
|
31144
31180
|
const count = dropLinksOf(database, { type: "fact", id: id2 });
|
|
31145
31181
|
database.prepare("DELETE FROM links WHERE from_type = 'fact' AND from_id = ?").run(id2);
|
|
@@ -31176,7 +31212,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31176
31212
|
};
|
|
31177
31213
|
}, "factsStoreOver");
|
|
31178
31214
|
|
|
31179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
31180
31216
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
31181
31217
|
throw new CliError("validation_error", message2);
|
|
31182
31218
|
}, "invalid");
|
|
@@ -31266,7 +31302,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31266
31302
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
31267
31303
|
}, "findingsCoreOver");
|
|
31268
31304
|
|
|
31269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31270
31306
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31271
31307
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31272
31308
|
var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31412,7 +31448,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31412
31448
|
};
|
|
31413
31449
|
}, "proposedActionsStoreOver");
|
|
31414
31450
|
|
|
31415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
31416
31452
|
var stale = /* @__PURE__ */ __name(() => {
|
|
31417
31453
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
31418
31454
|
reason: "evidence-findings.stale"
|
|
@@ -31578,7 +31614,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31578
31614
|
};
|
|
31579
31615
|
}, "evidenceFindingsStoreOver");
|
|
31580
31616
|
|
|
31581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31582
31618
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31583
31619
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31584
31620
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31631,7 +31667,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31631
31667
|
}, "forPerson")
|
|
31632
31668
|
}), "involvementStoreOver");
|
|
31633
31669
|
|
|
31634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31635
31671
|
import { createHash as createHash12 } from "node:crypto";
|
|
31636
31672
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31637
31673
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31717,16 +31753,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31717
31753
|
};
|
|
31718
31754
|
}, "meetingProjectsStoreOver");
|
|
31719
31755
|
|
|
31720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31721
31757
|
import { createHash as createHash15 } from "node:crypto";
|
|
31722
31758
|
|
|
31723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31724
31760
|
import { createHash as createHash14 } from "node:crypto";
|
|
31725
31761
|
|
|
31726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31727
31763
|
import { createHash as createHash13 } from "node:crypto";
|
|
31728
31764
|
|
|
31729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31730
31766
|
var consolidationId = /* @__PURE__ */ __name((value, field3) => {
|
|
31731
31767
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31732
31768
|
throw new CliError("validation_error", `${field3} must be a positive canonical tag id`);
|
|
@@ -31777,7 +31813,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31777
31813
|
return input;
|
|
31778
31814
|
}, "consolidationApplyInput");
|
|
31779
31815
|
|
|
31780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31781
31817
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31782
31818
|
id: String(row2.id),
|
|
31783
31819
|
sourceId: String(row2.source_id),
|
|
@@ -31852,7 +31888,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
31852
31888
|
}, { beforeCommit: check3 });
|
|
31853
31889
|
}, "applyTagConsolidation");
|
|
31854
31890
|
|
|
31855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31856
31892
|
var selections = [
|
|
31857
31893
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
31858
31894
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -31996,7 +32032,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
31996
32032
|
};
|
|
31997
32033
|
}, "previewRows");
|
|
31998
32034
|
|
|
31999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32000
32036
|
var kinds = ["project", "tag", "topic"];
|
|
32001
32037
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
32002
32038
|
if (signal?.aborted)
|
|
@@ -32260,7 +32296,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32260
32296
|
};
|
|
32261
32297
|
}, "vocabularyStoreOver");
|
|
32262
32298
|
|
|
32263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
32264
32300
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
32265
32301
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
32266
32302
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32782,7 +32818,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32782
32818
|
return key2.padEnd(3, "X");
|
|
32783
32819
|
}, "projectKey");
|
|
32784
32820
|
|
|
32785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32786
32822
|
var DAY5 = 864e5;
|
|
32787
32823
|
var SETTING4 = "logs_pruned_at";
|
|
32788
32824
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -32809,7 +32845,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32809
32845
|
};
|
|
32810
32846
|
}, "logPruner");
|
|
32811
32847
|
|
|
32812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32813
32849
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32814
32850
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32815
32851
|
reason: "meeting-findings.stale"
|
|
@@ -32978,7 +33014,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32978
33014
|
};
|
|
32979
33015
|
}, "meetingFindingsStoreOver");
|
|
32980
33016
|
|
|
32981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
32982
33018
|
var RANK_BATCH = 512;
|
|
32983
33019
|
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";
|
|
32984
33020
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -33249,7 +33285,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
33249
33285
|
}
|
|
33250
33286
|
}), "meetingVectorsOver");
|
|
33251
33287
|
|
|
33252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
33253
33289
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
33254
33290
|
var TEXTS = {
|
|
33255
33291
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -33350,11 +33386,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33350
33386
|
};
|
|
33351
33387
|
}, "sourceMentionStoreOver");
|
|
33352
33388
|
|
|
33353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33354
33390
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
33355
33391
|
import { dirname } from "node:path";
|
|
33356
33392
|
|
|
33357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
33358
33394
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
33359
33395
|
var CLIENTS_SETTING = "clients";
|
|
33360
33396
|
var coreVersion = (() => {
|
|
@@ -33412,7 +33448,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
33412
33448
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
33413
33449
|
}, "refusalAdvice");
|
|
33414
33450
|
|
|
33415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
33416
33452
|
var GENERATED = [
|
|
33417
33453
|
{
|
|
33418
33454
|
"name": "20261010184427_initial",
|
|
@@ -34278,7 +34314,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
34278
34314
|
}
|
|
34279
34315
|
];
|
|
34280
34316
|
|
|
34281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
34282
34318
|
var MANIFEST = [
|
|
34283
34319
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
34284
34320
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -34356,7 +34392,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
34356
34392
|
return migrations;
|
|
34357
34393
|
}, "generatedMigrations");
|
|
34358
34394
|
|
|
34359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
34360
34396
|
var MIGRATIONS = generatedMigrations();
|
|
34361
34397
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
34362
34398
|
version INTEGER PRIMARY KEY,
|
|
@@ -34409,7 +34445,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
34409
34445
|
}
|
|
34410
34446
|
}, "migrate");
|
|
34411
34447
|
|
|
34412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
34413
34449
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
34414
34450
|
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 ?");
|
|
34415
34451
|
if (pending.get(0, 1) === void 0)
|
|
@@ -34431,7 +34467,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
34431
34467
|
}
|
|
34432
34468
|
}, "fillJoinKeys");
|
|
34433
34469
|
|
|
34434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
34435
34471
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
34436
34472
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
34437
34473
|
try {
|
|
@@ -34444,8 +34480,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
34444
34480
|
}, "openSqlite");
|
|
34445
34481
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34446
34482
|
quietSqliteWarning();
|
|
34447
|
-
const { drizzle } = await import("./node-
|
|
34448
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
34483
|
+
const { drizzle } = await import("./node-25IJLDBZ.js");
|
|
34484
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-DYR4FEI4.js");
|
|
34449
34485
|
const client = await nodeClient(path, { readOnly });
|
|
34450
34486
|
try {
|
|
34451
34487
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34455,8 +34491,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34455
34491
|
}
|
|
34456
34492
|
}, "openUnderNode");
|
|
34457
34493
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34458
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
34459
|
-
const { drizzle } = await import("./bun-
|
|
34494
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-FWBYHIXB.js");
|
|
34495
|
+
const { drizzle } = await import("./bun-DNEFTPTR.js");
|
|
34460
34496
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
34461
34497
|
try {
|
|
34462
34498
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34466,7 +34502,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34466
34502
|
}
|
|
34467
34503
|
}, "openUnderBun");
|
|
34468
34504
|
|
|
34469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
34470
34506
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
34471
34507
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
34472
34508
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -34481,7 +34517,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
34481
34517
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
34482
34518
|
}, "assertReadCompatible");
|
|
34483
34519
|
|
|
34484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
34485
34521
|
var BACKFILL_ON_OPEN = 5e3;
|
|
34486
34522
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
34487
34523
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34537,13 +34573,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34537
34573
|
}
|
|
34538
34574
|
}, "openStoreContext");
|
|
34539
34575
|
|
|
34540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34541
34577
|
import { createHash as createHash17 } from "node:crypto";
|
|
34542
34578
|
|
|
34543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34544
34580
|
import { createHash as createHash16 } from "node:crypto";
|
|
34545
34581
|
|
|
34546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34547
34583
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34548
34584
|
var ref = text3(2048);
|
|
34549
34585
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34609,7 +34645,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34609
34645
|
}))
|
|
34610
34646
|
});
|
|
34611
34647
|
|
|
34612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34613
34649
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34614
34650
|
var invalid7 = /* @__PURE__ */ __name((field3) => {
|
|
34615
34651
|
throw new CliError("validation_error", `invalid project annotations.${field3}`);
|
|
@@ -34742,7 +34778,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34742
34778
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
34743
34779
|
}, "projectAnnotationsFingerprint");
|
|
34744
34780
|
|
|
34745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34746
34782
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34747
34783
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34748
34784
|
var targetSchema = strictObject({
|
|
@@ -34849,7 +34885,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
34849
34885
|
}, "planBoundProjectAnnotations");
|
|
34850
34886
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
34851
34887
|
|
|
34852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
34853
34889
|
import { createHash as createHash18 } from "node:crypto";
|
|
34854
34890
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34855
34891
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34943,7 +34979,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34943
34979
|
})).digest("hex");
|
|
34944
34980
|
}, "projectAnnotationSnapshotFingerprint");
|
|
34945
34981
|
|
|
34946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
34947
34983
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
34948
34984
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
34949
34985
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -34960,7 +34996,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
34960
34996
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
34961
34997
|
}, "projectAnnotationRequest");
|
|
34962
34998
|
|
|
34963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
34964
35000
|
var SnapshotBudget = class {
|
|
34965
35001
|
static {
|
|
34966
35002
|
__name(this, "SnapshotBudget");
|
|
@@ -34986,13 +35022,13 @@ var SnapshotBudget = class {
|
|
|
34986
35022
|
}
|
|
34987
35023
|
};
|
|
34988
35024
|
|
|
34989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34990
35026
|
import { createHash as createHash20 } from "node:crypto";
|
|
34991
35027
|
|
|
34992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
34993
35029
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
34994
35030
|
|
|
34995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
34996
35032
|
import { createHash as createHash19 } from "node:crypto";
|
|
34997
35033
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
34998
35034
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -35135,7 +35171,7 @@ var ProjectSnapshotSources = class {
|
|
|
35135
35171
|
}
|
|
35136
35172
|
};
|
|
35137
35173
|
|
|
35138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
35139
35175
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
35140
35176
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
35141
35177
|
}, "unsupported");
|
|
@@ -35306,7 +35342,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
|
|
|
35306
35342
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
35307
35343
|
}), "projectAnnotationSnapshot");
|
|
35308
35344
|
|
|
35309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35310
35346
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, manifest, bindings, budget) => read(database, () => {
|
|
35311
35347
|
const current = projectAnnotationSnapshot(database, projectId, budget).snapshot;
|
|
35312
35348
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -35368,7 +35404,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
|
|
|
35368
35404
|
};
|
|
35369
35405
|
}), "previewAnnotationSnapshot");
|
|
35370
35406
|
|
|
35371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
35372
35408
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snapshot2, bindings) => {
|
|
35373
35409
|
const mappings = { ...bindings };
|
|
35374
35410
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -35387,7 +35423,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
|
|
|
35387
35423
|
const author = resolve(fact.author), confirmed = resolve(fact.confirmed_by);
|
|
35388
35424
|
if (!author)
|
|
35389
35425
|
throw new CliError("validation_error", "project annotation author is required");
|
|
35390
|
-
const row2 = database.prepare("INSERT INTO facts(type,statement,status,project_id,subject_type,subject_id,occurred_at,supersedes_id,author_type,author_id,model,confirmed_by_type,confirmed_by_id,scope,source,created_at,updated_at) VALUES(
|
|
35426
|
+
const row2 = database.prepare("INSERT INTO facts(id,type,statement,status,project_id,subject_type,subject_id,occurred_at,supersedes_id,author_type,author_id,model,confirmed_by_type,confirmed_by_id,scope,source,created_at,updated_at) VALUES(?,?,?,?,?,NULL,NULL,?,NULL,?,?,?,?,?,?,?,?,?) RETURNING id").get(nextId(database, "facts"), fact.type, fact.statement, fact.status, projectId, fact.occurred_at, author.type, author.id, fact.model, confirmed?.type ?? null, confirmed?.id ?? null, fact.scope, fact.source, fact.created_at, fact.updated_at);
|
|
35391
35427
|
if (!row2)
|
|
35392
35428
|
throw new CliError("configuration_error", "project annotation fact insertion failed");
|
|
35393
35429
|
mappings[fact.ref] = `fact:${row2.id}`;
|
|
@@ -35410,7 +35446,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
|
|
|
35410
35446
|
return mappings;
|
|
35411
35447
|
}, "restoreAnnotationRecords");
|
|
35412
35448
|
|
|
35413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
35414
35450
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35415
35451
|
async preview(request) {
|
|
35416
35452
|
const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request);
|
|
@@ -35440,7 +35476,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35440
35476
|
}
|
|
35441
35477
|
}), "projectAnnotationStoreOver");
|
|
35442
35478
|
|
|
35443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
35444
35480
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
35445
35481
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
35446
35482
|
let merged = { from: from2, to };
|
|
@@ -35453,7 +35489,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
35453
35489
|
}, "markRange");
|
|
35454
35490
|
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");
|
|
35455
35491
|
|
|
35456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
35457
35493
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
35458
35494
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
35459
35495
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -35463,7 +35499,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
35463
35499
|
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);
|
|
35464
35500
|
}, "setTaskRulesStop");
|
|
35465
35501
|
|
|
35466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
35467
35503
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35468
35504
|
const { database } = context;
|
|
35469
35505
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -35519,7 +35555,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35519
35555
|
};
|
|
35520
35556
|
}, "syncStoreOver");
|
|
35521
35557
|
|
|
35522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
35523
35559
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35524
35560
|
const { database } = context;
|
|
35525
35561
|
return {
|
|
@@ -35541,7 +35577,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35541
35577
|
};
|
|
35542
35578
|
}, "tagsStoreOver");
|
|
35543
35579
|
|
|
35544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35545
35581
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35546
35582
|
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
|
|
35547
35583
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35668,7 +35704,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35668
35704
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35669
35705
|
}, "savePictureChunks");
|
|
35670
35706
|
|
|
35671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35672
35708
|
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,
|
|
35673
35709
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35674
35710
|
FROM messages m
|
|
@@ -35715,6 +35751,12 @@ var messageRows = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model,
|
|
|
35715
35751
|
${since === void 0 ? sql`` : sql`AND m.sent_at >= ${since}`}
|
|
35716
35752
|
${before2 === void 0 ? sql`` : sql`AND m.sent_at < ${before2}`}
|
|
35717
35753
|
${"ids" in rows ? sql`AND k.id IN (SELECT value FROM json_each(${JSON.stringify(rows.ids)})) ORDER BY k.id` : sql`AND k.id > ${rows.after} ORDER BY k.id LIMIT ${SCAN_PAGE6}`}`), "messageRows");
|
|
35754
|
+
var scoreMessages = /* @__PURE__ */ __name(({ orm }, accountPk2, { model, query, pks }) => orm.all(sql`SELECT ch.external_id AS chatId, m.external_id AS messageId, v.vector
|
|
35755
|
+
FROM chunks k CROSS JOIN messages m ON m.id = k.chunkable_id AND m.deleted_at IS NULL
|
|
35756
|
+
JOIN chats ch ON ch.id = m.chat_id AND ch.searchable = 1
|
|
35757
|
+
JOIN embeddings v ON v.model = ${model} AND v.content_hash = k.content_hash
|
|
35758
|
+
WHERE k.chunkable_type = 'message' AND k.position = 0 AND k.account_id = ${accountPk2}
|
|
35759
|
+
AND k.chunkable_id IN (SELECT value FROM json_each(${JSON.stringify(pks)}))`).map(({ chatId, messageId, vector }) => ({ chatId, messageId, score: dot(query, vector) })).sort((a, b) => b.score - a.score), "scoreMessages");
|
|
35718
35760
|
var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, query, ...filter }) => {
|
|
35719
35761
|
const score = /* @__PURE__ */ __name((row2) => ({
|
|
35720
35762
|
id: row2.id,
|
|
@@ -35751,7 +35793,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35751
35793
|
return plain2(best(found2));
|
|
35752
35794
|
}, "nearestMessages");
|
|
35753
35795
|
|
|
35754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35755
35797
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35756
35798
|
const { database } = context;
|
|
35757
35799
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -35892,6 +35934,10 @@ var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
|
35892
35934
|
query
|
|
35893
35935
|
});
|
|
35894
35936
|
}, "nearestMessages"),
|
|
35937
|
+
scoreMessages: /* @__PURE__ */ __name(async (key2, options) => {
|
|
35938
|
+
const accountPk2 = findAccountPk2(key2);
|
|
35939
|
+
return accountPk2 === void 0 ? [] : scoreMessages(context, accountPk2, options);
|
|
35940
|
+
}, "scoreMessages"),
|
|
35895
35941
|
vectorStatus: /* @__PURE__ */ __name(async (key2, chatId, model) => {
|
|
35896
35942
|
const chatKey = chatKeyOf(key2, chatId);
|
|
35897
35943
|
return chatKey === void 0 ? { chunks: 0, embedded: 0 } : vectorStatus(context, chatKey, model);
|
|
@@ -36005,7 +36051,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
36005
36051
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
36006
36052
|
}), "vectorsStoreOver");
|
|
36007
36053
|
|
|
36008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
36009
36055
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
36010
36056
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
36011
36057
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -36093,10 +36139,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
36093
36139
|
}
|
|
36094
36140
|
}, "lastBackup");
|
|
36095
36141
|
|
|
36096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
36097
36143
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
36098
36144
|
|
|
36099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
36100
36146
|
var COUNTED_TABLES = [
|
|
36101
36147
|
"accounts",
|
|
36102
36148
|
"chats",
|
|
@@ -36181,7 +36227,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
36181
36227
|
};
|
|
36182
36228
|
}, "storeContents");
|
|
36183
36229
|
|
|
36184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
36185
36231
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
36186
36232
|
const context = await openStoreContext(options);
|
|
36187
36233
|
try {
|