Plugins
A plugin adds gated reads of a local app, such as Mail or Things 3. Each read is a tool, so an agent runs it behind the same Touch ID prompt and audit log as a secret read. A plugin returns data and never acts for the caller: there is no tool that sends, adds, writes or pushes.
passbox plugin add mail # first-party, bundled in the binary
passbox plugin list # installed plugins and their tools
passbox plugin mail recent --count 5 # run a tool, approved and audited
passbox plugin remove mailThe same tools appear over MCP as mail.recent, mail.search and so on, so an agent calls them through the server. Every call prompts, unless a window you set covers it. The broker approves and audits, and the caller runs the command, so the command keeps your GUI session. A value is passed as a whole argument to the command, never spliced into a script, so it cannot become code.
First-party plugins:
| Plugin | Needs | Tools |
|---|---|---|
mail | Mail.app, nothing to install | recent in the Inbox, search in every mailbox |
calendar | the icalBuddy CLI | today, agenda |
things3 | the things CLI | inbox, today, search, and for jobs that parse JSON today_json, inbox_json, search_json, upcoming, logbook, completed, plus all and trash |
imap | /usr/bin/python3 from the Command Line Tools, an account entry in the store | recent, search, read, attachments |
mail drives Mail through osascript, which ships with macOS. The first read raises the macOS automation prompt for Mail once.
calendar and things3 shell out to a CLI, so each has to be installed:
brew install ical-buddy # calendar
brew install ossianhempel/tap/things3-cli # things3calendar uses icalBuddy rather than raw AppleScript, because AppleScript reports a recurring event's series start instead of the occurrence date.
A remote calendar call runs icalBuddy inside the broker, so the first one shows a one-time macOS prompt asking to allow passbox to access your calendars. Allow it, or the call returns "No calendars". The grant is tied to the binary's signature. The release binary is signed with a Developer ID, so macOS keeps the grant across upgrades, and asks once more on the first signed release. A source build is ad hoc signed and may ask again after every rebuild.
imap reads any IMAP server, such as Proton Mail through Bridge. It is one Python 3 script that uses only the standard library. Its account is one store entry, mail/imap. The broker writes it to the script's stdin, so the password is never a parameter, an argument, an environment variable or a file, and it never leaves the broker:
passbox add mail/imap --field host --field port --field user --field tls --field fingerprint
passbox plugin add imap
passbox plugin imap recent --count 5 # id | date | from | subject
passbox plugin imap search --query invoice
passbox plugin imap read --id 4021
passbox plugin imap attachments --id 4021 > attachments.jsonThe entry's first line is the password, then fields:
bridge-password-here
host: 127.0.0.1
port: 1143
user: [email protected]
tls: starttls
fingerprint: 3a:1f:...:9ctls is starttls or ssl. Left out, it is ssl on port 993 and starttls on any other port, and a missing port is 993 for ssl and 143 for starttls. passbox refuses plain IMAP and verifies certificates against the system roots. A server with a self-signed certificate, such as Bridge, is trusted through one pinned certificate instead: fingerprint is its SHA-256, compared before the password is sent, or cafile is the path to its exported PEM. Every tool takes an optional --mailbox, INBOX by default. attachments returns the message's attachments as one JSON array of name, type, size and base64, up to 10 MB a call, so nothing is written on the Mac and a remote caller gets the bytes itself. Past that limit an attachment is listed with skipped in place of base64. Each name keeps only its base name, so a caller that saves it under that name stays in its own directory.
For Proton Mail, install and sign in to Proton Mail Bridge. Bridge shows the IMAP host, port, user and a Bridge password for the account, which is not your Proton password. Read the certificate fingerprint from Bridge itself:
openssl s_client -starttls imap -connect 127.0.0.1:1143 </dev/null 2>/dev/null \
| openssl x509 -noout -fingerprint -sha256Put those values in the mail/imap entry as above, the fingerprint as openssl prints it or as bare hex. The prompt for each run names mail/imap, and the audit log records it as released. Every run, from the CLI, MCP or a client on the tailnet, happens inside the broker on the Mac, and only the mail comes back. A headless store with PASSBOX_PASSPHRASE has no broker, so there the CLI runs it the same way. The broker runs only the copy bundled in the binary: if the installed imap.py or plugin.toml differs from it, the run is refused before the prompt until you run passbox plugin update imap.
There is no plugin for sending mail, adding a todo, git or gh. A job that sends mail uses its own client and gets the SMTP password from passbox exec, for example passbox exec --env SMTP_PASSWORD=mail/smtp -- ./send-report. An agent runs git and gh itself, so a plugin for them gated nothing. Gate git through the SSH agent, which prompts for every signature, and give gh its token for one command with passbox exec --env GH_TOKEN=github/token -- gh pr create.
A tool whose command is missing is refused before it prompts, with the install line above.
Write your own plugin as a directory with a plugin.toml, then passbox plugin add <dir>. A tool declares its params and a run command where {param} is one whole argument. A plugin tool only reads: passbox gives data and never acts for the caller, so do not install a plugin whose tools send, add, write or push.
A tool can also declare limits, checked on every path before any prompt. A value that breaks one is refused with the parameter and the limit named, and an omitted optional is not checked.
[[tool]]
name = "read"
params = ["id", "mailbox?"]
limits = { id = { digits = true }, mailbox = { max_len = 100 } }
run = ["/usr/bin/python3", "-I", "-c", "imap.py", "read", "{id}", "{mailbox}"]| Limit | Allows |
|---|---|
max = 50 | a whole number from 0 to 50 |
max_len = 200 | at most 200 characters |
digits = true | digits only, such as a message id |
date = true | a date such as 2026-01-31 |
The first-party tools cap count at 50, query at 200 characters, mailbox at 100, calendar days at 31 and Things 3 limit at 100, take an IMAP message id as digits only, and take modified_after as a date.
A first-party plugin can name one store secret with stdin = "<secret name>". Such a plugin runs only inside the broker and only as its bundled copy. Each run prompts naming the secret, audits it as released, writes it to the tool's stdin and closes it, and returns the tool's output with the secret scrubbed out. A request that asks only for approval is refused, so the value never goes back to a caller. A plugin you write yourself cannot read a secret: one with stdin is refused. Run it under passbox exec instead.
Each plugin carries a version. passbox plugin update <name|dir> refreshes an installed plugin, and plugin list flags a first-party plugin whose bundled version differs from the installed copy, which is what happens after a brew upgrade.
Approval windows
Every plugin call prompts. A job that reads Things 3 every few minutes would need a finger each time, so ~/.passbox/config.toml can open a window for a named tool:
[plugins.windows]
"things3.logbook" = "24h"
"things3.upcoming" = "24h"
"imap.search" = "1h"The prompt shows the call's arguments, such as run plugin:imap.search query="invoice" mailbox="INBOX" for claude, releasing mail/imap, and the window covers that exact call. After one approved call, later calls of that tool with the same arguments skip the prompt until the window ends, and each is audited as by window. A call with another query, mailbox or message id prompts, and approving it opens a window of its own. A window is a duration in s, m or h, capped at 24 hours like a grant.
The cost: a job that repeats one call, such as things3.logbook or imap.recent --count 20, prompts once per window, and a job whose query changes prompts on every call. An omitted optional and an empty one are the same call. The broker holds at most 256 windows per scope and drops the oldest first.
- A key names one plugin and one tool, in quotes.
things3,*andthings3.*are refused, and so is a plugin that is not installed or a tool it does not have. - A window names one installed tool. You choose which tools get one, since every tool should only read.
- For a plugin without
stdin, such asmailorthings3, the broker approves and your local caller runs the command, so the binding holds only for callers that go through passbox. Any process of yours can run the app's own CLI without passbox. It is enforced where the broker runs the command: a plugin withstdinsuch asimap, and every call from a tailnet client. - A window covers the caller that opened it. A tailnet client is named by
tailscale whois, so one host's window does not cover another host. Every caller on the Mac is one scope, and it does not cover a tailnet client. - The file is plain text that any process of yours can edit. The broker keeps the hash of the section you approved, and of each named tool's command. An edit takes effect only after one prompt that lists the new windows, such as
allow plugin windows things3.logbook 24h, imap.search 1h for claude, then run plugin:things3.logbook for claude. Approving it ends the windows opened under the old section, and a refused prompt keeps the old section. - Windows live in the broker's memory, so a restart ends them. The approved hash survives it.
- A plugin with
stdin, such asimap, still runs inside the broker on every call in the window, from its checked bundled copy, and each call audits the secret asreleased. The window holds the secret in the broker's memory, as a token does, and the output never holds it.
A bad section is refused with the reason on the next plugin call, before any prompt. See docs/content/design.md for what a window costs.