@wirecat/tg-cli 0.104.0 → 0.106.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/tg.js +2 -2
- package/dist/bundle/{adapter-QTAHA2JC.js → adapter-TIGHDHUK.js} +115 -55
- package/dist/bundle/{all-profiles-7CXBVRFU.js → all-profiles-N4DLSGWY.js} +5 -5
- package/dist/bundle/{anthropic-FWBQ7JHT.js → anthropic-D2T2QRLR.js} +3 -3
- package/dist/bundle/{app-server-XF4GY2Y6.js → app-server-FZTDNSPB.js} +34 -34
- package/dist/bundle/{bot-api-XDMMWRYI.js → bot-api-OMUV6EIK.js} +38 -38
- package/dist/bundle/{bot-history-TU2X7RNN.js → bot-history-P2MWYLXW.js} +10 -10
- package/dist/bundle/{bun-6GSDPKNZ.js → bun-UA5PRMLC.js} +2 -2
- package/dist/bundle/{bun-sqlite-AO27E35V.js → bun-sqlite-XVRVJ7A2.js} +2 -2
- package/dist/bundle/{chunk-B7TTM75D.js → chunk-2GQCWNX5.js} +1 -1
- package/dist/bundle/{chunk-54RJDS3X.js → chunk-2J3TUUCO.js} +2 -2
- package/dist/bundle/{chunk-UDXRDFHN.js → chunk-67GS5BZI.js} +154 -142
- package/dist/bundle/{chunk-PHQTSF44.js → chunk-6BQUCCBD.js} +4 -4
- package/dist/bundle/{chunk-C5N7G6UH.js → chunk-6XXI3AHJ.js} +1 -1
- package/dist/bundle/{chunk-QY7MW7HK.js → chunk-7P6ZCUPN.js} +2 -2
- package/dist/bundle/{chunk-MB3PCNRL.js → chunk-ADLIUGL2.js} +2 -2
- package/dist/bundle/{chunk-FRZHF2X6.js → chunk-AQSKZMBD.js} +7 -7
- package/dist/bundle/{chunk-ZBH7Z6WX.js → chunk-BLWCHZCW.js} +2 -2
- package/dist/bundle/{chunk-LSQUNABH.js → chunk-BZUO2KFV.js} +1 -1
- package/dist/bundle/{chunk-7WHM3KNI.js → chunk-C2MKA7SX.js} +1 -1
- package/dist/bundle/{chunk-TJR37WKA.js → chunk-C6NTI37N.js} +10 -10
- package/dist/bundle/{chunk-LOFG3Q35.js → chunk-DC7O7TVJ.js} +1 -1
- package/dist/bundle/{chunk-BKVJNPA6.js → chunk-DECFDUNW.js} +11 -11
- package/dist/bundle/{chunk-HOR7DS3P.js → chunk-E5Z4FGRD.js} +25 -21
- package/dist/bundle/{chunk-P3WU6UYJ.js → chunk-ELQ5ORY2.js} +2929 -2852
- package/dist/bundle/{chunk-YBQ753RP.js → chunk-EPKGNUOZ.js} +26 -22
- package/dist/bundle/{chunk-BI2AXVHY.js → chunk-EUTOFAUT.js} +2 -2
- package/dist/bundle/{chunk-FUWSIEYY.js → chunk-EW3Y44NV.js} +9 -9
- package/dist/bundle/{chunk-MCD2GANK.js → chunk-FO33YFWF.js} +5 -5
- package/dist/bundle/{chunk-DANCAYRP.js → chunk-GD6BOLZP.js} +8 -6
- package/dist/bundle/{chunk-UVYY5EIS.js → chunk-GHAQXUH3.js} +1 -1
- package/dist/bundle/{chunk-RRWMYR2H.js → chunk-ID6TO5P5.js} +11 -9
- package/dist/bundle/{chunk-UTVANQN5.js → chunk-JOSUY2NX.js} +1 -1
- package/dist/bundle/{chunk-PWIE7VBL.js → chunk-LGKLQE2I.js} +1 -1
- package/dist/bundle/{chunk-GE22MYA6.js → chunk-LSP2NCNL.js} +55 -47
- package/dist/bundle/{chunk-6K4QGBXU.js → chunk-ONK66VVG.js} +18 -1
- package/dist/bundle/{chunk-3XZQQGCB.js → chunk-PAHBZPZN.js} +51 -47
- package/dist/bundle/{chunk-Y5PJQPMQ.js → chunk-PEIDCYF5.js} +1 -1
- package/dist/bundle/{chunk-QVTCOBN5.js → chunk-PHPXTRMS.js} +314 -263
- package/dist/bundle/{chunk-SZE6425L.js → chunk-QI75LME5.js} +26 -26
- package/dist/bundle/{chunk-Y3VNNLUT.js → chunk-QQYM26DA.js} +1 -1
- package/dist/bundle/{chunk-3GGU65YR.js → chunk-QWTHUKS4.js} +4 -4
- package/dist/bundle/{chunk-GZ5CR5QB.js → chunk-R2F6U4F3.js} +7 -7
- package/dist/bundle/{chunk-ADMV4WGV.js → chunk-T3ZLOMWW.js} +4 -4
- package/dist/bundle/{chunk-N6VHHMSZ.js → chunk-T4UTTH3A.js} +1 -1
- package/dist/bundle/{chunk-KRLCUBII.js → chunk-T5OFRHDS.js} +5 -5
- package/dist/bundle/{chunk-UT6G2X7T.js → chunk-V7OXTQBY.js} +3 -3
- package/dist/bundle/{chunk-YD6ZQ6LM.js → chunk-VYFKWPIS.js} +56 -46
- package/dist/bundle/{chunk-5K7E36ND.js → chunk-WLGQTYIO.js} +2 -2
- package/dist/bundle/{chunk-RTAV5XNT.js → chunk-WPRLG5SL.js} +9 -8
- package/dist/bundle/{chunk-U2AK4QXY.js → chunk-XFXTB522.js} +1 -1
- package/dist/bundle/{chunk-MR4LW4EC.js → chunk-XMKKBDEW.js} +315 -283
- package/dist/bundle/{chunk-6YUFPSSE.js → chunk-XQV7EMAI.js} +4 -4
- package/dist/bundle/{chunk-LJCGQMGN.js → chunk-XX37LKXG.js} +4 -4
- package/dist/bundle/{chunk-BIWJK5YU.js → chunk-XXLAGQDN.js} +1 -1
- package/dist/bundle/{command-contract-RICU4OWW.js → command-contract-N5FA573V.js} +12 -12
- package/dist/bundle/{echarts-2YP32GX5.js → echarts-WLPTUTMR.js} +2 -2
- package/dist/bundle/{embed-QNWVBCL5.js → embed-IALJOWZJ.js} +3 -3
- package/dist/bundle/{embedder-ENS7ARPP.js → embedder-ZY2TS2XJ.js} +6 -6
- package/dist/bundle/{entry-MPYSQPZO.js → entry-67RA75VS.js} +3 -3
- package/dist/bundle/{first-run-YLB7RNGP.js → first-run-QN3UUBJW.js} +5 -5
- package/dist/bundle/{first-screen-AYOE4JFC.js → first-screen-FK4ZJQJY.js} +13 -13
- package/dist/bundle/{identity-XQLO7NYW.js → identity-X3YA364I.js} +1 -1
- package/dist/bundle/{instructions-5F4XG3B6.js → instructions-355MU4CT.js} +1 -1
- package/dist/bundle/{node-JOUDFPFN.js → node-UGJWZLVB.js} +2 -2
- package/dist/bundle/{node-sqlite-ZY6ZFFXS.js → node-sqlite-FJFIOC3K.js} +2 -2
- package/dist/bundle/{oauth-KOR3ZNTA.js → oauth-EZGVL3PP.js} +4 -4
- package/dist/bundle/{open-JACXAGY5.js → open-ANYJ5AKD.js} +1 -1
- package/dist/bundle/{process-7W3X5VME.js → process-JVAQXITD.js} +1 -1
- package/dist/bundle/{program-NSZWGHNJ.js → program-QGSZY5SZ.js} +40 -40
- package/dist/bundle/{prompt-CRRG5UB6.js → prompt-EWF4ZSJO.js} +2 -2
- package/dist/bundle/{recognize-ASXEB45M.js → recognize-T5TPTI6P.js} +3 -3
- package/dist/bundle/{remote-CB3GAXGJ.js → remote-KOAALKIC.js} +4 -4
- package/dist/bundle/{rerank-PDD5BPID.js → rerank-MCXFZFRH.js} +4 -4
- package/dist/bundle/{serve-M4XFAYUM.js → serve-QEVXXJ2G.js} +6 -6
- package/dist/bundle/server-6QM3GFZX.js +55 -0
- package/dist/bundle/{server-IN673OYO.js → server-Y3ZLG44J.js} +26 -26
- package/dist/bundle/{state-626GOOVZ.js → state-F2ZJV2VP.js} +3 -3
- package/dist/bundle/{store-6JM4HJU5.js → store-QX7HBTOW.js} +7 -7
- package/dist/bundle/store-maintenance-command-ZBOQSTHY.js +44 -0
- package/dist/bundle/tg.js +2 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/telegram/adapter.d.ts +7 -0
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/adapter.js +3 -0
- package/dist/telegram/adapter.js.map +1 -1
- package/dist/telegram/contacts.d.ts +3 -1
- package/dist/telegram/contacts.d.ts.map +1 -1
- package/dist/telegram/contacts.js +4 -1
- package/dist/telegram/contacts.js.map +1 -1
- package/dist/telegram/map.d.ts.map +1 -1
- package/dist/telegram/map.js +17 -0
- package/dist/telegram/map.js.map +1 -1
- package/dist/telegram/messages.d.ts +7 -0
- package/dist/telegram/messages.d.ts.map +1 -1
- package/dist/telegram/messages.js +5 -0
- package/dist/telegram/messages.js.map +1 -1
- package/dist/telegram/reactors.d.ts +16 -0
- package/dist/telegram/reactors.d.ts.map +1 -0
- package/dist/telegram/reactors.js +58 -0
- package/dist/telegram/reactors.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/tg-cli/SKILL.md +3 -2
- package/dist/bundle/server-ISWPSKQ6.js +0 -55
- package/dist/bundle/store-maintenance-command-DI2UX4V3.js +0 -44
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
validateQuery,
|
|
52
52
|
walkQuery,
|
|
53
53
|
zonedMoment
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-PAHBZPZN.js";
|
|
55
55
|
import {
|
|
56
56
|
DEFAULT_STEMMERS,
|
|
57
57
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -64,21 +64,21 @@ import {
|
|
|
64
64
|
fold,
|
|
65
65
|
normalize,
|
|
66
66
|
parseStemmers
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-R2F6U4F3.js";
|
|
68
68
|
import {
|
|
69
69
|
DEFAULT_TASK_CATEGORIES,
|
|
70
70
|
sharedConfigPath,
|
|
71
71
|
storedTaskCategories,
|
|
72
72
|
taskCategoriesReader
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-6BQUCCBD.js";
|
|
74
74
|
import {
|
|
75
75
|
storePath
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-PEIDCYF5.js";
|
|
77
77
|
import {
|
|
78
78
|
PRAGMAS,
|
|
79
79
|
quietSqliteWarning,
|
|
80
80
|
storeCapable
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-T5OFRHDS.js";
|
|
82
82
|
import {
|
|
83
83
|
SQLiteTable,
|
|
84
84
|
TableAliasProxyHandler,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
sql,
|
|
104
104
|
sqliteTable,
|
|
105
105
|
text
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-QQYM26DA.js";
|
|
107
107
|
import {
|
|
108
108
|
singleLine
|
|
109
109
|
} from "./chunk-T4SDOYPY.js";
|
|
@@ -132,7 +132,7 @@ import {
|
|
|
132
132
|
__name
|
|
133
133
|
} from "./chunk-ZVVMGPBJ.js";
|
|
134
134
|
|
|
135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
136
136
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
137
137
|
const methods = whole;
|
|
138
138
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -260,7 +260,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
260
260
|
};
|
|
261
261
|
}, "bindAccount");
|
|
262
262
|
|
|
263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
264
264
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
265
265
|
var PROVIDERS = [
|
|
266
266
|
{ name: "telegram", kind: "messages", aliases: ["tg"] },
|
|
@@ -351,7 +351,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
351
351
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
352
352
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
353
353
|
|
|
354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
355
355
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
356
356
|
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");
|
|
357
357
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -374,7 +374,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
374
374
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
375
375
|
}, "sourceOf");
|
|
376
376
|
|
|
377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
378
378
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
379
379
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
380
380
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -561,7 +561,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
561
561
|
return { accounts: [...chosen.values()], skipped };
|
|
562
562
|
}, "fitting");
|
|
563
563
|
|
|
564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
565
565
|
var IndexBuilderOn = class {
|
|
566
566
|
static {
|
|
567
567
|
__name(this, "IndexBuilderOn");
|
|
@@ -756,7 +756,7 @@ function alias(table, alias2) {
|
|
|
756
756
|
}
|
|
757
757
|
__name(alias, "alias");
|
|
758
758
|
|
|
759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
760
760
|
var ENTITY_TABLES = {
|
|
761
761
|
account: "accounts",
|
|
762
762
|
attachment: "attachments",
|
|
@@ -796,7 +796,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
796
796
|
return { table, pointer, type, count, known: known2 };
|
|
797
797
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
798
798
|
|
|
799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
800
800
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
801
801
|
id: integer("id").primaryKey(),
|
|
802
802
|
name: text("name").notNull().unique(),
|
|
@@ -805,7 +805,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
805
805
|
updatedAt: integer("updated_at").notNull()
|
|
806
806
|
});
|
|
807
807
|
|
|
808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
809
809
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
810
810
|
sourceKey: text("source_key").notNull(),
|
|
811
811
|
collection: text("collection").notNull(),
|
|
@@ -815,13 +815,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
815
815
|
createdAt: integer("created_at").notNull()
|
|
816
816
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
817
817
|
|
|
818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
819
819
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
820
820
|
id: integer("id").notNull(),
|
|
821
821
|
indexableType: text("indexable_type").notNull()
|
|
822
822
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
823
823
|
|
|
824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
825
825
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
826
826
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
827
827
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -847,7 +847,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
847
847
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
848
848
|
]);
|
|
849
849
|
|
|
850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
851
851
|
var accounts = sqliteTable("accounts", {
|
|
852
852
|
id: integer("id").primaryKey(),
|
|
853
853
|
provider: text("provider").notNull(),
|
|
@@ -929,7 +929,8 @@ var identities = sqliteTable("identities", {
|
|
|
929
929
|
createdAt: integer("created_at").notNull(),
|
|
930
930
|
updatedAt: integer("updated_at").notNull(),
|
|
931
931
|
description: text("description"),
|
|
932
|
-
email: text("email")
|
|
932
|
+
email: text("email"),
|
|
933
|
+
phone: text("phone")
|
|
933
934
|
}, (table) => [
|
|
934
935
|
unique().on(table.provider, table.externalId),
|
|
935
936
|
index("identities_by_email").on(table.email).where(sql`email IS NOT NULL`)
|
|
@@ -1418,7 +1419,8 @@ var attachments = sqliteTable("attachments", {
|
|
|
1418
1419
|
updatedAt: integer("updated_at").notNull(),
|
|
1419
1420
|
/** `fold(name)`, `fold(local_path)`: SQLite's lower() folds ASCII only, so filters compare these. */
|
|
1420
1421
|
nameFolded: text("name_folded"),
|
|
1421
|
-
localPathFolded: text("local_path_folded")
|
|
1422
|
+
localPathFolded: text("local_path_folded"),
|
|
1423
|
+
contact: text("contact")
|
|
1422
1424
|
}, (table) => [
|
|
1423
1425
|
unique().on(table.attachableType, table.attachableId, table.position),
|
|
1424
1426
|
index("attachments_by_name_folded").on(table.nameFolded),
|
|
@@ -2316,7 +2318,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2316
2318
|
at: integer("at").notNull()
|
|
2317
2319
|
});
|
|
2318
2320
|
|
|
2319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2320
2322
|
var ARMS = [
|
|
2321
2323
|
[
|
|
2322
2324
|
"message",
|
|
@@ -2443,7 +2445,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2443
2445
|
return recomputed;
|
|
2444
2446
|
}, "drainInvolvementQueue");
|
|
2445
2447
|
|
|
2446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2447
2449
|
import { domainToUnicode } from "node:url";
|
|
2448
2450
|
|
|
2449
2451
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12465,7 +12467,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12465
12467
|
}, "oa");
|
|
12466
12468
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12467
12469
|
|
|
12468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12469
12471
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12470
12472
|
var ID = /^[\w-]{10,}$/;
|
|
12471
12473
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12506,7 +12508,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12506
12508
|
return { url, documentId: googleDocumentId(url) };
|
|
12507
12509
|
}), "googleDocumentLinks");
|
|
12508
12510
|
|
|
12509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12510
12512
|
var PHONE_PLANS = [
|
|
12511
12513
|
{
|
|
12512
12514
|
country: "us",
|
|
@@ -12886,7 +12888,7 @@ var PHONE_PLANS = [
|
|
|
12886
12888
|
}
|
|
12887
12889
|
];
|
|
12888
12890
|
|
|
12889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12890
12892
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12891
12893
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12892
12894
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12927,7 +12929,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12927
12929
|
return void 0;
|
|
12928
12930
|
}, "nationalPhone");
|
|
12929
12931
|
|
|
12930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12931
12933
|
var BEFORE = [
|
|
12932
12934
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12933
12935
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13187,7 +13189,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13187
13189
|
return found2.sort((a, b) => a.start - b.start);
|
|
13188
13190
|
}, "findPlaces");
|
|
13189
13191
|
|
|
13190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13191
13193
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13192
13194
|
var MENTION_VERSIONS = {
|
|
13193
13195
|
phone: 1,
|
|
@@ -13377,7 +13379,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13377
13379
|
};
|
|
13378
13380
|
}, "typedPhone");
|
|
13379
13381
|
|
|
13380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13381
13383
|
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";
|
|
13382
13384
|
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";
|
|
13383
13385
|
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";
|
|
@@ -13385,7 +13387,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13385
13387
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13386
13388
|
var NAME_WORDS = WORDS.split(" ");
|
|
13387
13389
|
|
|
13388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13389
13391
|
var LATIN_TO_CYRILLIC = {
|
|
13390
13392
|
shch: "\u0449",
|
|
13391
13393
|
sch: "\u0449",
|
|
@@ -13593,7 +13595,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13593
13595
|
return found2;
|
|
13594
13596
|
}, "findUnknownNames");
|
|
13595
13597
|
|
|
13596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13597
13599
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13598
13600
|
"webpage",
|
|
13599
13601
|
"share",
|
|
@@ -13625,7 +13627,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13625
13627
|
});
|
|
13626
13628
|
}, "matchDownloads");
|
|
13627
13629
|
|
|
13628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13629
13631
|
var QUERY_VERSION = 1;
|
|
13630
13632
|
var QUERY_LIMITS2 = {
|
|
13631
13633
|
...QUERY_LIMITS,
|
|
@@ -13656,7 +13658,7 @@ function exhausted(budget) {
|
|
|
13656
13658
|
}
|
|
13657
13659
|
__name(exhausted, "exhausted");
|
|
13658
13660
|
|
|
13659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13660
13662
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13661
13663
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13662
13664
|
kind: "char",
|
|
@@ -14056,7 +14058,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14056
14058
|
return out;
|
|
14057
14059
|
}, "foldRegex");
|
|
14058
14060
|
|
|
14059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14060
14062
|
var PRESET_VERSION = 1;
|
|
14061
14063
|
var PRESETS = {
|
|
14062
14064
|
password: {
|
|
@@ -14110,7 +14112,7 @@ var PRESETS = {
|
|
|
14110
14112
|
}
|
|
14111
14113
|
};
|
|
14112
14114
|
|
|
14113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14114
14116
|
var FIELD_VERSION = 2;
|
|
14115
14117
|
var UNITS = {
|
|
14116
14118
|
"": 1,
|
|
@@ -14559,12 +14561,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14559
14561
|
return validateFields(parsed2.output);
|
|
14560
14562
|
}, "validateAst");
|
|
14561
14563
|
|
|
14562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14563
14565
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14564
14566
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14565
14567
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14566
14568
|
|
|
14567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14568
14570
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14569
14571
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14570
14572
|
var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
@@ -14588,7 +14590,7 @@ var linkMatch = /* @__PURE__ */ __name((field3, typed, mail, mentioned2) => {
|
|
|
14588
14590
|
};
|
|
14589
14591
|
}, "linkMatch");
|
|
14590
14592
|
|
|
14591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14592
14594
|
var SETTING = "phoneCountries";
|
|
14593
14595
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14594
14596
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14619,7 +14621,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14619
14621
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14620
14622
|
}, "valueMatch");
|
|
14621
14623
|
|
|
14622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
14623
14625
|
var SCHEME = "msg:";
|
|
14624
14626
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
14625
14627
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -14633,7 +14635,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
14633
14635
|
return { provider, account, chat: chat2, message: message2 };
|
|
14634
14636
|
}, "parseLocator");
|
|
14635
14637
|
|
|
14636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14637
14639
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14638
14640
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14639
14641
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14661,7 +14663,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14661
14663
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14662
14664
|
}, "vocabularySimilarity");
|
|
14663
14665
|
|
|
14664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14665
14667
|
import { createHash } from "node:crypto";
|
|
14666
14668
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14667
14669
|
try {
|
|
@@ -14727,7 +14729,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14727
14729
|
});
|
|
14728
14730
|
}, "guardTagCreation");
|
|
14729
14731
|
|
|
14730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14731
14733
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
14732
14734
|
throw new CliError("validation_error", message2);
|
|
14733
14735
|
}, "invalid");
|
|
@@ -14804,7 +14806,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14804
14806
|
};
|
|
14805
14807
|
}, "createTagRedirectIndex");
|
|
14806
14808
|
|
|
14807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14808
14810
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14809
14811
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14810
14812
|
if (!row2)
|
|
@@ -14832,7 +14834,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14832
14834
|
return snapshot2;
|
|
14833
14835
|
}, "tagRedirectSnapshot");
|
|
14834
14836
|
|
|
14835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14836
14838
|
import { createHash as createHash2 } from "node:crypto";
|
|
14837
14839
|
var TASK_KEY_PREFIXES = {
|
|
14838
14840
|
question: "Q",
|
|
@@ -14860,7 +14862,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14860
14862
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14861
14863
|
}, "taskAccountOf");
|
|
14862
14864
|
|
|
14863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
14864
14866
|
var SIMPLE_REFERENCES = [
|
|
14865
14867
|
"note",
|
|
14866
14868
|
"document",
|
|
@@ -14932,7 +14934,7 @@ var folderPath = /* @__PURE__ */ __name((path) => {
|
|
|
14932
14934
|
}, "folderPath");
|
|
14933
14935
|
var canonicalReference = /* @__PURE__ */ __name((text5) => formatReference(parseReference(text5)), "canonicalReference");
|
|
14934
14936
|
|
|
14935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14936
14938
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14937
14939
|
var REFERABLE = {
|
|
14938
14940
|
note: { tombstone: true },
|
|
@@ -15090,7 +15092,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15090
15092
|
}, "taskIdOf");
|
|
15091
15093
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15092
15094
|
|
|
15093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15094
15096
|
var toMs = /* @__PURE__ */ __name((iso10) => {
|
|
15095
15097
|
if (iso10 === null || iso10 === void 0)
|
|
15096
15098
|
return null;
|
|
@@ -15104,7 +15106,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15104
15106
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15105
15107
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15106
15108
|
|
|
15107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15108
15110
|
var TAG_KINDS = ["tag", "topic"];
|
|
15109
15111
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15110
15112
|
var TAG_TYPE = {
|
|
@@ -15295,9 +15297,11 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15295
15297
|
return result;
|
|
15296
15298
|
}, "tagsOf");
|
|
15297
15299
|
|
|
15298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15300
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15299
15301
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15300
15302
|
var SPEECH = speech("att");
|
|
15303
|
+
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");
|
|
15304
|
+
var mentionField = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'contact' WHEN ${speech(alias2)} THEN 'transcript' ELSE 'file_text' END`, "mentionField");
|
|
15301
15305
|
var quoted = /* @__PURE__ */ __name((value) => `"${value.replaceAll('"', '""')}"`, "quoted");
|
|
15302
15306
|
var ftsMatch = /* @__PURE__ */ __name((node) => {
|
|
15303
15307
|
const text5 = normalize(node.value);
|
|
@@ -15648,7 +15652,7 @@ var FIELD_COMPILERS = {
|
|
|
15648
15652
|
subject
|
|
15649
15653
|
};
|
|
15650
15654
|
|
|
15651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15652
15656
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15653
15657
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15654
15658
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15664,7 +15668,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15664
15668
|
};
|
|
15665
15669
|
}, "placeOf");
|
|
15666
15670
|
|
|
15667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15668
15672
|
var DRAIN_ON_WRITE = 500;
|
|
15669
15673
|
var METHOD = "rules";
|
|
15670
15674
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15724,9 +15728,9 @@ var SOURCES = {
|
|
|
15724
15728
|
one: "SELECT text, 'text' AS field, chat_id FROM messages WHERE id = ? AND deleted_at IS NULL"
|
|
15725
15729
|
},
|
|
15726
15730
|
attachment: {
|
|
15727
|
-
count:
|
|
15728
|
-
page: `SELECT a.id, a
|
|
15729
|
-
one: `SELECT a
|
|
15731
|
+
count: `SELECT count(*) AS n FROM attachments a JOIN messages m ON m.id = a.attachable_id WHERE a.attachable_type = 'message' AND coalesce(${mentionText("a")}, '') <> '' AND m.deleted_at IS NULL`,
|
|
15732
|
+
page: `SELECT a.id, ${mentionText("a")} AS text, ${mentionField("a")} AS field, m.chat_id FROM attachments a JOIN messages m ON m.id = a.attachable_id WHERE a.id > ? AND a.attachable_type = 'message' AND coalesce(${mentionText("a")}, '') <> '' AND m.deleted_at IS NULL ORDER BY a.id LIMIT ?`,
|
|
15733
|
+
one: `SELECT ${mentionText("a")} AS text, ${mentionField("a")} AS field, m.chat_id FROM attachments a JOIN messages m ON m.id = a.attachable_id WHERE a.id = ? AND a.attachable_type = 'message' AND ${mentionText("a")} IS NOT NULL AND m.deleted_at IS NULL`
|
|
15730
15734
|
},
|
|
15731
15735
|
// Texts outside a chat: no one wrote them in a chat, so a name in them is never linked by rule.
|
|
15732
15736
|
document: {
|
|
@@ -15827,7 +15831,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15827
15831
|
return queued.length;
|
|
15828
15832
|
}, "drainMentions");
|
|
15829
15833
|
|
|
15830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15831
15835
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15832
15836
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15833
15837
|
if (!exists2)
|
|
@@ -15835,7 +15839,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15835
15839
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15836
15840
|
}, "indexRow");
|
|
15837
15841
|
|
|
15838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15839
15843
|
var INDEX = "message_stems";
|
|
15840
15844
|
var SETTING2 = "searchStemmers";
|
|
15841
15845
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -15957,7 +15961,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
15957
15961
|
};
|
|
15958
15962
|
}, "stemmerCache");
|
|
15959
15963
|
|
|
15960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
15961
15965
|
var connections = /* @__PURE__ */ new WeakMap();
|
|
15962
15966
|
var connectionOf = /* @__PURE__ */ __name((database) => {
|
|
15963
15967
|
let connection = connections.get(database);
|
|
@@ -16016,7 +16020,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
16016
16020
|
}
|
|
16017
16021
|
}, "read");
|
|
16018
16022
|
|
|
16019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
16020
16024
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
16021
16025
|
coalesce(CASE k.chunkable_type
|
|
16022
16026
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16158,7 +16162,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16158
16162
|
}, "dropUnusedVectors");
|
|
16159
16163
|
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");
|
|
16160
16164
|
|
|
16161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16162
16166
|
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({
|
|
16163
16167
|
target: [accounts.provider, accounts.externalId],
|
|
16164
16168
|
set: {
|
|
@@ -16263,7 +16267,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16263
16267
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16264
16268
|
}, "dropOrphanPeople");
|
|
16265
16269
|
|
|
16266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
16267
16271
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
16268
16272
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
16269
16273
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -16282,7 +16286,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
16282
16286
|
}
|
|
16283
16287
|
}, "resolvePersonLinks");
|
|
16284
16288
|
|
|
16285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
16286
16290
|
var flag = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
16287
16291
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
16288
16292
|
find: orm.select({
|
|
@@ -16291,6 +16295,7 @@ var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
|
16291
16295
|
username: identities.username,
|
|
16292
16296
|
isBot: identities.bot,
|
|
16293
16297
|
description: identities.description,
|
|
16298
|
+
phone: identities.phone,
|
|
16294
16299
|
updatedAt: identities.updatedAt,
|
|
16295
16300
|
personId: identityLinks.personId
|
|
16296
16301
|
}).from(identities).leftJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, sql.placeholder("provider")), eq(identities.externalId, sql.placeholder("externalId")))).prepare(),
|
|
@@ -16363,9 +16368,10 @@ var saveIdentity = /* @__PURE__ */ __name(({ orm, now: now2, database }, provide
|
|
|
16363
16368
|
name: name ?? found2.name,
|
|
16364
16369
|
username: facts2.username ?? found2.username,
|
|
16365
16370
|
bot: flag(facts2.isBot) ?? found2.isBot,
|
|
16366
|
-
description: facts2.description ?? found2.description
|
|
16371
|
+
description: facts2.description ?? found2.description,
|
|
16372
|
+
phone: facts2.phone ?? found2.phone
|
|
16367
16373
|
};
|
|
16368
|
-
if (changed.name !== found2.name || changed.username !== found2.username || changed.bot !== found2.isBot || changed.description !== found2.description) {
|
|
16374
|
+
if (changed.name !== found2.name || changed.username !== found2.username || changed.bot !== found2.isBot || changed.description !== found2.description || changed.phone !== found2.phone) {
|
|
16369
16375
|
orm.update(identities).set({ ...changed, updatedAt: now2() }).where(eq(identities.id, found2.pk)).run();
|
|
16370
16376
|
}
|
|
16371
16377
|
const renamed = changed.name !== found2.name || changed.username !== found2.username;
|
|
@@ -16386,6 +16392,7 @@ var saveIdentity = /* @__PURE__ */ __name(({ orm, now: now2, database }, provide
|
|
|
16386
16392
|
username: facts2.username ?? null,
|
|
16387
16393
|
bot: flag(facts2.isBot),
|
|
16388
16394
|
description: facts2.description ?? null,
|
|
16395
|
+
phone: facts2.phone ?? null,
|
|
16389
16396
|
createdAt: at,
|
|
16390
16397
|
updatedAt: at
|
|
16391
16398
|
}).returning({ pk: identities.id }).get()?.pk);
|
|
@@ -16500,8 +16507,9 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
16500
16507
|
statementsOf(context.orm).seen.run({ accountId, identityId: saved.pk, createdAt: context.now() });
|
|
16501
16508
|
return saved.pk;
|
|
16502
16509
|
}, "meetingIdentityPk");
|
|
16510
|
+
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");
|
|
16503
16511
|
|
|
16504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
16505
16513
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
16506
16514
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
16507
16515
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -16566,7 +16574,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
16566
16574
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
16567
16575
|
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");
|
|
16568
16576
|
|
|
16569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
16570
16578
|
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");
|
|
16571
16579
|
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");
|
|
16572
16580
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -16838,7 +16846,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
16838
16846
|
}
|
|
16839
16847
|
}, "replaceAutoTags");
|
|
16840
16848
|
|
|
16841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
16842
16850
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
16843
16851
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
16844
16852
|
var counterValue = /* @__PURE__ */ __name((message2, field3) => {
|
|
@@ -16875,7 +16883,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
16875
16883
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
16876
16884
|
}, "counterFreshness");
|
|
16877
16885
|
|
|
16878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16879
16887
|
import { createHash as createHash3 } from "node:crypto";
|
|
16880
16888
|
var CHUNK_CHARS = 1200;
|
|
16881
16889
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16980,7 +16988,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16980
16988
|
return chunks2;
|
|
16981
16989
|
}, "cutChunks");
|
|
16982
16990
|
|
|
16983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
16984
16992
|
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");
|
|
16985
16993
|
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;
|
|
16986
16994
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -17061,7 +17069,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
17061
17069
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
17062
17070
|
}, "mailCore");
|
|
17063
17071
|
|
|
17064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17065
17073
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17066
17074
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17067
17075
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17151,7 +17159,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17151
17159
|
});
|
|
17152
17160
|
}, "linkMeeting");
|
|
17153
17161
|
|
|
17154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
17155
17163
|
var DAY = 864e5;
|
|
17156
17164
|
var CURRENCY = [
|
|
17157
17165
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -17268,7 +17276,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
17268
17276
|
return best?.day ?? null;
|
|
17269
17277
|
}, "dueDayOf");
|
|
17270
17278
|
|
|
17271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
17272
17280
|
var DAY2 = 864e5;
|
|
17273
17281
|
var STOP_WORDS = new Set([
|
|
17274
17282
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -17423,7 +17431,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
17423
17431
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
17424
17432
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
17425
17433
|
|
|
17426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
17427
17435
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
17428
17436
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
17429
17437
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -17694,7 +17702,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
17694
17702
|
};
|
|
17695
17703
|
}, "readiness");
|
|
17696
17704
|
|
|
17697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
17698
17706
|
var DOCUMENT_PICTURE = "document_picture";
|
|
17699
17707
|
var SCAN_PAGE2 = 5e3;
|
|
17700
17708
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -17757,7 +17765,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
17757
17765
|
}, "nearestPictures")
|
|
17758
17766
|
}), "documentPicturesOver");
|
|
17759
17767
|
|
|
17760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17761
17769
|
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), ''))";
|
|
17762
17770
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17763
17771
|
"working-location",
|
|
@@ -17939,7 +17947,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17939
17947
|
return true;
|
|
17940
17948
|
}, "resetNoteIndex");
|
|
17941
17949
|
|
|
17942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
17943
17951
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
17944
17952
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
17945
17953
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18049,7 +18057,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor) => {
|
|
|
18049
18057
|
return emails3 + threads;
|
|
18050
18058
|
}, "drainEmailIndex");
|
|
18051
18059
|
|
|
18052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18053
18061
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18054
18062
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18055
18063
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18073,7 +18081,7 @@ var setEmailFlags = /* @__PURE__ */ __name((database, accountId, flags, now2) =>
|
|
|
18073
18081
|
return changed;
|
|
18074
18082
|
}, "setEmailFlags");
|
|
18075
18083
|
|
|
18076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18077
18085
|
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");
|
|
18078
18086
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18079
18087
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18140,7 +18148,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18140
18148
|
}
|
|
18141
18149
|
}), "mailRulesOver");
|
|
18142
18150
|
|
|
18143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
18144
18152
|
var FOLDED = [
|
|
18145
18153
|
{ table: "tasks", column: "title" },
|
|
18146
18154
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -18172,7 +18180,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
18172
18180
|
return filled2;
|
|
18173
18181
|
}, "fillFolded");
|
|
18174
18182
|
|
|
18175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18176
18184
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18177
18185
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18178
18186
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18180,7 +18188,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18180
18188
|
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);
|
|
18181
18189
|
}, "reviewLink");
|
|
18182
18190
|
|
|
18183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18184
18192
|
function checkMeetingCancelled(signal) {
|
|
18185
18193
|
if (!signal?.aborted)
|
|
18186
18194
|
return;
|
|
@@ -18191,7 +18199,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18191
18199
|
}
|
|
18192
18200
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18193
18201
|
|
|
18194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18195
18203
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18196
18204
|
id: Number(row2.id),
|
|
18197
18205
|
accountId: Number(row2.account_id),
|
|
@@ -18241,7 +18249,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18241
18249
|
createdAt: Number(row2.created_at)
|
|
18242
18250
|
}), "transcriptRowOf");
|
|
18243
18251
|
|
|
18244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18245
18253
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18246
18254
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18247
18255
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18408,7 +18416,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18408
18416
|
}
|
|
18409
18417
|
}), "meetingReadsOver");
|
|
18410
18418
|
|
|
18411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18412
18420
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18413
18421
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18414
18422
|
const params = [input.accountId];
|
|
@@ -18451,7 +18459,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18451
18459
|
return { clauses, params };
|
|
18452
18460
|
}, "meetingSelectionSql");
|
|
18453
18461
|
|
|
18454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18455
18463
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18456
18464
|
async meetingChatLines(input) {
|
|
18457
18465
|
checkMeetingCancelled(input.signal);
|
|
@@ -18479,7 +18487,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18479
18487
|
}
|
|
18480
18488
|
}), "meetingChatLinesOver");
|
|
18481
18489
|
|
|
18482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18483
18491
|
var MESSAGE_FIELDS = {
|
|
18484
18492
|
pk: messages.id,
|
|
18485
18493
|
nativeId: messages.externalId,
|
|
@@ -18601,7 +18609,8 @@ var toAttachment = /* @__PURE__ */ __name((row2) => ({
|
|
|
18601
18609
|
size: row2.size,
|
|
18602
18610
|
mime: row2.mime,
|
|
18603
18611
|
duration: row2.duration,
|
|
18604
|
-
providerRef: parsed(row2.providerRef)
|
|
18612
|
+
providerRef: parsed(row2.providerRef),
|
|
18613
|
+
contact: parsed(row2.contact)
|
|
18605
18614
|
})
|
|
18606
18615
|
}), "toAttachment");
|
|
18607
18616
|
var toMessage = /* @__PURE__ */ __name((row2, attachments2) => {
|
|
@@ -18645,7 +18654,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18645
18654
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18646
18655
|
}), "chatActivity");
|
|
18647
18656
|
|
|
18648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18649
18658
|
var HIT_FIELDS = {
|
|
18650
18659
|
...MESSAGE_FIELDS,
|
|
18651
18660
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18744,7 +18753,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18744
18753
|
};
|
|
18745
18754
|
}, "directReplies");
|
|
18746
18755
|
|
|
18747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18748
18757
|
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");
|
|
18749
18758
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18750
18759
|
const found2 = identityRow(context, ref3);
|
|
@@ -18875,7 +18884,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
18875
18884
|
}, "mentioning");
|
|
18876
18885
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18877
18886
|
|
|
18878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
18879
18888
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
18880
18889
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
18881
18890
|
}, "missing");
|
|
@@ -18997,7 +19006,7 @@ function meetingContextLinksOver(context) {
|
|
|
18997
19006
|
}
|
|
18998
19007
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
18999
19008
|
|
|
19000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19001
19010
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19002
19011
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19003
19012
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19026,7 +19035,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19026
19035
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19027
19036
|
}, "indexedText");
|
|
19028
19037
|
|
|
19029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19030
19039
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19031
19040
|
var meetingCurrentIndexRows = `
|
|
19032
19041
|
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
|
|
@@ -19057,7 +19066,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19057
19066
|
}, "invalidateMeetingStems");
|
|
19058
19067
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19059
19068
|
|
|
19060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19061
19070
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19062
19071
|
return {
|
|
19063
19072
|
async indexSearch(original) {
|
|
@@ -19125,10 +19134,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19125
19134
|
}
|
|
19126
19135
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19127
19136
|
|
|
19128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19129
19138
|
import { createHash as createHash4 } from "node:crypto";
|
|
19130
19139
|
|
|
19131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19132
19141
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19133
19142
|
const padded = ` ${term} `;
|
|
19134
19143
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19137,7 +19146,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19137
19146
|
return [...pieces];
|
|
19138
19147
|
}, "trigrams");
|
|
19139
19148
|
|
|
19140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19141
19150
|
var SHORTEST_CORRECTION = 3;
|
|
19142
19151
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19143
19152
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19184,7 +19193,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19184
19193
|
return corrections;
|
|
19185
19194
|
}, "correctWords");
|
|
19186
19195
|
|
|
19187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19188
19197
|
var SHORTEST_GARBLED = 4;
|
|
19189
19198
|
var MOST_WIDENED = 64;
|
|
19190
19199
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19276,7 +19285,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19276
19285
|
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));
|
|
19277
19286
|
}, "widenWords");
|
|
19278
19287
|
|
|
19279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19280
19289
|
import { readFileSync } from "node:fs";
|
|
19281
19290
|
var loaded;
|
|
19282
19291
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19335,7 +19344,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19335
19344
|
return false;
|
|
19336
19345
|
}, "knownRussianWord");
|
|
19337
19346
|
|
|
19338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19339
19348
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19340
19349
|
var MOST_WORDS = 128;
|
|
19341
19350
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19562,7 +19571,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19562
19571
|
return check3(tree);
|
|
19563
19572
|
}, "matchMeetingText");
|
|
19564
19573
|
|
|
19565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19566
19575
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19567
19576
|
throw new CliError("validation_error", message2);
|
|
19568
19577
|
}, "fail");
|
|
@@ -19739,7 +19748,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19739
19748
|
}
|
|
19740
19749
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19741
19750
|
|
|
19742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19743
19752
|
import { createHash as createHash5 } from "node:crypto";
|
|
19744
19753
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19745
19754
|
if (value === void 0)
|
|
@@ -19829,7 +19838,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
19829
19838
|
}
|
|
19830
19839
|
}), "meetingParticipantSearchOver");
|
|
19831
19840
|
|
|
19832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
19833
19842
|
var preparationQueries = {
|
|
19834
19843
|
participants: {
|
|
19835
19844
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -19879,7 +19888,7 @@ var preparationQueries = {
|
|
|
19879
19888
|
}
|
|
19880
19889
|
};
|
|
19881
19890
|
|
|
19882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
19883
19892
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19884
19893
|
async preparationContext(original) {
|
|
19885
19894
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -19920,7 +19929,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19920
19929
|
}
|
|
19921
19930
|
}), "meetingPreparationContextOver");
|
|
19922
19931
|
|
|
19923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
19924
19933
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
19925
19934
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
19926
19935
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -19934,7 +19943,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
19934
19943
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
19935
19944
|
)`, "preparationSubjects");
|
|
19936
19945
|
|
|
19937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
19938
19947
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19939
19948
|
async preparationKnowledge(original) {
|
|
19940
19949
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -19979,7 +19988,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
19979
19988
|
}
|
|
19980
19989
|
}), "meetingPreparationKnowledgeOver");
|
|
19981
19990
|
|
|
19982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
19983
19992
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19984
19993
|
async preparationNotes(original) {
|
|
19985
19994
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20032,7 +20041,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20032
20041
|
}
|
|
20033
20042
|
}), "meetingPreparationNotesOver");
|
|
20034
20043
|
|
|
20035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20036
20045
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20037
20046
|
async relatedHistory(original) {
|
|
20038
20047
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20103,7 +20112,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20103
20112
|
}
|
|
20104
20113
|
}), "meetingRelatedHistoryOver");
|
|
20105
20114
|
|
|
20106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20107
20116
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20108
20117
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20109
20118
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20184,7 +20193,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20184
20193
|
}
|
|
20185
20194
|
}), "meetingReviewOver");
|
|
20186
20195
|
|
|
20187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20188
20197
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20189
20198
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20190
20199
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20238,7 +20247,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20238
20247
|
}
|
|
20239
20248
|
}), "meetingSeriesHistoryOver");
|
|
20240
20249
|
|
|
20241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20242
20251
|
var MOST_ROWS = 5e5;
|
|
20243
20252
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20244
20253
|
async meetingStats(input) {
|
|
@@ -20285,7 +20294,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20285
20294
|
}
|
|
20286
20295
|
}), "meetingStatsOver");
|
|
20287
20296
|
|
|
20288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20289
20298
|
var CURSOR_KEY = "meetings";
|
|
20290
20299
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20291
20300
|
id: Number(row2.id),
|
|
@@ -20837,7 +20846,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
20837
20846
|
};
|
|
20838
20847
|
}, "meetingStoreOver");
|
|
20839
20848
|
|
|
20840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
20841
20850
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
20842
20851
|
id: `email:${place.emailId}`,
|
|
20843
20852
|
chatId: place.threadExternalId,
|
|
@@ -21405,7 +21414,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm }, stemmerFor = stem
|
|
|
21405
21414
|
}
|
|
21406
21415
|
}), "mailStoreOver");
|
|
21407
21416
|
|
|
21408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21409
21418
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21410
21419
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21411
21420
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21495,7 +21504,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21495
21504
|
}, "knownWord");
|
|
21496
21505
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21497
21506
|
|
|
21498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21499
21508
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21500
21509
|
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");
|
|
21501
21510
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21581,7 +21590,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21581
21590
|
return found2;
|
|
21582
21591
|
}, "spokenTranscripts");
|
|
21583
21592
|
|
|
21584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21585
21594
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21586
21595
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21587
21596
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21628,7 +21637,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21628
21637
|
});
|
|
21629
21638
|
}, "placeHits");
|
|
21630
21639
|
|
|
21631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21632
21641
|
var MESSAGES2 = {
|
|
21633
21642
|
rows: "messages",
|
|
21634
21643
|
threads: "chats",
|
|
@@ -22090,7 +22099,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22090
22099
|
};
|
|
22091
22100
|
}, "runQuery");
|
|
22092
22101
|
|
|
22093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22094
22103
|
function invalidMetadata() {
|
|
22095
22104
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22096
22105
|
}
|
|
@@ -22192,7 +22201,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22192
22201
|
};
|
|
22193
22202
|
}), "counterTargets");
|
|
22194
22203
|
|
|
22195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22196
22205
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22197
22206
|
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,
|
|
22198
22207
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22311,7 +22320,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22311
22320
|
}));
|
|
22312
22321
|
}, "attachmentViews");
|
|
22313
22322
|
|
|
22314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22315
22324
|
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");
|
|
22316
22325
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22317
22326
|
const { orm, database, now: now2 } = context;
|
|
@@ -22349,7 +22358,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22349
22358
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22350
22359
|
}, "intoVoiceAttachment");
|
|
22351
22360
|
|
|
22352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22353
22362
|
var FIELDS = [
|
|
22354
22363
|
"threadExternalId",
|
|
22355
22364
|
"senderIdentityId",
|
|
@@ -22378,7 +22387,8 @@ var ATTACHMENT_FIELDS = [
|
|
|
22378
22387
|
"height",
|
|
22379
22388
|
"duration",
|
|
22380
22389
|
"providerRef",
|
|
22381
|
-
"nameFolded"
|
|
22390
|
+
"nameFolded",
|
|
22391
|
+
"contact"
|
|
22382
22392
|
];
|
|
22383
22393
|
var placeholders = /* @__PURE__ */ __name((names) => Object.fromEntries(names.map((name) => [name, sql.placeholder(name)])), "placeholders");
|
|
22384
22394
|
var prepare2 = /* @__PURE__ */ __name((orm) => ({
|
|
@@ -22404,7 +22414,7 @@ var prepare2 = /* @__PURE__ */ __name((orm) => ({
|
|
|
22404
22414
|
const column2 = attachments[name].name;
|
|
22405
22415
|
return [
|
|
22406
22416
|
name,
|
|
22407
|
-
sql.raw(name === "providerRef" ? `coalesce(excluded.${column2}, ${column2})` : `excluded.${column2}`)
|
|
22417
|
+
sql.raw(name === "providerRef" || name === "contact" ? `coalesce(excluded.${column2}, ${column2})` : `excluded.${column2}`)
|
|
22408
22418
|
];
|
|
22409
22419
|
}))
|
|
22410
22420
|
}).prepare()
|
|
@@ -22517,7 +22527,8 @@ var upsertMessage = /* @__PURE__ */ __name((context, key2, accountKey, chatKey,
|
|
|
22517
22527
|
width: attachment.width ?? null,
|
|
22518
22528
|
height: attachment.height ?? null,
|
|
22519
22529
|
duration: attachment.duration ?? null,
|
|
22520
|
-
providerRef: refOf(attachment.providerRef)
|
|
22530
|
+
providerRef: refOf(attachment.providerRef),
|
|
22531
|
+
contact: attachment.contact ? JSON.stringify(attachment.contact) : null
|
|
22521
22532
|
});
|
|
22522
22533
|
});
|
|
22523
22534
|
if (Number(heardFirst) > 0)
|
|
@@ -22640,6 +22651,14 @@ var derivedReactions = /* @__PURE__ */ __name(({ database }, chatKey, messageId)
|
|
|
22640
22651
|
total: sorted2.reduce((sum, [, { count }]) => sum + count, 0)
|
|
22641
22652
|
};
|
|
22642
22653
|
}, "derivedReactions");
|
|
22654
|
+
var reactors = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => database.prepare(`SELECT i.external_id AS id, i.name, i.username, r.reaction, r.reacted_at AS reactedAt
|
|
22655
|
+
FROM message_reactions r JOIN identities i ON i.id = r.identity_id
|
|
22656
|
+
WHERE r.chat_id = ? AND r.message_external_id = ? AND r.reaction IS NOT NULL
|
|
22657
|
+
ORDER BY r.reacted_at DESC, r.id DESC`).all(chatKey, messageId).map(({ id: id2, name, username, reaction, reactedAt }) => ({
|
|
22658
|
+
person: { id: id2, name, username },
|
|
22659
|
+
reaction,
|
|
22660
|
+
reactedAt: new Date(reactedAt).toISOString()
|
|
22661
|
+
})), "reactors");
|
|
22643
22662
|
var saveReaction = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, messageId, { person: person2, own, reaction, reactedAt }) => {
|
|
22644
22663
|
const { database, now: now2 } = context;
|
|
22645
22664
|
const statements = reactionStatementsOf(database);
|
|
@@ -22656,7 +22675,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22656
22675
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22657
22676
|
}, "writeDerivedReactions");
|
|
22658
22677
|
|
|
22659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
22660
22679
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
22661
22680
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
22662
22681
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -22682,7 +22701,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
22682
22701
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
22683
22702
|
}, "release");
|
|
22684
22703
|
|
|
22685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22686
22705
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22687
22706
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22688
22707
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22703,7 +22722,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22703
22722
|
};
|
|
22704
22723
|
}, "keysOver");
|
|
22705
22724
|
|
|
22706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22707
22726
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22708
22727
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22709
22728
|
if (!row2)
|
|
@@ -22738,7 +22757,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22738
22757
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22739
22758
|
}, "saveProfile");
|
|
22740
22759
|
|
|
22741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22742
22761
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22743
22762
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22744
22763
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -22774,7 +22793,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
22774
22793
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
22775
22794
|
}, "originOfActor");
|
|
22776
22795
|
|
|
22777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
22778
22797
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
22779
22798
|
const owner = ownerPerson(context.database).id;
|
|
22780
22799
|
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);
|
|
@@ -22795,7 +22814,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
22795
22814
|
return personOf(context, ref3);
|
|
22796
22815
|
}, "linkToOwner");
|
|
22797
22816
|
|
|
22798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
22799
22818
|
var PROVIDERS_SETTING = "providers";
|
|
22800
22819
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
22801
22820
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -22830,7 +22849,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
22830
22849
|
});
|
|
22831
22850
|
}, "registerProvider");
|
|
22832
22851
|
|
|
22833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
22834
22853
|
var DAY3 = 864e5;
|
|
22835
22854
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
22836
22855
|
var TEXT_LIMIT = 20;
|
|
@@ -23029,7 +23048,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23029
23048
|
};
|
|
23030
23049
|
}, "taskSimilarityOver");
|
|
23031
23050
|
|
|
23032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23033
23052
|
var SETTING3 = "taskCategories";
|
|
23034
23053
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23035
23054
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23048,7 +23067,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23048
23067
|
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);
|
|
23049
23068
|
}, "saveTaskCategories");
|
|
23050
23069
|
|
|
23051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23052
23071
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23053
23072
|
var ALLOWED = "taskAgentClose";
|
|
23054
23073
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23104,7 +23123,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23104
23123
|
];
|
|
23105
23124
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23106
23125
|
|
|
23107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
23108
23127
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
23109
23128
|
var MAX_TEXT_CHARS = 2e6;
|
|
23110
23129
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -23130,7 +23149,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
23130
23149
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
23131
23150
|
}, "pdfPreviewLimits");
|
|
23132
23151
|
|
|
23133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23134
23153
|
import { randomBytes } from "node:crypto";
|
|
23135
23154
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23136
23155
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23143,7 +23162,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23143
23162
|
return time3 + random;
|
|
23144
23163
|
}, "ulid");
|
|
23145
23164
|
|
|
23146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23147
23166
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23148
23167
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23149
23168
|
if (!meta && !sections?.length)
|
|
@@ -23164,7 +23183,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23164
23183
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23165
23184
|
}, "languageOf");
|
|
23166
23185
|
|
|
23167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23168
23187
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23169
23188
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23170
23189
|
if (isObject(value))
|
|
@@ -23407,7 +23426,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23407
23426
|
};
|
|
23408
23427
|
}, "filesStoreOver");
|
|
23409
23428
|
|
|
23410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23411
23430
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23412
23431
|
entity: "document",
|
|
23413
23432
|
backend: "sql",
|
|
@@ -23453,7 +23472,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23453
23472
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23454
23473
|
}, "importedDocumentWhere");
|
|
23455
23474
|
|
|
23456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23457
23476
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23458
23477
|
var iso = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23459
23478
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso(value), "optionalIso");
|
|
@@ -23962,7 +23981,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
23962
23981
|
};
|
|
23963
23982
|
}, "notesStoreOver");
|
|
23964
23983
|
|
|
23965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
23966
23985
|
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";
|
|
23967
23986
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23968
23987
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24078,7 +24097,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24078
24097
|
};
|
|
24079
24098
|
}, "memoriesStoreOver");
|
|
24080
24099
|
|
|
24081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24082
24101
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24083
24102
|
var KEY = "taskFirstPassPerChat";
|
|
24084
24103
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24098,7 +24117,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24098
24117
|
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);
|
|
24099
24118
|
}, "saveFirstPassPerChat");
|
|
24100
24119
|
|
|
24101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24102
24121
|
var TASK_RELATION_KINDS = [
|
|
24103
24122
|
"blocked-by",
|
|
24104
24123
|
"follow-up-of",
|
|
@@ -24228,7 +24247,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24228
24247
|
};
|
|
24229
24248
|
}, "taskRelationsStoreOver");
|
|
24230
24249
|
|
|
24231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24232
24251
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24233
24252
|
var iso3 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
24234
24253
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind3, changes, at) => {
|
|
@@ -24500,7 +24519,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
24500
24519
|
};
|
|
24501
24520
|
}, "workTasksOver");
|
|
24502
24521
|
|
|
24503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
24504
24523
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
24505
24524
|
const { database, now: now2 } = context;
|
|
24506
24525
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -24546,7 +24565,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
24546
24565
|
};
|
|
24547
24566
|
}, "taskCloseOver");
|
|
24548
24567
|
|
|
24549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
24550
24569
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
24551
24570
|
const { database, now: now2 } = context;
|
|
24552
24571
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -24764,7 +24783,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
24764
24783
|
};
|
|
24765
24784
|
}, "taskPairsOver");
|
|
24766
24785
|
|
|
24767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
24768
24787
|
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";
|
|
24769
24788
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
24770
24789
|
const { database, now: now2 } = context;
|
|
@@ -24959,7 +24978,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
24959
24978
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
24960
24979
|
}, "oneOf");
|
|
24961
24980
|
|
|
24962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
24963
24982
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
24964
24983
|
const { database } = context;
|
|
24965
24984
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25001,7 +25020,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25001
25020
|
};
|
|
25002
25021
|
}, "accountsStoreOver");
|
|
25003
25022
|
|
|
25004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25005
25024
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25006
25025
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25007
25026
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25025,7 +25044,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25025
25044
|
})), "keepDownloads");
|
|
25026
25045
|
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");
|
|
25027
25046
|
|
|
25028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25029
25048
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25030
25049
|
const { database } = context;
|
|
25031
25050
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25082,7 +25101,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25082
25101
|
}, "keepAttachmentText")
|
|
25083
25102
|
}), "attachmentsStoreOver");
|
|
25084
25103
|
|
|
25085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25086
25105
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25087
25106
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25088
25107
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25262,7 +25281,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25262
25281
|
return done;
|
|
25263
25282
|
}, "rekeyChats");
|
|
25264
25283
|
|
|
25265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25266
25285
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25267
25286
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25268
25287
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25294,7 +25313,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25294
25313
|
});
|
|
25295
25314
|
}, "chatCompleteness");
|
|
25296
25315
|
|
|
25297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25298
25317
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25299
25318
|
const { database } = context;
|
|
25300
25319
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -25394,7 +25413,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25394
25413
|
};
|
|
25395
25414
|
}, "chatsStoreOver");
|
|
25396
25415
|
|
|
25397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
25398
25417
|
import { createHash as createHash6 } from "node:crypto";
|
|
25399
25418
|
var BATCH_CONTEXT = 50;
|
|
25400
25419
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -25532,7 +25551,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
25532
25551
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
25533
25552
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
25534
25553
|
|
|
25535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
25536
25555
|
import { setTimeout } from "node:timers/promises";
|
|
25537
25556
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
25538
25557
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -25844,7 +25863,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
25844
25863
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
25845
25864
|
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");
|
|
25846
25865
|
|
|
25847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
25848
25867
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25849
25868
|
const { database } = context;
|
|
25850
25869
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25951,7 +25970,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
25951
25970
|
};
|
|
25952
25971
|
}, "conversationsStoreOver");
|
|
25953
25972
|
|
|
25954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
25955
25974
|
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";
|
|
25956
25975
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
25957
25976
|
const { database } = context;
|
|
@@ -25976,7 +25995,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25976
25995
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
25977
25996
|
}), "countersStoreOver");
|
|
25978
25997
|
|
|
25979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
25980
25999
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
25981
26000
|
var MENTION_QUERY = defineQuery({
|
|
25982
26001
|
entity: "mention",
|
|
@@ -26050,7 +26069,7 @@ var mentionsState = /* @__PURE__ */ __name((database) => {
|
|
|
26050
26069
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(REBUILT_AT);
|
|
26051
26070
|
return { pending, rebuiltAt: row2 ? JSON.parse(String(row2.value)) : null };
|
|
26052
26071
|
}, "mentionsState");
|
|
26053
|
-
var SELECT = "SELECT mn.id, mn.kind, mn.value, mn.domain, mn.confidence, mn.status, mn.author, mn.source_field, mn.target_type, mn.target_id, mn.created_at, mn.start_offset, mn.end_offset, CASE WHEN mn.source_type = 'attachment' THEN att
|
|
26072
|
+
var SELECT = "SELECT mn.id, mn.kind, mn.value, mn.domain, mn.confidence, mn.status, mn.author, mn.source_field, mn.target_type, mn.target_id, mn.created_at, mn.start_offset, mn.end_offset, CASE WHEN mn.source_type = 'attachment' THEN " + mentionText("att") + " ELSE m.text END AS text, m.external_id AS message_id, m.sent_at, m.chat_id AS chat_pk, c.external_id AS chat_id FROM mentions mn LEFT JOIN attachments att ON mn.source_type = 'attachment' AND att.id = mn.source_id AND att.attachable_type = 'message' JOIN messages m ON mn.source_type IN ('message', 'attachment') AND m.id = CASE WHEN mn.source_type = 'attachment' THEN att.attachable_id ELSE mn.source_id END AND m.deleted_at IS NULL JOIN chats c ON c.id = m.chat_id ";
|
|
26054
26073
|
var stored = /* @__PURE__ */ __name((row2) => ({
|
|
26055
26074
|
id: Number(row2.id),
|
|
26056
26075
|
kind: String(row2.kind),
|
|
@@ -26192,7 +26211,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26192
26211
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26193
26212
|
}, "listPlaces");
|
|
26194
26213
|
|
|
26195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26196
26215
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26197
26216
|
const { database } = context;
|
|
26198
26217
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26227,7 +26246,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26227
26246
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26228
26247
|
}), "mentionsStoreOver");
|
|
26229
26248
|
|
|
26230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26231
26250
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26232
26251
|
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");
|
|
26233
26252
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26242,7 +26261,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26242
26261
|
}));
|
|
26243
26262
|
}, "documentLinkMessages");
|
|
26244
26263
|
|
|
26245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26246
26265
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26247
26266
|
const { database } = context;
|
|
26248
26267
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -26342,6 +26361,10 @@ var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
|
26342
26361
|
const chatKey = chatKeyOf(key2, chatId);
|
|
26343
26362
|
return chatKey === void 0 ? [] : pollVotes2(context, chatKey, messageId);
|
|
26344
26363
|
}, "pollVotes"),
|
|
26364
|
+
reactors: /* @__PURE__ */ __name(async (key2, chatId, messageId) => {
|
|
26365
|
+
const chatKey = chatKeyOf(key2, chatId);
|
|
26366
|
+
return chatKey === void 0 ? [] : reactors(context, chatKey, messageId);
|
|
26367
|
+
}, "reactors"),
|
|
26345
26368
|
senderStats: /* @__PURE__ */ __name(async (key2, senderId) => {
|
|
26346
26369
|
const accountKey = findAccountPk2(key2);
|
|
26347
26370
|
return accountKey === void 0 ? [] : senderStats(context, accountKey, key2.provider, senderId);
|
|
@@ -26372,7 +26395,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26372
26395
|
directReplies: /* @__PURE__ */ __name(async (parents, limit) => directReplies(context, parents, limit), "directReplies")
|
|
26373
26396
|
}), "messagesStoreOver");
|
|
26374
26397
|
|
|
26375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
26376
26399
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
26377
26400
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
26378
26401
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -26429,7 +26452,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
26429
26452
|
});
|
|
26430
26453
|
}, "personPreparation");
|
|
26431
26454
|
|
|
26432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
26433
26456
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
26434
26457
|
const id2 = Number(uid);
|
|
26435
26458
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -26437,7 +26460,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
26437
26460
|
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)));
|
|
26438
26461
|
}, "personSeenInAccounts");
|
|
26439
26462
|
|
|
26440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
26441
26464
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
26442
26465
|
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);
|
|
26443
26466
|
if (!row2)
|
|
@@ -26503,7 +26526,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
26503
26526
|
return { id: id2, personId, removed: true };
|
|
26504
26527
|
}, "removeNote");
|
|
26505
26528
|
|
|
26506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
26507
26530
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
26508
26531
|
const { database } = context;
|
|
26509
26532
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -26535,6 +26558,7 @@ var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
|
26535
26558
|
const accountKey = findAccountPk2(key2);
|
|
26536
26559
|
return accountKey === void 0 ? [] : namesOf(context, accountKey, key2.provider, personId);
|
|
26537
26560
|
}, "personNames"),
|
|
26561
|
+
phoneOf: /* @__PURE__ */ __name(async (key2, personId) => phoneOf(context, key2.provider, personId), "phoneOf"),
|
|
26538
26562
|
privateContact: /* @__PURE__ */ __name(async (key2, person2) => privateContact(context, key2, person2), "privateContact"),
|
|
26539
26563
|
setContactAlias: /* @__PURE__ */ __name(async (key2, person2, alias2) => {
|
|
26540
26564
|
return write(database, () => setAlias(context, key2, person2, alias2));
|
|
@@ -26577,13 +26601,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
26577
26601
|
};
|
|
26578
26602
|
}, "peopleStoreOver");
|
|
26579
26603
|
|
|
26580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
26581
26605
|
import { createHash as createHash8 } from "node:crypto";
|
|
26582
26606
|
|
|
26583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26584
26608
|
import { createHash as createHash7 } from "node:crypto";
|
|
26585
26609
|
|
|
26586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
26587
26611
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
26588
26612
|
var AUTHOR_MEASURES = [
|
|
26589
26613
|
"messages",
|
|
@@ -26723,7 +26747,7 @@ var withoutUrls = /* @__PURE__ */ __name((text5) => text5.replace(/\S+/gu, (toke
|
|
|
26723
26747
|
var rankingWords = /* @__PURE__ */ __name((text5) => withoutUrls(text5).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
26724
26748
|
var rankingQuestion = /* @__PURE__ */ __name((text5) => withoutUrls(text5).includes("?"), "rankingQuestion");
|
|
26725
26749
|
|
|
26726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
26727
26751
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
26728
26752
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
26729
26753
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -26945,7 +26969,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
26945
26969
|
};
|
|
26946
26970
|
}, "rankReplyGraph");
|
|
26947
26971
|
|
|
26948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
26949
26973
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
26950
26974
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
26951
26975
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27119,7 +27143,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27119
27143
|
return { items, evidence, summary, graph: graph.quality };
|
|
27120
27144
|
}, "calculateAdminStatistics");
|
|
27121
27145
|
|
|
27122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27123
27147
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27124
27148
|
const dates = [];
|
|
27125
27149
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27141,7 +27165,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27141
27165
|
return dates[0].node.resolution.date;
|
|
27142
27166
|
}, "rankingContextRange");
|
|
27143
27167
|
|
|
27144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27145
27169
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27146
27170
|
let counts;
|
|
27147
27171
|
try {
|
|
@@ -27436,7 +27460,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27436
27460
|
});
|
|
27437
27461
|
}, "rankQuery");
|
|
27438
27462
|
|
|
27439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27440
27464
|
function fail4(message2, reason = "query.too-large") {
|
|
27441
27465
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27442
27466
|
}
|
|
@@ -27613,7 +27637,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
27613
27637
|
return result;
|
|
27614
27638
|
}), "adminStatisticsQuery");
|
|
27615
27639
|
|
|
27616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
27617
27641
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
27618
27642
|
if (!execution.accounts.length)
|
|
27619
27643
|
return { conversations: [], chats: [] };
|
|
@@ -27631,7 +27655,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
27631
27655
|
return { conversations: conversations2, chats: chats2 };
|
|
27632
27656
|
}, "conversationEligibility");
|
|
27633
27657
|
|
|
27634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
27635
27659
|
import { createHash as createHash9 } from "node:crypto";
|
|
27636
27660
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
27637
27661
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -27781,7 +27805,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
27781
27805
|
return result;
|
|
27782
27806
|
}, "rankingEvidence");
|
|
27783
27807
|
|
|
27784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
27785
27809
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor) => {
|
|
27786
27810
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
27787
27811
|
if (execution.corpus === "mail")
|
|
@@ -27798,7 +27822,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor) => {
|
|
|
27798
27822
|
};
|
|
27799
27823
|
}, "queriesStoreOver");
|
|
27800
27824
|
|
|
27801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
27802
27826
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
27803
27827
|
const { database, now: now2 } = context;
|
|
27804
27828
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -27837,10 +27861,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
27837
27861
|
}));
|
|
27838
27862
|
}, "chatEventsOf");
|
|
27839
27863
|
|
|
27840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27841
27865
|
import { createHash as createHash10 } from "node:crypto";
|
|
27842
27866
|
|
|
27843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
27844
27868
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
27845
27869
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
27846
27870
|
timeZone: zone,
|
|
@@ -27855,7 +27879,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
27855
27879
|
};
|
|
27856
27880
|
}, "calendarKey");
|
|
27857
27881
|
|
|
27858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
27859
27883
|
var RETENTION_TOLERANCE = 864e5;
|
|
27860
27884
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
27861
27885
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -27909,7 +27933,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
27909
27933
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
27910
27934
|
}, "retentionCohorts");
|
|
27911
27935
|
|
|
27912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
27913
27937
|
var iso5 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
27914
27938
|
var week = /* @__PURE__ */ __name((day) => {
|
|
27915
27939
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -28045,7 +28069,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
28045
28069
|
};
|
|
28046
28070
|
}, "retentionQuery");
|
|
28047
28071
|
|
|
28048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
28049
28073
|
var iso6 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
28050
28074
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
28051
28075
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28176,7 +28200,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28176
28200
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28177
28201
|
})), "trackedChats");
|
|
28178
28202
|
|
|
28179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28180
28204
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28181
28205
|
const { database } = context;
|
|
28182
28206
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28232,7 +28256,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28232
28256
|
};
|
|
28233
28257
|
}, "rosterStoreOver");
|
|
28234
28258
|
|
|
28235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28236
28260
|
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");
|
|
28237
28261
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28238
28262
|
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 ?`);
|
|
@@ -28256,7 +28280,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28256
28280
|
}
|
|
28257
28281
|
}, "backfillNormalized");
|
|
28258
28282
|
|
|
28259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28260
28284
|
var INDEX2 = "message_words";
|
|
28261
28285
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28262
28286
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28383,7 +28407,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28383
28407
|
});
|
|
28384
28408
|
}, "resetSearchIndex");
|
|
28385
28409
|
|
|
28386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28387
28411
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28388
28412
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28389
28413
|
const before2 = stemsState(database);
|
|
@@ -28478,7 +28502,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
28478
28502
|
return resetStems(database, { now: now2 });
|
|
28479
28503
|
}, "followDefaultStemmers");
|
|
28480
28504
|
|
|
28481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
28482
28506
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
28483
28507
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
28484
28508
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -28500,7 +28524,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
28500
28524
|
});
|
|
28501
28525
|
}, "termCandidates");
|
|
28502
28526
|
|
|
28503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
28504
28528
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28505
28529
|
const { database } = context;
|
|
28506
28530
|
const stemmerFor = stemmerCache();
|
|
@@ -28522,7 +28546,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28522
28546
|
};
|
|
28523
28547
|
}, "searchIndexStoreOver");
|
|
28524
28548
|
|
|
28525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
28526
28550
|
var HISTORY_KEPT = 1e3;
|
|
28527
28551
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
28528
28552
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -28591,7 +28615,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
28591
28615
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
28592
28616
|
}, "clearHistory");
|
|
28593
28617
|
|
|
28594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
28595
28619
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28596
28620
|
const { database } = context;
|
|
28597
28621
|
return {
|
|
@@ -28615,7 +28639,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28615
28639
|
};
|
|
28616
28640
|
}, "searchesStoreOver");
|
|
28617
28641
|
|
|
28618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
28619
28643
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
28620
28644
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
28621
28645
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -28658,7 +28682,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
28658
28682
|
};
|
|
28659
28683
|
}, "agentActionsStoreOver");
|
|
28660
28684
|
|
|
28661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
28662
28686
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
28663
28687
|
}) => {
|
|
28664
28688
|
const { database, now: now2 } = context;
|
|
@@ -28717,7 +28741,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
28717
28741
|
};
|
|
28718
28742
|
}, "botUpdateStoreOver");
|
|
28719
28743
|
|
|
28720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28744
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
28721
28745
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
28722
28746
|
id: Number(row2.id),
|
|
28723
28747
|
accountId: Number(row2.account_id),
|
|
@@ -29143,14 +29167,19 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29143
29167
|
const clauses = ["e.deleted_at IS NULL"];
|
|
29144
29168
|
const params = [];
|
|
29145
29169
|
const entries = /* @__PURE__ */ __name((extra) => `EXISTS (SELECT 1 FROM calendar_entries ce JOIN calendars c ON c.id = ce.calendar_id WHERE ce.event_id = e.id AND ${extra})`, "entries");
|
|
29146
|
-
|
|
29147
|
-
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29170
|
+
const dated = /* @__PURE__ */ __name((column2, date3, instant, at) => {
|
|
29171
|
+
if (at === void 0)
|
|
29172
|
+
return;
|
|
29173
|
+
if (date3 === void 0) {
|
|
29174
|
+
clauses.push(instant);
|
|
29175
|
+
params.push(at);
|
|
29176
|
+
return;
|
|
29177
|
+
}
|
|
29178
|
+
clauses.push(`(CASE WHEN e.all_day = 1 THEN EXISTS (SELECT 1 FROM calendar_entries ce WHERE ce.event_id = e.id AND ce.${column2}) ELSE ${instant} END)`);
|
|
29179
|
+
params.push(date3, at);
|
|
29180
|
+
}, "dated");
|
|
29181
|
+
dated("end_date > ?", filter.fromDate, "coalesce(e.ends_at, e.starts_at + 1) > ?", filter.from);
|
|
29182
|
+
dated("start_date < ?", filter.toDate, "e.starts_at < ?", filter.to);
|
|
29154
29183
|
if (filter.calendarId !== void 0) {
|
|
29155
29184
|
clauses.push(entries("ce.calendar_id = ?"));
|
|
29156
29185
|
params.push(filter.calendarId);
|
|
@@ -29276,7 +29305,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29276
29305
|
};
|
|
29277
29306
|
}, "eventStoreOver");
|
|
29278
29307
|
|
|
29279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29280
29309
|
var CATALOG_QUERY = defineQuery({
|
|
29281
29310
|
entity: "document",
|
|
29282
29311
|
backend: "sql",
|
|
@@ -29518,7 +29547,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
29518
29547
|
};
|
|
29519
29548
|
}, "catalogStoreOver");
|
|
29520
29549
|
|
|
29521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
29522
29551
|
import { createHash as createHash11 } from "node:crypto";
|
|
29523
29552
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
29524
29553
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -29616,7 +29645,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
29616
29645
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
29617
29646
|
}, "contextEvidenceRequest");
|
|
29618
29647
|
|
|
29619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
29620
29649
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
29621
29650
|
var field2 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
29622
29651
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -29629,7 +29658,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
29629
29658
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
29630
29659
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field2("sourceUrl")})`;
|
|
29631
29660
|
|
|
29632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
29633
29662
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
29634
29663
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
29635
29664
|
signal?.throwIfAborted();
|
|
@@ -29728,7 +29757,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
29728
29757
|
});
|
|
29729
29758
|
}, "readMeetingContextEvidence");
|
|
29730
29759
|
|
|
29731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
29732
29761
|
var corpora = {
|
|
29733
29762
|
message: {
|
|
29734
29763
|
table: "messages",
|
|
@@ -29957,7 +29986,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
29957
29986
|
}
|
|
29958
29987
|
}), "contextRecordsOver");
|
|
29959
29988
|
|
|
29960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
29961
29990
|
var NOTE_FIELDS = [
|
|
29962
29991
|
"text",
|
|
29963
29992
|
"exact",
|
|
@@ -30346,7 +30375,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30346
30375
|
};
|
|
30347
30376
|
}, "noteSearchOver");
|
|
30348
30377
|
|
|
30349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
30350
30379
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
30351
30380
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
30352
30381
|
var EVENT_CORPUS = {
|
|
@@ -30478,7 +30507,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
30478
30507
|
};
|
|
30479
30508
|
}, "eventSearchOver");
|
|
30480
30509
|
|
|
30481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
30482
30511
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
30483
30512
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
30484
30513
|
if (/^document:[1-9]\d*$/.test(raw))
|
|
@@ -30491,7 +30520,7 @@ var reference = /* @__PURE__ */ __name((raw) => {
|
|
|
30491
30520
|
}, "reference");
|
|
30492
30521
|
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "evidence findings", singular: "evidence finding", cited: "reference", reference }), "validateEvidenceFindings");
|
|
30493
30522
|
|
|
30494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
30495
30524
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
30496
30525
|
try {
|
|
30497
30526
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -30503,7 +30532,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
30503
30532
|
}
|
|
30504
30533
|
}, "calendarMoment");
|
|
30505
30534
|
|
|
30506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
30507
30536
|
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";
|
|
30508
30537
|
var iso7 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
30509
30538
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -30616,7 +30645,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30616
30645
|
};
|
|
30617
30646
|
}, "factsStoreOver");
|
|
30618
30647
|
|
|
30619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
30620
30649
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
30621
30650
|
throw new CliError("validation_error", message2);
|
|
30622
30651
|
}, "invalid");
|
|
@@ -30706,7 +30735,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
30706
30735
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
30707
30736
|
}, "findingsCoreOver");
|
|
30708
30737
|
|
|
30709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
30710
30739
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
30711
30740
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
30712
30741
|
var iso8 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -30852,7 +30881,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30852
30881
|
};
|
|
30853
30882
|
}, "proposedActionsStoreOver");
|
|
30854
30883
|
|
|
30855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
30856
30885
|
var stale = /* @__PURE__ */ __name(() => {
|
|
30857
30886
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
30858
30887
|
reason: "evidence-findings.stale"
|
|
@@ -31018,7 +31047,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31018
31047
|
};
|
|
31019
31048
|
}, "evidenceFindingsStoreOver");
|
|
31020
31049
|
|
|
31021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31050
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31022
31051
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31023
31052
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31024
31053
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31071,7 +31100,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31071
31100
|
}, "forPerson")
|
|
31072
31101
|
}), "involvementStoreOver");
|
|
31073
31102
|
|
|
31074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31075
31104
|
import { createHash as createHash12 } from "node:crypto";
|
|
31076
31105
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31077
31106
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31157,16 +31186,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31157
31186
|
};
|
|
31158
31187
|
}, "meetingProjectsStoreOver");
|
|
31159
31188
|
|
|
31160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31161
31190
|
import { createHash as createHash15 } from "node:crypto";
|
|
31162
31191
|
|
|
31163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31164
31193
|
import { createHash as createHash14 } from "node:crypto";
|
|
31165
31194
|
|
|
31166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31167
31196
|
import { createHash as createHash13 } from "node:crypto";
|
|
31168
31197
|
|
|
31169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31170
31199
|
var consolidationId = /* @__PURE__ */ __name((value, field3) => {
|
|
31171
31200
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31172
31201
|
throw new CliError("validation_error", `${field3} must be a positive canonical tag id`);
|
|
@@ -31217,7 +31246,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31217
31246
|
return input;
|
|
31218
31247
|
}, "consolidationApplyInput");
|
|
31219
31248
|
|
|
31220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31221
31250
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31222
31251
|
id: String(row2.id),
|
|
31223
31252
|
sourceId: String(row2.source_id),
|
|
@@ -31292,7 +31321,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
31292
31321
|
}, { beforeCommit: check3 });
|
|
31293
31322
|
}, "applyTagConsolidation");
|
|
31294
31323
|
|
|
31295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31296
31325
|
var selections = [
|
|
31297
31326
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
31298
31327
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -31436,7 +31465,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
31436
31465
|
};
|
|
31437
31466
|
}, "previewRows");
|
|
31438
31467
|
|
|
31439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31440
31469
|
var kinds = ["project", "tag", "topic"];
|
|
31441
31470
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
31442
31471
|
if (signal?.aborted)
|
|
@@ -31700,7 +31729,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31700
31729
|
};
|
|
31701
31730
|
}, "vocabularyStoreOver");
|
|
31702
31731
|
|
|
31703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
31704
31733
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
31705
31734
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
31706
31735
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32221,7 +32250,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32221
32250
|
return key2.padEnd(3, "X");
|
|
32222
32251
|
}, "projectKey");
|
|
32223
32252
|
|
|
32224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32225
32254
|
var DAY4 = 864e5;
|
|
32226
32255
|
var SETTING4 = "logs_pruned_at";
|
|
32227
32256
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY4, botUpdatePayloadsMs: 30 * DAY4 };
|
|
@@ -32248,7 +32277,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32248
32277
|
};
|
|
32249
32278
|
}, "logPruner");
|
|
32250
32279
|
|
|
32251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32252
32281
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32253
32282
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32254
32283
|
reason: "meeting-findings.stale"
|
|
@@ -32417,7 +32446,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32417
32446
|
};
|
|
32418
32447
|
}, "meetingFindingsStoreOver");
|
|
32419
32448
|
|
|
32420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
32421
32450
|
var RANK_BATCH = 512;
|
|
32422
32451
|
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";
|
|
32423
32452
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -32688,7 +32717,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
32688
32717
|
}
|
|
32689
32718
|
}), "meetingVectorsOver");
|
|
32690
32719
|
|
|
32691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
32692
32721
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
32693
32722
|
var TEXTS = {
|
|
32694
32723
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -32789,11 +32818,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32789
32818
|
};
|
|
32790
32819
|
}, "sourceMentionStoreOver");
|
|
32791
32820
|
|
|
32792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
32793
32822
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
32794
32823
|
import { dirname } from "node:path";
|
|
32795
32824
|
|
|
32796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
32797
32826
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
32798
32827
|
var CLIENTS_SETTING = "clients";
|
|
32799
32828
|
var coreVersion = (() => {
|
|
@@ -32851,7 +32880,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
32851
32880
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
32852
32881
|
}, "refusalAdvice");
|
|
32853
32882
|
|
|
32854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
32855
32884
|
var GENERATED = [
|
|
32856
32885
|
{
|
|
32857
32886
|
"name": "20261010184427_initial",
|
|
@@ -33645,10 +33674,29 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
33645
33674
|
"UPDATE calendar_entry_participants SET response = 'needs-action' WHERE response = 'needsAction';",
|
|
33646
33675
|
"UPDATE calendars SET access_role = 'free-busy' WHERE access_role = 'freeBusyReader';"
|
|
33647
33676
|
]
|
|
33677
|
+
},
|
|
33678
|
+
{
|
|
33679
|
+
"name": "20261029162435_version-36-attachment-contact",
|
|
33680
|
+
"statements": [
|
|
33681
|
+
"ALTER TABLE `attachments` ADD `contact` text;"
|
|
33682
|
+
]
|
|
33683
|
+
},
|
|
33684
|
+
{
|
|
33685
|
+
"name": "20261029180959_version-37-identity-phone",
|
|
33686
|
+
"statements": [
|
|
33687
|
+
"ALTER TABLE `identities` ADD `phone` text;"
|
|
33688
|
+
]
|
|
33689
|
+
},
|
|
33690
|
+
{
|
|
33691
|
+
"name": "20261029181000_version-37-contact-mention-triggers",
|
|
33692
|
+
"statements": [
|
|
33693
|
+
"-- A shared contact card has no text, only a phone: queue it for mentions like an attachment's text.\n-- Cards stored before version 37 wait for `mentions rebuild`.\nCREATE TRIGGER mention_pending_attachment_contact_ai AFTER INSERT ON attachments\n WHEN new.attachable_type = 'message' AND new.contact IS NOT NULL BEGIN\n INSERT OR IGNORE INTO mention_pending (source_type, source_id) VALUES ('attachment', new.id);\nEND;",
|
|
33694
|
+
"CREATE TRIGGER mention_pending_attachment_contact_au AFTER UPDATE OF contact ON attachments\n WHEN new.attachable_type = 'message' AND old.contact IS NOT new.contact BEGIN\n INSERT OR IGNORE INTO mention_pending (source_type, source_id) VALUES ('attachment', new.id);\nEND;"
|
|
33695
|
+
]
|
|
33648
33696
|
}
|
|
33649
33697
|
];
|
|
33650
33698
|
|
|
33651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
33652
33700
|
var MANIFEST = [
|
|
33653
33701
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
33654
33702
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -33695,7 +33743,10 @@ var MANIFEST = [
|
|
|
33695
33743
|
{ name: "20261025182500_version-34-vector-index", version: 34, minCompatible: 34 },
|
|
33696
33744
|
{ name: "20261025182501_version-34-vector-index-triggers", version: 34, minCompatible: 34 },
|
|
33697
33745
|
{ name: "20261027102259_version-35-calendar-neutral", version: 35, minCompatible: 34 },
|
|
33698
|
-
{ name: "20261027102302_version-35-calendar-neutral-data", version: 35, minCompatible: 34 }
|
|
33746
|
+
{ name: "20261027102302_version-35-calendar-neutral-data", version: 35, minCompatible: 34 },
|
|
33747
|
+
{ name: "20261029162435_version-36-attachment-contact", version: 36, minCompatible: 34 },
|
|
33748
|
+
{ name: "20261029180959_version-37-identity-phone", version: 37, minCompatible: 34 },
|
|
33749
|
+
{ name: "20261029181000_version-37-contact-mention-triggers", version: 37, minCompatible: 34 }
|
|
33699
33750
|
];
|
|
33700
33751
|
var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated = GENERATED) => {
|
|
33701
33752
|
const migrations = [];
|
|
@@ -33719,7 +33770,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
33719
33770
|
return migrations;
|
|
33720
33771
|
}, "generatedMigrations");
|
|
33721
33772
|
|
|
33722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
33723
33774
|
var MIGRATIONS = generatedMigrations();
|
|
33724
33775
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
33725
33776
|
version INTEGER PRIMARY KEY,
|
|
@@ -33772,7 +33823,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
33772
33823
|
}
|
|
33773
33824
|
}, "migrate");
|
|
33774
33825
|
|
|
33775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
33776
33827
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
33777
33828
|
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 ?");
|
|
33778
33829
|
if (pending.get(0, 1) === void 0)
|
|
@@ -33794,7 +33845,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
33794
33845
|
}
|
|
33795
33846
|
}, "fillJoinKeys");
|
|
33796
33847
|
|
|
33797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
33798
33849
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
33799
33850
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
33800
33851
|
try {
|
|
@@ -33807,8 +33858,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
33807
33858
|
}, "openSqlite");
|
|
33808
33859
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33809
33860
|
quietSqliteWarning();
|
|
33810
|
-
const { drizzle } = await import("./node-
|
|
33811
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
33861
|
+
const { drizzle } = await import("./node-UGJWZLVB.js");
|
|
33862
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-FJFIOC3K.js");
|
|
33812
33863
|
const client = await nodeClient(path, { readOnly });
|
|
33813
33864
|
try {
|
|
33814
33865
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33818,8 +33869,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33818
33869
|
}
|
|
33819
33870
|
}, "openUnderNode");
|
|
33820
33871
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
33821
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
33822
|
-
const { drizzle } = await import("./bun-
|
|
33872
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-XVRVJ7A2.js");
|
|
33873
|
+
const { drizzle } = await import("./bun-UA5PRMLC.js");
|
|
33823
33874
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
33824
33875
|
try {
|
|
33825
33876
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -33829,7 +33880,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
33829
33880
|
}
|
|
33830
33881
|
}, "openUnderBun");
|
|
33831
33882
|
|
|
33832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
33833
33884
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
33834
33885
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
33835
33886
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -33844,7 +33895,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
33844
33895
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
33845
33896
|
}, "assertReadCompatible");
|
|
33846
33897
|
|
|
33847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33848
33899
|
var BACKFILL_ON_OPEN = 5e3;
|
|
33849
33900
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
33850
33901
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -33900,10 +33951,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
33900
33951
|
}
|
|
33901
33952
|
}, "openStoreContext");
|
|
33902
33953
|
|
|
33903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
33904
33955
|
import { createHash as createHash16 } from "node:crypto";
|
|
33905
33956
|
|
|
33906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
33907
33958
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
33908
33959
|
var ref = text3(2048);
|
|
33909
33960
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -33969,7 +34020,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
33969
34020
|
}))
|
|
33970
34021
|
});
|
|
33971
34022
|
|
|
33972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
33973
34024
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
33974
34025
|
var invalid7 = /* @__PURE__ */ __name((field3) => {
|
|
33975
34026
|
throw new CliError("validation_error", `invalid project annotations.${field3}`);
|
|
@@ -34073,7 +34124,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
34073
34124
|
invalid7("external.unused");
|
|
34074
34125
|
}, "validateProjectAnnotationsGraph");
|
|
34075
34126
|
|
|
34076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34077
34128
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34078
34129
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34079
34130
|
var targetSchema = strictObject({
|
|
@@ -34179,7 +34230,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
34179
34230
|
};
|
|
34180
34231
|
}, "planBoundProjectAnnotations");
|
|
34181
34232
|
|
|
34182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
34183
34234
|
import { createHash as createHash17 } from "node:crypto";
|
|
34184
34235
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34185
34236
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34273,7 +34324,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34273
34324
|
})).digest("hex");
|
|
34274
34325
|
}, "projectAnnotationSnapshotFingerprint");
|
|
34275
34326
|
|
|
34276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
34277
34328
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
34278
34329
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
34279
34330
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -34290,7 +34341,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
34290
34341
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
34291
34342
|
}, "projectAnnotationRequest");
|
|
34292
34343
|
|
|
34293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
34294
34345
|
var SnapshotBudget = class {
|
|
34295
34346
|
static {
|
|
34296
34347
|
__name(this, "SnapshotBudget");
|
|
@@ -34316,13 +34367,13 @@ var SnapshotBudget = class {
|
|
|
34316
34367
|
}
|
|
34317
34368
|
};
|
|
34318
34369
|
|
|
34319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34320
34371
|
import { createHash as createHash19 } from "node:crypto";
|
|
34321
34372
|
|
|
34322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
34323
34374
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
34324
34375
|
|
|
34325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
34326
34377
|
import { createHash as createHash18 } from "node:crypto";
|
|
34327
34378
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
34328
34379
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -34465,7 +34516,7 @@ var ProjectSnapshotSources = class {
|
|
|
34465
34516
|
}
|
|
34466
34517
|
};
|
|
34467
34518
|
|
|
34468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
34469
34520
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
34470
34521
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
34471
34522
|
}, "unsupported");
|
|
@@ -34636,7 +34687,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, bud
|
|
|
34636
34687
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
34637
34688
|
}), "projectAnnotationSnapshot");
|
|
34638
34689
|
|
|
34639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
34640
34691
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, manifest, bindings, budget) => read(database, () => {
|
|
34641
34692
|
const current = projectAnnotationSnapshot(database, projectId, budget).snapshot;
|
|
34642
34693
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -34698,7 +34749,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId, man
|
|
|
34698
34749
|
};
|
|
34699
34750
|
}), "previewAnnotationSnapshot");
|
|
34700
34751
|
|
|
34701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
34702
34753
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snapshot2, bindings) => {
|
|
34703
34754
|
const mappings = { ...bindings };
|
|
34704
34755
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -34740,7 +34791,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId, snap
|
|
|
34740
34791
|
return mappings;
|
|
34741
34792
|
}, "restoreAnnotationRecords");
|
|
34742
34793
|
|
|
34743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
34744
34795
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
34745
34796
|
async preview(request) {
|
|
34746
34797
|
const { snapshot: snapshot2, projectId } = projectAnnotationRequest(request);
|
|
@@ -34770,7 +34821,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
34770
34821
|
}
|
|
34771
34822
|
}), "projectAnnotationStoreOver");
|
|
34772
34823
|
|
|
34773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
34774
34825
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
34775
34826
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
34776
34827
|
let merged = { from: from2, to };
|
|
@@ -34783,7 +34834,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
34783
34834
|
}, "markRange");
|
|
34784
34835
|
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");
|
|
34785
34836
|
|
|
34786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
34787
34838
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
34788
34839
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
34789
34840
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -34793,7 +34844,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
34793
34844
|
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);
|
|
34794
34845
|
}, "setTaskRulesStop");
|
|
34795
34846
|
|
|
34796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
34797
34848
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34798
34849
|
const { database } = context;
|
|
34799
34850
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -34849,7 +34900,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34849
34900
|
};
|
|
34850
34901
|
}, "syncStoreOver");
|
|
34851
34902
|
|
|
34852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
34853
34904
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
34854
34905
|
const { database } = context;
|
|
34855
34906
|
return {
|
|
@@ -34871,7 +34922,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
34871
34922
|
};
|
|
34872
34923
|
}, "tagsStoreOver");
|
|
34873
34924
|
|
|
34874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
34875
34926
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
34876
34927
|
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
|
|
34877
34928
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -34998,7 +35049,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
34998
35049
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
34999
35050
|
}, "savePictureChunks");
|
|
35000
35051
|
|
|
35001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35002
35053
|
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,
|
|
35003
35054
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35004
35055
|
FROM messages m
|
|
@@ -35081,7 +35132,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35081
35132
|
return plain2(best(found2));
|
|
35082
35133
|
}, "nearestMessages");
|
|
35083
35134
|
|
|
35084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35085
35136
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35086
35137
|
const { database } = context;
|
|
35087
35138
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -35335,7 +35386,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
35335
35386
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
35336
35387
|
}), "vectorsStoreOver");
|
|
35337
35388
|
|
|
35338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
35339
35390
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
35340
35391
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
35341
35392
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -35423,10 +35474,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
35423
35474
|
}
|
|
35424
35475
|
}, "lastBackup");
|
|
35425
35476
|
|
|
35426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
35427
35478
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
35428
35479
|
|
|
35429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
35430
35481
|
var COUNTED_TABLES = [
|
|
35431
35482
|
"accounts",
|
|
35432
35483
|
"chats",
|
|
@@ -35511,7 +35562,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
35511
35562
|
};
|
|
35512
35563
|
}, "storeContents");
|
|
35513
35564
|
|
|
35514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.479.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._835150ae4189cac822e446e361e54dd7/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
35515
35566
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
35516
35567
|
const context = await openStoreContext(options);
|
|
35517
35568
|
try {
|