@wirecat/mail-cli 0.37.0 → 0.39.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 +47 -0
- package/README.md +9 -7
- package/contracts/wirecat.json +64 -2
- package/dist/bin/mail.js +11 -11
- package/dist/bundle/{chunk-BNURKCQG.js → chunk-BXH2YUBR.js} +33 -5
- package/dist/bundle/mail.js +4 -166
- package/dist/bundle/program-ZSF2VJI6.js +17329 -0
- package/dist/commands/account-remove.js +1 -2
- package/dist/commands/account.js +1 -1
- package/dist/commands/attachments.js +1 -2
- package/dist/commands/context.js +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/drafts-send.js +1 -2
- package/dist/commands/drafts.js +1 -2
- package/dist/commands/export.js +1 -2
- package/dist/commands/folders.js +1 -2
- package/dist/commands/import.js +1 -1
- package/dist/commands/messages.js +1 -1
- package/dist/commands/organising.js +1 -2
- package/dist/commands/read.js +2 -4
- package/dist/commands/restore.js +1 -1
- package/dist/commands/rules.js +1 -2
- package/dist/commands/send.js +1 -2
- package/dist/commands/session-start.js +1 -1
- package/dist/commands/session.js +1 -1
- package/dist/commands/stats.js +1 -1
- package/dist/commands/status.js +3 -5
- package/dist/commands/sync.js +29 -5
- package/dist/commands/tags.js +1 -2
- package/dist/config.js +1 -1
- package/dist/identity.js +27 -0
- package/dist/mail/changes.js +3 -2
- package/dist/mail/cleanup.js +3 -2
- package/dist/mail/domain-age.js +1 -1
- package/dist/mail/memo-trash.js +47 -0
- package/dist/mail/organise.js +1 -1
- package/dist/mail/save.js +1 -1
- package/dist/mail/send-as.js +66 -0
- package/dist/mail/send.js +4 -2
- package/dist/oauth.js +1 -3
- package/dist/profile.js +1 -1
- package/dist/program.js +1 -2
- package/dist/providers.js +4 -4
- package/dist/store.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/bin/mail.d.ts +0 -3
- package/dist/bin/mail.d.ts.map +0 -1
- package/dist/bin/mail.js.map +0 -1
- package/dist/bundle/agent-OU4K7TKQ.js +0 -40
- package/dist/bundle/all-profiles-ICGWDPUU.js +0 -320
- package/dist/bundle/anthropic-TL4WFWGU.js +0 -90
- package/dist/bundle/app-server-YAR5EFOO.js +0 -256
- package/dist/bundle/bun-OPDGMZZQ.js +0 -169
- package/dist/bundle/bun-sqlite-WI3ZPANS.js +0 -75
- package/dist/bundle/chunk-2JHVQMVC.js +0 -16
- package/dist/bundle/chunk-2XBDILVW.js +0 -53
- package/dist/bundle/chunk-2YO3PLOE.js +0 -2843
- package/dist/bundle/chunk-3DHJF57U.js +0 -690
- package/dist/bundle/chunk-3HC5F3P7.js +0 -24
- package/dist/bundle/chunk-3SKTQ2HC.js +0 -288
- package/dist/bundle/chunk-3YM4B2GT.js +0 -63
- package/dist/bundle/chunk-3ZOOTTFW.js +0 -1007
- package/dist/bundle/chunk-4FTIHADB.js +0 -259
- package/dist/bundle/chunk-4IZ6R5FS.js +0 -730
- package/dist/bundle/chunk-4N7PP76S.js +0 -6848
- package/dist/bundle/chunk-7HRKUKKY.js +0 -1068
- package/dist/bundle/chunk-7PDGZFXD.js +0 -133
- package/dist/bundle/chunk-7YKWFERX.js +0 -330
- package/dist/bundle/chunk-BNVISIHP.js +0 -95
- package/dist/bundle/chunk-BQMJYSA4.js +0 -360
- package/dist/bundle/chunk-BYITYTRL.js +0 -86
- package/dist/bundle/chunk-CICUPYHT.js +0 -106
- package/dist/bundle/chunk-CQHLWMKK.js +0 -1333
- package/dist/bundle/chunk-CUW7Y2HJ.js +0 -334
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DJZIFZOT.js +0 -52
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DPV53EZC.js +0 -206
- package/dist/bundle/chunk-DTR7JO2M.js +0 -794
- package/dist/bundle/chunk-ES2FF42M.js +0 -2470
- package/dist/bundle/chunk-EV72K4IU.js +0 -274
- package/dist/bundle/chunk-EZQ5BYNL.js +0 -338
- package/dist/bundle/chunk-F2D3J5DR.js +0 -188
- package/dist/bundle/chunk-FTT7UDYV.js +0 -80
- package/dist/bundle/chunk-FXNCKPQ7.js +0 -64
- package/dist/bundle/chunk-G4VJN75G.js +0 -806
- package/dist/bundle/chunk-GGMAIIVE.js +0 -38
- package/dist/bundle/chunk-GPUC3FTU.js +0 -195
- package/dist/bundle/chunk-GQIMVR7C.js +0 -3752
- package/dist/bundle/chunk-HCRUGAIN.js +0 -1024
- package/dist/bundle/chunk-HES6YMYN.js +0 -161
- package/dist/bundle/chunk-HFY7536N.js +0 -9510
- package/dist/bundle/chunk-HTQTIKWP.js +0 -928
- package/dist/bundle/chunk-IA7LLLEI.js +0 -100
- package/dist/bundle/chunk-IUJDWEGJ.js +0 -615
- package/dist/bundle/chunk-IWFWWO37.js +0 -364
- package/dist/bundle/chunk-JG6LCSEX.js +0 -407
- package/dist/bundle/chunk-JLXXUEAM.js +0 -72
- package/dist/bundle/chunk-JNP3XGJI.js +0 -559
- package/dist/bundle/chunk-JZUYZ2XJ.js +0 -2076
- package/dist/bundle/chunk-K4DEQAEW.js +0 -1291
- package/dist/bundle/chunk-KCM3WSER.js +0 -388
- package/dist/bundle/chunk-KP5JDYY6.js +0 -2669
- package/dist/bundle/chunk-KUX54EGR.js +0 -40792
- package/dist/bundle/chunk-KXJ3JEDH.js +0 -2
- package/dist/bundle/chunk-KZD3H5QA.js +0 -108
- package/dist/bundle/chunk-LKH3UKLO.js +0 -230
- package/dist/bundle/chunk-NAOLBEFX.js +0 -12142
- package/dist/bundle/chunk-NB52JKLR.js +0 -323
- package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
- package/dist/bundle/chunk-NISH4UXM.js +0 -58
- package/dist/bundle/chunk-NQSKI7XK.js +0 -52
- package/dist/bundle/chunk-OWPRJLHV.js +0 -353
- package/dist/bundle/chunk-OZKZT3ZI.js +0 -79
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-Q7ICVP25.js +0 -18
- package/dist/bundle/chunk-QLJGYDWG.js +0 -1197
- package/dist/bundle/chunk-R44KVISE.js +0 -218
- package/dist/bundle/chunk-R73VWPNL.js +0 -192
- package/dist/bundle/chunk-RRTMPSQR.js +0 -29
- package/dist/bundle/chunk-S6JG4YUH.js +0 -72
- package/dist/bundle/chunk-TMJLGR4A.js +0 -4070
- package/dist/bundle/chunk-TXDR6YSF.js +0 -23
- package/dist/bundle/chunk-TY7NDMFY.js +0 -46
- package/dist/bundle/chunk-UDSL3MUU.js +0 -2333
- package/dist/bundle/chunk-UTS5NMR3.js +0 -54
- package/dist/bundle/chunk-VB7FZOYX.js +0 -633
- package/dist/bundle/chunk-VK24UQSD.js +0 -142
- package/dist/bundle/chunk-VYCB5EVI.js +0 -721
- package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
- package/dist/bundle/chunk-WOPVBRPV.js +0 -29
- package/dist/bundle/chunk-XEQQJBBO.js +0 -92
- package/dist/bundle/chunk-XQUUANA2.js +0 -24600
- package/dist/bundle/chunk-XWBTD2WP.js +0 -76
- package/dist/bundle/chunk-XXPJF2VD.js +0 -2
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-YODGIMMM.js +0 -185
- package/dist/bundle/chunk-YWDFYQOU.js +0 -82
- package/dist/bundle/chunk-Z4BLNAWI.js +0 -67228
- package/dist/bundle/chunk-ZSAPOC7B.js +0 -1247
- package/dist/bundle/chunk-ZTWTEXB2.js +0 -170
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/command-contract-UC6IGCCM.js +0 -39
- package/dist/bundle/command-server-entry-RA3ZX2KV.js +0 -168
- package/dist/bundle/decode-QVKRSRVF.js +0 -296
- package/dist/bundle/dispatch-USKS7J74.js +0 -411
- package/dist/bundle/dist-HFUVURJG.js +0 -7577
- package/dist/bundle/dist-ITIXJAXK.js +0 -317
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
- package/dist/bundle/embed-2HOODFQT.js +0 -37
- package/dist/bundle/embedder-22AJGCZX.js +0 -110
- package/dist/bundle/failure-D4FGOIWF.js +0 -24
- package/dist/bundle/first-run-FU4MFXOA.js +0 -28
- package/dist/bundle/first-screen-A7SEI2ON.js +0 -40
- package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-KC6YGWA7.js +0 -24
- package/dist/bundle/meeting-model-QWGAOQHL.js +0 -24
- package/dist/bundle/meeting-semantic-7PVO6RNB.js +0 -21
- package/dist/bundle/node-EGMCBAO7.js +0 -176
- package/dist/bundle/node-KM3CUABH.js +0 -2340
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-JXUELLMP.js +0 -73
- package/dist/bundle/oauth-OYAYWH4K.js +0 -19
- package/dist/bundle/open-GLEUJGNA.js +0 -22
- package/dist/bundle/openai-PYTVNB6L.js +0 -237
- package/dist/bundle/process-SGHEN6MQ.js +0 -91
- package/dist/bundle/program-7CFNZ2DF.js +0 -51701
- package/dist/bundle/prompt-CYTILD7N.js +0 -16
- package/dist/bundle/public-XWMXEGEF.js +0 -196
- package/dist/bundle/recognize-26UNETSQ.js +0 -25
- package/dist/bundle/remote-PKXBQA5N.js +0 -30
- package/dist/bundle/rerank-LLKP7M6Q.js +0 -51
- package/dist/bundle/serve-ZRJEAPJI.js +0 -198
- package/dist/bundle/server-4OQ4G5JY.js +0 -218
- package/dist/bundle/server-VVRQ4A34.js +0 -86
- package/dist/bundle/sqlite-runtime-667VV4VY.js +0 -19
- package/dist/bundle/state-V3CAAJBE.js +0 -35
- package/dist/bundle/store-BJCIMIAH.js +0 -302
- package/dist/bundle/store-GLBBY4OZ.js +0 -184
- package/dist/bundle/store-maintenance-command-N7L5OVUE.js +0 -73
- package/dist/bundle/surface-26EUQNDT.js +0 -72
- package/dist/commands/account-remove.d.ts +0 -3
- package/dist/commands/account-remove.d.ts.map +0 -1
- package/dist/commands/account-remove.js.map +0 -1
- package/dist/commands/account.d.ts +0 -3
- package/dist/commands/account.d.ts.map +0 -1
- package/dist/commands/account.js.map +0 -1
- package/dist/commands/attachments.d.ts +0 -3
- package/dist/commands/attachments.d.ts.map +0 -1
- package/dist/commands/attachments.js.map +0 -1
- package/dist/commands/context.d.ts +0 -79
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -68
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drafts-send.d.ts +0 -7
- package/dist/commands/drafts-send.d.ts.map +0 -1
- package/dist/commands/drafts-send.js.map +0 -1
- package/dist/commands/drafts.d.ts +0 -3
- package/dist/commands/drafts.d.ts.map +0 -1
- package/dist/commands/drafts.js.map +0 -1
- package/dist/commands/export.d.ts +0 -3
- package/dist/commands/export.d.ts.map +0 -1
- package/dist/commands/export.js.map +0 -1
- package/dist/commands/folders.d.ts +0 -3
- package/dist/commands/folders.d.ts.map +0 -1
- package/dist/commands/folders.js.map +0 -1
- package/dist/commands/import.d.ts +0 -3
- package/dist/commands/import.d.ts.map +0 -1
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/login.d.ts +0 -5
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/mailbox.d.ts +0 -17
- package/dist/commands/mailbox.d.ts.map +0 -1
- package/dist/commands/mailbox.js.map +0 -1
- package/dist/commands/messages.d.ts +0 -4
- package/dist/commands/messages.d.ts.map +0 -1
- package/dist/commands/messages.js.map +0 -1
- package/dist/commands/organising.d.ts +0 -98
- package/dist/commands/organising.d.ts.map +0 -1
- package/dist/commands/organising.js.map +0 -1
- package/dist/commands/read.d.ts +0 -6
- package/dist/commands/read.d.ts.map +0 -1
- package/dist/commands/read.js.map +0 -1
- package/dist/commands/restore.d.ts +0 -3
- package/dist/commands/restore.d.ts.map +0 -1
- package/dist/commands/restore.js.map +0 -1
- package/dist/commands/rules.d.ts +0 -3
- package/dist/commands/rules.d.ts.map +0 -1
- package/dist/commands/rules.js.map +0 -1
- package/dist/commands/send.d.ts +0 -51
- package/dist/commands/send.d.ts.map +0 -1
- package/dist/commands/send.js.map +0 -1
- package/dist/commands/server-search.d.ts +0 -8
- package/dist/commands/server-search.d.ts.map +0 -1
- package/dist/commands/server-search.js.map +0 -1
- package/dist/commands/session-start.d.ts +0 -3
- package/dist/commands/session-start.d.ts.map +0 -1
- package/dist/commands/session-start.js.map +0 -1
- package/dist/commands/session.d.ts +0 -3
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -3
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -11
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/tags.d.ts +0 -3
- package/dist/commands/tags.d.ts.map +0 -1
- package/dist/commands/tags.js.map +0 -1
- package/dist/commands/words.d.ts +0 -8
- package/dist/commands/words.d.ts.map +0 -1
- package/dist/commands/words.js.map +0 -1
- package/dist/config.d.ts +0 -239
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/discovery.d.ts +0 -31
- package/dist/discovery.d.ts.map +0 -1
- package/dist/discovery.js.map +0 -1
- package/dist/export/format.d.ts +0 -19
- package/dist/export/format.d.ts.map +0 -1
- package/dist/export/format.js.map +0 -1
- package/dist/export/journal.d.ts +0 -34
- package/dist/export/journal.d.ts.map +0 -1
- package/dist/export/journal.js.map +0 -1
- package/dist/export/write.d.ts +0 -14
- package/dist/export/write.d.ts.map +0 -1
- package/dist/export/write.js.map +0 -1
- package/dist/identity.d.ts +0 -7
- package/dist/identity.d.ts.map +0 -1
- package/dist/identity.js.map +0 -1
- package/dist/mail/backend.d.ts +0 -138
- package/dist/mail/backend.d.ts.map +0 -1
- package/dist/mail/backend.js.map +0 -1
- package/dist/mail/changes.d.ts +0 -99
- package/dist/mail/changes.d.ts.map +0 -1
- package/dist/mail/changes.js.map +0 -1
- package/dist/mail/cleanup.d.ts +0 -41
- package/dist/mail/cleanup.d.ts.map +0 -1
- package/dist/mail/cleanup.js.map +0 -1
- package/dist/mail/compose.d.ts +0 -75
- package/dist/mail/compose.d.ts.map +0 -1
- package/dist/mail/compose.js.map +0 -1
- package/dist/mail/domain-age.d.ts +0 -29
- package/dist/mail/domain-age.d.ts.map +0 -1
- package/dist/mail/domain-age.js.map +0 -1
- package/dist/mail/drafts.d.ts +0 -54
- package/dist/mail/drafts.d.ts.map +0 -1
- package/dist/mail/drafts.js.map +0 -1
- package/dist/mail/imap/account.d.ts +0 -5
- package/dist/mail/imap/account.d.ts.map +0 -1
- package/dist/mail/imap/account.js.map +0 -1
- package/dist/mail/imap/connection.d.ts +0 -72
- package/dist/mail/imap/connection.d.ts.map +0 -1
- package/dist/mail/imap/connection.js.map +0 -1
- package/dist/mail/imap/errors.d.ts +0 -11
- package/dist/mail/imap/errors.d.ts.map +0 -1
- package/dist/mail/imap/errors.js.map +0 -1
- package/dist/mail/imap/index.d.ts +0 -7
- package/dist/mail/imap/index.d.ts.map +0 -1
- package/dist/mail/imap/index.js.map +0 -1
- package/dist/mail/imap/messages.d.ts +0 -17
- package/dist/mail/imap/messages.d.ts.map +0 -1
- package/dist/mail/imap/messages.js.map +0 -1
- package/dist/mail/imap/read.d.ts +0 -7
- package/dist/mail/imap/read.d.ts.map +0 -1
- package/dist/mail/imap/read.js.map +0 -1
- package/dist/mail/imap/search.d.ts +0 -19
- package/dist/mail/imap/search.d.ts.map +0 -1
- package/dist/mail/imap/search.js.map +0 -1
- package/dist/mail/imap/write.d.ts +0 -5
- package/dist/mail/imap/write.d.ts.map +0 -1
- package/dist/mail/imap/write.js.map +0 -1
- package/dist/mail/locate.d.ts +0 -32
- package/dist/mail/locate.d.ts.map +0 -1
- package/dist/mail/locate.js.map +0 -1
- package/dist/mail/mbox.d.ts +0 -9
- package/dist/mail/mbox.d.ts.map +0 -1
- package/dist/mail/mbox.js.map +0 -1
- package/dist/mail/organise.d.ts +0 -101
- package/dist/mail/organise.d.ts.map +0 -1
- package/dist/mail/organise.js.map +0 -1
- package/dist/mail/restore.d.ts +0 -22
- package/dist/mail/restore.d.ts.map +0 -1
- package/dist/mail/restore.js.map +0 -1
- package/dist/mail/rethread.d.ts +0 -14
- package/dist/mail/rethread.d.ts.map +0 -1
- package/dist/mail/rethread.js.map +0 -1
- package/dist/mail/rules/apply.d.ts +0 -48
- package/dist/mail/rules/apply.d.ts.map +0 -1
- package/dist/mail/rules/apply.js.map +0 -1
- package/dist/mail/rules/file.d.ts +0 -9
- package/dist/mail/rules/file.d.ts.map +0 -1
- package/dist/mail/rules/file.js.map +0 -1
- package/dist/mail/rules/filters.d.ts +0 -11
- package/dist/mail/rules/filters.d.ts.map +0 -1
- package/dist/mail/rules/filters.js.map +0 -1
- package/dist/mail/rules/folders.d.ts +0 -11
- package/dist/mail/rules/folders.d.ts.map +0 -1
- package/dist/mail/rules/folders.js.map +0 -1
- package/dist/mail/rules/query.d.ts +0 -16
- package/dist/mail/rules/query.d.ts.map +0 -1
- package/dist/mail/rules/query.js.map +0 -1
- package/dist/mail/rules/store.d.ts +0 -9
- package/dist/mail/rules/store.d.ts.map +0 -1
- package/dist/mail/rules/store.js.map +0 -1
- package/dist/mail/save.d.ts +0 -9
- package/dist/mail/save.d.ts.map +0 -1
- package/dist/mail/save.js.map +0 -1
- package/dist/mail/send.d.ts +0 -76
- package/dist/mail/send.d.ts.map +0 -1
- package/dist/mail/send.js.map +0 -1
- package/dist/mail/smtp.d.ts +0 -4
- package/dist/mail/smtp.d.ts.map +0 -1
- package/dist/mail/smtp.js.map +0 -1
- package/dist/oauth.d.ts +0 -75
- package/dist/oauth.d.ts.map +0 -1
- package/dist/oauth.js.map +0 -1
- package/dist/profile.d.ts +0 -20
- package/dist/profile.d.ts.map +0 -1
- package/dist/profile.js.map +0 -1
- package/dist/program.d.ts +0 -6
- package/dist/program.d.ts.map +0 -1
- package/dist/program.js.map +0 -1
- package/dist/providers.d.ts +0 -255
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/reasons.d.ts +0 -9
- package/dist/reasons.d.ts.map +0 -1
- package/dist/reasons.js.map +0 -1
- package/dist/secret.d.ts +0 -31
- package/dist/secret.d.ts.map +0 -1
- package/dist/secret.js.map +0 -1
- package/dist/store.d.ts +0 -12
- package/dist/store.d.ts.map +0 -1
- package/dist/store.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/wcat.d.ts +0 -3
- package/dist/wcat.d.ts.map +0 -1
- package/dist/wcat.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.39.0 — 28.11.2026
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **WireCat Desktop can run this tool's MCP server.** The manifest names the server's port, 8753, so Desktop starts
|
|
10
|
+
and stops the server from the tool page, like the other WireCat tools. Before, Desktop had no port for it and offered
|
|
11
|
+
no server. It needs a Desktop that reads the port from the manifest.
|
|
12
|
+
- **The manifest says how Desktop signs in and how often it syncs.** Three sign-in methods, as Desktop's own list has
|
|
13
|
+
them: Microsoft, Gmail and another mail server, each `{profile} session start --json --answer-stdin` with
|
|
14
|
+
`--address`. Gmail also takes `--client-file` and `--method oauth`, and Microsoft names the `microsoft_client_id`
|
|
15
|
+
setting. The sync timer starts at every 5 minutes, with choices from 5 minutes to 24 hours. Desktop keeps its own
|
|
16
|
+
list only as a fallback.
|
|
17
|
+
- **Built on cli-base 1.2.0** (was 1.0.0), which writes the port, the sign-in methods and the timer into the manifest.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **The mailbox steps `session start` prints are plainer.** They no longer say what a provider's help page leaves
|
|
22
|
+
out, and the Microsoft 365 step names its IMAP server outright.
|
|
23
|
+
- **The guides say plainly what an agent over MCP may do.** A change set to `ask` runs without a question once the
|
|
24
|
+
agent passes `--yes`; `deny` or `readonly` stops it. The main guide, the settings, the security page and the
|
|
25
|
+
troubleshooting page say so, and the troubleshooting page is now grouped by what went wrong.
|
|
26
|
+
- **memo's old cleanup runs are read from the wcat folder.** memo is now `wcat`, and its state folder moves from
|
|
27
|
+
`cli-memo` to `wcat`. mail-cli reads `mail-trash` there. When only the old `cli-memo/mail-trash` exists, mail-cli
|
|
28
|
+
moves it first. When both exist, nothing is merged: it warns once and reads the new one.
|
|
29
|
+
- mail no longer carries its own copy of cli-core: built on @wirecat/cli-core 3.0.0 and @wirecat/cli-base 2.1.0,
|
|
30
|
+
needed for WireCat store version 79.
|
|
31
|
+
|
|
32
|
+
## 0.38.0 — 27.11.2026
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **Gmail's "send as" addresses count as yours.** A Gmail profile signed in with Google reads its "send as" list at
|
|
37
|
+
each `sync` (`users.settings.sendAs.list`, under the `https://mail.google.com/` scope the sign-in already asks for)
|
|
38
|
+
and counts every address Gmail accepted as yours, beside `aliases`. When Gmail does not answer, the list read last
|
|
39
|
+
is used, and `sync` says why under `send_as.unread`. A profile with an app password reads no list: set `aliases`
|
|
40
|
+
there ([configuration](docs/configuration.md)).
|
|
41
|
+
|
|
42
|
+
### Changed — may break callers
|
|
43
|
+
|
|
44
|
+
- **mail builds on cli-core 2.0.0.** The store moves to version 78 on its first open, and only tools on cli-core 2.0
|
|
45
|
+
open the store after that: a 1.x tool refuses it with `configuration_error`. Upgrade every installed WireCat CLI and
|
|
46
|
+
WireCat Desktop the same day, and stop `serve`, `mcp` and syncs before the first run. The migration writes a rollback
|
|
47
|
+
copy first and refuses to run without one.
|
|
48
|
+
- **An agent is `agent`, a sender bot is `bot:<id>`.** In the JSON output the `type` of an author or decider and of
|
|
49
|
+
every actor pair says `"agent"` where it said `"bot"`. A sender bot's ref says `bot:<id>` where it said
|
|
50
|
+
`sender-bot:<id>`. A `sender-bot:<id>` you pass in is still read as `bot:<id>`.
|
|
51
|
+
|
|
5
52
|
## 0.37.0 — 25.11.2026
|
|
6
53
|
|
|
7
54
|
### Added
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ mail personal search messages invoice # search the stored mail
|
|
|
35
35
|
mail skill install # optional: instructions for your AI agent
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Now the mail is in the store. `messages show` with the `ref` a search hit gives reads that email whole. [memo](https://
|
|
38
|
+
Now the mail is in the store. `messages show` with the `ref` a search hit gives reads that email whole. [memo](https://wirecat.dev/en/docs/memo/mail)
|
|
39
39
|
searches it together with your messages and notes: `memo search all "invoice"`.
|
|
40
40
|
|
|
41
41
|
You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no install, run
|
|
@@ -49,7 +49,7 @@ You need Node.js 22.16 or a later 22.x, or 24 or later. To try it with no instal
|
|
|
49
49
|
query language of every WireCat CLI, with `list:` for mailing lists; `messages show` gives an email whole with its
|
|
50
50
|
attachments' text, `conversations list|show` its threads. It searches the profile's mailbox only; it also asks the mail server
|
|
51
51
|
for mail `sync` has not read yet, and `--backend archive` keeps to the store.
|
|
52
|
-
[memo](https://
|
|
52
|
+
[memo](https://wirecat.dev/en/docs/memo/mail) searches every mailbox together with your messages and notes.
|
|
53
53
|
- **Export to mbox or Maildir.** `messages export 'from:ann@example.com' --output-dir ~/mail-backup` reads the original
|
|
54
54
|
messages from the server into a private folder, one mbox file per folder or a Maildir++ tree for mu and notmuch;
|
|
55
55
|
it can be resumed and bounded. `stats messages top --by list` ranks senders, lists and domains.
|
|
@@ -90,7 +90,8 @@ mail personal mcp config # the entry for Claude Desktop,
|
|
|
90
90
|
`mcp add` stops until you pass `--allow-writes`, because the server's `write` tool runs commands that change the
|
|
91
91
|
mailbox (`messages move`, `messages delete`, `folders create`) and local settings (`config set`, `skill install`).
|
|
92
92
|
`sync` runs through `read`: it writes only into the store. Check the profile's permissions first: a deletion, or a
|
|
93
|
-
change of many messages, answers with a preview until the call says `yes
|
|
93
|
+
change of many messages, answers with a preview until the call says `yes`, and then it runs without asking you. Set
|
|
94
|
+
`mail personal config set permissions.messages.delete deny` to keep an agent from deleting mail.
|
|
94
95
|
|
|
95
96
|
Every command except `mcp serve` takes `--json` and answers one JSON value on stdout; errors are JSON on stderr with a code to branch
|
|
96
97
|
on. Over MCP an agent finds the commands with a search tool and runs them through a `read` and a `write` tool; the
|
|
@@ -105,9 +106,10 @@ as data, never as instructions.
|
|
|
105
106
|
search in memo finds a person's mail and messages together.
|
|
106
107
|
- **Changes you can undo.** `messages delete` goes to Trash, and every change run keeps a record that
|
|
107
108
|
`messages restore` plays back. What is lost for good is named so and previewed first: `drafts delete`, and
|
|
108
|
-
`folders delete` of a folder that holds mail, which only the owner can run (`--allow-dangerous`). The profile's permissions
|
|
109
|
-
`MAIL_READ_ONLY=1`
|
|
110
|
-
MCP mails only you until you
|
|
109
|
+
`folders delete` of a folder that holds mail, which only the owner can run (`--allow-dangerous`). The profile's permissions
|
|
110
|
+
and `MAIL_READ_ONLY=1` stand between an agent and the mailbox: over MCP a change set to `ask` runs once the agent
|
|
111
|
+
confirms it, so set `deny` or `readonly` for what an agent must not do. An agent over MCP mails only you until you
|
|
112
|
+
allow more.
|
|
111
113
|
- **It works with the mailbox you have.** The [providers](https://github.com/WireCatLabs/mail-cli/blob/main/docs/providers.md)
|
|
112
114
|
it knows, and other servers with IMAP and app passwords; the server of a domain it does not know is found for you.
|
|
113
115
|
|
|
@@ -185,7 +187,7 @@ See [when something goes wrong](https://github.com/WireCatLabs/mail-cli/blob/mai
|
|
|
185
187
|
| Section | Pages |
|
|
186
188
|
|---|---|
|
|
187
189
|
| Start | [overview](https://github.com/WireCatLabs/mail-cli/blob/main/docs/index.md) · [install](https://github.com/WireCatLabs/mail-cli/blob/main/docs/installation.md) |
|
|
188
|
-
| Guides | [use
|
|
190
|
+
| Guides | [everyday use](https://github.com/WireCatLabs/mail-cli/blob/main/docs/usage.md) · [prepare the mailbox](https://github.com/WireCatLabs/mail-cli/blob/main/docs/providers.md) · [connect Outlook](https://github.com/WireCatLabs/mail-cli/blob/main/docs/outlook.md) |
|
|
189
191
|
| Reference | [all commands](https://github.com/WireCatLabs/mail-cli/blob/main/docs/commands.md) · [settings](https://github.com/WireCatLabs/mail-cli/blob/main/docs/configuration.md) |
|
|
190
192
|
| When something goes wrong | [troubleshooting](https://github.com/WireCatLabs/mail-cli/blob/main/docs/troubleshooting.md) · [security](https://github.com/WireCatLabs/mail-cli/blob/main/docs/security.md) |
|
|
191
193
|
| Project | [roadmap](https://github.com/WireCatLabs/mail-cli/blob/main/docs/roadmap.md) · [changelog](https://github.com/WireCatLabs/mail-cli/blob/main/CHANGELOG.md) |
|
package/contracts/wirecat.json
CHANGED
|
@@ -1160,6 +1160,7 @@
|
|
|
1160
1160
|
"accounts.google.com",
|
|
1161
1161
|
"oauth2.googleapis.com",
|
|
1162
1162
|
"openidconnect.googleapis.com",
|
|
1163
|
+
"gmail.googleapis.com",
|
|
1163
1164
|
"autoconfig.thunderbird.net",
|
|
1164
1165
|
"data.iana.org",
|
|
1165
1166
|
"imap.yandex.com",
|
|
@@ -1229,7 +1230,51 @@
|
|
|
1229
1230
|
],
|
|
1230
1231
|
"signIn": {
|
|
1231
1232
|
"gives": "Lets your agent read and search your mail, and sort and send it as far as your settings allow. A Microsoft sign-in may not grant sending.",
|
|
1232
|
-
"asks": "Your mail address and an app password, or a Microsoft or Google sign-in in the browser."
|
|
1233
|
+
"asks": "Your mail address and an app password, or a Microsoft or Google sign-in in the browser.",
|
|
1234
|
+
"methods": [
|
|
1235
|
+
{
|
|
1236
|
+
"id": "microsoft",
|
|
1237
|
+
"label": "Microsoft",
|
|
1238
|
+
"words": [
|
|
1239
|
+
"{profile}",
|
|
1240
|
+
"session",
|
|
1241
|
+
"start",
|
|
1242
|
+
"--json",
|
|
1243
|
+
"--answer-stdin"
|
|
1244
|
+
],
|
|
1245
|
+
"address": "--address",
|
|
1246
|
+
"clientId": "microsoft_client_id"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"id": "gmail",
|
|
1250
|
+
"label": "Gmail",
|
|
1251
|
+
"words": [
|
|
1252
|
+
"{profile}",
|
|
1253
|
+
"session",
|
|
1254
|
+
"start",
|
|
1255
|
+
"--json",
|
|
1256
|
+
"--answer-stdin"
|
|
1257
|
+
],
|
|
1258
|
+
"address": "--address",
|
|
1259
|
+
"clientFile": "--client-file",
|
|
1260
|
+
"oauth": [
|
|
1261
|
+
"--method",
|
|
1262
|
+
"oauth"
|
|
1263
|
+
]
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"id": "imap",
|
|
1267
|
+
"label": "Another mail server",
|
|
1268
|
+
"words": [
|
|
1269
|
+
"{profile}",
|
|
1270
|
+
"session",
|
|
1271
|
+
"start",
|
|
1272
|
+
"--json",
|
|
1273
|
+
"--answer-stdin"
|
|
1274
|
+
],
|
|
1275
|
+
"address": "--address"
|
|
1276
|
+
}
|
|
1277
|
+
]
|
|
1233
1278
|
},
|
|
1234
1279
|
"skill": {
|
|
1235
1280
|
"status": [
|
|
@@ -1253,6 +1298,7 @@
|
|
|
1253
1298
|
]
|
|
1254
1299
|
},
|
|
1255
1300
|
"mcpServer": {
|
|
1301
|
+
"port": 8753,
|
|
1256
1302
|
"start": [
|
|
1257
1303
|
"mcp",
|
|
1258
1304
|
"server",
|
|
@@ -1318,7 +1364,23 @@
|
|
|
1318
1364
|
],
|
|
1319
1365
|
"lastShape": "runs",
|
|
1320
1366
|
"what": "mail",
|
|
1321
|
-
"note": null
|
|
1367
|
+
"note": null,
|
|
1368
|
+
"schedule": {
|
|
1369
|
+
"every": "5m",
|
|
1370
|
+
"choices": [
|
|
1371
|
+
"5m",
|
|
1372
|
+
"15m",
|
|
1373
|
+
"30m",
|
|
1374
|
+
"1h",
|
|
1375
|
+
"2h",
|
|
1376
|
+
"4h",
|
|
1377
|
+
"8h",
|
|
1378
|
+
"24h"
|
|
1379
|
+
],
|
|
1380
|
+
"args": [
|
|
1381
|
+
"sync"
|
|
1382
|
+
]
|
|
1383
|
+
}
|
|
1322
1384
|
},
|
|
1323
1385
|
"storeInfo": null,
|
|
1324
1386
|
"storeTables": null,
|
package/dist/bin/mail.js
CHANGED
|
@@ -9,15 +9,13 @@ if (
|
|
|
9
9
|
(words[0] === "--version" || words[0] === "-V") &&
|
|
10
10
|
!Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
|
|
11
11
|
) {
|
|
12
|
-
process.stdout.write("0.
|
|
12
|
+
process.stdout.write("0.39.0\n")
|
|
13
13
|
} else {
|
|
14
14
|
// Before the bundle compiles: the bundle's own call comes after its chunks.
|
|
15
15
|
module.enableCompileCache()
|
|
16
16
|
const serves = ((words) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.slice(0, 4)
|
|
20
|
-
.some((word, at) => word === "serve" || word === "watch" || (word === "mcp" && plain[at + 1] === undefined));
|
|
17
|
+
const plain = words.filter((word) => !word.startsWith("-"));
|
|
18
|
+
return plain.slice(0, 4).some((word, at) => word === "serve" || word === "watch" || word === "mcp" && plain[at + 1] === void 0);
|
|
21
19
|
})(words)
|
|
22
20
|
if (serves && module.registerHooks) {
|
|
23
21
|
const bundle = new URL("../bundle/", import.meta.url).href
|
|
@@ -28,13 +26,15 @@ if (
|
|
|
28
26
|
: next(specifier, context),
|
|
29
27
|
})
|
|
30
28
|
}
|
|
31
|
-
const chunks = ["../bundle/
|
|
32
|
-
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
const chunks = ["../bundle/program-ZSF2VJI6.js"]
|
|
30
|
+
const preload = () =>
|
|
31
|
+
Promise.allSettled([
|
|
32
|
+
...chunks.map((chunk) => import(chunk)),
|
|
33
|
+
...["@wirecat/cli-core/preload","@wirecat/cli-base/preload"].map((name) => import(name).then((loaded) => loaded.preload())),
|
|
34
|
+
])
|
|
35
|
+
if (((words) => words.filter((word) => !word.startsWith("-")).slice(0, 2).includes("upgrade"))(words)) await preload()
|
|
36
36
|
const running = import("../bundle/mail.js")
|
|
37
37
|
// After the server answers its first request, so it starts no later.
|
|
38
|
-
if (serves) setTimeout(() => void
|
|
38
|
+
if (serves) setTimeout(() => void preload(), 2000).unref()
|
|
39
39
|
await running
|
|
40
40
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "./chunk-KP5JDYY6.js";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
5
|
|
|
7
6
|
// dist/reasons.js
|
|
7
|
+
import { defineReasons } from "@wirecat/cli-base/standards";
|
|
8
8
|
var ENTRIES = [
|
|
9
9
|
["mail.login-refused", "authentication_error", "the mail server refused the login"],
|
|
10
10
|
["mail.app-password-required", "authentication_error", "the server takes an app password, not the account password"],
|
|
@@ -57,7 +57,7 @@ var ENTRIES = [
|
|
|
57
57
|
var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
|
|
58
58
|
|
|
59
59
|
// dist/version.js
|
|
60
|
-
var VERSION = "0.
|
|
60
|
+
var VERSION = "0.39.0";
|
|
61
61
|
|
|
62
62
|
// dist/identity.js
|
|
63
63
|
var PACKAGE = "@wirecat/mail-cli";
|
|
@@ -83,6 +83,7 @@ var DESKTOP = {
|
|
|
83
83
|
"accounts.google.com",
|
|
84
84
|
"oauth2.googleapis.com",
|
|
85
85
|
"openidconnect.googleapis.com",
|
|
86
|
+
"gmail.googleapis.com",
|
|
86
87
|
"autoconfig.thunderbird.net",
|
|
87
88
|
"data.iana.org",
|
|
88
89
|
"imap.yandex.com",
|
|
@@ -100,16 +101,43 @@ var DESKTOP = {
|
|
|
100
101
|
"smtp-mail.outlook.com"
|
|
101
102
|
],
|
|
102
103
|
userHosts: "the mail server you sign in to, your domain's autoconfig file, and each sender domain's registry from IANA's list",
|
|
104
|
+
// One port per WireCat tool, so two servers never collide (wirecat-desktop docs/dev/cli-registry.md).
|
|
105
|
+
mcpPort: 8753,
|
|
103
106
|
tagline: "Your mailbox over IMAP, searchable on your computer",
|
|
104
107
|
syncs: "mail",
|
|
108
|
+
syncSchedule: { every: "5m", choices: ["5m", "15m", "30m", "1h", "2h", "4h", "8h", "24h"], args: ["sync"] },
|
|
105
109
|
signIn: {
|
|
106
110
|
gives: "Lets your agent read and search your mail, and sort and send it as far as your settings allow. A Microsoft sign-in may not grant sending.",
|
|
107
|
-
asks: "Your mail address and an app password, or a Microsoft or Google sign-in in the browser."
|
|
111
|
+
asks: "Your mail address and an app password, or a Microsoft or Google sign-in in the browser.",
|
|
112
|
+
methods: [
|
|
113
|
+
{
|
|
114
|
+
id: "microsoft",
|
|
115
|
+
label: "Microsoft",
|
|
116
|
+
words: ["{profile}", "session", "start", "--json", "--answer-stdin"],
|
|
117
|
+
address: "--address",
|
|
118
|
+
clientId: "microsoft_client_id"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "gmail",
|
|
122
|
+
label: "Gmail",
|
|
123
|
+
words: ["{profile}", "session", "start", "--json", "--answer-stdin"],
|
|
124
|
+
address: "--address",
|
|
125
|
+
clientFile: "--client-file",
|
|
126
|
+
oauth: ["--method", "oauth"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "imap",
|
|
130
|
+
label: "Another mail server",
|
|
131
|
+
words: ["{profile}", "session", "start", "--json", "--answer-stdin"],
|
|
132
|
+
address: "--address"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
108
135
|
}
|
|
109
136
|
};
|
|
110
137
|
var SKILL = new URL("../skills/mail-cli/SKILL.md", new URL("../identity.js", import.meta.url).href);
|
|
111
138
|
|
|
112
139
|
export {
|
|
140
|
+
__name,
|
|
113
141
|
PACKAGE,
|
|
114
142
|
IDENTITY,
|
|
115
143
|
DESKTOP,
|
package/dist/bundle/mail.js
CHANGED
|
@@ -3,181 +3,19 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
3
3
|
const require = __bundleRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
DESKTOP
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
installerOf
|
|
9
|
-
} from "./chunk-TXDR6YSF.js";
|
|
10
|
-
import "./chunk-DNCLQPOM.js";
|
|
11
|
-
import {
|
|
12
|
-
DESCRIBE_FLAG,
|
|
13
|
-
DISPATCH_FLAG,
|
|
14
|
-
PROGRAM_PREFIX,
|
|
15
|
-
SHIM_FORMAT,
|
|
16
|
-
describeAnswer,
|
|
17
|
-
exists,
|
|
18
|
-
fileState,
|
|
19
|
-
shimFiles,
|
|
20
|
-
writeShim
|
|
21
|
-
} from "./chunk-DPV53EZC.js";
|
|
22
|
-
import "./chunk-2YO3PLOE.js";
|
|
23
|
-
import {
|
|
24
|
-
catchCrashes
|
|
25
|
-
} from "./chunk-KP5JDYY6.js";
|
|
26
|
-
import "./chunk-Y5E2WNWB.js";
|
|
27
|
-
import "./chunk-S6JG4YUH.js";
|
|
28
|
-
import {
|
|
29
|
-
__name
|
|
30
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
} from "./chunk-BXH2YUBR.js";
|
|
31
7
|
|
|
32
8
|
// dist/bin/mail.js
|
|
33
9
|
import { enableCompileCache } from "node:module";
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
import { createHash } from "node:crypto";
|
|
37
|
-
import { existsSync, readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
38
|
-
import { dirname as dirname2, join as join2 } from "node:path";
|
|
39
|
-
import { fileURLToPath } from "node:url";
|
|
40
|
-
|
|
41
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/launcher.js
|
|
42
|
-
import { readFileSync } from "node:fs";
|
|
43
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
44
|
-
var posix = /* @__PURE__ */ __name((path) => path.replaceAll("\\", "/"), "posix");
|
|
45
|
-
var pnpmHome = /* @__PURE__ */ __name((path, env) => {
|
|
46
|
-
const home = env.PNPM_HOME;
|
|
47
|
-
return home && path.startsWith(`${posix(home).replace(/\/+$/, "")}/`) ? home : void 0;
|
|
48
|
-
}, "pnpmHome");
|
|
49
|
-
var layoutFolders = /* @__PURE__ */ __name((script, env) => {
|
|
50
|
-
const path = posix(script);
|
|
51
|
-
const home = pnpmHome(path, env);
|
|
52
|
-
if (home)
|
|
53
|
-
return [join(home, "bin"), home];
|
|
54
|
-
switch (installerOf(script)) {
|
|
55
|
-
case "bun":
|
|
56
|
-
return [`${path.slice(0, path.indexOf("/install/global/node_modules/"))}/bin`];
|
|
57
|
-
case "npm": {
|
|
58
|
-
const root = path.slice(0, path.indexOf("/node_modules/"));
|
|
59
|
-
return [basename(root) === "lib" ? join(dirname(root), "bin") : root];
|
|
60
|
-
}
|
|
61
|
-
default:
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
}, "layoutFolders");
|
|
65
|
-
var binFolder = /* @__PURE__ */ __name(({ name, argv1, script, env, platform }) => {
|
|
66
|
-
if (!["npm", "pnpm", "bun"].includes(installerOf(script)) && !pnpmHome(posix(script), env))
|
|
67
|
-
return void 0;
|
|
68
|
-
const extensions = platform === "win32" ? [".cmd", ".exe"] : [""];
|
|
69
|
-
const candidates = [argv1 ? dirname(argv1) : void 0, ...layoutFolders(script, env)];
|
|
70
|
-
for (const dir of new Set(candidates)) {
|
|
71
|
-
if (dir === void 0 || basename(dir) === ".bin")
|
|
72
|
-
continue;
|
|
73
|
-
for (const extension of extensions) {
|
|
74
|
-
const program = `${PROGRAM_PREFIX}${name}${extension}`;
|
|
75
|
-
if (exists(join(dir, program)))
|
|
76
|
-
return { dir, program };
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return void 0;
|
|
80
|
-
}, "binFolder");
|
|
81
|
-
var installed = /* @__PURE__ */ __name((dir, program) => {
|
|
82
|
-
if (!exists(join(dir, program)))
|
|
83
|
-
return false;
|
|
84
|
-
if (!program.toLowerCase().endsWith(".exe"))
|
|
85
|
-
return true;
|
|
86
|
-
let script;
|
|
87
|
-
try {
|
|
88
|
-
script = readFileSync(join(dir, `${program.slice(0, -4)}.bunx`)).toString("utf16le").split('"')[0] ?? "";
|
|
89
|
-
} catch {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
if (script === "" || exists(resolve(dir, script)))
|
|
93
|
-
return true;
|
|
94
|
-
const at = posix(script).lastIndexOf("/install/global/node_modules/");
|
|
95
|
-
return at < 0 || exists(join(dirname(dir), posix(script).slice(at + 1)));
|
|
96
|
-
}, "installed");
|
|
97
|
-
var NAME = "wcat";
|
|
98
|
-
var ensureLauncher = /* @__PURE__ */ __name(({ dir, program, platform }) => {
|
|
99
|
-
try {
|
|
100
|
-
if (!exists(join(dir, program)))
|
|
101
|
-
return "failed";
|
|
102
|
-
const mine = shimFiles("launcher", { dir, name: NAME, target: program, platform });
|
|
103
|
-
const states = mine.map((file) => fileState(file.path));
|
|
104
|
-
if (states.some((one) => one.state === "foreign"))
|
|
105
|
-
return "foreign";
|
|
106
|
-
const ours = states.flatMap((one) => one.state === "ours" ? [one] : []);
|
|
107
|
-
if (ours.some(({ mark }) => mark.format > SHIM_FORMAT))
|
|
108
|
-
return "newer";
|
|
109
|
-
if (ours.some(({ mark }) => mark.kind !== "launcher"))
|
|
110
|
-
return "foreign";
|
|
111
|
-
const current = ours.find(({ mark }) => installed(dir, mark.target))?.mark.target;
|
|
112
|
-
const wanted = shimFiles("launcher", { dir, name: NAME, target: current ?? program, platform });
|
|
113
|
-
const stale = wanted.filter((file, at) => {
|
|
114
|
-
const state = states[at];
|
|
115
|
-
return state?.state !== "ours" || state.text !== file.text;
|
|
116
|
-
});
|
|
117
|
-
if (stale.length === 0)
|
|
118
|
-
return "kept";
|
|
119
|
-
for (const file of stale)
|
|
120
|
-
writeShim(file);
|
|
121
|
-
return "written";
|
|
122
|
-
} catch {
|
|
123
|
-
return "failed";
|
|
124
|
-
}
|
|
125
|
-
}, "ensureLauncher");
|
|
126
|
-
|
|
127
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/start.js
|
|
128
|
-
var wcatStart = /* @__PURE__ */ __name(async (tool, io = {}) => {
|
|
129
|
-
const argv = io.argv ?? process.argv;
|
|
130
|
-
const env = io.env ?? process.env;
|
|
131
|
-
const platform = io.platform ?? process.platform;
|
|
132
|
-
const stdout = io.stdout ?? process.stdout;
|
|
133
|
-
const [first, ...rest] = argv.slice(2);
|
|
134
|
-
if (first === DESCRIBE_FLAG) {
|
|
135
|
-
stdout.write(`${JSON.stringify(describeAnswer(tool, shippedManifest(argv[1])))}
|
|
136
|
-
`);
|
|
137
|
-
return { code: 0 };
|
|
138
|
-
}
|
|
139
|
-
if (first === DISPATCH_FLAG) {
|
|
140
|
-
const { runWcat } = await import("./dispatch-USKS7J74.js");
|
|
141
|
-
const code = await runWcat(rest, { env, platform, stdout, stderr: io.stderr ?? process.stderr, self: tool });
|
|
142
|
-
return { code };
|
|
143
|
-
}
|
|
144
|
-
const folder = binFolder({
|
|
145
|
-
name: tool.command,
|
|
146
|
-
argv1: argv[1],
|
|
147
|
-
script: io.script ?? fileURLToPath(new URL("wcat/start.js", import.meta.resolve("@wirecat/cli-base")).href),
|
|
148
|
-
env,
|
|
149
|
-
platform
|
|
150
|
-
});
|
|
151
|
-
return folder ? { launcher: ensureLauncher({ ...folder, platform }) } : {};
|
|
152
|
-
}, "wcatStart");
|
|
153
|
-
var shippedManifest = /* @__PURE__ */ __name((bin) => {
|
|
154
|
-
if (!bin)
|
|
155
|
-
return void 0;
|
|
156
|
-
try {
|
|
157
|
-
for (let dir = dirname2(realpathSync(bin)); ; dir = dirname2(dir)) {
|
|
158
|
-
if (existsSync(join2(dir, "package.json"))) {
|
|
159
|
-
const bytes = readFileSync2(join2(dir, "contracts", "wirecat.json"));
|
|
160
|
-
const { wcat_manifest: format, desktop } = JSON.parse(bytes.toString("utf8"));
|
|
161
|
-
if (format !== 2 || typeof desktop !== "object" || desktop === null)
|
|
162
|
-
return void 0;
|
|
163
|
-
return { desktop, sha256: createHash("sha256").update(bytes).digest("hex") };
|
|
164
|
-
}
|
|
165
|
-
if (dirname2(dir) === dir)
|
|
166
|
-
return void 0;
|
|
167
|
-
}
|
|
168
|
-
} catch {
|
|
169
|
-
return void 0;
|
|
170
|
-
}
|
|
171
|
-
}, "shippedManifest");
|
|
172
|
-
|
|
173
|
-
// dist/bin/mail.js
|
|
10
|
+
import { catchCrashes } from "@wirecat/cli-base";
|
|
11
|
+
import { wcatStart } from "@wirecat/cli-base/wcat/start";
|
|
174
12
|
enableCompileCache();
|
|
175
13
|
var wcat = await wcatStart(DESKTOP);
|
|
176
14
|
if (wcat.code !== void 0) {
|
|
177
15
|
process.exitCode = wcat.code;
|
|
178
16
|
} else {
|
|
179
17
|
const stopCatching = catchCrashes({ cli: DESKTOP.command, interactive: process.stdout.isTTY === true });
|
|
180
|
-
const { run } = await import("./program-
|
|
18
|
+
const { run } = await import("./program-ZSF2VJI6.js");
|
|
181
19
|
try {
|
|
182
20
|
process.exitCode = await run(process.argv.slice(2));
|
|
183
21
|
} finally {
|