a-mail-agents 0.13.2__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.
- a_mail_agents-0.13.2/.gitignore +8 -0
- a_mail_agents-0.13.2/CHANGELOG.md +321 -0
- a_mail_agents-0.13.2/LICENSE +21 -0
- a_mail_agents-0.13.2/PKG-INFO +571 -0
- a_mail_agents-0.13.2/README.md +549 -0
- a_mail_agents-0.13.2/SKILL.md +801 -0
- a_mail_agents-0.13.2/bin/amail +11587 -0
- a_mail_agents-0.13.2/bin/amail-notify.sh +380 -0
- a_mail_agents-0.13.2/bin/amail_json_cfg.py +541 -0
- a_mail_agents-0.13.2/bin/amail_mcp.py +1917 -0
- a_mail_agents-0.13.2/docs/ENDORSEMENTS.md +195 -0
- a_mail_agents-0.13.2/docs/RECEIVE-CONTRACT.md +189 -0
- a_mail_agents-0.13.2/docs/RELAYS.md +92 -0
- a_mail_agents-0.13.2/docs/SUBAGENT-POLICY.md +166 -0
- a_mail_agents-0.13.2/install.sh +94 -0
- a_mail_agents-0.13.2/pkg/amail/__init__.py +5 -0
- a_mail_agents-0.13.2/pkg/amail/__main__.py +5 -0
- a_mail_agents-0.13.2/pyproject.toml +66 -0
- a_mail_agents-0.13.2/relays/gmail/CARRIER.md +30 -0
- a_mail_agents-0.13.2/relays/gmail/README.md +171 -0
- a_mail_agents-0.13.2/relays/gmail/SETUP.md +23 -0
- a_mail_agents-0.13.2/relays/gmail/a-mail-relay/SKILL.md +61 -0
- a_mail_agents-0.13.2/relays/gmail/adapter.py +202 -0
- a_mail_agents-0.13.2/relays/gmail/relay.json +43 -0
- a_mail_agents-0.13.2/templates/config.default.json +48 -0
- a_mail_agents-0.13.2/templates/io.github.kelnishi.amail.notifier.plist.tmpl +30 -0
- a_mail_agents-0.13.2/tests/_agy_mock.py +77 -0
- a_mail_agents-0.13.2/tests/check_package.py +196 -0
- a_mail_agents-0.13.2/tests/test_amail.py +6220 -0
- a_mail_agents-0.13.2/tests/test_install_windows.sh +111 -0
- a_mail_agents-0.13.2/tests/test_json_cfg.py +258 -0
- a_mail_agents-0.13.2/tests/test_mcp.py +1310 -0
- a_mail_agents-0.13.2/tests/test_notify.sh +292 -0
- a_mail_agents-0.13.2/tests/test_release.py +120 -0
- a_mail_agents-0.13.2/tests/test_setup.py +361 -0
- a_mail_agents-0.13.2/tests/test_ssh_transport.py +152 -0
- a_mail_agents-0.13.2/tests/test_update.py +349 -0
- a_mail_agents-0.13.2/transports/ssh/README.md +38 -0
- a_mail_agents-0.13.2/transports/ssh/amail-ssh-transport +290 -0
- a_mail_agents-0.13.2/uninstall.sh +91 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **a-mail** are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.13.2] - 2026-12-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- A `v*` tag on `main` publishes the release: `.github/workflows/release.yml` checks that the tag matches `VERSION` and has a CHANGELOG section, builds and checks the package, publishes it to PyPI through trusted publishing (no stored token), and creates a GitHub Release with the CHANGELOG section as notes.
|
|
10
|
+
- `packaging/homebrew-tap/` holds the Homebrew tap's formula and its update workflow, which points the formula at the newest PyPI sdist once a day (or when run by hand), installs, tests and audits it, and commits with the tap's own token.
|
|
11
|
+
- CONTRIBUTING describes the release steps and the one-time PyPI and tap setup.
|
|
12
|
+
|
|
13
|
+
## [0.13.1] - 2026-12-05
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `amail update` upgrades a-mail through the source `amail setup` recorded: `brew upgrade a-mail`, `pipx upgrade a-mail-agents`, `uv tool upgrade a-mail-agents`, pip in a virtual environment, or `git pull --ff-only origin main` for a checkout on a clean `main`. It then runs the new version's `amail setup --from-record` (through the package's own `amail` command, or the launcher for a checkout), reports the old and new versions, and on macOS and Linux lists a-mail MCP servers that started before the upgrade, including when new code keeps the same version. It refuses a checkout on another branch or with uncommitted changes, an unpacked release, pip outside a virtual environment, and a source whose tool isn't on `PATH`. A read-only subagent can't run it.
|
|
18
|
+
- `amail update --check` reports the installed code's version and the latest one (PyPI, or `origin/main` for a checkout), and whether an update would be refused, without changing anything; `--json` for scripts. `--dry-run` prints the upgrade and setup commands.
|
|
19
|
+
|
|
20
|
+
## [0.13.0] - 2026-12-05
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- `amail setup` does what `install.sh` did, with the same options, prompts and output, so an installed package can wire a-mail into the harnesses itself. `install.sh` finds Python 3.9 or newer and runs `amail setup` from the checkout; a checkout is the development install.
|
|
25
|
+
- `amail setup --from-record` repeats the options of the last setup without asking. Setup records them, with the version and where a-mail was installed from (`git`, `pip`, `pipx`, `uv`, `brew`, or `archive` for an unpacked release), in `~/.a-mail/state/install.json`.
|
|
26
|
+
- `amail uninstall` does the work of `uninstall.sh`, which runs it, and also removes the skill copy, the setup record, the launcher and notifier copy in `~/.a-mail/bin/`, and every custom `--harness-dir` link any setup made. `--purge` refuses a folder without an `inbox/` beside `config.json` or `state/`, removes only the link when the home is a symlink, and succeeds when the home is already gone.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Harnesses reach a-mail only through `~/.a-mail/` (except a checkout's MCP entries on Windows), so a package upgrade leaves every harness working. Each harness's skill links to `~/.a-mail/share/SKILL.md` instead of the checkout's file. For a package, the `~/.a-mail/bin/amail` launcher runs the package's own `amail` command (a Homebrew path through its `opt` link), which survives a move to a newer Python, and the skill and notifier in the home are copies. For a checkout, the launcher runs `bin/amail` with the Python that ran setup, and the skill and notifier in the home link into the checkout (copies on Windows); moving the checkout needs `./install.sh` again. On Windows, a package's MCP entries run its `amail.exe`; a checkout's run `python <checkout>/bin/amail` as before.
|
|
31
|
+
- A second setup reports each step it left alone as `[ok]` (hooks, MCP entries, the Codex block, relay flags, the LaunchAgent plist and the chat skill included), and leaves those files untouched. A loaded LaunchAgent is reloaded only when its plist or the notifier script changed.
|
|
32
|
+
- `bin/amail_json_cfg.py` exposes each edit as a function that `amail setup` and `amail uninstall` import; its command line is unchanged.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- The SSH transport's last fallback ran the `~/.a-mail/bin/amail` launcher under Python, and the launcher is a shell script; it runs it as a program (`amail.cmd` on Windows). The fallback applies when the transport sits outside a checkout or a package.
|
|
37
|
+
|
|
38
|
+
An existing checkout install moves onto `~/.a-mail/share/SKILL.md` when `./install.sh` runs once more.
|
|
39
|
+
|
|
40
|
+
## [0.12.3] - 2026-12-05
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- a-mail builds as a Python package, `a-mail-agents` (PyPI refuses `a-mail` as too close to the existing `AMail`), whose `amail` command runs without a checkout. `pyproject.toml` maps the repository's files into one `amail` package: `bin/amail` becomes `amail/cli.py`, and the skill, relays, templates and transports sit beside it. A checkout keeps its layout and runs unchanged. The package isn't published yet.
|
|
45
|
+
- CI's `package` job builds the sdist and the wheel, installs the wheel into a fresh environment on Linux, macOS and Windows (Python 3.14; 3.9 on macOS and Windows), and runs `tests/check_package.py` against it outside the checkout.
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- The SSH transport found `amail` only in a checkout (`bin/amail` two folders up) or through the install's launcher; inside the package it uses the package's `cli.py`.
|
|
50
|
+
|
|
51
|
+
## [0.12.2] - 2026-12-05
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- Every MCP tool declares all four annotation hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) as booleans. The read-only tools declared only `readOnlyHint` and `openWorldHint`, and `amail_wait` lacked `destructiveHint`; directories such as OpenAI's reject a tool with any hint missing.
|
|
56
|
+
|
|
57
|
+
## [0.12.1] - 2026-12-05
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- A session in the ChatGPT app's Codex mode was named `cli.codex`, because a-mail recognised Codex's desktop app only by `Codex.app` in a parent process's path, and the ChatGPT app runs its bundled CLI from `ChatGPT.app/…/CodexCLI.app/…/codex`. The ChatGPT main executable among the parents marks it as `desktop.codex`. The same bundled binary is the `codex` on `PATH`, so a terminal session started with it stays `cli.codex`.
|
|
62
|
+
|
|
63
|
+
## [0.12.0] - 2026-12-05
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- An endorsement without spend codes also covers a request its spender sends without the ticket, after the mint. The minter's `claim` takes it, spends one ticket and marks it `untagged`. In the fleet test, Codex sent to a minter that held a ticket for it and skipped the lookup, so the request waited for approval the owner had already given. A request that reached the bus before the mint (on the minter's clock: when the transport filed it, or a local message's `sent_at`), a reply, an FYI (`rsvp: no`), or one that fails a ticketed request's checks stays ordinary mail. A crash after an untagged claim was recorded, even on the last ticket, is finished by the next `claim`. An endorsement with spend codes covers only ticketed requests.
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- `amail claim --release <message id>` (MCP `amail_claim` with `release`): the minter hands back an untagged request that does not fit the owner's words. Its ticket returns, it goes back to the inbox for the usual approval, and no `claim` takes it again under any endorsement. The endorsement keeps the release and its reason (`declined`), and `amail check` shows it beside the request (`released`). A ticketed request is not released.
|
|
72
|
+
- A plain send that a ticket covers returns a `notice` sentence for the sending agent to pass on, saying whether the minter will spend a ticket on it. `ticket_available` rows carry `requires_spend_code` and `covers_untagged`, and so do ticket lookups between nodes; a transport passes `covers_untagged` on (the SSH reference transport does), and an answer without it reads as false.
|
|
73
|
+
- MCP `amail_send`'s description says to call `amail_tickets` before asking another session for work, and to relay a `notice`.
|
|
74
|
+
|
|
75
|
+
## [0.11.0] - 2026-12-05
|
|
76
|
+
|
|
77
|
+
### Added
|
|
78
|
+
|
|
79
|
+
- `install.sh` configures Codex when `~/.codex` (or `$CODEX_HOME`) exists, or with `--all-harnesses`. It linked only the skill for Codex, so Codex sessions used the CLI inside Codex's sandbox and heard of no unread mail at session start. One marked block at the end of `config.toml` holds the `a-mail` MCP server (skip with `--no-mcp`), a `SessionStart` hook (skip with `--no-hooks`) and, with `--sandbox-write`, the a-mail home in `sandbox_workspace_write.writable_roots`. a-mail rewrites or removes only that block, and skips a part the user set outside it. Codex runs the hook only after the user trusts it in `/hooks`, and the installer says so. `uninstall.sh` removes the block.
|
|
80
|
+
- `amail hook-check --format codex` prints the `hookSpecificOutput` JSON that Codex's `SessionStart` hooks read.
|
|
81
|
+
|
|
82
|
+
## [0.10.2] - 2026-12-05
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
|
|
86
|
+
- MCP `amail_tickets` with `node` ran the ticket lookup without the bus, so it saw only `transport.ticket_lookup` in config and never the lookup the transport holding the lease offers. With Izakaya's gateway on the lease it answered "no transport.ticket_lookup is configured", while a send to the same node reported `ticket_available` for the ticket. It runs the same lookup as the CLI and a send.
|
|
87
|
+
|
|
88
|
+
- A ticket lookup that fails or times out says in its `reason` that a sandboxed shell can block the lookup's connection to the transport's gateway. Inside Claude Code's sandbox, Izakaya's lookup reported its gateway as not running while it ran. When the transport's own message names the sandbox, a-mail adds no second hint.
|
|
89
|
+
|
|
90
|
+
- A command whose write to the bus was refused printed a bare `[Errno 1] Operation not permitted`, which agents read as a broken install. Every such refusal exits `3` with one reason that names a sandbox as the usual cause and the ways around it; with `--json` it also prints `{"error": "sandbox", "path", "reason"}`.
|
|
91
|
+
|
|
92
|
+
- `check` in a sandboxed shell failed before listing any mail, because it locks the endorsement table. It lists the mail anyway, skips marking undeliverable notices seen and revoking what an ended session left behind, and says so in `read_only`.
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- MCP `amail_whoami` reports the server's `version`, so a session can tell a long-running server from the installed CLI. The stale-server notice asks the user to confirm that version after restarting the server.
|
|
97
|
+
|
|
98
|
+
- `install.sh --sandbox-write` adds the a-mail home to Claude Code's `sandbox.filesystem.allowWrite`, so sandboxed CLI calls can write to the bus. It is opt-in: any sandboxed command can then write mail. Without it the installer says what is refused. `uninstall.sh` removes the entry.
|
|
99
|
+
|
|
100
|
+
- SKILL.md has a **Sandboxes** section: which CLI steps a sandbox can refuse, how each refusal shows, and what to do before telling the user something is down.
|
|
101
|
+
|
|
102
|
+
## [0.10.1] - 2026-12-04
|
|
103
|
+
|
|
104
|
+
### Fixed
|
|
105
|
+
|
|
106
|
+
- A request naming an endorsement that had ended (no tickets left, expired or revoked) was left in the inbox with no reason, and `claim` listed nothing in `held`. `claim` lists it in `held` with the reason, whether or not it names the endorsement. ([#25](https://github.com/kelnishi/a-mail/issues/25))
|
|
107
|
+
|
|
108
|
+
### Added
|
|
109
|
+
|
|
110
|
+
- `check` gives each ticketed request a `ticket_status`: the endorsement's status, `unknown` when no endorsement with that id is on the bus, and the reason it was not claimed.
|
|
111
|
+
|
|
112
|
+
## [0.10.0] - 2026-12-04
|
|
113
|
+
|
|
114
|
+
### Changed
|
|
115
|
+
|
|
116
|
+
- Outside a git repo, CLI commands name a session after its folder, as the MCP server does, so a ticket minted over MCP is claimed by the background `amail claim`. Before, the CLI gave plain `<ui>.<harness>` there and refused to claim it. Home, `/` and temporary folders name no project. A session that ran the CLI from a non-git folder gets a new address; endorsements it minted under the old one are claimed by setting `AMAIL_AGENT` to it, or minted again. ([#26](https://github.com/kelnishi/a-mail/issues/26))
|
|
117
|
+
- Workflow 6: for a spender on another machine with no project named, the minting session asks which project, or any, instead of assuming its own. A guessed project that does not match the sender is never spent.
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
|
|
121
|
+
- `claim` with no IDs reports `none_found` (exit `6`) when this session's address never minted an endorsement, instead of `ended`. It names the `address` it checked, and `nearby` lists open endorsements minted at another project of the same harness.
|
|
122
|
+
- `check` lists unread mail in the same harness inbox addressed to another project under `also_unread`, with `kind: other_project`. A scoped check hides that mail, and a sender may have guessed the project.
|
|
123
|
+
|
|
124
|
+
## [0.9.1] - 2026-12-04
|
|
125
|
+
|
|
126
|
+
### Changed
|
|
127
|
+
|
|
128
|
+
- `SKILL.md` Workflow 6: a minting session shows each spend code alone in its own code block, so the owner can copy it in one click, and writes it nowhere else in the reply.
|
|
129
|
+
|
|
130
|
+
## [0.9.0] - 2026-12-04
|
|
131
|
+
|
|
132
|
+
Tickets between nodes (#22). A session can spend a ticket that a session on another node minted, through a transport that carries the question and the request, and the minter claims and answers it without a second visit.
|
|
133
|
+
|
|
134
|
+
### Added
|
|
135
|
+
- A spender may name a node (`expect --for claude/my-repo@gpu-box`) or `@any`, every node a transport delivers from. A spender with no node, or this machine's own node name, means this machine. `amail node set any` and a message to `@any` are refused.
|
|
136
|
+
- `expect --list --for <address>@<node>` lists the endorsements whose spender names that node or `any`, for a transport answering another node.
|
|
137
|
+
- Config key `transport.ticket_lookup`: the transport's command, as a JSON argument array, which a-mail runs as `<command...> <node> --for <address>` with no shell and an 8-second limit. `amail expect --list --node <node>` and MCP `amail_tickets` with `node` show its answer, each endorsement with the `address` to send to. A plain `send` to another node runs it too and reports `ticket_available`, or `ticket_lookup` with the reason none was found.
|
|
138
|
+
- `send --ticket <id> --to <minter>@<node>` spools a ticketed request for the transport; the minter's `claim` checks the ticket.
|
|
139
|
+
- `claim` takes a ticketed request a transport delivered when its origin is `gateway:<node>` (or `ssh:<node>`), its `from` names that node, and the spender names that node or `any`. A relay or guest origin is held, and so is a local message whose `from` names another node.
|
|
140
|
+
- The transport lease, so one transport at a time carries a bus's outbox and answers its ticket lookups: `amail transport take | release | status`, the owner's ranking in `transport.order`, and fencing with `--lease <token>` on `list` and `move` (exit `10` when the token is not the holder's). The holder's `--lookup` is the ticket lookup unless the owner sets `transport.ticket_lookup`. `docs/RECEIVE-CONTRACT.md` describes the negotiation and the configuration. Izakaya's gateway takes the lease as `izakaya`.
|
|
141
|
+
- Origin `ssh:<node>` counts as node-authenticated, beside `gateway:<node>`, for spending a ticket.
|
|
142
|
+
- `transports/ssh/amail-ssh-transport`: a reference transport over SSH, with a forced command per peer key on the receiving machine. It shows the protocol in use; nothing installs or starts it.
|
|
143
|
+
- Spend codes cross nodes: `send --spend-code` writes `spend_code:` into the spooled request, the minter's `receive` binds it to the ticket and removes the line before filing (`spend_code_bound` in its JSON), and a move to the archive removes it from the sender's copy. `spend_code` may appear only once in an inbound message.
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
- Spend codes are 6 characters (`7K3-M9X`), down from 12, since they are typed by hand. Codes of 12 characters minted by 0.8.0 are accepted. A code names the session the owner means to serve; `docs/ENDORSEMENTS.md` describes it that way.
|
|
147
|
+
|
|
148
|
+
## [0.8.0] - 2026-12-04
|
|
149
|
+
|
|
150
|
+
Approval ahead of time (#19). The owner can endorse work in the session that will do it before the request is written, so a matching request from another session on this machine is acted on and answered without a second visit. Between machines it waits for a transport that offers ticket lookup.
|
|
151
|
+
|
|
152
|
+
### Added
|
|
153
|
+
- `amail endorse` mints an endorsement at this session's own address (`--minter` is refused when minting): the owner's words for the work, who may ask (`--for`, an address where a part left out is not compared), a number of single-use tickets (1 to 100) and a required expiry (at most 7 days). `--list` shows endorsements (with `--for`, the live ones an address may spend), `--revoke <id>` and `--revoke-all` end them at once. Minting is refused inside an a-mail subagent.
|
|
154
|
+
- `amail claim [<id> ...]` is how the minter waits for and takes a ticketed request: it burns one ticket and moves the message to `processing/` under one lock (exit `0` claimed, `5` timeout, `6` ended). Only the minter's derived address may claim. With no IDs it covers every open endorsement the session minted, re-read on each poll, so one wait covers later mints. The claim is recorded before the move, and the next claim finishes a move a crash interrupted without burning another ticket. Requests it cannot claim (another sender, a recipient other than the minter, mail from another machine or a relay) stay in the inbox for the usual approval.
|
|
155
|
+
- `amail send --ticket <id>` spends a ticket; `--to` defaults to the minter. The sender of a spend is derived, so `--from` is refused with a ticket.
|
|
156
|
+
- An endorsement offers tickets only while its minter waits, claims or replies; after `--stale-after` (default 30 minutes) without one of those, askers see none.
|
|
157
|
+
- `endorse --spend-codes` also requires a single-use code per ticket, printed once at mint and kept on the bus only as a salted hash. The owner hands a code to the asking session, which passes it with `send --spend-code`; `send` binds it to that request without writing it into the message, and `claim` holds a ticketed request with no bound code.
|
|
158
|
+
- MCP tools `amail_tickets`, `amail_endorse` and `amail_claim`, `ticket` and `spend_code` on `amail_send`, and `spend_codes` on `amail_endorse`.
|
|
159
|
+
- `amail expect` is an alias of `amail endorse`. In a session, the owner says a request is coming in plain words or with `/a-mail expect <who> <what>` (alias `/a-mail endorse`); the agent fills in who, what, how many and until when (defaults: this session's project, the owner's words verbatim, 1 request, 2 hours), confirms it in one question, and stops waiting when asked.
|
|
160
|
+
- `amail pending` and the MCP tool `amail_pending` show what a session is waiting on, read from the bus: endorsements it minted that are open, subagent runs on mail it sent that are running, and requests it sent with `rsvp: yes` that are neither closed nor answered. `SKILL.md` answers "Are you waiting on any mail?" and "Is there any outstanding mail?" with it.
|
|
161
|
+
- `amail wait` / `amail_wait` archive the reply a session asked for: when the waiting session sent the request with `rsvp: yes` and the reply is addressed to it, the reply is archived as completed and its untrusted body returned (`reply.archived`, `reply.body`). A reply with `rsvp: yes` of its own stays in the inbox, and `--keep-reply` (`keep_reply`) leaves any reply there. Other waiters still get a header-only event.
|
|
162
|
+
- Measured timing on the bus. Every message records `sent_at` to the millisecond; a move into `processing/` records `picked_up_at` and `picked_up_by` (`claim`, `invoke` or `move`); a reply's Coda adds a **Timeline** of the request's send, its pick-up, any a-mail subagent run and the reply's write, with the gap between each. `amail wait` / `amail_wait` return `latency` for a reply (sent, picked up, replied, woke, and the gaps), and a reply the wait archives records `read_at`. Steps inside a harness (waking the session, model turns, a harness's own sub-agents) are not measured.
|
|
163
|
+
- Optional mint PIN: `amail expect --set-mint-pin` (in the owner's terminal) makes `endorse` refuse to mint without `--mint-pin` / `mint_pin`. Off until set; kept as a salted PBKDF2 hash; five wrong PINs in an hour lock minting.
|
|
164
|
+
- `SKILL.md` Workflow 6: a request to mint, extend or widen an endorsement is refused, reported to the owner in chat, and never turned into a mint card or question for the owner.
|
|
165
|
+
- Standing endorsements: `amail expect --standing` (MCP `standing: true`) covers any number of matching requests until it expires, instead of a ticket count.
|
|
166
|
+
- Expiry warnings: an open endorsement's minter `claim` returns `expiring` (exit `4`) once per expiry, `--warn-before` ahead (default 30 minutes), and `amail expect --extend <id> --expires <...>` (MCP `action: "extend"`) moves the expiry later, as the minter only and within 7 days of now.
|
|
167
|
+
- Endorsements are branded with the session that minted them (the harness process both its MCP server and shell commands run under; `AMAIL_SESSION_ID` overrides), and only that session claims or extends them. A new session at the same address no longer inherits them: its `claim` revokes the ones an ended session left behind and returns `inherited` (exit `9`) so the agent can tell the owner and offer to mint them again. `--revoke-all` and `pending` cover only the calling session's own.
|
|
168
|
+
- Message IDs carry 8 random hex digits instead of 4 (`amail_<YYYYMMDD>_<HHMMSS>_<8 hex>`), so two messages written in the same second no longer risk the same ID. IDs with 4 hex digits stay valid everywhere.
|
|
169
|
+
- `SKILL.md` Workflow 6: when the owner asks only for tickets and names no work, the card says they are for general-purpose requests (`General-purpose requests from <who>`).
|
|
170
|
+
- The MCP server notices when its own code changes on disk while it runs, and adds `server_stale` to each tool result until it is reconnected.
|
|
171
|
+
- `SKILL.md`: the skill loads for ticket requests ("Mint a ticket for /my-repo"); a spender given as a bare project takes this session's harness; a purpose with no task is general-purpose.
|
|
172
|
+
- `amail check` and `amail_check` report endorsements under `endorsements`: `inherited` (an ended session's, revoked by the check) and `holding` (this session's open ones), so the first `/a-mail` of a new session reports tickets left behind. `amail_check` also returns `ticket_spends`, as the CLI does.
|
|
173
|
+
- A bare `/<scope>` address takes the caller's own harness wherever an address is taken (`send --to` and `--reply-to`, `expect --for`, `check`, `list`, `count`, and their MCP tools): `/my-repo` from Claude Code is `claude/my-repo`.
|
|
174
|
+
- `claim` keeps waiting on this session's own endorsements when it disposes of inherited ones, and reports them with the result it ends on; an ended wait names the endorsement that expired, was revoked or was spent.
|
|
175
|
+
- An endorsement is revoked as left behind only when its minting process is known to be gone. One whose session cannot be checked is listed as `unconfirmed` and left alone, and a caller with no brand (a sandboxed shell cannot read the process list) claims, extends and lists no branded endorsement and reports `session_unknown` with the reason.
|
|
176
|
+
- `--max-requests <n>` (MCP `max_requests`) caps a standing endorsement: it is spent after `n` claims. It is optional; without it, time and the owner's words bound a standing endorsement.
|
|
177
|
+
- `docs/ENDORSEMENTS.md`, and `SKILL.md` Workflow 6 for the minter.
|
|
178
|
+
|
|
179
|
+
### Changed
|
|
180
|
+
- `SKILL.md` guardrail 2 accepts an endorsement as the owner's approval, given ahead of time, for the work its words describe. Workflow 1 looks for a ticket before sending to a session on this machine and asks the owner before spending one.
|
|
181
|
+
- A request claimed under an endorsement is answered to its sender only: `reply` and `send --in-reply-to` ignore its `reply_to`, refuse any other `to`, and refuse a ticket.
|
|
182
|
+
- `check` lists ticket spends made in the checking session's project name over the last 24 hours (JSON `ticket_spends`); reading them clears nothing, so a spend none of its sessions made stays visible.
|
|
183
|
+
- A plain `send` that a live endorsement would have covered reports it (`ticket_available`) and spends nothing.
|
|
184
|
+
- `receive` and `post` refuse a `ticket` header written twice, and `receive --local` refuses any `ticket` header.
|
|
185
|
+
|
|
186
|
+
## [0.7.0] - 2026-12-04
|
|
187
|
+
|
|
188
|
+
Hardening of the inbound path, proposed in #14 by a gateway forwarder that carries mail between machines (Izakaya, not yet public). Two changes need action on upgrade: a transport that calls `receive` must pass `--via <label>` (or `--local`), and a config that turns on `subagent.enabled` must also allow each harness it runs.
|
|
189
|
+
|
|
190
|
+
### Changed
|
|
191
|
+
- `receive` requires `--via <label>` or an explicit `--local`. `invoke` refuses only mail with a recorded origin, so a transport that forgot `--via` delivered mail `invoke` would run; argparse now refuses that call (exit `2`). `--local` delivers with no origin, for a caller on this machine.
|
|
192
|
+
- `subagent.allow_antigravity`, `subagent.allow_claude` and `subagent.allow_codex` default to `false`, so turning on `subagent.enabled` alone starts nothing. A config with `subagent.enabled: true` that relied on the old defaults needs `amail config set subagent.allow_<harness> true` for each harness it runs; the refusal names the key.
|
|
193
|
+
- `receive` and `post` refuse inbound frontmatter that two parsers could read differently: `id`, `from`, `to` or `reply_to` written twice or with text around the key (` from:`, `from :`), and any carriage return without a line feed, vertical tab, form feed, U+001C–U+001E, U+0085, U+2028 or U+2029 in a header line.
|
|
194
|
+
|
|
195
|
+
### Added
|
|
196
|
+
- `receive --expected-from-node <node>` refuses a message whose `from` names another node, so a transport can bind the sender to the peer it authenticated.
|
|
197
|
+
- `docs/RECEIVE-CONTRACT.md` says how a program on Windows calls `receive` (Python with the script path, `PYTHONUTF8=1`).
|
|
198
|
+
|
|
199
|
+
## [0.6.1] - 2026-12-04
|
|
200
|
+
|
|
201
|
+
### Changed
|
|
202
|
+
- `whoami` tells Antigravity's three apps apart, so a handoff between them on one repo reaches only the app it names. The nearest Antigravity executable's path sets the UI: anything inside the IDE's install (`Antigravity.app` on macOS, `%LOCALAPPDATA%\Programs\antigravity\` on Windows) gives `desktop.antigravity/<repo>` (the IDE, in line with `desktop.claude` and `desktop.codex`), the `agy` inside `Gemini.app` gives `gemini.antigravity/<repo>`, and any other `agy` gives `cli.antigravity/<repo>`, the sender `amail invoke` runs reply as. `whoami` reads the path from the parent processes, or from `ANTIGRAVITY_AGENTAPI_EXE` inside Antigravity's sandbox, where `ps` is blocked. On Windows, where `whoami` does not walk parent processes, only `ANTIGRAVITY_AGENTAPI_EXE` sets the UI; on Linux the IDE keeps `gemini.antigravity`. An enclosing control plane still sets the UI for any harness, while a harness's own app (Claude.app, Codex.app, Antigravity's apps) sets it only for that harness: Claude Code in the Antigravity IDE's terminal stays `cli.claude`, and an `agy` started by Claude Desktop is `cli.antigravity`, not `desktop.antigravity`. Mail addressed to `gemini.antigravity` for the IDE is hidden from it; resend it to `desktop.antigravity` or bare `antigravity`.
|
|
203
|
+
|
|
204
|
+
## [0.6.0] - 2026-12-03
|
|
205
|
+
|
|
206
|
+
### Added
|
|
207
|
+
- **Relays**: modules that carry mail between the bus and a transport a-mail does not run itself, so users can add their own. Each lives in `relays/<name>/` (built-in) or `~/.a-mail/relays/<name>/` (user): a `relay.json` manifest, an optional adapter executable, carrier instructions and a sender skill. See [docs/RELAYS.md](docs/RELAYS.md).
|
|
208
|
+
- `amail post --via <relay> --request <json-file>` and the MCP tool `amail_post` run the relay's adapter (JSON request on stdin, one message on stdout); carriers pass transport text this way so it never reaches a shell. `--param`, `--attachment` and `--file` serve trusted input. `post` then enforces the rules no relay can change: the sender and any `reply_to` on the relay's nodes, a canonical local recipient, a plain-token `id`, `via` provenance, the 64 KiB limit, and once-only delivery through a `state/posting/<id>` claim. It adds `created_at`, `thread_id` and `thread_name` when absent, so relay mail threads like local mail.
|
|
209
|
+
- `amail relays [--json]` and the MCP tool `amail_relays` list built-in and user relays, their state and their carrier instructions, reading manifests only. A relay that claims this machine's node is skipped.
|
|
210
|
+
- `relays.<name>.enabled` config keys. Built-in relays default from their manifest; a user relay is off until the user turns it on. `install.sh` shows each relay's explanation and asks; `--enable-relay` / `--disable-relay <name>` decide without asking.
|
|
211
|
+
- `SKILL.md` Workflow 2 starts by carrying every enabled agent-carried relay whose tools the agent has.
|
|
212
|
+
- **Gmail Relay** (`relays/gmail/`), the reference relay: chat sessions on the web or a phone (ChatGPT, Claude, Gemini) send to code sessions through the user's Gmail drafts, written and read only by each app's official Gmail connector. a-mail stores no Google credential. On by default. Its chat skill, `a-mail-relay`, gives chats a closed table of addresses to infer from plain words and takes `To` from the connected Gmail account; drafts carry `relay_skill: 1`, and the adapter rejects other formats with an update message.
|
|
213
|
+
- `/a-mail setup [<relay>]` (`SKILL.md` Workflow 5): the coding agent adds a relay's chat skill to the user's chat apps, following the relay's `sender.setup` instructions. `amail relays package <relay>` builds the skill as a ZIP and a `SKILL.md` under `~/.a-mail/chat-skills/`; `install.sh` builds it and points to `/a-mail setup`.
|
|
214
|
+
- `chat` is a UI prefix, so `chat.claude@cloud` resolves to harness `claude`.
|
|
215
|
+
|
|
216
|
+
### Changed
|
|
217
|
+
- `send`, `reply`, the MCP `amail_send` / `amail_reply` tools and invoke's auto-reply refuse any recipient on a node owned by an inbound-only relay (`@cloud` for the Gmail Relay): those senders cannot receive mail. Relay nodes are reserved as node names.
|
|
218
|
+
- `receive`'s validation and write are shared with `post`. Provenance (`via`) is recorded before the message is written, and `state/origins.json` and `state/undeliverable.json` are updated under a lock, so concurrent deliveries no longer drop entries. An inbound `id` that already belongs to a message with other provenance is rejected instead of reported as a duplicate.
|
|
219
|
+
- The README opens with Getting Started, a short Addressing table and a minimal Invoking a Subagent section, followed by two reference blocks: Policy, then Architecture & Mechanics.
|
|
220
|
+
|
|
221
|
+
### Fixed
|
|
222
|
+
- `docs/RECEIVE-CONTRACT.md` puts `--home` before the verb, where `amail` accepts it.
|
|
223
|
+
- The README and `docs/SUBAGENT-POLICY.md` name the headless form a-mail runs `agy` in: stream-json on stdin, which takes no `-p` flag, and why `-p "<brief>"` is not used (#11).
|
|
224
|
+
|
|
225
|
+
## [0.5.0] - 2026-12-03
|
|
226
|
+
|
|
227
|
+
### Added / Changed
|
|
228
|
+
- **Opt-in local headless subagent invocation (`amail invoke`, `amail send --invoke`, MCP `amail_invoke` / `amail_send(invoke=true)`)**:
|
|
229
|
+
- Disabled by default (`subagent.enabled: false`) so `a-mail` stays passive out of the box; passive watchers (`bin/amail-notify.sh`), `SessionStart` hooks (`amail hook-check`), and inbound gateways (`amail receive`) never spawn harnesses.
|
|
230
|
+
- Runs the official local CLIs — **Antigravity (`agy -p`)**, **Claude Code (`claude -p`)**, and **Codex (`codex exec`)** — each independently toggleable via `subagent.allow_antigravity`, `subagent.allow_claude`, and `subagent.allow_codex` (plus `subagent.timeout`, `subagent.*_bin`, and `subagent.*_model`).
|
|
231
|
+
- Pipes the full scoped task brief (sender `## Coda` stripped) over UTF-8 `stdin` with clean EOF while keeping `argv` strictly constant ASCII and validated flags (`--model`), preventing Windows `.cmd`/`.bat` newline truncation, BatBadBut (`CVE-2024-24576`) metacharacter injection, and the Windows 32 KiB command-line limit.
|
|
232
|
+
- Defaults to read-only execution (`codex --sandbox read-only`, `claude --permission-mode plan`, `agy` read-only prompt constraints; never passes `--dangerously-skip-permissions` or `--sandbox danger-full-access`), inspects `denied_actions` / `permission_denials` even on `SUCCESS`, enforces recursion guards (`AMAIL_NO_INVOKE=1`, `AMAIL_SUBAGENT_DEPTH`), refuses remote `@<node>` or gateway `via` mail, restricts `invoke` to unread `inbox/` messages and asks the calling agent to confirm human approval (`--approved` / `human_approved: true`) for mail it did not send (a guardrail for cooperating agents, not an authentication boundary: `from` is self-asserted), keeps `--no-reply` messages in `inbox/`, and surfaces sent metadata + `invocation_error` (exit code `7` on CLI) if `send --invoke` writes a message whose invocation then fails.
|
|
233
|
+
- Added [docs/SUBAGENT-POLICY.md](docs/SUBAGENT-POLICY.md) and a README explainer quoting the cited vendor pages for Google Antigravity, Anthropic Claude Code, and OpenAI Codex CLI.
|
|
234
|
+
- The policy states the three rules the vendors' terms share (vendor harness only, no direct inference from a subscription, credentials stay in the vendor's client), why the project agrees with each, and how `a-mail` keeps it.
|
|
235
|
+
- Stops the runner's whole process tree (SIGTERM, then SIGKILL after 2 s) on timeout, Ctrl-C, or SIGTERM/SIGHUP to a-mail itself, using its own process group (`killpg` on POSIX, `taskkill /T /F` on Windows). The agent that an npm launcher or `.cmd` shim starts cannot outlive a timeout, and stopping `amail mcp` cannot orphan it.
|
|
236
|
+
- If a run succeeds but its reply cannot be posted (or the original cannot be archived), returns the response with `post_error` and exits `8` rather than losing it.
|
|
237
|
+
- `--approved` has no `--force` alias, and model IDs may not start with `-`.
|
|
238
|
+
- `agy` receives the brief as one stream-json user turn on stdin (`--input-format stream-json --output-format stream-json`), and a-mail reads status, text and usage (including `thinking_tokens` and `cache_read_tokens`) from the final `result` event. `agy` print mode ignores plain piped stdin, so the earlier plain-text hand-off ran Antigravity with no task. The test mocks now behave like the real `agy` so this cannot pass silently again.
|
|
239
|
+
- `claude -p` runs with `--strict-mcp-config` and no `--mcp-config`, so the subagent starts none of the user's MCP servers. A read-only run sets `AMAIL_READ_ONLY=1`, which the runner and everything it starts inherit; with it set, `amail` (CLI and MCP) refuses every bus or config change and still serves reads. That covers an `amail mcp` the runner starts as one of the user's MCP servers, which `agy` always does, because `agy` has no flag that turns MCP servers off.
|
|
240
|
+
- Claude Code runs report thinking tokens (`output_tokens_details.thinking_tokens`) and count cache writes and reads in the Coda token total. Cache writes get their own Coda item (`cache writes`), so the listed parts add up to the total; a plain send's Coda is unchanged.
|
|
241
|
+
- The `codex` runner was checked end to end with codex-cli 0.173.0 (ChatGPT free plan, macOS).
|
|
242
|
+
- `codex exec` runs with `--skip-git-repo-check` in read-only mode only, so a read-only run works outside a Git repository; `workspace-write` keeps Codex's check.
|
|
243
|
+
- The Codex policy cites only sources checked against the `openai/codex` repository and says plainly that OpenAI does not explicitly address third-party tools under a ChatGPT plan.
|
|
244
|
+
- **Background runs, bounded waits, and retry-safe sends** (following T3 Code's `delegate_task` / `t3_thread_wait` conventions):
|
|
245
|
+
- `amail invoke --background` and `amail send --invoke --background` start the run in a detached worker and return at once. MCP `amail_invoke` and `amail_send(invoke=true)` always do; `mode: "wait"` then waits up to `timeout_ms` (default 30 s, max 45 s) and returns the result or `status: "running"` with a `next` hint. The result's `call_mode` echoes `async` or `wait`; its `mode` stays the run's process mode (`background`).
|
|
246
|
+
- Every run is recorded in `state/invocations/<id>.json`. New `amail invocation <id> [--stop]` and MCP `amail_invocation` show a run or stop a background one; a second run on the same message is refused while one is alive; a run whose worker died is marked `failed` and its message returned to `inbox/`. Stop confirms the PID is that run's worker before signalling it.
|
|
247
|
+
- New MCP `amail_wait` (30 s default, 45 s max, `next` hint on timeout). `amail wait` / `amail_wait` also wake with `invocation_failed` (CLI exit `7`) when a run on the target failed or was stopped and the message is back in `inbox/`, and with `invocation_finished` for `--no-reply` runs.
|
|
248
|
+
- `request_id` on MCP `amail_send` and `--request-id` on `amail send`: a repeat with the same sender and key returns the first message with `deduplicated: true` and never sends or invokes again (keys kept 7 days).
|
|
249
|
+
- MCP tools carry `annotations` (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`).
|
|
250
|
+
- **T3 Code**: `install.sh` registers `amail mcp` in T3 Code's `mcpServers` (`~/.t3/userdata/settings.json`, only if that folder exists) with `AMAIL_UI=t3`, and `uninstall.sh` removes it. The README explains when to use a-mail rather than T3 Code's own delegation, and a-mail's file-based threads as a way to move work between apps.
|
|
251
|
+
- **Project promise relaxed**: `a-mail` is now "passive by default" rather than "strictly passive"; `AGENTS.md`, `CONTRIBUTING.md`, `SECURITY.md`, and `SKILL.md` describe the opt-in exception.
|
|
252
|
+
|
|
253
|
+
### Fixed
|
|
254
|
+
- **`install.sh` and `uninstall.sh` on Windows (Git Bash)**:
|
|
255
|
+
- Python is found through `py -3` or `python` when there is no `python3` (and a Store `python3` stub is passed over); the installer says so when none is 3.9 or newer, where it used to exit silently.
|
|
256
|
+
- The launcher no longer calls `os.fchmod`, which Windows lacks before Python 3.13, and an `amail.cmd` is written beside the sh launcher for `cmd.exe` and PowerShell.
|
|
257
|
+
- Paths written into hooks, MCP entries and launchers are Windows paths (`C:/...`), found with Git Bash's own `pwd -W` rather than a `cygpath` that may come earlier on `PATH`.
|
|
258
|
+
- The Claude Code and Antigravity MCP entries name Python and the CLI script (new `amail_json_cfg.py set-mcp --script`), since a Windows harness cannot start the sh launcher.
|
|
259
|
+
- `SKILL.md` is linked with a native symbolic link where Windows allows one and copied otherwise; a current copy is left alone on a second run, and `uninstall.sh` removes copies as well as links.
|
|
260
|
+
- `.gitattributes` keeps the shell scripts and Python entry points in LF, so a checkout with `core.autocrlf` still runs.
|
|
261
|
+
- Tests: `tests/test_install_windows.sh` (Windows, Git Bash; to be added to CI on `windows-latest`) and `tests/test_json_cfg.py`.
|
|
262
|
+
|
|
263
|
+
## [0.4.0] - 2026-12-02
|
|
264
|
+
|
|
265
|
+
### Added / Changed
|
|
266
|
+
- **Optional `rsvp` header (`yes` | `optional` | `no`)**:
|
|
267
|
+
- Added `--rsvp` to CLI `amail send` and `amail reply` (plus `--requested-model` on CLI `amail reply`) and `rsvp` to MCP `amail_send` and `amail_reply`.
|
|
268
|
+
- Surfaced `rsvp` in `amail read`, `amail check`, `amail list --json`, `amail hook-check` (`[rsvp:<val>]`), and `docs/RECEIVE-CONTRACT.md` so senders can explicitly declare whether a reply is expected (`yes`), optional (`optional`), or not needed / closing the thread (`no`).
|
|
269
|
+
- **Thread closure (`amail close` / MCP `amail_close`), retraction (`amail retract` / `unsend` / MCP `amail_retract`), and passive condition waits (`amail wait`)**:
|
|
270
|
+
- Added `amail close <target> [--status completed|rejected] [--note "..."]` (CLI) and `amail_close` (MCP) to close an active thread without sending a reply a-mail, recording an optional `close_note` in frontmatter and triggering any local waiting sender (refuses to re-close already-archived messages).
|
|
271
|
+
- Added `amail retract <target> [--from <self>] [--reason "..."] [--force]` (with CLI alias `amail unsend`) and MCP `amail_retract` to pull back an unread `inbox/` or unsent `outbox/` message sent by the caller (verifies caller matches `from` unless `--force`, archives atomically with `status: retracted` and rollback on publish failure, refuses inbound gateway mail or messages already in `processing/` or `archive/`; outbox retraction cannot undo a remote forward already in flight).
|
|
272
|
+
- Added passive `amail wait <target> [--until done|closed|reply] [--timeout 7200] [--interval 2] [--json]` so a sender can dispatch a non-blocking background condition wait after sending and wake reactively with a header-only summary (never printing untrusted reply bodies) when the receiver closes locally or replies (exit `0` closed/replied, `5` on timeout, `6` if retracted).
|
|
273
|
+
- **Hand-delivered bus discipline in `SKILL.md` and MCP descriptions**:
|
|
274
|
+
- Documented that every a-mail is hand-delivered by the user: discouraged 1-line acknowledgements, pointer pings (`"fixes pushed"`, `"ready for review"`), and foreground blocking/polling.
|
|
275
|
+
- Updated Workflow 1 & 3 so senders can optionally dispatch background `amail wait`, and receivers close without replying (`amail close` / `amail_close`) when the deliverable lives on a PR, commit, or disk (or when `rsvp: no`).
|
|
276
|
+
- **Repository agent guide (`AGENTS.md` / `CLAUDE.md`)**:
|
|
277
|
+
- Documented core engineering invariants, shared-checkout snapshot testing hygiene, PR-first vs a-mail channel conventions, and verification commands.
|
|
278
|
+
|
|
279
|
+
## [0.3.0] - 2026-12-02
|
|
280
|
+
|
|
281
|
+
### Added / Changed
|
|
282
|
+
- **Unified `<ui>.<harness>/<scope>` identity & automatic disambiguation (`amail whoami` & MCP `amail_whoami`)**:
|
|
283
|
+
- Every session now resolves to a symmetric `<ui>.<harness>/<scope>` address so installed apps and control planes never collide: `gemini.antigravity/<repo>` (Antigravity IDE / Gemini app), `desktop.claude/<repo>` (Claude Desktop), `cli.claude/<repo>` (Claude Code CLI), `t3.claude/<repo>` / `t3.antigravity/<repo>` (T3 Code), `cursor.<harness>/<repo>`, `windsurf.<harness>/<repo>`, `conductor.<harness>/<repo>`, etc.
|
|
284
|
+
- All UIs for a harness share `~/.a-mail/inbox/<harness>/` with `<ui>.` scoping (zero extra agents to register; LaunchAgent `WatchPaths` and gateway `amail receive` work out of the box).
|
|
285
|
+
- Long repository directory names (> 32 chars) are truncated to 23 chars and suffixed with an 8-char SHA-256 hash (`<prefix>-<8hex>`, max 32 chars) so repos sharing a long prefix never collide while preserving existing <= 32-char scopes.
|
|
286
|
+
- **Strict local recipient validation in MCP `amail_send` and `amail_reply`**: throws for unresolvable local recipients instead of delivering into an inbox no session reads. Recipients must resolve to `[<ui>.]<harness>` with a default or registered harness, with the requested model carried in the `requested_model` header (rejecting `<harness>.<model>`, unexpanded harness aliases like `agy.opus`, bare UIs like `t3`, and unknown harnesses; remote `@<node>` recipients are not checked locally).
|
|
287
|
+
- Added CLI `amail whoami [--provider <harness>] [--ui <ui>] [--cwd <dir>] [--json]` sharing the same identity resolver as MCP `amail_whoami`, while ignoring ambiguous server-wide env vars like `CLAUDE_AGENT_SDK_VERSION` under control planes.
|
|
288
|
+
- CLI `amail check`, `amail send`, and `amail reply` now automatically fall back to `whoami` when `agent` / `--from` is omitted, matching MCP's zero-arg ergonomics.
|
|
289
|
+
- Changed `install.sh` / `bin/amail_json_cfg.py` MCP config entries from `AMAIL_AGENT` to soft fallback `AMAIL_DEFAULT_AGENT` so importing another harness's MCP config never masks the active client; explicit `AMAIL_AGENT` still takes top priority.
|
|
290
|
+
- **Auto-expand omitted recipient `/<scope>` on `send`**: when sending from a scoped `<self>` (e.g., `gemini.antigravity/a-mail`) to a recipient without `/<scope>` (e.g., `t3.antigravity` or `claude@gpu-box`), `amail send` and MCP `amail_send` automatically inherit the sender's project scope (`t3.antigravity/a-mail`, `claude/a-mail@gpu-box`); pass `--broadcast` / `broadcast: true` to opt out (inherited `reply` targets keep the parent's exact address).
|
|
291
|
+
- **Model, harness & UI recipient aliases + `requested_model` header (`amail aliases`)**: built-in aliases (`Opus`, `Sonnet`, `Haiku`, `Fable`, `Neon`, `Gemini`, `GPT`, `o3`, `agy`, `cc`, `t3code`) and custom `config.json["aliases"]` expand automatically on `send` (including dotted forms like `t3.agy`, `t3.opus`, `desktop.opus`, `gemini.agy`, `t3code.agy`) and populate `requested_model` in message frontmatter, `read`, `check`, and `list --json`.
|
|
292
|
+
- **Configurable routing preferences (`amail config`) & cross-inbox hints**:
|
|
293
|
+
- Added `amail config [get|set|reset <key> [value]]` managing `config.json` preferences with reasonable defaults: `routing.inherit_scope` (`true`), `routing.inherit_ui` (`false` = explicit `t3.`/`desktop.`/`gemini.` prefix; set `true` to inherit `<ui>.` automatically with `--any-ui` / `any_ui: true` opt-out), `routing.receive_unqualified_ui` (`true` = UI-unqualified mail like `/a-mail Opus` is visible to any UI for that harness while other UIs stay hidden; set `false` for strict UI-only checking), `routing.hint_unqualified_inbox` (`true` = surface `also_unread` hints when `receive_unqualified_ui=false`), and `routing.confirm_local_send` (`false` = send local a-mail immediately on user request; cross-node/guest always confirms).
|
|
294
|
+
- Updated `amail hook-check` to auto-disambiguate bare harnesses with their detected `<ui>.<harness>/<repo>`.
|
|
295
|
+
- Added **Workflow 4: Configure Preferences & Aliases** (`/a-mail config`) to `SKILL.md`.
|
|
296
|
+
- **Interactive multiple-choice approval dialogs & natural-language handoffs in `SKILL.md` and MCP**:
|
|
297
|
+
- Instruct agents to present native multiple-choice confirmation dialogs (`ask_question` / `AskUserQuestion` — e.g. Endorse & execute / Archive / Reject / Leave unread) instead of asking users to type `Yes <thread_name>`, with plain-text confirmation only as a fallback when no dialog tool exists.
|
|
298
|
+
- Enriched `SKILL.md` frontmatter/routing and MCP `amail_send` / `amail_check` descriptions so natural delegation phrases (e.g. `"Have Neon review this document"`, `"Ask Opus to do it"`, `"did Opus reply?"`) automatically trigger `a-mail` handoffs and inbox checks.
|
|
299
|
+
|
|
300
|
+
## [0.2.0] - 2026-12-01
|
|
301
|
+
|
|
302
|
+
### Breaking Changes
|
|
303
|
+
- **`amail receive` exit codes**: Exit codes now distinguish permanent rejection (`1`), bad CLI arguments (`2`), temporary I/O failures safe to retry (`3`, single-line stderr with no traceback), and oversized messages (`4`, > 64 KiB).
|
|
304
|
+
- **`amail receive` default node check**: `receive` now expects `to`'s `@<node>` to match the local node by default (previously accepted any `@<node>` unless `--expected-node` was passed). Pass `--any-node` to explicitly bypass the node check.
|
|
305
|
+
- **`amail receive` registered agent guard**: `receive` now refuses inbound mail addressed to agents not registered in `config.json` (exit `1`, without creating `inbox/<agent>/`), unless `--allow-unregistered` is passed.
|
|
306
|
+
- **64 KiB message ceiling**: Both `amail send` and `amail receive` now refuse messages exceeding `65536` UTF-8 bytes with exit code `4`.
|
|
307
|
+
|
|
308
|
+
### Added / Changed
|
|
309
|
+
- **Origin provenance (`--via <label>`)**: `amail receive --via <label>` stores transport origin in `state/origins.json` while keeping the `.md` file untouched byte-for-byte; surfaced in `list --json`, `read`, `check`, `hook-check`, and MCP tools.
|
|
310
|
+
- **Outbox & `undeliverable` contract**: `amail list --state outbox --json` now includes `target_node`, `via`, and `size`; `amail move <id> archive --status undeliverable --reason "..."` archives failed outbound mail with `undeliverable_reason` and surfaces the failure once to the original sender on their next `check` (and non-destructively in `hook-check`).
|
|
311
|
+
- **Trust-boundary prompts in `SKILL.md`**: Approval summaries now show `Origin` (`local` vs `via gateway:...` / `via guest:...`), and outbound workflows warn the user in plain words before sending mail to another node or an external guest.
|
|
312
|
+
- **ID-only duplicate detection** in `amail receive`: matches exact frontmatter `id` only (never `thread_name` or filename) and treats multiple existing matches as a duplicate.
|
|
313
|
+
- **Canonical `<harness>[.<model>][/<project>][@<node>]` addressing**: `.<model>` is now treated like a scope within `inbox/<harness>/` (`<harness>` owns the inbox and is what `receive` checks against `config.json`; `agents add` refuses dotted names to prevent ambiguity; `check <harness>` sees all mail while `check <harness>.<model>` filters to unqualified + matching model).
|
|
314
|
+
- **Unconditional `from` validation & filename sanitization** in `amail receive`: always validates `from` and derives inbox filenames from validated frontmatter regardless of `--file` source.
|
|
315
|
+
- **Windows / UTF-8 BOM support**: strip leading `U+FEFF` before parsing in `receive`, message reads, `config.json`, `amail_json_cfg.py`, and `amail-notify.sh`; added `windows-latest` to GitHub Actions CI.
|
|
316
|
+
- **Normalized `amail node --json` source field**: reports `"env"`, `"config"`, or `"hostname"`.
|
|
317
|
+
- Added `--version` flag to `amail` and `docs/RECEIVE-CONTRACT.md`.
|
|
318
|
+
|
|
319
|
+
## [0.1.0] - 2026-12-01
|
|
320
|
+
|
|
321
|
+
- Initial release: local-first `~/.a-mail/` bus, zero-dependency Python 3.9+ CLI (`bin/amail`), stdio MCP server (`bin/amail_mcp.py`) with auto self-identification, passive macOS `launchd` notifier (`bin/amail-notify.sh`), universal `SKILL.md`, Tier 2 `SessionStart` hooks, Coda telemetry, and `install.sh` / `uninstall.sh`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kelvin Nishikawa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|