Skip to content

Nimblersoft fork: multi-domain + bridge integration + Phase 1 live on nimblerbot.com#1

Merged
ericmaster merged 9 commits into
mainfrom
feat/nimblersoft-multidomain-bridge
Jun 17, 2026
Merged

Nimblersoft fork: multi-domain + bridge integration + Phase 1 live on nimblerbot.com#1
ericmaster merged 9 commits into
mainfrom
feat/nimblersoft-multidomain-bridge

Conversation

@ericmaster

Copy link
Copy Markdown
Owner

Nimblersoft fork of cloudflare/agentic-inbox

Self-hosted email for AI agents (replacing OpenMail), on Cloudflare Workers + Durable Objects + R2 + Email Routing/Sending. Merges the full Nimblersoft fork into this fork's main.

Code changes (small, auditable — ~115 LOC of Worker code across 3 files)

  • Multi-domain support (fb65cc0, backport of upstream Support multiple domains per inbox cloudflare/agentic-inbox#49): parseDomains() + mailbox-creation domain guard; one instance can serve several domains via comma-separated DOMAINS.
  • Bridge integration + disable built-in AI (47ef682):
    • workers/lib/webhook.tsnotifyBridge() fire-and-forget email-received / email-sent webhooks (no-op when WEBHOOK_URL unset → vanilla upstream behaviour preserved).
    • receiveEmail() — removed the built-in Workers-AI auto-draft trigger (Hermes is the sole draft generator); fires a reference-only email-received webhook instead.
    • POST /api/v1/mailboxes/:id/emails?sync=true — bridge approve path: awaits delivery, returns 200/502, no echo webhook.

Phase 1 — live infrastructure (1a08b79 + docs)

Deployed and validated on the dedicated domain nimblerbot.com (its own CF zone). The original ai.nimblersoft.com target was abandoned — Cloudflare refuses Email Routing while the nimblersoft.com apex has Google Workspace MX.

  • Web UI ainbox.nimblerbot.com (behind Cloudflare Access); mail at the apex.
  • Email Routing (literal per-mailbox rules → Worker) + Email Sending (SPF / DKIM / _dmarc p=reject).
  • Mailboxes sofia.luz@ / silas.vertiz@nimblerbot.com (with signatures).
  • Tested: internal sofia→silas; outbound→external inbox (passes p=reject); inbound external→Worker; global DNS propagation. nimblersoft.com (Google) + Zoho domains untouched.

Docs

AGENTS.md, CONTEXT.md, PLAN.md (full migration plan + live-infra execution notes), README.md, .dev.vars.example.

⚠️ Base is this fork's own main, not upstream cloudflare/agentic-inbox.

🤖 Generated with Claude Code

Eric Aguayo and others added 9 commits June 16, 2026 20:25
Backport PR cloudflare#49: parseDomains() helper + mailbox domain guard so one
instance serves multiple domains via comma-separated DOMAINS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- notifyBridge() helper: fire-and-forget webhook to agentic-inbox-bridge,
  no-ops when WEBHOOK_URL unset (vanilla upstream behaviour preserved).
- receiveEmail(): replace built-in Workers AI auto-draft trigger with an
  email-received webhook (Hermes is the sole draft generator).
- POST /emails: add ?sync=true (bridge approve path, blocks until delivery,
  502 on failure); async/web-UI path fires email-sent webhook for dedup.
- types.ts: optional WEBHOOK_URL/WEBHOOK_SECRET on Env (secret set via
  wrangler secret put, not committed).

Refinement vs plan: email-sent webhook fires on the async (web-UI) path only,
not the sync path, so the bridge does not receive an echo of its own sends.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Self-contained project context: fork modifications, config/secrets pattern,
known live-infra watch-outs, project glossary, and the migration plan copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…only)

ai.nimblersoft.com is the only domain cut over in Phase 1. ericmaster.ninja
and meliruns.com are recognized but stay on Zoho (deferred to Phase 4).
nimblersoft.com is intentionally excluded (Google Workspace).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Proxied custom-domain record (behind Cloudflare Access). Coexists with the
ai.nimblersoft.com MX; does not touch the nimblersoft.com apex.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare/vite-plugin strips `routes` from the generated deploy config, so
custom domains can't be declared in wrangler.jsonc for this stack. Replace the
inert `routes` block with a comment pointing to the Workers Domains API call
that actually attaches ai.nimblersoft.com -> agentic-inbox.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Steps A-F done (R2, DOMAINS, Access+service token, secrets, deploy, custom
domain, Email Sending). Step 1.9 (inbound Email Routing) blocked: ai.nimblersoft.com
is a subdomain in the nimblersoft.com/Google zone and the enable wizard forces
apex MX + duplicate apex SPF. Stopped per guardrail. Documents resolution options
(preferred: ai.nimblersoft.com as its own CF zone) + gotchas (vite-plugin strips
routes; routing-enable not token-grantable).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Enabling Email Routing on nimblersoft.com errors: "Existing non-Cloudflare MX
records conflict with Email Routing" — CF refuses while the apex has Google MX,
and there is no subdomain-only path on a shared zone. Decision: dedicated domain
(its own CF zone, mail at apex). Worker/R2/DOs/bridge contracts carry over.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shared ai.nimblersoft.com/Google zone was ruled out — Cloudflare refuses
to enable Email Routing while the apex has non-Cloudflare (Google) MX. Phase 1
is now live and validated on the dedicated zone nimblerbot.com:

- DOMAINS=nimblerbot.com (was ai.nimblersoft.com,ericmaster.ninja,meliruns.com)
- Web UI at ainbox.nimblerbot.com (proxied AAAA); mail at the apex
- Email Routing (literal per-mailbox rules) + Email Sending live
- Mailboxes sofia.luz@/silas.vertiz@nimblerbot.com; inbound + outbound validated
  internally and externally; global DNS propagation confirmed
- PLAN.md / AGENTS.md updated from "blocked" to "complete"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ericmaster ericmaster merged commit 4f1ed87 into main Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant