@wirecat/mail-cli 0.6.0 → 0.7.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/CHANGELOG.md +42 -0
- package/README.md +8 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GBFTKUHA.js → all-profiles-SI67TKZM.js} +6 -6
- package/dist/bundle/{anthropic-PTSCWUG6.js → anthropic-DALMLC3Y.js} +4 -4
- package/dist/bundle/{app-server-5VJ2WCKJ.js → app-server-XOH327Z2.js} +41 -41
- package/dist/bundle/{bun-2KRUBPIN.js → bun-ORL67CJ6.js} +2 -2
- package/dist/bundle/{bun-sqlite-ELSRSJBM.js → bun-sqlite-DGXFNFHI.js} +3 -3
- package/dist/bundle/{chunk-B337KHJ5.js → chunk-23IEVVL2.js} +1 -1
- package/dist/bundle/{chunk-PKU6V4EQ.js → chunk-2M4K7HYR.js} +16 -16
- package/dist/bundle/{chunk-RDSAI6DC.js → chunk-35KD2CI2.js} +349 -254
- package/dist/bundle/{chunk-J4C32YKH.js → chunk-3GZK5GTU.js} +1 -1
- package/dist/bundle/{chunk-OHV5RDFE.js → chunk-3TYEJRMZ.js} +3 -3
- package/dist/bundle/{chunk-AGX7NR3S.js → chunk-45KA5667.js} +12 -12
- package/dist/bundle/{chunk-YBJMBPL7.js → chunk-4NYWHINR.js} +5 -5
- package/dist/bundle/{chunk-JKLQHPED.js → chunk-4ULY3GDL.js} +9 -9
- package/dist/bundle/{chunk-O555ZEQR.js → chunk-5BSEGMNE.js} +3 -3
- package/dist/bundle/{chunk-ZPGLWMNH.js → chunk-5JEYIHS6.js} +3 -3
- package/dist/bundle/{chunk-56PI2BRH.js → chunk-6LK7KTWB.js} +1 -1
- package/dist/bundle/{chunk-ES4PWHBJ.js → chunk-6RMMAUUW.js} +26 -26
- package/dist/bundle/{chunk-TKJDGAHT.js → chunk-6XNPXAJU.js} +31 -25
- package/dist/bundle/{chunk-PBYDT3CG.js → chunk-73OJJGZE.js} +3 -2
- package/dist/bundle/{chunk-WGK4AIRL.js → chunk-7K6KJWTO.js} +11 -11
- package/dist/bundle/{chunk-FIQOBLHS.js → chunk-AP7V256W.js} +1 -1
- package/dist/bundle/{chunk-K5JUROGN.js → chunk-BEMLGWY4.js} +1 -1
- package/dist/bundle/{chunk-P5B7IFOG.js → chunk-BGUMGCUY.js} +1 -1
- package/dist/bundle/{chunk-NZB4WGQS.js → chunk-CAKBG5FC.js} +5 -5
- package/dist/bundle/{chunk-RAZOSYEO.js → chunk-DKQWTQVY.js} +22 -22
- package/dist/bundle/{chunk-TPNC5VCJ.js → chunk-DXGMPMFP.js} +4 -4
- package/dist/bundle/{chunk-5AQKM47C.js → chunk-E3DRM6YP.js} +2 -2
- package/dist/bundle/{chunk-JFJTDL22.js → chunk-EYT33MM3.js} +44 -44
- package/dist/bundle/{chunk-LWTG5UOF.js → chunk-FPOGVDLS.js} +2 -2
- package/dist/bundle/{chunk-5KHJUYHQ.js → chunk-FTFNWGIR.js} +6 -6
- package/dist/bundle/{chunk-4PKHZQIM.js → chunk-GJUUTUK4.js} +7 -7
- package/dist/bundle/{chunk-NOU6MWEM.js → chunk-HFJNEXU7.js} +1 -1
- package/dist/bundle/{chunk-M7V3GSJQ.js → chunk-HV3EIYX4.js} +1 -1
- package/dist/bundle/{chunk-H4VFIH5W.js → chunk-IYZHM3ZN.js} +2 -2
- package/dist/bundle/{chunk-DA46WQEA.js → chunk-JFMUI4H6.js} +1 -1
- package/dist/bundle/{chunk-VF24ZAPX.js → chunk-LZ5J3UXD.js} +3 -3
- package/dist/bundle/{chunk-Y7JKWQC2.js → chunk-M2JCUVCJ.js} +112 -93
- package/dist/bundle/{chunk-KUQYWIVR.js → chunk-MCJ7LKYR.js} +5 -5
- package/dist/bundle/{chunk-XERTHQ6D.js → chunk-MHQKHWCJ.js} +14 -14
- package/dist/bundle/{chunk-VEAP5RVI.js → chunk-MMXMVGA6.js} +6 -6
- package/dist/bundle/{chunk-PHPC72DP.js → chunk-NNIXREJH.js} +5 -5
- package/dist/bundle/{chunk-UAXBLHZK.js → chunk-OHTR4WFO.js} +2 -2
- package/dist/bundle/{chunk-SAZJDKEI.js → chunk-PDL4UREY.js} +6 -6
- package/dist/bundle/{chunk-JLRMSNPX.js → chunk-Q2C3VMSU.js} +2 -0
- package/dist/bundle/{chunk-JIQAFFPV.js → chunk-Q44AYEOB.js} +2 -2
- package/dist/bundle/{chunk-6MV2TBDB.js → chunk-R5MML3FC.js} +51 -47
- package/dist/bundle/{chunk-ZRYFEEXZ.js → chunk-RQVWZBW3.js} +2 -2
- package/dist/bundle/{chunk-3KY7DA5A.js → chunk-S4YUR4S3.js} +426 -336
- package/dist/bundle/{chunk-MD2J3POF.js → chunk-U6UJ3HRS.js} +7 -1
- package/dist/bundle/{chunk-XZGLY2LU.js → chunk-V4TDG4KF.js} +10 -10
- package/dist/bundle/{chunk-ZMMIIBTM.js → chunk-VBOMKZ4E.js} +42 -42
- package/dist/bundle/{chunk-NCWO2FNC.js → chunk-VKPWP3AK.js} +1 -1
- package/dist/bundle/{chunk-O7VK7CJX.js → chunk-VNJMO5F6.js} +2 -2
- package/dist/bundle/{chunk-J5MYH4L5.js → chunk-VSHJWTX5.js} +5 -5
- package/dist/bundle/{chunk-DV4RSEAH.js → chunk-XQJWMBDY.js} +5 -5
- package/dist/bundle/{chunk-JKA2AICL.js → chunk-ZKCNMW7G.js} +1 -1
- package/dist/bundle/{chunk-WCL3WBH5.js → chunk-ZKZABB4K.js} +1 -1
- package/dist/bundle/{chunk-BVIHT7KR.js → chunk-ZNGQ3NZ4.js} +8 -8
- package/dist/bundle/{command-contract-NZF4B5OR.js → command-contract-CB5BII3S.js} +14 -14
- package/dist/bundle/{decode-HVXDCQ63.js → decode-KOBURZIQ.js} +3 -3
- package/dist/bundle/{dist-43DZXMBL.js → dist-T7HMT675.js} +10 -10
- package/dist/bundle/{echarts-LZ74IXHG.js → echarts-LEWTQO6H.js} +2 -2
- package/dist/bundle/{embed-OQF5U2C6.js → embed-PUFE4BSQ.js} +4 -4
- package/dist/bundle/{embedder-OCWQAWKO.js → embedder-3G4BQQ6X.js} +7 -7
- package/dist/bundle/{first-run-MTZPUPGA.js → first-run-FLXOC53U.js} +7 -7
- package/dist/bundle/first-screen-VUZEDSQW.js +32 -0
- package/dist/bundle/{instructions-M6F4FP7U.js → instructions-HGSXDCBT.js} +1 -1
- package/dist/bundle/mail.js +3 -3
- package/dist/bundle/{node-NYBBFHGN.js → node-5Z7PS4F5.js} +2 -2
- package/dist/bundle/{node-sqlite-CWCNWO75.js → node-sqlite-OAW7APIX.js} +3 -3
- package/dist/bundle/{oauth-DVX45EME.js → oauth-ZFZWPAJN.js} +5 -5
- package/dist/bundle/{open-M7EQWWHL.js → open-ZQMBZVH4.js} +2 -2
- package/dist/bundle/{openai-63KRU5H2.js → openai-XT2RIXAK.js} +11 -11
- package/dist/bundle/{process-DV5GQIGM.js → process-VVEQIHPE.js} +1 -1
- package/dist/bundle/{program-EPR3QCMX.js → program-RD3BBDNY.js} +2391 -941
- package/dist/bundle/{prompt-EPWPWTB3.js → prompt-PU7GE4Z4.js} +3 -3
- package/dist/bundle/{recognize-R46KDXK4.js → recognize-AG4A3KUK.js} +2 -2
- package/dist/bundle/{remote-RENCYB5X.js → remote-D6TQ6T7F.js} +5 -5
- package/dist/bundle/{rerank-VHPC5O73.js → rerank-GO24HJPF.js} +5 -5
- package/dist/bundle/{serve-KCH3ORYO.js → serve-WCHJAH6G.js} +7 -7
- package/dist/bundle/server-5KJJ3D6P.js +63 -0
- package/dist/bundle/{server-HZVXSK7B.js → server-CAVNBG3P.js} +33 -33
- package/dist/bundle/{sqlite-runtime-XP7ZJCKJ.js → sqlite-runtime-ANXC4AW2.js} +3 -3
- package/dist/bundle/{state-GQ4MEQJ5.js → state-EGJ66A62.js} +4 -4
- package/dist/bundle/{store-WT7YTR3Y.js → store-OON7FCMQ.js} +12 -12
- package/dist/bundle/{store-CQNLNINW.js → store-SBFA444C.js} +10 -10
- package/dist/bundle/store-maintenance-command-UEOJLYMJ.js +52 -0
- package/dist/commands/attachments.js +2 -2
- package/dist/commands/attachments.js.map +1 -1
- package/dist/commands/context.d.ts +21 -6
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +47 -6
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/drafts.d.ts.map +1 -1
- package/dist/commands/drafts.js +20 -16
- package/dist/commands/drafts.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +10 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +13 -9
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +2 -1
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +5 -5
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +107 -10
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +72 -9
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +2 -3
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +0 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +8 -15
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -1
- package/dist/config.js.map +1 -1
- package/dist/mail/backend.d.ts +23 -1
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/backend.js +4 -1
- package/dist/mail/backend.js.map +1 -1
- package/dist/mail/compose.d.ts.map +1 -1
- package/dist/mail/compose.js +13 -25
- package/dist/mail/compose.js.map +1 -1
- package/dist/mail/doctor.d.ts +42 -0
- package/dist/mail/doctor.d.ts.map +1 -1
- package/dist/mail/doctor.js +76 -0
- package/dist/mail/doctor.js.map +1 -1
- package/dist/mail/drafts.d.ts.map +1 -1
- package/dist/mail/drafts.js +4 -4
- package/dist/mail/drafts.js.map +1 -1
- package/dist/mail/imap/connection.d.ts +6 -3
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +63 -16
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +2 -2
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +3 -3
- package/dist/mail/imap/index.js.map +1 -1
- package/dist/mail/imap/search.d.ts.map +1 -1
- package/dist/mail/imap/search.js +10 -4
- package/dist/mail/imap/search.js.map +1 -1
- package/dist/mail/save.d.ts +2 -5
- package/dist/mail/save.d.ts.map +1 -1
- package/dist/mail/save.js +6 -27
- package/dist/mail/save.js.map +1 -1
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +1 -0
- package/dist/mail/send.js.map +1 -1
- package/dist/mail/smtp.d.ts +3 -3
- package/dist/mail/smtp.d.ts.map +1 -1
- package/dist/mail/smtp.js +72 -36
- package/dist/mail/smtp.js.map +1 -1
- package/dist/oauth.d.ts +74 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +230 -0
- package/dist/oauth.js.map +1 -0
- package/dist/program.js +2 -2
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +25 -3
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +32 -8
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -4
- package/dist/bundle/first-screen-4PBS6QK5.js +0 -32
- package/dist/bundle/server-FMCPE2ZK.js +0 -63
- package/dist/bundle/store-maintenance-command-YYR42IT4.js +0 -52
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
rankingWords,
|
|
32
32
|
useStoredProviders,
|
|
33
33
|
validCounter
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MCJ7LKYR.js";
|
|
35
35
|
import {
|
|
36
36
|
FACT_STATUSES,
|
|
37
37
|
FACT_TYPES,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
matches,
|
|
55
55
|
priorityBand,
|
|
56
56
|
priorityLabel
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-MMXMVGA6.js";
|
|
58
58
|
import {
|
|
59
59
|
CHAT_MESSAGES_READ,
|
|
60
60
|
MEETING_FINDINGS_KIND,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
validateQuery,
|
|
95
95
|
walkQuery,
|
|
96
96
|
zonedMoment
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-VBOMKZ4E.js";
|
|
98
98
|
import {
|
|
99
99
|
DEFAULT_STEMMERS,
|
|
100
100
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -107,18 +107,18 @@ import {
|
|
|
107
107
|
fold,
|
|
108
108
|
normalize,
|
|
109
109
|
parseStemmers
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-GJUUTUK4.js";
|
|
111
111
|
import {
|
|
112
112
|
DEFAULT_TASK_CATEGORIES,
|
|
113
113
|
sharedConfigPath,
|
|
114
114
|
storedTaskCategories,
|
|
115
115
|
taskCategoriesReader
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-4NYWHINR.js";
|
|
117
117
|
import {
|
|
118
118
|
PRAGMAS,
|
|
119
119
|
quietSqliteWarning,
|
|
120
120
|
storeCapable
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-XQJWMBDY.js";
|
|
122
122
|
import {
|
|
123
123
|
SQLiteTable,
|
|
124
124
|
TableAliasProxyHandler,
|
|
@@ -143,10 +143,10 @@ import {
|
|
|
143
143
|
sql,
|
|
144
144
|
sqliteTable,
|
|
145
145
|
text
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-AP7V256W.js";
|
|
147
147
|
import {
|
|
148
148
|
storePath
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-Q44AYEOB.js";
|
|
150
150
|
import {
|
|
151
151
|
array,
|
|
152
152
|
boolean,
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
__name
|
|
176
176
|
} from "./chunk-ZVVMGPBJ.js";
|
|
177
177
|
|
|
178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
179
179
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
180
180
|
const methods = whole;
|
|
181
181
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -303,7 +303,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
303
303
|
};
|
|
304
304
|
}, "bindAccount");
|
|
305
305
|
|
|
306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
307
307
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
308
308
|
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");
|
|
309
309
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -326,7 +326,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
326
326
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
327
327
|
}, "sourceOf");
|
|
328
328
|
|
|
329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
330
330
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
331
331
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
332
332
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -513,7 +513,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
513
513
|
return { accounts: [...chosen.values()], skipped };
|
|
514
514
|
}, "fitting");
|
|
515
515
|
|
|
516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
517
517
|
var IndexBuilderOn = class {
|
|
518
518
|
static {
|
|
519
519
|
__name(this, "IndexBuilderOn");
|
|
@@ -708,7 +708,7 @@ function alias(table, alias2) {
|
|
|
708
708
|
}
|
|
709
709
|
__name(alias, "alias");
|
|
710
710
|
|
|
711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
712
712
|
var ENTITY_TABLES = {
|
|
713
713
|
account: "accounts",
|
|
714
714
|
attachment: "attachments",
|
|
@@ -748,7 +748,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
748
748
|
return { table, pointer, type, count, known: known2 };
|
|
749
749
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
750
750
|
|
|
751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
752
752
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
753
753
|
id: integer("id").primaryKey(),
|
|
754
754
|
name: text("name").notNull().unique(),
|
|
@@ -757,7 +757,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
757
757
|
updatedAt: integer("updated_at").notNull()
|
|
758
758
|
});
|
|
759
759
|
|
|
760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
761
761
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
762
762
|
sourceKey: text("source_key").notNull(),
|
|
763
763
|
collection: text("collection").notNull(),
|
|
@@ -767,13 +767,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
767
767
|
createdAt: integer("created_at").notNull()
|
|
768
768
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
769
769
|
|
|
770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
771
771
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
772
772
|
id: integer("id").notNull(),
|
|
773
773
|
indexableType: text("indexable_type").notNull()
|
|
774
774
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
775
775
|
|
|
776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
777
777
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
778
778
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
779
779
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -799,7 +799,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
799
799
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
800
800
|
]);
|
|
801
801
|
|
|
802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
803
803
|
var accounts = sqliteTable("accounts", {
|
|
804
804
|
id: integer("id").primaryKey(),
|
|
805
805
|
provider: text("provider").notNull(),
|
|
@@ -2300,7 +2300,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2300
2300
|
at: integer("at").notNull()
|
|
2301
2301
|
});
|
|
2302
2302
|
|
|
2303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2304
2304
|
var ARMS = [
|
|
2305
2305
|
[
|
|
2306
2306
|
"message",
|
|
@@ -2427,7 +2427,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2427
2427
|
return recomputed;
|
|
2428
2428
|
}, "drainInvolvementQueue");
|
|
2429
2429
|
|
|
2430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2431
2431
|
import { domainToUnicode } from "node:url";
|
|
2432
2432
|
|
|
2433
2433
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12449,7 +12449,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12449
12449
|
}, "oa");
|
|
12450
12450
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12451
12451
|
|
|
12452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12453
12453
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12454
12454
|
var ID = /^[\w-]{10,}$/;
|
|
12455
12455
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12490,7 +12490,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12490
12490
|
return { url, documentId: googleDocumentId(url) };
|
|
12491
12491
|
}), "googleDocumentLinks");
|
|
12492
12492
|
|
|
12493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12494
12494
|
var PHONE_PLANS = [
|
|
12495
12495
|
{
|
|
12496
12496
|
country: "us",
|
|
@@ -12870,7 +12870,7 @@ var PHONE_PLANS = [
|
|
|
12870
12870
|
}
|
|
12871
12871
|
];
|
|
12872
12872
|
|
|
12873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12874
12874
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12875
12875
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12876
12876
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12911,7 +12911,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12911
12911
|
return void 0;
|
|
12912
12912
|
}, "nationalPhone");
|
|
12913
12913
|
|
|
12914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12915
12915
|
var BEFORE = [
|
|
12916
12916
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12917
12917
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13171,7 +13171,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13171
13171
|
return found2.sort((a, b) => a.start - b.start);
|
|
13172
13172
|
}, "findPlaces");
|
|
13173
13173
|
|
|
13174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13175
13175
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13176
13176
|
var MENTION_VERSIONS = {
|
|
13177
13177
|
phone: 1,
|
|
@@ -13361,7 +13361,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13361
13361
|
};
|
|
13362
13362
|
}, "typedPhone");
|
|
13363
13363
|
|
|
13364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13365
13365
|
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";
|
|
13366
13366
|
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";
|
|
13367
13367
|
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";
|
|
@@ -13369,7 +13369,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13369
13369
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13370
13370
|
var NAME_WORDS = WORDS.split(" ");
|
|
13371
13371
|
|
|
13372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13373
13373
|
var LATIN_TO_CYRILLIC = {
|
|
13374
13374
|
shch: "\u0449",
|
|
13375
13375
|
sch: "\u0449",
|
|
@@ -13577,7 +13577,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13577
13577
|
return found2;
|
|
13578
13578
|
}, "findUnknownNames");
|
|
13579
13579
|
|
|
13580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13581
13581
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13582
13582
|
"webpage",
|
|
13583
13583
|
"share",
|
|
@@ -13588,6 +13588,14 @@ var NOT_FILES = /* @__PURE__ */ new Set([
|
|
|
13588
13588
|
"call",
|
|
13589
13589
|
"inline_keyboard"
|
|
13590
13590
|
]);
|
|
13591
|
+
var hitFiles = /* @__PURE__ */ __name((attachments2) => (attachments2 ?? []).flatMap(({ kind: kind3, name, size: size2 }, index2) => NOT_FILES.has(kind3) ? [] : [
|
|
13592
|
+
{
|
|
13593
|
+
position: index2 + 1,
|
|
13594
|
+
kind: kind3,
|
|
13595
|
+
...name === void 0 ? {} : { name },
|
|
13596
|
+
...size2 === void 0 ? {} : { size: size2 }
|
|
13597
|
+
}
|
|
13598
|
+
]), "hitFiles");
|
|
13591
13599
|
var storedKinds = /* @__PURE__ */ __name((kind3) => kind3 === "file" ? ["file", "document"] : [kind3], "storedKinds");
|
|
13592
13600
|
var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
13593
13601
|
const byPosition = new Map(stored3.map((one) => [one.position, one]));
|
|
@@ -13609,7 +13617,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13609
13617
|
});
|
|
13610
13618
|
}, "matchDownloads");
|
|
13611
13619
|
|
|
13612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13613
13621
|
var QUERY_VERSION = 1;
|
|
13614
13622
|
var QUERY_LIMITS2 = {
|
|
13615
13623
|
...QUERY_LIMITS,
|
|
@@ -13640,7 +13648,7 @@ function exhausted(budget) {
|
|
|
13640
13648
|
}
|
|
13641
13649
|
__name(exhausted, "exhausted");
|
|
13642
13650
|
|
|
13643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13644
13652
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13645
13653
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13646
13654
|
kind: "char",
|
|
@@ -14040,7 +14048,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14040
14048
|
return out;
|
|
14041
14049
|
}, "foldRegex");
|
|
14042
14050
|
|
|
14043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14044
14052
|
var PRESET_VERSION = 1;
|
|
14045
14053
|
var PRESETS = {
|
|
14046
14054
|
password: {
|
|
@@ -14094,7 +14102,7 @@ var PRESETS = {
|
|
|
14094
14102
|
}
|
|
14095
14103
|
};
|
|
14096
14104
|
|
|
14097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14098
14106
|
var FIELD_VERSION = 2;
|
|
14099
14107
|
var UNITS = {
|
|
14100
14108
|
"": 1,
|
|
@@ -14554,12 +14562,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14554
14562
|
return validateFields(parsed2.output);
|
|
14555
14563
|
}, "validateAst");
|
|
14556
14564
|
|
|
14557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14558
14566
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14559
14567
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14560
14568
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14561
14569
|
|
|
14562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14563
14571
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14564
14572
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14565
14573
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14583,7 +14591,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14583
14591
|
};
|
|
14584
14592
|
}, "linkMatch");
|
|
14585
14593
|
|
|
14586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14587
14595
|
var SETTING = "phoneCountries";
|
|
14588
14596
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14589
14597
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14614,7 +14622,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14614
14622
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14615
14623
|
}, "valueMatch");
|
|
14616
14624
|
|
|
14617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14618
14626
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14619
14627
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14620
14628
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14642,7 +14650,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14642
14650
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14643
14651
|
}, "vocabularySimilarity");
|
|
14644
14652
|
|
|
14645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14646
14654
|
import { createHash } from "node:crypto";
|
|
14647
14655
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14648
14656
|
try {
|
|
@@ -14708,7 +14716,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14708
14716
|
});
|
|
14709
14717
|
}, "guardTagCreation");
|
|
14710
14718
|
|
|
14711
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14712
14720
|
var invalid = /* @__PURE__ */ __name((message2) => {
|
|
14713
14721
|
throw new CliError("validation_error", message2);
|
|
14714
14722
|
}, "invalid");
|
|
@@ -14785,7 +14793,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14785
14793
|
};
|
|
14786
14794
|
}, "createTagRedirectIndex");
|
|
14787
14795
|
|
|
14788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14789
14797
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14790
14798
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14791
14799
|
if (!row2)
|
|
@@ -14813,7 +14821,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14813
14821
|
return snapshot2;
|
|
14814
14822
|
}, "tagRedirectSnapshot");
|
|
14815
14823
|
|
|
14816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14817
14825
|
import { createHash as createHash2 } from "node:crypto";
|
|
14818
14826
|
var TASK_KEY_PREFIXES = {
|
|
14819
14827
|
question: "Q",
|
|
@@ -14841,7 +14849,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14841
14849
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14842
14850
|
}, "taskAccountOf");
|
|
14843
14851
|
|
|
14844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14845
14853
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14846
14854
|
var REFERABLE = {
|
|
14847
14855
|
note: { tombstone: true },
|
|
@@ -14991,7 +14999,10 @@ var stateOfThing = /* @__PURE__ */ __name((database, thing) => {
|
|
|
14991
14999
|
}, "stateOfThing");
|
|
14992
15000
|
var taskRowOf = /* @__PURE__ */ __name((database, id2) => {
|
|
14993
15001
|
const row2 = database.prepare("SELECT id FROM tasks WHERE package_id = ? OR key = ? ORDER BY id LIMIT 1").get(id2, id2);
|
|
14994
|
-
|
|
15002
|
+
if (row2)
|
|
15003
|
+
return Number(row2.id);
|
|
15004
|
+
const moved = database.prepare("SELECT task_id FROM task_events WHERE kind = 'project' AND json_extract(changes, '$.key[0]') = ? ORDER BY id DESC LIMIT 1").get(id2);
|
|
15005
|
+
return moved ? Number(moved.task_id) : void 0;
|
|
14995
15006
|
}, "taskRowOf");
|
|
14996
15007
|
var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
14997
15008
|
const row2 = database.prepare("SELECT key, package_id AS id FROM tasks WHERE id = ?").get(rowId);
|
|
@@ -14999,7 +15010,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14999
15010
|
}, "taskIdOf");
|
|
15000
15011
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15001
15012
|
|
|
15002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15003
15014
|
var toMs = /* @__PURE__ */ __name((iso11) => {
|
|
15004
15015
|
if (iso11 === null || iso11 === void 0)
|
|
15005
15016
|
return null;
|
|
@@ -15013,7 +15024,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15013
15024
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15014
15025
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15015
15026
|
|
|
15016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15017
15028
|
var TAG_KINDS = ["tag", "topic"];
|
|
15018
15029
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15019
15030
|
var TAG_TYPE = {
|
|
@@ -15216,7 +15227,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15216
15227
|
return result;
|
|
15217
15228
|
}, "tagsOf");
|
|
15218
15229
|
|
|
15219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15220
15231
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15221
15232
|
var SPEECH = speech("att");
|
|
15222
15233
|
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");
|
|
@@ -15577,7 +15588,7 @@ var FIELD_COMPILERS = {
|
|
|
15577
15588
|
subject
|
|
15578
15589
|
};
|
|
15579
15590
|
|
|
15580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15581
15592
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15582
15593
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15583
15594
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15593,7 +15604,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15593
15604
|
};
|
|
15594
15605
|
}, "placeOf");
|
|
15595
15606
|
|
|
15596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15597
15608
|
var DRAIN_ON_WRITE = 500;
|
|
15598
15609
|
var METHOD = "rules";
|
|
15599
15610
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15756,7 +15767,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15756
15767
|
return queued.length;
|
|
15757
15768
|
}, "drainMentions");
|
|
15758
15769
|
|
|
15759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15760
15771
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15761
15772
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15762
15773
|
if (!exists2)
|
|
@@ -15764,7 +15775,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15764
15775
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15765
15776
|
}, "indexRow");
|
|
15766
15777
|
|
|
15767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15768
15779
|
var INDEX = "message_stems";
|
|
15769
15780
|
var SETTING2 = "searchStemmers";
|
|
15770
15781
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -15886,7 +15897,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
15886
15897
|
};
|
|
15887
15898
|
}, "stemmerCache");
|
|
15888
15899
|
|
|
15889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
15890
15901
|
var SQLITE_BUSY = 5;
|
|
15891
15902
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
15892
15903
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -15981,7 +15992,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
15981
15992
|
}
|
|
15982
15993
|
}, "read");
|
|
15983
15994
|
|
|
15984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
15985
15996
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
15986
15997
|
coalesce(CASE k.chunkable_type
|
|
15987
15998
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16123,7 +16134,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16123
16134
|
}, "dropUnusedVectors");
|
|
16124
16135
|
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");
|
|
16125
16136
|
|
|
16126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16127
16138
|
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({
|
|
16128
16139
|
target: [accounts.provider, accounts.externalId],
|
|
16129
16140
|
set: {
|
|
@@ -16229,7 +16240,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16229
16240
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16230
16241
|
}, "dropOrphanPeople");
|
|
16231
16242
|
|
|
16232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16233
16244
|
var FOLDED = [
|
|
16234
16245
|
{ table: "tasks", column: "title" },
|
|
16235
16246
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16266,7 +16277,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16266
16277
|
return filled2;
|
|
16267
16278
|
}, "fillFolded");
|
|
16268
16279
|
|
|
16269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16270
16281
|
import { createHash as createHash3 } from "node:crypto";
|
|
16271
16282
|
var CHUNK_CHARS = 1200;
|
|
16272
16283
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16371,7 +16382,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16371
16382
|
return chunks2;
|
|
16372
16383
|
}, "cutChunks");
|
|
16373
16384
|
|
|
16374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16375
16386
|
var DAY = 864e5;
|
|
16376
16387
|
var CURRENCY = [
|
|
16377
16388
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16488,7 +16499,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16488
16499
|
return best?.day ?? null;
|
|
16489
16500
|
}, "dueDayOf");
|
|
16490
16501
|
|
|
16491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16492
16503
|
var DAY2 = 864e5;
|
|
16493
16504
|
var STOP_WORDS = new Set([
|
|
16494
16505
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16643,7 +16654,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16643
16654
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16644
16655
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16645
16656
|
|
|
16646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16647
16658
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16648
16659
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16649
16660
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -16914,7 +16925,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
16914
16925
|
};
|
|
16915
16926
|
}, "readiness");
|
|
16916
16927
|
|
|
16917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
16918
16929
|
var DOCUMENT_PICTURE = "document_picture";
|
|
16919
16930
|
var SCAN_PAGE2 = 5e3;
|
|
16920
16931
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -16977,7 +16988,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
16977
16988
|
}, "nearestPictures")
|
|
16978
16989
|
}), "documentPicturesOver");
|
|
16979
16990
|
|
|
16980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
16981
16992
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
16982
16993
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
16983
16994
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17042,7 +17053,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17042
17053
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17043
17054
|
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");
|
|
17044
17055
|
|
|
17045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17046
17057
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17047
17058
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17048
17059
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17132,7 +17143,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17132
17143
|
});
|
|
17133
17144
|
}, "linkMeeting");
|
|
17134
17145
|
|
|
17135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17136
17147
|
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), ''))";
|
|
17137
17148
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17138
17149
|
"working-location",
|
|
@@ -17362,7 +17373,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17362
17373
|
return true;
|
|
17363
17374
|
}, "resetNoteIndex");
|
|
17364
17375
|
|
|
17365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17366
17377
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17367
17378
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17368
17379
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17381,7 +17392,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17381
17392
|
}
|
|
17382
17393
|
}, "resolvePersonLinks");
|
|
17383
17394
|
|
|
17384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17385
17396
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17386
17397
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17387
17398
|
find: orm.select({
|
|
@@ -17606,7 +17617,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17606
17617
|
}, "meetingIdentityPk");
|
|
17607
17618
|
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");
|
|
17608
17619
|
|
|
17609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17610
17621
|
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");
|
|
17611
17622
|
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");
|
|
17612
17623
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -17886,7 +17897,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
17886
17897
|
}
|
|
17887
17898
|
}, "replaceAutoTags");
|
|
17888
17899
|
|
|
17889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
17890
17901
|
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");
|
|
17891
17902
|
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;
|
|
17892
17903
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -17967,7 +17978,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
17967
17978
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
17968
17979
|
}, "mailCore");
|
|
17969
17980
|
|
|
17970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
17971
17982
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
17972
17983
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
17973
17984
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18077,7 +18088,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18077
18088
|
return emails3 + threads;
|
|
18078
18089
|
}, "drainEmailIndex");
|
|
18079
18090
|
|
|
18080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18081
18092
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18082
18093
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18083
18094
|
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,
|
|
@@ -18123,7 +18134,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18123
18134
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18124
18135
|
}, "forgetLocations");
|
|
18125
18136
|
|
|
18126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18127
18138
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18128
18139
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18129
18140
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18173,7 +18184,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18173
18184
|
return threads.length;
|
|
18174
18185
|
}, "markEmailsRestored");
|
|
18175
18186
|
|
|
18176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18177
18188
|
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");
|
|
18178
18189
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18179
18190
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18240,7 +18251,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18240
18251
|
}
|
|
18241
18252
|
}), "mailRulesOver");
|
|
18242
18253
|
|
|
18243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18244
18255
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18245
18256
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18246
18257
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18248,7 +18259,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18248
18259
|
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);
|
|
18249
18260
|
}, "reviewLink");
|
|
18250
18261
|
|
|
18251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18252
18263
|
function checkMeetingCancelled(signal) {
|
|
18253
18264
|
if (!signal?.aborted)
|
|
18254
18265
|
return;
|
|
@@ -18259,7 +18270,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18259
18270
|
}
|
|
18260
18271
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18261
18272
|
|
|
18262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18263
18274
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18264
18275
|
id: Number(row2.id),
|
|
18265
18276
|
accountId: Number(row2.account_id),
|
|
@@ -18309,7 +18320,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18309
18320
|
createdAt: Number(row2.created_at)
|
|
18310
18321
|
}), "transcriptRowOf");
|
|
18311
18322
|
|
|
18312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18313
18324
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18314
18325
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18315
18326
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18476,7 +18487,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18476
18487
|
}
|
|
18477
18488
|
}), "meetingReadsOver");
|
|
18478
18489
|
|
|
18479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18480
18491
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18481
18492
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18482
18493
|
const params = [input.accountId];
|
|
@@ -18519,7 +18530,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18519
18530
|
return { clauses, params };
|
|
18520
18531
|
}, "meetingSelectionSql");
|
|
18521
18532
|
|
|
18522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18523
18534
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18524
18535
|
async meetingChatLines(input) {
|
|
18525
18536
|
checkMeetingCancelled(input.signal);
|
|
@@ -18547,7 +18558,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18547
18558
|
}
|
|
18548
18559
|
}), "meetingChatLinesOver");
|
|
18549
18560
|
|
|
18550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18551
18562
|
var MESSAGE_FIELDS = {
|
|
18552
18563
|
pk: messages.id,
|
|
18553
18564
|
nativeId: messages.externalId,
|
|
@@ -18714,7 +18725,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18714
18725
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18715
18726
|
}), "chatActivity");
|
|
18716
18727
|
|
|
18717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18718
18729
|
var HIT_FIELDS = {
|
|
18719
18730
|
...MESSAGE_FIELDS,
|
|
18720
18731
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18813,7 +18824,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18813
18824
|
};
|
|
18814
18825
|
}, "directReplies");
|
|
18815
18826
|
|
|
18816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18817
18828
|
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");
|
|
18818
18829
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18819
18830
|
const found2 = identityRow(context, ref3);
|
|
@@ -18944,7 +18955,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
18944
18955
|
}, "mentioning");
|
|
18945
18956
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18946
18957
|
|
|
18947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
18948
18959
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
18949
18960
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
18950
18961
|
}, "missing");
|
|
@@ -19066,7 +19077,7 @@ function meetingContextLinksOver(context) {
|
|
|
19066
19077
|
}
|
|
19067
19078
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19068
19079
|
|
|
19069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19070
19081
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19071
19082
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19072
19083
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19095,7 +19106,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19095
19106
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19096
19107
|
}, "indexedText");
|
|
19097
19108
|
|
|
19098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19099
19110
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19100
19111
|
var meetingCurrentIndexRows = `
|
|
19101
19112
|
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
|
|
@@ -19126,7 +19137,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19126
19137
|
}, "invalidateMeetingStems");
|
|
19127
19138
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19128
19139
|
|
|
19129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19130
19141
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19131
19142
|
return {
|
|
19132
19143
|
async indexSearch(original) {
|
|
@@ -19194,10 +19205,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19194
19205
|
}
|
|
19195
19206
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19196
19207
|
|
|
19197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19198
19209
|
import { createHash as createHash4 } from "node:crypto";
|
|
19199
19210
|
|
|
19200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19201
19212
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19202
19213
|
const padded = ` ${term} `;
|
|
19203
19214
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19206,7 +19217,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19206
19217
|
return [...pieces];
|
|
19207
19218
|
}, "trigrams");
|
|
19208
19219
|
|
|
19209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19210
19221
|
var SHORTEST_CORRECTION = 3;
|
|
19211
19222
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19212
19223
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19253,7 +19264,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19253
19264
|
return corrections;
|
|
19254
19265
|
}, "correctWords");
|
|
19255
19266
|
|
|
19256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19257
19268
|
var SHORTEST_GARBLED = 4;
|
|
19258
19269
|
var MOST_WIDENED = 64;
|
|
19259
19270
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19345,7 +19356,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19345
19356
|
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));
|
|
19346
19357
|
}, "widenWords");
|
|
19347
19358
|
|
|
19348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19349
19360
|
import { readFileSync } from "node:fs";
|
|
19350
19361
|
var loaded;
|
|
19351
19362
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19404,7 +19415,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19404
19415
|
return false;
|
|
19405
19416
|
}, "knownRussianWord");
|
|
19406
19417
|
|
|
19407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19408
19419
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19409
19420
|
var MOST_WORDS = 128;
|
|
19410
19421
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19631,7 +19642,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19631
19642
|
return check3(tree);
|
|
19632
19643
|
}, "matchMeetingText");
|
|
19633
19644
|
|
|
19634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19635
19646
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19636
19647
|
throw new CliError("validation_error", message2);
|
|
19637
19648
|
}, "fail");
|
|
@@ -19808,7 +19819,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19808
19819
|
}
|
|
19809
19820
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19810
19821
|
|
|
19811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19812
19823
|
import { createHash as createHash5 } from "node:crypto";
|
|
19813
19824
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19814
19825
|
if (value === void 0)
|
|
@@ -19898,7 +19909,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
19898
19909
|
}
|
|
19899
19910
|
}), "meetingParticipantSearchOver");
|
|
19900
19911
|
|
|
19901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
19902
19913
|
var preparationQueries = {
|
|
19903
19914
|
participants: {
|
|
19904
19915
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -19948,7 +19959,7 @@ var preparationQueries = {
|
|
|
19948
19959
|
}
|
|
19949
19960
|
};
|
|
19950
19961
|
|
|
19951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
19952
19963
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19953
19964
|
async preparationContext(original) {
|
|
19954
19965
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -19989,7 +20000,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19989
20000
|
}
|
|
19990
20001
|
}), "meetingPreparationContextOver");
|
|
19991
20002
|
|
|
19992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
19993
20004
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
19994
20005
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
19995
20006
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20003,7 +20014,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20003
20014
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20004
20015
|
)`, "preparationSubjects");
|
|
20005
20016
|
|
|
20006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20007
20018
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20008
20019
|
async preparationKnowledge(original) {
|
|
20009
20020
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20048,7 +20059,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20048
20059
|
}
|
|
20049
20060
|
}), "meetingPreparationKnowledgeOver");
|
|
20050
20061
|
|
|
20051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20052
20063
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20053
20064
|
async preparationNotes(original) {
|
|
20054
20065
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20101,7 +20112,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20101
20112
|
}
|
|
20102
20113
|
}), "meetingPreparationNotesOver");
|
|
20103
20114
|
|
|
20104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20105
20116
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20106
20117
|
async relatedHistory(original) {
|
|
20107
20118
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20172,7 +20183,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20172
20183
|
}
|
|
20173
20184
|
}), "meetingRelatedHistoryOver");
|
|
20174
20185
|
|
|
20175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20176
20187
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20177
20188
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20178
20189
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20253,7 +20264,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20253
20264
|
}
|
|
20254
20265
|
}), "meetingReviewOver");
|
|
20255
20266
|
|
|
20256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20257
20268
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20258
20269
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20259
20270
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20307,7 +20318,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20307
20318
|
}
|
|
20308
20319
|
}), "meetingSeriesHistoryOver");
|
|
20309
20320
|
|
|
20310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20311
20322
|
var MOST_ROWS = 5e5;
|
|
20312
20323
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20313
20324
|
async meetingStats(input) {
|
|
@@ -20354,7 +20365,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20354
20365
|
}
|
|
20355
20366
|
}), "meetingStatsOver");
|
|
20356
20367
|
|
|
20357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20358
20369
|
var CURSOR_KEY = "meetings";
|
|
20359
20370
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20360
20371
|
id: Number(row2.id),
|
|
@@ -20783,17 +20794,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20783
20794
|
const picked = filtered(filter);
|
|
20784
20795
|
const rows = database.prepare(`WITH hit AS (SELECT rowid AS r FROM meeting_words WHERE meeting_words MATCH ?),
|
|
20785
20796
|
picked AS (SELECT id, row_number() OVER (ORDER BY coalesce(started_at, 0) DESC, id) AS n FROM (${picked.sql}))
|
|
20786
|
-
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
|
|
20797
|
+
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,
|
|
20798
|
+
r.speaker_name AS speaker, m.account_id
|
|
20787
20799
|
FROM hit h JOIN meeting_transcript_rows r ON h.r % 4 = 1 AND r.id = h.r / 4
|
|
20788
20800
|
JOIN meeting_transcripts t ON t.id = r.meeting_transcript_id
|
|
20789
20801
|
AND t.superseded_at IS NULL AND t.deleted_at IS NULL
|
|
20790
|
-
JOIN picked p ON p.id = t.meeting_id
|
|
20802
|
+
JOIN picked p ON p.id = t.meeting_id JOIN meetings m ON m.id = t.meeting_id
|
|
20791
20803
|
UNION ALL
|
|
20792
|
-
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0)
|
|
20804
|
+
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0), NULL, NULL
|
|
20793
20805
|
FROM hit h JOIN meeting_chat_messages c ON h.r % 4 = 2 AND c.id = h.r / 4
|
|
20794
20806
|
JOIN picked p ON p.id = c.meeting_id
|
|
20795
20807
|
UNION ALL
|
|
20796
|
-
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)
|
|
20808
|
+
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
|
|
20797
20809
|
FROM hit h JOIN meeting_summaries s ON h.r % 4 = 3 AND s.id = h.r / 4
|
|
20798
20810
|
JOIN picked p ON p.id = s.meeting_id
|
|
20799
20811
|
ORDER BY 1, 2, 3, 4 LIMIT 10001`).all(`normalized_text : (${match})`, ...picked.params);
|
|
@@ -20807,7 +20819,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20807
20819
|
const scopes = ["transcript", "chat", "summary"];
|
|
20808
20820
|
return rows.map((row2) => {
|
|
20809
20821
|
const scope3 = scopes[Number(row2.kind)];
|
|
20822
|
+
const cue = scope3 === "transcript" ? {
|
|
20823
|
+
ref: formatMeetingReference({
|
|
20824
|
+
type: "meeting",
|
|
20825
|
+
accountId: Number(row2.account_id),
|
|
20826
|
+
meetingId: Number(row2.meeting_id),
|
|
20827
|
+
transcriptId: Number(row2.a),
|
|
20828
|
+
cuePosition: Number(row2.b)
|
|
20829
|
+
}),
|
|
20830
|
+
speakerName: row2.speaker === null ? null : String(row2.speaker)
|
|
20831
|
+
} : {};
|
|
20810
20832
|
return {
|
|
20833
|
+
...cue,
|
|
20811
20834
|
meetingId: Number(row2.meeting_id),
|
|
20812
20835
|
scope: scope3,
|
|
20813
20836
|
id: Number(row2.id),
|
|
@@ -20906,7 +20929,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
20906
20929
|
};
|
|
20907
20930
|
}, "meetingStoreOver");
|
|
20908
20931
|
|
|
20909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
20910
20933
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
20911
20934
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
20912
20935
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -20932,7 +20955,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
20932
20955
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
20933
20956
|
}, "release");
|
|
20934
20957
|
|
|
20935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
20936
20959
|
var THREAD_COLUMNS = {
|
|
20937
20960
|
subject: {
|
|
20938
20961
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -20949,7 +20972,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
20949
20972
|
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);
|
|
20950
20973
|
}, "threadRows");
|
|
20951
20974
|
|
|
20952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
20953
20976
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
20954
20977
|
id: `email:${place.emailId}`,
|
|
20955
20978
|
chatId: place.threadExternalId,
|
|
@@ -21504,7 +21527,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
21504
21527
|
}
|
|
21505
21528
|
}), "mailStoreOver");
|
|
21506
21529
|
|
|
21507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21508
21531
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21509
21532
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21510
21533
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21594,7 +21617,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21594
21617
|
}, "knownWord");
|
|
21595
21618
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21596
21619
|
|
|
21597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21598
21621
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21599
21622
|
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");
|
|
21600
21623
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21680,7 +21703,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21680
21703
|
return found2;
|
|
21681
21704
|
}, "spokenTranscripts");
|
|
21682
21705
|
|
|
21683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21684
21707
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21685
21708
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21686
21709
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21727,7 +21750,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21727
21750
|
});
|
|
21728
21751
|
}, "placeHits");
|
|
21729
21752
|
|
|
21730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21731
21754
|
var MESSAGES2 = {
|
|
21732
21755
|
rows: "messages",
|
|
21733
21756
|
threads: "chats",
|
|
@@ -22201,7 +22224,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22201
22224
|
};
|
|
22202
22225
|
}, "runQuery");
|
|
22203
22226
|
|
|
22204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22205
22228
|
function invalidMetadata() {
|
|
22206
22229
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22207
22230
|
}
|
|
@@ -22303,7 +22326,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22303
22326
|
};
|
|
22304
22327
|
}), "counterTargets");
|
|
22305
22328
|
|
|
22306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22307
22330
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22308
22331
|
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,
|
|
22309
22332
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22422,7 +22445,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22422
22445
|
}));
|
|
22423
22446
|
}, "attachmentViews");
|
|
22424
22447
|
|
|
22425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22426
22449
|
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");
|
|
22427
22450
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22428
22451
|
const { orm, database, now: now2 } = context;
|
|
@@ -22460,7 +22483,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22460
22483
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22461
22484
|
}, "intoVoiceAttachment");
|
|
22462
22485
|
|
|
22463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22464
22487
|
var FIELDS = [
|
|
22465
22488
|
"threadExternalId",
|
|
22466
22489
|
"senderIdentityId",
|
|
@@ -22777,7 +22800,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22777
22800
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22778
22801
|
}, "writeDerivedReactions");
|
|
22779
22802
|
|
|
22780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22781
22804
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22782
22805
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22783
22806
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22798,7 +22821,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22798
22821
|
};
|
|
22799
22822
|
}, "keysOver");
|
|
22800
22823
|
|
|
22801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22802
22825
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22803
22826
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22804
22827
|
if (!row2)
|
|
@@ -22833,7 +22856,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22833
22856
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22834
22857
|
}, "saveProfile");
|
|
22835
22858
|
|
|
22836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22837
22860
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22838
22861
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22839
22862
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -22869,7 +22892,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
22869
22892
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
22870
22893
|
}, "originOfActor");
|
|
22871
22894
|
|
|
22872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
22873
22896
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
22874
22897
|
const owner = ownerPerson(context.database).id;
|
|
22875
22898
|
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);
|
|
@@ -22890,7 +22913,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
22890
22913
|
return personOf(context, ref3);
|
|
22891
22914
|
}, "linkToOwner");
|
|
22892
22915
|
|
|
22893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
22894
22917
|
var PROVIDERS_SETTING = "providers";
|
|
22895
22918
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
22896
22919
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -22925,7 +22948,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
22925
22948
|
});
|
|
22926
22949
|
}, "registerProvider");
|
|
22927
22950
|
|
|
22928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
22929
22952
|
var DAY3 = 864e5;
|
|
22930
22953
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
22931
22954
|
var TEXT_LIMIT = 20;
|
|
@@ -23124,7 +23147,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23124
23147
|
};
|
|
23125
23148
|
}, "taskSimilarityOver");
|
|
23126
23149
|
|
|
23127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23128
23151
|
var SETTING3 = "taskCategories";
|
|
23129
23152
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23130
23153
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23143,7 +23166,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23143
23166
|
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);
|
|
23144
23167
|
}, "saveTaskCategories");
|
|
23145
23168
|
|
|
23146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23147
23170
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23148
23171
|
var ALLOWED = "taskAgentClose";
|
|
23149
23172
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23199,7 +23222,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23199
23222
|
];
|
|
23200
23223
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23201
23224
|
|
|
23202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
23203
23226
|
var EXCERPT_CHARS = 280;
|
|
23204
23227
|
var excerptOf = /* @__PURE__ */ __name((text5) => {
|
|
23205
23228
|
if (text5 == null)
|
|
@@ -23264,7 +23287,7 @@ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...n
|
|
|
23264
23287
|
};
|
|
23265
23288
|
}), "sourcesOfReferences");
|
|
23266
23289
|
|
|
23267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
23268
23291
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
23269
23292
|
var MAX_TEXT_CHARS = 2e6;
|
|
23270
23293
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -23290,7 +23313,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
23290
23313
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
23291
23314
|
}, "pdfPreviewLimits");
|
|
23292
23315
|
|
|
23293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23294
23317
|
import { randomBytes } from "node:crypto";
|
|
23295
23318
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23296
23319
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23303,7 +23326,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23303
23326
|
return time3 + random;
|
|
23304
23327
|
}, "ulid");
|
|
23305
23328
|
|
|
23306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23307
23330
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23308
23331
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23309
23332
|
if (!meta && !sections?.length)
|
|
@@ -23324,7 +23347,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23324
23347
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23325
23348
|
}, "languageOf");
|
|
23326
23349
|
|
|
23327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23328
23351
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23329
23352
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23330
23353
|
if (isObject(value))
|
|
@@ -23567,7 +23590,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23567
23590
|
};
|
|
23568
23591
|
}, "filesStoreOver");
|
|
23569
23592
|
|
|
23570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23571
23594
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23572
23595
|
entity: "document",
|
|
23573
23596
|
backend: "sql",
|
|
@@ -23613,7 +23636,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23613
23636
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23614
23637
|
}, "importedDocumentWhere");
|
|
23615
23638
|
|
|
23616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23617
23640
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23618
23641
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23619
23642
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -24123,7 +24146,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24123
24146
|
};
|
|
24124
24147
|
}, "notesStoreOver");
|
|
24125
24148
|
|
|
24126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24127
24150
|
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";
|
|
24128
24151
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24129
24152
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24319,7 +24342,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24319
24342
|
};
|
|
24320
24343
|
}, "memoriesStoreOver");
|
|
24321
24344
|
|
|
24322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24323
24346
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24324
24347
|
var KEY = "taskFirstPassPerChat";
|
|
24325
24348
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24339,7 +24362,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24339
24362
|
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);
|
|
24340
24363
|
}, "saveFirstPassPerChat");
|
|
24341
24364
|
|
|
24342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
24343
24366
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
24344
24367
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
24345
24368
|
name,
|
|
@@ -24362,7 +24385,9 @@ var PROJECT_TASK_FIELDS = [
|
|
|
24362
24385
|
relation: "low, medium, high, critical or none; a range of labels or of the 0\u20131 number: priority:[high TO critical]"
|
|
24363
24386
|
}),
|
|
24364
24387
|
field("agent", "kw", "agent:hermes", { relation: "the agent working on it, by name; none or any" }),
|
|
24365
|
-
field("due", "time", "due:[today TO 2026-12-31]", {
|
|
24388
|
+
field("due", "time", "due:[today TO 2026-12-31]", {
|
|
24389
|
+
relation: "the due date; today, tomorrow and yesterday are your calendar days; NOT due:* has none"
|
|
24390
|
+
}),
|
|
24366
24391
|
field("overdue", "bool", "overdue:true", { relation: "open work due before today" }),
|
|
24367
24392
|
field("when", "enum", "when:today", {
|
|
24368
24393
|
values: ["overdue", "today", "upcoming", "later", "none"],
|
|
@@ -24544,7 +24569,35 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
24544
24569
|
return root === void 0 ? void 0 : { ...query, root };
|
|
24545
24570
|
}, "withoutField");
|
|
24546
24571
|
|
|
24547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
24573
|
+
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
24574
|
+
if (row2.author_type == null)
|
|
24575
|
+
return null;
|
|
24576
|
+
const named2 = database.prepare(row2.author_type === "bot" ? "SELECT name, 0 AS owner FROM bots WHERE id = ?" : "SELECT name, owner FROM persons WHERE id = ?").get(Number(row2.author_id));
|
|
24577
|
+
return {
|
|
24578
|
+
type: row2.author_type,
|
|
24579
|
+
id: String(row2.author_id),
|
|
24580
|
+
name: named2?.name == null ? null : String(named2.name),
|
|
24581
|
+
owner: Number(named2?.owner) === 1
|
|
24582
|
+
};
|
|
24583
|
+
}, "authorNamed");
|
|
24584
|
+
var commentsOf = /* @__PURE__ */ __name((database, task) => database.prepare("SELECT n.id, n.body, n.created_at, n.author_type, n.author_id FROM notes n WHERE n.notable_type = 'task' AND n.notable_id = ? AND n.deleted_at IS NULL ORDER BY n.created_at, n.id").all(task).map((row2) => ({
|
|
24585
|
+
ref: `note:${row2.id}`,
|
|
24586
|
+
text: String(row2.body),
|
|
24587
|
+
author: authorNamed(database, row2),
|
|
24588
|
+
at: new Date(Number(row2.created_at)).toISOString()
|
|
24589
|
+
})), "commentsOf");
|
|
24590
|
+
var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
24591
|
+
const { database, now: now2 } = context;
|
|
24592
|
+
const made = write(database, () => {
|
|
24593
|
+
const { actor } = authorActor(context, by);
|
|
24594
|
+
const at = now2();
|
|
24595
|
+
return Number(database.prepare("INSERT INTO notes (notable_type, notable_id, body, author_type, author_id, revision, created_at, updated_at) VALUES ('task', ?, ?, ?, ?, 1, ?, ?) RETURNING id").get(task, body2, actor.type, actor.id, at, at)?.id);
|
|
24596
|
+
});
|
|
24597
|
+
return commentsOf(database, task).find((one) => one.ref === `note:${made}`);
|
|
24598
|
+
}, "addComment");
|
|
24599
|
+
|
|
24600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24548
24601
|
var TASK_RELATION_KINDS = [
|
|
24549
24602
|
"blocked-by",
|
|
24550
24603
|
"follow-up-of",
|
|
@@ -24674,7 +24727,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24674
24727
|
};
|
|
24675
24728
|
}, "taskRelationsStoreOver");
|
|
24676
24729
|
|
|
24677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24678
24731
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24679
24732
|
var TASK_EVENT_KINDS = [
|
|
24680
24733
|
"created",
|
|
@@ -24697,7 +24750,9 @@ var TASK_EVENT_KINDS = [
|
|
|
24697
24750
|
"resolution",
|
|
24698
24751
|
"verdict",
|
|
24699
24752
|
"close-certainty",
|
|
24700
|
-
"tags"
|
|
24753
|
+
"tags",
|
|
24754
|
+
"project",
|
|
24755
|
+
"type"
|
|
24701
24756
|
];
|
|
24702
24757
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
24703
24758
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind3, changes, at) => {
|
|
@@ -24772,6 +24827,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24772
24827
|
key: String(row2.key),
|
|
24773
24828
|
project: `project:${row2.project_id}`,
|
|
24774
24829
|
...projectNamed(Number(row2.project_id)),
|
|
24830
|
+
createdBy: authorNamed(database, row2),
|
|
24775
24831
|
title: String(row2.title),
|
|
24776
24832
|
description: row2.description == null ? null : String(row2.description),
|
|
24777
24833
|
type: row2.type,
|
|
@@ -24811,11 +24867,34 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24811
24867
|
const countOf = /* @__PURE__ */ __name((where) => Number(database.prepare(`SELECT count(*) AS n FROM tasks t WHERE ${where.sql}`).get(...where.params)?.n ?? 0), "countOf");
|
|
24812
24868
|
const rowById = /* @__PURE__ */ __name((id2) => database.prepare("SELECT * FROM tasks WHERE id = ?").get(id2), "rowById");
|
|
24813
24869
|
const details2 = /* @__PURE__ */ __name((id2) => detailsOf(rowById(id2)), "details");
|
|
24870
|
+
const onBoard = /* @__PURE__ */ __name((task) => Boolean(database.prepare(`SELECT 1 FROM tasks t WHERE t.id = ? AND ${BOARD_SCOPE}`).get(task)), "onBoard");
|
|
24871
|
+
const moveToProject = /* @__PURE__ */ __name((task, before2, target, actor, at) => {
|
|
24872
|
+
if (target === Number(before2.project_id))
|
|
24873
|
+
return;
|
|
24874
|
+
if (!onBoard(task))
|
|
24875
|
+
throw new CliError("validation_error", "only a project task moves to another project");
|
|
24876
|
+
const targetRow = database.prepare("SELECT key FROM projects WHERE id = ?").get(target);
|
|
24877
|
+
if (String(targetRow.key).length === INBOX_KEY_LENGTH)
|
|
24878
|
+
throw new CliError("validation_error", "a task moves only into one of your projects");
|
|
24879
|
+
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));
|
|
24880
|
+
if (children.length)
|
|
24881
|
+
throw new CliError("validation_error", `${String(before2.key)} has subtasks (${children.join(", ")}); move or detach them first`, { reason: "task.has-subtasks", subtasks: children });
|
|
24882
|
+
const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING key, tasks_count").get(at, target);
|
|
24883
|
+
const number3 = Number(counted.tasks_count);
|
|
24884
|
+
const key2 = `${String(counted.key)}-${number3}`;
|
|
24885
|
+
database.prepare("UPDATE tasks SET project_id = ?, number = ?, key = ?, parent_id = NULL, updated_at = ? WHERE id = ?").run(target, number3, key2, at, task);
|
|
24886
|
+
recordTaskEvent(database, task, actor, "project", {
|
|
24887
|
+
project: [`project:${before2.project_id}`, `project:${target}`],
|
|
24888
|
+
key: [String(before2.key), key2],
|
|
24889
|
+
...before2.parent_id == null ? {} : { parent: [`task:${taskIdOf(database, Number(before2.parent_id))}`, null] }
|
|
24890
|
+
}, at);
|
|
24891
|
+
}, "moveToProject");
|
|
24814
24892
|
const edit = /* @__PURE__ */ __name((task, fields4, actor, created = false) => {
|
|
24815
24893
|
const before2 = rowById(task);
|
|
24816
24894
|
const at = now2();
|
|
24817
24895
|
const set = [];
|
|
24818
24896
|
const values = [];
|
|
24897
|
+
let bump = false;
|
|
24819
24898
|
const change = /* @__PURE__ */ __name((column2, value, event, key2 = column2) => {
|
|
24820
24899
|
if ((before2[column2] ?? null) === value)
|
|
24821
24900
|
return;
|
|
@@ -24880,8 +24959,21 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24880
24959
|
}
|
|
24881
24960
|
if (fields4.category !== void 0)
|
|
24882
24961
|
change("category", fields4.category, "category");
|
|
24883
|
-
if (
|
|
24962
|
+
if (fields4.type !== void 0 && fields4.type !== before2.type) {
|
|
24963
|
+
if (!WORK_TASK_TYPES.includes(fields4.type) || !onBoard(task))
|
|
24964
|
+
throw new CliError("validation_error", `a project task's kind is one of ${WORK_TASK_TYPES.join(", ")}`);
|
|
24965
|
+
change("type", fields4.type, "type");
|
|
24966
|
+
bump = true;
|
|
24967
|
+
}
|
|
24968
|
+
if (fields4.project !== void 0)
|
|
24969
|
+
moveToProject(task, before2, projectOf2(fields4.project), actor, at);
|
|
24970
|
+
if (set.length === 0) {
|
|
24971
|
+
if (bump)
|
|
24972
|
+
database.prepare("UPDATE tasks SET revision = revision + 1 WHERE id = ?").run(task);
|
|
24884
24973
|
return;
|
|
24974
|
+
}
|
|
24975
|
+
if (bump)
|
|
24976
|
+
set.push("revision = revision + 1");
|
|
24885
24977
|
database.prepare(`UPDATE tasks SET ${set.join(", ")}, updated_at = ? WHERE id = ?`).run(...values, at, task);
|
|
24886
24978
|
}, "edit");
|
|
24887
24979
|
const columnOf = /* @__PURE__ */ __name((task, status) => database.prepare(`SELECT t.id, t.key, coalesce(t.priority_score, 0) AS score FROM tasks t WHERE ${BOARD_SCOPE} AND t.status = ? AND t.id <> ? ORDER BY ${boardOrder("priority", false)}`).all(status, task).map((row2) => ({ id: Number(row2.id), key: String(row2.key), score: Number(row2.score) })), "columnOf");
|
|
@@ -25137,6 +25229,8 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25137
25229
|
owner: Number(row2.owner) === 1,
|
|
25138
25230
|
tasks: Number(row2.n)
|
|
25139
25231
|
})), "taskPeople"),
|
|
25232
|
+
comment: /* @__PURE__ */ __name(async (id2, text5, by) => addComment(context, required3(id2), textOf3(text5, "a comment", 2e4), by), "comment"),
|
|
25233
|
+
comments: /* @__PURE__ */ __name(async (id2) => commentsOf(database, required3(id2)), "comments"),
|
|
25140
25234
|
events: /* @__PURE__ */ __name(async (id2) => database.prepare("SELECT e.actor_type, e.actor_id, e.kind, e.changes, e.created_at, CASE e.actor_type WHEN 'person' THEN p.name WHEN 'bot' THEN b.name END AS actor_name FROM task_events e LEFT JOIN persons p ON e.actor_type = 'person' AND p.id = e.actor_id LEFT JOIN bots b ON e.actor_type = 'bot' AND b.id = e.actor_id WHERE e.task_id = ? ORDER BY e.id").all(required3(id2)).map((row2) => ({
|
|
25141
25235
|
kind: row2.kind,
|
|
25142
25236
|
actor: row2.actor_type == null ? null : {
|
|
@@ -25158,7 +25252,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
25158
25252
|
};
|
|
25159
25253
|
}, "workTasksOver");
|
|
25160
25254
|
|
|
25161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
25162
25256
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
25163
25257
|
const { database, now: now2 } = context;
|
|
25164
25258
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -25207,7 +25301,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
25207
25301
|
};
|
|
25208
25302
|
}, "taskCloseOver");
|
|
25209
25303
|
|
|
25210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
25211
25305
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
25212
25306
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
25213
25307
|
const { database, now: now2 } = context;
|
|
@@ -25426,7 +25520,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
25426
25520
|
};
|
|
25427
25521
|
}, "taskPairsOver");
|
|
25428
25522
|
|
|
25429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
25430
25524
|
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";
|
|
25431
25525
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25432
25526
|
const { database, now: now2 } = context;
|
|
@@ -25631,7 +25725,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25631
25725
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25632
25726
|
}, "oneOf");
|
|
25633
25727
|
|
|
25634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25635
25729
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25636
25730
|
const { database } = context;
|
|
25637
25731
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25676,7 +25770,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25676
25770
|
};
|
|
25677
25771
|
}, "accountsStoreOver");
|
|
25678
25772
|
|
|
25679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25680
25774
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25681
25775
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25682
25776
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25700,7 +25794,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25700
25794
|
})), "keepDownloads");
|
|
25701
25795
|
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");
|
|
25702
25796
|
|
|
25703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25704
25798
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25705
25799
|
const { database } = context;
|
|
25706
25800
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25757,7 +25851,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25757
25851
|
}, "keepAttachmentText")
|
|
25758
25852
|
}), "attachmentsStoreOver");
|
|
25759
25853
|
|
|
25760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25761
25855
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25762
25856
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25763
25857
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25937,7 +26031,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25937
26031
|
return done;
|
|
25938
26032
|
}, "rekeyChats");
|
|
25939
26033
|
|
|
25940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25941
26035
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25942
26036
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25943
26037
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25969,7 +26063,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25969
26063
|
});
|
|
25970
26064
|
}, "chatCompleteness");
|
|
25971
26065
|
|
|
25972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25973
26067
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25974
26068
|
const { database } = context;
|
|
25975
26069
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -26076,7 +26170,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26076
26170
|
};
|
|
26077
26171
|
}, "chatsStoreOver");
|
|
26078
26172
|
|
|
26079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
26080
26174
|
import { createHash as createHash6 } from "node:crypto";
|
|
26081
26175
|
var BATCH_CONTEXT = 50;
|
|
26082
26176
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -26214,7 +26308,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
26214
26308
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
26215
26309
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
26216
26310
|
|
|
26217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
26218
26312
|
import { setTimeout } from "node:timers/promises";
|
|
26219
26313
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
26220
26314
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -26526,7 +26620,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
26526
26620
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
26527
26621
|
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");
|
|
26528
26622
|
|
|
26529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
26530
26624
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26531
26625
|
const { database } = context;
|
|
26532
26626
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26633,7 +26727,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26633
26727
|
};
|
|
26634
26728
|
}, "conversationsStoreOver");
|
|
26635
26729
|
|
|
26636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26637
26731
|
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";
|
|
26638
26732
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26639
26733
|
const { database } = context;
|
|
@@ -26658,7 +26752,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26658
26752
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26659
26753
|
}), "countersStoreOver");
|
|
26660
26754
|
|
|
26661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26662
26756
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26663
26757
|
var MENTION_QUERY = defineQuery({
|
|
26664
26758
|
entity: "mention",
|
|
@@ -26874,7 +26968,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26874
26968
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26875
26969
|
}, "listPlaces");
|
|
26876
26970
|
|
|
26877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26878
26972
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26879
26973
|
const { database } = context;
|
|
26880
26974
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26909,7 +27003,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26909
27003
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26910
27004
|
}), "mentionsStoreOver");
|
|
26911
27005
|
|
|
26912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26913
27007
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26914
27008
|
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");
|
|
26915
27009
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26924,7 +27018,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26924
27018
|
}));
|
|
26925
27019
|
}, "documentLinkMessages");
|
|
26926
27020
|
|
|
26927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26928
27022
|
var stemmerFor = stemmerCache();
|
|
26929
27023
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26930
27024
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -26968,7 +27062,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
26968
27062
|
});
|
|
26969
27063
|
}, "laterSharingRare");
|
|
26970
27064
|
|
|
26971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26972
27066
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26973
27067
|
const { database } = context;
|
|
26974
27068
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -27103,7 +27197,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27103
27197
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
27104
27198
|
}), "messagesStoreOver");
|
|
27105
27199
|
|
|
27106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
27107
27201
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
27108
27202
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
27109
27203
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -27160,7 +27254,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
27160
27254
|
});
|
|
27161
27255
|
}, "personPreparation");
|
|
27162
27256
|
|
|
27163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
27164
27258
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
27165
27259
|
const id2 = Number(uid);
|
|
27166
27260
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -27168,7 +27262,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
27168
27262
|
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)));
|
|
27169
27263
|
}, "personSeenInAccounts");
|
|
27170
27264
|
|
|
27171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
27172
27266
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
27173
27267
|
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);
|
|
27174
27268
|
if (!row2)
|
|
@@ -27234,7 +27328,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
27234
27328
|
return { id: id2, personId, removed: true };
|
|
27235
27329
|
}, "removeNote");
|
|
27236
27330
|
|
|
27237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
27238
27332
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
27239
27333
|
const { database } = context;
|
|
27240
27334
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -27319,13 +27413,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27319
27413
|
};
|
|
27320
27414
|
}, "peopleStoreOver");
|
|
27321
27415
|
|
|
27322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27323
27417
|
import { createHash as createHash8 } from "node:crypto";
|
|
27324
27418
|
|
|
27325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27326
27420
|
import { createHash as createHash7 } from "node:crypto";
|
|
27327
27421
|
|
|
27328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
27329
27423
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
27330
27424
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
27331
27425
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -27547,7 +27641,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
27547
27641
|
};
|
|
27548
27642
|
}, "rankReplyGraph");
|
|
27549
27643
|
|
|
27550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27551
27645
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
27552
27646
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
27553
27647
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27721,7 +27815,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27721
27815
|
return { items, evidence, summary, graph: graph.quality };
|
|
27722
27816
|
}, "calculateAdminStatistics");
|
|
27723
27817
|
|
|
27724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27725
27819
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27726
27820
|
const dates = [];
|
|
27727
27821
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27743,7 +27837,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27743
27837
|
return dates[0].node.resolution.date;
|
|
27744
27838
|
}, "rankingContextRange");
|
|
27745
27839
|
|
|
27746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27747
27841
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27748
27842
|
let counts;
|
|
27749
27843
|
try {
|
|
@@ -28038,7 +28132,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
28038
28132
|
});
|
|
28039
28133
|
}, "rankQuery");
|
|
28040
28134
|
|
|
28041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
28042
28136
|
function fail4(message2, reason = "query.too-large") {
|
|
28043
28137
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
28044
28138
|
}
|
|
@@ -28215,7 +28309,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
28215
28309
|
return result;
|
|
28216
28310
|
}), "adminStatisticsQuery");
|
|
28217
28311
|
|
|
28218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
28219
28313
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
28220
28314
|
if (!execution.accounts.length)
|
|
28221
28315
|
return { conversations: [], chats: [] };
|
|
@@ -28233,7 +28327,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
28233
28327
|
return { conversations: conversations2, chats: chats2 };
|
|
28234
28328
|
}, "conversationEligibility");
|
|
28235
28329
|
|
|
28236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
28237
28331
|
import { createHash as createHash9 } from "node:crypto";
|
|
28238
28332
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
28239
28333
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -28383,7 +28477,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
28383
28477
|
return result;
|
|
28384
28478
|
}, "rankingEvidence");
|
|
28385
28479
|
|
|
28386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
28387
28481
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
28388
28482
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
28389
28483
|
if (execution.corpus === "mail")
|
|
@@ -28402,7 +28496,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28402
28496
|
};
|
|
28403
28497
|
}, "queriesStoreOver");
|
|
28404
28498
|
|
|
28405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
28406
28500
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
28407
28501
|
const { database, now: now2 } = context;
|
|
28408
28502
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -28441,10 +28535,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
28441
28535
|
}));
|
|
28442
28536
|
}, "chatEventsOf");
|
|
28443
28537
|
|
|
28444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28445
28539
|
import { createHash as createHash10 } from "node:crypto";
|
|
28446
28540
|
|
|
28447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
28448
28542
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
28449
28543
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
28450
28544
|
timeZone: zone,
|
|
@@ -28459,7 +28553,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
28459
28553
|
};
|
|
28460
28554
|
}, "calendarKey");
|
|
28461
28555
|
|
|
28462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
28463
28557
|
var RETENTION_TOLERANCE = 864e5;
|
|
28464
28558
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
28465
28559
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -28513,7 +28607,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
28513
28607
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
28514
28608
|
}, "retentionCohorts");
|
|
28515
28609
|
|
|
28516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28517
28611
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
28518
28612
|
var week = /* @__PURE__ */ __name((day) => {
|
|
28519
28613
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -28649,7 +28743,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
28649
28743
|
};
|
|
28650
28744
|
}, "retentionQuery");
|
|
28651
28745
|
|
|
28652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
28653
28747
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
28654
28748
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
28655
28749
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28780,7 +28874,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28780
28874
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28781
28875
|
})), "trackedChats");
|
|
28782
28876
|
|
|
28783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28784
28878
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28785
28879
|
const { database } = context;
|
|
28786
28880
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28836,7 +28930,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28836
28930
|
};
|
|
28837
28931
|
}, "rosterStoreOver");
|
|
28838
28932
|
|
|
28839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28840
28934
|
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");
|
|
28841
28935
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28842
28936
|
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 ?`);
|
|
@@ -28860,7 +28954,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28860
28954
|
}
|
|
28861
28955
|
}, "backfillNormalized");
|
|
28862
28956
|
|
|
28863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28864
28958
|
var INDEX2 = "message_words";
|
|
28865
28959
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28866
28960
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28987,7 +29081,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28987
29081
|
});
|
|
28988
29082
|
}, "resetSearchIndex");
|
|
28989
29083
|
|
|
28990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28991
29085
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28992
29086
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28993
29087
|
const before2 = stemsState(database);
|
|
@@ -29082,7 +29176,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
29082
29176
|
return resetStems(database, { now: now2 });
|
|
29083
29177
|
}, "followDefaultStemmers");
|
|
29084
29178
|
|
|
29085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
29086
29180
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
29087
29181
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
29088
29182
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -29104,7 +29198,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
29104
29198
|
});
|
|
29105
29199
|
}, "termCandidates");
|
|
29106
29200
|
|
|
29107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
29108
29202
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29109
29203
|
const { database } = context;
|
|
29110
29204
|
const stemmerFor2 = stemmerCache();
|
|
@@ -29126,7 +29220,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29126
29220
|
};
|
|
29127
29221
|
}, "searchIndexStoreOver");
|
|
29128
29222
|
|
|
29129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
29130
29224
|
var HISTORY_KEPT = 1e3;
|
|
29131
29225
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
29132
29226
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -29195,7 +29289,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
29195
29289
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
29196
29290
|
}, "clearHistory");
|
|
29197
29291
|
|
|
29198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
29199
29293
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29200
29294
|
const { database } = context;
|
|
29201
29295
|
return {
|
|
@@ -29219,7 +29313,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29219
29313
|
};
|
|
29220
29314
|
}, "searchesStoreOver");
|
|
29221
29315
|
|
|
29222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
29223
29317
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
29224
29318
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
29225
29319
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -29262,7 +29356,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
29262
29356
|
};
|
|
29263
29357
|
}, "agentActionsStoreOver");
|
|
29264
29358
|
|
|
29265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
29266
29360
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
29267
29361
|
}) => {
|
|
29268
29362
|
const { database, now: now2 } = context;
|
|
@@ -29321,7 +29415,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
29321
29415
|
};
|
|
29322
29416
|
}, "botUpdateStoreOver");
|
|
29323
29417
|
|
|
29324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
29325
29419
|
var DAY4 = 864e5;
|
|
29326
29420
|
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
29327
29421
|
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
@@ -29416,7 +29510,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29416
29510
|
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);
|
|
29417
29511
|
}, "listEvents");
|
|
29418
29512
|
|
|
29419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
29420
29514
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
29421
29515
|
id: Number(row2.id),
|
|
29422
29516
|
accountId: Number(row2.account_id),
|
|
@@ -29996,7 +30090,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29996
30090
|
};
|
|
29997
30091
|
}, "eventStoreOver");
|
|
29998
30092
|
|
|
29999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
30000
30094
|
var CATALOG_QUERY = defineQuery({
|
|
30001
30095
|
entity: "document",
|
|
30002
30096
|
backend: "sql",
|
|
@@ -30238,7 +30332,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30238
30332
|
};
|
|
30239
30333
|
}, "catalogStoreOver");
|
|
30240
30334
|
|
|
30241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
30242
30336
|
import { createHash as createHash11 } from "node:crypto";
|
|
30243
30337
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
30244
30338
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -30336,7 +30430,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
30336
30430
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
30337
30431
|
}, "contextEvidenceRequest");
|
|
30338
30432
|
|
|
30339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
30340
30434
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
30341
30435
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
30342
30436
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -30349,7 +30443,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
30349
30443
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
30350
30444
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
30351
30445
|
|
|
30352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
30353
30447
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
30354
30448
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
30355
30449
|
signal?.throwIfAborted();
|
|
@@ -30448,7 +30542,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
30448
30542
|
});
|
|
30449
30543
|
}, "readMeetingContextEvidence");
|
|
30450
30544
|
|
|
30451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
30452
30546
|
var corpora = {
|
|
30453
30547
|
message: {
|
|
30454
30548
|
table: "messages",
|
|
@@ -30687,7 +30781,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30687
30781
|
}
|
|
30688
30782
|
}), "contextRecordsOver");
|
|
30689
30783
|
|
|
30690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
30691
30785
|
var NOTE_FIELDS = [
|
|
30692
30786
|
"text",
|
|
30693
30787
|
"exact",
|
|
@@ -31117,7 +31211,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31117
31211
|
};
|
|
31118
31212
|
}, "noteSearchOver");
|
|
31119
31213
|
|
|
31120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
31121
31215
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
31122
31216
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
31123
31217
|
var EVENT_CORPUS = {
|
|
@@ -31249,7 +31343,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31249
31343
|
};
|
|
31250
31344
|
}, "eventSearchOver");
|
|
31251
31345
|
|
|
31252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31253
31347
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31254
31348
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31255
31349
|
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
@@ -31268,7 +31362,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFinding
|
|
|
31268
31362
|
anySubject: true
|
|
31269
31363
|
}), "validateEvidenceFindings");
|
|
31270
31364
|
|
|
31271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
31272
31366
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
31273
31367
|
try {
|
|
31274
31368
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -31280,7 +31374,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
31280
31374
|
}
|
|
31281
31375
|
}, "calendarMoment");
|
|
31282
31376
|
|
|
31283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
31284
31378
|
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";
|
|
31285
31379
|
var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31286
31380
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31429,7 +31523,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31429
31523
|
};
|
|
31430
31524
|
}, "factsStoreOver");
|
|
31431
31525
|
|
|
31432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
31433
31527
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
31434
31528
|
throw new CliError("validation_error", message2);
|
|
31435
31529
|
}, "invalid");
|
|
@@ -31528,7 +31622,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31528
31622
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
31529
31623
|
}, "findingsCoreOver");
|
|
31530
31624
|
|
|
31531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31532
31626
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31533
31627
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31534
31628
|
var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31675,7 +31769,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31675
31769
|
};
|
|
31676
31770
|
}, "proposedActionsStoreOver");
|
|
31677
31771
|
|
|
31678
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
31679
31773
|
var stale = /* @__PURE__ */ __name(() => {
|
|
31680
31774
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
31681
31775
|
reason: "evidence-findings.stale"
|
|
@@ -31847,7 +31941,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31847
31941
|
};
|
|
31848
31942
|
}, "evidenceFindingsStoreOver");
|
|
31849
31943
|
|
|
31850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31851
31945
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31852
31946
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31853
31947
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31900,7 +31994,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31900
31994
|
}, "forPerson")
|
|
31901
31995
|
}), "involvementStoreOver");
|
|
31902
31996
|
|
|
31903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31904
31998
|
import { createHash as createHash12 } from "node:crypto";
|
|
31905
31999
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31906
32000
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31986,16 +32080,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31986
32080
|
};
|
|
31987
32081
|
}, "meetingProjectsStoreOver");
|
|
31988
32082
|
|
|
31989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31990
32084
|
import { createHash as createHash15 } from "node:crypto";
|
|
31991
32085
|
|
|
31992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31993
32087
|
import { createHash as createHash14 } from "node:crypto";
|
|
31994
32088
|
|
|
31995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31996
32090
|
import { createHash as createHash13 } from "node:crypto";
|
|
31997
32091
|
|
|
31998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31999
32093
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
32000
32094
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
32001
32095
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -32046,7 +32140,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
32046
32140
|
return input;
|
|
32047
32141
|
}, "consolidationApplyInput");
|
|
32048
32142
|
|
|
32049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
32050
32144
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
32051
32145
|
id: String(row2.id),
|
|
32052
32146
|
sourceId: String(row2.source_id),
|
|
@@ -32121,7 +32215,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
32121
32215
|
}, { beforeCommit: check3 });
|
|
32122
32216
|
}, "applyTagConsolidation");
|
|
32123
32217
|
|
|
32124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
32125
32219
|
var selections = [
|
|
32126
32220
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
32127
32221
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -32265,7 +32359,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
32265
32359
|
};
|
|
32266
32360
|
}, "previewRows");
|
|
32267
32361
|
|
|
32268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32269
32363
|
var kinds = ["project", "tag", "topic"];
|
|
32270
32364
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
32271
32365
|
if (signal?.aborted)
|
|
@@ -32529,7 +32623,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32529
32623
|
};
|
|
32530
32624
|
}, "vocabularyStoreOver");
|
|
32531
32625
|
|
|
32532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
32533
32627
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
32534
32628
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
32535
32629
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -33051,7 +33145,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
33051
33145
|
return key2.padEnd(3, "X");
|
|
33052
33146
|
}, "projectKey");
|
|
33053
33147
|
|
|
33054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
33055
33149
|
var DAY5 = 864e5;
|
|
33056
33150
|
var SETTING4 = "logs_pruned_at";
|
|
33057
33151
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -33078,7 +33172,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
33078
33172
|
};
|
|
33079
33173
|
}, "logPruner");
|
|
33080
33174
|
|
|
33081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
33082
33176
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
33083
33177
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
33084
33178
|
reason: "meeting-findings.stale"
|
|
@@ -33247,7 +33341,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33247
33341
|
};
|
|
33248
33342
|
}, "meetingFindingsStoreOver");
|
|
33249
33343
|
|
|
33250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
33251
33345
|
var RANK_BATCH = 512;
|
|
33252
33346
|
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";
|
|
33253
33347
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -33518,7 +33612,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
33518
33612
|
}
|
|
33519
33613
|
}), "meetingVectorsOver");
|
|
33520
33614
|
|
|
33521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
33522
33616
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
33523
33617
|
var TEXTS = {
|
|
33524
33618
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -33619,11 +33713,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33619
33713
|
};
|
|
33620
33714
|
}, "sourceMentionStoreOver");
|
|
33621
33715
|
|
|
33622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33623
33717
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
33624
33718
|
import { dirname } from "node:path";
|
|
33625
33719
|
|
|
33626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
33627
33721
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
33628
33722
|
var CLIENTS_SETTING = "clients";
|
|
33629
33723
|
var coreVersion = (() => {
|
|
@@ -33681,7 +33775,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
33681
33775
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
33682
33776
|
}, "refusalAdvice");
|
|
33683
33777
|
|
|
33684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
33685
33779
|
var GENERATED = [
|
|
33686
33780
|
{
|
|
33687
33781
|
"name": "20261010184427_initial",
|
|
@@ -34577,7 +34671,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
34577
34671
|
}
|
|
34578
34672
|
];
|
|
34579
34673
|
|
|
34580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
34581
34675
|
var MANIFEST = [
|
|
34582
34676
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
34583
34677
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -34658,7 +34752,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
34658
34752
|
return migrations;
|
|
34659
34753
|
}, "generatedMigrations");
|
|
34660
34754
|
|
|
34661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
34662
34756
|
var MIGRATIONS = generatedMigrations();
|
|
34663
34757
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
34664
34758
|
version INTEGER PRIMARY KEY,
|
|
@@ -34711,7 +34805,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
34711
34805
|
}
|
|
34712
34806
|
}, "migrate");
|
|
34713
34807
|
|
|
34714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
34715
34809
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
34716
34810
|
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 ?");
|
|
34717
34811
|
if (pending.get(0, 1) === void 0)
|
|
@@ -34733,7 +34827,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
34733
34827
|
}
|
|
34734
34828
|
}, "fillJoinKeys");
|
|
34735
34829
|
|
|
34736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
34737
34831
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
34738
34832
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
34739
34833
|
try {
|
|
@@ -34746,8 +34840,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
34746
34840
|
}, "openSqlite");
|
|
34747
34841
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34748
34842
|
quietSqliteWarning();
|
|
34749
|
-
const { drizzle } = await import("./node-
|
|
34750
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
34843
|
+
const { drizzle } = await import("./node-5Z7PS4F5.js");
|
|
34844
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-OAW7APIX.js");
|
|
34751
34845
|
const client = await nodeClient(path, { readOnly });
|
|
34752
34846
|
try {
|
|
34753
34847
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34757,8 +34851,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34757
34851
|
}
|
|
34758
34852
|
}, "openUnderNode");
|
|
34759
34853
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34760
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
34761
|
-
const { drizzle } = await import("./bun-
|
|
34854
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-DGXFNFHI.js");
|
|
34855
|
+
const { drizzle } = await import("./bun-ORL67CJ6.js");
|
|
34762
34856
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
34763
34857
|
try {
|
|
34764
34858
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34768,7 +34862,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34768
34862
|
}
|
|
34769
34863
|
}, "openUnderBun");
|
|
34770
34864
|
|
|
34771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
34772
34866
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
34773
34867
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
34774
34868
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -34783,7 +34877,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
34783
34877
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
34784
34878
|
}, "assertReadCompatible");
|
|
34785
34879
|
|
|
34786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
34787
34881
|
var BACKFILL_ON_OPEN = 5e3;
|
|
34788
34882
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
34789
34883
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34839,13 +34933,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34839
34933
|
}
|
|
34840
34934
|
}, "openStoreContext");
|
|
34841
34935
|
|
|
34842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34843
34937
|
import { createHash as createHash17 } from "node:crypto";
|
|
34844
34938
|
|
|
34845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34846
34940
|
import { createHash as createHash16 } from "node:crypto";
|
|
34847
34941
|
|
|
34848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34849
34943
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34850
34944
|
var ref = text3(2048);
|
|
34851
34945
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34911,7 +35005,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34911
35005
|
}))
|
|
34912
35006
|
});
|
|
34913
35007
|
|
|
34914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34915
35009
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34916
35010
|
var invalid5 = /* @__PURE__ */ __name((field4) => {
|
|
34917
35011
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -35044,7 +35138,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
35044
35138
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
35045
35139
|
}, "projectAnnotationsFingerprint");
|
|
35046
35140
|
|
|
35047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
35048
35142
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
35049
35143
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
35050
35144
|
var targetSchema = strictObject({
|
|
@@ -35151,7 +35245,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
35151
35245
|
}, "planBoundProjectAnnotations");
|
|
35152
35246
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
35153
35247
|
|
|
35154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
35155
35249
|
import { createHash as createHash18 } from "node:crypto";
|
|
35156
35250
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
35157
35251
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -35245,7 +35339,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
35245
35339
|
})).digest("hex");
|
|
35246
35340
|
}, "projectAnnotationSnapshotFingerprint");
|
|
35247
35341
|
|
|
35248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
35249
35343
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
35250
35344
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
35251
35345
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -35262,7 +35356,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
35262
35356
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
35263
35357
|
}, "projectAnnotationRequest");
|
|
35264
35358
|
|
|
35265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
35266
35360
|
var SnapshotBudget = class {
|
|
35267
35361
|
static {
|
|
35268
35362
|
__name(this, "SnapshotBudget");
|
|
@@ -35288,13 +35382,13 @@ var SnapshotBudget = class {
|
|
|
35288
35382
|
}
|
|
35289
35383
|
};
|
|
35290
35384
|
|
|
35291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35292
35386
|
import { createHash as createHash20 } from "node:crypto";
|
|
35293
35387
|
|
|
35294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
35295
35389
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
35296
35390
|
|
|
35297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
35298
35392
|
import { createHash as createHash19 } from "node:crypto";
|
|
35299
35393
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
35300
35394
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -35437,7 +35531,7 @@ var ProjectSnapshotSources = class {
|
|
|
35437
35531
|
}
|
|
35438
35532
|
};
|
|
35439
35533
|
|
|
35440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
35441
35535
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
35442
35536
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
35443
35537
|
}, "unsupported");
|
|
@@ -35608,7 +35702,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
35608
35702
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
35609
35703
|
}), "projectAnnotationSnapshot");
|
|
35610
35704
|
|
|
35611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35612
35706
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
35613
35707
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
35614
35708
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -35670,7 +35764,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
35670
35764
|
};
|
|
35671
35765
|
}), "previewAnnotationSnapshot");
|
|
35672
35766
|
|
|
35673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
35674
35768
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
35675
35769
|
const mappings = { ...bindings };
|
|
35676
35770
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -35712,7 +35806,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
35712
35806
|
return mappings;
|
|
35713
35807
|
}, "restoreAnnotationRecords");
|
|
35714
35808
|
|
|
35715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
35716
35810
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35717
35811
|
async preview(request) {
|
|
35718
35812
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -35742,7 +35836,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35742
35836
|
}
|
|
35743
35837
|
}), "projectAnnotationStoreOver");
|
|
35744
35838
|
|
|
35745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
35746
35840
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
35747
35841
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
35748
35842
|
let merged = { from: from2, to };
|
|
@@ -35755,7 +35849,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
35755
35849
|
}, "markRange");
|
|
35756
35850
|
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");
|
|
35757
35851
|
|
|
35758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
35759
35853
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
35760
35854
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
35761
35855
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -35765,7 +35859,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
35765
35859
|
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);
|
|
35766
35860
|
}, "setTaskRulesStop");
|
|
35767
35861
|
|
|
35768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
35769
35863
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35770
35864
|
const { database } = context;
|
|
35771
35865
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -35821,7 +35915,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35821
35915
|
};
|
|
35822
35916
|
}, "syncStoreOver");
|
|
35823
35917
|
|
|
35824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
35825
35919
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35826
35920
|
const { database } = context;
|
|
35827
35921
|
return {
|
|
@@ -35843,7 +35937,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35843
35937
|
};
|
|
35844
35938
|
}, "tagsStoreOver");
|
|
35845
35939
|
|
|
35846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35847
35941
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35848
35942
|
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
|
|
35849
35943
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35970,7 +36064,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35970
36064
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35971
36065
|
}, "savePictureChunks");
|
|
35972
36066
|
|
|
35973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35974
36068
|
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,
|
|
35975
36069
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35976
36070
|
FROM messages m
|
|
@@ -36059,7 +36153,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
36059
36153
|
return plain2(best(found2));
|
|
36060
36154
|
}, "nearestMessages");
|
|
36061
36155
|
|
|
36062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
36063
36157
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
36064
36158
|
const { database } = context;
|
|
36065
36159
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -36317,7 +36411,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
36317
36411
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
36318
36412
|
}), "vectorsStoreOver");
|
|
36319
36413
|
|
|
36320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
36321
36415
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
36322
36416
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
36323
36417
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -36405,10 +36499,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
36405
36499
|
}
|
|
36406
36500
|
}, "lastBackup");
|
|
36407
36501
|
|
|
36408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
36409
36503
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
36410
36504
|
|
|
36411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
36412
36506
|
var COUNTED_TABLES = [
|
|
36413
36507
|
"accounts",
|
|
36414
36508
|
"chats",
|
|
@@ -36493,7 +36587,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
36493
36587
|
};
|
|
36494
36588
|
}, "storeContents");
|
|
36495
36589
|
|
|
36496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
36497
36591
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
36498
36592
|
const context = await openStoreContext(options);
|
|
36499
36593
|
try {
|
|
@@ -36682,6 +36776,7 @@ export {
|
|
|
36682
36776
|
contextSource,
|
|
36683
36777
|
contextEvidenceRequest,
|
|
36684
36778
|
NOT_FILES,
|
|
36779
|
+
hitFiles,
|
|
36685
36780
|
matchDownloads,
|
|
36686
36781
|
normalizeVocabularyName,
|
|
36687
36782
|
calendarMoment,
|