outlook-cli-rs 0.2.4__tar.gz → 0.2.6__tar.gz
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.
- outlook_cli_rs-0.2.6/.gitattributes +2 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/.github/workflows/release.yml +11 -11
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/CHANGELOG.md +16 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/Cargo.lock +33 -25
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/Cargo.toml +4 -4
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/PKG-INFO +19 -1
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/README.md +18 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/backend.rs +31 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/cli.rs +30 -1
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/desktop.ps1 +45 -7
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/desktop.rs +17 -1
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/graph.rs +62 -3
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/main.rs +60 -3
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/presentation.rs +10 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/schema.rs +60 -2
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/cli.rs +69 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/desktop.rs +11 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/desktop_bridge.rs +124 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/fixtures/desktop-mock.ps1 +16 -2
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/graph.rs +188 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/presentation.rs +18 -1
- outlook_cli_rs-0.2.4/.github/dependabot.yml +0 -10
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/.github/workflows/ci.yml +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/.gitignore +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/LICENSE +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/Makefile +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/docs/releases.md +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/pyproject.toml +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/scripts/release.py +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/auth.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/config.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/error.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/lib.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/output.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/tui/mod.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/tui/model.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/tui/tests.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/src/tui/view.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/fixtures/clispec-v0.3.json +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/tests/tui.rs +0 -0
- {outlook_cli_rs-0.2.4 → outlook_cli_rs-0.2.6}/vership.toml +0 -0
|
@@ -59,10 +59,10 @@ jobs:
|
|
|
59
59
|
runs-on: ${{ matrix.os }}
|
|
60
60
|
steps:
|
|
61
61
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
62
|
-
- uses: actions/setup-python@
|
|
62
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
63
63
|
with:
|
|
64
64
|
python-version: '3.12'
|
|
65
|
-
- uses: astral-sh/setup-uv@
|
|
65
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
66
66
|
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
|
|
67
67
|
with:
|
|
68
68
|
command: build
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
92
92
|
python scripts/release.py smoke dist
|
|
93
93
|
- name: Package standalone executable and checksum
|
|
94
94
|
run: python scripts/release.py archive dist --target ${{ matrix.target }}
|
|
95
|
-
- uses: actions/upload-artifact@
|
|
95
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
96
96
|
with:
|
|
97
97
|
name: wheel-${{ matrix.target }}
|
|
98
98
|
path: dist/*
|
|
@@ -107,7 +107,7 @@ jobs:
|
|
|
107
107
|
with:
|
|
108
108
|
command: sdist
|
|
109
109
|
args: --out dist
|
|
110
|
-
- uses: actions/upload-artifact@
|
|
110
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
111
111
|
with:
|
|
112
112
|
name: source
|
|
113
113
|
path: dist/*.tar.gz
|
|
@@ -118,17 +118,17 @@ jobs:
|
|
|
118
118
|
runs-on: ubuntu-latest
|
|
119
119
|
steps:
|
|
120
120
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
121
|
-
- uses: actions/setup-python@
|
|
121
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
122
122
|
with:
|
|
123
123
|
python-version: '3.12'
|
|
124
|
-
- uses: astral-sh/setup-uv@
|
|
125
|
-
- uses: actions/download-artifact@
|
|
124
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
125
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
126
126
|
with:
|
|
127
127
|
path: dist
|
|
128
128
|
merge-multiple: true
|
|
129
129
|
- run: python scripts/release.py verify dist
|
|
130
130
|
- run: uv tool run --from twine twine check dist/*.whl dist/outlook_cli_rs-*.tar.gz
|
|
131
|
-
- uses: actions/upload-artifact@
|
|
131
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
132
132
|
with:
|
|
133
133
|
name: release-packages
|
|
134
134
|
path: dist/*
|
|
@@ -144,11 +144,11 @@ jobs:
|
|
|
144
144
|
contents: write
|
|
145
145
|
steps:
|
|
146
146
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
147
|
-
- uses: actions/setup-python@
|
|
147
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
148
148
|
with:
|
|
149
149
|
python-version: '3.12'
|
|
150
|
-
- uses: astral-sh/setup-uv@
|
|
151
|
-
- uses: actions/download-artifact@
|
|
150
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
151
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
152
152
|
with:
|
|
153
153
|
name: release-packages
|
|
154
154
|
path: dist
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.6](https://github.com/rvben/outlook-cli/compare/v0.2.5...v0.2.6) - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **mail**: save threaded reply and forward drafts ([056b62e](https://github.com/rvben/outlook-cli/commit/056b62ef69296a8232d172d68449085ac811bde7))
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **desktop**: keep HTML formatting when replying ([de8ae81](https://github.com/rvben/outlook-cli/commit/de8ae8168e065cc57c5aa5c5f72fb37a066a29e1))
|
|
12
|
+
|
|
13
|
+
## [0.2.5](https://github.com/rvben/outlook-cli/compare/v0.2.4...v0.2.5) - 2026-09-27
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **deps**: update rustls to 0.23.45 for RUSTSEC-2026-0285 ([933ef57](https://github.com/rvben/outlook-cli/commit/933ef573cb7a2a292da3228979de0c05a220681a))
|
|
18
|
+
|
|
3
19
|
## [0.2.4](https://github.com/rvben/outlook-cli/compare/v0.2.3...v0.2.4) - 2026-09-08
|
|
4
20
|
|
|
5
21
|
### Added
|
|
@@ -156,6 +156,12 @@ version = "0.22.1"
|
|
|
156
156
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
157
|
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
158
158
|
|
|
159
|
+
[[package]]
|
|
160
|
+
name = "base64"
|
|
161
|
+
version = "0.23.1"
|
|
162
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
163
|
+
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
|
|
164
|
+
|
|
159
165
|
[[package]]
|
|
160
166
|
name = "bit-set"
|
|
161
167
|
version = "0.8.0"
|
|
@@ -543,9 +549,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
|
|
|
543
549
|
|
|
544
550
|
[[package]]
|
|
545
551
|
name = "dirs"
|
|
546
|
-
version = "
|
|
552
|
+
version = "7.0.0"
|
|
547
553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
548
|
-
checksum = "
|
|
554
|
+
checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f"
|
|
549
555
|
dependencies = [
|
|
550
556
|
"dirs-sys",
|
|
551
557
|
]
|
|
@@ -700,12 +706,12 @@ dependencies = [
|
|
|
700
706
|
|
|
701
707
|
[[package]]
|
|
702
708
|
name = "fraction"
|
|
703
|
-
version = "0.
|
|
709
|
+
version = "0.17.0"
|
|
704
710
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
705
|
-
checksum = "
|
|
711
|
+
checksum = "e246562084dde8ebbcc943b261c406ce4f68e5032ec28029a251a47d6a295500"
|
|
706
712
|
dependencies = [
|
|
707
|
-
"lazy_static",
|
|
708
713
|
"num",
|
|
714
|
+
"num-bigint",
|
|
709
715
|
]
|
|
710
716
|
|
|
711
717
|
[[package]]
|
|
@@ -984,7 +990,7 @@ version = "0.1.20"
|
|
|
984
990
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
985
991
|
checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
|
|
986
992
|
dependencies = [
|
|
987
|
-
"base64",
|
|
993
|
+
"base64 0.22.1",
|
|
988
994
|
"bytes",
|
|
989
995
|
"futures-channel",
|
|
990
996
|
"futures-util",
|
|
@@ -1242,9 +1248,9 @@ dependencies = [
|
|
|
1242
1248
|
|
|
1243
1249
|
[[package]]
|
|
1244
1250
|
name = "jsonschema"
|
|
1245
|
-
version = "0.
|
|
1251
|
+
version = "0.57.0"
|
|
1246
1252
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1247
|
-
checksum = "
|
|
1253
|
+
checksum = "71160ed5f6dbe36a2d6be79f4ca03ee09a99d2866f340faed49458913449aefa"
|
|
1248
1254
|
dependencies = [
|
|
1249
1255
|
"ahash",
|
|
1250
1256
|
"bytecount",
|
|
@@ -1273,25 +1279,27 @@ dependencies = [
|
|
|
1273
1279
|
|
|
1274
1280
|
[[package]]
|
|
1275
1281
|
name = "jsonschema-regex"
|
|
1276
|
-
version = "0.
|
|
1282
|
+
version = "0.57.0"
|
|
1277
1283
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1278
|
-
checksum = "
|
|
1284
|
+
checksum = "48d2120d8466ffcdc1b3be4b88ff0e9191bf5b6b09b1b1af1eef9aff8f465ea3"
|
|
1279
1285
|
dependencies = [
|
|
1280
1286
|
"regex-syntax",
|
|
1281
1287
|
]
|
|
1282
1288
|
|
|
1283
1289
|
[[package]]
|
|
1284
1290
|
name = "jsonschema-value"
|
|
1285
|
-
version = "0.
|
|
1291
|
+
version = "0.57.0"
|
|
1286
1292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1287
|
-
checksum = "
|
|
1293
|
+
checksum = "3fbfa40a42415369d940b3848f3ce08099f1f1ac04d73e8580f4d652617c4f44"
|
|
1288
1294
|
dependencies = [
|
|
1289
1295
|
"ahash",
|
|
1290
1296
|
"bytecount",
|
|
1291
1297
|
"fraction",
|
|
1298
|
+
"getrandom 0.3.4",
|
|
1292
1299
|
"num-cmp",
|
|
1293
1300
|
"num-traits",
|
|
1294
1301
|
"serde_json",
|
|
1302
|
+
"zmij",
|
|
1295
1303
|
]
|
|
1296
1304
|
|
|
1297
1305
|
[[package]]
|
|
@@ -1621,10 +1629,10 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
|
|
1621
1629
|
|
|
1622
1630
|
[[package]]
|
|
1623
1631
|
name = "outlook-cli"
|
|
1624
|
-
version = "0.2.
|
|
1632
|
+
version = "0.2.6"
|
|
1625
1633
|
dependencies = [
|
|
1626
1634
|
"assert_cmd",
|
|
1627
|
-
"base64",
|
|
1635
|
+
"base64 0.23.1",
|
|
1628
1636
|
"clap",
|
|
1629
1637
|
"clap_complete",
|
|
1630
1638
|
"crossterm",
|
|
@@ -1996,9 +2004,9 @@ dependencies = [
|
|
|
1996
2004
|
|
|
1997
2005
|
[[package]]
|
|
1998
2006
|
name = "referencing"
|
|
1999
|
-
version = "0.
|
|
2007
|
+
version = "0.57.0"
|
|
2000
2008
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2001
|
-
checksum = "
|
|
2009
|
+
checksum = "b06f6798be4fed305e74df8b1fb90cf59c6b8cc17aa3febeb1830c0c6b627b3e"
|
|
2002
2010
|
dependencies = [
|
|
2003
2011
|
"ahash",
|
|
2004
2012
|
"fluent-uri",
|
|
@@ -2042,11 +2050,11 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
|
|
2042
2050
|
|
|
2043
2051
|
[[package]]
|
|
2044
2052
|
name = "reqwest"
|
|
2045
|
-
version = "0.13.
|
|
2053
|
+
version = "0.13.5"
|
|
2046
2054
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2047
|
-
checksum = "
|
|
2055
|
+
checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029"
|
|
2048
2056
|
dependencies = [
|
|
2049
|
-
"base64",
|
|
2057
|
+
"base64 0.23.1",
|
|
2050
2058
|
"bytes",
|
|
2051
2059
|
"futures-channel",
|
|
2052
2060
|
"futures-core",
|
|
@@ -2125,9 +2133,9 @@ dependencies = [
|
|
|
2125
2133
|
|
|
2126
2134
|
[[package]]
|
|
2127
2135
|
name = "rustls"
|
|
2128
|
-
version = "0.23.
|
|
2136
|
+
version = "0.23.45"
|
|
2129
2137
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2130
|
-
checksum = "
|
|
2138
|
+
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
|
2131
2139
|
dependencies = [
|
|
2132
2140
|
"aws-lc-rs",
|
|
2133
2141
|
"once_cell",
|
|
@@ -2509,7 +2517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
2509
2517
|
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
2510
2518
|
dependencies = [
|
|
2511
2519
|
"fastrand",
|
|
2512
|
-
"getrandom 0.4
|
|
2520
|
+
"getrandom 0.3.4",
|
|
2513
2521
|
"once_cell",
|
|
2514
2522
|
"rustix",
|
|
2515
2523
|
"windows-sys 0.61.2",
|
|
@@ -2640,9 +2648,9 @@ dependencies = [
|
|
|
2640
2648
|
|
|
2641
2649
|
[[package]]
|
|
2642
2650
|
name = "toml"
|
|
2643
|
-
version = "1.1.
|
|
2651
|
+
version = "1.1.6+spec-1.1.0"
|
|
2644
2652
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2645
|
-
checksum = "
|
|
2653
|
+
checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a"
|
|
2646
2654
|
dependencies = [
|
|
2647
2655
|
"indexmap",
|
|
2648
2656
|
"serde_core",
|
|
@@ -3173,7 +3181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
3173
3181
|
checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031"
|
|
3174
3182
|
dependencies = [
|
|
3175
3183
|
"assert-json-diff",
|
|
3176
|
-
"base64",
|
|
3184
|
+
"base64 0.22.1",
|
|
3177
3185
|
"deadpool",
|
|
3178
3186
|
"futures",
|
|
3179
3187
|
"http",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "outlook-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.6"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
rust-version = "1.90"
|
|
6
6
|
description = "Microsoft Outlook from your terminal, for humans and agents"
|
|
@@ -16,12 +16,12 @@ name = "outlook"
|
|
|
16
16
|
path = "src/main.rs"
|
|
17
17
|
|
|
18
18
|
[dependencies]
|
|
19
|
-
base64 = "0.
|
|
19
|
+
base64 = "0.23"
|
|
20
20
|
clap = { version = "4", features = ["derive", "env"] }
|
|
21
21
|
clap_complete = "4"
|
|
22
22
|
crossterm = "0.29"
|
|
23
23
|
ratatui = { version = "0.30", default-features = false, features = ["crossterm", "unstable-rendered-line-info"] }
|
|
24
|
-
dirs = "
|
|
24
|
+
dirs = "7"
|
|
25
25
|
keyring = { version = "3", features = ["apple-native", "windows-native", "sync-secret-service", "vendored"] }
|
|
26
26
|
reqwest = { version = "0.13", default-features = false, features = ["rustls", "json", "form"] }
|
|
27
27
|
serde = { version = "1", features = ["derive"] }
|
|
@@ -34,6 +34,6 @@ url = "2"
|
|
|
34
34
|
|
|
35
35
|
[dev-dependencies]
|
|
36
36
|
assert_cmd = "2"
|
|
37
|
-
jsonschema = "0.
|
|
37
|
+
jsonschema = "0.57.0"
|
|
38
38
|
predicates = "3"
|
|
39
39
|
wiremock = "0.6"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: outlook-cli-rs
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -57,6 +57,14 @@ OUTLOOK_TEST_POWERSHELL=/path/to/pwsh cargo test --test desktop_bridge -- --igno
|
|
|
57
57
|
|
|
58
58
|
## Install
|
|
59
59
|
|
|
60
|
+
### Homebrew
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
brew install rvben/tap/outlook-cli
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Other installation methods
|
|
67
|
+
|
|
60
68
|
```console
|
|
61
69
|
cargo install outlook-cli --locked
|
|
62
70
|
# or, using a prebuilt wheel (supported platforms below)
|
|
@@ -201,6 +209,8 @@ outlook mail send --to person@example.com --bcc archive@example.com \
|
|
|
201
209
|
outlook mail move MESSAGE_ID --destination archive
|
|
202
210
|
outlook mail delete MESSAGE_ID --yes
|
|
203
211
|
outlook mail draft create --to person@example.com --subject 'Report' --body 'Attached.'
|
|
212
|
+
printf 'Looks good to me.' | outlook mail draft reply MESSAGE_ID --all --body -
|
|
213
|
+
outlook mail draft forward MESSAGE_ID --to person@example.com --body 'FYI'
|
|
204
214
|
outlook mail attachment add DRAFT_ID ./report.pdf --content-type application/pdf
|
|
205
215
|
outlook mail attachment list DRAFT_ID
|
|
206
216
|
outlook mail attachment download MESSAGE_ID ATTACHMENT_ID ./report.pdf
|
|
@@ -220,6 +230,14 @@ outlook doctor --offline
|
|
|
220
230
|
outlook schema --command 'mail send'
|
|
221
231
|
```
|
|
222
232
|
|
|
233
|
+
`mail reply` sends immediately. To review a reply first, `mail draft reply`
|
|
234
|
+
and `mail draft forward` save a draft in the original's conversation, with
|
|
235
|
+
Outlook's `RE:`/`FW:` subject, recipients, and quoted original (forwards keep
|
|
236
|
+
the original's attachments). The `--body` text goes above the quoted original,
|
|
237
|
+
and `--cc`/`--bcc` add to the recipients Outlook fills in. Nothing is sent
|
|
238
|
+
until `mail draft send` or Send in Outlook; `mail draft update --body` replaces
|
|
239
|
+
the whole body, quoted original included.
|
|
240
|
+
|
|
223
241
|
Graph message and event requests opt into immutable Outlook IDs. Remote
|
|
224
242
|
writes are blocked when the active profile is read-only. Destructive commands
|
|
225
243
|
confirm on a terminal and require `--yes` in automation. Attachment downloads
|
|
@@ -34,6 +34,14 @@ OUTLOOK_TEST_POWERSHELL=/path/to/pwsh cargo test --test desktop_bridge -- --igno
|
|
|
34
34
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
37
|
+
### Homebrew
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
brew install rvben/tap/outlook-cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Other installation methods
|
|
44
|
+
|
|
37
45
|
```console
|
|
38
46
|
cargo install outlook-cli --locked
|
|
39
47
|
# or, using a prebuilt wheel (supported platforms below)
|
|
@@ -178,6 +186,8 @@ outlook mail send --to person@example.com --bcc archive@example.com \
|
|
|
178
186
|
outlook mail move MESSAGE_ID --destination archive
|
|
179
187
|
outlook mail delete MESSAGE_ID --yes
|
|
180
188
|
outlook mail draft create --to person@example.com --subject 'Report' --body 'Attached.'
|
|
189
|
+
printf 'Looks good to me.' | outlook mail draft reply MESSAGE_ID --all --body -
|
|
190
|
+
outlook mail draft forward MESSAGE_ID --to person@example.com --body 'FYI'
|
|
181
191
|
outlook mail attachment add DRAFT_ID ./report.pdf --content-type application/pdf
|
|
182
192
|
outlook mail attachment list DRAFT_ID
|
|
183
193
|
outlook mail attachment download MESSAGE_ID ATTACHMENT_ID ./report.pdf
|
|
@@ -197,6 +207,14 @@ outlook doctor --offline
|
|
|
197
207
|
outlook schema --command 'mail send'
|
|
198
208
|
```
|
|
199
209
|
|
|
210
|
+
`mail reply` sends immediately. To review a reply first, `mail draft reply`
|
|
211
|
+
and `mail draft forward` save a draft in the original's conversation, with
|
|
212
|
+
Outlook's `RE:`/`FW:` subject, recipients, and quoted original (forwards keep
|
|
213
|
+
the original's attachments). The `--body` text goes above the quoted original,
|
|
214
|
+
and `--cc`/`--bcc` add to the recipients Outlook fills in. Nothing is sent
|
|
215
|
+
until `mail draft send` or Send in Outlook; `mail draft update --body` replaces
|
|
216
|
+
the whole body, quoted original included.
|
|
217
|
+
|
|
200
218
|
Graph message and event requests opt into immutable Outlook IDs. Remote
|
|
201
219
|
writes are blocked when the active profile is read-only. Destructive commands
|
|
202
220
|
confirm on a terminal and require `--yes` in automation. Attachment downloads
|
|
@@ -8,6 +8,14 @@ use crate::{
|
|
|
8
8
|
};
|
|
9
9
|
use serde_json::Value;
|
|
10
10
|
|
|
11
|
+
/// How a saved draft answers the message it was created from.
|
|
12
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
13
|
+
pub enum DraftKind {
|
|
14
|
+
Reply,
|
|
15
|
+
ReplyAll,
|
|
16
|
+
Forward,
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
pub enum MailBackend {
|
|
12
20
|
Graph(GraphClient),
|
|
13
21
|
Desktop(DesktopClient),
|
|
@@ -70,6 +78,29 @@ impl MailBackend {
|
|
|
70
78
|
Self::Desktop(client) => client.send_draft(id).await,
|
|
71
79
|
}
|
|
72
80
|
}
|
|
81
|
+
/// Saves a reply, reply-all, or forward draft threaded with the original; never sends.
|
|
82
|
+
pub async fn create_response_draft(
|
|
83
|
+
&self,
|
|
84
|
+
id: &str,
|
|
85
|
+
kind: DraftKind,
|
|
86
|
+
to: &[String],
|
|
87
|
+
cc: &[String],
|
|
88
|
+
bcc: &[String],
|
|
89
|
+
body: &str,
|
|
90
|
+
) -> Result<Value, AppError> {
|
|
91
|
+
match self {
|
|
92
|
+
Self::Graph(client) => {
|
|
93
|
+
client
|
|
94
|
+
.create_response_draft(id, kind, to, cc, bcc, body)
|
|
95
|
+
.await
|
|
96
|
+
}
|
|
97
|
+
Self::Desktop(client) => {
|
|
98
|
+
client
|
|
99
|
+
.create_response_draft(id, kind, to, cc, bcc, body)
|
|
100
|
+
.await
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
73
104
|
pub async fn reply(&self, id: &str, body: &str, all: bool) -> Result<Value, AppError> {
|
|
74
105
|
match self {
|
|
75
106
|
Self::Graph(client) => client.reply(id, body, all).await,
|
|
@@ -311,10 +311,39 @@ pub enum DraftCommand {
|
|
|
311
311
|
clear_bcc: bool,
|
|
312
312
|
#[arg(long)]
|
|
313
313
|
subject: Option<String>,
|
|
314
|
-
///
|
|
314
|
+
/// Replace the whole body, including any quoted original; plain text, or - to read stdin
|
|
315
315
|
#[arg(long)]
|
|
316
316
|
body: Option<String>,
|
|
317
317
|
},
|
|
318
|
+
/// Save a reply draft in the original's conversation without sending it
|
|
319
|
+
Reply {
|
|
320
|
+
id: String,
|
|
321
|
+
/// Reply to all original recipients
|
|
322
|
+
#[arg(long)]
|
|
323
|
+
all: bool,
|
|
324
|
+
/// CC address to add to the recipients Outlook fills in; repeatable
|
|
325
|
+
#[arg(long)]
|
|
326
|
+
cc: Vec<String>,
|
|
327
|
+
/// BCC address to add; repeatable
|
|
328
|
+
#[arg(long)]
|
|
329
|
+
bcc: Vec<String>,
|
|
330
|
+
/// Plain-text comment placed above the quoted original, or - to read stdin
|
|
331
|
+
#[arg(long, default_value = "")]
|
|
332
|
+
body: String,
|
|
333
|
+
},
|
|
334
|
+
/// Save a forward draft, with the original's attachments, without sending it
|
|
335
|
+
Forward {
|
|
336
|
+
id: String,
|
|
337
|
+
#[arg(long, required = true)]
|
|
338
|
+
to: Vec<String>,
|
|
339
|
+
#[arg(long)]
|
|
340
|
+
cc: Vec<String>,
|
|
341
|
+
#[arg(long)]
|
|
342
|
+
bcc: Vec<String>,
|
|
343
|
+
/// Plain-text comment placed above the forwarded original, or - to read stdin
|
|
344
|
+
#[arg(long, default_value = "")]
|
|
345
|
+
body: String,
|
|
346
|
+
},
|
|
318
347
|
/// Send an existing draft
|
|
319
348
|
Send { id: String },
|
|
320
349
|
/// Delete an existing draft after confirmation
|
|
@@ -36,7 +36,9 @@ function Message($mail, $storeId, $detail) {
|
|
|
36
36
|
isRead = -not $mail.UnRead
|
|
37
37
|
isDraft = -not $mail.Sent
|
|
38
38
|
importance = @('low','normal','high')[[int]$mail.Importance]
|
|
39
|
+
conversationId = $null
|
|
39
40
|
}
|
|
41
|
+
if ($mail.ConversationID) { $result.conversationId = [string]$mail.ConversationID }
|
|
40
42
|
$attachments = $null
|
|
41
43
|
try {
|
|
42
44
|
$attachments = $mail.Attachments
|
|
@@ -54,6 +56,12 @@ function Invalid($message) { throw [ArgumentException]::new($message) }
|
|
|
54
56
|
function RequireDraft($mail) {
|
|
55
57
|
if ($mail.Sent -or $mail.Submitted) { Invalid 'The requested message is not an editable draft.' }
|
|
56
58
|
}
|
|
59
|
+
function AddRecipients($recipients, $addresses, $type) {
|
|
60
|
+
foreach ($address in $addresses) {
|
|
61
|
+
$recipient = Keep ($recipients.Add([string]$address))
|
|
62
|
+
$recipient.Type = $type
|
|
63
|
+
}
|
|
64
|
+
}
|
|
57
65
|
function EditMail($mail, $request) {
|
|
58
66
|
$recipients = Keep ($mail.Recipients)
|
|
59
67
|
$type = 0
|
|
@@ -64,14 +72,29 @@ function EditMail($mail, $request) {
|
|
|
64
72
|
$recipient = Keep ($recipients.Item($i))
|
|
65
73
|
if ($recipient.Type -eq $type) { $recipients.Remove($i) }
|
|
66
74
|
}
|
|
67
|
-
|
|
68
|
-
$recipient = Keep ($recipients.Add([string]$address))
|
|
69
|
-
$recipient.Type = $type
|
|
70
|
-
}
|
|
75
|
+
AddRecipients $recipients $request.$field $type
|
|
71
76
|
}
|
|
72
77
|
if ($null -ne $request.subject) { $mail.Subject = [string]$request.subject }
|
|
73
78
|
if ($null -ne $request.body) { $mail.BodyFormat = 1; $mail.Body = [string]$request.body }
|
|
74
79
|
}
|
|
80
|
+
function PrependBody($mail, $text) {
|
|
81
|
+
# Keeps the generated reply's format so quoted HTML and inline images survive.
|
|
82
|
+
if ($mail.BodyFormat -eq 1) {
|
|
83
|
+
$mail.Body = $text + "`r`n`r`n" + [string]$mail.Body
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
$html = [string]$mail.HTMLBody
|
|
87
|
+
# Non-breaking spaces keep indentation and aligned columns, which HTML would collapse.
|
|
88
|
+
$lines = foreach ($line in ($text -split "`r?`n")) {
|
|
89
|
+
$encoded = [Net.WebUtility]::HtmlEncode($line).Replace("`t", ' ')
|
|
90
|
+
[regex]::Replace($encoded, '(?<=^| ) ', ' ')
|
|
91
|
+
}
|
|
92
|
+
$block = '<div>' + ($lines -join '<br>') + '</div><br>'
|
|
93
|
+
$tag = [regex]::Match($html, '<body\b[^>]*>', 'IgnoreCase')
|
|
94
|
+
$index = 0
|
|
95
|
+
if ($tag.Success) { $index = $tag.Index + $tag.Length }
|
|
96
|
+
$mail.HTMLBody = $html.Insert($index, $block)
|
|
97
|
+
}
|
|
75
98
|
function SendMail($mail) {
|
|
76
99
|
$recipients = Keep ($mail.Recipients)
|
|
77
100
|
if ($recipients.Count -eq 0 -or -not $recipients.ResolveAll()) {
|
|
@@ -108,7 +131,7 @@ try {
|
|
|
108
131
|
$result = SavedMessage $mail
|
|
109
132
|
}
|
|
110
133
|
}
|
|
111
|
-
{ $_ -in 'mark_read','move','delete','reply','draft_update','draft_send','draft_delete' } {
|
|
134
|
+
{ $_ -in 'mark_read','move','delete','reply','respond_draft','draft_update','draft_send','draft_delete' } {
|
|
112
135
|
$mail = Mail $request.id
|
|
113
136
|
$id = Identifier $request.id.entry $request.id.store
|
|
114
137
|
if ($request.operation -like 'draft_*') { RequireDraft $mail }
|
|
@@ -131,11 +154,26 @@ try {
|
|
|
131
154
|
'reply' {
|
|
132
155
|
if ($request.all) { $reply = Keep ($mail.ReplyAll()) }
|
|
133
156
|
else { $reply = Keep ($mail.Reply()) }
|
|
134
|
-
$reply.
|
|
135
|
-
$reply.Body = [string]$request.body + "`r`n`r`n" + [string]$reply.Body
|
|
157
|
+
PrependBody $reply ([string]$request.body)
|
|
136
158
|
SendMail $reply
|
|
137
159
|
$result = @{sent=$true; message_id=$id; reply_all=[bool]$request.all}
|
|
138
160
|
}
|
|
161
|
+
'respond_draft' {
|
|
162
|
+
switch ([string]$request.mode) {
|
|
163
|
+
'reply' { $draft = Keep ($mail.Reply()) }
|
|
164
|
+
'all' { $draft = Keep ($mail.ReplyAll()) }
|
|
165
|
+
'forward' { $draft = Keep ($mail.Forward()) }
|
|
166
|
+
default { Invalid 'Unsupported draft response mode.' }
|
|
167
|
+
}
|
|
168
|
+
# Outlook fills in the thread, subject prefix, recipients, and quoted original.
|
|
169
|
+
$recipients = Keep ($draft.Recipients)
|
|
170
|
+
AddRecipients $recipients $request.to 1
|
|
171
|
+
AddRecipients $recipients $request.cc 2
|
|
172
|
+
AddRecipients $recipients $request.bcc 3
|
|
173
|
+
if ([string]$request.body) { PrependBody $draft ([string]$request.body) }
|
|
174
|
+
$draft.Save()
|
|
175
|
+
$result = SavedMessage $draft
|
|
176
|
+
}
|
|
139
177
|
'draft_update' {
|
|
140
178
|
EditMail $mail $request
|
|
141
179
|
$mail.Save()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//! Classic Outlook automation through a fixed PowerShell script and JSON stdin.
|
|
2
|
-
use crate::{error::AppError, graph::Page};
|
|
2
|
+
use crate::{backend::DraftKind, error::AppError, graph::Page};
|
|
3
3
|
use base64::{
|
|
4
4
|
Engine,
|
|
5
5
|
engine::general_purpose::{STANDARD, URL_SAFE_NO_PAD},
|
|
@@ -133,6 +133,22 @@ impl DesktopClient {
|
|
|
133
133
|
self.run(json!({"operation":"draft_send", "id":decode_id(id)?}))
|
|
134
134
|
.await
|
|
135
135
|
}
|
|
136
|
+
pub async fn create_response_draft(
|
|
137
|
+
&self,
|
|
138
|
+
id: &str,
|
|
139
|
+
kind: DraftKind,
|
|
140
|
+
to: &[String],
|
|
141
|
+
cc: &[String],
|
|
142
|
+
bcc: &[String],
|
|
143
|
+
body: &str,
|
|
144
|
+
) -> Result<Value, AppError> {
|
|
145
|
+
let mode = match kind {
|
|
146
|
+
DraftKind::Reply => "reply",
|
|
147
|
+
DraftKind::ReplyAll => "all",
|
|
148
|
+
DraftKind::Forward => "forward",
|
|
149
|
+
};
|
|
150
|
+
self.run(json!({"operation":"respond_draft", "id":decode_id(id)?, "mode":mode, "to":to, "cc":cc, "bcc":bcc, "body":body})).await
|
|
151
|
+
}
|
|
136
152
|
pub async fn reply(&self, id: &str, body: &str, all: bool) -> Result<Value, AppError> {
|
|
137
153
|
self.run(json!({"operation":"reply", "id":decode_id(id)?, "body":body, "all":all}))
|
|
138
154
|
.await
|