Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "animus-mailbox",
"description": "Add-ons that let Animus, the voice assistant on your Mac, talk with the coding agents on the same machine.",
"owner": {
"name": "CodeCampusCo"
},
"plugins": [
{
"name": "animus-mailbox",
"source": "./",
"description": "Lets animus, the voice assistant on your Mac, hear from and speak to Claude Code sessions."
"description": "Lets Animus, the voice assistant on your Mac, hear from and speak to Claude Code sessions."
}
]
}
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "animus-mailbox",
"description": "Lets animus, the voice assistant on your Mac, hear from and speak to this Claude Code session.",
"description": "Lets Animus, the voice assistant on your Mac, hear from and speak to this Claude Code session.",
"version": "0.2.0",
"author": {
"name": "CodeCampusCo"
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Requests a review from the owner on every pull request.
* @parintorns
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Something the plugin does wrong
labels: bug
---

## What happened

<!-- What you did, what you expected, and what happened instead. -->

## Environment

- Claude Code version (`claude --version`):
- Plugin version (in `/plugin`):
- OS and version:
- `python3 --version`:

## Files

<!-- The relevant mailbox files (outbox, inbox, status, state.json) or pointer, with anything private removed. -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/CodeCampusCo/animus-mailbox/security/advisories/new
about: Please report vulnerabilities privately, not as a public issue.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Something the plugin should do, or an agent it should support
labels: enhancement
---

## The problem

<!-- What you are trying to do, and what gets in the way today. -->

## What you would like

<!-- For a change to the file format, say what an agent could then do that it cannot now. -->
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## What and why

<!-- What changes, and what problem it solves. If a measurement drove it, give the number. -->

## Checks

- [ ] `python3 -m unittest discover -s tests` passes
- [ ] `claude plugin validate --strict .` passes, if a manifest or the skill changed
- [ ] Tests added or updated for changes in `scripts/mailbox.py`
- [ ] Tried in a real session with `claude --plugin-dir .`, if hooks, the monitor or the skill changed
- [ ] README or `docs/agent-mailbox.md` updated, if what a user or an agent sees changed
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,32 @@ permissions:

jobs:
test:
name: test
runs-on: ubuntu-latest
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Unit tests
run: python3 -m unittest discover -s tests

validate:
name: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: lts/*
- name: Install Claude Code
run: npm install -g @anthropic-ai/claude-code
- name: Marketplace, plugin and skill manifests
run: |
claude plugin validate --strict .
claude plugin validate --strict .claude-plugin/plugin.json
claude plugin validate --strict skills
85 changes: 85 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at parintorns@gmail.com. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing

## Scope

Contributions to animus-mailbox are welcome: fixes and improvements to the Claude Code plugin, an
add-on for another agent, and changes to [`docs/agent-mailbox.md`](docs/agent-mailbox.md). For
anything larger than a fix, open an issue first.

## How changes land

1. Fork (or branch), make the change, and open a pull request against `main`.
2. CI must pass: the unit tests on Linux and macOS, and `claude plugin validate --strict` on the
marketplace, plugin and skill manifests.
3. Every review conversation must be resolved before the pull request can merge.

## Working on it

```sh
python3 -m unittest discover -s tests
claude plugin validate --strict .
claude --plugin-dir .
```

The last line starts a Claude Code session with the plugin from this folder instead of the
installed one.

- `scripts/mailbox.py` does all the work; `hooks/hooks.json`, `monitors/monitors.json` and the
skill in `skills/animus-mailbox/` call it. It uses the Python standard library only; keep it so.
- A hook must never fail the session: errors go to stderr and the exit code stays 0.
- Add or update tests in `tests/test_mailbox.py` with any change to the script. Tests set
`ANIMUS_AGENTS_DIR` to a temporary folder, so they never touch the real `~/.agent-mailbox`.
- Bump `version` in `.claude-plugin/plugin.json` when a change should reach installed copies.

## Commits

Short subjects, in the imperative or as a statement of the result. Use the body to explain why; if
a measurement drove the change, put the number in the message.

## Conduct

This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Parintorn Sukhowatanakit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
78 changes: 68 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,85 @@
# animus-mailbox

A Claude Code plugin that connects every session to [animus](https://github.com/CodeCampusCo/animus),
the voice assistant on your Mac. A session can tell animus news, a finished result or a question;
while it waits on you, it asks animus to speak up; and animus can send it your words, which the
session reads as outside input, not your command, and answers at once. It keeps a one-word status
(idle, working, waiting) so animus can say whether a message was delivered and whether the
session is busy. The file format both sides share is animus's `docs/agent-mailbox.md`.
Add-ons that let Animus, the voice assistant on your
Mac, talk with the coding agents on the same machine. This is for people who already run Animus.
For now it holds one add-on, a plugin for [Claude Code](https://docs.claude.com/en/docs/claude-code).

With the plugin, every Claude Code session gets a mailbox that Animus reads and writes:

- A session can tell Animus news, a finished result or a question, and Animus says it to you.
- When a session waits on you (a permission, a question) and you have not answered for a while
(10 minutes unless you say otherwise), Animus speaks up. Once you answer at the terminal, the
message is taken back.
- When a long turn finishes, the session leaves a short note that Animus tells you when you ask
what is waiting.
- You can speak to a session through Animus. The session reads your words as outside input, not
as a command typed at its terminal, decides for itself whether to act, and answers at once.
- Each session keeps a one-word status (idle, working, waiting), so Animus can say whether a
message was delivered and whether the session is busy.

The file format both sides share is [`docs/agent-mailbox.md`](docs/agent-mailbox.md). Any other agent
can follow it by hand.

## Install

The repository is private for now, so installing needs read access to it.
Needs Animus, Claude Code, and `python3` on the `PATH`. In Claude Code:

```
/plugin marketplace add CodeCampusCo/animus-mailbox
/plugin install animus-mailbox@animus-mailbox
```

Choose user scope when asked, so every session on the machine is connected. It needs `python3` on
the `PATH`. The hooks and the inbox monitor start when a session starts or resumes; a session that was already
running picks them up once it is resumed (`/reload-plugins` does not rerun the start hook).
Choose user scope when asked, so every session on the machine is connected. The hooks and the inbox
monitor start when a session starts or resumes; a session that was already running picks them up
once it is resumed (`/reload-plugins` does not rerun the start hook).

To check: start a new session and ask it to tell you something through Animus.

## Use

Speak to Animus as usual; it knows each session by a name like `animus-mailbox-5f` (the project
folder and the start of the session id). In a session you can also ask Claude to:

- tell you something through Animus,
- change how long Animus waits before speaking up about this session ("use 20 minutes"),
- rename the session for Animus ("call yourself api").

## What it writes and reads

- `~/.agent-mailbox/claude-<name>.json`, one per session: the session's name, its mailbox path, its
working directory and its process id, so Animus can find it. Set `ANIMUS_AGENTS_DIR` to use
another folder; it must be the same one Animus reads.
- The session's mailbox, inside the plugin's data folder: `inbox/` (from Animus), `outbox/` (to
Animus), `status`, and the plugin's own state and settings.
- When a long turn finishes, the first line of the session's last reply (up to 150 characters),
read from the session transcript, goes into the note for Animus.

A session's mailbox and pointer are removed when the session ends, and those of sessions whose
process is gone are removed when the next session starts. Nothing leaves the machine through this
plugin; what Animus does with a message is Animus's part.

## Uninstall

```
/plugin uninstall animus-mailbox@animus-mailbox
/plugin marketplace remove animus-mailbox
```

Then delete any `~/.agent-mailbox/claude-*.json` left by sessions that were running.

## Development

```sh
python3 -m unittest discover -s tests
```

To try a change without installing it, start Claude Code with `claude --plugin-dir .` from this
folder. The Claude Code side is `scripts/mailbox.py`; the hooks, the monitor and the skill in
`hooks/`, `monitors/` and `skills/` call it.

Contributions are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). Report security issues as
described in [SECURITY.md](SECURITY.md).

## License

[MIT](LICENSE)
33 changes: 33 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Security

## Reporting

Report vulnerabilities privately through GitHub's **Report a vulnerability** button under the
Security tab (private vulnerability reporting). Please do not open a public issue for anything
exploitable.

This is a personal project maintained in spare time. There is no SLA; expect a reply in days,
not hours, and no guaranteed fix timeline.

## What this plugin touches

Worth knowing when judging impact:

- **Every Claude Code session.** Its hooks run `python3 scripts/mailbox.py` on session start and
end, on each prompt, after each tool, when the session waits on you, and when a turn ends. A
hook never fails the session: errors go to stderr.
- **Text from outside reaches the agent.** A file in a session's inbox is announced to the session,
which reads it. The skill tells the agent that it is external data, not your command, and that
instructions at the terminal outrank it, but nothing deterministic stops a message from making the
agent act: Claude Code's own permission mode applies. Anything running as your user can write to
the inbox, so treat prompt injection through a message as in scope.
- **The end of a turn.** When a message from Animus has had no answer, the Stop hook blocks the
turn from ending once, asking the agent to answer.
- **Local files.** Pointers in `~/.agent-mailbox` (or `ANIMUS_AGENTS_DIR`, created `0700`) hold each
session's name, mailbox path, working directory and process id. Mailboxes live in the plugin's
data folder. The Stop hook reads the session transcript for the first line of the last reply.
- **No network.** The plugin opens no connections; Animus is the only reader of what it writes.

## Supported versions

Only the latest commit on `main`.
Loading
Loading