@wirecat/tg-cli 0.112.0 → 0.113.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-ILDV2YSZ.js → adapter-EQKEFGPB.js} +45 -45
- package/dist/bundle/{all-profiles-4SH2Q4WV.js → all-profiles-TTBFF663.js} +8 -8
- package/dist/bundle/{anthropic-64SM23YO.js → anthropic-XPZS7267.js} +5 -5
- package/dist/bundle/{app-server-SSYZWCDJ.js → app-server-ZSZ7KRAY.js} +42 -42
- package/dist/bundle/{bot-api-OHAGQMES.js → bot-api-X7BOVNIO.js} +46 -46
- package/dist/bundle/{bot-history-AUFO7UL2.js → bot-history-DWIUIPN5.js} +15 -15
- package/dist/bundle/{bun-AHZX63TR.js → bun-ZGZVAJU2.js} +2 -2
- package/dist/bundle/{bun-sqlite-KBIIODPV.js → bun-sqlite-UN2UJ6SI.js} +4 -4
- package/dist/bundle/{chunk-DFUTZGEV.js → chunk-3MAYYFKY.js} +1 -1
- package/dist/bundle/{chunk-B3Y2KZRS.js → chunk-452UZ2PU.js} +110 -95
- package/dist/bundle/{chunk-SC2DUQAK.js → chunk-4GLMEES6.js} +1 -1
- package/dist/bundle/{chunk-BTAET4U3.js → chunk-4SQB5VKL.js} +1 -1
- package/dist/bundle/{chunk-GM44UNGL.js → chunk-5NF7M4MN.js} +1 -1
- package/dist/bundle/{chunk-JXTYTAWE.js → chunk-6F6K3LWV.js} +11 -11
- package/dist/bundle/{chunk-XSYJKEA5.js → chunk-6OKGHHRL.js} +4 -4
- package/dist/bundle/{chunk-DNYGJAEP.js → chunk-6WJ5M2Q4.js} +4 -4
- package/dist/bundle/{chunk-NQKPXVLX.js → chunk-7IWDS2CM.js} +2 -2
- package/dist/bundle/{chunk-3AJO4GER.js → chunk-AGUCXSSM.js} +5 -5
- package/dist/bundle/{chunk-E4EJ2UTT.js → chunk-AVUIWZTP.js} +2 -2
- package/dist/bundle/{chunk-JIGYVVWA.js → chunk-BI5YJZJB.js} +31 -27
- package/dist/bundle/{chunk-MCXVGHL6.js → chunk-EGR5IJCG.js} +32 -25
- package/dist/bundle/{chunk-K7VOCHVS.js → chunk-ENXO43TV.js} +6 -6
- package/dist/bundle/{chunk-D5JP2YWG.js → chunk-G74QMORP.js} +2 -2
- package/dist/bundle/{chunk-4JXZKMXV.js → chunk-GX4LRLVD.js} +68 -59
- package/dist/bundle/{chunk-EO7PQE3J.js → chunk-HNN7EKIM.js} +90 -73
- package/dist/bundle/{chunk-UXCWUEN7.js → chunk-HO53POQG.js} +5 -5
- package/dist/bundle/{chunk-2IGZLBTE.js → chunk-IDUYRTPF.js} +2 -2
- package/dist/bundle/{chunk-JPRYFDOJ.js → chunk-IYKRHDX6.js} +44 -44
- package/dist/bundle/{chunk-BIERCQVG.js → chunk-J6USEBA6.js} +313 -258
- package/dist/bundle/{chunk-KYYAHIG2.js → chunk-JDQSX2JQ.js} +416 -337
- package/dist/bundle/{chunk-EPAOLRUL.js → chunk-JO45BOYE.js} +2 -2
- package/dist/bundle/{chunk-SFJFBIYP.js → chunk-JRTZ5I6M.js} +2 -2
- package/dist/bundle/{chunk-6KGENDPF.js → chunk-JW7BMJ6O.js} +2 -2
- package/dist/bundle/{chunk-5BNYW5RA.js → chunk-K3F46QVN.js} +2 -2
- package/dist/bundle/{chunk-JYOQMYNJ.js → chunk-KK3JVOOV.js} +30 -30
- package/dist/bundle/{chunk-GW7JRFTF.js → chunk-KOWQVHXI.js} +3 -3
- package/dist/bundle/{chunk-KLNQXUDX.js → chunk-KQ23JWLJ.js} +20 -18
- package/dist/bundle/{chunk-UVRD447S.js → chunk-KVLCIZUK.js} +3 -3
- package/dist/bundle/{chunk-UQOSZ2XX.js → chunk-MTX5EDYJ.js} +636 -473
- package/dist/bundle/{chunk-RANORATG.js → chunk-OC4RRFKH.js} +4 -4
- package/dist/bundle/{chunk-3GL4AOOG.js → chunk-OQR442B6.js} +1 -1
- package/dist/bundle/{chunk-3W7BU2BL.js → chunk-OSBAISA5.js} +6 -6
- package/dist/bundle/{chunk-COTC7HF3.js → chunk-OYNSFQ7K.js} +1 -1
- package/dist/bundle/{chunk-QL4WBCL5.js → chunk-PCRLXJRH.js} +11 -7
- package/dist/bundle/{chunk-PXUHQO66.js → chunk-PHPNA2HU.js} +11 -11
- package/dist/bundle/{chunk-RHYMEHYK.js → chunk-PHYDBR5M.js} +2 -2
- package/dist/bundle/{chunk-NKACHGB2.js → chunk-Q264PYGE.js} +40 -14
- package/dist/bundle/{chunk-ICEJKOKO.js → chunk-T4TTRFP5.js} +7 -7
- package/dist/bundle/{chunk-JLB5LEXJ.js → chunk-T5RM4Y35.js} +3 -3
- package/dist/bundle/{chunk-TOBJGMMA.js → chunk-TQ6EA7TB.js} +11 -11
- package/dist/bundle/{chunk-RPNRCFEE.js → chunk-TUD4MU7S.js} +2 -2
- package/dist/bundle/{chunk-TUJEJ4D5.js → chunk-U3MJQLZQ.js} +13 -13
- package/dist/bundle/{chunk-4IDJ7QCG.js → chunk-UE75KPAC.js} +4 -4
- package/dist/bundle/{chunk-7MFJFVUN.js → chunk-UIVLDKWT.js} +1 -1
- package/dist/bundle/{chunk-WI2S6INJ.js → chunk-VDATXIO4.js} +6 -6
- package/dist/bundle/{chunk-WWKXTKCE.js → chunk-VDEXNNMH.js} +4 -4
- package/dist/bundle/{chunk-5W72OARG.js → chunk-VVA4555T.js} +8 -8
- package/dist/bundle/{chunk-QMJGHSGN.js → chunk-WSAHUQ6K.js} +3 -3
- package/dist/bundle/{chunk-KGYPSBTI.js → chunk-XXNJF3ZM.js} +32 -26
- package/dist/bundle/{chunk-GSGS62LX.js → chunk-XZ2ZHIAO.js} +1 -1
- package/dist/bundle/{chunk-RC7EBLHM.js → chunk-Z6TRIW2O.js} +8 -8
- package/dist/bundle/{chunk-PDVSMGWO.js → chunk-ZID2Y4XU.js} +2 -2
- package/dist/bundle/command-contract-GV67H22L.js +32 -0
- package/dist/bundle/{decode-FR3QHHJI.js → decode-AMQVTEMW.js} +4 -4
- package/dist/bundle/{echarts-VTV4C2OS.js → echarts-ECYONFQJ.js} +2 -2
- package/dist/bundle/{embed-US7X5P5D.js → embed-VZYBZEWI.js} +5 -5
- package/dist/bundle/{embedder-63Z7ZBYG.js → embedder-GSWBGHRK.js} +8 -8
- package/dist/bundle/{entry-B4J7IAG3.js → entry-LALZILY4.js} +5 -5
- package/dist/bundle/{first-run-MXPPUGII.js → first-run-LEAI623Q.js} +9 -9
- package/dist/bundle/first-screen-MOCVLE23.js +30 -0
- package/dist/bundle/{identity-AQWKU7SM.js → identity-54HA5GN6.js} +3 -3
- package/dist/bundle/{instructions-GBR6DJTK.js → instructions-AXLQQS3G.js} +1 -1
- package/dist/bundle/{mcp-YJEQYYTR.js → mcp-VVMPUDSL.js} +2 -2
- package/dist/bundle/{node-QXGPMDH2.js → node-7JHC5K77.js} +2 -2
- package/dist/bundle/{node-sqlite-L6CAMXQ2.js → node-sqlite-LYJEK46T.js} +4 -4
- package/dist/bundle/{oauth-5RK6J4SG.js → oauth-BROPKI3K.js} +6 -6
- package/dist/bundle/{open-A3IAG7U6.js → open-C6XQ46JK.js} +3 -3
- package/dist/bundle/{openai-YKNGCHVV.js → openai-VWSU7ZDD.js} +13 -13
- package/dist/bundle/{process-CGLNXFIU.js → process-QKEFL5HL.js} +1 -1
- package/dist/bundle/{program-AEDR6R5P.js → program-ACY7O33O.js} +48 -48
- package/dist/bundle/{prompt-65CSCL2T.js → prompt-EGULVW2F.js} +4 -4
- package/dist/bundle/{proxy-transport-U3QOYMQF.js → proxy-transport-KIMADLQ2.js} +4 -4
- package/dist/bundle/{recognize-ECRO6CFK.js → recognize-UMTKLWVR.js} +3 -3
- package/dist/bundle/{remote-6IEFZFGO.js → remote-DABI7PSQ.js} +6 -6
- package/dist/bundle/{rerank-23GXWT2V.js → rerank-ZFATWWBE.js} +6 -6
- package/dist/bundle/{serve-S65YTPZN.js → serve-B7YYCMGN.js} +8 -8
- package/dist/bundle/{server-MVTBK7GV.js → server-DGKZISZH.js} +32 -32
- package/dist/bundle/server-UC7UWUIS.js +56 -0
- package/dist/bundle/{state-TH3UVQAW.js → state-AQ2PABA5.js} +5 -5
- package/dist/bundle/{store-2WFTUSNG.js → store-46GJTFLJ.js} +10 -10
- package/dist/bundle/store-maintenance-command-FCFKHGRM.js +45 -0
- package/dist/bundle/tg.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-4KVJJZ46.js +0 -32
- package/dist/bundle/first-screen-GFYHUBBD.js +0 -30
- package/dist/bundle/server-IH24WEAC.js +0 -56
- package/dist/bundle/store-maintenance-command-PUOU2CL6.js +0 -45
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-HPXYN7F3.js} +0 -0
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
validateQuery,
|
|
61
61
|
walkQuery,
|
|
62
62
|
zonedMoment
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-HNN7EKIM.js";
|
|
64
64
|
import {
|
|
65
65
|
DEFAULT_STEMMERS,
|
|
66
66
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -73,21 +73,21 @@ import {
|
|
|
73
73
|
fold,
|
|
74
74
|
normalize,
|
|
75
75
|
parseStemmers
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-VVA4555T.js";
|
|
77
77
|
import {
|
|
78
78
|
DEFAULT_TASK_CATEGORIES,
|
|
79
79
|
sharedConfigPath,
|
|
80
80
|
storedTaskCategories,
|
|
81
81
|
taskCategoriesReader
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-VDATXIO4.js";
|
|
83
83
|
import {
|
|
84
84
|
storePath
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-PHYDBR5M.js";
|
|
86
86
|
import {
|
|
87
87
|
PRAGMAS,
|
|
88
88
|
quietSqliteWarning,
|
|
89
89
|
storeCapable
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-OSBAISA5.js";
|
|
91
91
|
import {
|
|
92
92
|
SQLiteTable,
|
|
93
93
|
TableAliasProxyHandler,
|
|
@@ -112,10 +112,10 @@ import {
|
|
|
112
112
|
sql,
|
|
113
113
|
sqliteTable,
|
|
114
114
|
text
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-UIVLDKWT.js";
|
|
116
116
|
import {
|
|
117
117
|
singleLine
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-KQ23JWLJ.js";
|
|
119
119
|
import {
|
|
120
120
|
CliError,
|
|
121
121
|
array,
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
safeParse,
|
|
134
134
|
strictObject,
|
|
135
135
|
string
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-PCRLXJRH.js";
|
|
137
137
|
import {
|
|
138
138
|
resolveFrom
|
|
139
139
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
__name
|
|
142
142
|
} from "./chunk-ZVVMGPBJ.js";
|
|
143
143
|
|
|
144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
145
145
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
146
146
|
const methods = whole;
|
|
147
147
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -269,7 +269,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
269
269
|
};
|
|
270
270
|
}, "bindAccount");
|
|
271
271
|
|
|
272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
273
273
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
274
274
|
var PROVIDERS = [
|
|
275
275
|
{ name: "telegram", kind: "messages", aliases: ["tg"] },
|
|
@@ -360,7 +360,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
360
360
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
361
361
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
362
362
|
|
|
363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
364
364
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
365
365
|
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");
|
|
366
366
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -383,7 +383,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
383
383
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
384
384
|
}, "sourceOf");
|
|
385
385
|
|
|
386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
387
387
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
388
388
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
389
389
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -570,7 +570,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
570
570
|
return { accounts: [...chosen.values()], skipped };
|
|
571
571
|
}, "fitting");
|
|
572
572
|
|
|
573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
574
574
|
var IndexBuilderOn = class {
|
|
575
575
|
static {
|
|
576
576
|
__name(this, "IndexBuilderOn");
|
|
@@ -765,7 +765,7 @@ function alias(table, alias2) {
|
|
|
765
765
|
}
|
|
766
766
|
__name(alias, "alias");
|
|
767
767
|
|
|
768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
769
769
|
var ENTITY_TABLES = {
|
|
770
770
|
account: "accounts",
|
|
771
771
|
attachment: "attachments",
|
|
@@ -805,7 +805,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
805
805
|
return { table, pointer, type, count, known: known2 };
|
|
806
806
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
807
807
|
|
|
808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
809
809
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
810
810
|
id: integer("id").primaryKey(),
|
|
811
811
|
name: text("name").notNull().unique(),
|
|
@@ -814,7 +814,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
814
814
|
updatedAt: integer("updated_at").notNull()
|
|
815
815
|
});
|
|
816
816
|
|
|
817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
818
818
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
819
819
|
sourceKey: text("source_key").notNull(),
|
|
820
820
|
collection: text("collection").notNull(),
|
|
@@ -824,13 +824,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
824
824
|
createdAt: integer("created_at").notNull()
|
|
825
825
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
826
826
|
|
|
827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
828
828
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
829
829
|
id: integer("id").notNull(),
|
|
830
830
|
indexableType: text("indexable_type").notNull()
|
|
831
831
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
832
832
|
|
|
833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
834
834
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
835
835
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
836
836
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -856,7 +856,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
856
856
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
857
857
|
]);
|
|
858
858
|
|
|
859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
860
860
|
var accounts = sqliteTable("accounts", {
|
|
861
861
|
id: integer("id").primaryKey(),
|
|
862
862
|
provider: text("provider").notNull(),
|
|
@@ -2357,7 +2357,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2357
2357
|
at: integer("at").notNull()
|
|
2358
2358
|
});
|
|
2359
2359
|
|
|
2360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2361
2361
|
var ARMS = [
|
|
2362
2362
|
[
|
|
2363
2363
|
"message",
|
|
@@ -2484,7 +2484,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2484
2484
|
return recomputed;
|
|
2485
2485
|
}, "drainInvolvementQueue");
|
|
2486
2486
|
|
|
2487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2488
2488
|
import { domainToUnicode } from "node:url";
|
|
2489
2489
|
|
|
2490
2490
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12506,7 +12506,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12506
12506
|
}, "oa");
|
|
12507
12507
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12508
12508
|
|
|
12509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12509
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12510
12510
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12511
12511
|
var ID = /^[\w-]{10,}$/;
|
|
12512
12512
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12547,7 +12547,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12547
12547
|
return { url, documentId: googleDocumentId(url) };
|
|
12548
12548
|
}), "googleDocumentLinks");
|
|
12549
12549
|
|
|
12550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12551
12551
|
var PHONE_PLANS = [
|
|
12552
12552
|
{
|
|
12553
12553
|
country: "us",
|
|
@@ -12927,7 +12927,7 @@ var PHONE_PLANS = [
|
|
|
12927
12927
|
}
|
|
12928
12928
|
];
|
|
12929
12929
|
|
|
12930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12931
12931
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12932
12932
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12933
12933
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12968,7 +12968,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12968
12968
|
return void 0;
|
|
12969
12969
|
}, "nationalPhone");
|
|
12970
12970
|
|
|
12971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12972
12972
|
var BEFORE = [
|
|
12973
12973
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12974
12974
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13228,7 +13228,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13228
13228
|
return found2.sort((a, b) => a.start - b.start);
|
|
13229
13229
|
}, "findPlaces");
|
|
13230
13230
|
|
|
13231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13232
13232
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13233
13233
|
var MENTION_VERSIONS = {
|
|
13234
13234
|
phone: 1,
|
|
@@ -13418,7 +13418,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13418
13418
|
};
|
|
13419
13419
|
}, "typedPhone");
|
|
13420
13420
|
|
|
13421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13422
13422
|
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";
|
|
13423
13423
|
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";
|
|
13424
13424
|
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";
|
|
@@ -13426,7 +13426,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13426
13426
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13427
13427
|
var NAME_WORDS = WORDS.split(" ");
|
|
13428
13428
|
|
|
13429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13430
13430
|
var LATIN_TO_CYRILLIC = {
|
|
13431
13431
|
shch: "\u0449",
|
|
13432
13432
|
sch: "\u0449",
|
|
@@ -13634,7 +13634,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13634
13634
|
return found2;
|
|
13635
13635
|
}, "findUnknownNames");
|
|
13636
13636
|
|
|
13637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13638
13638
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13639
13639
|
"webpage",
|
|
13640
13640
|
"share",
|
|
@@ -13645,6 +13645,14 @@ var NOT_FILES = /* @__PURE__ */ new Set([
|
|
|
13645
13645
|
"call",
|
|
13646
13646
|
"inline_keyboard"
|
|
13647
13647
|
]);
|
|
13648
|
+
var hitFiles = /* @__PURE__ */ __name((attachments2) => (attachments2 ?? []).flatMap(({ kind: kind3, name, size: size2 }, index2) => NOT_FILES.has(kind3) ? [] : [
|
|
13649
|
+
{
|
|
13650
|
+
position: index2 + 1,
|
|
13651
|
+
kind: kind3,
|
|
13652
|
+
...name === void 0 ? {} : { name },
|
|
13653
|
+
...size2 === void 0 ? {} : { size: size2 }
|
|
13654
|
+
}
|
|
13655
|
+
]), "hitFiles");
|
|
13648
13656
|
var storedKinds = /* @__PURE__ */ __name((kind3) => kind3 === "file" ? ["file", "document"] : [kind3], "storedKinds");
|
|
13649
13657
|
var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
13650
13658
|
const byPosition = new Map(stored3.map((one) => [one.position, one]));
|
|
@@ -13666,7 +13674,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13666
13674
|
});
|
|
13667
13675
|
}, "matchDownloads");
|
|
13668
13676
|
|
|
13669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13670
13678
|
var QUERY_VERSION = 1;
|
|
13671
13679
|
var QUERY_LIMITS2 = {
|
|
13672
13680
|
...QUERY_LIMITS,
|
|
@@ -13697,7 +13705,7 @@ function exhausted(budget) {
|
|
|
13697
13705
|
}
|
|
13698
13706
|
__name(exhausted, "exhausted");
|
|
13699
13707
|
|
|
13700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13701
13709
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13702
13710
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13703
13711
|
kind: "char",
|
|
@@ -14097,7 +14105,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14097
14105
|
return out;
|
|
14098
14106
|
}, "foldRegex");
|
|
14099
14107
|
|
|
14100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14101
14109
|
var PRESET_VERSION = 1;
|
|
14102
14110
|
var PRESETS = {
|
|
14103
14111
|
password: {
|
|
@@ -14151,7 +14159,7 @@ var PRESETS = {
|
|
|
14151
14159
|
}
|
|
14152
14160
|
};
|
|
14153
14161
|
|
|
14154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14155
14163
|
var FIELD_VERSION = 2;
|
|
14156
14164
|
var UNITS = {
|
|
14157
14165
|
"": 1,
|
|
@@ -14611,12 +14619,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14611
14619
|
return validateFields(parsed2.output);
|
|
14612
14620
|
}, "validateAst");
|
|
14613
14621
|
|
|
14614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14615
14623
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14616
14624
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14617
14625
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14618
14626
|
|
|
14619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14620
14628
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14621
14629
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14622
14630
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14640,7 +14648,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14640
14648
|
};
|
|
14641
14649
|
}, "linkMatch");
|
|
14642
14650
|
|
|
14643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14644
14652
|
var SETTING = "phoneCountries";
|
|
14645
14653
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14646
14654
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14671,7 +14679,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14671
14679
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14672
14680
|
}, "valueMatch");
|
|
14673
14681
|
|
|
14674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
14675
14683
|
var SCHEME = "msg:";
|
|
14676
14684
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
|
|
14677
14685
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -14685,7 +14693,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
|
14685
14693
|
return { provider, account, chat: chat2, message: message2 };
|
|
14686
14694
|
}, "parseLocator");
|
|
14687
14695
|
|
|
14688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14689
14697
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14690
14698
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14691
14699
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14713,7 +14721,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14713
14721
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14714
14722
|
}, "vocabularySimilarity");
|
|
14715
14723
|
|
|
14716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14717
14725
|
import { createHash } from "node:crypto";
|
|
14718
14726
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14719
14727
|
try {
|
|
@@ -14779,7 +14787,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14779
14787
|
});
|
|
14780
14788
|
}, "guardTagCreation");
|
|
14781
14789
|
|
|
14782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14783
14791
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
14784
14792
|
throw new CliError("validation_error", message2);
|
|
14785
14793
|
}, "invalid");
|
|
@@ -14856,7 +14864,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14856
14864
|
};
|
|
14857
14865
|
}, "createTagRedirectIndex");
|
|
14858
14866
|
|
|
14859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14860
14868
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14861
14869
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14862
14870
|
if (!row2)
|
|
@@ -14884,7 +14892,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14884
14892
|
return snapshot2;
|
|
14885
14893
|
}, "tagRedirectSnapshot");
|
|
14886
14894
|
|
|
14887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14888
14896
|
import { createHash as createHash2 } from "node:crypto";
|
|
14889
14897
|
var TASK_KEY_PREFIXES = {
|
|
14890
14898
|
question: "Q",
|
|
@@ -14912,7 +14920,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14912
14920
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14913
14921
|
}, "taskAccountOf");
|
|
14914
14922
|
|
|
14915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
14916
14924
|
var SIMPLE_REFERENCES = [
|
|
14917
14925
|
"note",
|
|
14918
14926
|
"document",
|
|
@@ -14984,7 +14992,7 @@ var folderPath = /* @__PURE__ */ __name((path) => {
|
|
|
14984
14992
|
}, "folderPath");
|
|
14985
14993
|
var canonicalReference = /* @__PURE__ */ __name((text5) => formatReference(parseReference(text5)), "canonicalReference");
|
|
14986
14994
|
|
|
14987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14988
14996
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14989
14997
|
var REFERABLE = {
|
|
14990
14998
|
note: { tombstone: true },
|
|
@@ -15145,7 +15153,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
15145
15153
|
}, "taskIdOf");
|
|
15146
15154
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15147
15155
|
|
|
15148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15149
15157
|
var toMs = /* @__PURE__ */ __name((iso11) => {
|
|
15150
15158
|
if (iso11 === null || iso11 === void 0)
|
|
15151
15159
|
return null;
|
|
@@ -15159,7 +15167,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15159
15167
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15160
15168
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15161
15169
|
|
|
15162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15163
15171
|
var TAG_KINDS = ["tag", "topic"];
|
|
15164
15172
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15165
15173
|
var TAG_TYPE = {
|
|
@@ -15362,7 +15370,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15362
15370
|
return result;
|
|
15363
15371
|
}, "tagsOf");
|
|
15364
15372
|
|
|
15365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15366
15374
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15367
15375
|
var SPEECH = speech("att");
|
|
15368
15376
|
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");
|
|
@@ -15723,7 +15731,7 @@ var FIELD_COMPILERS = {
|
|
|
15723
15731
|
subject
|
|
15724
15732
|
};
|
|
15725
15733
|
|
|
15726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15727
15735
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15728
15736
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15729
15737
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15739,7 +15747,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15739
15747
|
};
|
|
15740
15748
|
}, "placeOf");
|
|
15741
15749
|
|
|
15742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15743
15751
|
var DRAIN_ON_WRITE = 500;
|
|
15744
15752
|
var METHOD = "rules";
|
|
15745
15753
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15902,7 +15910,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15902
15910
|
return queued.length;
|
|
15903
15911
|
}, "drainMentions");
|
|
15904
15912
|
|
|
15905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15906
15914
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15907
15915
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15908
15916
|
if (!exists2)
|
|
@@ -15910,7 +15918,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15910
15918
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15911
15919
|
}, "indexRow");
|
|
15912
15920
|
|
|
15913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15914
15922
|
var INDEX = "message_stems";
|
|
15915
15923
|
var SETTING2 = "searchStemmers";
|
|
15916
15924
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -16032,7 +16040,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
16032
16040
|
};
|
|
16033
16041
|
}, "stemmerCache");
|
|
16034
16042
|
|
|
16035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
16036
16044
|
var SQLITE_BUSY = 5;
|
|
16037
16045
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
16038
16046
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -16127,7 +16135,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
16127
16135
|
}
|
|
16128
16136
|
}, "read");
|
|
16129
16137
|
|
|
16130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
16131
16139
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
16132
16140
|
coalesce(CASE k.chunkable_type
|
|
16133
16141
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16269,7 +16277,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16269
16277
|
}, "dropUnusedVectors");
|
|
16270
16278
|
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");
|
|
16271
16279
|
|
|
16272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16273
16281
|
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({
|
|
16274
16282
|
target: [accounts.provider, accounts.externalId],
|
|
16275
16283
|
set: {
|
|
@@ -16375,7 +16383,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16375
16383
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16376
16384
|
}, "dropOrphanPeople");
|
|
16377
16385
|
|
|
16378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16379
16387
|
var FOLDED = [
|
|
16380
16388
|
{ table: "tasks", column: "title" },
|
|
16381
16389
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16412,7 +16420,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16412
16420
|
return filled2;
|
|
16413
16421
|
}, "fillFolded");
|
|
16414
16422
|
|
|
16415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16416
16424
|
import { createHash as createHash3 } from "node:crypto";
|
|
16417
16425
|
var CHUNK_CHARS = 1200;
|
|
16418
16426
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16517,7 +16525,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16517
16525
|
return chunks2;
|
|
16518
16526
|
}, "cutChunks");
|
|
16519
16527
|
|
|
16520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16521
16529
|
var DAY = 864e5;
|
|
16522
16530
|
var CURRENCY = [
|
|
16523
16531
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16634,7 +16642,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16634
16642
|
return best?.day ?? null;
|
|
16635
16643
|
}, "dueDayOf");
|
|
16636
16644
|
|
|
16637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16638
16646
|
var DAY2 = 864e5;
|
|
16639
16647
|
var STOP_WORDS = new Set([
|
|
16640
16648
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16789,7 +16797,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16789
16797
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16790
16798
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16791
16799
|
|
|
16792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16793
16801
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16794
16802
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16795
16803
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -17060,7 +17068,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
17060
17068
|
};
|
|
17061
17069
|
}, "readiness");
|
|
17062
17070
|
|
|
17063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
17064
17072
|
var DOCUMENT_PICTURE = "document_picture";
|
|
17065
17073
|
var SCAN_PAGE2 = 5e3;
|
|
17066
17074
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -17123,7 +17131,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
17123
17131
|
}, "nearestPictures")
|
|
17124
17132
|
}), "documentPicturesOver");
|
|
17125
17133
|
|
|
17126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
17127
17135
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
17128
17136
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
17129
17137
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17188,7 +17196,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17188
17196
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17189
17197
|
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");
|
|
17190
17198
|
|
|
17191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17192
17200
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17193
17201
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17194
17202
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17278,7 +17286,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17278
17286
|
});
|
|
17279
17287
|
}, "linkMeeting");
|
|
17280
17288
|
|
|
17281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17282
17290
|
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), ''))";
|
|
17283
17291
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17284
17292
|
"working-location",
|
|
@@ -17508,7 +17516,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17508
17516
|
return true;
|
|
17509
17517
|
}, "resetNoteIndex");
|
|
17510
17518
|
|
|
17511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17512
17520
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17513
17521
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17514
17522
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17527,7 +17535,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17527
17535
|
}
|
|
17528
17536
|
}, "resolvePersonLinks");
|
|
17529
17537
|
|
|
17530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17531
17539
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17532
17540
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17533
17541
|
find: orm.select({
|
|
@@ -17752,7 +17760,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17752
17760
|
}, "meetingIdentityPk");
|
|
17753
17761
|
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");
|
|
17754
17762
|
|
|
17755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17756
17764
|
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");
|
|
17757
17765
|
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");
|
|
17758
17766
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -18032,7 +18040,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
18032
18040
|
}
|
|
18033
18041
|
}, "replaceAutoTags");
|
|
18034
18042
|
|
|
18035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
18036
18044
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
18037
18045
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
18038
18046
|
var counterValue = /* @__PURE__ */ __name((message2, field4) => {
|
|
@@ -18069,7 +18077,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
18069
18077
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
18070
18078
|
}, "counterFreshness");
|
|
18071
18079
|
|
|
18072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
18073
18081
|
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");
|
|
18074
18082
|
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;
|
|
18075
18083
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -18150,7 +18158,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
18150
18158
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
18151
18159
|
}, "mailCore");
|
|
18152
18160
|
|
|
18153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
18154
18162
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
18155
18163
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
18156
18164
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18260,7 +18268,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18260
18268
|
return emails3 + threads;
|
|
18261
18269
|
}, "drainEmailIndex");
|
|
18262
18270
|
|
|
18263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18264
18272
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18265
18273
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18266
18274
|
var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
|
|
@@ -18306,7 +18314,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18306
18314
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18307
18315
|
}, "forgetLocations");
|
|
18308
18316
|
|
|
18309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18310
18318
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18311
18319
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18312
18320
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18356,7 +18364,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18356
18364
|
return threads.length;
|
|
18357
18365
|
}, "markEmailsRestored");
|
|
18358
18366
|
|
|
18359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18360
18368
|
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");
|
|
18361
18369
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18362
18370
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18423,7 +18431,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18423
18431
|
}
|
|
18424
18432
|
}), "mailRulesOver");
|
|
18425
18433
|
|
|
18426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18427
18435
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18428
18436
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18429
18437
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18431,7 +18439,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18431
18439
|
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);
|
|
18432
18440
|
}, "reviewLink");
|
|
18433
18441
|
|
|
18434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18435
18443
|
function checkMeetingCancelled(signal) {
|
|
18436
18444
|
if (!signal?.aborted)
|
|
18437
18445
|
return;
|
|
@@ -18442,7 +18450,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18442
18450
|
}
|
|
18443
18451
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18444
18452
|
|
|
18445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18446
18454
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18447
18455
|
id: Number(row2.id),
|
|
18448
18456
|
accountId: Number(row2.account_id),
|
|
@@ -18492,7 +18500,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18492
18500
|
createdAt: Number(row2.created_at)
|
|
18493
18501
|
}), "transcriptRowOf");
|
|
18494
18502
|
|
|
18495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18496
18504
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18497
18505
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18498
18506
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18659,7 +18667,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18659
18667
|
}
|
|
18660
18668
|
}), "meetingReadsOver");
|
|
18661
18669
|
|
|
18662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18670
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18663
18671
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18664
18672
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18665
18673
|
const params = [input.accountId];
|
|
@@ -18702,7 +18710,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18702
18710
|
return { clauses, params };
|
|
18703
18711
|
}, "meetingSelectionSql");
|
|
18704
18712
|
|
|
18705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18706
18714
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18707
18715
|
async meetingChatLines(input) {
|
|
18708
18716
|
checkMeetingCancelled(input.signal);
|
|
@@ -18730,7 +18738,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18730
18738
|
}
|
|
18731
18739
|
}), "meetingChatLinesOver");
|
|
18732
18740
|
|
|
18733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18734
18742
|
var MESSAGE_FIELDS = {
|
|
18735
18743
|
pk: messages.id,
|
|
18736
18744
|
nativeId: messages.externalId,
|
|
@@ -18897,7 +18905,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18897
18905
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18898
18906
|
}), "chatActivity");
|
|
18899
18907
|
|
|
18900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18901
18909
|
var HIT_FIELDS = {
|
|
18902
18910
|
...MESSAGE_FIELDS,
|
|
18903
18911
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18996,7 +19004,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18996
19004
|
};
|
|
18997
19005
|
}, "directReplies");
|
|
18998
19006
|
|
|
18999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
19000
19008
|
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");
|
|
19001
19009
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
19002
19010
|
const found2 = identityRow(context, ref3);
|
|
@@ -19127,7 +19135,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
19127
19135
|
}, "mentioning");
|
|
19128
19136
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
19129
19137
|
|
|
19130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
19131
19139
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
19132
19140
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
19133
19141
|
}, "missing");
|
|
@@ -19249,7 +19257,7 @@ function meetingContextLinksOver(context) {
|
|
|
19249
19257
|
}
|
|
19250
19258
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19251
19259
|
|
|
19252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19253
19261
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19254
19262
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19255
19263
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19278,7 +19286,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19278
19286
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19279
19287
|
}, "indexedText");
|
|
19280
19288
|
|
|
19281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19282
19290
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19283
19291
|
var meetingCurrentIndexRows = `
|
|
19284
19292
|
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
|
|
@@ -19309,7 +19317,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19309
19317
|
}, "invalidateMeetingStems");
|
|
19310
19318
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19311
19319
|
|
|
19312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19313
19321
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19314
19322
|
return {
|
|
19315
19323
|
async indexSearch(original) {
|
|
@@ -19377,10 +19385,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19377
19385
|
}
|
|
19378
19386
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19379
19387
|
|
|
19380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19381
19389
|
import { createHash as createHash4 } from "node:crypto";
|
|
19382
19390
|
|
|
19383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19384
19392
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19385
19393
|
const padded = ` ${term} `;
|
|
19386
19394
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19389,7 +19397,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19389
19397
|
return [...pieces];
|
|
19390
19398
|
}, "trigrams");
|
|
19391
19399
|
|
|
19392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19393
19401
|
var SHORTEST_CORRECTION = 3;
|
|
19394
19402
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19395
19403
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19436,7 +19444,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19436
19444
|
return corrections;
|
|
19437
19445
|
}, "correctWords");
|
|
19438
19446
|
|
|
19439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19440
19448
|
var SHORTEST_GARBLED = 4;
|
|
19441
19449
|
var MOST_WIDENED = 64;
|
|
19442
19450
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19528,7 +19536,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19528
19536
|
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));
|
|
19529
19537
|
}, "widenWords");
|
|
19530
19538
|
|
|
19531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19532
19540
|
import { readFileSync } from "node:fs";
|
|
19533
19541
|
var loaded;
|
|
19534
19542
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19587,7 +19595,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19587
19595
|
return false;
|
|
19588
19596
|
}, "knownRussianWord");
|
|
19589
19597
|
|
|
19590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19591
19599
|
var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19592
19600
|
var MOST_WORDS = 128;
|
|
19593
19601
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19814,7 +19822,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19814
19822
|
return check3(tree);
|
|
19815
19823
|
}, "matchMeetingText");
|
|
19816
19824
|
|
|
19817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19818
19826
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19819
19827
|
throw new CliError("validation_error", message2);
|
|
19820
19828
|
}, "fail");
|
|
@@ -19991,7 +19999,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19991
19999
|
}
|
|
19992
20000
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19993
20001
|
|
|
19994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19995
20003
|
import { createHash as createHash5 } from "node:crypto";
|
|
19996
20004
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19997
20005
|
if (value === void 0)
|
|
@@ -20081,7 +20089,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
20081
20089
|
}
|
|
20082
20090
|
}), "meetingParticipantSearchOver");
|
|
20083
20091
|
|
|
20084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
20085
20093
|
var preparationQueries = {
|
|
20086
20094
|
participants: {
|
|
20087
20095
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -20131,7 +20139,7 @@ var preparationQueries = {
|
|
|
20131
20139
|
}
|
|
20132
20140
|
};
|
|
20133
20141
|
|
|
20134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
20135
20143
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20136
20144
|
async preparationContext(original) {
|
|
20137
20145
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -20172,7 +20180,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20172
20180
|
}
|
|
20173
20181
|
}), "meetingPreparationContextOver");
|
|
20174
20182
|
|
|
20175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
20176
20184
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
20177
20185
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
20178
20186
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20186,7 +20194,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20186
20194
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20187
20195
|
)`, "preparationSubjects");
|
|
20188
20196
|
|
|
20189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20190
20198
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20191
20199
|
async preparationKnowledge(original) {
|
|
20192
20200
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20231,7 +20239,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20231
20239
|
}
|
|
20232
20240
|
}), "meetingPreparationKnowledgeOver");
|
|
20233
20241
|
|
|
20234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20235
20243
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20236
20244
|
async preparationNotes(original) {
|
|
20237
20245
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20284,7 +20292,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20284
20292
|
}
|
|
20285
20293
|
}), "meetingPreparationNotesOver");
|
|
20286
20294
|
|
|
20287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20288
20296
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20289
20297
|
async relatedHistory(original) {
|
|
20290
20298
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20355,7 +20363,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20355
20363
|
}
|
|
20356
20364
|
}), "meetingRelatedHistoryOver");
|
|
20357
20365
|
|
|
20358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20359
20367
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20360
20368
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20361
20369
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20436,7 +20444,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20436
20444
|
}
|
|
20437
20445
|
}), "meetingReviewOver");
|
|
20438
20446
|
|
|
20439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20440
20448
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20441
20449
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20442
20450
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20490,7 +20498,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20490
20498
|
}
|
|
20491
20499
|
}), "meetingSeriesHistoryOver");
|
|
20492
20500
|
|
|
20493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20494
20502
|
var MOST_ROWS = 5e5;
|
|
20495
20503
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20496
20504
|
async meetingStats(input) {
|
|
@@ -20537,7 +20545,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20537
20545
|
}
|
|
20538
20546
|
}), "meetingStatsOver");
|
|
20539
20547
|
|
|
20540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20541
20549
|
var CURSOR_KEY = "meetings";
|
|
20542
20550
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20543
20551
|
id: Number(row2.id),
|
|
@@ -20966,17 +20974,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20966
20974
|
const picked = filtered(filter);
|
|
20967
20975
|
const rows = database.prepare(`WITH hit AS (SELECT rowid AS r FROM meeting_words WHERE meeting_words MATCH ?),
|
|
20968
20976
|
picked AS (SELECT id, row_number() OVER (ORDER BY coalesce(started_at, 0) DESC, id) AS n FROM (${picked.sql}))
|
|
20969
|
-
SELECT p.n, 0 AS kind, t.id AS a, r.position AS b, r.id, t.meeting_id, r.start_ms, coalesce(length(CAST(r.text AS BLOB)),0) AS bytes
|
|
20977
|
+
SELECT p.n, 0 AS kind, t.id AS a, r.position AS b, r.id, t.meeting_id, r.start_ms, coalesce(length(CAST(r.text AS BLOB)),0) AS bytes,
|
|
20978
|
+
r.speaker_name AS speaker, m.account_id
|
|
20970
20979
|
FROM hit h JOIN meeting_transcript_rows r ON h.r % 4 = 1 AND r.id = h.r / 4
|
|
20971
20980
|
JOIN meeting_transcripts t ON t.id = r.meeting_transcript_id
|
|
20972
20981
|
AND t.superseded_at IS NULL AND t.deleted_at IS NULL
|
|
20973
|
-
JOIN picked p ON p.id = t.meeting_id
|
|
20982
|
+
JOIN picked p ON p.id = t.meeting_id JOIN meetings m ON m.id = t.meeting_id
|
|
20974
20983
|
UNION ALL
|
|
20975
|
-
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0)
|
|
20984
|
+
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0), NULL, NULL
|
|
20976
20985
|
FROM hit h JOIN meeting_chat_messages c ON h.r % 4 = 2 AND c.id = h.r / 4
|
|
20977
20986
|
JOIN picked p ON p.id = c.meeting_id
|
|
20978
20987
|
UNION ALL
|
|
20979
|
-
SELECT p.n, 2, s.id, 0, s.id, s.meeting_id, NULL, coalesce(length(CAST(s.title AS BLOB)),0)+coalesce(length(CAST(s.overview AS BLOB)),0)+coalesce(length(CAST(s.sections AS BLOB)),0)+coalesce(length(CAST(s.next_steps AS BLOB)),0)+coalesce(length(CAST(s.content AS BLOB)),0)
|
|
20988
|
+
SELECT p.n, 2, s.id, 0, s.id, s.meeting_id, NULL, coalesce(length(CAST(s.title AS BLOB)),0)+coalesce(length(CAST(s.overview AS BLOB)),0)+coalesce(length(CAST(s.sections AS BLOB)),0)+coalesce(length(CAST(s.next_steps AS BLOB)),0)+coalesce(length(CAST(s.content AS BLOB)),0), NULL, NULL
|
|
20980
20989
|
FROM hit h JOIN meeting_summaries s ON h.r % 4 = 3 AND s.id = h.r / 4
|
|
20981
20990
|
JOIN picked p ON p.id = s.meeting_id
|
|
20982
20991
|
ORDER BY 1, 2, 3, 4 LIMIT 10001`).all(`normalized_text : (${match})`, ...picked.params);
|
|
@@ -20990,7 +20999,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20990
20999
|
const scopes = ["transcript", "chat", "summary"];
|
|
20991
21000
|
return rows.map((row2) => {
|
|
20992
21001
|
const scope3 = scopes[Number(row2.kind)];
|
|
21002
|
+
const cue = scope3 === "transcript" ? {
|
|
21003
|
+
ref: formatMeetingReference({
|
|
21004
|
+
type: "meeting",
|
|
21005
|
+
accountId: Number(row2.account_id),
|
|
21006
|
+
meetingId: Number(row2.meeting_id),
|
|
21007
|
+
transcriptId: Number(row2.a),
|
|
21008
|
+
cuePosition: Number(row2.b)
|
|
21009
|
+
}),
|
|
21010
|
+
speakerName: row2.speaker === null ? null : String(row2.speaker)
|
|
21011
|
+
} : {};
|
|
20993
21012
|
return {
|
|
21013
|
+
...cue,
|
|
20994
21014
|
meetingId: Number(row2.meeting_id),
|
|
20995
21015
|
scope: scope3,
|
|
20996
21016
|
id: Number(row2.id),
|
|
@@ -21089,7 +21109,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
21089
21109
|
};
|
|
21090
21110
|
}, "meetingStoreOver");
|
|
21091
21111
|
|
|
21092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
21093
21113
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
21094
21114
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
21095
21115
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -21115,7 +21135,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
21115
21135
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
21116
21136
|
}, "release");
|
|
21117
21137
|
|
|
21118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
21119
21139
|
var THREAD_COLUMNS = {
|
|
21120
21140
|
subject: {
|
|
21121
21141
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -21132,7 +21152,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
21132
21152
|
AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
|
|
21133
21153
|
}, "threadRows");
|
|
21134
21154
|
|
|
21135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
21136
21156
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
21137
21157
|
id: `email:${place.emailId}`,
|
|
21138
21158
|
chatId: place.threadExternalId,
|
|
@@ -21381,6 +21401,8 @@ var emailWhere = /* @__PURE__ */ __name((filter) => {
|
|
|
21381
21401
|
if (filter.attachmentErrors !== void 0)
|
|
21382
21402
|
add(`e.id IN (SELECT attachable_id FROM attachments WHERE attachable_type = 'email'
|
|
21383
21403
|
AND extraction_error IN (${filter.attachmentErrors.map(() => "?").join(",") || "NULL"}))`, ...filter.attachmentErrors);
|
|
21404
|
+
if (filter.externalIds !== void 0)
|
|
21405
|
+
add("e.external_id IN (SELECT value FROM json_each(?))", JSON.stringify(filter.externalIds));
|
|
21384
21406
|
return [where.join(" AND "), params];
|
|
21385
21407
|
}, "emailWhere");
|
|
21386
21408
|
var messageOfEmail = /* @__PURE__ */ __name((email, thread) => {
|
|
@@ -21687,7 +21709,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
21687
21709
|
}
|
|
21688
21710
|
}), "mailStoreOver");
|
|
21689
21711
|
|
|
21690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21691
21713
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21692
21714
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21693
21715
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21777,7 +21799,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21777
21799
|
}, "knownWord");
|
|
21778
21800
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21779
21801
|
|
|
21780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21781
21803
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21782
21804
|
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");
|
|
21783
21805
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21863,7 +21885,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21863
21885
|
return found2;
|
|
21864
21886
|
}, "spokenTranscripts");
|
|
21865
21887
|
|
|
21866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21867
21889
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21868
21890
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21869
21891
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21910,7 +21932,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21910
21932
|
});
|
|
21911
21933
|
}, "placeHits");
|
|
21912
21934
|
|
|
21913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21914
21936
|
var MESSAGES2 = {
|
|
21915
21937
|
rows: "messages",
|
|
21916
21938
|
threads: "chats",
|
|
@@ -22384,7 +22406,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22384
22406
|
};
|
|
22385
22407
|
}, "runQuery");
|
|
22386
22408
|
|
|
22387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22388
22410
|
function invalidMetadata() {
|
|
22389
22411
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22390
22412
|
}
|
|
@@ -22486,7 +22508,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22486
22508
|
};
|
|
22487
22509
|
}), "counterTargets");
|
|
22488
22510
|
|
|
22489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22490
22512
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22491
22513
|
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,
|
|
22492
22514
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22605,7 +22627,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22605
22627
|
}));
|
|
22606
22628
|
}, "attachmentViews");
|
|
22607
22629
|
|
|
22608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22609
22631
|
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");
|
|
22610
22632
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22611
22633
|
const { orm, database, now: now2 } = context;
|
|
@@ -22643,7 +22665,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22643
22665
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22644
22666
|
}, "intoVoiceAttachment");
|
|
22645
22667
|
|
|
22646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22647
22669
|
var FIELDS = [
|
|
22648
22670
|
"threadExternalId",
|
|
22649
22671
|
"senderIdentityId",
|
|
@@ -22960,7 +22982,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22960
22982
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22961
22983
|
}, "writeDerivedReactions");
|
|
22962
22984
|
|
|
22963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22964
22986
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22965
22987
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22966
22988
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22981,7 +23003,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22981
23003
|
};
|
|
22982
23004
|
}, "keysOver");
|
|
22983
23005
|
|
|
22984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22985
23007
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22986
23008
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22987
23009
|
if (!row2)
|
|
@@ -23016,7 +23038,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
23016
23038
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
23017
23039
|
}, "saveProfile");
|
|
23018
23040
|
|
|
23019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
23020
23042
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
23021
23043
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
23022
23044
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -23052,7 +23074,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
23052
23074
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
23053
23075
|
}, "originOfActor");
|
|
23054
23076
|
|
|
23055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
23056
23078
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
23057
23079
|
const owner = ownerPerson(context.database).id;
|
|
23058
23080
|
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);
|
|
@@ -23073,7 +23095,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
23073
23095
|
return personOf(context, ref3);
|
|
23074
23096
|
}, "linkToOwner");
|
|
23075
23097
|
|
|
23076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
23077
23099
|
var PROVIDERS_SETTING = "providers";
|
|
23078
23100
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
23079
23101
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -23108,7 +23130,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
23108
23130
|
});
|
|
23109
23131
|
}, "registerProvider");
|
|
23110
23132
|
|
|
23111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
23112
23134
|
var DAY3 = 864e5;
|
|
23113
23135
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
23114
23136
|
var TEXT_LIMIT = 20;
|
|
@@ -23307,7 +23329,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23307
23329
|
};
|
|
23308
23330
|
}, "taskSimilarityOver");
|
|
23309
23331
|
|
|
23310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23311
23333
|
var SETTING3 = "taskCategories";
|
|
23312
23334
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23313
23335
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23326,7 +23348,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23326
23348
|
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);
|
|
23327
23349
|
}, "saveTaskCategories");
|
|
23328
23350
|
|
|
23329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23330
23352
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23331
23353
|
var ALLOWED = "taskAgentClose";
|
|
23332
23354
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23382,7 +23404,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23382
23404
|
];
|
|
23383
23405
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23384
23406
|
|
|
23385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
23386
23408
|
var EXCERPT_CHARS = 280;
|
|
23387
23409
|
var excerptOf = /* @__PURE__ */ __name((text5) => {
|
|
23388
23410
|
if (text5 == null)
|
|
@@ -23447,7 +23469,7 @@ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...n
|
|
|
23447
23469
|
};
|
|
23448
23470
|
}), "sourcesOfReferences");
|
|
23449
23471
|
|
|
23450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
23451
23473
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
23452
23474
|
var MAX_TEXT_CHARS = 2e6;
|
|
23453
23475
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -23473,7 +23495,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
23473
23495
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
23474
23496
|
}, "pdfPreviewLimits");
|
|
23475
23497
|
|
|
23476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23477
23499
|
import { randomBytes } from "node:crypto";
|
|
23478
23500
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23479
23501
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23486,7 +23508,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23486
23508
|
return time3 + random;
|
|
23487
23509
|
}, "ulid");
|
|
23488
23510
|
|
|
23489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23490
23512
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23491
23513
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23492
23514
|
if (!meta && !sections?.length)
|
|
@@ -23507,7 +23529,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23507
23529
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23508
23530
|
}, "languageOf");
|
|
23509
23531
|
|
|
23510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23511
23533
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23512
23534
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23513
23535
|
if (isObject(value))
|
|
@@ -23750,7 +23772,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23750
23772
|
};
|
|
23751
23773
|
}, "filesStoreOver");
|
|
23752
23774
|
|
|
23753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23754
23776
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23755
23777
|
entity: "document",
|
|
23756
23778
|
backend: "sql",
|
|
@@ -23796,7 +23818,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23796
23818
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23797
23819
|
}, "importedDocumentWhere");
|
|
23798
23820
|
|
|
23799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23800
23822
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23801
23823
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23802
23824
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -24306,7 +24328,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24306
24328
|
};
|
|
24307
24329
|
}, "notesStoreOver");
|
|
24308
24330
|
|
|
24309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24310
24332
|
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";
|
|
24311
24333
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24312
24334
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24502,7 +24524,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24502
24524
|
};
|
|
24503
24525
|
}, "memoriesStoreOver");
|
|
24504
24526
|
|
|
24505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24506
24528
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24507
24529
|
var KEY = "taskFirstPassPerChat";
|
|
24508
24530
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24522,7 +24544,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24522
24544
|
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);
|
|
24523
24545
|
}, "saveFirstPassPerChat");
|
|
24524
24546
|
|
|
24525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
24526
24548
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
24527
24549
|
name,
|
|
24528
24550
|
type,
|
|
@@ -24544,6 +24566,7 @@ var PROJECT_TASK_FIELDS = [
|
|
|
24544
24566
|
relation: "low, medium, high, critical or none; a range of labels or of the 0\u20131 number: priority:[high TO critical]"
|
|
24545
24567
|
}),
|
|
24546
24568
|
field("agent", "kw", "agent:hermes", { relation: "the agent working on it, by name; none or any" }),
|
|
24569
|
+
field("parent", "kw", "parent:HRB-1", { relation: "the subtasks of a task, by its key; none or any" }),
|
|
24547
24570
|
field("due", "time", "due:[today TO 2026-12-31]", {
|
|
24548
24571
|
relation: "the due date; today, tomorrow and yesterday are your calendar days; NOT due:* has none"
|
|
24549
24572
|
}),
|
|
@@ -24641,6 +24664,18 @@ var agentWhere = /* @__PURE__ */ __name((node) => {
|
|
|
24641
24664
|
return { sql: "t.agent IS NOT NULL", params: [] };
|
|
24642
24665
|
return node.operator === "wildcard" ? { sql: "lower(t.agent) GLOB ?", params: [value] } : { sql: "lower(t.agent) = ?", params: [value] };
|
|
24643
24666
|
}, "agentWhere");
|
|
24667
|
+
var parentWhere = /* @__PURE__ */ __name((node) => {
|
|
24668
|
+
const value = node.value.trim();
|
|
24669
|
+
if (value.toLowerCase() === "none")
|
|
24670
|
+
return { sql: "t.parent_id IS NULL", params: [] };
|
|
24671
|
+
if (value.toLowerCase() === "any")
|
|
24672
|
+
return { sql: "t.parent_id IS NOT NULL", params: [] };
|
|
24673
|
+
const key2 = value.replace(/^task:/, "");
|
|
24674
|
+
return {
|
|
24675
|
+
sql: "t.parent_id IN (SELECT id FROM tasks WHERE key = ? OR package_id = ? UNION SELECT task_id FROM task_events WHERE kind = 'project' AND json_extract(changes, '$.key[0]') = ?)",
|
|
24676
|
+
params: [key2.toUpperCase(), key2, key2.toUpperCase()]
|
|
24677
|
+
};
|
|
24678
|
+
}, "parentWhere");
|
|
24644
24679
|
var truth = /* @__PURE__ */ __name((node, sql2) => ({
|
|
24645
24680
|
sql: node.value.toLowerCase() === "true" ? sql2 : `NOT (${sql2})`,
|
|
24646
24681
|
params: []
|
|
@@ -24671,6 +24706,7 @@ var projectTaskColumns = /* @__PURE__ */ __name((now2, zone) => ({
|
|
|
24671
24706
|
assignee: { where: assigneeWhere },
|
|
24672
24707
|
priority: { where: priorityWhere },
|
|
24673
24708
|
agent: { where: agentWhere },
|
|
24709
|
+
parent: { where: parentWhere },
|
|
24674
24710
|
due: { type: "time", sql: "t.due_at" },
|
|
24675
24711
|
closed: { type: "time", sql: "t.closed_at" },
|
|
24676
24712
|
overdue: { where: /* @__PURE__ */ __name((node) => truth(node, dueGroups(now2, zone).overdue), "where") },
|
|
@@ -24728,7 +24764,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
24728
24764
|
return root === void 0 ? void 0 : { ...query, root };
|
|
24729
24765
|
}, "withoutField");
|
|
24730
24766
|
|
|
24731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
24732
24768
|
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
24733
24769
|
if (row2.author_type == null)
|
|
24734
24770
|
return null;
|
|
@@ -24756,7 +24792,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
|
24756
24792
|
return commentsOf(database, task).find((one) => one.ref === `note:${made}`);
|
|
24757
24793
|
}, "addComment");
|
|
24758
24794
|
|
|
24759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24760
24796
|
var TASK_RELATION_KINDS = [
|
|
24761
24797
|
"blocked-by",
|
|
24762
24798
|
"follow-up-of",
|
|
@@ -24886,7 +24922,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24886
24922
|
};
|
|
24887
24923
|
}, "taskRelationsStoreOver");
|
|
24888
24924
|
|
|
24889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24890
24926
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24891
24927
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
24892
24928
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind3, changes, at) => {
|
|
@@ -25002,7 +25038,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25002
25038
|
const rowById = /* @__PURE__ */ __name((id2) => database.prepare("SELECT * FROM tasks WHERE id = ?").get(id2), "rowById");
|
|
25003
25039
|
const details2 = /* @__PURE__ */ __name((id2) => detailsOf(rowById(id2)), "details");
|
|
25004
25040
|
const onBoard = /* @__PURE__ */ __name((task) => Boolean(database.prepare(`SELECT 1 FROM tasks t WHERE t.id = ? AND ${BOARD_SCOPE}`).get(task)), "onBoard");
|
|
25005
|
-
const moveToProject = /* @__PURE__ */ __name((task, before2, target, actor, at) => {
|
|
25041
|
+
const moveToProject = /* @__PURE__ */ __name((task, before2, target, actor, at, detach) => {
|
|
25006
25042
|
if (target === Number(before2.project_id))
|
|
25007
25043
|
return;
|
|
25008
25044
|
if (!onBoard(task))
|
|
@@ -25010,6 +25046,10 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25010
25046
|
const targetRow = database.prepare("SELECT key FROM projects WHERE id = ?").get(target);
|
|
25011
25047
|
if (String(targetRow.key).length === INBOX_KEY_LENGTH)
|
|
25012
25048
|
throw new CliError("validation_error", "a task moves only into one of your projects");
|
|
25049
|
+
if (before2.parent_id != null && !detach) {
|
|
25050
|
+
const parent2 = taskIdOf(database, Number(before2.parent_id));
|
|
25051
|
+
throw new CliError("validation_error", `${String(before2.key)} is a subtask of ${parent2}; detach it in the same write (parent none) to move it alone`, { reason: "task.is-subtask", parent: parent2 });
|
|
25052
|
+
}
|
|
25013
25053
|
const children = database.prepare("SELECT key FROM tasks WHERE parent_id = ? AND deleted_at IS NULL ORDER BY id").all(task).map((row2) => String(row2.key));
|
|
25014
25054
|
if (children.length)
|
|
25015
25055
|
throw new CliError("validation_error", `${String(before2.key)} has subtasks (${children.join(", ")}); move or detach them first`, { reason: "task.has-subtasks", subtasks: children });
|
|
@@ -25100,7 +25140,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25100
25140
|
bump = true;
|
|
25101
25141
|
}
|
|
25102
25142
|
if (fields4.project !== void 0)
|
|
25103
|
-
moveToProject(task, before2, projectOf2(fields4.project), actor, at);
|
|
25143
|
+
moveToProject(task, before2, projectOf2(fields4.project), actor, at, fields4.parent === null);
|
|
25104
25144
|
if (set.length === 0) {
|
|
25105
25145
|
if (bump)
|
|
25106
25146
|
database.prepare("UPDATE tasks SET revision = revision + 1 WHERE id = ?").run(task);
|
|
@@ -25386,7 +25426,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
25386
25426
|
};
|
|
25387
25427
|
}, "workTasksOver");
|
|
25388
25428
|
|
|
25389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
25390
25430
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
25391
25431
|
const { database, now: now2 } = context;
|
|
25392
25432
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -25435,7 +25475,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
25435
25475
|
};
|
|
25436
25476
|
}, "taskCloseOver");
|
|
25437
25477
|
|
|
25438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
25439
25479
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
25440
25480
|
const { database, now: now2 } = context;
|
|
25441
25481
|
const required3 = /* @__PURE__ */ __name((id2) => {
|
|
@@ -25653,7 +25693,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
25653
25693
|
};
|
|
25654
25694
|
}, "taskPairsOver");
|
|
25655
25695
|
|
|
25656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
25657
25697
|
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";
|
|
25658
25698
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25659
25699
|
const { database, now: now2 } = context;
|
|
@@ -25858,7 +25898,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25858
25898
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25859
25899
|
}, "oneOf");
|
|
25860
25900
|
|
|
25861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25862
25902
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25863
25903
|
const { database } = context;
|
|
25864
25904
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25903,7 +25943,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25903
25943
|
};
|
|
25904
25944
|
}, "accountsStoreOver");
|
|
25905
25945
|
|
|
25906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25907
25947
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25908
25948
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25909
25949
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25927,7 +25967,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25927
25967
|
})), "keepDownloads");
|
|
25928
25968
|
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");
|
|
25929
25969
|
|
|
25930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25931
25971
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25932
25972
|
const { database } = context;
|
|
25933
25973
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25984,7 +26024,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25984
26024
|
}, "keepAttachmentText")
|
|
25985
26025
|
}), "attachmentsStoreOver");
|
|
25986
26026
|
|
|
25987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25988
26028
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25989
26029
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25990
26030
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -26164,7 +26204,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
26164
26204
|
return done;
|
|
26165
26205
|
}, "rekeyChats");
|
|
26166
26206
|
|
|
26167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
26168
26208
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
26169
26209
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
26170
26210
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -26196,7 +26236,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
26196
26236
|
});
|
|
26197
26237
|
}, "chatCompleteness");
|
|
26198
26238
|
|
|
26199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
26200
26240
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26201
26241
|
const { database } = context;
|
|
26202
26242
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -26303,7 +26343,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26303
26343
|
};
|
|
26304
26344
|
}, "chatsStoreOver");
|
|
26305
26345
|
|
|
26306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
26307
26347
|
import { createHash as createHash6 } from "node:crypto";
|
|
26308
26348
|
var BATCH_CONTEXT = 50;
|
|
26309
26349
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -26441,7 +26481,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
26441
26481
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
26442
26482
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
26443
26483
|
|
|
26444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
26445
26485
|
import { setTimeout } from "node:timers/promises";
|
|
26446
26486
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
26447
26487
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -26753,7 +26793,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
26753
26793
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
26754
26794
|
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");
|
|
26755
26795
|
|
|
26756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
26757
26797
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26758
26798
|
const { database } = context;
|
|
26759
26799
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26860,7 +26900,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26860
26900
|
};
|
|
26861
26901
|
}, "conversationsStoreOver");
|
|
26862
26902
|
|
|
26863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26864
26904
|
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";
|
|
26865
26905
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26866
26906
|
const { database } = context;
|
|
@@ -26885,7 +26925,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26885
26925
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26886
26926
|
}), "countersStoreOver");
|
|
26887
26927
|
|
|
26888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26889
26929
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26890
26930
|
var MENTION_QUERY = defineQuery({
|
|
26891
26931
|
entity: "mention",
|
|
@@ -27101,7 +27141,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
27101
27141
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
27102
27142
|
}, "listPlaces");
|
|
27103
27143
|
|
|
27104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
27105
27145
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
27106
27146
|
const { database } = context;
|
|
27107
27147
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -27136,7 +27176,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27136
27176
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
27137
27177
|
}), "mentionsStoreOver");
|
|
27138
27178
|
|
|
27139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
27140
27180
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
27141
27181
|
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");
|
|
27142
27182
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -27151,7 +27191,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
27151
27191
|
}));
|
|
27152
27192
|
}, "documentLinkMessages");
|
|
27153
27193
|
|
|
27154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
27155
27195
|
var stemmerFor = stemmerCache();
|
|
27156
27196
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
27157
27197
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -27195,7 +27235,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
27195
27235
|
});
|
|
27196
27236
|
}, "laterSharingRare");
|
|
27197
27237
|
|
|
27198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
27199
27239
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
27200
27240
|
const { database } = context;
|
|
27201
27241
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -27330,7 +27370,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27330
27370
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
27331
27371
|
}), "messagesStoreOver");
|
|
27332
27372
|
|
|
27333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
27334
27374
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
27335
27375
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
27336
27376
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -27387,7 +27427,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
27387
27427
|
});
|
|
27388
27428
|
}, "personPreparation");
|
|
27389
27429
|
|
|
27390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
27391
27431
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
27392
27432
|
const id2 = Number(uid);
|
|
27393
27433
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -27395,7 +27435,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
27395
27435
|
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)));
|
|
27396
27436
|
}, "personSeenInAccounts");
|
|
27397
27437
|
|
|
27398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
27399
27439
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
27400
27440
|
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);
|
|
27401
27441
|
if (!row2)
|
|
@@ -27461,7 +27501,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
27461
27501
|
return { id: id2, personId, removed: true };
|
|
27462
27502
|
}, "removeNote");
|
|
27463
27503
|
|
|
27464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
27465
27505
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
27466
27506
|
const { database } = context;
|
|
27467
27507
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -27546,13 +27586,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27546
27586
|
};
|
|
27547
27587
|
}, "peopleStoreOver");
|
|
27548
27588
|
|
|
27549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27550
27590
|
import { createHash as createHash8 } from "node:crypto";
|
|
27551
27591
|
|
|
27552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27553
27593
|
import { createHash as createHash7 } from "node:crypto";
|
|
27554
27594
|
|
|
27555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
27556
27596
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
27557
27597
|
var AUTHOR_MEASURES = [
|
|
27558
27598
|
"messages",
|
|
@@ -27692,7 +27732,7 @@ var withoutUrls = /* @__PURE__ */ __name((text5) => text5.replace(/\S+/gu, (toke
|
|
|
27692
27732
|
var rankingWords = /* @__PURE__ */ __name((text5) => withoutUrls(text5).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
27693
27733
|
var rankingQuestion = /* @__PURE__ */ __name((text5) => withoutUrls(text5).includes("?"), "rankingQuestion");
|
|
27694
27734
|
|
|
27695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
27696
27736
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
27697
27737
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
27698
27738
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -27914,7 +27954,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
27914
27954
|
};
|
|
27915
27955
|
}, "rankReplyGraph");
|
|
27916
27956
|
|
|
27917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27918
27958
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
27919
27959
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
27920
27960
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -28088,7 +28128,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
28088
28128
|
return { items, evidence, summary, graph: graph.quality };
|
|
28089
28129
|
}, "calculateAdminStatistics");
|
|
28090
28130
|
|
|
28091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
28092
28132
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
28093
28133
|
const dates = [];
|
|
28094
28134
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -28110,7 +28150,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
28110
28150
|
return dates[0].node.resolution.date;
|
|
28111
28151
|
}, "rankingContextRange");
|
|
28112
28152
|
|
|
28113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
28114
28154
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
28115
28155
|
let counts;
|
|
28116
28156
|
try {
|
|
@@ -28405,7 +28445,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
28405
28445
|
});
|
|
28406
28446
|
}, "rankQuery");
|
|
28407
28447
|
|
|
28408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
28409
28449
|
function fail4(message2, reason = "query.too-large") {
|
|
28410
28450
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
28411
28451
|
}
|
|
@@ -28582,7 +28622,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
28582
28622
|
return result;
|
|
28583
28623
|
}), "adminStatisticsQuery");
|
|
28584
28624
|
|
|
28585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
28586
28626
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
28587
28627
|
if (!execution.accounts.length)
|
|
28588
28628
|
return { conversations: [], chats: [] };
|
|
@@ -28600,7 +28640,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
28600
28640
|
return { conversations: conversations2, chats: chats2 };
|
|
28601
28641
|
}, "conversationEligibility");
|
|
28602
28642
|
|
|
28603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
28604
28644
|
import { createHash as createHash9 } from "node:crypto";
|
|
28605
28645
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
28606
28646
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -28750,7 +28790,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
28750
28790
|
return result;
|
|
28751
28791
|
}, "rankingEvidence");
|
|
28752
28792
|
|
|
28753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
28754
28794
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
28755
28795
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
28756
28796
|
if (execution.corpus === "mail")
|
|
@@ -28769,7 +28809,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28769
28809
|
};
|
|
28770
28810
|
}, "queriesStoreOver");
|
|
28771
28811
|
|
|
28772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
28773
28813
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
28774
28814
|
const { database, now: now2 } = context;
|
|
28775
28815
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -28808,10 +28848,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
28808
28848
|
}));
|
|
28809
28849
|
}, "chatEventsOf");
|
|
28810
28850
|
|
|
28811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28812
28852
|
import { createHash as createHash10 } from "node:crypto";
|
|
28813
28853
|
|
|
28814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
28815
28855
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
28816
28856
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
28817
28857
|
timeZone: zone,
|
|
@@ -28826,7 +28866,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
28826
28866
|
};
|
|
28827
28867
|
}, "calendarKey");
|
|
28828
28868
|
|
|
28829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
28830
28870
|
var RETENTION_TOLERANCE = 864e5;
|
|
28831
28871
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
28832
28872
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -28880,7 +28920,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
28880
28920
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
28881
28921
|
}, "retentionCohorts");
|
|
28882
28922
|
|
|
28883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28884
28924
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
28885
28925
|
var week = /* @__PURE__ */ __name((day) => {
|
|
28886
28926
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -29016,7 +29056,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
29016
29056
|
};
|
|
29017
29057
|
}, "retentionQuery");
|
|
29018
29058
|
|
|
29019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
29020
29060
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
29021
29061
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
29022
29062
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -29147,7 +29187,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
29147
29187
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
29148
29188
|
})), "trackedChats");
|
|
29149
29189
|
|
|
29150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
29151
29191
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29152
29192
|
const { database } = context;
|
|
29153
29193
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -29203,7 +29243,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29203
29243
|
};
|
|
29204
29244
|
}, "rosterStoreOver");
|
|
29205
29245
|
|
|
29206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
29207
29247
|
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");
|
|
29208
29248
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
29209
29249
|
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 ?`);
|
|
@@ -29227,7 +29267,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
29227
29267
|
}
|
|
29228
29268
|
}, "backfillNormalized");
|
|
29229
29269
|
|
|
29230
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
29231
29271
|
var INDEX2 = "message_words";
|
|
29232
29272
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
29233
29273
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -29354,7 +29394,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
29354
29394
|
});
|
|
29355
29395
|
}, "resetSearchIndex");
|
|
29356
29396
|
|
|
29357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
29358
29398
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
29359
29399
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
29360
29400
|
const before2 = stemsState(database);
|
|
@@ -29449,7 +29489,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
29449
29489
|
return resetStems(database, { now: now2 });
|
|
29450
29490
|
}, "followDefaultStemmers");
|
|
29451
29491
|
|
|
29452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
29453
29493
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
29454
29494
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
29455
29495
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -29471,7 +29511,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
29471
29511
|
});
|
|
29472
29512
|
}, "termCandidates");
|
|
29473
29513
|
|
|
29474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
29475
29515
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29476
29516
|
const { database } = context;
|
|
29477
29517
|
const stemmerFor2 = stemmerCache();
|
|
@@ -29493,7 +29533,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29493
29533
|
};
|
|
29494
29534
|
}, "searchIndexStoreOver");
|
|
29495
29535
|
|
|
29496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
29497
29537
|
var HISTORY_KEPT = 1e3;
|
|
29498
29538
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
29499
29539
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -29562,7 +29602,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
29562
29602
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
29563
29603
|
}, "clearHistory");
|
|
29564
29604
|
|
|
29565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
29566
29606
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29567
29607
|
const { database } = context;
|
|
29568
29608
|
return {
|
|
@@ -29586,7 +29626,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29586
29626
|
};
|
|
29587
29627
|
}, "searchesStoreOver");
|
|
29588
29628
|
|
|
29589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
29590
29630
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
29591
29631
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
29592
29632
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -29629,7 +29669,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
29629
29669
|
};
|
|
29630
29670
|
}, "agentActionsStoreOver");
|
|
29631
29671
|
|
|
29632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
29633
29673
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
29634
29674
|
}) => {
|
|
29635
29675
|
const { database, now: now2 } = context;
|
|
@@ -29688,7 +29728,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
29688
29728
|
};
|
|
29689
29729
|
}, "botUpdateStoreOver");
|
|
29690
29730
|
|
|
29691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
29692
29732
|
var DAY4 = 864e5;
|
|
29693
29733
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
29694
29734
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -29728,6 +29768,10 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29728
29768
|
clauses.push("e.starts_at >= ?");
|
|
29729
29769
|
params.push(filter.startsFrom - DAY4);
|
|
29730
29770
|
}
|
|
29771
|
+
if (filter.id !== void 0) {
|
|
29772
|
+
clauses.push("e.id = ?");
|
|
29773
|
+
params.push(filter.id);
|
|
29774
|
+
}
|
|
29731
29775
|
if (filter.calendarId !== void 0) {
|
|
29732
29776
|
clauses.push(entries("ce.calendar_id = ?"));
|
|
29733
29777
|
params.push(filter.calendarId);
|
|
@@ -29742,6 +29786,16 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29742
29786
|
}, "inAccounts");
|
|
29743
29787
|
if (accounts2 !== void 0)
|
|
29744
29788
|
clauses.push(entries(inAccounts("c.account_id")));
|
|
29789
|
+
const ofKind = /* @__PURE__ */ __name((kinds2) => {
|
|
29790
|
+
for (const kind3 of kinds2)
|
|
29791
|
+
params.push(kind3);
|
|
29792
|
+
const scope3 = accounts2 === void 0 ? "" : ` AND ${inAccounts("c.account_id")}`;
|
|
29793
|
+
return entries(`coalesce(ce.event_type, 'default') IN (${kinds2.map(() => "?").join(", ")})${scope3}`);
|
|
29794
|
+
}, "ofKind");
|
|
29795
|
+
if (filter.eventType !== void 0)
|
|
29796
|
+
clauses.push(ofKind([filter.eventType]));
|
|
29797
|
+
if (filter.notEventTypes?.length)
|
|
29798
|
+
clauses.push(`NOT ${ofKind(filter.notEventTypes)}`);
|
|
29745
29799
|
if (filter.personId !== void 0) {
|
|
29746
29800
|
clauses.push(entries("EXISTS (SELECT 1 FROM calendar_entry_participants p JOIN identity_links il ON il.identity_id = p.identity_id WHERE p.entry_id = ce.id AND il.person_id = ?)"));
|
|
29747
29801
|
params.push(filter.personId);
|
|
@@ -29783,7 +29837,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29783
29837
|
return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
|
|
29784
29838
|
}, "listEvents");
|
|
29785
29839
|
|
|
29786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
29787
29841
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
29788
29842
|
id: Number(row2.id),
|
|
29789
29843
|
accountId: Number(row2.account_id),
|
|
@@ -30363,7 +30417,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
30363
30417
|
};
|
|
30364
30418
|
}, "eventStoreOver");
|
|
30365
30419
|
|
|
30366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
30367
30421
|
var CATALOG_QUERY = defineQuery({
|
|
30368
30422
|
entity: "document",
|
|
30369
30423
|
backend: "sql",
|
|
@@ -30605,7 +30659,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30605
30659
|
};
|
|
30606
30660
|
}, "catalogStoreOver");
|
|
30607
30661
|
|
|
30608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
30609
30663
|
import { createHash as createHash11 } from "node:crypto";
|
|
30610
30664
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
30611
30665
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -30703,7 +30757,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
30703
30757
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
30704
30758
|
}, "contextEvidenceRequest");
|
|
30705
30759
|
|
|
30706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
30707
30761
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
30708
30762
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
30709
30763
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -30716,7 +30770,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
30716
30770
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
30717
30771
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
30718
30772
|
|
|
30719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
30720
30774
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
30721
30775
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
30722
30776
|
signal?.throwIfAborted();
|
|
@@ -30815,7 +30869,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
30815
30869
|
});
|
|
30816
30870
|
}, "readMeetingContextEvidence");
|
|
30817
30871
|
|
|
30818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
30819
30873
|
var corpora = {
|
|
30820
30874
|
message: {
|
|
30821
30875
|
table: "messages",
|
|
@@ -31054,7 +31108,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
31054
31108
|
}
|
|
31055
31109
|
}), "contextRecordsOver");
|
|
31056
31110
|
|
|
31057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
31058
31112
|
var NOTE_FIELDS = [
|
|
31059
31113
|
"text",
|
|
31060
31114
|
"exact",
|
|
@@ -31484,7 +31538,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31484
31538
|
};
|
|
31485
31539
|
}, "noteSearchOver");
|
|
31486
31540
|
|
|
31487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
31488
31542
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
31489
31543
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
31490
31544
|
var EVENT_CORPUS = {
|
|
@@ -31616,7 +31670,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31616
31670
|
};
|
|
31617
31671
|
}, "eventSearchOver");
|
|
31618
31672
|
|
|
31619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31620
31674
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31621
31675
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31622
31676
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31635,7 +31689,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFinding
|
|
|
31635
31689
|
anySubject: true
|
|
31636
31690
|
}), "validateEvidenceFindings");
|
|
31637
31691
|
|
|
31638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
31639
31693
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
31640
31694
|
try {
|
|
31641
31695
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -31647,7 +31701,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
31647
31701
|
}
|
|
31648
31702
|
}, "calendarMoment");
|
|
31649
31703
|
|
|
31650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
31651
31705
|
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";
|
|
31652
31706
|
var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31653
31707
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31796,7 +31850,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31796
31850
|
};
|
|
31797
31851
|
}, "factsStoreOver");
|
|
31798
31852
|
|
|
31799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
31800
31854
|
var invalid4 = /* @__PURE__ */ __name((message2) => {
|
|
31801
31855
|
throw new CliError("validation_error", message2);
|
|
31802
31856
|
}, "invalid");
|
|
@@ -31895,7 +31949,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31895
31949
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
31896
31950
|
}, "findingsCoreOver");
|
|
31897
31951
|
|
|
31898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31899
31953
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31900
31954
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31901
31955
|
var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -32042,7 +32096,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32042
32096
|
};
|
|
32043
32097
|
}, "proposedActionsStoreOver");
|
|
32044
32098
|
|
|
32045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
32046
32100
|
var stale = /* @__PURE__ */ __name(() => {
|
|
32047
32101
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
32048
32102
|
reason: "evidence-findings.stale"
|
|
@@ -32193,7 +32247,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32193
32247
|
} else {
|
|
32194
32248
|
const chosen = { ...batch.input, findings: batch.input.findings.filter((f) => accepted.includes(f.id)) };
|
|
32195
32249
|
const now2 = core.snapshotParts(chosen, cite());
|
|
32196
|
-
if (Object.entries(now2).some(([key2, hash2]) => parts2[key2] !== hash2))
|
|
32250
|
+
if (Object.entries(now2).some(([key2, hash2]) => !key2.startsWith("project:") && parts2[key2] !== hash2))
|
|
32197
32251
|
return stale();
|
|
32198
32252
|
}
|
|
32199
32253
|
}
|
|
@@ -32214,7 +32268,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32214
32268
|
};
|
|
32215
32269
|
}, "evidenceFindingsStoreOver");
|
|
32216
32270
|
|
|
32217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
32218
32272
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
32219
32273
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
32220
32274
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -32267,7 +32321,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
32267
32321
|
}, "forPerson")
|
|
32268
32322
|
}), "involvementStoreOver");
|
|
32269
32323
|
|
|
32270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
32271
32325
|
import { createHash as createHash12 } from "node:crypto";
|
|
32272
32326
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
32273
32327
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -32353,16 +32407,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
32353
32407
|
};
|
|
32354
32408
|
}, "meetingProjectsStoreOver");
|
|
32355
32409
|
|
|
32356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32357
32411
|
import { createHash as createHash15 } from "node:crypto";
|
|
32358
32412
|
|
|
32359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
32360
32414
|
import { createHash as createHash14 } from "node:crypto";
|
|
32361
32415
|
|
|
32362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
32363
32417
|
import { createHash as createHash13 } from "node:crypto";
|
|
32364
32418
|
|
|
32365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
32366
32420
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
32367
32421
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
32368
32422
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -32413,7 +32467,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
32413
32467
|
return input;
|
|
32414
32468
|
}, "consolidationApplyInput");
|
|
32415
32469
|
|
|
32416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
32417
32471
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
32418
32472
|
id: String(row2.id),
|
|
32419
32473
|
sourceId: String(row2.source_id),
|
|
@@ -32488,7 +32542,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
32488
32542
|
}, { beforeCommit: check3 });
|
|
32489
32543
|
}, "applyTagConsolidation");
|
|
32490
32544
|
|
|
32491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
32492
32546
|
var selections = [
|
|
32493
32547
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
32494
32548
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -32632,7 +32686,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
32632
32686
|
};
|
|
32633
32687
|
}, "previewRows");
|
|
32634
32688
|
|
|
32635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32636
32690
|
var kinds = ["project", "tag", "topic"];
|
|
32637
32691
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
32638
32692
|
if (signal?.aborted)
|
|
@@ -32896,7 +32950,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32896
32950
|
};
|
|
32897
32951
|
}, "vocabularyStoreOver");
|
|
32898
32952
|
|
|
32899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
32900
32954
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
32901
32955
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
32902
32956
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -33418,7 +33472,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
33418
33472
|
return key2.padEnd(3, "X");
|
|
33419
33473
|
}, "projectKey");
|
|
33420
33474
|
|
|
33421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
33422
33476
|
var DAY5 = 864e5;
|
|
33423
33477
|
var SETTING4 = "logs_pruned_at";
|
|
33424
33478
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -33445,7 +33499,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
33445
33499
|
};
|
|
33446
33500
|
}, "logPruner");
|
|
33447
33501
|
|
|
33448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
33449
33503
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
33450
33504
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
33451
33505
|
reason: "meeting-findings.stale"
|
|
@@ -33614,7 +33668,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33614
33668
|
};
|
|
33615
33669
|
}, "meetingFindingsStoreOver");
|
|
33616
33670
|
|
|
33617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
33618
33672
|
var RANK_BATCH = 512;
|
|
33619
33673
|
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";
|
|
33620
33674
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -33885,7 +33939,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
33885
33939
|
}
|
|
33886
33940
|
}), "meetingVectorsOver");
|
|
33887
33941
|
|
|
33888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
33889
33943
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
33890
33944
|
var TEXTS = {
|
|
33891
33945
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -33986,11 +34040,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33986
34040
|
};
|
|
33987
34041
|
}, "sourceMentionStoreOver");
|
|
33988
34042
|
|
|
33989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33990
34044
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
33991
34045
|
import { dirname } from "node:path";
|
|
33992
34046
|
|
|
33993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
33994
34048
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
33995
34049
|
var CLIENTS_SETTING = "clients";
|
|
33996
34050
|
var coreVersion = (() => {
|
|
@@ -34048,7 +34102,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
34048
34102
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
34049
34103
|
}, "refusalAdvice");
|
|
34050
34104
|
|
|
34051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
34052
34106
|
var GENERATED = [
|
|
34053
34107
|
{
|
|
34054
34108
|
"name": "20261010184427_initial",
|
|
@@ -34944,7 +34998,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
34944
34998
|
}
|
|
34945
34999
|
];
|
|
34946
35000
|
|
|
34947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
34948
35002
|
var MANIFEST = [
|
|
34949
35003
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
34950
35004
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -35025,7 +35079,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
35025
35079
|
return migrations;
|
|
35026
35080
|
}, "generatedMigrations");
|
|
35027
35081
|
|
|
35028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
35029
35083
|
var MIGRATIONS = generatedMigrations();
|
|
35030
35084
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
35031
35085
|
version INTEGER PRIMARY KEY,
|
|
@@ -35078,7 +35132,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
35078
35132
|
}
|
|
35079
35133
|
}, "migrate");
|
|
35080
35134
|
|
|
35081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
35082
35136
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
35083
35137
|
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 ?");
|
|
35084
35138
|
if (pending.get(0, 1) === void 0)
|
|
@@ -35100,7 +35154,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
35100
35154
|
}
|
|
35101
35155
|
}, "fillJoinKeys");
|
|
35102
35156
|
|
|
35103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
35104
35158
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
35105
35159
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
35106
35160
|
try {
|
|
@@ -35113,8 +35167,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
35113
35167
|
}, "openSqlite");
|
|
35114
35168
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
35115
35169
|
quietSqliteWarning();
|
|
35116
|
-
const { drizzle } = await import("./node-
|
|
35117
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
35170
|
+
const { drizzle } = await import("./node-7JHC5K77.js");
|
|
35171
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-LYJEK46T.js");
|
|
35118
35172
|
const client = await nodeClient(path, { readOnly });
|
|
35119
35173
|
try {
|
|
35120
35174
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -35124,8 +35178,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
35124
35178
|
}
|
|
35125
35179
|
}, "openUnderNode");
|
|
35126
35180
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
35127
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
35128
|
-
const { drizzle } = await import("./bun-
|
|
35181
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-UN2UJ6SI.js");
|
|
35182
|
+
const { drizzle } = await import("./bun-ZGZVAJU2.js");
|
|
35129
35183
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
35130
35184
|
try {
|
|
35131
35185
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -35135,7 +35189,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
35135
35189
|
}
|
|
35136
35190
|
}, "openUnderBun");
|
|
35137
35191
|
|
|
35138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
35139
35193
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
35140
35194
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
35141
35195
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -35150,7 +35204,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
35150
35204
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
35151
35205
|
}, "assertReadCompatible");
|
|
35152
35206
|
|
|
35153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
35154
35208
|
var BACKFILL_ON_OPEN = 5e3;
|
|
35155
35209
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
35156
35210
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -35206,10 +35260,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
35206
35260
|
}
|
|
35207
35261
|
}, "openStoreContext");
|
|
35208
35262
|
|
|
35209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
35210
35264
|
import { createHash as createHash16 } from "node:crypto";
|
|
35211
35265
|
|
|
35212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
35213
35267
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
35214
35268
|
var ref = text3(2048);
|
|
35215
35269
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -35275,7 +35329,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
35275
35329
|
}))
|
|
35276
35330
|
});
|
|
35277
35331
|
|
|
35278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
35279
35333
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
35280
35334
|
var invalid7 = /* @__PURE__ */ __name((field4) => {
|
|
35281
35335
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -35379,7 +35433,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
|
|
|
35379
35433
|
invalid7("external.unused");
|
|
35380
35434
|
}, "validateProjectAnnotationsGraph");
|
|
35381
35435
|
|
|
35382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
35383
35437
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
35384
35438
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
35385
35439
|
var targetSchema = strictObject({
|
|
@@ -35485,7 +35539,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
35485
35539
|
};
|
|
35486
35540
|
}, "planBoundProjectAnnotations");
|
|
35487
35541
|
|
|
35488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
35489
35543
|
import { createHash as createHash17 } from "node:crypto";
|
|
35490
35544
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
35491
35545
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -35579,7 +35633,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
35579
35633
|
})).digest("hex");
|
|
35580
35634
|
}, "projectAnnotationSnapshotFingerprint");
|
|
35581
35635
|
|
|
35582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
35583
35637
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
35584
35638
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
35585
35639
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -35596,7 +35650,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
35596
35650
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
35597
35651
|
}, "projectAnnotationRequest");
|
|
35598
35652
|
|
|
35599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
35600
35654
|
var SnapshotBudget = class {
|
|
35601
35655
|
static {
|
|
35602
35656
|
__name(this, "SnapshotBudget");
|
|
@@ -35622,13 +35676,13 @@ var SnapshotBudget = class {
|
|
|
35622
35676
|
}
|
|
35623
35677
|
};
|
|
35624
35678
|
|
|
35625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35626
35680
|
import { createHash as createHash19 } from "node:crypto";
|
|
35627
35681
|
|
|
35628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35682
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
35629
35683
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
35630
35684
|
|
|
35631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
35632
35686
|
import { createHash as createHash18 } from "node:crypto";
|
|
35633
35687
|
var invalid9 = /* @__PURE__ */ __name(() => {
|
|
35634
35688
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -35771,7 +35825,7 @@ var ProjectSnapshotSources = class {
|
|
|
35771
35825
|
}
|
|
35772
35826
|
};
|
|
35773
35827
|
|
|
35774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
35775
35829
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
35776
35830
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
35777
35831
|
}, "unsupported");
|
|
@@ -35942,7 +35996,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
35942
35996
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
35943
35997
|
}), "projectAnnotationSnapshot");
|
|
35944
35998
|
|
|
35945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35946
36000
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
35947
36001
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
35948
36002
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -36004,7 +36058,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
36004
36058
|
};
|
|
36005
36059
|
}), "previewAnnotationSnapshot");
|
|
36006
36060
|
|
|
36007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
36008
36062
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
36009
36063
|
const mappings = { ...bindings };
|
|
36010
36064
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -36046,7 +36100,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
36046
36100
|
return mappings;
|
|
36047
36101
|
}, "restoreAnnotationRecords");
|
|
36048
36102
|
|
|
36049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
36050
36104
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
36051
36105
|
async preview(request) {
|
|
36052
36106
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -36076,7 +36130,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
36076
36130
|
}
|
|
36077
36131
|
}), "projectAnnotationStoreOver");
|
|
36078
36132
|
|
|
36079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
36080
36134
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
36081
36135
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
36082
36136
|
let merged = { from: from2, to };
|
|
@@ -36089,7 +36143,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
36089
36143
|
}, "markRange");
|
|
36090
36144
|
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");
|
|
36091
36145
|
|
|
36092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
36093
36147
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
36094
36148
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
36095
36149
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -36099,7 +36153,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
36099
36153
|
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);
|
|
36100
36154
|
}, "setTaskRulesStop");
|
|
36101
36155
|
|
|
36102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
36103
36157
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
36104
36158
|
const { database } = context;
|
|
36105
36159
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -36155,7 +36209,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36155
36209
|
};
|
|
36156
36210
|
}, "syncStoreOver");
|
|
36157
36211
|
|
|
36158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
36159
36213
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
36160
36214
|
const { database } = context;
|
|
36161
36215
|
return {
|
|
@@ -36177,7 +36231,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
36177
36231
|
};
|
|
36178
36232
|
}, "tagsStoreOver");
|
|
36179
36233
|
|
|
36180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
36181
36235
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
36182
36236
|
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
|
|
36183
36237
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -36304,7 +36358,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
36304
36358
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
36305
36359
|
}, "savePictureChunks");
|
|
36306
36360
|
|
|
36307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
36308
36362
|
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,
|
|
36309
36363
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
36310
36364
|
FROM messages m
|
|
@@ -36393,7 +36447,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
36393
36447
|
return plain2(best(found2));
|
|
36394
36448
|
}, "nearestMessages");
|
|
36395
36449
|
|
|
36396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
36397
36451
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
36398
36452
|
const { database } = context;
|
|
36399
36453
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -36651,7 +36705,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
36651
36705
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
36652
36706
|
}), "vectorsStoreOver");
|
|
36653
36707
|
|
|
36654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
36655
36709
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
36656
36710
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
36657
36711
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -36739,10 +36793,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
36739
36793
|
}
|
|
36740
36794
|
}, "lastBackup");
|
|
36741
36795
|
|
|
36742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
36743
36797
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
36744
36798
|
|
|
36745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
36746
36800
|
var COUNTED_TABLES = [
|
|
36747
36801
|
"accounts",
|
|
36748
36802
|
"chats",
|
|
@@ -36827,7 +36881,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
36827
36881
|
};
|
|
36828
36882
|
}, "storeContents");
|
|
36829
36883
|
|
|
36830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
36831
36885
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
36832
36886
|
const context = await openStoreContext(options);
|
|
36833
36887
|
try {
|
|
@@ -37033,6 +37087,7 @@ export {
|
|
|
37033
37087
|
parsePhoneCountries,
|
|
37034
37088
|
MENTION_KINDS,
|
|
37035
37089
|
NOT_FILES,
|
|
37090
|
+
hitFiles,
|
|
37036
37091
|
matchDownloads,
|
|
37037
37092
|
QUERY_VERSION,
|
|
37038
37093
|
QUERY_LIMITS2 as QUERY_LIMITS,
|