@wirecat/mail-cli 0.5.0 → 0.6.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 +107 -0
- package/README.md +41 -10
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GR5JXYEQ.js → all-profiles-GBFTKUHA.js} +9 -9
- package/dist/bundle/{anthropic-REBXE65F.js → anthropic-PTSCWUG6.js} +6 -6
- package/dist/bundle/{app-server-QJ7ICQXZ.js → app-server-5VJ2WCKJ.js} +46 -46
- package/dist/bundle/{bun-WAX4QHW5.js → bun-2KRUBPIN.js} +2 -2
- package/dist/bundle/{bun-sqlite-5S7TQ4SG.js → bun-sqlite-ELSRSJBM.js} +5 -5
- package/dist/bundle/{chunk-5CXAH4Y6.js → chunk-3KY7DA5A.js} +428 -434
- package/dist/bundle/{chunk-7JCRQX56.js → chunk-4PKHZQIM.js} +8 -8
- package/dist/bundle/{chunk-QXOSGGKS.js → chunk-56PI2BRH.js} +1 -1
- package/dist/bundle/{chunk-LFRHIXCF.js → chunk-5AQKM47C.js} +3 -3
- package/dist/bundle/{chunk-S677WGOQ.js → chunk-5KHJUYHQ.js} +8 -8
- package/dist/bundle/{chunk-IBYTYIYO.js → chunk-6MV2TBDB.js} +57 -54
- package/dist/bundle/{chunk-M6BDHZON.js → chunk-AGX7NR3S.js} +26 -13
- package/dist/bundle/{chunk-ZD3WUGR2.js → chunk-B337KHJ5.js} +4 -4
- package/dist/bundle/{chunk-5BVIWP3S.js → chunk-BM445GYF.js} +2 -2
- package/dist/bundle/{chunk-WNI5BZFB.js → chunk-BVIHT7KR.js} +9 -9
- package/dist/bundle/{chunk-6EO7GVYJ.js → chunk-DA46WQEA.js} +1 -1
- package/dist/bundle/{chunk-2MRECWJZ.js → chunk-DV4RSEAH.js} +6 -6
- package/dist/bundle/{chunk-ESNNQA7D.js → chunk-ES4PWHBJ.js} +28 -28
- package/dist/bundle/{chunk-KIDF77MA.js → chunk-FIQOBLHS.js} +1 -1
- package/dist/bundle/{chunk-TI6VBZKJ.js → chunk-FUB3X25H.js} +4 -4
- package/dist/bundle/{chunk-EL554DV2.js → chunk-H4VFIH5W.js} +3 -3
- package/dist/bundle/{chunk-7A7BHABA.js → chunk-J4C32YKH.js} +1 -1
- package/dist/bundle/{chunk-MMDCL42A.js → chunk-J5MYH4L5.js} +12 -6
- package/dist/bundle/{chunk-FSUNGHRI.js → chunk-JFJTDL22.js} +47 -46
- package/dist/bundle/{chunk-SWJAG5IE.js → chunk-JIQAFFPV.js} +2 -2
- package/dist/bundle/{chunk-2U4IANVV.js → chunk-JKA2AICL.js} +2 -2
- package/dist/bundle/{dist-KJOAJ6NF.js → chunk-JKLQHPED.js} +16 -116
- package/dist/bundle/{chunk-J3QXTBD2.js → chunk-JLRMSNPX.js} +18 -18
- package/dist/bundle/{chunk-4BMNP2FT.js → chunk-K5JUROGN.js} +1 -1
- package/dist/bundle/{chunk-7F3NDIYL.js → chunk-KUQYWIVR.js} +6 -6
- package/dist/bundle/{chunk-DXDQOZ2P.js → chunk-LWTG5UOF.js} +2 -2
- package/dist/bundle/{chunk-YKPBC3NL.js → chunk-M7V3GSJQ.js} +1 -1
- package/dist/bundle/chunk-MD2J3POF.js +52 -0
- package/dist/bundle/{chunk-MQUJEQTU.js → chunk-NCWO2FNC.js} +2 -2
- package/dist/bundle/{chunk-BLS5YG77.js → chunk-NOU6MWEM.js} +2 -2
- package/dist/bundle/{chunk-LQ37ALDJ.js → chunk-NXJLC2WK.js} +8 -8
- package/dist/bundle/{chunk-F3NYA4KN.js → chunk-NZB4WGQS.js} +6 -6
- package/dist/bundle/{chunk-2FXVBCA3.js → chunk-O555ZEQR.js} +4 -4
- package/dist/bundle/{chunk-7XNPSIWD.js → chunk-O7VK7CJX.js} +2 -2
- package/dist/bundle/{chunk-JJBQPA7D.js → chunk-OHV5RDFE.js} +4 -4
- package/dist/bundle/{chunk-BFJV4FWJ.js → chunk-P5B7IFOG.js} +2 -2
- package/dist/bundle/{chunk-5INWLYBD.js → chunk-PBYDT3CG.js} +13 -3
- package/dist/bundle/{chunk-AFCGOZR7.js → chunk-PHPC72DP.js} +7 -7
- package/dist/bundle/{chunk-B5WSIWY5.js → chunk-PKU6V4EQ.js} +17 -17
- package/dist/bundle/{chunk-P7P5MNAU.js → chunk-QZBT6BOU.js} +1 -1
- package/dist/bundle/{chunk-EB3R2PV3.js → chunk-RAZOSYEO.js} +23 -23
- package/dist/bundle/{chunk-IWDOGGMY.js → chunk-RDSAI6DC.js} +398 -293
- package/dist/bundle/{chunk-PJCTWPJB.js → chunk-SAZJDKEI.js} +8 -8
- package/dist/bundle/{chunk-QX7RCLRS.js → chunk-SQLCCKEL.js} +1 -1
- package/dist/bundle/{chunk-VXAZZGXE.js → chunk-TKJDGAHT.js} +23 -23
- package/dist/bundle/{chunk-6TY3DGCC.js → chunk-TPNC5VCJ.js} +4 -4
- package/dist/bundle/{chunk-6GE3EADU.js → chunk-UAXBLHZK.js} +2 -2
- package/dist/bundle/{chunk-SQ7KOBRA.js → chunk-VEAP5RVI.js} +10 -8
- package/dist/bundle/{chunk-2YQNBIDQ.js → chunk-VF24ZAPX.js} +4 -4
- package/dist/bundle/{chunk-LNS27BTB.js → chunk-WCL3WBH5.js} +3 -3
- package/dist/bundle/{chunk-4XJ4AM3K.js → chunk-WGK4AIRL.js} +12 -12
- package/dist/bundle/{chunk-VDAIJM5L.js → chunk-XERTHQ6D.js} +88 -34
- package/dist/bundle/{chunk-YRGBZZUW.js → chunk-XZGLY2LU.js} +14 -14
- package/dist/bundle/{chunk-WNCCYHRV.js → chunk-Y7JKWQC2.js} +96 -94
- package/dist/bundle/{chunk-LOA4X6JW.js → chunk-YBJMBPL7.js} +6 -6
- package/dist/bundle/{chunk-5FK6RD4M.js → chunk-ZMMIIBTM.js} +73 -57
- package/dist/bundle/{chunk-HCMUGUAG.js → chunk-ZPGLWMNH.js} +3 -3
- package/dist/bundle/{chunk-CEAANMJ2.js → chunk-ZRYFEEXZ.js} +3 -3
- package/dist/bundle/command-contract-NZF4B5OR.js +34 -0
- package/dist/bundle/{decode-D7BDVIVB.js → decode-HVXDCQ63.js} +5 -5
- package/dist/bundle/{dispatch-EUKKT3PD.js → dispatch-GDAH4JHS.js} +8 -8
- package/dist/bundle/dist-43DZXMBL.js +134 -0
- package/dist/bundle/{echarts-IVRX7XHP.js → echarts-LZ74IXHG.js} +2 -2
- package/dist/bundle/{embed-X527RBTG.js → embed-OQF5U2C6.js} +6 -6
- package/dist/bundle/{embedder-F4PSJS6S.js → embedder-OCWQAWKO.js} +9 -9
- package/dist/bundle/{failure-OAIC5VAP.js → failure-6COJAO7T.js} +2 -2
- package/dist/bundle/{first-run-M5CIX6NA.js → first-run-MTZPUPGA.js} +11 -11
- package/dist/bundle/first-screen-4PBS6QK5.js +32 -0
- package/dist/bundle/{instructions-UX36BT5F.js → instructions-M6F4FP7U.js} +1 -1
- package/dist/bundle/mail.js +12 -11
- package/dist/bundle/{mcp-L7SRVDRN.js → mcp-GAPDLFWA.js} +2 -2
- package/dist/bundle/{node-OXT7WE2T.js → node-NYBBFHGN.js} +2 -2
- package/dist/bundle/{node-sqlite-X2PSEHA4.js → node-sqlite-CWCNWO75.js} +5 -5
- package/dist/bundle/{oauth-MYK4BSYN.js → oauth-DVX45EME.js} +7 -7
- package/dist/bundle/{open-GONIP2DH.js → open-M7EQWWHL.js} +4 -4
- package/dist/bundle/{openai-YJFNUOQT.js → openai-63KRU5H2.js} +14 -14
- package/dist/bundle/{process-7IEUUSRK.js → process-DV5GQIGM.js} +1 -1
- package/dist/bundle/{program-Q73TTG3E.js → program-EPR3QCMX.js} +20562 -7617
- package/dist/bundle/{prompt-SKQ72KN7.js → prompt-EPWPWTB3.js} +5 -5
- package/dist/bundle/{recognize-GC7CU2DB.js → recognize-R46KDXK4.js} +4 -4
- package/dist/bundle/{remote-UEXFZP2I.js → remote-RENCYB5X.js} +7 -7
- package/dist/bundle/{rerank-2U2NDEZP.js → rerank-VHPC5O73.js} +7 -7
- package/dist/bundle/{serve-OOGKFEWL.js → serve-KCH3ORYO.js} +9 -9
- package/dist/bundle/server-FMCPE2ZK.js +63 -0
- package/dist/bundle/{server-FZ3LFQTF.js → server-HZVXSK7B.js} +38 -38
- package/dist/bundle/{sqlite-runtime-GIQSW6LJ.js → sqlite-runtime-XP7ZJCKJ.js} +5 -5
- package/dist/bundle/{state-EMFXPQVZ.js → state-GQ4MEQJ5.js} +6 -6
- package/dist/bundle/{store-LDI62AUG.js → store-CQNLNINW.js} +13 -13
- package/dist/bundle/{store-BDU4UPNK.js → store-WT7YTR3Y.js} +15 -15
- package/dist/bundle/store-maintenance-command-YYR42IT4.js +52 -0
- package/dist/commands/attachments.d.ts +3 -0
- package/dist/commands/attachments.d.ts.map +1 -0
- package/dist/commands/attachments.js +97 -0
- package/dist/commands/attachments.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +11 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/drafts-send.d.ts +7 -0
- package/dist/commands/drafts-send.d.ts.map +1 -0
- package/dist/commands/drafts-send.js +58 -0
- package/dist/commands/drafts-send.js.map +1 -0
- package/dist/commands/drafts.d.ts +3 -0
- package/dist/commands/drafts.d.ts.map +1 -0
- package/dist/commands/drafts.js +239 -0
- package/dist/commands/drafts.js.map +1 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +275 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +120 -2
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/messages.d.ts +25 -0
- package/dist/commands/messages.d.ts.map +1 -0
- package/dist/commands/messages.js +502 -0
- package/dist/commands/messages.js.map +1 -0
- package/dist/commands/read.d.ts +4 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +12 -2
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.d.ts.map +1 -0
- package/dist/commands/rules.js +292 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/commands/send.d.ts +39 -0
- package/dist/commands/send.d.ts.map +1 -0
- package/dist/commands/send.js +309 -0
- package/dist/commands/send.js.map +1 -0
- package/dist/commands/server-search.d.ts +8 -0
- package/dist/commands/server-search.d.ts.map +1 -0
- package/dist/commands/server-search.js +38 -0
- package/dist/commands/server-search.js.map +1 -0
- package/dist/commands/stats.d.ts +3 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +90 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/sync.d.ts +7 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +22 -7
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tags.d.ts +3 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +144 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +47 -1
- package/dist/config.js.map +1 -1
- package/dist/export/format.d.ts +19 -0
- package/dist/export/format.d.ts.map +1 -0
- package/dist/export/format.js +40 -0
- package/dist/export/format.js.map +1 -0
- package/dist/export/journal.d.ts +32 -0
- package/dist/export/journal.d.ts.map +1 -0
- package/dist/export/journal.js +84 -0
- package/dist/export/journal.js.map +1 -0
- package/dist/export/write.d.ts +14 -0
- package/dist/export/write.d.ts.map +1 -0
- package/dist/export/write.js +42 -0
- package/dist/export/write.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +3 -0
- package/dist/identity.js.map +1 -1
- package/dist/mail/backend.d.ts +81 -1
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/changes.d.ts +91 -0
- package/dist/mail/changes.d.ts.map +1 -0
- package/dist/mail/changes.js +198 -0
- package/dist/mail/changes.js.map +1 -0
- package/dist/mail/cleanup.d.ts +41 -0
- package/dist/mail/cleanup.d.ts.map +1 -0
- package/dist/mail/cleanup.js +119 -0
- package/dist/mail/cleanup.js.map +1 -0
- package/dist/mail/compose.d.ts +73 -0
- package/dist/mail/compose.d.ts.map +1 -0
- package/dist/mail/compose.js +122 -0
- package/dist/mail/compose.js.map +1 -0
- package/dist/mail/doctor.d.ts +25 -0
- package/dist/mail/doctor.d.ts.map +1 -0
- package/dist/mail/doctor.js +39 -0
- package/dist/mail/doctor.js.map +1 -0
- package/dist/mail/drafts.d.ts +54 -0
- package/dist/mail/drafts.d.ts.map +1 -0
- package/dist/mail/drafts.js +104 -0
- package/dist/mail/drafts.js.map +1 -0
- package/dist/mail/imap/connection.d.ts +7 -0
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +24 -2
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +1 -1
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +12 -2
- package/dist/mail/imap/index.js.map +1 -1
- package/dist/mail/imap/messages.d.ts +5 -6
- package/dist/mail/imap/messages.d.ts.map +1 -1
- package/dist/mail/imap/messages.js +14 -28
- package/dist/mail/imap/messages.js.map +1 -1
- package/dist/mail/imap/read.d.ts.map +1 -1
- package/dist/mail/imap/read.js +27 -13
- package/dist/mail/imap/read.js.map +1 -1
- package/dist/mail/imap/search.d.ts +14 -0
- package/dist/mail/imap/search.d.ts.map +1 -0
- package/dist/mail/imap/search.js +49 -0
- package/dist/mail/imap/search.js.map +1 -0
- package/dist/mail/imap/write.d.ts +5 -0
- package/dist/mail/imap/write.d.ts.map +1 -0
- package/dist/mail/imap/write.js +93 -0
- package/dist/mail/imap/write.js.map +1 -0
- package/dist/mail/organise.d.ts +116 -0
- package/dist/mail/organise.d.ts.map +1 -0
- package/dist/mail/organise.js +531 -0
- package/dist/mail/organise.js.map +1 -0
- package/dist/mail/rethread.d.ts +1 -2
- package/dist/mail/rethread.d.ts.map +1 -1
- package/dist/mail/rethread.js +8 -3
- package/dist/mail/rethread.js.map +1 -1
- package/dist/mail/rules/apply.d.ts +40 -0
- package/dist/mail/rules/apply.d.ts.map +1 -0
- package/dist/mail/rules/apply.js +114 -0
- package/dist/mail/rules/apply.js.map +1 -0
- package/dist/mail/rules/file.d.ts +9 -0
- package/dist/mail/rules/file.d.ts.map +1 -0
- package/dist/mail/rules/file.js +51 -0
- package/dist/mail/rules/file.js.map +1 -0
- package/dist/mail/rules/filters.d.ts +11 -0
- package/dist/mail/rules/filters.d.ts.map +1 -0
- package/dist/mail/rules/filters.js +150 -0
- package/dist/mail/rules/filters.js.map +1 -0
- package/dist/mail/rules/folders.d.ts +11 -0
- package/dist/mail/rules/folders.d.ts.map +1 -0
- package/dist/mail/rules/folders.js +17 -0
- package/dist/mail/rules/folders.js.map +1 -0
- package/dist/mail/rules/query.d.ts +15 -0
- package/dist/mail/rules/query.d.ts.map +1 -0
- package/dist/mail/rules/query.js +103 -0
- package/dist/mail/rules/query.js.map +1 -0
- package/dist/mail/rules/store.d.ts +9 -0
- package/dist/mail/rules/store.d.ts.map +1 -0
- package/dist/mail/rules/store.js +17 -0
- package/dist/mail/rules/store.js.map +1 -0
- package/dist/mail/save.d.ts +12 -0
- package/dist/mail/save.d.ts.map +1 -0
- package/dist/mail/save.js +71 -0
- package/dist/mail/save.js.map +1 -0
- package/dist/mail/send.d.ts +67 -0
- package/dist/mail/send.d.ts.map +1 -0
- package/dist/mail/send.js +172 -0
- package/dist/mail/send.js.map +1 -0
- package/dist/mail/smtp.d.ts +4 -0
- package/dist/mail/smtp.d.ts.map +1 -0
- package/dist/mail/smtp.js +97 -0
- package/dist/mail/smtp.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +26 -4
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +71 -6
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +38 -9
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts +9 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +21 -0
- package/dist/reasons.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -5
- package/skills/mail-cli/SKILL.md +30 -3
- package/dist/bundle/chunk-YD5WV757.js +0 -27
- package/dist/bundle/command-contract-GPUED3GT.js +0 -34
- package/dist/bundle/first-screen-M7MT776O.js +0 -32
- package/dist/bundle/server-4JMHDHZ7.js +0 -63
- package/dist/bundle/store-maintenance-command-OFRPORN2.js +0 -52
- /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-WJWLHLQ7.js} +0 -0
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
rankingWords,
|
|
32
32
|
useStoredProviders,
|
|
33
33
|
validCounter
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KUQYWIVR.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-VEAP5RVI.js";
|
|
58
58
|
import {
|
|
59
59
|
CHAT_MESSAGES_READ,
|
|
60
60
|
MEETING_FINDINGS_KIND,
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
calendarText,
|
|
67
67
|
canonicalMeetingReference,
|
|
68
68
|
dateRange,
|
|
69
|
+
dayBoundary,
|
|
69
70
|
defineQuery,
|
|
70
71
|
entryInWindow,
|
|
71
72
|
entryMetadata,
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
validateQuery,
|
|
94
95
|
walkQuery,
|
|
95
96
|
zonedMoment
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-ZMMIIBTM.js";
|
|
97
98
|
import {
|
|
98
99
|
DEFAULT_STEMMERS,
|
|
99
100
|
DEFAULT_STEMMERS_VERSION,
|
|
@@ -106,18 +107,18 @@ import {
|
|
|
106
107
|
fold,
|
|
107
108
|
normalize,
|
|
108
109
|
parseStemmers
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-4PKHZQIM.js";
|
|
110
111
|
import {
|
|
111
112
|
DEFAULT_TASK_CATEGORIES,
|
|
112
113
|
sharedConfigPath,
|
|
113
114
|
storedTaskCategories,
|
|
114
115
|
taskCategoriesReader
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-YBJMBPL7.js";
|
|
116
117
|
import {
|
|
117
118
|
PRAGMAS,
|
|
118
119
|
quietSqliteWarning,
|
|
119
120
|
storeCapable
|
|
120
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-DV4RSEAH.js";
|
|
121
122
|
import {
|
|
122
123
|
SQLiteTable,
|
|
123
124
|
TableAliasProxyHandler,
|
|
@@ -142,10 +143,10 @@ import {
|
|
|
142
143
|
sql,
|
|
143
144
|
sqliteTable,
|
|
144
145
|
text
|
|
145
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-FIQOBLHS.js";
|
|
146
147
|
import {
|
|
147
148
|
storePath
|
|
148
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-JIQAFFPV.js";
|
|
149
150
|
import {
|
|
150
151
|
array,
|
|
151
152
|
boolean,
|
|
@@ -162,19 +163,19 @@ import {
|
|
|
162
163
|
safeParse,
|
|
163
164
|
strictObject,
|
|
164
165
|
string
|
|
165
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-NXJLC2WK.js";
|
|
166
167
|
import {
|
|
167
168
|
resolveFrom
|
|
168
169
|
} from "./chunk-Y5E2WNWB.js";
|
|
169
170
|
import {
|
|
170
171
|
CliError,
|
|
171
172
|
singleLine
|
|
172
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-BM445GYF.js";
|
|
173
174
|
import {
|
|
174
175
|
__name
|
|
175
176
|
} from "./chunk-ZVVMGPBJ.js";
|
|
176
177
|
|
|
177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
178
179
|
var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
|
|
179
180
|
const methods = whole;
|
|
180
181
|
return Object.fromEntries(Object.keys(keyed).map((name) => [
|
|
@@ -302,7 +303,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
|
|
|
302
303
|
};
|
|
303
304
|
}, "bindAccount");
|
|
304
305
|
|
|
305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
306
307
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
307
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");
|
|
308
309
|
var fail = /* @__PURE__ */ __name((message2) => {
|
|
@@ -325,7 +326,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
325
326
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
326
327
|
}, "sourceOf");
|
|
327
328
|
|
|
328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
329
330
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
330
331
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
331
332
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -512,7 +513,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf = (kind3)
|
|
|
512
513
|
return { accounts: [...chosen.values()], skipped };
|
|
513
514
|
}, "fitting");
|
|
514
515
|
|
|
515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
516
517
|
var IndexBuilderOn = class {
|
|
517
518
|
static {
|
|
518
519
|
__name(this, "IndexBuilderOn");
|
|
@@ -707,7 +708,7 @@ function alias(table, alias2) {
|
|
|
707
708
|
}
|
|
708
709
|
__name(alias, "alias");
|
|
709
710
|
|
|
710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
711
712
|
var ENTITY_TABLES = {
|
|
712
713
|
account: "accounts",
|
|
713
714
|
attachment: "attachments",
|
|
@@ -747,7 +748,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
|
|
|
747
748
|
return { table, pointer, type, count, known: known2 };
|
|
748
749
|
}).filter(({ count }) => count > 0)), "orphanPointers");
|
|
749
750
|
|
|
750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
751
752
|
var canonicalTags = sqliteTable("canonical_tags", {
|
|
752
753
|
id: integer("id").primaryKey(),
|
|
753
754
|
name: text("name").notNull().unique(),
|
|
@@ -756,7 +757,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
|
|
|
756
757
|
updatedAt: integer("updated_at").notNull()
|
|
757
758
|
});
|
|
758
759
|
|
|
759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
760
761
|
var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
761
762
|
sourceKey: text("source_key").notNull(),
|
|
762
763
|
collection: text("collection").notNull(),
|
|
@@ -766,13 +767,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
|
|
|
766
767
|
createdAt: integer("created_at").notNull()
|
|
767
768
|
}, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
|
|
768
769
|
|
|
769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
770
771
|
var documentIndexPending = sqliteTable("document_index_pending", {
|
|
771
772
|
id: integer("id").notNull(),
|
|
772
773
|
indexableType: text("indexable_type").notNull()
|
|
773
774
|
}, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
|
|
774
775
|
|
|
775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
776
777
|
var tagRedirects = sqliteTable("tag_redirects", {
|
|
777
778
|
sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
|
|
778
779
|
survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
|
|
@@ -798,7 +799,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
|
|
|
798
799
|
index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
|
|
799
800
|
]);
|
|
800
801
|
|
|
801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
802
803
|
var accounts = sqliteTable("accounts", {
|
|
803
804
|
id: integer("id").primaryKey(),
|
|
804
805
|
provider: text("provider").notNull(),
|
|
@@ -2299,7 +2300,7 @@ var storeSettings = sqliteTable("store_settings", {
|
|
|
2299
2300
|
at: integer("at").notNull()
|
|
2300
2301
|
});
|
|
2301
2302
|
|
|
2302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
2303
2304
|
var ARMS = [
|
|
2304
2305
|
[
|
|
2305
2306
|
"message",
|
|
@@ -2426,7 +2427,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
|
|
|
2426
2427
|
return recomputed;
|
|
2427
2428
|
}, "drainInvolvementQueue");
|
|
2428
2429
|
|
|
2429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
2430
2431
|
import { domainToUnicode } from "node:url";
|
|
2431
2432
|
|
|
2432
2433
|
// node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
|
|
@@ -12448,7 +12449,7 @@ var oa = /* @__PURE__ */ __name((e) => {
|
|
|
12448
12449
|
}, "oa");
|
|
12449
12450
|
var na = { parse: O, get: aa, isValid: oa };
|
|
12450
12451
|
|
|
12451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
12452
12453
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
12453
12454
|
var ID = /^[\w-]{10,}$/;
|
|
12454
12455
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|
|
@@ -12489,7 +12490,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text5) => [...text5.matchAll(L
|
|
|
12489
12490
|
return { url, documentId: googleDocumentId(url) };
|
|
12490
12491
|
}), "googleDocumentLinks");
|
|
12491
12492
|
|
|
12492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
12493
12494
|
var PHONE_PLANS = [
|
|
12494
12495
|
{
|
|
12495
12496
|
country: "us",
|
|
@@ -12869,7 +12870,7 @@ var PHONE_PLANS = [
|
|
|
12869
12870
|
}
|
|
12870
12871
|
];
|
|
12871
12872
|
|
|
12872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
12873
12874
|
var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
|
|
12874
12875
|
var DEFAULT_PHONE_COUNTRIES = ["ru"];
|
|
12875
12876
|
var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
|
|
@@ -12910,7 +12911,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
|
|
|
12910
12911
|
return void 0;
|
|
12911
12912
|
}, "nationalPhone");
|
|
12912
12913
|
|
|
12913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
12914
12915
|
var BEFORE = [
|
|
12915
12916
|
[/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
|
|
12916
12917
|
[/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
|
|
@@ -13170,7 +13171,7 @@ var findPlaces = /* @__PURE__ */ __name((text5) => {
|
|
|
13170
13171
|
return found2.sort((a, b) => a.start - b.start);
|
|
13171
13172
|
}, "findPlaces");
|
|
13172
13173
|
|
|
13173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
13174
13175
|
var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
|
|
13175
13176
|
var MENTION_VERSIONS = {
|
|
13176
13177
|
phone: 1,
|
|
@@ -13360,7 +13361,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
|
|
|
13360
13361
|
};
|
|
13361
13362
|
}, "typedPhone");
|
|
13362
13363
|
|
|
13363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
13364
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";
|
|
13365
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";
|
|
13366
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";
|
|
@@ -13368,7 +13369,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
|
|
|
13368
13369
|
var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
|
|
13369
13370
|
var NAME_WORDS = WORDS.split(" ");
|
|
13370
13371
|
|
|
13371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
13372
13373
|
var LATIN_TO_CYRILLIC = {
|
|
13373
13374
|
shch: "\u0449",
|
|
13374
13375
|
sch: "\u0449",
|
|
@@ -13576,7 +13577,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text5, stem, taken) => {
|
|
|
13576
13577
|
return found2;
|
|
13577
13578
|
}, "findUnknownNames");
|
|
13578
13579
|
|
|
13579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13580
13581
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13581
13582
|
"webpage",
|
|
13582
13583
|
"share",
|
|
@@ -13608,7 +13609,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13608
13609
|
});
|
|
13609
13610
|
}, "matchDownloads");
|
|
13610
13611
|
|
|
13611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13612
13613
|
var QUERY_VERSION = 1;
|
|
13613
13614
|
var QUERY_LIMITS2 = {
|
|
13614
13615
|
...QUERY_LIMITS,
|
|
@@ -13639,7 +13640,7 @@ function exhausted(budget) {
|
|
|
13639
13640
|
}
|
|
13640
13641
|
__name(exhausted, "exhausted");
|
|
13641
13642
|
|
|
13642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13643
13644
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13644
13645
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13645
13646
|
kind: "char",
|
|
@@ -14039,7 +14040,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14039
14040
|
return out;
|
|
14040
14041
|
}, "foldRegex");
|
|
14041
14042
|
|
|
14042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14043
14044
|
var PRESET_VERSION = 1;
|
|
14044
14045
|
var PRESETS = {
|
|
14045
14046
|
password: {
|
|
@@ -14093,7 +14094,7 @@ var PRESETS = {
|
|
|
14093
14094
|
}
|
|
14094
14095
|
};
|
|
14095
14096
|
|
|
14096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14097
14098
|
var FIELD_VERSION = 2;
|
|
14098
14099
|
var UNITS = {
|
|
14099
14100
|
"": 1,
|
|
@@ -14553,12 +14554,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14553
14554
|
return validateFields(parsed2.output);
|
|
14554
14555
|
}, "validateAst");
|
|
14555
14556
|
|
|
14556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14557
14558
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14558
14559
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14559
14560
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14560
14561
|
|
|
14561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14562
14563
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14563
14564
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14564
14565
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14582,7 +14583,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14582
14583
|
};
|
|
14583
14584
|
}, "linkMatch");
|
|
14584
14585
|
|
|
14585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14586
14587
|
var SETTING = "phoneCountries";
|
|
14587
14588
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14588
14589
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14613,7 +14614,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14613
14614
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14614
14615
|
}, "valueMatch");
|
|
14615
14616
|
|
|
14616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14617
14618
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14618
14619
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14619
14620
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14641,7 +14642,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14641
14642
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14642
14643
|
}, "vocabularySimilarity");
|
|
14643
14644
|
|
|
14644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14645
14646
|
import { createHash } from "node:crypto";
|
|
14646
14647
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14647
14648
|
try {
|
|
@@ -14707,7 +14708,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14707
14708
|
});
|
|
14708
14709
|
}, "guardTagCreation");
|
|
14709
14710
|
|
|
14710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14711
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14711
14712
|
var invalid = /* @__PURE__ */ __name((message2) => {
|
|
14712
14713
|
throw new CliError("validation_error", message2);
|
|
14713
14714
|
}, "invalid");
|
|
@@ -14784,7 +14785,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14784
14785
|
};
|
|
14785
14786
|
}, "createTagRedirectIndex");
|
|
14786
14787
|
|
|
14787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14788
14789
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14789
14790
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14790
14791
|
if (!row2)
|
|
@@ -14812,7 +14813,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14812
14813
|
return snapshot2;
|
|
14813
14814
|
}, "tagRedirectSnapshot");
|
|
14814
14815
|
|
|
14815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14816
14817
|
import { createHash as createHash2 } from "node:crypto";
|
|
14817
14818
|
var TASK_KEY_PREFIXES = {
|
|
14818
14819
|
question: "Q",
|
|
@@ -14840,7 +14841,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14840
14841
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14841
14842
|
}, "taskAccountOf");
|
|
14842
14843
|
|
|
14843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14844
14845
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14845
14846
|
var REFERABLE = {
|
|
14846
14847
|
note: { tombstone: true },
|
|
@@ -14998,7 +14999,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14998
14999
|
}, "taskIdOf");
|
|
14999
15000
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15000
15001
|
|
|
15001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15002
15003
|
var toMs = /* @__PURE__ */ __name((iso11) => {
|
|
15003
15004
|
if (iso11 === null || iso11 === void 0)
|
|
15004
15005
|
return null;
|
|
@@ -15012,7 +15013,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15012
15013
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15013
15014
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15014
15015
|
|
|
15015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15016
15017
|
var TAG_KINDS = ["tag", "topic"];
|
|
15017
15018
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15018
15019
|
var TAG_TYPE = {
|
|
@@ -15215,7 +15216,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15215
15216
|
return result;
|
|
15216
15217
|
}, "tagsOf");
|
|
15217
15218
|
|
|
15218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15219
15220
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15220
15221
|
var SPEECH = speech("att");
|
|
15221
15222
|
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");
|
|
@@ -15576,7 +15577,7 @@ var FIELD_COMPILERS = {
|
|
|
15576
15577
|
subject
|
|
15577
15578
|
};
|
|
15578
15579
|
|
|
15579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15580
15581
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15581
15582
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15582
15583
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15592,7 +15593,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15592
15593
|
};
|
|
15593
15594
|
}, "placeOf");
|
|
15594
15595
|
|
|
15595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15596
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15596
15597
|
var DRAIN_ON_WRITE = 500;
|
|
15597
15598
|
var METHOD = "rules";
|
|
15598
15599
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15755,7 +15756,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15755
15756
|
return queued.length;
|
|
15756
15757
|
}, "drainMentions");
|
|
15757
15758
|
|
|
15758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15759
15760
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15760
15761
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15761
15762
|
if (!exists2)
|
|
@@ -15763,7 +15764,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15763
15764
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15764
15765
|
}, "indexRow");
|
|
15765
15766
|
|
|
15766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15767
15768
|
var INDEX = "message_stems";
|
|
15768
15769
|
var SETTING2 = "searchStemmers";
|
|
15769
15770
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -15885,7 +15886,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
15885
15886
|
};
|
|
15886
15887
|
}, "stemmerCache");
|
|
15887
15888
|
|
|
15888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
15889
15890
|
var SQLITE_BUSY = 5;
|
|
15890
15891
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
15891
15892
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -15980,7 +15981,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
15980
15981
|
}
|
|
15981
15982
|
}, "read");
|
|
15982
15983
|
|
|
15983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
15984
15985
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
15985
15986
|
coalesce(CASE k.chunkable_type
|
|
15986
15987
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16122,7 +16123,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16122
16123
|
}, "dropUnusedVectors");
|
|
16123
16124
|
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");
|
|
16124
16125
|
|
|
16125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16126
16127
|
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({
|
|
16127
16128
|
target: [accounts.provider, accounts.externalId],
|
|
16128
16129
|
set: {
|
|
@@ -16228,7 +16229,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16228
16229
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16229
16230
|
}, "dropOrphanPeople");
|
|
16230
16231
|
|
|
16231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16232
16233
|
var FOLDED = [
|
|
16233
16234
|
{ table: "tasks", column: "title" },
|
|
16234
16235
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16265,7 +16266,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16265
16266
|
return filled2;
|
|
16266
16267
|
}, "fillFolded");
|
|
16267
16268
|
|
|
16268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16269
16270
|
import { createHash as createHash3 } from "node:crypto";
|
|
16270
16271
|
var CHUNK_CHARS = 1200;
|
|
16271
16272
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16370,7 +16371,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16370
16371
|
return chunks2;
|
|
16371
16372
|
}, "cutChunks");
|
|
16372
16373
|
|
|
16373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16374
16375
|
var DAY = 864e5;
|
|
16375
16376
|
var CURRENCY = [
|
|
16376
16377
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16487,7 +16488,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16487
16488
|
return best?.day ?? null;
|
|
16488
16489
|
}, "dueDayOf");
|
|
16489
16490
|
|
|
16490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16491
16492
|
var DAY2 = 864e5;
|
|
16492
16493
|
var STOP_WORDS = new Set([
|
|
16493
16494
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16642,7 +16643,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16642
16643
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16643
16644
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16644
16645
|
|
|
16645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16646
16647
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16647
16648
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16648
16649
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -16913,7 +16914,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
16913
16914
|
};
|
|
16914
16915
|
}, "readiness");
|
|
16915
16916
|
|
|
16916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
16917
16918
|
var DOCUMENT_PICTURE = "document_picture";
|
|
16918
16919
|
var SCAN_PAGE2 = 5e3;
|
|
16919
16920
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -16976,7 +16977,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
16976
16977
|
}, "nearestPictures")
|
|
16977
16978
|
}), "documentPicturesOver");
|
|
16978
16979
|
|
|
16979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
16980
16981
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
16981
16982
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
16982
16983
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17041,7 +17042,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17041
17042
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17042
17043
|
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");
|
|
17043
17044
|
|
|
17044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17045
17046
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17046
17047
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17047
17048
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17131,7 +17132,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17131
17132
|
});
|
|
17132
17133
|
}, "linkMeeting");
|
|
17133
17134
|
|
|
17134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17135
17136
|
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), ''))";
|
|
17136
17137
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17137
17138
|
"working-location",
|
|
@@ -17361,7 +17362,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17361
17362
|
return true;
|
|
17362
17363
|
}, "resetNoteIndex");
|
|
17363
17364
|
|
|
17364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17365
17366
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17366
17367
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17367
17368
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17380,7 +17381,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17380
17381
|
}
|
|
17381
17382
|
}, "resolvePersonLinks");
|
|
17382
17383
|
|
|
17383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17384
17385
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17385
17386
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17386
17387
|
find: orm.select({
|
|
@@ -17605,7 +17606,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17605
17606
|
}, "meetingIdentityPk");
|
|
17606
17607
|
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");
|
|
17607
17608
|
|
|
17608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17609
17610
|
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");
|
|
17610
17611
|
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");
|
|
17611
17612
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -17885,7 +17886,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
17885
17886
|
}
|
|
17886
17887
|
}, "replaceAutoTags");
|
|
17887
17888
|
|
|
17888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
17889
17890
|
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");
|
|
17890
17891
|
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;
|
|
17891
17892
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -17966,7 +17967,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
17966
17967
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
17967
17968
|
}, "mailCore");
|
|
17968
17969
|
|
|
17969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
17970
17971
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
17971
17972
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
17972
17973
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18076,7 +18077,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18076
18077
|
return emails3 + threads;
|
|
18077
18078
|
}, "drainEmailIndex");
|
|
18078
18079
|
|
|
18079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18080
18081
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18081
18082
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18082
18083
|
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,
|
|
@@ -18122,7 +18123,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18122
18123
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18123
18124
|
}, "forgetLocations");
|
|
18124
18125
|
|
|
18125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18126
18127
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18127
18128
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18128
18129
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18172,7 +18173,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18172
18173
|
return threads.length;
|
|
18173
18174
|
}, "markEmailsRestored");
|
|
18174
18175
|
|
|
18175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18176
18177
|
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");
|
|
18177
18178
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18178
18179
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18239,7 +18240,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18239
18240
|
}
|
|
18240
18241
|
}), "mailRulesOver");
|
|
18241
18242
|
|
|
18242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18243
18244
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18244
18245
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18245
18246
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18247,7 +18248,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18247
18248
|
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);
|
|
18248
18249
|
}, "reviewLink");
|
|
18249
18250
|
|
|
18250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18251
18252
|
function checkMeetingCancelled(signal) {
|
|
18252
18253
|
if (!signal?.aborted)
|
|
18253
18254
|
return;
|
|
@@ -18258,7 +18259,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18258
18259
|
}
|
|
18259
18260
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18260
18261
|
|
|
18261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18262
18263
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18263
18264
|
id: Number(row2.id),
|
|
18264
18265
|
accountId: Number(row2.account_id),
|
|
@@ -18308,7 +18309,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18308
18309
|
createdAt: Number(row2.created_at)
|
|
18309
18310
|
}), "transcriptRowOf");
|
|
18310
18311
|
|
|
18311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18312
18313
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18313
18314
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18314
18315
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18475,7 +18476,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18475
18476
|
}
|
|
18476
18477
|
}), "meetingReadsOver");
|
|
18477
18478
|
|
|
18478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18479
18480
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18480
18481
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18481
18482
|
const params = [input.accountId];
|
|
@@ -18518,7 +18519,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18518
18519
|
return { clauses, params };
|
|
18519
18520
|
}, "meetingSelectionSql");
|
|
18520
18521
|
|
|
18521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18522
18523
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18523
18524
|
async meetingChatLines(input) {
|
|
18524
18525
|
checkMeetingCancelled(input.signal);
|
|
@@ -18546,7 +18547,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18546
18547
|
}
|
|
18547
18548
|
}), "meetingChatLinesOver");
|
|
18548
18549
|
|
|
18549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18550
18551
|
var MESSAGE_FIELDS = {
|
|
18551
18552
|
pk: messages.id,
|
|
18552
18553
|
nativeId: messages.externalId,
|
|
@@ -18713,7 +18714,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18713
18714
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18714
18715
|
}), "chatActivity");
|
|
18715
18716
|
|
|
18716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18717
18718
|
var HIT_FIELDS = {
|
|
18718
18719
|
...MESSAGE_FIELDS,
|
|
18719
18720
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18812,7 +18813,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18812
18813
|
};
|
|
18813
18814
|
}, "directReplies");
|
|
18814
18815
|
|
|
18815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18816
18817
|
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");
|
|
18817
18818
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18818
18819
|
const found2 = identityRow(context, ref3);
|
|
@@ -18943,7 +18944,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
18943
18944
|
}, "mentioning");
|
|
18944
18945
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18945
18946
|
|
|
18946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
18947
18948
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
18948
18949
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
18949
18950
|
}, "missing");
|
|
@@ -19065,7 +19066,7 @@ function meetingContextLinksOver(context) {
|
|
|
19065
19066
|
}
|
|
19066
19067
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19067
19068
|
|
|
19068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19069
19070
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19070
19071
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19071
19072
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19094,7 +19095,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19094
19095
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19095
19096
|
}, "indexedText");
|
|
19096
19097
|
|
|
19097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19098
19099
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19099
19100
|
var meetingCurrentIndexRows = `
|
|
19100
19101
|
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
|
|
@@ -19125,7 +19126,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19125
19126
|
}, "invalidateMeetingStems");
|
|
19126
19127
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19127
19128
|
|
|
19128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19129
19130
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19130
19131
|
return {
|
|
19131
19132
|
async indexSearch(original) {
|
|
@@ -19193,10 +19194,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19193
19194
|
}
|
|
19194
19195
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19195
19196
|
|
|
19196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19197
19198
|
import { createHash as createHash4 } from "node:crypto";
|
|
19198
19199
|
|
|
19199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19200
19201
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19201
19202
|
const padded = ` ${term} `;
|
|
19202
19203
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19205,7 +19206,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19205
19206
|
return [...pieces];
|
|
19206
19207
|
}, "trigrams");
|
|
19207
19208
|
|
|
19208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19209
19210
|
var SHORTEST_CORRECTION = 3;
|
|
19210
19211
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19211
19212
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19252,7 +19253,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19252
19253
|
return corrections;
|
|
19253
19254
|
}, "correctWords");
|
|
19254
19255
|
|
|
19255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19256
19257
|
var SHORTEST_GARBLED = 4;
|
|
19257
19258
|
var MOST_WIDENED = 64;
|
|
19258
19259
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19344,7 +19345,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19344
19345
|
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));
|
|
19345
19346
|
}, "widenWords");
|
|
19346
19347
|
|
|
19347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19348
19349
|
import { readFileSync } from "node:fs";
|
|
19349
19350
|
var loaded;
|
|
19350
19351
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19403,7 +19404,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19403
19404
|
return false;
|
|
19404
19405
|
}, "knownRussianWord");
|
|
19405
19406
|
|
|
19406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19407
19408
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19408
19409
|
var MOST_WORDS = 128;
|
|
19409
19410
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19630,7 +19631,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19630
19631
|
return check3(tree);
|
|
19631
19632
|
}, "matchMeetingText");
|
|
19632
19633
|
|
|
19633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19634
19635
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19635
19636
|
throw new CliError("validation_error", message2);
|
|
19636
19637
|
}, "fail");
|
|
@@ -19807,7 +19808,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19807
19808
|
}
|
|
19808
19809
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19809
19810
|
|
|
19810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19811
19812
|
import { createHash as createHash5 } from "node:crypto";
|
|
19812
19813
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19813
19814
|
if (value === void 0)
|
|
@@ -19897,7 +19898,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
19897
19898
|
}
|
|
19898
19899
|
}), "meetingParticipantSearchOver");
|
|
19899
19900
|
|
|
19900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
19901
19902
|
var preparationQueries = {
|
|
19902
19903
|
participants: {
|
|
19903
19904
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -19947,7 +19948,7 @@ var preparationQueries = {
|
|
|
19947
19948
|
}
|
|
19948
19949
|
};
|
|
19949
19950
|
|
|
19950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
19951
19952
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19952
19953
|
async preparationContext(original) {
|
|
19953
19954
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -19988,7 +19989,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19988
19989
|
}
|
|
19989
19990
|
}), "meetingPreparationContextOver");
|
|
19990
19991
|
|
|
19991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
19992
19993
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
19993
19994
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
19994
19995
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20002,7 +20003,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20002
20003
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20003
20004
|
)`, "preparationSubjects");
|
|
20004
20005
|
|
|
20005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20006
20007
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20007
20008
|
async preparationKnowledge(original) {
|
|
20008
20009
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20047,7 +20048,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20047
20048
|
}
|
|
20048
20049
|
}), "meetingPreparationKnowledgeOver");
|
|
20049
20050
|
|
|
20050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20051
20052
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20052
20053
|
async preparationNotes(original) {
|
|
20053
20054
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20100,7 +20101,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20100
20101
|
}
|
|
20101
20102
|
}), "meetingPreparationNotesOver");
|
|
20102
20103
|
|
|
20103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20104
20105
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20105
20106
|
async relatedHistory(original) {
|
|
20106
20107
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20171,7 +20172,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20171
20172
|
}
|
|
20172
20173
|
}), "meetingRelatedHistoryOver");
|
|
20173
20174
|
|
|
20174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20175
20176
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20176
20177
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20177
20178
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20252,7 +20253,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20252
20253
|
}
|
|
20253
20254
|
}), "meetingReviewOver");
|
|
20254
20255
|
|
|
20255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20256
20257
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20257
20258
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20258
20259
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20306,7 +20307,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20306
20307
|
}
|
|
20307
20308
|
}), "meetingSeriesHistoryOver");
|
|
20308
20309
|
|
|
20309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20310
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20310
20311
|
var MOST_ROWS = 5e5;
|
|
20311
20312
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20312
20313
|
async meetingStats(input) {
|
|
@@ -20353,7 +20354,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20353
20354
|
}
|
|
20354
20355
|
}), "meetingStatsOver");
|
|
20355
20356
|
|
|
20356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20357
20358
|
var CURSOR_KEY = "meetings";
|
|
20358
20359
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20359
20360
|
id: Number(row2.id),
|
|
@@ -20905,7 +20906,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
20905
20906
|
};
|
|
20906
20907
|
}, "meetingStoreOver");
|
|
20907
20908
|
|
|
20908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
20909
20910
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
20910
20911
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
20911
20912
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -20931,7 +20932,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
20931
20932
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
20932
20933
|
}, "release");
|
|
20933
20934
|
|
|
20934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
20935
20936
|
var THREAD_COLUMNS = {
|
|
20936
20937
|
subject: {
|
|
20937
20938
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -20948,7 +20949,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
20948
20949
|
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);
|
|
20949
20950
|
}, "threadRows");
|
|
20950
20951
|
|
|
20951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
20952
20953
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
20953
20954
|
id: `email:${place.emailId}`,
|
|
20954
20955
|
chatId: place.threadExternalId,
|
|
@@ -21503,7 +21504,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
21503
21504
|
}
|
|
21504
21505
|
}), "mailStoreOver");
|
|
21505
21506
|
|
|
21506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21507
21508
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21508
21509
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21509
21510
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21593,7 +21594,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21593
21594
|
}, "knownWord");
|
|
21594
21595
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21595
21596
|
|
|
21596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21597
21598
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21598
21599
|
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");
|
|
21599
21600
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21679,7 +21680,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21679
21680
|
return found2;
|
|
21680
21681
|
}, "spokenTranscripts");
|
|
21681
21682
|
|
|
21682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21683
21684
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21684
21685
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21685
21686
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21726,7 +21727,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21726
21727
|
});
|
|
21727
21728
|
}, "placeHits");
|
|
21728
21729
|
|
|
21729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21730
21731
|
var MESSAGES2 = {
|
|
21731
21732
|
rows: "messages",
|
|
21732
21733
|
threads: "chats",
|
|
@@ -21778,8 +21779,8 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
|
|
|
21778
21779
|
const { database } = context;
|
|
21779
21780
|
const corpus = execution.corpus === "mail" ? MAIL : MESSAGES2;
|
|
21780
21781
|
const mail = corpus === MAIL;
|
|
21781
|
-
if (mail && (execution.
|
|
21782
|
-
throw new CliError("validation_error", "mail has no
|
|
21782
|
+
if (mail && (execution.conversationIds || execution.conversationSince !== void 0))
|
|
21783
|
+
throw new CliError("validation_error", "mail has no conversations to search within");
|
|
21783
21784
|
const started = context.now();
|
|
21784
21785
|
const budget = { work: 0 };
|
|
21785
21786
|
let states = 0, expansions = 0;
|
|
@@ -21920,11 +21921,11 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
|
|
|
21920
21921
|
where = combine([
|
|
21921
21922
|
where,
|
|
21922
21923
|
{
|
|
21923
|
-
sql: `m.id IN (SELECT picked.id FROM json_each(?) j CROSS JOIN accounts allowed CROSS JOIN chats scoped CROSS JOIN messages picked
|
|
21924
|
+
sql: `m.id IN (SELECT picked.id FROM json_each(?) j CROSS JOIN accounts allowed CROSS JOIN ${mail ? "email_threads" : "chats"} scoped CROSS JOIN ${mail ? "emails" : "messages"} picked
|
|
21924
21925
|
WHERE (${execution.accounts.map(() => "(allowed.provider=? AND allowed.external_id=?)").join(" OR ") || "0"})
|
|
21925
21926
|
AND allowed.provider=json_extract(j.value,'$.provider') AND allowed.external_id=json_extract(j.value,'$.account')
|
|
21926
21927
|
AND scoped.account_id=allowed.id AND scoped.external_id=json_extract(j.value,'$.chatId')
|
|
21927
|
-
AND picked
|
|
21928
|
+
AND picked.${mail ? "email_thread_id" : "chat_id"}=scoped.id AND picked.external_id=json_extract(j.value,'$.id'))`,
|
|
21928
21929
|
params: [JSON.stringify(execution.only), ...execution.accounts.flatMap((key2) => [key2.provider, key2.account])],
|
|
21929
21930
|
exact: true
|
|
21930
21931
|
}
|
|
@@ -22200,7 +22201,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22200
22201
|
};
|
|
22201
22202
|
}, "runQuery");
|
|
22202
22203
|
|
|
22203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22204
22205
|
function invalidMetadata() {
|
|
22205
22206
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22206
22207
|
}
|
|
@@ -22302,7 +22303,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22302
22303
|
};
|
|
22303
22304
|
}), "counterTargets");
|
|
22304
22305
|
|
|
22305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22306
22307
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22307
22308
|
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,
|
|
22308
22309
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22421,7 +22422,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22421
22422
|
}));
|
|
22422
22423
|
}, "attachmentViews");
|
|
22423
22424
|
|
|
22424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22425
22426
|
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");
|
|
22426
22427
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22427
22428
|
const { orm, database, now: now2 } = context;
|
|
@@ -22459,7 +22460,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22459
22460
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22460
22461
|
}, "intoVoiceAttachment");
|
|
22461
22462
|
|
|
22462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22463
22464
|
var FIELDS = [
|
|
22464
22465
|
"threadExternalId",
|
|
22465
22466
|
"senderIdentityId",
|
|
@@ -22776,7 +22777,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22776
22777
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22777
22778
|
}, "writeDerivedReactions");
|
|
22778
22779
|
|
|
22779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22780
22781
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22781
22782
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22782
22783
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22797,7 +22798,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22797
22798
|
};
|
|
22798
22799
|
}, "keysOver");
|
|
22799
22800
|
|
|
22800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22801
22802
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22802
22803
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22803
22804
|
if (!row2)
|
|
@@ -22832,7 +22833,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22832
22833
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22833
22834
|
}, "saveProfile");
|
|
22834
22835
|
|
|
22835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22836
22837
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22837
22838
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22838
22839
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -22868,7 +22869,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
22868
22869
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
22869
22870
|
}, "originOfActor");
|
|
22870
22871
|
|
|
22871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
22872
22873
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
22873
22874
|
const owner = ownerPerson(context.database).id;
|
|
22874
22875
|
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);
|
|
@@ -22889,7 +22890,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
22889
22890
|
return personOf(context, ref3);
|
|
22890
22891
|
}, "linkToOwner");
|
|
22891
22892
|
|
|
22892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
22893
22894
|
var PROVIDERS_SETTING = "providers";
|
|
22894
22895
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
22895
22896
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -22924,7 +22925,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
22924
22925
|
});
|
|
22925
22926
|
}, "registerProvider");
|
|
22926
22927
|
|
|
22927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
22928
22929
|
var DAY3 = 864e5;
|
|
22929
22930
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
22930
22931
|
var TEXT_LIMIT = 20;
|
|
@@ -23123,7 +23124,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23123
23124
|
};
|
|
23124
23125
|
}, "taskSimilarityOver");
|
|
23125
23126
|
|
|
23126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23127
23128
|
var SETTING3 = "taskCategories";
|
|
23128
23129
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23129
23130
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23142,7 +23143,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23142
23143
|
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);
|
|
23143
23144
|
}, "saveTaskCategories");
|
|
23144
23145
|
|
|
23145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23146
23147
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23147
23148
|
var ALLOWED = "taskAgentClose";
|
|
23148
23149
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23198,7 +23199,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23198
23199
|
];
|
|
23199
23200
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23200
23201
|
|
|
23201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
23202
23203
|
var EXCERPT_CHARS = 280;
|
|
23203
23204
|
var excerptOf = /* @__PURE__ */ __name((text5) => {
|
|
23204
23205
|
if (text5 == null)
|
|
@@ -23263,7 +23264,7 @@ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...n
|
|
|
23263
23264
|
};
|
|
23264
23265
|
}), "sourcesOfReferences");
|
|
23265
23266
|
|
|
23266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
23267
23268
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
23268
23269
|
var MAX_TEXT_CHARS = 2e6;
|
|
23269
23270
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -23289,7 +23290,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
23289
23290
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
23290
23291
|
}, "pdfPreviewLimits");
|
|
23291
23292
|
|
|
23292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23293
23294
|
import { randomBytes } from "node:crypto";
|
|
23294
23295
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23295
23296
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23302,7 +23303,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23302
23303
|
return time3 + random;
|
|
23303
23304
|
}, "ulid");
|
|
23304
23305
|
|
|
23305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23306
23307
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23307
23308
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23308
23309
|
if (!meta && !sections?.length)
|
|
@@ -23323,7 +23324,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23323
23324
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23324
23325
|
}, "languageOf");
|
|
23325
23326
|
|
|
23326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23327
23328
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23328
23329
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23329
23330
|
if (isObject(value))
|
|
@@ -23566,7 +23567,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23566
23567
|
};
|
|
23567
23568
|
}, "filesStoreOver");
|
|
23568
23569
|
|
|
23569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23570
23571
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23571
23572
|
entity: "document",
|
|
23572
23573
|
backend: "sql",
|
|
@@ -23612,7 +23613,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23612
23613
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23613
23614
|
}, "importedDocumentWhere");
|
|
23614
23615
|
|
|
23615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23616
23617
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23617
23618
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23618
23619
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -24122,7 +24123,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24122
24123
|
};
|
|
24123
24124
|
}, "notesStoreOver");
|
|
24124
24125
|
|
|
24125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24126
24127
|
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";
|
|
24127
24128
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24128
24129
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24318,7 +24319,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24318
24319
|
};
|
|
24319
24320
|
}, "memoriesStoreOver");
|
|
24320
24321
|
|
|
24321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24322
24323
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24323
24324
|
var KEY = "taskFirstPassPerChat";
|
|
24324
24325
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24338,7 +24339,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24338
24339
|
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);
|
|
24339
24340
|
}, "saveFirstPassPerChat");
|
|
24340
24341
|
|
|
24341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
24342
24343
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
24343
24344
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
24344
24345
|
name,
|
|
@@ -24362,7 +24363,11 @@ var PROJECT_TASK_FIELDS = [
|
|
|
24362
24363
|
}),
|
|
24363
24364
|
field("agent", "kw", "agent:hermes", { relation: "the agent working on it, by name; none or any" }),
|
|
24364
24365
|
field("due", "time", "due:[today TO 2026-12-31]", { relation: "the due date; NOT due:* has none" }),
|
|
24365
|
-
field("overdue", "bool", "overdue:true", { relation: "open work
|
|
24366
|
+
field("overdue", "bool", "overdue:true", { relation: "open work due before today" }),
|
|
24367
|
+
field("when", "enum", "when:today", {
|
|
24368
|
+
values: ["overdue", "today", "upcoming", "later", "none"],
|
|
24369
|
+
relation: "the due date as a board groups it: overdue (open work due before today), today, upcoming (the next 7 days after today), later, or none"
|
|
24370
|
+
}),
|
|
24366
24371
|
field("closed", "time", "closed:>=14d", { relation: "when it was done or dismissed" }),
|
|
24367
24372
|
field("ready", "bool", "ready:true", { relation: "open work whose blocked-by tasks are all done" }),
|
|
24368
24373
|
field("text", "txt", "text:invoice", { relation: "words of the title and description; a bare word means this" })
|
|
@@ -24456,7 +24461,26 @@ var truth = /* @__PURE__ */ __name((node, sql2) => ({
|
|
|
24456
24461
|
sql: node.value.toLowerCase() === "true" ? sql2 : `NOT (${sql2})`,
|
|
24457
24462
|
params: []
|
|
24458
24463
|
}), "truth");
|
|
24459
|
-
var
|
|
24464
|
+
var SPAN = { start: 0, end: 0 };
|
|
24465
|
+
var UPCOMING_DAYS = 7;
|
|
24466
|
+
var dayIn = /* @__PURE__ */ __name((at, zone, ahead) => {
|
|
24467
|
+
const date3 = /* @__PURE__ */ new Date(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone, year: "numeric", month: "2-digit", day: "2-digit" }).format(at)}T00:00:00Z`);
|
|
24468
|
+
date3.setUTCDate(date3.getUTCDate() + ahead);
|
|
24469
|
+
return dayBoundary(date3.toISOString().slice(0, 10), zone, false, SPAN);
|
|
24470
|
+
}, "dayIn");
|
|
24471
|
+
var dueGroups = /* @__PURE__ */ __name((now2, zone) => {
|
|
24472
|
+
const today = dayIn(now2, zone, 0);
|
|
24473
|
+
const tomorrow = dayIn(now2, zone, 1);
|
|
24474
|
+
const after2 = dayIn(now2, zone, UPCOMING_DAYS + 1);
|
|
24475
|
+
return {
|
|
24476
|
+
overdue: `${OPEN} AND t.due_at IS NOT NULL AND t.due_at < ${today}`,
|
|
24477
|
+
today: `t.due_at >= ${today} AND t.due_at < ${tomorrow}`,
|
|
24478
|
+
upcoming: `t.due_at >= ${tomorrow} AND t.due_at < ${after2}`,
|
|
24479
|
+
later: `t.due_at >= ${after2}`,
|
|
24480
|
+
none: "t.due_at IS NULL"
|
|
24481
|
+
};
|
|
24482
|
+
}, "dueGroups");
|
|
24483
|
+
var projectTaskColumns = /* @__PURE__ */ __name((now2, zone) => ({
|
|
24460
24484
|
state: { type: "enum", sql: "t.status" },
|
|
24461
24485
|
kind: { type: "enum", sql: "t.type" },
|
|
24462
24486
|
project: { where: projectWhere },
|
|
@@ -24465,7 +24489,15 @@ var projectTaskColumns = /* @__PURE__ */ __name((now2) => ({
|
|
|
24465
24489
|
agent: { where: agentWhere },
|
|
24466
24490
|
due: { type: "time", sql: "t.due_at" },
|
|
24467
24491
|
closed: { type: "time", sql: "t.closed_at" },
|
|
24468
|
-
overdue: { where: /* @__PURE__ */ __name((node) => truth(node,
|
|
24492
|
+
overdue: { where: /* @__PURE__ */ __name((node) => truth(node, dueGroups(now2, zone).overdue), "where") },
|
|
24493
|
+
when: {
|
|
24494
|
+
where: /* @__PURE__ */ __name((node) => {
|
|
24495
|
+
const group = dueGroups(now2, zone)[node.value.toLowerCase()];
|
|
24496
|
+
if (group === void 0)
|
|
24497
|
+
throw new CliError("validation_error", "when is overdue, today, upcoming, later or none");
|
|
24498
|
+
return { sql: group, params: [] };
|
|
24499
|
+
}, "where")
|
|
24500
|
+
},
|
|
24469
24501
|
ready: { where: /* @__PURE__ */ __name((node) => truth(node, `${OPEN} AND NOT EXISTS (${UNFINISHED_BLOCKER})`), "where") },
|
|
24470
24502
|
text: {
|
|
24471
24503
|
where: /* @__PURE__ */ __name((node) => {
|
|
@@ -24512,7 +24544,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
24512
24544
|
return root === void 0 ? void 0 : { ...query, root };
|
|
24513
24545
|
}, "withoutField");
|
|
24514
24546
|
|
|
24515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24516
24548
|
var TASK_RELATION_KINDS = [
|
|
24517
24549
|
"blocked-by",
|
|
24518
24550
|
"follow-up-of",
|
|
@@ -24642,7 +24674,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24642
24674
|
};
|
|
24643
24675
|
}, "taskRelationsStoreOver");
|
|
24644
24676
|
|
|
24645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24646
24678
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24647
24679
|
var TASK_EVENT_KINDS = [
|
|
24648
24680
|
"created",
|
|
@@ -24678,6 +24710,10 @@ var textOf3 = /* @__PURE__ */ __name((value, what, max) => {
|
|
|
24678
24710
|
return text5;
|
|
24679
24711
|
}, "textOf");
|
|
24680
24712
|
var claimOf = /* @__PURE__ */ __name((row2, at) => row2.claimed_by != null && Number(row2.claimed_until) >= at ? { claimedBy: String(row2.claimed_by), claimedUntil: iso4(row2.claimed_until) } : { claimedBy: null, claimedUntil: null }, "claimOf");
|
|
24713
|
+
var timesAsIso = /* @__PURE__ */ __name((changes) => Object.fromEntries(Object.entries(changes).map(([key2, pair]) => [
|
|
24714
|
+
key2,
|
|
24715
|
+
key2.endsWith("_at") && Array.isArray(pair) ? pair.map((value) => typeof value === "number" ? new Date(value).toISOString() : value) : pair
|
|
24716
|
+
])), "timesAsIso");
|
|
24681
24717
|
var checkRevision = /* @__PURE__ */ __name((row2, expected) => {
|
|
24682
24718
|
if (expected === void 0 || Number(row2.revision) === expected)
|
|
24683
24719
|
return;
|
|
@@ -24723,6 +24759,10 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24723
24759
|
}
|
|
24724
24760
|
return parent2;
|
|
24725
24761
|
}, "parentOf");
|
|
24762
|
+
const projectNamed = /* @__PURE__ */ __name((id2) => {
|
|
24763
|
+
const project = database.prepare("SELECT key, name FROM projects WHERE id = ?").get(id2);
|
|
24764
|
+
return { projectKey: String(project.key), projectName: String(project.name) };
|
|
24765
|
+
}, "projectNamed");
|
|
24726
24766
|
const detailsOf = /* @__PURE__ */ __name((row2) => {
|
|
24727
24767
|
const id2 = Number(row2.id);
|
|
24728
24768
|
const reference2 = /* @__PURE__ */ __name((taskRow) => `task:${taskIdOf(database, taskRow)}`, "reference");
|
|
@@ -24731,6 +24771,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24731
24771
|
ref: reference2(id2),
|
|
24732
24772
|
key: String(row2.key),
|
|
24733
24773
|
project: `project:${row2.project_id}`,
|
|
24774
|
+
...projectNamed(Number(row2.project_id)),
|
|
24734
24775
|
title: String(row2.title),
|
|
24735
24776
|
description: row2.description == null ? null : String(row2.description),
|
|
24736
24777
|
type: row2.type,
|
|
@@ -24760,7 +24801,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24760
24801
|
const boardWhere = /* @__PURE__ */ __name((query, zone, at) => {
|
|
24761
24802
|
if (query === void 0)
|
|
24762
24803
|
return { sql: BOARD_SCOPE, params: [] };
|
|
24763
|
-
const where = queryFilter(query, projectTaskColumns(at), {
|
|
24804
|
+
const where = queryFilter(query, projectTaskColumns(at, timezoneOf(zone)), {
|
|
24764
24805
|
command: "tasks list",
|
|
24765
24806
|
now: at,
|
|
24766
24807
|
...zone ? { zone } : {}
|
|
@@ -25052,7 +25093,12 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25052
25093
|
const where = without(name);
|
|
25053
25094
|
return database.prepare(`SELECT ${select2}, count(*) AS n FROM tasks t ${from2} WHERE ${where.sql} GROUP BY ${group}`).all(...where.params);
|
|
25054
25095
|
}, "grouped");
|
|
25055
|
-
const project = grouped("project", "p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
|
|
25096
|
+
const project = grouped("project", "p.id, p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
|
|
25097
|
+
value: String(row2.key),
|
|
25098
|
+
ref: `project:${row2.id}`,
|
|
25099
|
+
name: String(row2.name),
|
|
25100
|
+
count: Number(row2.n)
|
|
25101
|
+
})).sort((a, b) => a.value.localeCompare(b.value));
|
|
25056
25102
|
const assigned = grouped("assignee", "a.assignee_id AS person, pe.name", "LEFT JOIN task_assignments a ON a.task_id = t.id AND a.assignee_type = 'person' AND a.role = 'assignee' LEFT JOIN persons pe ON pe.id = a.assignee_id", "a.assignee_id");
|
|
25057
25103
|
const assignee = assigned.map((row2) => ({
|
|
25058
25104
|
value: row2.person == null ? "none" : `person:${row2.person}`,
|
|
@@ -25065,6 +25111,13 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25065
25111
|
priorities.set(label, (priorities.get(label) ?? 0) + Number(row2.n));
|
|
25066
25112
|
}
|
|
25067
25113
|
const states = new Map(grouped("state", "t.status", "", "t.status").map((row2) => [row2.status, Number(row2.n)]));
|
|
25114
|
+
const groups = dueGroups(at, timezoneOf(zone));
|
|
25115
|
+
const dueWhere = boardWhere(withoutField(withoutField(query, "when"), "overdue"), zone, at);
|
|
25116
|
+
const due = Object.keys(groups).map((value) => ({
|
|
25117
|
+
value,
|
|
25118
|
+
count: Number(database.prepare(`SELECT count(*) AS n FROM tasks t WHERE ${dueWhere.sql} AND ${groups[value]}`).get(...dueWhere.params)?.n ?? 0)
|
|
25119
|
+
}));
|
|
25120
|
+
const agent = grouped("agent", "t.agent", "", "t.agent").map((row2) => ({ value: row2.agent == null ? "none" : String(row2.agent), count: Number(row2.n) })).sort((a, b) => b.count - a.count || a.value.localeCompare(b.value));
|
|
25068
25121
|
return {
|
|
25069
25122
|
total: countOf(boardWhere(query, zone, at)),
|
|
25070
25123
|
project,
|
|
@@ -25073,10 +25126,12 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25073
25126
|
value,
|
|
25074
25127
|
count: priorities.get(value) ?? 0
|
|
25075
25128
|
})),
|
|
25076
|
-
state: TASK_STATES.map((value) => ({ value, count: states.get(value) ?? 0 }))
|
|
25129
|
+
state: TASK_STATES.map((value) => ({ value, count: states.get(value) ?? 0 })),
|
|
25130
|
+
due,
|
|
25131
|
+
agent
|
|
25077
25132
|
};
|
|
25078
25133
|
}, "boardCounts"),
|
|
25079
|
-
taskPeople: /* @__PURE__ */ __name(async () => database.prepare("SELECT p.id, p.name, p.owner, count(DISTINCT t.id) AS n FROM persons p LEFT JOIN task_assignments a ON a.assignee_type = 'person' AND a.assignee_id = p.id LEFT JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL
|
|
25134
|
+
taskPeople: /* @__PURE__ */ __name(async ({ limit = 500 } = {}) => database.prepare("SELECT p.id, p.name, p.owner, count(DISTINCT t.id) AS n FROM persons p LEFT JOIN task_assignments a ON a.assignee_type = 'person' AND a.assignee_id = p.id LEFT JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL GROUP BY p.id ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?").all(Math.min(Math.max(limit, 1), 5e3)).map((row2) => ({
|
|
25080
25135
|
person: `person:${row2.id}`,
|
|
25081
25136
|
name: row2.name == null ? null : String(row2.name),
|
|
25082
25137
|
owner: Number(row2.owner) === 1,
|
|
@@ -25089,7 +25144,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25089
25144
|
id: Number(row2.actor_id),
|
|
25090
25145
|
name: row2.actor_name == null ? null : String(row2.actor_name)
|
|
25091
25146
|
},
|
|
25092
|
-
changes: row2.changes == null ? null : JSON.parse(String(row2.changes)),
|
|
25147
|
+
changes: row2.changes == null ? null : timesAsIso(JSON.parse(String(row2.changes))),
|
|
25093
25148
|
at: iso4(row2.created_at)
|
|
25094
25149
|
})), "events")
|
|
25095
25150
|
};
|
|
@@ -25103,7 +25158,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
25103
25158
|
};
|
|
25104
25159
|
}, "workTasksOver");
|
|
25105
25160
|
|
|
25106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
25107
25162
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
25108
25163
|
const { database, now: now2 } = context;
|
|
25109
25164
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -25152,7 +25207,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
25152
25207
|
};
|
|
25153
25208
|
}, "taskCloseOver");
|
|
25154
25209
|
|
|
25155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
25156
25211
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
25157
25212
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
25158
25213
|
const { database, now: now2 } = context;
|
|
@@ -25371,7 +25426,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
25371
25426
|
};
|
|
25372
25427
|
}, "taskPairsOver");
|
|
25373
25428
|
|
|
25374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
25375
25430
|
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";
|
|
25376
25431
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25377
25432
|
const { database, now: now2 } = context;
|
|
@@ -25576,7 +25631,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25576
25631
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25577
25632
|
}, "oneOf");
|
|
25578
25633
|
|
|
25579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25580
25635
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25581
25636
|
const { database } = context;
|
|
25582
25637
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25621,7 +25676,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25621
25676
|
};
|
|
25622
25677
|
}, "accountsStoreOver");
|
|
25623
25678
|
|
|
25624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25625
25680
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25626
25681
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25627
25682
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25645,7 +25700,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25645
25700
|
})), "keepDownloads");
|
|
25646
25701
|
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");
|
|
25647
25702
|
|
|
25648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25649
25704
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25650
25705
|
const { database } = context;
|
|
25651
25706
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25702,7 +25757,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25702
25757
|
}, "keepAttachmentText")
|
|
25703
25758
|
}), "attachmentsStoreOver");
|
|
25704
25759
|
|
|
25705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25706
25761
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25707
25762
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25708
25763
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25882,7 +25937,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25882
25937
|
return done;
|
|
25883
25938
|
}, "rekeyChats");
|
|
25884
25939
|
|
|
25885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25886
25941
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25887
25942
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25888
25943
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25914,7 +25969,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25914
25969
|
});
|
|
25915
25970
|
}, "chatCompleteness");
|
|
25916
25971
|
|
|
25917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25918
25973
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25919
25974
|
const { database } = context;
|
|
25920
25975
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -26021,7 +26076,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26021
26076
|
};
|
|
26022
26077
|
}, "chatsStoreOver");
|
|
26023
26078
|
|
|
26024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
26025
26080
|
import { createHash as createHash6 } from "node:crypto";
|
|
26026
26081
|
var BATCH_CONTEXT = 50;
|
|
26027
26082
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -26159,7 +26214,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
26159
26214
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
26160
26215
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
26161
26216
|
|
|
26162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
26163
26218
|
import { setTimeout } from "node:timers/promises";
|
|
26164
26219
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
26165
26220
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -26471,7 +26526,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
26471
26526
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
26472
26527
|
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");
|
|
26473
26528
|
|
|
26474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
26475
26530
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26476
26531
|
const { database } = context;
|
|
26477
26532
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26578,7 +26633,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26578
26633
|
};
|
|
26579
26634
|
}, "conversationsStoreOver");
|
|
26580
26635
|
|
|
26581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26582
26637
|
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";
|
|
26583
26638
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26584
26639
|
const { database } = context;
|
|
@@ -26603,7 +26658,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26603
26658
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26604
26659
|
}), "countersStoreOver");
|
|
26605
26660
|
|
|
26606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26607
26662
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26608
26663
|
var MENTION_QUERY = defineQuery({
|
|
26609
26664
|
entity: "mention",
|
|
@@ -26819,7 +26874,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26819
26874
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26820
26875
|
}, "listPlaces");
|
|
26821
26876
|
|
|
26822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26823
26878
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26824
26879
|
const { database } = context;
|
|
26825
26880
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26854,7 +26909,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26854
26909
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26855
26910
|
}), "mentionsStoreOver");
|
|
26856
26911
|
|
|
26857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26858
26913
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26859
26914
|
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");
|
|
26860
26915
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26869,7 +26924,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26869
26924
|
}));
|
|
26870
26925
|
}, "documentLinkMessages");
|
|
26871
26926
|
|
|
26872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26873
26928
|
var stemmerFor = stemmerCache();
|
|
26874
26929
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26875
26930
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -26913,7 +26968,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
26913
26968
|
});
|
|
26914
26969
|
}, "laterSharingRare");
|
|
26915
26970
|
|
|
26916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26917
26972
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26918
26973
|
const { database } = context;
|
|
26919
26974
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -27048,7 +27103,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27048
27103
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
27049
27104
|
}), "messagesStoreOver");
|
|
27050
27105
|
|
|
27051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
27052
27107
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
27053
27108
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
27054
27109
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -27105,7 +27160,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
27105
27160
|
});
|
|
27106
27161
|
}, "personPreparation");
|
|
27107
27162
|
|
|
27108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
27109
27164
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
27110
27165
|
const id2 = Number(uid);
|
|
27111
27166
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -27113,7 +27168,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
27113
27168
|
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)));
|
|
27114
27169
|
}, "personSeenInAccounts");
|
|
27115
27170
|
|
|
27116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
27117
27172
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
27118
27173
|
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);
|
|
27119
27174
|
if (!row2)
|
|
@@ -27179,7 +27234,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
27179
27234
|
return { id: id2, personId, removed: true };
|
|
27180
27235
|
}, "removeNote");
|
|
27181
27236
|
|
|
27182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
27183
27238
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
27184
27239
|
const { database } = context;
|
|
27185
27240
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -27234,6 +27289,16 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27234
27289
|
personOf: /* @__PURE__ */ __name(async (identity) => personOf(context, identity), "personOf"),
|
|
27235
27290
|
personSeenInAccounts: /* @__PURE__ */ __name(async (uid, accountIds) => personSeenInAccounts(context, uid, accountIds), "personSeenInAccounts"),
|
|
27236
27291
|
personByUid: /* @__PURE__ */ __name(async (uid) => personByUid(context, uid), "personByUid"),
|
|
27292
|
+
add: /* @__PURE__ */ __name(async ({ name }) => {
|
|
27293
|
+
const text5 = typeof name === "string" ? name.trim() : "";
|
|
27294
|
+
if (!text5 || text5.length > 200)
|
|
27295
|
+
throw new CliError("validation_error", "a person's name takes 1\u2013200 characters");
|
|
27296
|
+
const id2 = write(database, () => {
|
|
27297
|
+
const at = context.now();
|
|
27298
|
+
return Number(database.prepare("INSERT INTO persons (name, owner, created_at, updated_at) VALUES (?, 0, ?, ?) RETURNING id").get(text5, at, at)?.id);
|
|
27299
|
+
});
|
|
27300
|
+
return personByUid(context, String(id2));
|
|
27301
|
+
}, "add"),
|
|
27237
27302
|
owner: /* @__PURE__ */ __name(async () => {
|
|
27238
27303
|
try {
|
|
27239
27304
|
return personByUid(context, String(ownerPerson(database).id));
|
|
@@ -27254,13 +27319,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27254
27319
|
};
|
|
27255
27320
|
}, "peopleStoreOver");
|
|
27256
27321
|
|
|
27257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27258
27323
|
import { createHash as createHash8 } from "node:crypto";
|
|
27259
27324
|
|
|
27260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27261
27326
|
import { createHash as createHash7 } from "node:crypto";
|
|
27262
27327
|
|
|
27263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
27264
27329
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
27265
27330
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
27266
27331
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -27482,7 +27547,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
27482
27547
|
};
|
|
27483
27548
|
}, "rankReplyGraph");
|
|
27484
27549
|
|
|
27485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27486
27551
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
27487
27552
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
27488
27553
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27656,7 +27721,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27656
27721
|
return { items, evidence, summary, graph: graph.quality };
|
|
27657
27722
|
}, "calculateAdminStatistics");
|
|
27658
27723
|
|
|
27659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27660
27725
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27661
27726
|
const dates = [];
|
|
27662
27727
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27678,7 +27743,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27678
27743
|
return dates[0].node.resolution.date;
|
|
27679
27744
|
}, "rankingContextRange");
|
|
27680
27745
|
|
|
27681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27682
27747
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27683
27748
|
let counts;
|
|
27684
27749
|
try {
|
|
@@ -27973,7 +28038,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27973
28038
|
});
|
|
27974
28039
|
}, "rankQuery");
|
|
27975
28040
|
|
|
27976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27977
28042
|
function fail4(message2, reason = "query.too-large") {
|
|
27978
28043
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27979
28044
|
}
|
|
@@ -28150,7 +28215,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
28150
28215
|
return result;
|
|
28151
28216
|
}), "adminStatisticsQuery");
|
|
28152
28217
|
|
|
28153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
28154
28219
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
28155
28220
|
if (!execution.accounts.length)
|
|
28156
28221
|
return { conversations: [], chats: [] };
|
|
@@ -28168,7 +28233,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
28168
28233
|
return { conversations: conversations2, chats: chats2 };
|
|
28169
28234
|
}, "conversationEligibility");
|
|
28170
28235
|
|
|
28171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
28172
28237
|
import { createHash as createHash9 } from "node:crypto";
|
|
28173
28238
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
28174
28239
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -28318,7 +28383,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
28318
28383
|
return result;
|
|
28319
28384
|
}, "rankingEvidence");
|
|
28320
28385
|
|
|
28321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
28322
28387
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
28323
28388
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
28324
28389
|
if (execution.corpus === "mail")
|
|
@@ -28337,7 +28402,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28337
28402
|
};
|
|
28338
28403
|
}, "queriesStoreOver");
|
|
28339
28404
|
|
|
28340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
28341
28406
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
28342
28407
|
const { database, now: now2 } = context;
|
|
28343
28408
|
const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
|
|
@@ -28376,10 +28441,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
28376
28441
|
}));
|
|
28377
28442
|
}, "chatEventsOf");
|
|
28378
28443
|
|
|
28379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28380
28445
|
import { createHash as createHash10 } from "node:crypto";
|
|
28381
28446
|
|
|
28382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
28383
28448
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
28384
28449
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
28385
28450
|
timeZone: zone,
|
|
@@ -28394,7 +28459,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
28394
28459
|
};
|
|
28395
28460
|
}, "calendarKey");
|
|
28396
28461
|
|
|
28397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
28398
28463
|
var RETENTION_TOLERANCE = 864e5;
|
|
28399
28464
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
28400
28465
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -28448,7 +28513,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
28448
28513
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
28449
28514
|
}, "retentionCohorts");
|
|
28450
28515
|
|
|
28451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28452
28517
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
28453
28518
|
var week = /* @__PURE__ */ __name((day) => {
|
|
28454
28519
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -28584,7 +28649,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
28584
28649
|
};
|
|
28585
28650
|
}, "retentionQuery");
|
|
28586
28651
|
|
|
28587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
28588
28653
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
28589
28654
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
28590
28655
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28715,7 +28780,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28715
28780
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28716
28781
|
})), "trackedChats");
|
|
28717
28782
|
|
|
28718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28719
28784
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28720
28785
|
const { database } = context;
|
|
28721
28786
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28771,7 +28836,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28771
28836
|
};
|
|
28772
28837
|
}, "rosterStoreOver");
|
|
28773
28838
|
|
|
28774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28775
28840
|
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");
|
|
28776
28841
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28777
28842
|
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 ?`);
|
|
@@ -28795,7 +28860,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28795
28860
|
}
|
|
28796
28861
|
}, "backfillNormalized");
|
|
28797
28862
|
|
|
28798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28799
28864
|
var INDEX2 = "message_words";
|
|
28800
28865
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28801
28866
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28922,7 +28987,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28922
28987
|
});
|
|
28923
28988
|
}, "resetSearchIndex");
|
|
28924
28989
|
|
|
28925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28926
28991
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28927
28992
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28928
28993
|
const before2 = stemsState(database);
|
|
@@ -29017,7 +29082,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
29017
29082
|
return resetStems(database, { now: now2 });
|
|
29018
29083
|
}, "followDefaultStemmers");
|
|
29019
29084
|
|
|
29020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
29021
29086
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
29022
29087
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
29023
29088
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -29039,7 +29104,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
29039
29104
|
});
|
|
29040
29105
|
}, "termCandidates");
|
|
29041
29106
|
|
|
29042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
29043
29108
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29044
29109
|
const { database } = context;
|
|
29045
29110
|
const stemmerFor2 = stemmerCache();
|
|
@@ -29061,7 +29126,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29061
29126
|
};
|
|
29062
29127
|
}, "searchIndexStoreOver");
|
|
29063
29128
|
|
|
29064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
29065
29130
|
var HISTORY_KEPT = 1e3;
|
|
29066
29131
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
29067
29132
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -29130,7 +29195,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
29130
29195
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
29131
29196
|
}, "clearHistory");
|
|
29132
29197
|
|
|
29133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
29134
29199
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29135
29200
|
const { database } = context;
|
|
29136
29201
|
return {
|
|
@@ -29154,7 +29219,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29154
29219
|
};
|
|
29155
29220
|
}, "searchesStoreOver");
|
|
29156
29221
|
|
|
29157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
29158
29223
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
29159
29224
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
29160
29225
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -29197,7 +29262,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
29197
29262
|
};
|
|
29198
29263
|
}, "agentActionsStoreOver");
|
|
29199
29264
|
|
|
29200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
29201
29266
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
29202
29267
|
}) => {
|
|
29203
29268
|
const { database, now: now2 } = context;
|
|
@@ -29256,8 +29321,15 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
29256
29321
|
};
|
|
29257
29322
|
}, "botUpdateStoreOver");
|
|
29258
29323
|
|
|
29259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
29260
29325
|
var DAY4 = 864e5;
|
|
29326
|
+
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
29327
|
+
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
29328
|
+
throw new CliError("validation_error", "an event filter takes accountId or accountIds, not both");
|
|
29329
|
+
if (filter.accountIds?.length === 0)
|
|
29330
|
+
throw new CliError("validation_error", "accountIds names no account");
|
|
29331
|
+
return filter.accountIds ?? (filter.accountId === void 0 ? void 0 : [filter.accountId]);
|
|
29332
|
+
}, "accountsOf");
|
|
29261
29333
|
var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
29262
29334
|
const clauses = ["e.deleted_at IS NULL"];
|
|
29263
29335
|
const params = [];
|
|
@@ -29293,20 +29365,21 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29293
29365
|
clauses.push(entries("ce.calendar_id = ?"));
|
|
29294
29366
|
params.push(filter.calendarId);
|
|
29295
29367
|
}
|
|
29296
|
-
|
|
29297
|
-
|
|
29298
|
-
|
|
29299
|
-
|
|
29368
|
+
const accounts2 = accountsOf(filter);
|
|
29369
|
+
const inAccounts = /* @__PURE__ */ __name((column2) => {
|
|
29370
|
+
if (accounts2 === void 0)
|
|
29371
|
+
return "";
|
|
29372
|
+
for (const id2 of accounts2)
|
|
29373
|
+
params.push(id2);
|
|
29374
|
+
return `${column2} IN (${accounts2.map(() => "?").join(", ")})`;
|
|
29375
|
+
}, "inAccounts");
|
|
29376
|
+
if (accounts2 !== void 0)
|
|
29377
|
+
clauses.push(entries(inAccounts("c.account_id")));
|
|
29300
29378
|
if (filter.personId !== void 0) {
|
|
29301
29379
|
clauses.push(entries("EXISTS (SELECT 1 FROM calendar_entry_participants p JOIN identity_links il ON il.identity_id = p.identity_id WHERE p.entry_id = ce.id AND il.person_id = ?)"));
|
|
29302
29380
|
params.push(filter.personId);
|
|
29303
29381
|
}
|
|
29304
|
-
const account = /* @__PURE__ */ __name((alias2) => {
|
|
29305
|
-
if (filter.accountId === void 0)
|
|
29306
|
-
return "";
|
|
29307
|
-
params.push(filter.accountId);
|
|
29308
|
-
return ` AND ${alias2}.account_id = ?`;
|
|
29309
|
-
}, "account");
|
|
29382
|
+
const account = /* @__PURE__ */ __name((alias2) => accounts2 === void 0 ? "" : ` AND ${inAccounts(`${alias2}.account_id`)}`, "account");
|
|
29310
29383
|
if (filter.changedSince !== void 0) {
|
|
29311
29384
|
const since = filter.changedSince;
|
|
29312
29385
|
const own = account("c");
|
|
@@ -29323,16 +29396,18 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29323
29396
|
OR r.ends_at IS NOT ce.ends_at FROM calendar_entry_revisions r WHERE r.entry_id = ce.id AND r.created_at >= ?
|
|
29324
29397
|
ORDER BY r.created_at, r.id LIMIT 1) = 1)))`);
|
|
29325
29398
|
}
|
|
29326
|
-
if (filter.overlapping) {
|
|
29399
|
+
if (filter.overlapping !== void 0) {
|
|
29327
29400
|
const busy = /* @__PURE__ */ __name((event) => `${event}.deleted_at IS NULL AND ${event}.status <> 'cancelled' AND ${event}.all_day = 0
|
|
29328
29401
|
AND ${event}.starts_at IS NOT NULL AND ${event}.ends_at IS NOT NULL AND EXISTS (SELECT 1 FROM calendar_entries
|
|
29329
29402
|
bce JOIN calendars bc ON bc.id = bce.calendar_id WHERE bce.event_id = ${event}.id${account("bc")}
|
|
29330
29403
|
AND bce.deleted_at IS NULL AND bce.status <> 'cancelled' AND coalesce(bce.own_response, '') <> 'declined'
|
|
29331
|
-
AND coalesce(bce.transparency, '') <> 'transparent'
|
|
29404
|
+
AND coalesce(bce.transparency, '') <> 'transparent'
|
|
29405
|
+
AND coalesce(bce.event_type, '') <> 'working-location')`, "busy");
|
|
29332
29406
|
const own = busy("e");
|
|
29333
29407
|
params.push(longest());
|
|
29334
|
-
|
|
29335
|
-
AND e2.ends_at > e.starts_at AND e2.starts_at >= e.starts_at - ? AND ${busy("e2")})
|
|
29408
|
+
const clash = `${own} AND EXISTS (SELECT 1 FROM events e2 WHERE e2.id <> e.id AND e2.starts_at < e.ends_at
|
|
29409
|
+
AND e2.ends_at > e.starts_at AND e2.starts_at >= e.starts_at - ? AND ${busy("e2")})`;
|
|
29410
|
+
clauses.push(filter.overlapping ? clash : `NOT (${clash})`);
|
|
29336
29411
|
}
|
|
29337
29412
|
const limit = filter.limit ?? 100;
|
|
29338
29413
|
const offset = filter.offset ?? 0;
|
|
@@ -29341,7 +29416,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29341
29416
|
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);
|
|
29342
29417
|
}, "listEvents");
|
|
29343
29418
|
|
|
29344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
29345
29420
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
29346
29421
|
id: Number(row2.id),
|
|
29347
29422
|
accountId: Number(row2.account_id),
|
|
@@ -29921,7 +29996,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29921
29996
|
};
|
|
29922
29997
|
}, "eventStoreOver");
|
|
29923
29998
|
|
|
29924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29925
30000
|
var CATALOG_QUERY = defineQuery({
|
|
29926
30001
|
entity: "document",
|
|
29927
30002
|
backend: "sql",
|
|
@@ -30163,7 +30238,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30163
30238
|
};
|
|
30164
30239
|
}, "catalogStoreOver");
|
|
30165
30240
|
|
|
30166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
30167
30242
|
import { createHash as createHash11 } from "node:crypto";
|
|
30168
30243
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
30169
30244
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -30261,7 +30336,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
30261
30336
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
30262
30337
|
}, "contextEvidenceRequest");
|
|
30263
30338
|
|
|
30264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
30265
30340
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
30266
30341
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
30267
30342
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -30274,7 +30349,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
30274
30349
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
30275
30350
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
30276
30351
|
|
|
30277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
30278
30353
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
30279
30354
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
30280
30355
|
signal?.throwIfAborted();
|
|
@@ -30373,7 +30448,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
30373
30448
|
});
|
|
30374
30449
|
}, "readMeetingContextEvidence");
|
|
30375
30450
|
|
|
30376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
30377
30452
|
var corpora = {
|
|
30378
30453
|
message: {
|
|
30379
30454
|
table: "messages",
|
|
@@ -30584,6 +30659,16 @@ var contextRecordOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
|
30584
30659
|
revision: row3.revision == null ? null : Number(row3.revision)
|
|
30585
30660
|
} : null;
|
|
30586
30661
|
}
|
|
30662
|
+
const note2 = /^note:([1-9]\d*)$/.exec(ref3);
|
|
30663
|
+
if (note2) {
|
|
30664
|
+
const row3 = database.prepare("SELECT title, body, revision FROM notes WHERE id=? AND deleted_at IS NULL").get(Number(note2[1]));
|
|
30665
|
+
return row3 ? {
|
|
30666
|
+
ref: ref3,
|
|
30667
|
+
title: row3.title == null ? null : String(row3.title),
|
|
30668
|
+
text: String(row3.body),
|
|
30669
|
+
revision: Number(row3.revision)
|
|
30670
|
+
} : null;
|
|
30671
|
+
}
|
|
30587
30672
|
let at;
|
|
30588
30673
|
try {
|
|
30589
30674
|
at = parseLocator(ref3);
|
|
@@ -30602,7 +30687,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30602
30687
|
}
|
|
30603
30688
|
}), "contextRecordsOver");
|
|
30604
30689
|
|
|
30605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30690
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
30606
30691
|
var NOTE_FIELDS = [
|
|
30607
30692
|
"text",
|
|
30608
30693
|
"exact",
|
|
@@ -31032,7 +31117,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31032
31117
|
};
|
|
31033
31118
|
}, "noteSearchOver");
|
|
31034
31119
|
|
|
31035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
31036
31121
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
31037
31122
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
31038
31123
|
var EVENT_CORPUS = {
|
|
@@ -31164,20 +31249,26 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31164
31249
|
};
|
|
31165
31250
|
}, "eventSearchOver");
|
|
31166
31251
|
|
|
31167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31168
31253
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31169
31254
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31170
|
-
if (/^document:[1-9]\d*$/.test(raw))
|
|
31255
|
+
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
31171
31256
|
return raw;
|
|
31172
31257
|
try {
|
|
31173
31258
|
return formatLocator(parseLocator(raw));
|
|
31174
31259
|
} catch {
|
|
31175
|
-
throw new CliError("validation_error", "finding evidence is a msg: or
|
|
31260
|
+
throw new CliError("validation_error", "finding evidence is a msg:, document: or note: reference");
|
|
31176
31261
|
}
|
|
31177
31262
|
}, "reference");
|
|
31178
|
-
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, {
|
|
31263
|
+
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, {
|
|
31264
|
+
plural: "evidence findings",
|
|
31265
|
+
singular: "evidence finding",
|
|
31266
|
+
cited: "reference",
|
|
31267
|
+
reference,
|
|
31268
|
+
anySubject: true
|
|
31269
|
+
}), "validateEvidenceFindings");
|
|
31179
31270
|
|
|
31180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
31181
31272
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
31182
31273
|
try {
|
|
31183
31274
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -31189,7 +31280,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
31189
31280
|
}
|
|
31190
31281
|
}, "calendarMoment");
|
|
31191
31282
|
|
|
31192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
31193
31284
|
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";
|
|
31194
31285
|
var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31195
31286
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31338,7 +31429,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31338
31429
|
};
|
|
31339
31430
|
}, "factsStoreOver");
|
|
31340
31431
|
|
|
31341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
31342
31433
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
31343
31434
|
throw new CliError("validation_error", message2);
|
|
31344
31435
|
}, "invalid");
|
|
@@ -31354,13 +31445,19 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31354
31445
|
const cited = /* @__PURE__ */ __name((input, cite) => {
|
|
31355
31446
|
const seen = /* @__PURE__ */ new Map();
|
|
31356
31447
|
for (const finding of input.findings) {
|
|
31357
|
-
|
|
31358
|
-
if (project
|
|
31359
|
-
|
|
31360
|
-
|
|
31361
|
-
|
|
31362
|
-
|
|
31363
|
-
|
|
31448
|
+
let projectId2 = null;
|
|
31449
|
+
if (finding.project !== void 0) {
|
|
31450
|
+
const project = requiredThing(database, finding.project, "the project");
|
|
31451
|
+
if (project.type !== "project")
|
|
31452
|
+
return invalid2("a finding needs an owner project");
|
|
31453
|
+
const projectRow = database.prepare("SELECT id,key,name,description,type,scope,updated_at FROM projects WHERE id=? AND account_id IS NULL AND deleted_at IS NULL").get(project.id);
|
|
31454
|
+
if (!projectRow)
|
|
31455
|
+
throw new CliError("not_found", "the owner project is unavailable");
|
|
31456
|
+
seen.set(finding.project, projectRow);
|
|
31457
|
+
projectId2 = String(project.id);
|
|
31458
|
+
}
|
|
31459
|
+
if (finding.subject !== void 0)
|
|
31460
|
+
seen.set(finding.subject, requiredThing(database, finding.subject, "the subject"));
|
|
31364
31461
|
if (finding.kind === "task" && finding.assignee) {
|
|
31365
31462
|
const person2 = requiredThing(database, finding.assignee, "the assignee");
|
|
31366
31463
|
if (person2.type !== "person")
|
|
@@ -31371,7 +31468,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31371
31468
|
seen.set(finding.assignee, personRow);
|
|
31372
31469
|
}
|
|
31373
31470
|
for (const evidence of finding.evidence)
|
|
31374
|
-
cite(evidence, finding,
|
|
31471
|
+
cite(evidence, finding, projectId2, seen);
|
|
31375
31472
|
}
|
|
31376
31473
|
return seen;
|
|
31377
31474
|
}, "cited");
|
|
@@ -31387,12 +31484,15 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31387
31484
|
const fact = facts2.add({
|
|
31388
31485
|
type: finding.type,
|
|
31389
31486
|
statement: finding.statement,
|
|
31390
|
-
project: finding.project,
|
|
31487
|
+
...finding.project === void 0 ? {} : { project: finding.project },
|
|
31488
|
+
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
31391
31489
|
evidence,
|
|
31392
31490
|
by: agent
|
|
31393
31491
|
});
|
|
31394
31492
|
return facts2.accept(fact.ref).ref;
|
|
31395
31493
|
}
|
|
31494
|
+
if (finding.project === void 0)
|
|
31495
|
+
return invalid2("a task finding names the project the task goes in");
|
|
31396
31496
|
const task = tasks2.create({
|
|
31397
31497
|
project: finding.project,
|
|
31398
31498
|
title: finding.title,
|
|
@@ -31428,7 +31528,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31428
31528
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
31429
31529
|
}, "findingsCoreOver");
|
|
31430
31530
|
|
|
31431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31432
31532
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31433
31533
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31434
31534
|
var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31575,7 +31675,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31575
31675
|
};
|
|
31576
31676
|
}, "proposedActionsStoreOver");
|
|
31577
31677
|
|
|
31578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
31579
31679
|
var stale = /* @__PURE__ */ __name(() => {
|
|
31580
31680
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
31581
31681
|
reason: "evidence-findings.stale"
|
|
@@ -31599,13 +31699,15 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31599
31699
|
return invalid3("stored findings exceed the read budget");
|
|
31600
31700
|
return proposals.get(id2);
|
|
31601
31701
|
}, "load");
|
|
31702
|
+
const projectOf2 = /* @__PURE__ */ __name((input) => input.findings.find((finding) => finding.project)?.project ?? null, "projectOf");
|
|
31602
31703
|
const view = /* @__PURE__ */ __name((proposal) => {
|
|
31603
31704
|
const input = proposal.payload;
|
|
31604
|
-
if (!input || !
|
|
31705
|
+
if (!input || !["proposed", "approved", "rejected"].includes(proposal.status))
|
|
31605
31706
|
return invalid3("invalid stored findings batch");
|
|
31606
31707
|
return {
|
|
31607
31708
|
id: proposal.id,
|
|
31608
|
-
project:
|
|
31709
|
+
project: projectOf2(input),
|
|
31710
|
+
subject: proposal.target,
|
|
31609
31711
|
input: { schemaVersion: 1, key: input.key, extractor: input.extractor, findings: input.findings },
|
|
31610
31712
|
fingerprint: findingHash({ input, author: proposal.proposedBy.id }),
|
|
31611
31713
|
status: proposal.status === "proposed" ? "proposed" : "reviewed",
|
|
@@ -31658,9 +31760,12 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31658
31760
|
return {
|
|
31659
31761
|
stage: /* @__PURE__ */ __name(async (raw, rawAgent) => {
|
|
31660
31762
|
const input = validateEvidenceFindings(raw);
|
|
31661
|
-
const projects2 = new Set(input.findings.
|
|
31662
|
-
if (projects2.size
|
|
31663
|
-
return invalid3("an evidence findings batch is about one project");
|
|
31763
|
+
const projects2 = new Set(input.findings.flatMap((finding) => finding.project ?? []));
|
|
31764
|
+
if (projects2.size > 1)
|
|
31765
|
+
return invalid3("an evidence findings batch is about one project at most");
|
|
31766
|
+
const subjects = new Set(input.findings.map((finding) => finding.subject));
|
|
31767
|
+
const shared = subjects.size === 1 ? [...subjects][0] : void 0;
|
|
31768
|
+
const target = shared ?? [...projects2][0];
|
|
31664
31769
|
const by = findingsAgent(rawAgent);
|
|
31665
31770
|
return write(database, () => {
|
|
31666
31771
|
const { actor } = authorActor(context, by);
|
|
@@ -31680,7 +31785,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31680
31785
|
return view(proposals.propose({
|
|
31681
31786
|
kind: EVIDENCE_FINDINGS_KIND,
|
|
31682
31787
|
by,
|
|
31683
|
-
target:
|
|
31788
|
+
...target === void 0 ? {} : { target },
|
|
31684
31789
|
payload: { ...input, inputHash, snapshotHash, snapshotParts, agentModel: by.model ?? null }
|
|
31685
31790
|
}));
|
|
31686
31791
|
});
|
|
@@ -31695,7 +31800,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31695
31800
|
const projectId2 = project === void 0 ? null : /^project:([1-9]\d*)$/.exec(project)?.[1];
|
|
31696
31801
|
if (projectId2 === void 0)
|
|
31697
31802
|
return invalid3("a findings list filters by a project reference");
|
|
31698
|
-
const ids = database.prepare("SELECT id FROM proposed_actions WHERE account_id IS NULL AND kind=? AND (? IS NULL OR (target_type='project' AND target_id=?)) AND (? IS NULL OR status=?) ORDER BY id DESC LIMIT ? OFFSET ?").all(EVIDENCE_FINDINGS_KIND, projectId2, projectId2 === null ? null : Number(projectId2), status ?? null, status === "reviewed" ? "approved" : status ?? null, limit + 1, offset);
|
|
31803
|
+
const ids = database.prepare("SELECT id FROM proposed_actions WHERE account_id IS NULL AND kind=? AND (? IS NULL OR (target_type='project' AND target_id=?) OR EXISTS (SELECT 1 FROM json_each(payload,'$.findings') f WHERE json_extract(f.value,'$.project')=?)) AND (? IS NULL OR status=?) ORDER BY id DESC LIMIT ? OFFSET ?").all(EVIDENCE_FINDINGS_KIND, projectId2, projectId2 === null ? null : Number(projectId2), projectId2 === null ? null : `project:${projectId2}`, status ?? null, status === "reviewed" ? "approved" : status ?? null, limit + 1, offset);
|
|
31699
31804
|
return { items: ids.slice(0, limit).map((row2) => view(load(String(row2.id)))), hasMore: ids.length > limit };
|
|
31700
31805
|
}, "list"),
|
|
31701
31806
|
review: /* @__PURE__ */ __name(async (id2, decision) => write(database, () => {
|
|
@@ -31742,7 +31847,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31742
31847
|
};
|
|
31743
31848
|
}, "evidenceFindingsStoreOver");
|
|
31744
31849
|
|
|
31745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31746
31851
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31747
31852
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31748
31853
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31795,7 +31900,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31795
31900
|
}, "forPerson")
|
|
31796
31901
|
}), "involvementStoreOver");
|
|
31797
31902
|
|
|
31798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31799
31904
|
import { createHash as createHash12 } from "node:crypto";
|
|
31800
31905
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31801
31906
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31881,16 +31986,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31881
31986
|
};
|
|
31882
31987
|
}, "meetingProjectsStoreOver");
|
|
31883
31988
|
|
|
31884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31885
31990
|
import { createHash as createHash15 } from "node:crypto";
|
|
31886
31991
|
|
|
31887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31888
31993
|
import { createHash as createHash14 } from "node:crypto";
|
|
31889
31994
|
|
|
31890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31891
31996
|
import { createHash as createHash13 } from "node:crypto";
|
|
31892
31997
|
|
|
31893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31894
31999
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
31895
32000
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31896
32001
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -31941,7 +32046,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31941
32046
|
return input;
|
|
31942
32047
|
}, "consolidationApplyInput");
|
|
31943
32048
|
|
|
31944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31945
32050
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31946
32051
|
id: String(row2.id),
|
|
31947
32052
|
sourceId: String(row2.source_id),
|
|
@@ -32016,7 +32121,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
32016
32121
|
}, { beforeCommit: check3 });
|
|
32017
32122
|
}, "applyTagConsolidation");
|
|
32018
32123
|
|
|
32019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
32020
32125
|
var selections = [
|
|
32021
32126
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
32022
32127
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -32160,7 +32265,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
32160
32265
|
};
|
|
32161
32266
|
}, "previewRows");
|
|
32162
32267
|
|
|
32163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32164
32269
|
var kinds = ["project", "tag", "topic"];
|
|
32165
32270
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
32166
32271
|
if (signal?.aborted)
|
|
@@ -32424,7 +32529,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32424
32529
|
};
|
|
32425
32530
|
}, "vocabularyStoreOver");
|
|
32426
32531
|
|
|
32427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
32428
32533
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
32429
32534
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
32430
32535
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32946,7 +33051,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32946
33051
|
return key2.padEnd(3, "X");
|
|
32947
33052
|
}, "projectKey");
|
|
32948
33053
|
|
|
32949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32950
33055
|
var DAY5 = 864e5;
|
|
32951
33056
|
var SETTING4 = "logs_pruned_at";
|
|
32952
33057
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -32973,7 +33078,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32973
33078
|
};
|
|
32974
33079
|
}, "logPruner");
|
|
32975
33080
|
|
|
32976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32977
33082
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32978
33083
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32979
33084
|
reason: "meeting-findings.stale"
|
|
@@ -33142,7 +33247,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33142
33247
|
};
|
|
33143
33248
|
}, "meetingFindingsStoreOver");
|
|
33144
33249
|
|
|
33145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
33146
33251
|
var RANK_BATCH = 512;
|
|
33147
33252
|
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";
|
|
33148
33253
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -33413,7 +33518,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
33413
33518
|
}
|
|
33414
33519
|
}), "meetingVectorsOver");
|
|
33415
33520
|
|
|
33416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
33417
33522
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
33418
33523
|
var TEXTS = {
|
|
33419
33524
|
document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
|
|
@@ -33514,11 +33619,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33514
33619
|
};
|
|
33515
33620
|
}, "sourceMentionStoreOver");
|
|
33516
33621
|
|
|
33517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33518
33623
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
33519
33624
|
import { dirname } from "node:path";
|
|
33520
33625
|
|
|
33521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
33522
33627
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
33523
33628
|
var CLIENTS_SETTING = "clients";
|
|
33524
33629
|
var coreVersion = (() => {
|
|
@@ -33576,7 +33681,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
33576
33681
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
33577
33682
|
}, "refusalAdvice");
|
|
33578
33683
|
|
|
33579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
33580
33685
|
var GENERATED = [
|
|
33581
33686
|
{
|
|
33582
33687
|
"name": "20261010184427_initial",
|
|
@@ -34472,7 +34577,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
34472
34577
|
}
|
|
34473
34578
|
];
|
|
34474
34579
|
|
|
34475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
34476
34581
|
var MANIFEST = [
|
|
34477
34582
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
34478
34583
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -34553,7 +34658,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
34553
34658
|
return migrations;
|
|
34554
34659
|
}, "generatedMigrations");
|
|
34555
34660
|
|
|
34556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
34557
34662
|
var MIGRATIONS = generatedMigrations();
|
|
34558
34663
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
34559
34664
|
version INTEGER PRIMARY KEY,
|
|
@@ -34606,7 +34711,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
34606
34711
|
}
|
|
34607
34712
|
}, "migrate");
|
|
34608
34713
|
|
|
34609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
34610
34715
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
34611
34716
|
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 ?");
|
|
34612
34717
|
if (pending.get(0, 1) === void 0)
|
|
@@ -34628,7 +34733,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
34628
34733
|
}
|
|
34629
34734
|
}, "fillJoinKeys");
|
|
34630
34735
|
|
|
34631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
34632
34737
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
34633
34738
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
34634
34739
|
try {
|
|
@@ -34641,8 +34746,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
34641
34746
|
}, "openSqlite");
|
|
34642
34747
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34643
34748
|
quietSqliteWarning();
|
|
34644
|
-
const { drizzle } = await import("./node-
|
|
34645
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
34749
|
+
const { drizzle } = await import("./node-NYBBFHGN.js");
|
|
34750
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-CWCNWO75.js");
|
|
34646
34751
|
const client = await nodeClient(path, { readOnly });
|
|
34647
34752
|
try {
|
|
34648
34753
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34652,8 +34757,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34652
34757
|
}
|
|
34653
34758
|
}, "openUnderNode");
|
|
34654
34759
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34655
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
34656
|
-
const { drizzle } = await import("./bun-
|
|
34760
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-ELSRSJBM.js");
|
|
34761
|
+
const { drizzle } = await import("./bun-2KRUBPIN.js");
|
|
34657
34762
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
34658
34763
|
try {
|
|
34659
34764
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34663,7 +34768,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34663
34768
|
}
|
|
34664
34769
|
}, "openUnderBun");
|
|
34665
34770
|
|
|
34666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
34667
34772
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
34668
34773
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
34669
34774
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -34678,7 +34783,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
34678
34783
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
34679
34784
|
}, "assertReadCompatible");
|
|
34680
34785
|
|
|
34681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
34682
34787
|
var BACKFILL_ON_OPEN = 5e3;
|
|
34683
34788
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
34684
34789
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34734,13 +34839,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34734
34839
|
}
|
|
34735
34840
|
}, "openStoreContext");
|
|
34736
34841
|
|
|
34737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34738
34843
|
import { createHash as createHash17 } from "node:crypto";
|
|
34739
34844
|
|
|
34740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34741
34846
|
import { createHash as createHash16 } from "node:crypto";
|
|
34742
34847
|
|
|
34743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34744
34849
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34745
34850
|
var ref = text3(2048);
|
|
34746
34851
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34806,7 +34911,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34806
34911
|
}))
|
|
34807
34912
|
});
|
|
34808
34913
|
|
|
34809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34810
34915
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34811
34916
|
var invalid5 = /* @__PURE__ */ __name((field4) => {
|
|
34812
34917
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -34939,7 +35044,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34939
35044
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
34940
35045
|
}, "projectAnnotationsFingerprint");
|
|
34941
35046
|
|
|
34942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34943
35048
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34944
35049
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34945
35050
|
var targetSchema = strictObject({
|
|
@@ -35046,7 +35151,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
35046
35151
|
}, "planBoundProjectAnnotations");
|
|
35047
35152
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
35048
35153
|
|
|
35049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
35050
35155
|
import { createHash as createHash18 } from "node:crypto";
|
|
35051
35156
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
35052
35157
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -35140,7 +35245,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
35140
35245
|
})).digest("hex");
|
|
35141
35246
|
}, "projectAnnotationSnapshotFingerprint");
|
|
35142
35247
|
|
|
35143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
35144
35249
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
35145
35250
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
35146
35251
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -35157,7 +35262,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
35157
35262
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
35158
35263
|
}, "projectAnnotationRequest");
|
|
35159
35264
|
|
|
35160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
35161
35266
|
var SnapshotBudget = class {
|
|
35162
35267
|
static {
|
|
35163
35268
|
__name(this, "SnapshotBudget");
|
|
@@ -35183,13 +35288,13 @@ var SnapshotBudget = class {
|
|
|
35183
35288
|
}
|
|
35184
35289
|
};
|
|
35185
35290
|
|
|
35186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35187
35292
|
import { createHash as createHash20 } from "node:crypto";
|
|
35188
35293
|
|
|
35189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
35190
35295
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
35191
35296
|
|
|
35192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
35193
35298
|
import { createHash as createHash19 } from "node:crypto";
|
|
35194
35299
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
35195
35300
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -35332,7 +35437,7 @@ var ProjectSnapshotSources = class {
|
|
|
35332
35437
|
}
|
|
35333
35438
|
};
|
|
35334
35439
|
|
|
35335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
35336
35441
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
35337
35442
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
35338
35443
|
}, "unsupported");
|
|
@@ -35503,7 +35608,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
35503
35608
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
35504
35609
|
}), "projectAnnotationSnapshot");
|
|
35505
35610
|
|
|
35506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35507
35612
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
35508
35613
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
35509
35614
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -35565,7 +35670,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
35565
35670
|
};
|
|
35566
35671
|
}), "previewAnnotationSnapshot");
|
|
35567
35672
|
|
|
35568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
35569
35674
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
35570
35675
|
const mappings = { ...bindings };
|
|
35571
35676
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -35607,7 +35712,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
35607
35712
|
return mappings;
|
|
35608
35713
|
}, "restoreAnnotationRecords");
|
|
35609
35714
|
|
|
35610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
35611
35716
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35612
35717
|
async preview(request) {
|
|
35613
35718
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -35637,7 +35742,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35637
35742
|
}
|
|
35638
35743
|
}), "projectAnnotationStoreOver");
|
|
35639
35744
|
|
|
35640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
35641
35746
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
35642
35747
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
35643
35748
|
let merged = { from: from2, to };
|
|
@@ -35650,7 +35755,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
35650
35755
|
}, "markRange");
|
|
35651
35756
|
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");
|
|
35652
35757
|
|
|
35653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
35654
35759
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
35655
35760
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
35656
35761
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -35660,7 +35765,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
35660
35765
|
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);
|
|
35661
35766
|
}, "setTaskRulesStop");
|
|
35662
35767
|
|
|
35663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
35664
35769
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35665
35770
|
const { database } = context;
|
|
35666
35771
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -35716,7 +35821,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35716
35821
|
};
|
|
35717
35822
|
}, "syncStoreOver");
|
|
35718
35823
|
|
|
35719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
35720
35825
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35721
35826
|
const { database } = context;
|
|
35722
35827
|
return {
|
|
@@ -35738,7 +35843,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35738
35843
|
};
|
|
35739
35844
|
}, "tagsStoreOver");
|
|
35740
35845
|
|
|
35741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35742
35847
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35743
35848
|
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
|
|
35744
35849
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35865,7 +35970,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35865
35970
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35866
35971
|
}, "savePictureChunks");
|
|
35867
35972
|
|
|
35868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35869
35974
|
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,
|
|
35870
35975
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35871
35976
|
FROM messages m
|
|
@@ -35954,7 +36059,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35954
36059
|
return plain2(best(found2));
|
|
35955
36060
|
}, "nearestMessages");
|
|
35956
36061
|
|
|
35957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35958
36063
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35959
36064
|
const { database } = context;
|
|
35960
36065
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -36212,7 +36317,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
36212
36317
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
36213
36318
|
}), "vectorsStoreOver");
|
|
36214
36319
|
|
|
36215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
36216
36321
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
36217
36322
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
36218
36323
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -36300,10 +36405,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
36300
36405
|
}
|
|
36301
36406
|
}, "lastBackup");
|
|
36302
36407
|
|
|
36303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
36304
36409
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
36305
36410
|
|
|
36306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
36307
36412
|
var COUNTED_TABLES = [
|
|
36308
36413
|
"accounts",
|
|
36309
36414
|
"chats",
|
|
@@ -36388,7 +36493,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
36388
36493
|
};
|
|
36389
36494
|
}, "storeContents");
|
|
36390
36495
|
|
|
36391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
36392
36497
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
36393
36498
|
const context = await openStoreContext(options);
|
|
36394
36499
|
try {
|