@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
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
readSecret
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-E3DRM6YP.js";
|
|
6
|
+
import "./chunk-BGUMGCUY.js";
|
|
7
|
+
import "./chunk-Q2C3VMSU.js";
|
|
8
|
+
import "./chunk-NXJLC2WK.js";
|
|
9
9
|
import "./chunk-Y5E2WNWB.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-BM445GYF.js";
|
|
11
11
|
import "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
export {
|
|
13
13
|
readSecret
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
openRecognizer,
|
|
9
9
|
openSpeechCutter,
|
|
10
10
|
toModelRate
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LZ5J3UXD.js";
|
|
12
|
+
import "./chunk-Q2C3VMSU.js";
|
|
13
|
+
import "./chunk-NXJLC2WK.js";
|
|
14
14
|
import "./chunk-Y5E2WNWB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-BM445GYF.js";
|
|
16
16
|
import "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
export {
|
|
18
18
|
SAMPLE_RATE,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
openRemote,
|
|
9
9
|
remoteKey,
|
|
10
10
|
remoteModel
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-RQVWZBW3.js";
|
|
12
|
+
import "./chunk-CAKBG5FC.js";
|
|
13
|
+
import "./chunk-3TYEJRMZ.js";
|
|
14
|
+
import "./chunk-Q44AYEOB.js";
|
|
15
|
+
import "./chunk-Q2C3VMSU.js";
|
|
16
|
+
import "./chunk-NXJLC2WK.js";
|
|
17
17
|
import "./chunk-Y5E2WNWB.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-BM445GYF.js";
|
|
19
19
|
import "./chunk-ZVVMGPBJ.js";
|
|
20
20
|
export {
|
|
21
21
|
DEFAULT_OPENAI_MODEL,
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
defaultThreads,
|
|
5
5
|
loadModel,
|
|
6
6
|
truncated
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-CAKBG5FC.js";
|
|
8
|
+
import "./chunk-3TYEJRMZ.js";
|
|
9
|
+
import "./chunk-Q44AYEOB.js";
|
|
10
|
+
import "./chunk-Q2C3VMSU.js";
|
|
11
|
+
import "./chunk-NXJLC2WK.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-BM445GYF.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
|
|
19
19
|
var openReranker = /* @__PURE__ */ __name(async (model, directory, { threads = defaultThreads() } = {}) => {
|
|
20
20
|
const { ort, tokenizer, session } = await loadModel(model, directory, threads);
|
|
21
21
|
const typeIds = session.inputNames.includes("token_type_ids");
|
|
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
listen
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BEMLGWY4.js";
|
|
6
6
|
import {
|
|
7
7
|
ownerLogin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OHTR4WFO.js";
|
|
9
9
|
import {
|
|
10
10
|
WebStandardStreamableHTTPServerTransport,
|
|
11
11
|
createMcpHandler,
|
|
@@ -20,20 +20,20 @@ import {
|
|
|
20
20
|
calledTools,
|
|
21
21
|
httpActivityFile,
|
|
22
22
|
httpLock
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-DXGMPMFP.js";
|
|
24
|
+
import "./chunk-5JEYIHS6.js";
|
|
25
|
+
import "./chunk-6LK7KTWB.js";
|
|
26
|
+
import "./chunk-Q2C3VMSU.js";
|
|
27
|
+
import "./chunk-NXJLC2WK.js";
|
|
28
28
|
import "./chunk-Y5E2WNWB.js";
|
|
29
29
|
import {
|
|
30
30
|
CliError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BM445GYF.js";
|
|
32
32
|
import {
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
|
|
37
37
|
import { randomUUID } from "node:crypto";
|
|
38
38
|
var MCP_PATH = "/mcp";
|
|
39
39
|
var AS_METADATA = "/.well-known/oauth-authorization-server";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
PER_RUN,
|
|
5
|
+
createServer,
|
|
6
|
+
envelope,
|
|
7
|
+
serveOverHttpUntilStopped,
|
|
8
|
+
serveOverStdio
|
|
9
|
+
} from "./chunk-6RMMAUUW.js";
|
|
10
|
+
import "./chunk-MHQKHWCJ.js";
|
|
11
|
+
import "./chunk-6XNPXAJU.js";
|
|
12
|
+
import "./chunk-V4TDG4KF.js";
|
|
13
|
+
import "./chunk-73OJJGZE.js";
|
|
14
|
+
import "./chunk-JFMUI4H6.js";
|
|
15
|
+
import "./chunk-3GZK5GTU.js";
|
|
16
|
+
import "./chunk-VNJMO5F6.js";
|
|
17
|
+
import "./chunk-5D4AEUVA.js";
|
|
18
|
+
import "./chunk-DKQWTQVY.js";
|
|
19
|
+
import "./chunk-S4YUR4S3.js";
|
|
20
|
+
import "./chunk-45KA5667.js";
|
|
21
|
+
import "./chunk-FTFNWGIR.js";
|
|
22
|
+
import "./chunk-ZKCNMW7G.js";
|
|
23
|
+
import "./chunk-BGUMGCUY.js";
|
|
24
|
+
import "./chunk-NNIXREJH.js";
|
|
25
|
+
import "./chunk-M2JCUVCJ.js";
|
|
26
|
+
import "./chunk-R5MML3FC.js";
|
|
27
|
+
import "./chunk-VSHJWTX5.js";
|
|
28
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
29
|
+
import "./chunk-23IEVVL2.js";
|
|
30
|
+
import "./chunk-QZBT6BOU.js";
|
|
31
|
+
import "./chunk-IYZHM3ZN.js";
|
|
32
|
+
import "./chunk-DXGMPMFP.js";
|
|
33
|
+
import "./chunk-5JEYIHS6.js";
|
|
34
|
+
import "./chunk-6LK7KTWB.js";
|
|
35
|
+
import "./chunk-RQVWZBW3.js";
|
|
36
|
+
import "./chunk-2M4K7HYR.js";
|
|
37
|
+
import "./chunk-5BSEGMNE.js";
|
|
38
|
+
import "./chunk-35KD2CI2.js";
|
|
39
|
+
import "./chunk-MCJ7LKYR.js";
|
|
40
|
+
import "./chunk-MMXMVGA6.js";
|
|
41
|
+
import "./chunk-VBOMKZ4E.js";
|
|
42
|
+
import "./chunk-GJUUTUK4.js";
|
|
43
|
+
import "./chunk-4NYWHINR.js";
|
|
44
|
+
import "./chunk-XQJWMBDY.js";
|
|
45
|
+
import "./chunk-AP7V256W.js";
|
|
46
|
+
import "./chunk-SQLCCKEL.js";
|
|
47
|
+
import "./chunk-WJWLHLQ7.js";
|
|
48
|
+
import "./chunk-D72URWJE.js";
|
|
49
|
+
import "./chunk-CAKBG5FC.js";
|
|
50
|
+
import "./chunk-3TYEJRMZ.js";
|
|
51
|
+
import "./chunk-Q44AYEOB.js";
|
|
52
|
+
import "./chunk-Q2C3VMSU.js";
|
|
53
|
+
import "./chunk-NXJLC2WK.js";
|
|
54
|
+
import "./chunk-Y5E2WNWB.js";
|
|
55
|
+
import "./chunk-BM445GYF.js";
|
|
56
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
57
|
+
export {
|
|
58
|
+
PER_RUN,
|
|
59
|
+
createServer,
|
|
60
|
+
envelope,
|
|
61
|
+
serveOverHttpUntilStopped,
|
|
62
|
+
serveOverStdio
|
|
63
|
+
};
|
|
@@ -2,34 +2,34 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
botInstructions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HV3EIYX4.js";
|
|
6
6
|
import {
|
|
7
7
|
answered,
|
|
8
8
|
normal,
|
|
9
9
|
registerCommands,
|
|
10
10
|
runCommandForAgent,
|
|
11
11
|
toolsFromCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MHQKHWCJ.js";
|
|
13
13
|
import {
|
|
14
14
|
agentJson,
|
|
15
15
|
skillResource
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-V4TDG4KF.js";
|
|
17
|
+
import "./chunk-73OJJGZE.js";
|
|
18
18
|
import {
|
|
19
19
|
callerOf,
|
|
20
20
|
serveStdio
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VNJMO5F6.js";
|
|
22
22
|
import {
|
|
23
23
|
McpServer
|
|
24
24
|
} from "./chunk-5D4AEUVA.js";
|
|
25
25
|
import {
|
|
26
26
|
wholeList
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-S4YUR4S3.js";
|
|
28
|
+
import "./chunk-45KA5667.js";
|
|
29
|
+
import "./chunk-FTFNWGIR.js";
|
|
30
|
+
import "./chunk-ZKCNMW7G.js";
|
|
31
|
+
import "./chunk-BGUMGCUY.js";
|
|
32
|
+
import "./chunk-M2JCUVCJ.js";
|
|
33
33
|
import {
|
|
34
34
|
MESSENGER_CHANGE_REFUSAL,
|
|
35
35
|
changesMessenger,
|
|
@@ -37,42 +37,42 @@ import {
|
|
|
37
37
|
itemOf,
|
|
38
38
|
readOnlyLockOf,
|
|
39
39
|
readOnlyRefusal
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-R5MML3FC.js";
|
|
41
|
+
import "./chunk-VSHJWTX5.js";
|
|
42
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
43
|
+
import "./chunk-23IEVVL2.js";
|
|
44
|
+
import "./chunk-QZBT6BOU.js";
|
|
45
|
+
import "./chunk-IYZHM3ZN.js";
|
|
46
|
+
import "./chunk-6LK7KTWB.js";
|
|
47
|
+
import "./chunk-RQVWZBW3.js";
|
|
48
|
+
import "./chunk-2M4K7HYR.js";
|
|
49
|
+
import "./chunk-5BSEGMNE.js";
|
|
50
|
+
import "./chunk-35KD2CI2.js";
|
|
51
|
+
import "./chunk-MCJ7LKYR.js";
|
|
52
|
+
import "./chunk-MMXMVGA6.js";
|
|
53
|
+
import "./chunk-VBOMKZ4E.js";
|
|
54
|
+
import "./chunk-GJUUTUK4.js";
|
|
55
|
+
import "./chunk-4NYWHINR.js";
|
|
56
|
+
import "./chunk-XQJWMBDY.js";
|
|
57
|
+
import "./chunk-AP7V256W.js";
|
|
58
|
+
import "./chunk-SQLCCKEL.js";
|
|
59
|
+
import "./chunk-WJWLHLQ7.js";
|
|
60
60
|
import "./chunk-D72URWJE.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-CAKBG5FC.js";
|
|
62
|
+
import "./chunk-3TYEJRMZ.js";
|
|
63
|
+
import "./chunk-Q44AYEOB.js";
|
|
64
|
+
import "./chunk-Q2C3VMSU.js";
|
|
65
65
|
import {
|
|
66
66
|
mcpErrorResult,
|
|
67
67
|
object
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-NXJLC2WK.js";
|
|
69
69
|
import "./chunk-Y5E2WNWB.js";
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-BM445GYF.js";
|
|
71
71
|
import {
|
|
72
72
|
__name
|
|
73
73
|
} from "./chunk-ZVVMGPBJ.js";
|
|
74
74
|
|
|
75
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
75
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
|
|
76
76
|
import { randomUUID } from "node:crypto";
|
|
77
77
|
var body = /* @__PURE__ */ __name((command, value) => Array.isArray(value) ? wholeList(`bot ${command}`, value) : value !== null && typeof value === "object" && ("item" in value || "items" in value) ? value : itemOf(value !== null && typeof value === "object" ? value : { value }), "body");
|
|
78
78
|
var createBotServer = /* @__PURE__ */ __name((options) => {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
ensureSqlite,
|
|
5
5
|
nodeRuntime,
|
|
6
6
|
relay
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-FPOGVDLS.js";
|
|
8
|
+
import "./chunk-XQJWMBDY.js";
|
|
9
|
+
import "./chunk-Q2C3VMSU.js";
|
|
10
|
+
import "./chunk-NXJLC2WK.js";
|
|
11
11
|
import "./chunk-Y5E2WNWB.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-BM445GYF.js";
|
|
13
13
|
import "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
export {
|
|
15
15
|
ensureSqlite,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
readHttpLock,
|
|
13
13
|
readStored,
|
|
14
14
|
signedInClients
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-DXGMPMFP.js";
|
|
16
|
+
import "./chunk-5JEYIHS6.js";
|
|
17
|
+
import "./chunk-6LK7KTWB.js";
|
|
18
|
+
import "./chunk-Q2C3VMSU.js";
|
|
19
|
+
import "./chunk-NXJLC2WK.js";
|
|
20
20
|
import "./chunk-Y5E2WNWB.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-BM445GYF.js";
|
|
22
22
|
import "./chunk-ZVVMGPBJ.js";
|
|
23
23
|
export {
|
|
24
24
|
ACCESS_SECONDS,
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
previewDocumentTransfer,
|
|
9
9
|
previewProjectAnnotationSnapshot,
|
|
10
10
|
snapshotProjectAnnotations
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2M4K7HYR.js";
|
|
12
12
|
import {
|
|
13
13
|
note,
|
|
14
14
|
organization,
|
|
15
15
|
project,
|
|
16
16
|
reminder
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5BSEGMNE.js";
|
|
18
18
|
import {
|
|
19
19
|
CATALOG_QUERY,
|
|
20
20
|
EVENT_FIELDS,
|
|
@@ -54,8 +54,8 @@ import {
|
|
|
54
54
|
resetSearchIndex,
|
|
55
55
|
searchIndexState,
|
|
56
56
|
validateEvidenceFindings
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-35KD2CI2.js";
|
|
58
|
+
import "./chunk-MCJ7LKYR.js";
|
|
59
59
|
import {
|
|
60
60
|
CLOSED_STATES,
|
|
61
61
|
FACT_STATUSES,
|
|
@@ -71,23 +71,23 @@ import {
|
|
|
71
71
|
priorityLabel,
|
|
72
72
|
priorityOf,
|
|
73
73
|
priorityOption
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-LOA4X6JW.js";
|
|
74
|
+
} from "./chunk-MMXMVGA6.js";
|
|
75
|
+
import "./chunk-VBOMKZ4E.js";
|
|
76
|
+
import "./chunk-GJUUTUK4.js";
|
|
77
|
+
import "./chunk-4NYWHINR.js";
|
|
79
78
|
import {
|
|
80
79
|
PRAGMAS,
|
|
81
80
|
openCache
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import "./chunk-
|
|
81
|
+
} from "./chunk-XQJWMBDY.js";
|
|
82
|
+
import "./chunk-AP7V256W.js";
|
|
83
|
+
import "./chunk-WJWLHLQ7.js";
|
|
84
84
|
import {
|
|
85
85
|
storePath
|
|
86
|
-
} from "./chunk-
|
|
87
|
-
import "./chunk-
|
|
88
|
-
import "./chunk-
|
|
86
|
+
} from "./chunk-Q44AYEOB.js";
|
|
87
|
+
import "./chunk-Q2C3VMSU.js";
|
|
88
|
+
import "./chunk-NXJLC2WK.js";
|
|
89
89
|
import "./chunk-Y5E2WNWB.js";
|
|
90
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-BM445GYF.js";
|
|
91
91
|
import "./chunk-ZVVMGPBJ.js";
|
|
92
92
|
export {
|
|
93
93
|
CATALOG_QUERY,
|
|
@@ -54,20 +54,20 @@ import {
|
|
|
54
54
|
threadConversation,
|
|
55
55
|
titlePart,
|
|
56
56
|
vectorIndexCounts
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-35KD2CI2.js";
|
|
58
|
+
import "./chunk-MCJ7LKYR.js";
|
|
59
|
+
import "./chunk-MMXMVGA6.js";
|
|
60
|
+
import "./chunk-VBOMKZ4E.js";
|
|
61
|
+
import "./chunk-GJUUTUK4.js";
|
|
62
|
+
import "./chunk-4NYWHINR.js";
|
|
63
|
+
import "./chunk-XQJWMBDY.js";
|
|
64
|
+
import "./chunk-AP7V256W.js";
|
|
65
|
+
import "./chunk-WJWLHLQ7.js";
|
|
66
|
+
import "./chunk-Q44AYEOB.js";
|
|
67
|
+
import "./chunk-Q2C3VMSU.js";
|
|
68
|
+
import "./chunk-NXJLC2WK.js";
|
|
69
69
|
import "./chunk-Y5E2WNWB.js";
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-BM445GYF.js";
|
|
71
71
|
import "./chunk-ZVVMGPBJ.js";
|
|
72
72
|
export {
|
|
73
73
|
AGENDA_COLUMNS,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
buildStems,
|
|
5
|
+
storeMaintenanceCommands,
|
|
6
|
+
storeSummary
|
|
7
|
+
} from "./chunk-EYT33MM3.js";
|
|
8
|
+
import "./chunk-HFJNEXU7.js";
|
|
9
|
+
import "./chunk-DKQWTQVY.js";
|
|
10
|
+
import "./chunk-S4YUR4S3.js";
|
|
11
|
+
import "./chunk-45KA5667.js";
|
|
12
|
+
import "./chunk-FTFNWGIR.js";
|
|
13
|
+
import "./chunk-ZKZABB4K.js";
|
|
14
|
+
import "./chunk-ZKCNMW7G.js";
|
|
15
|
+
import "./chunk-E3DRM6YP.js";
|
|
16
|
+
import "./chunk-BGUMGCUY.js";
|
|
17
|
+
import "./chunk-HTQTIKWP.js";
|
|
18
|
+
import "./chunk-R5MML3FC.js";
|
|
19
|
+
import "./chunk-VSHJWTX5.js";
|
|
20
|
+
import "./chunk-ZNGQ3NZ4.js";
|
|
21
|
+
import "./chunk-23IEVVL2.js";
|
|
22
|
+
import "./chunk-QZBT6BOU.js";
|
|
23
|
+
import "./chunk-IYZHM3ZN.js";
|
|
24
|
+
import "./chunk-5JEYIHS6.js";
|
|
25
|
+
import "./chunk-6LK7KTWB.js";
|
|
26
|
+
import "./chunk-RQVWZBW3.js";
|
|
27
|
+
import "./chunk-2M4K7HYR.js";
|
|
28
|
+
import "./chunk-5BSEGMNE.js";
|
|
29
|
+
import "./chunk-35KD2CI2.js";
|
|
30
|
+
import "./chunk-MCJ7LKYR.js";
|
|
31
|
+
import "./chunk-MMXMVGA6.js";
|
|
32
|
+
import "./chunk-VBOMKZ4E.js";
|
|
33
|
+
import "./chunk-GJUUTUK4.js";
|
|
34
|
+
import "./chunk-4NYWHINR.js";
|
|
35
|
+
import "./chunk-XQJWMBDY.js";
|
|
36
|
+
import "./chunk-AP7V256W.js";
|
|
37
|
+
import "./chunk-SQLCCKEL.js";
|
|
38
|
+
import "./chunk-WJWLHLQ7.js";
|
|
39
|
+
import "./chunk-D72URWJE.js";
|
|
40
|
+
import "./chunk-CAKBG5FC.js";
|
|
41
|
+
import "./chunk-3TYEJRMZ.js";
|
|
42
|
+
import "./chunk-Q44AYEOB.js";
|
|
43
|
+
import "./chunk-Q2C3VMSU.js";
|
|
44
|
+
import "./chunk-NXJLC2WK.js";
|
|
45
|
+
import "./chunk-Y5E2WNWB.js";
|
|
46
|
+
import "./chunk-BM445GYF.js";
|
|
47
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
48
|
+
export {
|
|
49
|
+
buildStems,
|
|
50
|
+
storeMaintenanceCommands,
|
|
51
|
+
storeSummary
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../src/commands/attachments.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA+HnC,eAAO,MAAM,kBAAkB,QAAO,OAIJ,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { CliError } from "@wirecat/cli-base";
|
|
3
|
+
import { annotate } from "@wirecat/cli-base/commands";
|
|
4
|
+
import { answerEntity, FETCH, itemOf, listOf, outputFor, REMOTE_READ, renderAnswer } from "@wirecat/cli-core/cli";
|
|
5
|
+
import { parseMail } from "@wirecat/cli-core/mail";
|
|
6
|
+
import { refusedPlace } from "@wirecat/cli-core/sends";
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import * as v from "valibot";
|
|
9
|
+
import { IDENTITY } from "../identity.js";
|
|
10
|
+
import { distinctNames, refuseExisting, safeName, savePrivately } from "../mail/save.js";
|
|
11
|
+
import { fetchOriginal } from "../mail/send.js";
|
|
12
|
+
import { contextOf } from "./context.js";
|
|
13
|
+
import { organising } from "./messages.js";
|
|
14
|
+
const REF_EXAMPLE = "'msg:email/me%40example.com/thread-1/1001'";
|
|
15
|
+
const attachment = v.strictObject({
|
|
16
|
+
number: v.number(),
|
|
17
|
+
name: v.string(),
|
|
18
|
+
mime: v.nullable(v.string()),
|
|
19
|
+
bytes: v.number(),
|
|
20
|
+
});
|
|
21
|
+
const saved = v.looseObject({
|
|
22
|
+
folder: v.string(),
|
|
23
|
+
files: v.array(v.strictObject({ number: v.number(), name: v.string(), path: v.string(), bytes: v.number() })),
|
|
24
|
+
});
|
|
25
|
+
/** The message's attachments as the store numbered them at sync: the same parser, so the same order and names. */
|
|
26
|
+
const attachmentsOf = async (opened, reference) => {
|
|
27
|
+
const { raw } = await fetchOriginal(opened.mailbox, opened.backend, reference, opened.profile);
|
|
28
|
+
const parsed = await parseMail(raw, undefined, Number.POSITIVE_INFINITY);
|
|
29
|
+
const names = distinctNames(parsed.attachments.map(({ id, name }) => safeName(name, `attachment-${id + 1}`)));
|
|
30
|
+
return parsed.attachments.map((one, at) => ({
|
|
31
|
+
number: one.id + 1,
|
|
32
|
+
name: names[at],
|
|
33
|
+
mime: one.mime,
|
|
34
|
+
bytes: one.bytes?.byteLength ?? 0,
|
|
35
|
+
content: one.bytes ?? new Uint8Array(),
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
const listCommand = () => answerEntity(annotate(new Command("list"), {
|
|
39
|
+
effects: REMOTE_READ,
|
|
40
|
+
examples: [`${IDENTITY.command} ya attachments list ${REF_EXAMPLE}`],
|
|
41
|
+
}), "mail_attachment", attachment)
|
|
42
|
+
.summary("the files attached to one email, read from the server")
|
|
43
|
+
.description("the attachments of one stored email, numbered as attachments download takes them; reads the message from the server")
|
|
44
|
+
.argument("<message>", "the msg:email/… reference search messages shows")
|
|
45
|
+
.action(async function (reference) {
|
|
46
|
+
const found = await organising(this, (opened) => attachmentsOf(opened, reference));
|
|
47
|
+
const items = found.map(({ content: _, ...one }) => one);
|
|
48
|
+
renderAnswer(this, outputFor(this), listOf("attachments list", { items, limit: Math.max(1, items.length), has_more: false }), () => items.length
|
|
49
|
+
? items.map(({ number, name, bytes }) => `${number} ${name} ${bytes} bytes\n`).join("")
|
|
50
|
+
: "no attachments\n");
|
|
51
|
+
});
|
|
52
|
+
const numbersOf = (given) => given.map((value) => {
|
|
53
|
+
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
54
|
+
throw new CliError("validation_error", "a number is an attachment's number from attachments list", {
|
|
55
|
+
param: "number",
|
|
56
|
+
});
|
|
57
|
+
return Number(value);
|
|
58
|
+
});
|
|
59
|
+
const downloadCommand = () => answerEntity(annotate(new Command("download"), {
|
|
60
|
+
effects: FETCH,
|
|
61
|
+
examples: [
|
|
62
|
+
`${IDENTITY.command} ya attachments download ${REF_EXAMPLE} --output-dir ./invoices`,
|
|
63
|
+
`${IDENTITY.command} ya attachments download ${REF_EXAMPLE} 2 --output-dir ./invoices`,
|
|
64
|
+
],
|
|
65
|
+
}), "mail_attachments_saved", saved)
|
|
66
|
+
.summary("save the files attached to one email")
|
|
67
|
+
.description("save the attachments of one stored email into a folder, readable only by you; the bytes come from the server " +
|
|
68
|
+
"and never go into the store. An existing file is left alone unless --replace")
|
|
69
|
+
.argument("<message>", "the msg:email/… reference search messages shows")
|
|
70
|
+
.argument("[number...]", "only these attachments, by their number in attachments list (default: all)")
|
|
71
|
+
.requiredOption("--output-dir <dir>", "the folder to save into, made if missing")
|
|
72
|
+
.option("--replace", "overwrite a file of the same name in the folder")
|
|
73
|
+
.action(async function (reference, given, flags) {
|
|
74
|
+
const numbers = numbersOf(given);
|
|
75
|
+
const folder = resolve(flags.outputDir);
|
|
76
|
+
if (refusedPlace(folder, IDENTITY, contextOf(this).env))
|
|
77
|
+
throw new CliError("validation_error", `will not save into ${flags.outputDir}: credential folders and the WireCat apps' folders are not written to`, { param: "output-dir" });
|
|
78
|
+
const found = await organising(this, (opened) => attachmentsOf(opened, reference));
|
|
79
|
+
const wanted = numbers.length ? found.filter(({ number }) => numbers.includes(number)) : found;
|
|
80
|
+
const missing = numbers.filter((number) => !found.some((one) => one.number === number));
|
|
81
|
+
if (missing.length)
|
|
82
|
+
throw new CliError("not_found", `the message has no attachment ${missing.join(", ")}; it has ${found.length}`, {
|
|
83
|
+
param: "number",
|
|
84
|
+
});
|
|
85
|
+
const files = wanted.map((one) => ({ ...one, path: resolve(folder, one.name) }));
|
|
86
|
+
if (!flags.replace)
|
|
87
|
+
for (const { path } of files)
|
|
88
|
+
refuseExisting(path);
|
|
89
|
+
for (const { path, content } of files)
|
|
90
|
+
await savePrivately(path, content, flags.replace === true);
|
|
91
|
+
renderAnswer(this, outputFor(this), itemOf({ folder, files: files.map(({ number, name, path, bytes }) => ({ number, name, path, bytes })) }), () => files.length ? files.map(({ path, bytes }) => `${path} ${bytes} bytes\n`).join("") : "no attachments\n");
|
|
92
|
+
});
|
|
93
|
+
export const attachmentsCommand = () => new Command("attachments")
|
|
94
|
+
.summary("list and save the files attached to an email")
|
|
95
|
+
.addCommand(listCommand())
|
|
96
|
+
.addCommand(downloadCommand());
|
|
97
|
+
//# sourceMappingURL=attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../../src/commands/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,QA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