@wirecat/mail-cli 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +149 -0
- package/README.md +48 -13
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GR5JXYEQ.js → all-profiles-SI67TKZM.js} +9 -9
- package/dist/bundle/{anthropic-REBXE65F.js → anthropic-DALMLC3Y.js} +6 -6
- package/dist/bundle/{app-server-QJ7ICQXZ.js → app-server-XOH327Z2.js} +46 -46
- package/dist/bundle/{bun-WAX4QHW5.js → bun-ORL67CJ6.js} +2 -2
- package/dist/bundle/{bun-sqlite-5S7TQ4SG.js → bun-sqlite-DGXFNFHI.js} +5 -5
- package/dist/bundle/{chunk-ZD3WUGR2.js → chunk-23IEVVL2.js} +4 -4
- package/dist/bundle/{chunk-B5WSIWY5.js → chunk-2M4K7HYR.js} +17 -17
- package/dist/bundle/{chunk-IWDOGGMY.js → chunk-35KD2CI2.js} +501 -301
- package/dist/bundle/{chunk-7A7BHABA.js → chunk-3GZK5GTU.js} +1 -1
- package/dist/bundle/{chunk-JJBQPA7D.js → chunk-3TYEJRMZ.js} +4 -4
- package/dist/bundle/{chunk-M6BDHZON.js → chunk-45KA5667.js} +26 -13
- package/dist/bundle/{chunk-LOA4X6JW.js → chunk-4NYWHINR.js} +6 -6
- package/dist/bundle/{dist-KJOAJ6NF.js → chunk-4ULY3GDL.js} +16 -116
- package/dist/bundle/{chunk-2FXVBCA3.js → chunk-5BSEGMNE.js} +4 -4
- package/dist/bundle/{chunk-HCMUGUAG.js → chunk-5JEYIHS6.js} +3 -3
- package/dist/bundle/{chunk-QXOSGGKS.js → chunk-6LK7KTWB.js} +1 -1
- package/dist/bundle/{chunk-ESNNQA7D.js → chunk-6RMMAUUW.js} +28 -28
- package/dist/bundle/{chunk-VXAZZGXE.js → chunk-6XNPXAJU.js} +33 -27
- package/dist/bundle/{chunk-5INWLYBD.js → chunk-73OJJGZE.js} +14 -3
- package/dist/bundle/{chunk-4XJ4AM3K.js → chunk-7K6KJWTO.js} +12 -12
- package/dist/bundle/{chunk-KIDF77MA.js → chunk-AP7V256W.js} +1 -1
- package/dist/bundle/{chunk-4BMNP2FT.js → chunk-BEMLGWY4.js} +1 -1
- package/dist/bundle/{chunk-BFJV4FWJ.js → chunk-BGUMGCUY.js} +2 -2
- package/dist/bundle/{chunk-5BVIWP3S.js → chunk-BM445GYF.js} +2 -2
- package/dist/bundle/{chunk-F3NYA4KN.js → chunk-CAKBG5FC.js} +6 -6
- package/dist/bundle/{chunk-EB3R2PV3.js → chunk-DKQWTQVY.js} +23 -23
- package/dist/bundle/{chunk-6TY3DGCC.js → chunk-DXGMPMFP.js} +4 -4
- package/dist/bundle/{chunk-LFRHIXCF.js → chunk-E3DRM6YP.js} +3 -3
- package/dist/bundle/{chunk-FSUNGHRI.js → chunk-EYT33MM3.js} +47 -46
- package/dist/bundle/{chunk-DXDQOZ2P.js → chunk-FPOGVDLS.js} +2 -2
- package/dist/bundle/{chunk-S677WGOQ.js → chunk-FTFNWGIR.js} +8 -8
- package/dist/bundle/{chunk-TI6VBZKJ.js → chunk-FUB3X25H.js} +4 -4
- package/dist/bundle/{chunk-7JCRQX56.js → chunk-GJUUTUK4.js} +8 -8
- package/dist/bundle/{chunk-BLS5YG77.js → chunk-HFJNEXU7.js} +2 -2
- package/dist/bundle/{chunk-YKPBC3NL.js → chunk-HV3EIYX4.js} +1 -1
- package/dist/bundle/{chunk-EL554DV2.js → chunk-IYZHM3ZN.js} +3 -3
- package/dist/bundle/{chunk-6EO7GVYJ.js → chunk-JFMUI4H6.js} +1 -1
- package/dist/bundle/{chunk-2YQNBIDQ.js → chunk-LZ5J3UXD.js} +4 -4
- package/dist/bundle/{chunk-WNCCYHRV.js → chunk-M2JCUVCJ.js} +116 -95
- package/dist/bundle/{chunk-7F3NDIYL.js → chunk-MCJ7LKYR.js} +6 -6
- package/dist/bundle/{chunk-VDAIJM5L.js → chunk-MHQKHWCJ.js} +88 -34
- package/dist/bundle/{chunk-SQ7KOBRA.js → chunk-MMXMVGA6.js} +10 -8
- package/dist/bundle/{chunk-AFCGOZR7.js → chunk-NNIXREJH.js} +7 -7
- package/dist/bundle/{chunk-LQ37ALDJ.js → chunk-NXJLC2WK.js} +8 -8
- package/dist/bundle/{chunk-6GE3EADU.js → chunk-OHTR4WFO.js} +2 -2
- package/dist/bundle/{chunk-PJCTWPJB.js → chunk-PDL4UREY.js} +8 -8
- package/dist/bundle/{chunk-J3QXTBD2.js → chunk-Q2C3VMSU.js} +20 -18
- package/dist/bundle/{chunk-SWJAG5IE.js → chunk-Q44AYEOB.js} +2 -2
- package/dist/bundle/{chunk-P7P5MNAU.js → chunk-QZBT6BOU.js} +1 -1
- package/dist/bundle/{chunk-IBYTYIYO.js → chunk-R5MML3FC.js} +61 -54
- package/dist/bundle/{chunk-CEAANMJ2.js → chunk-RQVWZBW3.js} +3 -3
- package/dist/bundle/{chunk-5CXAH4Y6.js → chunk-S4YUR4S3.js} +656 -572
- package/dist/bundle/{chunk-QX7RCLRS.js → chunk-SQLCCKEL.js} +1 -1
- package/dist/bundle/chunk-U6UJ3HRS.js +58 -0
- package/dist/bundle/{chunk-YRGBZZUW.js → chunk-V4TDG4KF.js} +14 -14
- package/dist/bundle/{chunk-5FK6RD4M.js → chunk-VBOMKZ4E.js} +73 -57
- package/dist/bundle/{chunk-MQUJEQTU.js → chunk-VKPWP3AK.js} +2 -2
- package/dist/bundle/{chunk-7XNPSIWD.js → chunk-VNJMO5F6.js} +2 -2
- package/dist/bundle/{chunk-MMDCL42A.js → chunk-VSHJWTX5.js} +12 -6
- package/dist/bundle/{chunk-2MRECWJZ.js → chunk-XQJWMBDY.js} +6 -6
- package/dist/bundle/{chunk-2U4IANVV.js → chunk-ZKCNMW7G.js} +2 -2
- package/dist/bundle/{chunk-LNS27BTB.js → chunk-ZKZABB4K.js} +3 -3
- package/dist/bundle/{chunk-WNI5BZFB.js → chunk-ZNGQ3NZ4.js} +9 -9
- package/dist/bundle/command-contract-CB5BII3S.js +34 -0
- package/dist/bundle/{decode-D7BDVIVB.js → decode-KOBURZIQ.js} +5 -5
- package/dist/bundle/{dispatch-EUKKT3PD.js → dispatch-GDAH4JHS.js} +8 -8
- package/dist/bundle/dist-T7HMT675.js +134 -0
- package/dist/bundle/{echarts-IVRX7XHP.js → echarts-LEWTQO6H.js} +2 -2
- package/dist/bundle/{embed-X527RBTG.js → embed-PUFE4BSQ.js} +6 -6
- package/dist/bundle/{embedder-F4PSJS6S.js → embedder-3G4BQQ6X.js} +9 -9
- package/dist/bundle/{failure-OAIC5VAP.js → failure-6COJAO7T.js} +2 -2
- package/dist/bundle/{first-run-M5CIX6NA.js → first-run-FLXOC53U.js} +11 -11
- package/dist/bundle/first-screen-VUZEDSQW.js +32 -0
- package/dist/bundle/{instructions-UX36BT5F.js → instructions-HGSXDCBT.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-5Z7PS4F5.js} +2 -2
- package/dist/bundle/{node-sqlite-X2PSEHA4.js → node-sqlite-OAW7APIX.js} +5 -5
- package/dist/bundle/{oauth-MYK4BSYN.js → oauth-ZFZWPAJN.js} +7 -7
- package/dist/bundle/{open-GONIP2DH.js → open-ZQMBZVH4.js} +4 -4
- package/dist/bundle/{openai-YJFNUOQT.js → openai-XT2RIXAK.js} +14 -14
- package/dist/bundle/{process-7IEUUSRK.js → process-VVEQIHPE.js} +1 -1
- package/dist/bundle/{program-Q73TTG3E.js → program-RD3BBDNY.js} +21470 -7075
- package/dist/bundle/{prompt-SKQ72KN7.js → prompt-PU7GE4Z4.js} +5 -5
- package/dist/bundle/{recognize-GC7CU2DB.js → recognize-AG4A3KUK.js} +4 -4
- package/dist/bundle/{remote-UEXFZP2I.js → remote-D6TQ6T7F.js} +7 -7
- package/dist/bundle/{rerank-2U2NDEZP.js → rerank-GO24HJPF.js} +7 -7
- package/dist/bundle/{serve-OOGKFEWL.js → serve-WCHJAH6G.js} +9 -9
- package/dist/bundle/server-5KJJ3D6P.js +63 -0
- package/dist/bundle/{server-FZ3LFQTF.js → server-CAVNBG3P.js} +38 -38
- package/dist/bundle/{sqlite-runtime-GIQSW6LJ.js → sqlite-runtime-ANXC4AW2.js} +5 -5
- package/dist/bundle/{state-EMFXPQVZ.js → state-EGJ66A62.js} +6 -6
- package/dist/bundle/{store-BDU4UPNK.js → store-OON7FCMQ.js} +15 -15
- package/dist/bundle/{store-LDI62AUG.js → store-SBFA444C.js} +13 -13
- package/dist/bundle/store-maintenance-command-UEOJLYMJ.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 +21 -6
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +58 -7
- 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 +243 -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 +278 -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 +506 -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 +14 -3
- 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/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +107 -10
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +72 -9
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/stats.d.ts +3 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +89 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +28 -20
- 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 +15 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +52 -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 +104 -2
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/backend.js +4 -1
- package/dist/mail/backend.js.map +1 -1
- package/dist/mail/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 +110 -0
- package/dist/mail/compose.js.map +1 -0
- package/dist/mail/doctor.d.ts +67 -0
- package/dist/mail/doctor.d.ts.map +1 -0
- package/dist/mail/doctor.js +115 -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 +13 -3
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +87 -18
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +3 -3
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +14 -4
- 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 +55 -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 +9 -0
- package/dist/mail/save.d.ts.map +1 -0
- package/dist/mail/save.js +50 -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 +173 -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 +133 -0
- package/dist/mail/smtp.js.map +1 -0
- package/dist/oauth.d.ts +74 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +230 -0
- package/dist/oauth.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +26 -4
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +96 -9
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +69 -16
- 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 +27 -0
- package/dist/reasons.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -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-MCJ7LKYR.js";
|
|
35
35
|
import {
|
|
36
36
|
FACT_STATUSES,
|
|
37
37
|
FACT_TYPES,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
matches,
|
|
55
55
|
priorityBand,
|
|
56
56
|
priorityLabel
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-MMXMVGA6.js";
|
|
58
58
|
import {
|
|
59
59
|
CHAT_MESSAGES_READ,
|
|
60
60
|
MEETING_FINDINGS_KIND,
|
|
@@ -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-VBOMKZ4E.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-GJUUTUK4.js";
|
|
110
111
|
import {
|
|
111
112
|
DEFAULT_TASK_CATEGORIES,
|
|
112
113
|
sharedConfigPath,
|
|
113
114
|
storedTaskCategories,
|
|
114
115
|
taskCategoriesReader
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-4NYWHINR.js";
|
|
116
117
|
import {
|
|
117
118
|
PRAGMAS,
|
|
118
119
|
quietSqliteWarning,
|
|
119
120
|
storeCapable
|
|
120
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-XQJWMBDY.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-AP7V256W.js";
|
|
146
147
|
import {
|
|
147
148
|
storePath
|
|
148
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-Q44AYEOB.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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/account-store.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/phones.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/places.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/mentions.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/first-names.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/person-names.js
|
|
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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/attachments.js
|
|
13580
13581
|
var NOT_FILES = /* @__PURE__ */ new Set([
|
|
13581
13582
|
"webpage",
|
|
13582
13583
|
"share",
|
|
@@ -13587,6 +13588,14 @@ var NOT_FILES = /* @__PURE__ */ new Set([
|
|
|
13587
13588
|
"call",
|
|
13588
13589
|
"inline_keyboard"
|
|
13589
13590
|
]);
|
|
13591
|
+
var hitFiles = /* @__PURE__ */ __name((attachments2) => (attachments2 ?? []).flatMap(({ kind: kind3, name, size: size2 }, index2) => NOT_FILES.has(kind3) ? [] : [
|
|
13592
|
+
{
|
|
13593
|
+
position: index2 + 1,
|
|
13594
|
+
kind: kind3,
|
|
13595
|
+
...name === void 0 ? {} : { name },
|
|
13596
|
+
...size2 === void 0 ? {} : { size: size2 }
|
|
13597
|
+
}
|
|
13598
|
+
]), "hitFiles");
|
|
13590
13599
|
var storedKinds = /* @__PURE__ */ __name((kind3) => kind3 === "file" ? ["file", "document"] : [kind3], "storedKinds");
|
|
13591
13600
|
var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
13592
13601
|
const byPosition = new Map(stored3.map((one) => [one.position, one]));
|
|
@@ -13608,7 +13617,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
|
|
|
13608
13617
|
});
|
|
13609
13618
|
}, "matchDownloads");
|
|
13610
13619
|
|
|
13611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
|
|
13612
13621
|
var QUERY_VERSION = 1;
|
|
13613
13622
|
var QUERY_LIMITS2 = {
|
|
13614
13623
|
...QUERY_LIMITS,
|
|
@@ -13639,7 +13648,7 @@ function exhausted(budget) {
|
|
|
13639
13648
|
}
|
|
13640
13649
|
__name(exhausted, "exhausted");
|
|
13641
13650
|
|
|
13642
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
|
|
13643
13652
|
var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
|
|
13644
13653
|
var literal2 = /* @__PURE__ */ __name((c) => ({
|
|
13645
13654
|
kind: "char",
|
|
@@ -14039,7 +14048,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
|
|
|
14039
14048
|
return out;
|
|
14040
14049
|
}, "foldRegex");
|
|
14041
14050
|
|
|
14042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
|
|
14043
14052
|
var PRESET_VERSION = 1;
|
|
14044
14053
|
var PRESETS = {
|
|
14045
14054
|
password: {
|
|
@@ -14093,7 +14102,7 @@ var PRESETS = {
|
|
|
14093
14102
|
}
|
|
14094
14103
|
};
|
|
14095
14104
|
|
|
14096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
|
|
14097
14106
|
var FIELD_VERSION = 2;
|
|
14098
14107
|
var UNITS = {
|
|
14099
14108
|
"": 1,
|
|
@@ -14553,12 +14562,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
|
|
|
14553
14562
|
return validateFields(parsed2.output);
|
|
14554
14563
|
}, "validateAst");
|
|
14555
14564
|
|
|
14556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
|
|
14557
14566
|
var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
|
|
14558
14567
|
var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
|
|
14559
14568
|
var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
|
|
14560
14569
|
|
|
14561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
|
|
14562
14571
|
var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
|
|
14563
14572
|
var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
|
|
14564
14573
|
var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
@@ -14582,7 +14591,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
|
|
|
14582
14591
|
};
|
|
14583
14592
|
}, "linkMatch");
|
|
14584
14593
|
|
|
14585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
|
|
14586
14595
|
var SETTING = "phoneCountries";
|
|
14587
14596
|
var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
|
|
14588
14597
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
|
|
@@ -14613,7 +14622,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
|
|
|
14613
14622
|
return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
|
|
14614
14623
|
}, "valueMatch");
|
|
14615
14624
|
|
|
14616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
|
|
14617
14626
|
var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
|
|
14618
14627
|
if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
|
|
14619
14628
|
throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
|
|
@@ -14641,7 +14650,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
|
|
|
14641
14650
|
return 2 * intersection2 / (aa2.size + bb.size);
|
|
14642
14651
|
}, "vocabularySimilarity");
|
|
14643
14652
|
|
|
14644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
|
|
14645
14654
|
import { createHash } from "node:crypto";
|
|
14646
14655
|
var folded2 = /* @__PURE__ */ __name((name) => {
|
|
14647
14656
|
try {
|
|
@@ -14707,7 +14716,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind3, by, options
|
|
|
14707
14716
|
});
|
|
14708
14717
|
}, "guardTagCreation");
|
|
14709
14718
|
|
|
14710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
|
|
14711
14720
|
var invalid = /* @__PURE__ */ __name((message2) => {
|
|
14712
14721
|
throw new CliError("validation_error", message2);
|
|
14713
14722
|
}, "invalid");
|
|
@@ -14784,7 +14793,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
|
|
|
14784
14793
|
};
|
|
14785
14794
|
}, "createTagRedirectIndex");
|
|
14786
14795
|
|
|
14787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
|
|
14788
14797
|
var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
|
|
14789
14798
|
const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
|
|
14790
14799
|
if (!row2)
|
|
@@ -14812,7 +14821,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
|
|
|
14812
14821
|
return snapshot2;
|
|
14813
14822
|
}, "tagRedirectSnapshot");
|
|
14814
14823
|
|
|
14815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
|
|
14816
14825
|
import { createHash as createHash2 } from "node:crypto";
|
|
14817
14826
|
var TASK_KEY_PREFIXES = {
|
|
14818
14827
|
question: "Q",
|
|
@@ -14840,7 +14849,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14840
14849
|
return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
|
|
14841
14850
|
}, "taskAccountOf");
|
|
14842
14851
|
|
|
14843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
|
|
14844
14853
|
var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
|
|
14845
14854
|
var REFERABLE = {
|
|
14846
14855
|
note: { tombstone: true },
|
|
@@ -14990,7 +14999,10 @@ var stateOfThing = /* @__PURE__ */ __name((database, thing) => {
|
|
|
14990
14999
|
}, "stateOfThing");
|
|
14991
15000
|
var taskRowOf = /* @__PURE__ */ __name((database, id2) => {
|
|
14992
15001
|
const row2 = database.prepare("SELECT id FROM tasks WHERE package_id = ? OR key = ? ORDER BY id LIMIT 1").get(id2, id2);
|
|
14993
|
-
|
|
15002
|
+
if (row2)
|
|
15003
|
+
return Number(row2.id);
|
|
15004
|
+
const moved = database.prepare("SELECT task_id FROM task_events WHERE kind = 'project' AND json_extract(changes, '$.key[0]') = ? ORDER BY id DESC LIMIT 1").get(id2);
|
|
15005
|
+
return moved ? Number(moved.task_id) : void 0;
|
|
14994
15006
|
}, "taskRowOf");
|
|
14995
15007
|
var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
14996
15008
|
const row2 = database.prepare("SELECT key, package_id AS id FROM tasks WHERE id = ?").get(rowId);
|
|
@@ -14998,7 +15010,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
|
|
|
14998
15010
|
}, "taskIdOf");
|
|
14999
15011
|
var canonicalThingReference = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith("meeting:") ? canonicalMeetingReference(reference2) : canonicalReference(reference2), "canonicalThingReference");
|
|
15000
15012
|
|
|
15001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
|
|
15002
15014
|
var toMs = /* @__PURE__ */ __name((iso11) => {
|
|
15003
15015
|
if (iso11 === null || iso11 === void 0)
|
|
15004
15016
|
return null;
|
|
@@ -15012,7 +15024,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
|
|
|
15012
15024
|
var DELIVERY = { delivered: 1, read: 2 };
|
|
15013
15025
|
var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
|
|
15014
15026
|
|
|
15015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
|
|
15016
15028
|
var TAG_KINDS = ["tag", "topic"];
|
|
15017
15029
|
var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
|
|
15018
15030
|
var TAG_TYPE = {
|
|
@@ -15215,7 +15227,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
|
|
|
15215
15227
|
return result;
|
|
15216
15228
|
}, "tagsOf");
|
|
15217
15229
|
|
|
15218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
|
|
15219
15231
|
var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
|
|
15220
15232
|
var SPEECH = speech("att");
|
|
15221
15233
|
var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
|
|
@@ -15576,7 +15588,7 @@ var FIELD_COMPILERS = {
|
|
|
15576
15588
|
subject
|
|
15577
15589
|
};
|
|
15578
15590
|
|
|
15579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
|
|
15580
15592
|
var placeOf = /* @__PURE__ */ __name((database) => {
|
|
15581
15593
|
const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
|
|
15582
15594
|
const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
|
|
@@ -15592,7 +15604,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
|
|
|
15592
15604
|
};
|
|
15593
15605
|
}, "placeOf");
|
|
15594
15606
|
|
|
15595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
|
|
15596
15608
|
var DRAIN_ON_WRITE = 500;
|
|
15597
15609
|
var METHOD = "rules";
|
|
15598
15610
|
var telegramLink = /* @__PURE__ */ __name((database) => {
|
|
@@ -15755,7 +15767,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
|
|
|
15755
15767
|
return queued.length;
|
|
15756
15768
|
}, "drainMentions");
|
|
15757
15769
|
|
|
15758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
|
|
15759
15771
|
var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
15760
15772
|
const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
|
|
15761
15773
|
if (!exists2)
|
|
@@ -15763,7 +15775,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
|
|
|
15763
15775
|
return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
|
|
15764
15776
|
}, "indexRow");
|
|
15765
15777
|
|
|
15766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
|
|
15767
15779
|
var INDEX = "message_stems";
|
|
15768
15780
|
var SETTING2 = "searchStemmers";
|
|
15769
15781
|
var DRAIN_ON_WRITE2 = 500;
|
|
@@ -15885,7 +15897,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
|
|
|
15885
15897
|
};
|
|
15886
15898
|
}, "stemmerCache");
|
|
15887
15899
|
|
|
15888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
|
|
15889
15901
|
var SQLITE_BUSY = 5;
|
|
15890
15902
|
var pause = new Int32Array(new SharedArrayBuffer(4));
|
|
15891
15903
|
var isBusy = /* @__PURE__ */ __name((error) => {
|
|
@@ -15980,7 +15992,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
|
|
|
15980
15992
|
}
|
|
15981
15993
|
}, "read");
|
|
15982
15994
|
|
|
15983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
|
|
15984
15996
|
var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
|
|
15985
15997
|
coalesce(CASE k.chunkable_type
|
|
15986
15998
|
WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
|
|
@@ -16122,7 +16134,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
|
|
|
16122
16134
|
}, "dropUnusedVectors");
|
|
16123
16135
|
var dropAllUnusedVectors = /* @__PURE__ */ __name((database) => database.prepare("DELETE FROM embeddings WHERE NOT EXISTS (SELECT 1 FROM chunks k WHERE k.content_hash = embeddings.content_hash) RETURNING 1").all().length, "dropAllUnusedVectors");
|
|
16124
16136
|
|
|
16125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
|
|
16126
16138
|
var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
|
|
16127
16139
|
target: [accounts.provider, accounts.externalId],
|
|
16128
16140
|
set: {
|
|
@@ -16228,7 +16240,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
|
|
|
16228
16240
|
AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
|
|
16229
16241
|
}, "dropOrphanPeople");
|
|
16230
16242
|
|
|
16231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
|
|
16232
16244
|
var FOLDED = [
|
|
16233
16245
|
{ table: "tasks", column: "title" },
|
|
16234
16246
|
{ table: "tasks", column: "close_reason" },
|
|
@@ -16265,7 +16277,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
16265
16277
|
return filled2;
|
|
16266
16278
|
}, "fillFolded");
|
|
16267
16279
|
|
|
16268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
|
|
16269
16281
|
import { createHash as createHash3 } from "node:crypto";
|
|
16270
16282
|
var CHUNK_CHARS = 1200;
|
|
16271
16283
|
var CHUNK_OVERLAP = 150;
|
|
@@ -16370,7 +16382,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
|
|
|
16370
16382
|
return chunks2;
|
|
16371
16383
|
}, "cutChunks");
|
|
16372
16384
|
|
|
16373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/task-signature.js
|
|
16374
16386
|
var DAY = 864e5;
|
|
16375
16387
|
var CURRENCY = [
|
|
16376
16388
|
[/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
|
|
@@ -16487,7 +16499,7 @@ var dueDayOf = /* @__PURE__ */ __name((text5, createdMs) => {
|
|
|
16487
16499
|
return best?.day ?? null;
|
|
16488
16500
|
}, "dueDayOf");
|
|
16489
16501
|
|
|
16490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
|
|
16491
16503
|
var DAY2 = 864e5;
|
|
16492
16504
|
var STOP_WORDS = new Set([
|
|
16493
16505
|
// Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
|
|
@@ -16642,7 +16654,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
|
|
|
16642
16654
|
...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
|
|
16643
16655
|
})).sort((a, b) => b.score - a.score), "rankCandidates");
|
|
16644
16656
|
|
|
16645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
|
|
16646
16658
|
var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
16647
16659
|
r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
|
|
16648
16660
|
JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
|
|
@@ -16913,7 +16925,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
|
|
|
16913
16925
|
};
|
|
16914
16926
|
}, "readiness");
|
|
16915
16927
|
|
|
16916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
|
|
16917
16929
|
var DOCUMENT_PICTURE = "document_picture";
|
|
16918
16930
|
var SCAN_PAGE2 = 5e3;
|
|
16919
16931
|
var idOf = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -16976,7 +16988,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
16976
16988
|
}, "nearestPictures")
|
|
16977
16989
|
}), "documentPicturesOver");
|
|
16978
16990
|
|
|
16979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
|
|
16980
16992
|
var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
|
|
16981
16993
|
const literal4 = escaped2 ?? plain2 ?? "";
|
|
16982
16994
|
return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
|
|
@@ -17041,7 +17053,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
|
|
|
17041
17053
|
var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
|
|
17042
17054
|
var bound2 = /* @__PURE__ */ __name(({ sql: text5, params }) => sql.join(text5.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
|
|
17043
17055
|
|
|
17044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
|
|
17045
17057
|
var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
|
|
17046
17058
|
var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
|
|
17047
17059
|
var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
|
|
@@ -17131,7 +17143,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
|
|
|
17131
17143
|
});
|
|
17132
17144
|
}, "linkMeeting");
|
|
17133
17145
|
|
|
17134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
|
|
17135
17147
|
var EVENT_TEXT = "trim(coalesce(e.description, '') || ' ' || coalesce(e.location, '') || ' ' || coalesce((SELECT group_concat(p.name, ' ') FROM calendar_entries ce JOIN calendar_entry_participants p ON p.entry_id = ce.id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL AND p.resource = 0 AND p.name IS NOT NULL), ''))";
|
|
17136
17148
|
var UNSEARCHED_EVENT_TYPES = [
|
|
17137
17149
|
"working-location",
|
|
@@ -17361,7 +17373,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
|
|
|
17361
17373
|
return true;
|
|
17362
17374
|
}, "resetNoteIndex");
|
|
17363
17375
|
|
|
17364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
|
|
17365
17377
|
var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
|
|
17366
17378
|
var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
17367
17379
|
for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
|
|
@@ -17380,7 +17392,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
|
|
|
17380
17392
|
}
|
|
17381
17393
|
}, "resolvePersonLinks");
|
|
17382
17394
|
|
|
17383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
|
|
17384
17396
|
var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
|
|
17385
17397
|
var prepare = /* @__PURE__ */ __name((orm) => ({
|
|
17386
17398
|
find: orm.select({
|
|
@@ -17605,7 +17617,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
|
|
|
17605
17617
|
}, "meetingIdentityPk");
|
|
17606
17618
|
var phoneOf = /* @__PURE__ */ __name(({ orm }, provider, nativeId) => orm.select({ phone: identities.phone }).from(identities).where(and(eq(identities.provider, provider), eq(identities.externalId, nativeId))).get()?.phone ?? null, "phoneOf");
|
|
17607
17619
|
|
|
17608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
|
|
17609
17621
|
var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
|
|
17610
17622
|
var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
|
|
17611
17623
|
var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
|
|
@@ -17885,7 +17897,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
|
|
|
17885
17897
|
}
|
|
17886
17898
|
}, "replaceAutoTags");
|
|
17887
17899
|
|
|
17888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
|
|
17889
17901
|
var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
|
|
17890
17902
|
var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
|
|
17891
17903
|
var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
|
|
@@ -17966,7 +17978,7 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
|
|
|
17966
17978
|
return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
|
|
17967
17979
|
}, "mailCore");
|
|
17968
17980
|
|
|
17969
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
|
|
17970
17982
|
var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
|
|
17971
17983
|
var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
|
|
17972
17984
|
k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
|
|
@@ -18076,7 +18088,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
|
|
|
18076
18088
|
return emails3 + threads;
|
|
18077
18089
|
}, "drainEmailIndex");
|
|
18078
18090
|
|
|
18079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
|
|
18080
18092
|
var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
|
|
18081
18093
|
SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
|
|
18082
18094
|
var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
|
|
@@ -18122,7 +18134,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
|
|
|
18122
18134
|
leave.run(emailId, Number(box.id), emailId, Number(box.id));
|
|
18123
18135
|
}, "forgetLocations");
|
|
18124
18136
|
|
|
18125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
|
|
18126
18138
|
var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
|
|
18127
18139
|
emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
|
|
18128
18140
|
last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
|
|
@@ -18172,7 +18184,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
|
|
|
18172
18184
|
return threads.length;
|
|
18173
18185
|
}, "markEmailsRestored");
|
|
18174
18186
|
|
|
18175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
|
|
18176
18188
|
var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
|
|
18177
18189
|
var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
|
|
18178
18190
|
var ruleOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -18239,7 +18251,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
|
|
|
18239
18251
|
}
|
|
18240
18252
|
}), "mailRulesOver");
|
|
18241
18253
|
|
|
18242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
|
|
18243
18255
|
var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
|
|
18244
18256
|
database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
|
|
18245
18257
|
VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
|
|
@@ -18247,7 +18259,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
|
|
|
18247
18259
|
reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
|
|
18248
18260
|
}, "reviewLink");
|
|
18249
18261
|
|
|
18250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
|
|
18251
18263
|
function checkMeetingCancelled(signal) {
|
|
18252
18264
|
if (!signal?.aborted)
|
|
18253
18265
|
return;
|
|
@@ -18258,7 +18270,7 @@ function checkMeetingCancelled(signal) {
|
|
|
18258
18270
|
}
|
|
18259
18271
|
__name(checkMeetingCancelled, "checkMeetingCancelled");
|
|
18260
18272
|
|
|
18261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
|
|
18262
18274
|
var meetingOf = /* @__PURE__ */ __name((row2) => ({
|
|
18263
18275
|
id: Number(row2.id),
|
|
18264
18276
|
accountId: Number(row2.account_id),
|
|
@@ -18308,7 +18320,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
|
|
|
18308
18320
|
createdAt: Number(row2.created_at)
|
|
18309
18321
|
}), "transcriptRowOf");
|
|
18310
18322
|
|
|
18311
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
|
|
18312
18324
|
var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
|
|
18313
18325
|
var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
|
|
18314
18326
|
var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
|
|
@@ -18475,7 +18487,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18475
18487
|
}
|
|
18476
18488
|
}), "meetingReadsOver");
|
|
18477
18489
|
|
|
18478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
|
|
18479
18491
|
var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
18480
18492
|
const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
|
|
18481
18493
|
const params = [input.accountId];
|
|
@@ -18518,7 +18530,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
|
|
|
18518
18530
|
return { clauses, params };
|
|
18519
18531
|
}, "meetingSelectionSql");
|
|
18520
18532
|
|
|
18521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
|
|
18522
18534
|
var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
18523
18535
|
async meetingChatLines(input) {
|
|
18524
18536
|
checkMeetingCancelled(input.signal);
|
|
@@ -18546,7 +18558,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
18546
18558
|
}
|
|
18547
18559
|
}), "meetingChatLinesOver");
|
|
18548
18560
|
|
|
18549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
|
|
18550
18562
|
var MESSAGE_FIELDS = {
|
|
18551
18563
|
pk: messages.id,
|
|
18552
18564
|
nativeId: messages.externalId,
|
|
@@ -18713,7 +18725,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
|
|
|
18713
18725
|
storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
|
|
18714
18726
|
}), "chatActivity");
|
|
18715
18727
|
|
|
18716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
|
|
18717
18729
|
var HIT_FIELDS = {
|
|
18718
18730
|
...MESSAGE_FIELDS,
|
|
18719
18731
|
chatTitle: sql`${chats.title}`.as("chat_title"),
|
|
@@ -18812,7 +18824,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
|
|
|
18812
18824
|
};
|
|
18813
18825
|
}, "directReplies");
|
|
18814
18826
|
|
|
18815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
|
|
18816
18828
|
var identityRow = /* @__PURE__ */ __name(({ orm }, { provider, id: id2 }) => orm.select({ pk: identities.id, personPk: identityLinks.personId }).from(identities).innerJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, provider), eq(identities.externalId, id2))).get(), "identityRow");
|
|
18817
18829
|
var required = /* @__PURE__ */ __name((context, ref3) => {
|
|
18818
18830
|
const found2 = identityRow(context, ref3);
|
|
@@ -18943,7 +18955,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
|
|
|
18943
18955
|
}, "mentioning");
|
|
18944
18956
|
var escaped = /* @__PURE__ */ __name((text5) => text5.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18945
18957
|
|
|
18946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
|
|
18947
18959
|
var missing2 = /* @__PURE__ */ __name(() => {
|
|
18948
18960
|
throw new CliError("not_found", "Meeting, participant or selected target not found");
|
|
18949
18961
|
}, "missing");
|
|
@@ -19065,7 +19077,7 @@ function meetingContextLinksOver(context) {
|
|
|
19065
19077
|
}
|
|
19066
19078
|
__name(meetingContextLinksOver, "meetingContextLinksOver");
|
|
19067
19079
|
|
|
19068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
|
|
19069
19081
|
var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
|
|
19070
19082
|
var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
|
|
19071
19083
|
var summaryOf = /* @__PURE__ */ __name((row2) => ({
|
|
@@ -19094,7 +19106,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19094
19106
|
return row2 ? summaryText(summaryOf(row2)) : null;
|
|
19095
19107
|
}, "indexedText");
|
|
19096
19108
|
|
|
19097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
|
|
19098
19110
|
var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
|
|
19099
19111
|
var meetingCurrentIndexRows = `
|
|
19100
19112
|
SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
|
|
@@ -19125,7 +19137,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
19125
19137
|
}, "invalidateMeetingStems");
|
|
19126
19138
|
var meetingStemmableText = /* @__PURE__ */ __name((text5) => text5.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
|
|
19127
19139
|
|
|
19128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
|
|
19129
19141
|
function meetingHitIndexOver({ database, now: now2 }) {
|
|
19130
19142
|
return {
|
|
19131
19143
|
async indexSearch(original) {
|
|
@@ -19193,10 +19205,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
|
|
|
19193
19205
|
}
|
|
19194
19206
|
__name(meetingHitIndexOver, "meetingHitIndexOver");
|
|
19195
19207
|
|
|
19196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19197
19209
|
import { createHash as createHash4 } from "node:crypto";
|
|
19198
19210
|
|
|
19199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/trigrams.js
|
|
19200
19212
|
var trigrams = /* @__PURE__ */ __name((term) => {
|
|
19201
19213
|
const padded = ` ${term} `;
|
|
19202
19214
|
const pieces = /* @__PURE__ */ new Set();
|
|
@@ -19205,7 +19217,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
|
|
|
19205
19217
|
return [...pieces];
|
|
19206
19218
|
}, "trigrams");
|
|
19207
19219
|
|
|
19208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/correct.js
|
|
19209
19221
|
var SHORTEST_CORRECTION = 3;
|
|
19210
19222
|
var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
|
|
19211
19223
|
var editDistance = /* @__PURE__ */ __name((a, b, max) => {
|
|
@@ -19252,7 +19264,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
|
|
|
19252
19264
|
return corrections;
|
|
19253
19265
|
}, "correctWords");
|
|
19254
19266
|
|
|
19255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/garbled.js
|
|
19256
19268
|
var SHORTEST_GARBLED = 4;
|
|
19257
19269
|
var MOST_WIDENED = 64;
|
|
19258
19270
|
var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
|
|
@@ -19344,7 +19356,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
|
|
|
19344
19356
|
return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word) => word.term));
|
|
19345
19357
|
}, "widenWords");
|
|
19346
19358
|
|
|
19347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
|
|
19348
19360
|
import { readFileSync } from "node:fs";
|
|
19349
19361
|
var loaded;
|
|
19350
19362
|
var dictionary = /* @__PURE__ */ __name(() => {
|
|
@@ -19403,7 +19415,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
|
|
|
19403
19415
|
return false;
|
|
19404
19416
|
}, "knownRussianWord");
|
|
19405
19417
|
|
|
19406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
|
|
19407
19419
|
var WORD2 = /[\p{L}\p{N}\p{M}]+/gu;
|
|
19408
19420
|
var MOST_WORDS = 128;
|
|
19409
19421
|
var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
|
|
@@ -19630,7 +19642,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text5, stemmer) => {
|
|
|
19630
19642
|
return check3(tree);
|
|
19631
19643
|
}, "matchMeetingText");
|
|
19632
19644
|
|
|
19633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
|
|
19634
19646
|
var fail3 = /* @__PURE__ */ __name((message2) => {
|
|
19635
19647
|
throw new CliError("validation_error", message2);
|
|
19636
19648
|
}, "fail");
|
|
@@ -19807,7 +19819,7 @@ function meetingHitSearchOver({ database }) {
|
|
|
19807
19819
|
}
|
|
19808
19820
|
__name(meetingHitSearchOver, "meetingHitSearchOver");
|
|
19809
19821
|
|
|
19810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
|
|
19811
19823
|
import { createHash as createHash5 } from "node:crypto";
|
|
19812
19824
|
var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
|
|
19813
19825
|
if (value === void 0)
|
|
@@ -19897,7 +19909,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
|
|
|
19897
19909
|
}
|
|
19898
19910
|
}), "meetingParticipantSearchOver");
|
|
19899
19911
|
|
|
19900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
|
|
19901
19913
|
var preparationQueries = {
|
|
19902
19914
|
participants: {
|
|
19903
19915
|
fields: "p.id, p.identity_id, p.display_name, l.person_id",
|
|
@@ -19947,7 +19959,7 @@ var preparationQueries = {
|
|
|
19947
19959
|
}
|
|
19948
19960
|
};
|
|
19949
19961
|
|
|
19950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
|
|
19951
19963
|
var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
19952
19964
|
async preparationContext(original) {
|
|
19953
19965
|
const input = validateMeetingPreparationContext(original);
|
|
@@ -19988,7 +20000,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
19988
20000
|
}
|
|
19989
20001
|
}), "meetingPreparationContextOver");
|
|
19990
20002
|
|
|
19991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
|
|
19992
20004
|
var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
19993
20005
|
SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
|
|
19994
20006
|
WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
|
|
@@ -20002,7 +20014,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
|
|
|
20002
20014
|
JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
|
|
20003
20015
|
)`, "preparationSubjects");
|
|
20004
20016
|
|
|
20005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
|
|
20006
20018
|
var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20007
20019
|
async preparationKnowledge(original) {
|
|
20008
20020
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20047,7 +20059,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
|
|
|
20047
20059
|
}
|
|
20048
20060
|
}), "meetingPreparationKnowledgeOver");
|
|
20049
20061
|
|
|
20050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
|
|
20051
20063
|
var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20052
20064
|
async preparationNotes(original) {
|
|
20053
20065
|
const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
|
|
@@ -20100,7 +20112,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20100
20112
|
}
|
|
20101
20113
|
}), "meetingPreparationNotesOver");
|
|
20102
20114
|
|
|
20103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
|
|
20104
20116
|
var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20105
20117
|
async relatedHistory(original) {
|
|
20106
20118
|
const input = validateMeetingRelatedHistory(original);
|
|
@@ -20171,7 +20183,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20171
20183
|
}
|
|
20172
20184
|
}), "meetingRelatedHistoryOver");
|
|
20173
20185
|
|
|
20174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
|
|
20175
20187
|
var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
|
|
20176
20188
|
var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
|
|
20177
20189
|
var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
@@ -20252,7 +20264,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20252
20264
|
}
|
|
20253
20265
|
}), "meetingReviewOver");
|
|
20254
20266
|
|
|
20255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
|
|
20256
20268
|
var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
|
|
20257
20269
|
var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
|
|
20258
20270
|
if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
|
|
@@ -20306,7 +20318,7 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20306
20318
|
}
|
|
20307
20319
|
}), "meetingSeriesHistoryOver");
|
|
20308
20320
|
|
|
20309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
|
|
20310
20322
|
var MOST_ROWS = 5e5;
|
|
20311
20323
|
var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
20312
20324
|
async meetingStats(input) {
|
|
@@ -20353,7 +20365,7 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
20353
20365
|
}
|
|
20354
20366
|
}), "meetingStatsOver");
|
|
20355
20367
|
|
|
20356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
|
|
20357
20369
|
var CURSOR_KEY = "meetings";
|
|
20358
20370
|
var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
|
|
20359
20371
|
id: Number(row2.id),
|
|
@@ -20782,17 +20794,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20782
20794
|
const picked = filtered(filter);
|
|
20783
20795
|
const rows = database.prepare(`WITH hit AS (SELECT rowid AS r FROM meeting_words WHERE meeting_words MATCH ?),
|
|
20784
20796
|
picked AS (SELECT id, row_number() OVER (ORDER BY coalesce(started_at, 0) DESC, id) AS n FROM (${picked.sql}))
|
|
20785
|
-
SELECT p.n, 0 AS kind, t.id AS a, r.position AS b, r.id, t.meeting_id, r.start_ms, coalesce(length(CAST(r.text AS BLOB)),0) AS bytes
|
|
20797
|
+
SELECT p.n, 0 AS kind, t.id AS a, r.position AS b, r.id, t.meeting_id, r.start_ms, coalesce(length(CAST(r.text AS BLOB)),0) AS bytes,
|
|
20798
|
+
r.speaker_name AS speaker, m.account_id
|
|
20786
20799
|
FROM hit h JOIN meeting_transcript_rows r ON h.r % 4 = 1 AND r.id = h.r / 4
|
|
20787
20800
|
JOIN meeting_transcripts t ON t.id = r.meeting_transcript_id
|
|
20788
20801
|
AND t.superseded_at IS NULL AND t.deleted_at IS NULL
|
|
20789
|
-
JOIN picked p ON p.id = t.meeting_id
|
|
20802
|
+
JOIN picked p ON p.id = t.meeting_id JOIN meetings m ON m.id = t.meeting_id
|
|
20790
20803
|
UNION ALL
|
|
20791
|
-
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0)
|
|
20804
|
+
SELECT p.n, 1, c.id, 0, c.id, c.meeting_id, NULL, coalesce(length(CAST(c.text AS BLOB)),0), NULL, NULL
|
|
20792
20805
|
FROM hit h JOIN meeting_chat_messages c ON h.r % 4 = 2 AND c.id = h.r / 4
|
|
20793
20806
|
JOIN picked p ON p.id = c.meeting_id
|
|
20794
20807
|
UNION ALL
|
|
20795
|
-
SELECT p.n, 2, s.id, 0, s.id, s.meeting_id, NULL, coalesce(length(CAST(s.title AS BLOB)),0)+coalesce(length(CAST(s.overview AS BLOB)),0)+coalesce(length(CAST(s.sections AS BLOB)),0)+coalesce(length(CAST(s.next_steps AS BLOB)),0)+coalesce(length(CAST(s.content AS BLOB)),0)
|
|
20808
|
+
SELECT p.n, 2, s.id, 0, s.id, s.meeting_id, NULL, coalesce(length(CAST(s.title AS BLOB)),0)+coalesce(length(CAST(s.overview AS BLOB)),0)+coalesce(length(CAST(s.sections AS BLOB)),0)+coalesce(length(CAST(s.next_steps AS BLOB)),0)+coalesce(length(CAST(s.content AS BLOB)),0), NULL, NULL
|
|
20796
20809
|
FROM hit h JOIN meeting_summaries s ON h.r % 4 = 3 AND s.id = h.r / 4
|
|
20797
20810
|
JOIN picked p ON p.id = s.meeting_id
|
|
20798
20811
|
ORDER BY 1, 2, 3, 4 LIMIT 10001`).all(`normalized_text : (${match})`, ...picked.params);
|
|
@@ -20806,7 +20819,18 @@ var search = /* @__PURE__ */ __name((database, query, filter) => {
|
|
|
20806
20819
|
const scopes = ["transcript", "chat", "summary"];
|
|
20807
20820
|
return rows.map((row2) => {
|
|
20808
20821
|
const scope3 = scopes[Number(row2.kind)];
|
|
20822
|
+
const cue = scope3 === "transcript" ? {
|
|
20823
|
+
ref: formatMeetingReference({
|
|
20824
|
+
type: "meeting",
|
|
20825
|
+
accountId: Number(row2.account_id),
|
|
20826
|
+
meetingId: Number(row2.meeting_id),
|
|
20827
|
+
transcriptId: Number(row2.a),
|
|
20828
|
+
cuePosition: Number(row2.b)
|
|
20829
|
+
}),
|
|
20830
|
+
speakerName: row2.speaker === null ? null : String(row2.speaker)
|
|
20831
|
+
} : {};
|
|
20809
20832
|
return {
|
|
20833
|
+
...cue,
|
|
20810
20834
|
meetingId: Number(row2.meeting_id),
|
|
20811
20835
|
scope: scope3,
|
|
20812
20836
|
id: Number(row2.id),
|
|
@@ -20905,7 +20929,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
20905
20929
|
};
|
|
20906
20930
|
}, "meetingStoreOver");
|
|
20907
20931
|
|
|
20908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
|
|
20909
20933
|
var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
|
|
20910
20934
|
const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
|
|
20911
20935
|
return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
|
|
@@ -20931,7 +20955,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
|
|
|
20931
20955
|
orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
|
|
20932
20956
|
}, "release");
|
|
20933
20957
|
|
|
20934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
|
|
20935
20959
|
var THREAD_COLUMNS = {
|
|
20936
20960
|
subject: {
|
|
20937
20961
|
where: /* @__PURE__ */ __name(({ value }) => ({
|
|
@@ -20948,7 +20972,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
|
|
|
20948
20972
|
AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
|
|
20949
20973
|
}, "threadRows");
|
|
20950
20974
|
|
|
20951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
|
|
20952
20976
|
var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
|
|
20953
20977
|
id: `email:${place.emailId}`,
|
|
20954
20978
|
chatId: place.threadExternalId,
|
|
@@ -21503,7 +21527,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
|
|
|
21503
21527
|
}
|
|
21504
21528
|
}), "mailStoreOver");
|
|
21505
21529
|
|
|
21506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/dictionary.js
|
|
21507
21531
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21508
21532
|
var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
|
|
21509
21533
|
var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
|
|
@@ -21593,7 +21617,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
|
|
|
21593
21617
|
}, "knownWord");
|
|
21594
21618
|
var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
|
|
21595
21619
|
|
|
21596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
|
|
21597
21621
|
var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
|
|
21598
21622
|
var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
|
|
21599
21623
|
var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
|
|
@@ -21679,7 +21703,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
|
|
|
21679
21703
|
return found2;
|
|
21680
21704
|
}, "spokenTranscripts");
|
|
21681
21705
|
|
|
21682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
|
|
21683
21707
|
var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
|
|
21684
21708
|
const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
|
|
21685
21709
|
if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
|
|
@@ -21726,7 +21750,7 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
|
|
|
21726
21750
|
});
|
|
21727
21751
|
}, "placeHits");
|
|
21728
21752
|
|
|
21729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
|
|
21730
21754
|
var MESSAGES2 = {
|
|
21731
21755
|
rows: "messages",
|
|
21732
21756
|
threads: "chats",
|
|
@@ -21778,8 +21802,8 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
|
|
|
21778
21802
|
const { database } = context;
|
|
21779
21803
|
const corpus = execution.corpus === "mail" ? MAIL : MESSAGES2;
|
|
21780
21804
|
const mail = corpus === MAIL;
|
|
21781
|
-
if (mail && (execution.
|
|
21782
|
-
throw new CliError("validation_error", "mail has no
|
|
21805
|
+
if (mail && (execution.conversationIds || execution.conversationSince !== void 0))
|
|
21806
|
+
throw new CliError("validation_error", "mail has no conversations to search within");
|
|
21783
21807
|
const started = context.now();
|
|
21784
21808
|
const budget = { work: 0 };
|
|
21785
21809
|
let states = 0, expansions = 0;
|
|
@@ -21920,11 +21944,11 @@ var compileQuery = /* @__PURE__ */ __name((context, execution, boundedAttachment
|
|
|
21920
21944
|
where = combine([
|
|
21921
21945
|
where,
|
|
21922
21946
|
{
|
|
21923
|
-
sql: `m.id IN (SELECT picked.id FROM json_each(?) j CROSS JOIN accounts allowed CROSS JOIN chats scoped CROSS JOIN messages picked
|
|
21947
|
+
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
21948
|
WHERE (${execution.accounts.map(() => "(allowed.provider=? AND allowed.external_id=?)").join(" OR ") || "0"})
|
|
21925
21949
|
AND allowed.provider=json_extract(j.value,'$.provider') AND allowed.external_id=json_extract(j.value,'$.account')
|
|
21926
21950
|
AND scoped.account_id=allowed.id AND scoped.external_id=json_extract(j.value,'$.chatId')
|
|
21927
|
-
AND picked
|
|
21951
|
+
AND picked.${mail ? "email_thread_id" : "chat_id"}=scoped.id AND picked.external_id=json_extract(j.value,'$.id'))`,
|
|
21928
21952
|
params: [JSON.stringify(execution.only), ...execution.accounts.flatMap((key2) => [key2.provider, key2.account])],
|
|
21929
21953
|
exact: true
|
|
21930
21954
|
}
|
|
@@ -22200,7 +22224,7 @@ var runQuery = /* @__PURE__ */ __name(async (context, execution, by) => {
|
|
|
22200
22224
|
};
|
|
22201
22225
|
}, "runQuery");
|
|
22202
22226
|
|
|
22203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
|
|
22204
22228
|
function invalidMetadata() {
|
|
22205
22229
|
throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
|
|
22206
22230
|
}
|
|
@@ -22302,7 +22326,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
|
|
|
22302
22326
|
};
|
|
22303
22327
|
}), "counterTargets");
|
|
22304
22328
|
|
|
22305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
|
|
22306
22330
|
var NOT_FILE_LIST = [...NOT_FILES].map((kind3) => `'${kind3}'`).join(",");
|
|
22307
22331
|
var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
|
|
22308
22332
|
att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
|
|
@@ -22421,7 +22445,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
|
|
|
22421
22445
|
}));
|
|
22422
22446
|
}, "attachmentViews");
|
|
22423
22447
|
|
|
22424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
|
|
22425
22449
|
var transcript = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
|
|
22426
22450
|
var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text5, source2) => {
|
|
22427
22451
|
const { orm, database, now: now2 } = context;
|
|
@@ -22459,7 +22483,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
|
|
|
22459
22483
|
keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
|
|
22460
22484
|
}, "intoVoiceAttachment");
|
|
22461
22485
|
|
|
22462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
|
|
22463
22487
|
var FIELDS = [
|
|
22464
22488
|
"threadExternalId",
|
|
22465
22489
|
"senderIdentityId",
|
|
@@ -22776,7 +22800,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
|
|
|
22776
22800
|
reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
|
|
22777
22801
|
}, "writeDerivedReactions");
|
|
22778
22802
|
|
|
22779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/keys.js
|
|
22780
22804
|
var keysOver = /* @__PURE__ */ __name((context) => {
|
|
22781
22805
|
const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
|
|
22782
22806
|
const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
|
|
@@ -22797,7 +22821,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
|
|
|
22797
22821
|
};
|
|
22798
22822
|
}, "keysOver");
|
|
22799
22823
|
|
|
22800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
|
|
22801
22825
|
var accountGroupsOf = /* @__PURE__ */ __name((database) => {
|
|
22802
22826
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
|
|
22803
22827
|
if (!row2)
|
|
@@ -22832,7 +22856,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
|
|
|
22832
22856
|
database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
|
|
22833
22857
|
}, "saveProfile");
|
|
22834
22858
|
|
|
22835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
|
|
22836
22860
|
var BOT_KINDS = ["agent", "script", "integration"];
|
|
22837
22861
|
var ownerPerson = /* @__PURE__ */ __name((database) => {
|
|
22838
22862
|
const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
|
|
@@ -22868,7 +22892,7 @@ var originOfActor = /* @__PURE__ */ __name((database, type, id2) => {
|
|
|
22868
22892
|
return database.prepare("SELECT name FROM bots WHERE id = ?").get(Number(id2))?.name === "rule" ? "rule" : "agent";
|
|
22869
22893
|
}, "originOfActor");
|
|
22870
22894
|
|
|
22871
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
|
|
22872
22896
|
var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
|
|
22873
22897
|
const owner = ownerPerson(context.database).id;
|
|
22874
22898
|
const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
|
|
@@ -22889,7 +22913,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
|
|
|
22889
22913
|
return personOf(context, ref3);
|
|
22890
22914
|
}, "linkToOwner");
|
|
22891
22915
|
|
|
22892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
|
|
22893
22917
|
var PROVIDERS_SETTING = "providers";
|
|
22894
22918
|
var storedProvidersOf = /* @__PURE__ */ __name((database) => {
|
|
22895
22919
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
@@ -22924,7 +22948,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
22924
22948
|
});
|
|
22925
22949
|
}, "registerProvider");
|
|
22926
22950
|
|
|
22927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
|
|
22928
22952
|
var DAY3 = 864e5;
|
|
22929
22953
|
var RECENTLY_CLOSED_MS = 14 * DAY3;
|
|
22930
22954
|
var TEXT_LIMIT = 20;
|
|
@@ -23123,7 +23147,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
|
|
|
23123
23147
|
};
|
|
23124
23148
|
}, "taskSimilarityOver");
|
|
23125
23149
|
|
|
23126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
|
|
23127
23151
|
var SETTING3 = "taskCategories";
|
|
23128
23152
|
var savedTaskCategories = /* @__PURE__ */ __name((database) => {
|
|
23129
23153
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
|
|
@@ -23142,7 +23166,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
|
|
|
23142
23166
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
|
|
23143
23167
|
}, "saveTaskCategories");
|
|
23144
23168
|
|
|
23145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
|
|
23146
23170
|
var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
|
|
23147
23171
|
var ALLOWED = "taskAgentClose";
|
|
23148
23172
|
var MIN = "taskAgentCloseMin";
|
|
@@ -23198,7 +23222,7 @@ var SUGGESTION_COLUMNS = [
|
|
|
23198
23222
|
];
|
|
23199
23223
|
var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
|
|
23200
23224
|
|
|
23201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
|
|
23202
23226
|
var EXCERPT_CHARS = 280;
|
|
23203
23227
|
var excerptOf = /* @__PURE__ */ __name((text5) => {
|
|
23204
23228
|
if (text5 == null)
|
|
@@ -23263,7 +23287,7 @@ var sourcesOfReferences = /* @__PURE__ */ __name((database, references) => [...n
|
|
|
23263
23287
|
};
|
|
23264
23288
|
}), "sourcesOfReferences");
|
|
23265
23289
|
|
|
23266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
23267
23291
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
23268
23292
|
var MAX_TEXT_CHARS = 2e6;
|
|
23269
23293
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -23289,7 +23313,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
23289
23313
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
23290
23314
|
}, "pdfPreviewLimits");
|
|
23291
23315
|
|
|
23292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/ulid.js
|
|
23293
23317
|
import { randomBytes } from "node:crypto";
|
|
23294
23318
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
23295
23319
|
var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
@@ -23302,7 +23326,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
|
|
|
23302
23326
|
return time3 + random;
|
|
23303
23327
|
}, "ulid");
|
|
23304
23328
|
|
|
23305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
|
|
23306
23330
|
var FOLDED_FIELDS = ["title", "site", "language", "author"];
|
|
23307
23331
|
var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
|
|
23308
23332
|
if (!meta && !sections?.length)
|
|
@@ -23323,7 +23347,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
|
|
|
23323
23347
|
return typeof language === "string" && language !== "" ? language : null;
|
|
23324
23348
|
}, "languageOf");
|
|
23325
23349
|
|
|
23326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
|
|
23327
23351
|
var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
|
|
23328
23352
|
var objectOf = /* @__PURE__ */ __name((value) => {
|
|
23329
23353
|
if (isObject(value))
|
|
@@ -23566,7 +23590,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
23566
23590
|
};
|
|
23567
23591
|
}, "filesStoreOver");
|
|
23568
23592
|
|
|
23569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
|
|
23570
23594
|
var IMPORTED_DOCUMENT_QUERY = defineQuery({
|
|
23571
23595
|
entity: "document",
|
|
23572
23596
|
backend: "sql",
|
|
@@ -23612,7 +23636,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
|
|
|
23612
23636
|
return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
|
|
23613
23637
|
}, "importedDocumentWhere");
|
|
23614
23638
|
|
|
23615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
|
|
23616
23640
|
var NOTE_FORMATS = ["obsidian", "markdown"];
|
|
23617
23641
|
var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
23618
23642
|
var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
|
|
@@ -24122,7 +24146,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24122
24146
|
};
|
|
24123
24147
|
}, "notesStoreOver");
|
|
24124
24148
|
|
|
24125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
|
|
24126
24150
|
var NAMED = "SELECT m.*, b.name AS author_name FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
|
|
24127
24151
|
var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
24128
24152
|
var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -24318,7 +24342,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
24318
24342
|
};
|
|
24319
24343
|
}, "memoriesStoreOver");
|
|
24320
24344
|
|
|
24321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
|
|
24322
24346
|
var DEFAULT_FIRST_PASS_PER_CHAT = 0;
|
|
24323
24347
|
var KEY = "taskFirstPassPerChat";
|
|
24324
24348
|
var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
|
|
@@ -24338,7 +24362,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
|
|
|
24338
24362
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
|
|
24339
24363
|
}, "saveFirstPassPerChat");
|
|
24340
24364
|
|
|
24341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
|
|
24342
24366
|
var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
|
|
24343
24367
|
var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
|
|
24344
24368
|
name,
|
|
@@ -24361,8 +24385,14 @@ var PROJECT_TASK_FIELDS = [
|
|
|
24361
24385
|
relation: "low, medium, high, critical or none; a range of labels or of the 0\u20131 number: priority:[high TO critical]"
|
|
24362
24386
|
}),
|
|
24363
24387
|
field("agent", "kw", "agent:hermes", { relation: "the agent working on it, by name; none or any" }),
|
|
24364
|
-
field("due", "time", "due:[today TO 2026-12-31]", {
|
|
24365
|
-
|
|
24388
|
+
field("due", "time", "due:[today TO 2026-12-31]", {
|
|
24389
|
+
relation: "the due date; today, tomorrow and yesterday are your calendar days; NOT due:* has none"
|
|
24390
|
+
}),
|
|
24391
|
+
field("overdue", "bool", "overdue:true", { relation: "open work due before today" }),
|
|
24392
|
+
field("when", "enum", "when:today", {
|
|
24393
|
+
values: ["overdue", "today", "upcoming", "later", "none"],
|
|
24394
|
+
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"
|
|
24395
|
+
}),
|
|
24366
24396
|
field("closed", "time", "closed:>=14d", { relation: "when it was done or dismissed" }),
|
|
24367
24397
|
field("ready", "bool", "ready:true", { relation: "open work whose blocked-by tasks are all done" }),
|
|
24368
24398
|
field("text", "txt", "text:invoice", { relation: "words of the title and description; a bare word means this" })
|
|
@@ -24456,7 +24486,26 @@ var truth = /* @__PURE__ */ __name((node, sql2) => ({
|
|
|
24456
24486
|
sql: node.value.toLowerCase() === "true" ? sql2 : `NOT (${sql2})`,
|
|
24457
24487
|
params: []
|
|
24458
24488
|
}), "truth");
|
|
24459
|
-
var
|
|
24489
|
+
var SPAN = { start: 0, end: 0 };
|
|
24490
|
+
var UPCOMING_DAYS = 7;
|
|
24491
|
+
var dayIn = /* @__PURE__ */ __name((at, zone, ahead) => {
|
|
24492
|
+
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`);
|
|
24493
|
+
date3.setUTCDate(date3.getUTCDate() + ahead);
|
|
24494
|
+
return dayBoundary(date3.toISOString().slice(0, 10), zone, false, SPAN);
|
|
24495
|
+
}, "dayIn");
|
|
24496
|
+
var dueGroups = /* @__PURE__ */ __name((now2, zone) => {
|
|
24497
|
+
const today = dayIn(now2, zone, 0);
|
|
24498
|
+
const tomorrow = dayIn(now2, zone, 1);
|
|
24499
|
+
const after2 = dayIn(now2, zone, UPCOMING_DAYS + 1);
|
|
24500
|
+
return {
|
|
24501
|
+
overdue: `${OPEN} AND t.due_at IS NOT NULL AND t.due_at < ${today}`,
|
|
24502
|
+
today: `t.due_at >= ${today} AND t.due_at < ${tomorrow}`,
|
|
24503
|
+
upcoming: `t.due_at >= ${tomorrow} AND t.due_at < ${after2}`,
|
|
24504
|
+
later: `t.due_at >= ${after2}`,
|
|
24505
|
+
none: "t.due_at IS NULL"
|
|
24506
|
+
};
|
|
24507
|
+
}, "dueGroups");
|
|
24508
|
+
var projectTaskColumns = /* @__PURE__ */ __name((now2, zone) => ({
|
|
24460
24509
|
state: { type: "enum", sql: "t.status" },
|
|
24461
24510
|
kind: { type: "enum", sql: "t.type" },
|
|
24462
24511
|
project: { where: projectWhere },
|
|
@@ -24465,7 +24514,15 @@ var projectTaskColumns = /* @__PURE__ */ __name((now2) => ({
|
|
|
24465
24514
|
agent: { where: agentWhere },
|
|
24466
24515
|
due: { type: "time", sql: "t.due_at" },
|
|
24467
24516
|
closed: { type: "time", sql: "t.closed_at" },
|
|
24468
|
-
overdue: { where: /* @__PURE__ */ __name((node) => truth(node,
|
|
24517
|
+
overdue: { where: /* @__PURE__ */ __name((node) => truth(node, dueGroups(now2, zone).overdue), "where") },
|
|
24518
|
+
when: {
|
|
24519
|
+
where: /* @__PURE__ */ __name((node) => {
|
|
24520
|
+
const group = dueGroups(now2, zone)[node.value.toLowerCase()];
|
|
24521
|
+
if (group === void 0)
|
|
24522
|
+
throw new CliError("validation_error", "when is overdue, today, upcoming, later or none");
|
|
24523
|
+
return { sql: group, params: [] };
|
|
24524
|
+
}, "where")
|
|
24525
|
+
},
|
|
24469
24526
|
ready: { where: /* @__PURE__ */ __name((node) => truth(node, `${OPEN} AND NOT EXISTS (${UNFINISHED_BLOCKER})`), "where") },
|
|
24470
24527
|
text: {
|
|
24471
24528
|
where: /* @__PURE__ */ __name((node) => {
|
|
@@ -24512,7 +24569,35 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
|
|
|
24512
24569
|
return root === void 0 ? void 0 : { ...query, root };
|
|
24513
24570
|
}, "withoutField");
|
|
24514
24571
|
|
|
24515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
|
|
24573
|
+
var authorNamed = /* @__PURE__ */ __name((database, row2) => {
|
|
24574
|
+
if (row2.author_type == null)
|
|
24575
|
+
return null;
|
|
24576
|
+
const named2 = database.prepare(row2.author_type === "bot" ? "SELECT name, 0 AS owner FROM bots WHERE id = ?" : "SELECT name, owner FROM persons WHERE id = ?").get(Number(row2.author_id));
|
|
24577
|
+
return {
|
|
24578
|
+
type: row2.author_type,
|
|
24579
|
+
id: String(row2.author_id),
|
|
24580
|
+
name: named2?.name == null ? null : String(named2.name),
|
|
24581
|
+
owner: Number(named2?.owner) === 1
|
|
24582
|
+
};
|
|
24583
|
+
}, "authorNamed");
|
|
24584
|
+
var commentsOf = /* @__PURE__ */ __name((database, task) => database.prepare("SELECT n.id, n.body, n.created_at, n.author_type, n.author_id FROM notes n WHERE n.notable_type = 'task' AND n.notable_id = ? AND n.deleted_at IS NULL ORDER BY n.created_at, n.id").all(task).map((row2) => ({
|
|
24585
|
+
ref: `note:${row2.id}`,
|
|
24586
|
+
text: String(row2.body),
|
|
24587
|
+
author: authorNamed(database, row2),
|
|
24588
|
+
at: new Date(Number(row2.created_at)).toISOString()
|
|
24589
|
+
})), "commentsOf");
|
|
24590
|
+
var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
|
|
24591
|
+
const { database, now: now2 } = context;
|
|
24592
|
+
const made = write(database, () => {
|
|
24593
|
+
const { actor } = authorActor(context, by);
|
|
24594
|
+
const at = now2();
|
|
24595
|
+
return Number(database.prepare("INSERT INTO notes (notable_type, notable_id, body, author_type, author_id, revision, created_at, updated_at) VALUES ('task', ?, ?, ?, ?, 1, ?, ?) RETURNING id").get(task, body2, actor.type, actor.id, at, at)?.id);
|
|
24596
|
+
});
|
|
24597
|
+
return commentsOf(database, task).find((one) => one.ref === `note:${made}`);
|
|
24598
|
+
}, "addComment");
|
|
24599
|
+
|
|
24600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
|
|
24516
24601
|
var TASK_RELATION_KINDS = [
|
|
24517
24602
|
"blocked-by",
|
|
24518
24603
|
"follow-up-of",
|
|
@@ -24642,7 +24727,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
|
|
|
24642
24727
|
};
|
|
24643
24728
|
}, "taskRelationsStoreOver");
|
|
24644
24729
|
|
|
24645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
|
|
24646
24731
|
var TASK_ROLES = ["assignee", "reviewer", "watcher"];
|
|
24647
24732
|
var TASK_EVENT_KINDS = [
|
|
24648
24733
|
"created",
|
|
@@ -24665,7 +24750,9 @@ var TASK_EVENT_KINDS = [
|
|
|
24665
24750
|
"resolution",
|
|
24666
24751
|
"verdict",
|
|
24667
24752
|
"close-certainty",
|
|
24668
|
-
"tags"
|
|
24753
|
+
"tags",
|
|
24754
|
+
"project",
|
|
24755
|
+
"type"
|
|
24669
24756
|
];
|
|
24670
24757
|
var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
24671
24758
|
var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind3, changes, at) => {
|
|
@@ -24678,6 +24765,10 @@ var textOf3 = /* @__PURE__ */ __name((value, what, max) => {
|
|
|
24678
24765
|
return text5;
|
|
24679
24766
|
}, "textOf");
|
|
24680
24767
|
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");
|
|
24768
|
+
var timesAsIso = /* @__PURE__ */ __name((changes) => Object.fromEntries(Object.entries(changes).map(([key2, pair]) => [
|
|
24769
|
+
key2,
|
|
24770
|
+
key2.endsWith("_at") && Array.isArray(pair) ? pair.map((value) => typeof value === "number" ? new Date(value).toISOString() : value) : pair
|
|
24771
|
+
])), "timesAsIso");
|
|
24681
24772
|
var checkRevision = /* @__PURE__ */ __name((row2, expected) => {
|
|
24682
24773
|
if (expected === void 0 || Number(row2.revision) === expected)
|
|
24683
24774
|
return;
|
|
@@ -24723,6 +24814,10 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24723
24814
|
}
|
|
24724
24815
|
return parent2;
|
|
24725
24816
|
}, "parentOf");
|
|
24817
|
+
const projectNamed = /* @__PURE__ */ __name((id2) => {
|
|
24818
|
+
const project = database.prepare("SELECT key, name FROM projects WHERE id = ?").get(id2);
|
|
24819
|
+
return { projectKey: String(project.key), projectName: String(project.name) };
|
|
24820
|
+
}, "projectNamed");
|
|
24726
24821
|
const detailsOf = /* @__PURE__ */ __name((row2) => {
|
|
24727
24822
|
const id2 = Number(row2.id);
|
|
24728
24823
|
const reference2 = /* @__PURE__ */ __name((taskRow) => `task:${taskIdOf(database, taskRow)}`, "reference");
|
|
@@ -24731,6 +24826,8 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24731
24826
|
ref: reference2(id2),
|
|
24732
24827
|
key: String(row2.key),
|
|
24733
24828
|
project: `project:${row2.project_id}`,
|
|
24829
|
+
...projectNamed(Number(row2.project_id)),
|
|
24830
|
+
createdBy: authorNamed(database, row2),
|
|
24734
24831
|
title: String(row2.title),
|
|
24735
24832
|
description: row2.description == null ? null : String(row2.description),
|
|
24736
24833
|
type: row2.type,
|
|
@@ -24760,7 +24857,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24760
24857
|
const boardWhere = /* @__PURE__ */ __name((query, zone, at) => {
|
|
24761
24858
|
if (query === void 0)
|
|
24762
24859
|
return { sql: BOARD_SCOPE, params: [] };
|
|
24763
|
-
const where = queryFilter(query, projectTaskColumns(at), {
|
|
24860
|
+
const where = queryFilter(query, projectTaskColumns(at, timezoneOf(zone)), {
|
|
24764
24861
|
command: "tasks list",
|
|
24765
24862
|
now: at,
|
|
24766
24863
|
...zone ? { zone } : {}
|
|
@@ -24770,11 +24867,34 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24770
24867
|
const countOf = /* @__PURE__ */ __name((where) => Number(database.prepare(`SELECT count(*) AS n FROM tasks t WHERE ${where.sql}`).get(...where.params)?.n ?? 0), "countOf");
|
|
24771
24868
|
const rowById = /* @__PURE__ */ __name((id2) => database.prepare("SELECT * FROM tasks WHERE id = ?").get(id2), "rowById");
|
|
24772
24869
|
const details2 = /* @__PURE__ */ __name((id2) => detailsOf(rowById(id2)), "details");
|
|
24870
|
+
const onBoard = /* @__PURE__ */ __name((task) => Boolean(database.prepare(`SELECT 1 FROM tasks t WHERE t.id = ? AND ${BOARD_SCOPE}`).get(task)), "onBoard");
|
|
24871
|
+
const moveToProject = /* @__PURE__ */ __name((task, before2, target, actor, at) => {
|
|
24872
|
+
if (target === Number(before2.project_id))
|
|
24873
|
+
return;
|
|
24874
|
+
if (!onBoard(task))
|
|
24875
|
+
throw new CliError("validation_error", "only a project task moves to another project");
|
|
24876
|
+
const targetRow = database.prepare("SELECT key FROM projects WHERE id = ?").get(target);
|
|
24877
|
+
if (String(targetRow.key).length === INBOX_KEY_LENGTH)
|
|
24878
|
+
throw new CliError("validation_error", "a task moves only into one of your projects");
|
|
24879
|
+
const children = database.prepare("SELECT key FROM tasks WHERE parent_id = ? AND deleted_at IS NULL ORDER BY id").all(task).map((row2) => String(row2.key));
|
|
24880
|
+
if (children.length)
|
|
24881
|
+
throw new CliError("validation_error", `${String(before2.key)} has subtasks (${children.join(", ")}); move or detach them first`, { reason: "task.has-subtasks", subtasks: children });
|
|
24882
|
+
const counted = database.prepare("UPDATE projects SET tasks_count = tasks_count + 1, updated_at = ? WHERE id = ? RETURNING key, tasks_count").get(at, target);
|
|
24883
|
+
const number3 = Number(counted.tasks_count);
|
|
24884
|
+
const key2 = `${String(counted.key)}-${number3}`;
|
|
24885
|
+
database.prepare("UPDATE tasks SET project_id = ?, number = ?, key = ?, parent_id = NULL, updated_at = ? WHERE id = ?").run(target, number3, key2, at, task);
|
|
24886
|
+
recordTaskEvent(database, task, actor, "project", {
|
|
24887
|
+
project: [`project:${before2.project_id}`, `project:${target}`],
|
|
24888
|
+
key: [String(before2.key), key2],
|
|
24889
|
+
...before2.parent_id == null ? {} : { parent: [`task:${taskIdOf(database, Number(before2.parent_id))}`, null] }
|
|
24890
|
+
}, at);
|
|
24891
|
+
}, "moveToProject");
|
|
24773
24892
|
const edit = /* @__PURE__ */ __name((task, fields4, actor, created = false) => {
|
|
24774
24893
|
const before2 = rowById(task);
|
|
24775
24894
|
const at = now2();
|
|
24776
24895
|
const set = [];
|
|
24777
24896
|
const values = [];
|
|
24897
|
+
let bump = false;
|
|
24778
24898
|
const change = /* @__PURE__ */ __name((column2, value, event, key2 = column2) => {
|
|
24779
24899
|
if ((before2[column2] ?? null) === value)
|
|
24780
24900
|
return;
|
|
@@ -24839,8 +24959,21 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
24839
24959
|
}
|
|
24840
24960
|
if (fields4.category !== void 0)
|
|
24841
24961
|
change("category", fields4.category, "category");
|
|
24842
|
-
if (
|
|
24962
|
+
if (fields4.type !== void 0 && fields4.type !== before2.type) {
|
|
24963
|
+
if (!WORK_TASK_TYPES.includes(fields4.type) || !onBoard(task))
|
|
24964
|
+
throw new CliError("validation_error", `a project task's kind is one of ${WORK_TASK_TYPES.join(", ")}`);
|
|
24965
|
+
change("type", fields4.type, "type");
|
|
24966
|
+
bump = true;
|
|
24967
|
+
}
|
|
24968
|
+
if (fields4.project !== void 0)
|
|
24969
|
+
moveToProject(task, before2, projectOf2(fields4.project), actor, at);
|
|
24970
|
+
if (set.length === 0) {
|
|
24971
|
+
if (bump)
|
|
24972
|
+
database.prepare("UPDATE tasks SET revision = revision + 1 WHERE id = ?").run(task);
|
|
24843
24973
|
return;
|
|
24974
|
+
}
|
|
24975
|
+
if (bump)
|
|
24976
|
+
set.push("revision = revision + 1");
|
|
24844
24977
|
database.prepare(`UPDATE tasks SET ${set.join(", ")}, updated_at = ? WHERE id = ?`).run(...values, at, task);
|
|
24845
24978
|
}, "edit");
|
|
24846
24979
|
const columnOf = /* @__PURE__ */ __name((task, status) => database.prepare(`SELECT t.id, t.key, coalesce(t.priority_score, 0) AS score FROM tasks t WHERE ${BOARD_SCOPE} AND t.status = ? AND t.id <> ? ORDER BY ${boardOrder("priority", false)}`).all(status, task).map((row2) => ({ id: Number(row2.id), key: String(row2.key), score: Number(row2.score) })), "columnOf");
|
|
@@ -25052,7 +25185,12 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25052
25185
|
const where = without(name);
|
|
25053
25186
|
return database.prepare(`SELECT ${select2}, count(*) AS n FROM tasks t ${from2} WHERE ${where.sql} GROUP BY ${group}`).all(...where.params);
|
|
25054
25187
|
}, "grouped");
|
|
25055
|
-
const project = grouped("project", "p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
|
|
25188
|
+
const project = grouped("project", "p.id, p.key, p.name", "JOIN projects p ON p.id = t.project_id", "p.id").map((row2) => ({
|
|
25189
|
+
value: String(row2.key),
|
|
25190
|
+
ref: `project:${row2.id}`,
|
|
25191
|
+
name: String(row2.name),
|
|
25192
|
+
count: Number(row2.n)
|
|
25193
|
+
})).sort((a, b) => a.value.localeCompare(b.value));
|
|
25056
25194
|
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
25195
|
const assignee = assigned.map((row2) => ({
|
|
25058
25196
|
value: row2.person == null ? "none" : `person:${row2.person}`,
|
|
@@ -25065,6 +25203,13 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25065
25203
|
priorities.set(label, (priorities.get(label) ?? 0) + Number(row2.n));
|
|
25066
25204
|
}
|
|
25067
25205
|
const states = new Map(grouped("state", "t.status", "", "t.status").map((row2) => [row2.status, Number(row2.n)]));
|
|
25206
|
+
const groups = dueGroups(at, timezoneOf(zone));
|
|
25207
|
+
const dueWhere = boardWhere(withoutField(withoutField(query, "when"), "overdue"), zone, at);
|
|
25208
|
+
const due = Object.keys(groups).map((value) => ({
|
|
25209
|
+
value,
|
|
25210
|
+
count: Number(database.prepare(`SELECT count(*) AS n FROM tasks t WHERE ${dueWhere.sql} AND ${groups[value]}`).get(...dueWhere.params)?.n ?? 0)
|
|
25211
|
+
}));
|
|
25212
|
+
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
25213
|
return {
|
|
25069
25214
|
total: countOf(boardWhere(query, zone, at)),
|
|
25070
25215
|
project,
|
|
@@ -25073,15 +25218,19 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25073
25218
|
value,
|
|
25074
25219
|
count: priorities.get(value) ?? 0
|
|
25075
25220
|
})),
|
|
25076
|
-
state: TASK_STATES.map((value) => ({ value, count: states.get(value) ?? 0 }))
|
|
25221
|
+
state: TASK_STATES.map((value) => ({ value, count: states.get(value) ?? 0 })),
|
|
25222
|
+
due,
|
|
25223
|
+
agent
|
|
25077
25224
|
};
|
|
25078
25225
|
}, "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
|
|
25226
|
+
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
25227
|
person: `person:${row2.id}`,
|
|
25081
25228
|
name: row2.name == null ? null : String(row2.name),
|
|
25082
25229
|
owner: Number(row2.owner) === 1,
|
|
25083
25230
|
tasks: Number(row2.n)
|
|
25084
25231
|
})), "taskPeople"),
|
|
25232
|
+
comment: /* @__PURE__ */ __name(async (id2, text5, by) => addComment(context, required3(id2), textOf3(text5, "a comment", 2e4), by), "comment"),
|
|
25233
|
+
comments: /* @__PURE__ */ __name(async (id2) => commentsOf(database, required3(id2)), "comments"),
|
|
25085
25234
|
events: /* @__PURE__ */ __name(async (id2) => database.prepare("SELECT e.actor_type, e.actor_id, e.kind, e.changes, e.created_at, CASE e.actor_type WHEN 'person' THEN p.name WHEN 'bot' THEN b.name END AS actor_name FROM task_events e LEFT JOIN persons p ON e.actor_type = 'person' AND p.id = e.actor_id LEFT JOIN bots b ON e.actor_type = 'bot' AND b.id = e.actor_id WHERE e.task_id = ? ORDER BY e.id").all(required3(id2)).map((row2) => ({
|
|
25086
25235
|
kind: row2.kind,
|
|
25087
25236
|
actor: row2.actor_type == null ? null : {
|
|
@@ -25089,7 +25238,7 @@ var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
|
|
|
25089
25238
|
id: Number(row2.actor_id),
|
|
25090
25239
|
name: row2.actor_name == null ? null : String(row2.actor_name)
|
|
25091
25240
|
},
|
|
25092
|
-
changes: row2.changes == null ? null : JSON.parse(String(row2.changes)),
|
|
25241
|
+
changes: row2.changes == null ? null : timesAsIso(JSON.parse(String(row2.changes))),
|
|
25093
25242
|
at: iso4(row2.created_at)
|
|
25094
25243
|
})), "events")
|
|
25095
25244
|
};
|
|
@@ -25103,7 +25252,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
|
|
|
25103
25252
|
};
|
|
25104
25253
|
}, "workTasksOver");
|
|
25105
25254
|
|
|
25106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
|
|
25107
25256
|
var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
25108
25257
|
const { database, now: now2 } = context;
|
|
25109
25258
|
const liveRow = /* @__PURE__ */ __name((id2) => {
|
|
@@ -25152,7 +25301,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
|
|
|
25152
25301
|
};
|
|
25153
25302
|
}, "taskCloseOver");
|
|
25154
25303
|
|
|
25155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
|
|
25156
25305
|
var TASK_PAIR_DECISIONS = ["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"];
|
|
25157
25306
|
var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
25158
25307
|
const { database, now: now2 } = context;
|
|
@@ -25371,7 +25520,7 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
|
|
|
25371
25520
|
};
|
|
25372
25521
|
}, "taskPairsOver");
|
|
25373
25522
|
|
|
25374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
|
|
25375
25524
|
var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
|
|
25376
25525
|
var taskStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25377
25526
|
const { database, now: now2 } = context;
|
|
@@ -25576,7 +25725,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
|
|
|
25576
25725
|
throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
|
|
25577
25726
|
}, "oneOf");
|
|
25578
25727
|
|
|
25579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/accounts.js
|
|
25580
25729
|
var accountAccountsOver = /* @__PURE__ */ __name((context) => {
|
|
25581
25730
|
const { database } = context;
|
|
25582
25731
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -25621,7 +25770,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
25621
25770
|
};
|
|
25622
25771
|
}, "accountsStoreOver");
|
|
25623
25772
|
|
|
25624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
|
|
25625
25774
|
var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
|
|
25626
25775
|
var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
|
|
25627
25776
|
const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
|
|
@@ -25645,7 +25794,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
|
|
|
25645
25794
|
})), "keepDownloads");
|
|
25646
25795
|
var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
|
|
25647
25796
|
|
|
25648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/attachments.js
|
|
25649
25798
|
var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
|
|
25650
25799
|
const { database } = context;
|
|
25651
25800
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -25702,7 +25851,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
25702
25851
|
}, "keepAttachmentText")
|
|
25703
25852
|
}), "attachmentsStoreOver");
|
|
25704
25853
|
|
|
25705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
|
|
25706
25855
|
var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
|
|
25707
25856
|
var pointerMover = /* @__PURE__ */ __name((context, type) => {
|
|
25708
25857
|
const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
|
|
@@ -25882,7 +26031,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
|
|
|
25882
26031
|
return done;
|
|
25883
26032
|
}, "rekeyChats");
|
|
25884
26033
|
|
|
25885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
|
|
25886
26035
|
var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
|
|
25887
26036
|
var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
|
|
25888
26037
|
var CHAT_LIST_KEY = "chat_list_complete";
|
|
@@ -25914,7 +26063,7 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
|
|
|
25914
26063
|
});
|
|
25915
26064
|
}, "chatCompleteness");
|
|
25916
26065
|
|
|
25917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/chats.js
|
|
25918
26067
|
var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
25919
26068
|
const { database } = context;
|
|
25920
26069
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
|
|
@@ -26021,7 +26170,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26021
26170
|
};
|
|
26022
26171
|
}, "chatsStoreOver");
|
|
26023
26172
|
|
|
26024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
|
|
26025
26174
|
import { createHash as createHash6 } from "node:crypto";
|
|
26026
26175
|
var BATCH_CONTEXT = 50;
|
|
26027
26176
|
var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
|
|
@@ -26159,7 +26308,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
|
|
|
26159
26308
|
var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
|
|
26160
26309
|
${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
|
|
26161
26310
|
|
|
26162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
|
|
26163
26312
|
import { setTimeout } from "node:timers/promises";
|
|
26164
26313
|
var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
|
|
26165
26314
|
var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
|
|
@@ -26471,7 +26620,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
|
|
|
26471
26620
|
AND NOT EXISTS (SELECT 1 FROM messages d
|
|
26472
26621
|
WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
|
|
26473
26622
|
|
|
26474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/conversations.js
|
|
26475
26624
|
var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
26476
26625
|
const { database } = context;
|
|
26477
26626
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -26578,7 +26727,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
26578
26727
|
};
|
|
26579
26728
|
}, "conversationsStoreOver");
|
|
26580
26729
|
|
|
26581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/counters.js
|
|
26582
26731
|
var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
|
|
26583
26732
|
var accountCountersOver = /* @__PURE__ */ __name((context) => {
|
|
26584
26733
|
const { database } = context;
|
|
@@ -26603,7 +26752,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26603
26752
|
counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
|
|
26604
26753
|
}), "countersStoreOver");
|
|
26605
26754
|
|
|
26606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
|
|
26607
26756
|
var MENTION_STATUSES = ["found", "linked", "dismissed"];
|
|
26608
26757
|
var MENTION_QUERY = defineQuery({
|
|
26609
26758
|
entity: "mention",
|
|
@@ -26819,7 +26968,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
|
|
|
26819
26968
|
return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
|
|
26820
26969
|
}, "listPlaces");
|
|
26821
26970
|
|
|
26822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/mentions.js
|
|
26823
26972
|
var accountMentionsOver = /* @__PURE__ */ __name((context) => {
|
|
26824
26973
|
const { database } = context;
|
|
26825
26974
|
const { findAccountPk: findAccountPk2 } = keysOver(context);
|
|
@@ -26854,7 +27003,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
26854
27003
|
places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
|
|
26855
27004
|
}), "mentionsStoreOver");
|
|
26856
27005
|
|
|
26857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
|
|
26858
27007
|
var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
|
|
26859
27008
|
const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
|
|
26860
27009
|
const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
|
|
@@ -26869,7 +27018,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
|
|
|
26869
27018
|
}));
|
|
26870
27019
|
}, "documentLinkMessages");
|
|
26871
27020
|
|
|
26872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
|
|
26873
27022
|
var stemmerFor = stemmerCache();
|
|
26874
27023
|
var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
|
|
26875
27024
|
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
@@ -26913,7 +27062,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
|
|
|
26913
27062
|
});
|
|
26914
27063
|
}, "laterSharingRare");
|
|
26915
27064
|
|
|
26916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/messages.js
|
|
26917
27066
|
var accountMessagesOver = /* @__PURE__ */ __name((context) => {
|
|
26918
27067
|
const { database } = context;
|
|
26919
27068
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
|
|
@@ -27048,7 +27197,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
27048
27197
|
laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
|
|
27049
27198
|
}), "messagesStoreOver");
|
|
27050
27199
|
|
|
27051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
|
|
27052
27201
|
var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
|
|
27053
27202
|
var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
27054
27203
|
var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
|
|
@@ -27105,7 +27254,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
|
|
|
27105
27254
|
});
|
|
27106
27255
|
}, "personPreparation");
|
|
27107
27256
|
|
|
27108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
|
|
27109
27258
|
var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
|
|
27110
27259
|
const id2 = Number(uid);
|
|
27111
27260
|
if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
|
|
@@ -27113,7 +27262,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
|
|
|
27113
27262
|
return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(id2, JSON.stringify(accountIds)));
|
|
27114
27263
|
}, "personSeenInAccounts");
|
|
27115
27264
|
|
|
27116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
|
|
27117
27266
|
var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
|
|
27118
27267
|
const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
|
|
27119
27268
|
if (!row2)
|
|
@@ -27179,7 +27328,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
|
|
|
27179
27328
|
return { id: id2, personId, removed: true };
|
|
27180
27329
|
}, "removeNote");
|
|
27181
27330
|
|
|
27182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/people.js
|
|
27183
27332
|
var accountPeopleOver = /* @__PURE__ */ __name((context) => {
|
|
27184
27333
|
const { database } = context;
|
|
27185
27334
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
|
|
@@ -27234,6 +27383,16 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27234
27383
|
personOf: /* @__PURE__ */ __name(async (identity) => personOf(context, identity), "personOf"),
|
|
27235
27384
|
personSeenInAccounts: /* @__PURE__ */ __name(async (uid, accountIds) => personSeenInAccounts(context, uid, accountIds), "personSeenInAccounts"),
|
|
27236
27385
|
personByUid: /* @__PURE__ */ __name(async (uid) => personByUid(context, uid), "personByUid"),
|
|
27386
|
+
add: /* @__PURE__ */ __name(async ({ name }) => {
|
|
27387
|
+
const text5 = typeof name === "string" ? name.trim() : "";
|
|
27388
|
+
if (!text5 || text5.length > 200)
|
|
27389
|
+
throw new CliError("validation_error", "a person's name takes 1\u2013200 characters");
|
|
27390
|
+
const id2 = write(database, () => {
|
|
27391
|
+
const at = context.now();
|
|
27392
|
+
return Number(database.prepare("INSERT INTO persons (name, owner, created_at, updated_at) VALUES (?, 0, ?, ?) RETURNING id").get(text5, at, at)?.id);
|
|
27393
|
+
});
|
|
27394
|
+
return personByUid(context, String(id2));
|
|
27395
|
+
}, "add"),
|
|
27237
27396
|
owner: /* @__PURE__ */ __name(async () => {
|
|
27238
27397
|
try {
|
|
27239
27398
|
return personByUid(context, String(ownerPerson(database).id));
|
|
@@ -27254,13 +27413,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
|
|
|
27254
27413
|
};
|
|
27255
27414
|
}, "peopleStoreOver");
|
|
27256
27415
|
|
|
27257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27258
27417
|
import { createHash as createHash8 } from "node:crypto";
|
|
27259
27418
|
|
|
27260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27261
27420
|
import { createHash as createHash7 } from "node:crypto";
|
|
27262
27421
|
|
|
27263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
|
|
27264
27423
|
var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
|
|
27265
27424
|
var exhausted2 = /* @__PURE__ */ __name((budget) => {
|
|
27266
27425
|
throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
|
|
@@ -27482,7 +27641,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
|
|
|
27482
27641
|
};
|
|
27483
27642
|
}, "rankReplyGraph");
|
|
27484
27643
|
|
|
27485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
|
|
27486
27645
|
var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
|
|
27487
27646
|
var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
|
|
27488
27647
|
var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
|
|
@@ -27656,7 +27815,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
|
|
|
27656
27815
|
return { items, evidence, summary, graph: graph.quality };
|
|
27657
27816
|
}, "calculateAdminStatistics");
|
|
27658
27817
|
|
|
27659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
|
|
27660
27819
|
var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
27661
27820
|
const dates = [];
|
|
27662
27821
|
const visit = /* @__PURE__ */ __name((node, required3) => {
|
|
@@ -27678,7 +27837,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
|
|
|
27678
27837
|
return dates[0].node.resolution.date;
|
|
27679
27838
|
}, "rankingContextRange");
|
|
27680
27839
|
|
|
27681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
|
|
27682
27841
|
var reactionCounts = /* @__PURE__ */ __name((stored3) => {
|
|
27683
27842
|
let counts;
|
|
27684
27843
|
try {
|
|
@@ -27973,7 +28132,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
|
|
|
27973
28132
|
});
|
|
27974
28133
|
}, "rankQuery");
|
|
27975
28134
|
|
|
27976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
|
|
27977
28136
|
function fail4(message2, reason = "query.too-large") {
|
|
27978
28137
|
throw new CliError("validation_error", message2, { reason, complete: false });
|
|
27979
28138
|
}
|
|
@@ -28150,7 +28309,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
|
|
|
28150
28309
|
return result;
|
|
28151
28310
|
}), "adminStatisticsQuery");
|
|
28152
28311
|
|
|
28153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
|
|
28154
28313
|
var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
|
|
28155
28314
|
if (!execution.accounts.length)
|
|
28156
28315
|
return { conversations: [], chats: [] };
|
|
@@ -28168,7 +28327,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
|
|
|
28168
28327
|
return { conversations: conversations2, chats: chats2 };
|
|
28169
28328
|
}, "conversationEligibility");
|
|
28170
28329
|
|
|
28171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
|
|
28172
28331
|
import { createHash as createHash9 } from "node:crypto";
|
|
28173
28332
|
var EVIDENCE_BYTES = 64 * 1024;
|
|
28174
28333
|
var FINGERPRINT_BYTES = 8 * 1024 * 1024;
|
|
@@ -28318,7 +28477,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
|
|
|
28318
28477
|
return result;
|
|
28319
28478
|
}, "rankingEvidence");
|
|
28320
28479
|
|
|
28321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/queries.js
|
|
28322
28481
|
var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
28323
28482
|
const mailIndexed = /* @__PURE__ */ __name((execution) => {
|
|
28324
28483
|
if (execution.corpus === "mail")
|
|
@@ -28337,7 +28496,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
|
|
|
28337
28496
|
};
|
|
28338
28497
|
}, "queriesStoreOver");
|
|
28339
28498
|
|
|
28340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
|
|
28341
28500
|
var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
|
|
28342
28501
|
const { database, now: now2 } = context;
|
|
28343
28502
|
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 +28535,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
|
|
|
28376
28535
|
}));
|
|
28377
28536
|
}, "chatEventsOf");
|
|
28378
28537
|
|
|
28379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28380
28539
|
import { createHash as createHash10 } from "node:crypto";
|
|
28381
28540
|
|
|
28382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/calendar.js
|
|
28383
28542
|
var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
28384
28543
|
const format = new Intl.DateTimeFormat("en-CA", {
|
|
28385
28544
|
timeZone: zone,
|
|
@@ -28394,7 +28553,7 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
|
|
|
28394
28553
|
};
|
|
28395
28554
|
}, "calendarKey");
|
|
28396
28555
|
|
|
28397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/retention.js
|
|
28398
28557
|
var RETENTION_TOLERANCE = 864e5;
|
|
28399
28558
|
var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
|
|
28400
28559
|
const { since, until, cutoff, checkpoints, within, limit, by } = options;
|
|
@@ -28448,7 +28607,7 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
|
|
|
28448
28607
|
return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
|
|
28449
28608
|
}, "retentionCohorts");
|
|
28450
28609
|
|
|
28451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
|
|
28452
28611
|
var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
|
|
28453
28612
|
var week = /* @__PURE__ */ __name((day) => {
|
|
28454
28613
|
const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
|
|
@@ -28584,7 +28743,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
|
|
|
28584
28743
|
};
|
|
28585
28744
|
}, "retentionQuery");
|
|
28586
28745
|
|
|
28587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
|
|
28588
28747
|
var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
28589
28748
|
var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
|
|
28590
28749
|
...isBot === void 0 ? {} : { bot: isBot },
|
|
@@ -28715,7 +28874,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
|
|
|
28715
28874
|
lastCount: memberCountsOf(context, pk).at(-1) ?? null
|
|
28716
28875
|
})), "trackedChats");
|
|
28717
28876
|
|
|
28718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/roster.js
|
|
28719
28878
|
var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
28720
28879
|
const { database } = context;
|
|
28721
28880
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
|
|
@@ -28771,7 +28930,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
28771
28930
|
};
|
|
28772
28931
|
}, "rosterStoreOver");
|
|
28773
28932
|
|
|
28774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
|
|
28775
28934
|
var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
|
|
28776
28935
|
var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
|
|
28777
28936
|
const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
|
|
@@ -28795,7 +28954,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
|
|
|
28795
28954
|
}
|
|
28796
28955
|
}, "backfillNormalized");
|
|
28797
28956
|
|
|
28798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
|
|
28799
28958
|
var INDEX2 = "message_words";
|
|
28800
28959
|
var searchIndexState2 = /* @__PURE__ */ __name((database) => {
|
|
28801
28960
|
const row2 = indexRow(database, INDEX2);
|
|
@@ -28922,7 +29081,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
|
|
|
28922
29081
|
});
|
|
28923
29082
|
}, "resetSearchIndex");
|
|
28924
29083
|
|
|
28925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
|
|
28926
29085
|
var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
|
|
28927
29086
|
const filled2 = { stemmed: 0, drained: 0 };
|
|
28928
29087
|
const before2 = stemsState(database);
|
|
@@ -29017,7 +29176,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
|
|
|
29017
29176
|
return resetStems(database, { now: now2 });
|
|
29018
29177
|
}, "followDefaultStemmers");
|
|
29019
29178
|
|
|
29020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
|
|
29021
29180
|
var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
|
|
29022
29181
|
var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
|
|
29023
29182
|
const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
|
|
@@ -29039,7 +29198,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
|
|
|
29039
29198
|
});
|
|
29040
29199
|
}, "termCandidates");
|
|
29041
29200
|
|
|
29042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/search-index.js
|
|
29043
29202
|
var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29044
29203
|
const { database } = context;
|
|
29045
29204
|
const stemmerFor2 = stemmerCache();
|
|
@@ -29061,7 +29220,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29061
29220
|
};
|
|
29062
29221
|
}, "searchIndexStoreOver");
|
|
29063
29222
|
|
|
29064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
|
|
29065
29224
|
var HISTORY_KEPT = 1e3;
|
|
29066
29225
|
var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
|
|
29067
29226
|
var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
|
|
@@ -29130,7 +29289,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
|
|
|
29130
29289
|
return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
|
|
29131
29290
|
}, "clearHistory");
|
|
29132
29291
|
|
|
29133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/searches.js
|
|
29134
29293
|
var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
29135
29294
|
const { database } = context;
|
|
29136
29295
|
return {
|
|
@@ -29154,7 +29313,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29154
29313
|
};
|
|
29155
29314
|
}, "searchesStoreOver");
|
|
29156
29315
|
|
|
29157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
|
|
29158
29317
|
var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
|
|
29159
29318
|
var ACTION_OUTCOMES = ["ok", "refused", "failed"];
|
|
29160
29319
|
var CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
@@ -29197,7 +29356,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
|
|
|
29197
29356
|
};
|
|
29198
29357
|
}, "agentActionsStoreOver");
|
|
29199
29358
|
|
|
29200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
|
|
29201
29360
|
var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
29202
29361
|
}) => {
|
|
29203
29362
|
const { database, now: now2 } = context;
|
|
@@ -29256,8 +29415,15 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
|
|
|
29256
29415
|
};
|
|
29257
29416
|
}, "botUpdateStoreOver");
|
|
29258
29417
|
|
|
29259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
|
|
29260
29419
|
var DAY4 = 864e5;
|
|
29420
|
+
var accountsOf = /* @__PURE__ */ __name((filter) => {
|
|
29421
|
+
if (filter.accountIds !== void 0 && filter.accountId !== void 0)
|
|
29422
|
+
throw new CliError("validation_error", "an event filter takes accountId or accountIds, not both");
|
|
29423
|
+
if (filter.accountIds?.length === 0)
|
|
29424
|
+
throw new CliError("validation_error", "accountIds names no account");
|
|
29425
|
+
return filter.accountIds ?? (filter.accountId === void 0 ? void 0 : [filter.accountId]);
|
|
29426
|
+
}, "accountsOf");
|
|
29261
29427
|
var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
29262
29428
|
const clauses = ["e.deleted_at IS NULL"];
|
|
29263
29429
|
const params = [];
|
|
@@ -29293,20 +29459,21 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29293
29459
|
clauses.push(entries("ce.calendar_id = ?"));
|
|
29294
29460
|
params.push(filter.calendarId);
|
|
29295
29461
|
}
|
|
29296
|
-
|
|
29297
|
-
|
|
29298
|
-
|
|
29299
|
-
|
|
29462
|
+
const accounts2 = accountsOf(filter);
|
|
29463
|
+
const inAccounts = /* @__PURE__ */ __name((column2) => {
|
|
29464
|
+
if (accounts2 === void 0)
|
|
29465
|
+
return "";
|
|
29466
|
+
for (const id2 of accounts2)
|
|
29467
|
+
params.push(id2);
|
|
29468
|
+
return `${column2} IN (${accounts2.map(() => "?").join(", ")})`;
|
|
29469
|
+
}, "inAccounts");
|
|
29470
|
+
if (accounts2 !== void 0)
|
|
29471
|
+
clauses.push(entries(inAccounts("c.account_id")));
|
|
29300
29472
|
if (filter.personId !== void 0) {
|
|
29301
29473
|
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
29474
|
params.push(filter.personId);
|
|
29303
29475
|
}
|
|
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");
|
|
29476
|
+
const account = /* @__PURE__ */ __name((alias2) => accounts2 === void 0 ? "" : ` AND ${inAccounts(`${alias2}.account_id`)}`, "account");
|
|
29310
29477
|
if (filter.changedSince !== void 0) {
|
|
29311
29478
|
const since = filter.changedSince;
|
|
29312
29479
|
const own = account("c");
|
|
@@ -29323,16 +29490,18 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29323
29490
|
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
29491
|
ORDER BY r.created_at, r.id LIMIT 1) = 1)))`);
|
|
29325
29492
|
}
|
|
29326
|
-
if (filter.overlapping) {
|
|
29493
|
+
if (filter.overlapping !== void 0) {
|
|
29327
29494
|
const busy = /* @__PURE__ */ __name((event) => `${event}.deleted_at IS NULL AND ${event}.status <> 'cancelled' AND ${event}.all_day = 0
|
|
29328
29495
|
AND ${event}.starts_at IS NOT NULL AND ${event}.ends_at IS NOT NULL AND EXISTS (SELECT 1 FROM calendar_entries
|
|
29329
29496
|
bce JOIN calendars bc ON bc.id = bce.calendar_id WHERE bce.event_id = ${event}.id${account("bc")}
|
|
29330
29497
|
AND bce.deleted_at IS NULL AND bce.status <> 'cancelled' AND coalesce(bce.own_response, '') <> 'declined'
|
|
29331
|
-
AND coalesce(bce.transparency, '') <> 'transparent'
|
|
29498
|
+
AND coalesce(bce.transparency, '') <> 'transparent'
|
|
29499
|
+
AND coalesce(bce.event_type, '') <> 'working-location')`, "busy");
|
|
29332
29500
|
const own = busy("e");
|
|
29333
29501
|
params.push(longest());
|
|
29334
|
-
|
|
29335
|
-
AND e2.ends_at > e.starts_at AND e2.starts_at >= e.starts_at - ? AND ${busy("e2")})
|
|
29502
|
+
const clash = `${own} AND EXISTS (SELECT 1 FROM events e2 WHERE e2.id <> e.id AND e2.starts_at < e.ends_at
|
|
29503
|
+
AND e2.ends_at > e.starts_at AND e2.starts_at >= e.starts_at - ? AND ${busy("e2")})`;
|
|
29504
|
+
clauses.push(filter.overlapping ? clash : `NOT (${clash})`);
|
|
29336
29505
|
}
|
|
29337
29506
|
const limit = filter.limit ?? 100;
|
|
29338
29507
|
const offset = filter.offset ?? 0;
|
|
@@ -29341,7 +29510,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
|
|
|
29341
29510
|
return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
|
|
29342
29511
|
}, "listEvents");
|
|
29343
29512
|
|
|
29344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
|
|
29345
29514
|
var calendarOf = /* @__PURE__ */ __name((row2) => ({
|
|
29346
29515
|
id: Number(row2.id),
|
|
29347
29516
|
accountId: Number(row2.account_id),
|
|
@@ -29921,7 +30090,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
29921
30090
|
};
|
|
29922
30091
|
}, "eventStoreOver");
|
|
29923
30092
|
|
|
29924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
|
|
29925
30094
|
var CATALOG_QUERY = defineQuery({
|
|
29926
30095
|
entity: "document",
|
|
29927
30096
|
backend: "sql",
|
|
@@ -30163,7 +30332,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
|
|
|
30163
30332
|
};
|
|
30164
30333
|
}, "catalogStoreOver");
|
|
30165
30334
|
|
|
30166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/context/evidence.js
|
|
30167
30336
|
import { createHash as createHash11 } from "node:crypto";
|
|
30168
30337
|
var CONTEXT_MAX_READ_BYTES = 262144;
|
|
30169
30338
|
var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
|
|
@@ -30261,7 +30430,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
|
|
|
30261
30430
|
return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
|
|
30262
30431
|
}, "contextEvidenceRequest");
|
|
30263
30432
|
|
|
30264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
|
|
30265
30434
|
var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
|
|
30266
30435
|
var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
|
|
30267
30436
|
CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
|
|
@@ -30274,7 +30443,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
|
|
|
30274
30443
|
THEN 'source-modified' ELSE 'stored-update' END`;
|
|
30275
30444
|
var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
|
|
30276
30445
|
|
|
30277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
|
|
30278
30447
|
var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
30279
30448
|
const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
|
|
30280
30449
|
signal?.throwIfAborted();
|
|
@@ -30373,7 +30542,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
|
|
|
30373
30542
|
});
|
|
30374
30543
|
}, "readMeetingContextEvidence");
|
|
30375
30544
|
|
|
30376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
|
|
30377
30546
|
var corpora = {
|
|
30378
30547
|
message: {
|
|
30379
30548
|
table: "messages",
|
|
@@ -30584,6 +30753,16 @@ var contextRecordOf = /* @__PURE__ */ __name((database, ref3) => {
|
|
|
30584
30753
|
revision: row3.revision == null ? null : Number(row3.revision)
|
|
30585
30754
|
} : null;
|
|
30586
30755
|
}
|
|
30756
|
+
const note2 = /^note:([1-9]\d*)$/.exec(ref3);
|
|
30757
|
+
if (note2) {
|
|
30758
|
+
const row3 = database.prepare("SELECT title, body, revision FROM notes WHERE id=? AND deleted_at IS NULL").get(Number(note2[1]));
|
|
30759
|
+
return row3 ? {
|
|
30760
|
+
ref: ref3,
|
|
30761
|
+
title: row3.title == null ? null : String(row3.title),
|
|
30762
|
+
text: String(row3.body),
|
|
30763
|
+
revision: Number(row3.revision)
|
|
30764
|
+
} : null;
|
|
30765
|
+
}
|
|
30587
30766
|
let at;
|
|
30588
30767
|
try {
|
|
30589
30768
|
at = parseLocator(ref3);
|
|
@@ -30602,7 +30781,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
30602
30781
|
}
|
|
30603
30782
|
}), "contextRecordsOver");
|
|
30604
30783
|
|
|
30605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
|
|
30606
30785
|
var NOTE_FIELDS = [
|
|
30607
30786
|
"text",
|
|
30608
30787
|
"exact",
|
|
@@ -31032,7 +31211,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31032
31211
|
};
|
|
31033
31212
|
}, "noteSearchOver");
|
|
31034
31213
|
|
|
31035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
|
|
31036
31215
|
var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
|
|
31037
31216
|
var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
|
|
31038
31217
|
var EVENT_CORPUS = {
|
|
@@ -31164,20 +31343,26 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
|
|
|
31164
31343
|
};
|
|
31165
31344
|
}, "eventSearchOver");
|
|
31166
31345
|
|
|
31167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
|
|
31168
31347
|
var EVIDENCE_FINDINGS_KIND = "evidence_findings";
|
|
31169
31348
|
var reference = /* @__PURE__ */ __name((raw) => {
|
|
31170
|
-
if (/^document:[1-9]\d*$/.test(raw))
|
|
31349
|
+
if (/^(document|note):[1-9]\d*$/.test(raw))
|
|
31171
31350
|
return raw;
|
|
31172
31351
|
try {
|
|
31173
31352
|
return formatLocator(parseLocator(raw));
|
|
31174
31353
|
} catch {
|
|
31175
|
-
throw new CliError("validation_error", "finding evidence is a msg: or
|
|
31354
|
+
throw new CliError("validation_error", "finding evidence is a msg:, document: or note: reference");
|
|
31176
31355
|
}
|
|
31177
31356
|
}, "reference");
|
|
31178
|
-
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, {
|
|
31357
|
+
var validateEvidenceFindings = /* @__PURE__ */ __name((input) => validateFindings(input, {
|
|
31358
|
+
plural: "evidence findings",
|
|
31359
|
+
singular: "evidence finding",
|
|
31360
|
+
cited: "reference",
|
|
31361
|
+
reference,
|
|
31362
|
+
anySubject: true
|
|
31363
|
+
}), "validateEvidenceFindings");
|
|
31179
31364
|
|
|
31180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/moment.js
|
|
31181
31366
|
var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
|
|
31182
31367
|
try {
|
|
31183
31368
|
return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
|
|
@@ -31189,7 +31374,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
|
|
|
31189
31374
|
}
|
|
31190
31375
|
}, "calendarMoment");
|
|
31191
31376
|
|
|
31192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
|
|
31193
31378
|
var NAMED3 = "SELECT f.*, b.name AS author_name FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
|
|
31194
31379
|
var iso8 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
|
|
31195
31380
|
var oneOf4 = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
@@ -31338,7 +31523,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31338
31523
|
};
|
|
31339
31524
|
}, "factsStoreOver");
|
|
31340
31525
|
|
|
31341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
|
|
31342
31527
|
var invalid2 = /* @__PURE__ */ __name((message2) => {
|
|
31343
31528
|
throw new CliError("validation_error", message2);
|
|
31344
31529
|
}, "invalid");
|
|
@@ -31354,13 +31539,19 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31354
31539
|
const cited = /* @__PURE__ */ __name((input, cite) => {
|
|
31355
31540
|
const seen = /* @__PURE__ */ new Map();
|
|
31356
31541
|
for (const finding of input.findings) {
|
|
31357
|
-
|
|
31358
|
-
if (project
|
|
31359
|
-
|
|
31360
|
-
|
|
31361
|
-
|
|
31362
|
-
|
|
31363
|
-
|
|
31542
|
+
let projectId2 = null;
|
|
31543
|
+
if (finding.project !== void 0) {
|
|
31544
|
+
const project = requiredThing(database, finding.project, "the project");
|
|
31545
|
+
if (project.type !== "project")
|
|
31546
|
+
return invalid2("a finding needs an owner project");
|
|
31547
|
+
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);
|
|
31548
|
+
if (!projectRow)
|
|
31549
|
+
throw new CliError("not_found", "the owner project is unavailable");
|
|
31550
|
+
seen.set(finding.project, projectRow);
|
|
31551
|
+
projectId2 = String(project.id);
|
|
31552
|
+
}
|
|
31553
|
+
if (finding.subject !== void 0)
|
|
31554
|
+
seen.set(finding.subject, requiredThing(database, finding.subject, "the subject"));
|
|
31364
31555
|
if (finding.kind === "task" && finding.assignee) {
|
|
31365
31556
|
const person2 = requiredThing(database, finding.assignee, "the assignee");
|
|
31366
31557
|
if (person2.type !== "person")
|
|
@@ -31371,7 +31562,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31371
31562
|
seen.set(finding.assignee, personRow);
|
|
31372
31563
|
}
|
|
31373
31564
|
for (const evidence of finding.evidence)
|
|
31374
|
-
cite(evidence, finding,
|
|
31565
|
+
cite(evidence, finding, projectId2, seen);
|
|
31375
31566
|
}
|
|
31376
31567
|
return seen;
|
|
31377
31568
|
}, "cited");
|
|
@@ -31387,12 +31578,15 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31387
31578
|
const fact = facts2.add({
|
|
31388
31579
|
type: finding.type,
|
|
31389
31580
|
statement: finding.statement,
|
|
31390
|
-
project: finding.project,
|
|
31581
|
+
...finding.project === void 0 ? {} : { project: finding.project },
|
|
31582
|
+
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
31391
31583
|
evidence,
|
|
31392
31584
|
by: agent
|
|
31393
31585
|
});
|
|
31394
31586
|
return facts2.accept(fact.ref).ref;
|
|
31395
31587
|
}
|
|
31588
|
+
if (finding.project === void 0)
|
|
31589
|
+
return invalid2("a task finding names the project the task goes in");
|
|
31396
31590
|
const task = tasks2.create({
|
|
31397
31591
|
project: finding.project,
|
|
31398
31592
|
title: finding.title,
|
|
@@ -31428,7 +31622,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind3) => {
|
|
|
31428
31622
|
return { snapshot: snapshot2, snapshotParts, previous, outcomes };
|
|
31429
31623
|
}, "findingsCoreOver");
|
|
31430
31624
|
|
|
31431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
|
|
31432
31626
|
var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
|
|
31433
31627
|
var PROPOSAL_VERDICTS = ["useful", "not_useful"];
|
|
31434
31628
|
var iso9 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
|
|
@@ -31575,7 +31769,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31575
31769
|
};
|
|
31576
31770
|
}, "proposedActionsStoreOver");
|
|
31577
31771
|
|
|
31578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
|
|
31579
31773
|
var stale = /* @__PURE__ */ __name(() => {
|
|
31580
31774
|
throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
|
|
31581
31775
|
reason: "evidence-findings.stale"
|
|
@@ -31599,13 +31793,15 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31599
31793
|
return invalid3("stored findings exceed the read budget");
|
|
31600
31794
|
return proposals.get(id2);
|
|
31601
31795
|
}, "load");
|
|
31796
|
+
const projectOf2 = /* @__PURE__ */ __name((input) => input.findings.find((finding) => finding.project)?.project ?? null, "projectOf");
|
|
31602
31797
|
const view = /* @__PURE__ */ __name((proposal) => {
|
|
31603
31798
|
const input = proposal.payload;
|
|
31604
|
-
if (!input || !
|
|
31799
|
+
if (!input || !["proposed", "approved", "rejected"].includes(proposal.status))
|
|
31605
31800
|
return invalid3("invalid stored findings batch");
|
|
31606
31801
|
return {
|
|
31607
31802
|
id: proposal.id,
|
|
31608
|
-
project:
|
|
31803
|
+
project: projectOf2(input),
|
|
31804
|
+
subject: proposal.target,
|
|
31609
31805
|
input: { schemaVersion: 1, key: input.key, extractor: input.extractor, findings: input.findings },
|
|
31610
31806
|
fingerprint: findingHash({ input, author: proposal.proposedBy.id }),
|
|
31611
31807
|
status: proposal.status === "proposed" ? "proposed" : "reviewed",
|
|
@@ -31658,9 +31854,12 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31658
31854
|
return {
|
|
31659
31855
|
stage: /* @__PURE__ */ __name(async (raw, rawAgent) => {
|
|
31660
31856
|
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");
|
|
31857
|
+
const projects2 = new Set(input.findings.flatMap((finding) => finding.project ?? []));
|
|
31858
|
+
if (projects2.size > 1)
|
|
31859
|
+
return invalid3("an evidence findings batch is about one project at most");
|
|
31860
|
+
const subjects = new Set(input.findings.map((finding) => finding.subject));
|
|
31861
|
+
const shared = subjects.size === 1 ? [...subjects][0] : void 0;
|
|
31862
|
+
const target = shared ?? [...projects2][0];
|
|
31664
31863
|
const by = findingsAgent(rawAgent);
|
|
31665
31864
|
return write(database, () => {
|
|
31666
31865
|
const { actor } = authorActor(context, by);
|
|
@@ -31680,7 +31879,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31680
31879
|
return view(proposals.propose({
|
|
31681
31880
|
kind: EVIDENCE_FINDINGS_KIND,
|
|
31682
31881
|
by,
|
|
31683
|
-
target:
|
|
31882
|
+
...target === void 0 ? {} : { target },
|
|
31684
31883
|
payload: { ...input, inputHash, snapshotHash, snapshotParts, agentModel: by.model ?? null }
|
|
31685
31884
|
}));
|
|
31686
31885
|
});
|
|
@@ -31695,7 +31894,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31695
31894
|
const projectId2 = project === void 0 ? null : /^project:([1-9]\d*)$/.exec(project)?.[1];
|
|
31696
31895
|
if (projectId2 === void 0)
|
|
31697
31896
|
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);
|
|
31897
|
+
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
31898
|
return { items: ids.slice(0, limit).map((row2) => view(load(String(row2.id)))), hasMore: ids.length > limit };
|
|
31700
31899
|
}, "list"),
|
|
31701
31900
|
review: /* @__PURE__ */ __name(async (id2, decision) => write(database, () => {
|
|
@@ -31742,7 +31941,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
31742
31941
|
};
|
|
31743
31942
|
}, "evidenceFindingsStoreOver");
|
|
31744
31943
|
|
|
31745
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
|
|
31746
31945
|
var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
|
|
31747
31946
|
var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
|
|
31748
31947
|
rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
|
|
@@ -31795,7 +31994,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
|
|
|
31795
31994
|
}, "forPerson")
|
|
31796
31995
|
}), "involvementStoreOver");
|
|
31797
31996
|
|
|
31798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
|
|
31799
31998
|
import { createHash as createHash12 } from "node:crypto";
|
|
31800
31999
|
var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
|
|
31801
32000
|
var id = /* @__PURE__ */ __name((value) => {
|
|
@@ -31881,16 +32080,16 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
|
|
|
31881
32080
|
};
|
|
31882
32081
|
}, "meetingProjectsStoreOver");
|
|
31883
32082
|
|
|
31884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
31885
32084
|
import { createHash as createHash15 } from "node:crypto";
|
|
31886
32085
|
|
|
31887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
31888
32087
|
import { createHash as createHash14 } from "node:crypto";
|
|
31889
32088
|
|
|
31890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31891
32090
|
import { createHash as createHash13 } from "node:crypto";
|
|
31892
32091
|
|
|
31893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
|
|
31894
32093
|
var consolidationId = /* @__PURE__ */ __name((value, field4) => {
|
|
31895
32094
|
if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
31896
32095
|
throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
|
|
@@ -31941,7 +32140,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
|
|
|
31941
32140
|
return input;
|
|
31942
32141
|
}, "consolidationApplyInput");
|
|
31943
32142
|
|
|
31944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
|
|
31945
32144
|
var receiptOf = /* @__PURE__ */ __name((row2) => ({
|
|
31946
32145
|
id: String(row2.id),
|
|
31947
32146
|
sourceId: String(row2.source_id),
|
|
@@ -32016,7 +32215,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
|
|
|
32016
32215
|
}, { beforeCommit: check3 });
|
|
32017
32216
|
}, "applyTagConsolidation");
|
|
32018
32217
|
|
|
32019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
|
|
32020
32219
|
var selections = [
|
|
32021
32220
|
["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
|
|
32022
32221
|
["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
|
|
@@ -32160,7 +32359,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
|
|
|
32160
32359
|
};
|
|
32161
32360
|
}, "previewRows");
|
|
32162
32361
|
|
|
32163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
|
|
32164
32363
|
var kinds = ["project", "tag", "topic"];
|
|
32165
32364
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
32166
32365
|
if (signal?.aborted)
|
|
@@ -32424,7 +32623,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
32424
32623
|
};
|
|
32425
32624
|
}, "vocabularyStoreOver");
|
|
32426
32625
|
|
|
32427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
|
|
32428
32627
|
var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
|
|
32429
32628
|
var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
|
|
32430
32629
|
var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
|
|
@@ -32946,7 +33145,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
|
|
|
32946
33145
|
return key2.padEnd(3, "X");
|
|
32947
33146
|
}, "projectKey");
|
|
32948
33147
|
|
|
32949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
|
|
32950
33149
|
var DAY5 = 864e5;
|
|
32951
33150
|
var SETTING4 = "logs_pruned_at";
|
|
32952
33151
|
var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
|
|
@@ -32973,7 +33172,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
|
|
|
32973
33172
|
};
|
|
32974
33173
|
}, "logPruner");
|
|
32975
33174
|
|
|
32976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
|
|
32977
33176
|
var stale2 = /* @__PURE__ */ __name(() => {
|
|
32978
33177
|
throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
|
|
32979
33178
|
reason: "meeting-findings.stale"
|
|
@@ -33142,7 +33341,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33142
33341
|
};
|
|
33143
33342
|
}, "meetingFindingsStoreOver");
|
|
33144
33343
|
|
|
33145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
|
|
33146
33345
|
var RANK_BATCH = 512;
|
|
33147
33346
|
var LIVE3 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
|
|
33148
33347
|
var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
|
|
@@ -33413,7 +33612,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
|
|
|
33413
33612
|
}
|
|
33414
33613
|
}), "meetingVectorsOver");
|
|
33415
33614
|
|
|
33416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
|
|
33417
33616
|
var OTHER_SOURCES = ["document", "note", "email"];
|
|
33418
33617
|
var TEXTS = {
|
|
33419
33618
|
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 +33713,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
33514
33713
|
};
|
|
33515
33714
|
}, "sourceMentionStoreOver");
|
|
33516
33715
|
|
|
33517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
33518
33717
|
import { mkdirSync, statSync, writeFileSync } from "node:fs";
|
|
33519
33718
|
import { dirname } from "node:path";
|
|
33520
33719
|
|
|
33521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
|
|
33522
33721
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
33523
33722
|
var CLIENTS_SETTING = "clients";
|
|
33524
33723
|
var coreVersion = (() => {
|
|
@@ -33576,7 +33775,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
|
|
|
33576
33775
|
return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
|
|
33577
33776
|
}, "refusalAdvice");
|
|
33578
33777
|
|
|
33579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
|
|
33580
33779
|
var GENERATED = [
|
|
33581
33780
|
{
|
|
33582
33781
|
"name": "20261010184427_initial",
|
|
@@ -34472,7 +34671,7 @@ WHERE json_type(params, '$.selection') = 'object';`
|
|
|
34472
34671
|
}
|
|
34473
34672
|
];
|
|
34474
34673
|
|
|
34475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
|
|
34476
34675
|
var MANIFEST = [
|
|
34477
34676
|
{ name: "20261010184427_initial", version: 1, minCompatible: 1 },
|
|
34478
34677
|
{ name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
|
|
@@ -34553,7 +34752,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
|
|
|
34553
34752
|
return migrations;
|
|
34554
34753
|
}, "generatedMigrations");
|
|
34555
34754
|
|
|
34556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/migrations.js
|
|
34557
34756
|
var MIGRATIONS = generatedMigrations();
|
|
34558
34757
|
var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
34559
34758
|
version INTEGER PRIMARY KEY,
|
|
@@ -34606,7 +34805,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
|
|
|
34606
34805
|
}
|
|
34607
34806
|
}, "migrate");
|
|
34608
34807
|
|
|
34609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
|
|
34610
34809
|
var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
34611
34810
|
const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
|
|
34612
34811
|
if (pending.get(0, 1) === void 0)
|
|
@@ -34628,7 +34827,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
|
|
|
34628
34827
|
}
|
|
34629
34828
|
}, "fillJoinKeys");
|
|
34630
34829
|
|
|
34631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
|
|
34632
34831
|
var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
34633
34832
|
const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
|
|
34634
34833
|
try {
|
|
@@ -34641,8 +34840,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
|
|
|
34641
34840
|
}, "openSqlite");
|
|
34642
34841
|
var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34643
34842
|
quietSqliteWarning();
|
|
34644
|
-
const { drizzle } = await import("./node-
|
|
34645
|
-
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-
|
|
34843
|
+
const { drizzle } = await import("./node-5Z7PS4F5.js");
|
|
34844
|
+
const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-OAW7APIX.js");
|
|
34646
34845
|
const client = await nodeClient(path, { readOnly });
|
|
34647
34846
|
try {
|
|
34648
34847
|
return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34652,8 +34851,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34652
34851
|
}
|
|
34653
34852
|
}, "openUnderNode");
|
|
34654
34853
|
var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
34655
|
-
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-
|
|
34656
|
-
const { drizzle } = await import("./bun-
|
|
34854
|
+
const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-DGXFNFHI.js");
|
|
34855
|
+
const { drizzle } = await import("./bun-ORL67CJ6.js");
|
|
34657
34856
|
const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
|
|
34658
34857
|
try {
|
|
34659
34858
|
return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
|
|
@@ -34663,7 +34862,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
|
|
|
34663
34862
|
}
|
|
34664
34863
|
}, "openUnderBun");
|
|
34665
34864
|
|
|
34666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
|
|
34667
34866
|
var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
34668
34867
|
const ours = MIGRATIONS.at(-1)?.version ?? 0;
|
|
34669
34868
|
if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
|
|
@@ -34678,7 +34877,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
|
|
|
34678
34877
|
throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
|
|
34679
34878
|
}, "assertReadCompatible");
|
|
34680
34879
|
|
|
34681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
|
|
34682
34881
|
var BACKFILL_ON_OPEN = 5e3;
|
|
34683
34882
|
var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
|
|
34684
34883
|
var createWritable = /* @__PURE__ */ __name((file) => {
|
|
@@ -34734,13 +34933,13 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
|
|
|
34734
34933
|
}
|
|
34735
34934
|
}, "openStoreContext");
|
|
34736
34935
|
|
|
34737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34738
34937
|
import { createHash as createHash17 } from "node:crypto";
|
|
34739
34938
|
|
|
34740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34741
34940
|
import { createHash as createHash16 } from "node:crypto";
|
|
34742
34941
|
|
|
34743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
|
|
34744
34943
|
var text3 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
34745
34944
|
var ref = text3(2048);
|
|
34746
34945
|
var timestamp2 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -34806,7 +35005,7 @@ var projectAnnotationsSchema = strictObject({
|
|
|
34806
35005
|
}))
|
|
34807
35006
|
});
|
|
34808
35007
|
|
|
34809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
|
|
34810
35009
|
var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
|
|
34811
35010
|
var invalid5 = /* @__PURE__ */ __name((field4) => {
|
|
34812
35011
|
throw new CliError("validation_error", `invalid project annotations.${field4}`);
|
|
@@ -34939,7 +35138,7 @@ var projectAnnotationsFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
34939
35138
|
return createHash16("sha256").update(JSON.stringify(normalized)).digest("hex");
|
|
34940
35139
|
}, "projectAnnotationsFingerprint");
|
|
34941
35140
|
|
|
34942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
|
|
34943
35142
|
var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
|
|
34944
35143
|
var ref2 = pipe(string(), minLength(1), maxLength(2048));
|
|
34945
35144
|
var targetSchema = strictObject({
|
|
@@ -35046,7 +35245,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
|
|
|
35046
35245
|
}, "planBoundProjectAnnotations");
|
|
35047
35246
|
var planProjectAnnotations = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotations(json3), projectAnnotationsFingerprint(json3), target, bindings), "planProjectAnnotations");
|
|
35048
35247
|
|
|
35049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
|
|
35050
35249
|
import { createHash as createHash18 } from "node:crypto";
|
|
35051
35250
|
var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
|
|
35052
35251
|
var timestamp3 = pipe(number(), safeInteger(), minValue(0));
|
|
@@ -35140,7 +35339,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
|
|
|
35140
35339
|
})).digest("hex");
|
|
35141
35340
|
}, "projectAnnotationSnapshotFingerprint");
|
|
35142
35341
|
|
|
35143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
|
|
35144
35343
|
var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
|
|
35145
35344
|
if (!request || typeof request !== "object" || Array.isArray(request))
|
|
35146
35345
|
throw new CliError("validation_error", "project annotation request is required");
|
|
@@ -35157,7 +35356,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
|
|
|
35157
35356
|
return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
|
|
35158
35357
|
}, "projectAnnotationRequest");
|
|
35159
35358
|
|
|
35160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
|
|
35161
35360
|
var SnapshotBudget = class {
|
|
35162
35361
|
static {
|
|
35163
35362
|
__name(this, "SnapshotBudget");
|
|
@@ -35183,13 +35382,13 @@ var SnapshotBudget = class {
|
|
|
35183
35382
|
}
|
|
35184
35383
|
};
|
|
35185
35384
|
|
|
35186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35187
35386
|
import { createHash as createHash20 } from "node:crypto";
|
|
35188
35387
|
|
|
35189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
|
|
35190
35389
|
var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
|
|
35191
35390
|
|
|
35192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
|
|
35193
35392
|
import { createHash as createHash19 } from "node:crypto";
|
|
35194
35393
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
35195
35394
|
throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
|
|
@@ -35332,7 +35531,7 @@ var ProjectSnapshotSources = class {
|
|
|
35332
35531
|
}
|
|
35333
35532
|
};
|
|
35334
35533
|
|
|
35335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35534
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
|
|
35336
35535
|
var unsupported = /* @__PURE__ */ __name(() => {
|
|
35337
35536
|
throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
|
|
35338
35537
|
}, "unsupported");
|
|
@@ -35503,7 +35702,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
|
|
|
35503
35702
|
return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
|
|
35504
35703
|
}), "projectAnnotationSnapshot");
|
|
35505
35704
|
|
|
35506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
|
|
35507
35706
|
var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
|
|
35508
35707
|
const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
|
|
35509
35708
|
const sources = new ProjectSnapshotSources(database, budget);
|
|
@@ -35565,7 +35764,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
|
|
|
35565
35764
|
};
|
|
35566
35765
|
}), "previewAnnotationSnapshot");
|
|
35567
35766
|
|
|
35568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
|
|
35569
35768
|
var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
|
|
35570
35769
|
const mappings = { ...bindings };
|
|
35571
35770
|
const resolve = /* @__PURE__ */ __name((ref3) => {
|
|
@@ -35607,7 +35806,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
|
|
|
35607
35806
|
return mappings;
|
|
35608
35807
|
}, "restoreAnnotationRecords");
|
|
35609
35808
|
|
|
35610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
|
|
35611
35810
|
var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
35612
35811
|
async preview(request) {
|
|
35613
35812
|
const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
|
|
@@ -35637,7 +35836,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
|
|
|
35637
35836
|
}
|
|
35638
35837
|
}), "projectAnnotationStoreOver");
|
|
35639
35838
|
|
|
35640
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
|
|
35641
35840
|
var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
|
|
35642
35841
|
const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
|
|
35643
35842
|
let merged = { from: from2, to };
|
|
@@ -35650,7 +35849,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
|
|
|
35650
35849
|
}, "markRange");
|
|
35651
35850
|
var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
|
|
35652
35851
|
|
|
35653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
|
|
35654
35853
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
|
|
35655
35854
|
var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
|
|
35656
35855
|
const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
|
|
@@ -35660,7 +35859,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
|
|
|
35660
35859
|
database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
|
|
35661
35860
|
}, "setTaskRulesStop");
|
|
35662
35861
|
|
|
35663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sync.js
|
|
35664
35863
|
var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35665
35864
|
const { database } = context;
|
|
35666
35865
|
const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
|
|
@@ -35716,7 +35915,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35716
35915
|
};
|
|
35717
35916
|
}, "syncStoreOver");
|
|
35718
35917
|
|
|
35719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/tags.js
|
|
35720
35919
|
var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
35721
35920
|
const { database } = context;
|
|
35722
35921
|
return {
|
|
@@ -35738,7 +35937,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
|
|
|
35738
35937
|
};
|
|
35739
35938
|
}, "tagsStoreOver");
|
|
35740
35939
|
|
|
35741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
|
|
35742
35941
|
var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
|
|
35743
35942
|
var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
|
|
35744
35943
|
WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
|
|
@@ -35865,7 +36064,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
|
|
|
35865
36064
|
dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
|
|
35866
36065
|
}, "savePictureChunks");
|
|
35867
36066
|
|
|
35868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
|
|
35869
36068
|
var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
|
|
35870
36069
|
EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
|
|
35871
36070
|
FROM messages m
|
|
@@ -35954,7 +36153,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
|
|
|
35954
36153
|
return plain2(best(found2));
|
|
35955
36154
|
}, "nearestMessages");
|
|
35956
36155
|
|
|
35957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/vectors.js
|
|
35958
36157
|
var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
|
|
35959
36158
|
const { database } = context;
|
|
35960
36159
|
const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
|
|
@@ -36212,7 +36411,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
|
|
|
36212
36411
|
embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
|
|
36213
36412
|
}), "vectorsStoreOver");
|
|
36214
36413
|
|
|
36215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
|
|
36216
36415
|
import { existsSync, readFileSync as readFileSync4 } from "node:fs";
|
|
36217
36416
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
36218
36417
|
var BOOKKEEPING = ["schema_migrations", "store_settings"];
|
|
@@ -36300,10 +36499,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
|
|
|
36300
36499
|
}
|
|
36301
36500
|
}, "lastBackup");
|
|
36302
36501
|
|
|
36303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/providers.js
|
|
36304
36503
|
var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
|
|
36305
36504
|
|
|
36306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
|
|
36307
36506
|
var COUNTED_TABLES = [
|
|
36308
36507
|
"accounts",
|
|
36309
36508
|
"chats",
|
|
@@ -36388,7 +36587,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
|
|
|
36388
36587
|
};
|
|
36389
36588
|
}, "storeContents");
|
|
36390
36589
|
|
|
36391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/store/store.js
|
|
36392
36591
|
var openStore = /* @__PURE__ */ __name(async (options = {}) => {
|
|
36393
36592
|
const context = await openStoreContext(options);
|
|
36394
36593
|
try {
|
|
@@ -36577,6 +36776,7 @@ export {
|
|
|
36577
36776
|
contextSource,
|
|
36578
36777
|
contextEvidenceRequest,
|
|
36579
36778
|
NOT_FILES,
|
|
36779
|
+
hitFiles,
|
|
36580
36780
|
matchDownloads,
|
|
36581
36781
|
normalizeVocabularyName,
|
|
36582
36782
|
calendarMoment,
|