Repository navigation
Mailbox manifest and one command to deploy every copy (0.4.0) - #3
Merged
Merged
Conversation
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…example config Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…anifest Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
wrangler refuses the first deploy of a config with secrets.required. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…gler Wrangler refuses to deploy a config with secrets.required while a secret is unset, and a Worker that does not exist cannot be given secrets, so a new mailbox could never have its first deploy. Names now live in each broker's package.json under broker.secrets; an example with a secrets key is an error. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
… reference Duplicate and __proto__ keys, shared KV namespaces, ports and trailing dots in origins, all problems of a copy in one run, a clear error for a broker without package.json. The example manifest comments out the mailroom block. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…nges, mailroom checks KV and secret commands run from the repository root; a new custom domain is refused when it already resolves and is awaited through public DNS for up to ten minutes; a changed name, KV namespace, PUBLIC_URL or mailroom binding needs --allow-change; a hand-written mailroom config is kept as .bak; the command line moves into a tested execute(). Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
… paragraphs Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
…name refusal Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A mailbox is one agent's set of things: its own copy of every broker and its entry in mailroom. Until now a mailbox existed nowhere as one thing. It was an
envblock copied by hand into each broker's git-ignoredwrangler.jsonc, two service bindings and an entry in mailroom's config in another repository, two KV namespaces and four secrets made by hand, and its name typed about nine times with nothing checking they agree. A broker release was 2×N deploys and 2×N checks by hand.This pull request makes the mailbox the unit: one manifest entry per mailbox, and one command that generates every config from it, deploys and verifies. Design:
docs/superpowers/specs/2026-11-19-mailbox-manifest-design.md. Released as 0.4.0; nothing inside a Worker changes except the version number.Design
packages/mailboxis a new workspace package, TypeScript run directly by Node (22.18 or later).mailboxes.jsonc, documented bymailboxes.example.jsonc) holds everything about every mailbox that is not a secret. It is not committed here: the repository is public, and the file decides who may sign in to each broker.brokers/<name>/wrangler.example.jsonc(the Worker name stem, which variables exist and which are required) and frombroker.secretsin itspackage.json. It contains no broker name and no mailroom source key, so a third broker needs no change to it.brokers/<broker>/wrangler.<mailbox>.jsoncper copy, andwrangler.jsoncin mailroom's Worker directory, built from mailroom's own example.deploy, per copy: make sure the KV namespace exists, write the config, deploy (once more on code 10007), list missing secrets and at a terminal hand each towrangler secret put, then verify the banner version and the OAuth issuer over HTTP. With--mailroom, then deploymailroom-core. Adding a mailbox isdeploy <name> --mailroom; a release isdeploy.hostnamepattern in the manifest), as a Cloudflare custom domain, so the address no longer names the Worker behind it.fetch, so the orchestration is tested without an account (125 tests).Guards
The tool can reach live Workers, so it refuses rather than guesses:
PUBLIC_URL, or renaming a binding mailroom already uses, needs--allow-change.Found by testing against the real account
mailroom-core: same names, variables, KV ids and bindings. Wrangler's own binding tables match; the only difference is an optional variable now written as""on the GitHub copies.secrets.requiredwhile a secret is unset, and a Worker that does not exist cannot be given one. So secret names are declared inpackage.json, not to wrangler.Also
package.jsonitself.wrangler.jsoncper broker still works for someone running one copy.Checked
npm run typecheckclean; tests: broker-core 48, mailbox-tool 125, discord-broker 65, github-broker 51.After merge
npm run mailbox -- deployfor 0.4.0 on the four live Workers, verify, then tagv0.4.0and release.🤖 Generated with Claude Code
https://claude.ai/code/session_017zqkE8grD6nh1bNnb2r1X8