create-hogsend@0.11.0
Minor Changes
-
b84092d: feat: zero-to-verified-domain onboarding — create --domain, hogsend dev, domain verification, provider-neutral test mode, agent skills
The DX-onboarding train:
pnpm create hogsend@latest my-app --domain mysite.com
thenhogsend devtakes a developer from nothing to a running local loop with a
sending domain wired — and test mode keeps every send safe (redirected to your
own inbox) until the domain's DNS verifies.Core (
@hogsend/core):- Domains capability contract (
providers/domains.ts, new):DnsRecord,
DomainStatus,DomainVerificationState, and the optional
DomainsCapability(create/get/records/verify?).EmailProvider
gains one optional member —domains?— whose presence is the capability
gate; providers without it degrade gracefully everywhere.
Engine (
@hogsend/engine):- Domain-status service (
lib/domain-status.ts, exposed as
client.domainStatus): the cachedEngineDomainStatussnapshot every
surface consumes (admin route, CLI, Studio, mailer). In-memory cache —
10 min TTL once verified, 60 s while unverified (so test mode auto-exits
≤ 60 s after DNS verifies). The per-send path is sync + cache-only and
fail-open: a provider outage can never silently redirect production mail. - Admin domain routes:
GET /v1/admin/domain(?refresh=truebusts the
cache),POST /v1/admin/domain(register),POST /v1/admin/domain/verify
(provider verification pass). 501provider_unsupportedwhen the active
provider has no domains capability. Provider API keys never leave the server. - Provider-neutral test-mode sends (
lib/test-mode.ts+ the mailer): with
HOGSEND_TEST_MODE=auto(default), every send is redirected to
HOGSEND_TEST_EMAIL ?? STUDIO_ADMIN_EMAILwhile the configured
EMAIL_DOMAINis unverified — subject prefixed[TEST → original@…], cc/bcc
dropped, Resendfromoverridden toonboarding@resend.dev,
email_sends.metadata.originalTorecorded, structured
email.test_mode_redirectWARN per send plus a one-line banner per
activate/exit flip. Active-but-unaddressable sends are BLOCKED (recorded as
failed), never delivered to the real recipient.autoonly arms when
EMAIL_DOMAINis set AND the provider supports domains — existing deploys
are untouched. - New env:
EMAIL_DOMAIN,HOGSEND_TEST_MODE(auto|true|false, default
auto),HOGSEND_TEST_EMAIL,POSTMARK_ACCOUNT_TOKEN.
CLI (
@hogsend/cli):hogsend dev— the one-command local loop: detect/start infra, ensure
.env+ auth secret, migrate, spawn API + worker (line-prefixed), wait for
health, print the URL block (API / Studio / Hatchet / docs) and a
domain/test-mode status line. Flags:--cwd,--no-worker,--no-infra,
and--fire <event>(sends a test event to the running instance, accepting
everyevents sendoption). Ctrl+C tears down the whole process tree
(SIGTERM, SIGKILL after 5 s).hogsend domain add|check|status— register the domain through the
running instance's admin routes, print the DNS records formatted for YOUR
DNS host (NS-lookup detection: Cloudflare, Vercel, Route 53, GoDaddy,
Namecheap, Porkbun, Google Domains) with a panel deep link, auto-apply on
Cloudflare/Vercel whenCLOUDFLARE_API_TOKEN/VERCEL_TOKENis present
(CLI-side only), and poll verification every 15 s (--timeout,--once,
--json).- New libs:
lib/dns.ts,lib/dns-apply.ts,lib/proc.ts, and
lib/setup-steps.ts(the setup flow extracted sosetupanddevshare
it).ensureAuthSecretnow also treatsREPLACE_ME…values as placeholders. - Two new skills:
hogsend-integrate(wire an existing product codebase to
a running instance via@hogsend/client) andhogsend-migrate(audit +
dual-write cutover off Loops / Customer.io / Resend Broadcasts) — bringing
the bundle to 14, with/llms.txt+ a docsagentspage as the stable
agent entrypoints.
Providers (
@hogsend/plugin-resend,@hogsend/plugin-postmark): both
implement the optionaldomainscapability — Resend via its Domains API
(create/get/records/verify), Postmark via the account-level Domains/DKIM API
(requiresPOSTMARK_ACCOUNT_TOKEN; without it the provider still sends, it
just reportssupported: false).Studio (
@hogsend/studio): a new/setupview renders the
EngineDomainStatus— domain, per-record DNS state, and the test-mode block.Scaffold (
create-hogsend): a--domain <domain>flag (and interactive
prompt) writesEMAIL_FROM=hello@<domain>+EMAIL_DOMAIN=<domain>into
env.exampleso the bootstrap-copied.envinherits them; with no app-name
positional the name defaults to the first domain label.env.examplegains
the commented "Sending domain" + test-mode block; the README leads with
hogsend dev; the two new skills ship in.claude/skills/.The rest of the engine-line packages bump in lockstep to keep the version line
uniform (release-doctor invariant); they carry no functional change here. - Domains capability contract (