2026-01-17 14:11:14 +00:00
|
|
|
package handler
|
|
|
|
|
|
|
|
|
|
import (
|
2026-01-29 05:59:04 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/admin"
|
2026-10-10 06:14:17 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/admindevice"
|
feat(admin): outreach composer (platform mailer + reply-to + audit log)
Adds a dedicated admin path for sending platform email — distinct from
the campaign emailsend service (which sends through customer mailboxes)
so the two abuse surfaces never share code paths.
Schema (000047) adds admin_outreach_messages: every send is recorded
with sent_by, the resolved to_email, the optional reply_to, subject,
body, and a queued → sent/failed status. Failed sends keep their error
column populated for the audit log.
Extends notify.EmailNotificationService with SendOutreach so both
backends (SES + SMTP) support custom Reply-To: SES via the native
ReplyToAddresses field, SMTP via a forged Reply-To header. The
existing transactional Send() remains unchanged so no other caller is
affected.
Service (internal/app/adminoutreach) resolves recipients three ways:
to_email (raw address), to_user_id (sends to the user's account email),
or to_org_id (sends to the workspace owner). Persist-then-send-then-
mark ensures the audit row exists even if the mailer hangs, and
mark-failed captures the error string verbatim.
Routes:
POST /admin/outreach manage_organizations
GET /admin/outreach view_organizations
Admin UI: composer with recipient mode picker (email / user_id / org_id),
configurable Reply-To (defaults to support@warmbly.com so customers can
actually reply), subject + HTML body editor, and an outreach log below
showing the last 50 sends with status badges and error details. Sidebar
entry under Accounts (Send icon).
2026-05-28 12:25:18 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/adminoutreach"
|
2026-02-20 08:59:17 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/advanced"
|
feat: add the Advisor, continuous sending checks surfaced on the row they are about (#86)
* feat: index advisor findings by subject and parent entity so a list page fetches its whole surface once and every row resolves its own advice from the shared cache instead of firing a request per row
* feat: rebuild the advisor fix drawer as a three-screen resolution flow (why it fired with the measured evidence, the exact before and after, then an animated outcome with undo) with a progress rail and direction-aware transitions, and deep-link manual fixes to the screen where they are made
* feat: add AdvisorRowFlag, the inline per-row advisor indicator that renders on the mailbox or campaign the problem is about and opens that row's findings in an anchored panel instead of making the reader join a card list against a table
* feat: add AdvisorSummaryBar, a one-line collapsible page summary that replaces the stack of advisor cards above a list, counts the distinct rows implicated rather than the findings, and forces itself open only for critical or workspace-level advice no row flag can carry
* feat: put advisor advice on the mailbox row it is about in the accounts list, replace the card stack above the table with the collapsible summary bar, and support ?mailbox=<id> so a finding can deep-link straight to the mailbox detail instead of the top of the list
* feat: flag advisor findings on the campaign row in the campaigns list, including step-level copy problems which index onto their parent campaign since a step has no row of its own, and add the collapsible summary bar above the list
* feat: move the deliverability and contacts pages onto the collapsible advisor summary bar so their findings stop pushing the numbers they describe below the fold
* feat: add an ordered Steps field to advisor findings, persisted as text[] and always refreshed from the current build, and write real how-to steps for the deliverability checks that have no one-click fix (bounce rate, spam placement, tracking domain, and per-record SPF/DKIM/DMARC instructions)
* feat: write ordered how-to steps for the manual advisor findings where the remedy alone leaves someone stuck (broken template syntax, missing first-name fallback, unsubscribed contacts still enrolled, a campaign with no resolvable sender, and a mailbox that lost warmup pool standing) and correct the personalization detail that named a merge syntax this product does not use
* feat: show a mailbox's advisor findings at the top of its detail drawer, which is where both the row flag and the ?mailbox deep link now land
* feat: open the resolution flow from findings that have no one-click fix too, since the ordered how-to lives there and a card with no Fix button previously left the steps unreachable
* docs: document the per-row advisor flags, the collapsible page summary, the three-screen resolution flow, and the ordered manual steps for findings with no one-click fix
* feat: align the advisor summary bar to the px-5 page gutter used by SectionBar and the list rows on all four surfaces, instead of sitting flush against the edge while the table it describes is indented
* fix: stop the resolution drawer collapsing to zero height between screens by switching the step transition to popLayout with a layout-animated container, so the dialog resizes into the next screen instead of snapping shut and reopening
* feat: wire the advisor repository, narrator, service, tool registration, and background runner into the backend boot path so findings evaluate on a schedule and the assistant can read them
* docs: register the advisor guide in the sidebar, add its endpoint scope table to the API reference, and document the sandbox advisor showcase
* fix: darken the advisor nav badge to solid orange-600 on white instead of a pale amber-100 chip that read as a disabled control beside the sidebar's saturated indicators, and drop the critical badge to rose-600 so the two stay in the same weight class
* fix: use orange-500 for the advisor nav badge, matching the high-severity dot on the row it points at, rather than the darker orange-600
* feat: add an Auto safety class to advisor actions and mark the seven fixes autopilot may apply unattended (the cap cuts, the send-gap widen, the campaign limit matches, and the unsubscribe header), with a test pinning the boundary so nothing that halts sending or generates new outbound mail can drift into it
* feat: add advisor autopilot, which applies the auto-safe fixes unattended as the member who switched it on, resolving their live permissions each run so it fails closed when they leave the org, bounded to 10 changes per evaluation and audited per fix like any hand-made change
* feat: add the advisor agent fix, a bounded per-finding agent run that resolves the problems a settings change cannot (broken template syntax, bulk-reading copy, shared-inbox lists) as the calling member inside a tool allowlist scoped to the finding's category, metered per iteration and marked applied only when it actually called a write tool
* feat: surface autopilot and the agent fix in the dashboard, adding the workspace toggle that names exactly which changes it may make, an Auto chip on the findings it is allowed to take, and an agent-fix path in the resolution drawer that reports the tools it actually called rather than only its own account of them
* docs: document the agent fix and autopilot, naming the exact set of changes autopilot may make, that it acts as the member who enabled it and stops when they leave, and why the agent-fix endpoint is JWT only
* fix: gate the agent fix per detector instead of per category, so a missing DMARC record no longer offers a Fix-with-agent button it can never satisfy and then reports failure; findings whose fix lives in DNS or a provider console now show their manual steps, and the client is told which is which via agent_fixable
* feat: soften the advisor surfaces to translucent washes, replacing the filled nav badge with a tinted pill that carries its colour in the text, frosting the row panel and the resolution drawer, and turning the severity chips and cards into layers the page shows through
* docs: correct the agent-fix scope to name the findings it cannot resolve, and why a DNS record shows steps instead of a button
* feat: ship the actual DNS records for the findings that live outside the platform, with the provider's SPF include resolved, the DMARC record scoped to the sending domain and starting at p=none, the DKIM host plus the console that generates its value, and a tracking CNAME pointing at this install's own tracking host
* feat: render advisor snippets as labelled copy-button rows so a DNS record is one click per field rather than a text-selection exercise, with no copy affordance on a value the server could not supply
* docs: document the pasteable DNS records and the guarantee that every check offers a fix, an agent, or ordered steps
* fix: bump golang.org/x/text to 0.39.0 to clear CVE-2026-56852, a HIGH-severity infinite loop in norm.Iter that Trivy started failing the security scan on
2026-07-30 17:15:09 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/advisor"
|
feat: dashboard-wide AI assistant with streamed tool-use runs, per-action approvals, and per-iteration credits - agent_sessions/agent_messages/ai_tool_policies migration, aiagent service runs the M2 registry through the provider loop over a resumable jsonb transcript, streams text/tool-step/approval/done events over SSE, gates write tools behind approve/deny/always-allow (send always per-action) and charges 1 credit per iteration (budget 20, refund on provider failure, out-of-credits 402 insufficient_credits, cap 429 usage_cap_exceeded) with a resume-safe idempotency namespace, provider PreIteration budget hook, /ai/sessions endpoints (cursor list + two SSE runs) gated by membership with tools bound to the member's org-permission bits, APIPermAIAgent bit 22, ai_session audit entity + spine, and a right-side resizable panel (Cmd+I / sparkle button) with streamed text, collapsible tool steps, inline approval and draft-artifact deep-link cards, stop, new chat, and a credits/budget meter; tenancy enforced at the SQL layer and docs for the assistant, endpoints, permissions, and error codes
2026-07-13 18:46:43 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/aiagent"
|
2026-07-13 18:15:58 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/aitools"
|
2026-01-26 16:04:42 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/analytics"
|
|
|
|
|
"github.com/warmbly/warmbly/internal/app/apikey"
|
2026-10-11 12:41:56 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/apollo"
|
feat: redesign the iOS app (inbox with inbox agent drafted replies edited in the full composer, Remie, home, analytics, CRM, contacts, settings hubs, mailbox connect flow covering every dashboard source) and replace Turnstile in the app with Apple App Attest (attested keys in app_attest_keys, challenge and key endpoints, verifyHuman gate on login, registration and password reset, auth config flag, docs and OpenAPI)
2026-10-11 19:00:50 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/appattest"
|
2026-10-03 09:24:34 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/appdirectory"
|
2026-01-26 16:04:42 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/audit"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/auth"
|
feat: give each mailbox a human sending persona (randomized daily and hourly caps, send spacing, work start/end, lunch break and working weekdays, rolled once per local day in the mailbox's own timezone and applied across the campaign, warmup and smart-send schedulers), add campaign auto-pause guardrails that stop a campaign when its bounce, complaint or reply rate leaves the configured band, make mailbox rotation actually rotate for tag-resolved and all-mailbox campaigns, stop every scheduler from ever returning a slot in the past, and correct the mailbox min-gap field that stored seconds while labelling them minutes
2026-08-13 16:51:29 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/behavior"
|
feat: make self-hosted auth work without a mail relay by rewriting the platform SMTP transport with real AUTH and TLS (it did neither, so SMTP_USERNAME/SMTP_PASSWORD were dead and every documented relay was unreachable), adding MAIL_TRANSPORT=smtp|log|ses with a log transport that prints codes so a fresh install can sign in with no relay, demoting the emailed login code to AUTH_LOGIN_CODE=always|new_device|off (off on self-host, per NIST SP 800-63B and OWASP ASVS), claiming the first owner through a single-use setup link or WARMBLY_BOOTSTRAP_* instead of register-then-psql, deriving every emailed URL from APP_URL rather than a hardcoded app.warmbly.com that leaked live reset tokens to the vendor, fixing the confirm hooks that read path params against paramless routes and broke login, register and reset confirmation in the dashboard everywhere, adding generic OIDC with PKCE, one-time state, verified nonce and (issuer,subject) identity binding, enforcing 2FA on the social paths that skipped it, adding a per-IP limiter and trusted-proxy handling to the unthrottled auth group, refusing boot on the published default secrets, and dropping mailpit from the default stack (#99)
2026-08-14 14:57:09 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/bootstrap"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/campaign"
|
2026-10-23 16:17:12 +03:00
|
|
|
"github.com/warmbly/warmbly/internal/app/campaignimport"
|
2026-10-11 12:41:56 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/clay"
|
2026-09-04 20:14:27 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/cliauth"
|
2026-08-29 07:09:04 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/cloudlink"
|
2026-07-19 07:27:23 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/compose"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/contact"
|
feat: run contact file imports as background jobs (upload once, a whole-file check of new, existing, repeated and invalid rows, a chunked leased runner with live CONTACT_IMPORT_PROGRESS, history, cancel, a draft that autosaves and survives a reload, remembered mappings, and a failed-rows CSV under the file's own headers), match existing contacts across the workspace, batch updates and fail a bad row alone, keep imported verdicts on update, scope every import write to the importing workspace, rebuild the import wizard with icons and inline segment creation, show company logos and the inbox provider on the contact avatar, and hide contact columns the list has no data for
2026-09-27 21:50:10 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/contactimport"
|
2026-06-05 06:03:13 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/credits"
|
2026-01-29 05:59:04 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/crm"
|
2026-10-04 19:20:48 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/crmmode"
|
2026-05-24 04:06:07 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/dangerzone"
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/delegation"
|
2026-05-29 05:49:19 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/discount"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/email"
|
2026-01-29 05:59:04 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/emailsend"
|
2026-06-03 16:47:53 +02:00
|
|
|
emailverifyapp "github.com/warmbly/warmbly/internal/app/emailverify"
|
2026-01-27 05:55:48 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/feature"
|
2026-09-09 04:54:01 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/fleetnode"
|
feat: hosted lead-capture forms end to end: drag-and-drop builder with field settings, design panel, embed/share and submissions tabs in the dashboard, a public TanStack form app (forms/) served by the new standalone forms service (cmd/forms + internal/formserver) on FORMS_DOMAIN with per-form frame-ancestors CSP, honeypot/fill-time/Turnstile/per-IP submit protection and a same-origin JSON API proxying the backend internal API, form submissions creating contacts with categories and campaign enrollment plus realtime, audit, webhook and org-transfer coverage, migration 000114, seed forms, CI jobs, Dockerfile, systemd/nginx/compose manifests and docs
2026-09-01 01:17:51 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/form"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/group"
|
feat: add HubSpot CRM mode where HubSpot deals, pipelines, tasks, notes and owners are mirrored and written through, sends and replies log as HubSpot emails, exit rules hold campaigns, list import, sync health, setup wizard in web, HubSpot app project with record card and workflow action, and docs
2026-10-04 07:39:46 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/hubspot"
|
feat: make self-hosted onboarding survivable by fixing invite_only, which could not onboard anyone (the accept route is JWT-only, so redeeming the invitation that would create your account required already having one, making the self-host default silently identical to fully closed), threading the invitation token through registration so an invited person lands in the inviting organization instead of a stray workspace, gating SSO just-in-time provisioning behind DISABLE_REGISTRATION (it bypassed the gate entirely, so an instance set to true was still open to anyone the IdP would assert) with SSO_AUTO_PROVISION as the opt-out, correcting the OIDC redirect URL that pointed at /api/v1 against a route at /v1 and 404'd every SSO login, scoping the first-launch exemption so it no longer overrides an explicit lockdown, preserving the remaining TTL when restoring a losing setup token so a public endpoint cannot hold the claim window open forever, replacing a generic 403 with typed registration_invite_only, registration_closed, invitation_invalid, setup_token_invalid and setup_already_complete codes that name the next step, logging why no claim link was issued on an already-claimed instance instead of staying silent, adding a warmblyctl operator CLI (status with health checks and a non-zero exit, reissuable setup-link, user create/list/reset-password/grant-admin/revoke-admin/disable-2fa, hash-password) so a locked-out operator no longer needs hand-written psql, adding read-only instance configuration over 104 environment variables with structural secret redaction and fingerprints, 35 health checks, a database-backed settings tier for the three keys no environment variable owns, hiding the signup form when the config already says invite_only rather than failing the whole form with a toast, and documenting first run, accounts and access, configuration, instance health and troubleshooting alongside the root .env.example the README told operators to write but never shipped (#114)
2026-08-16 05:58:11 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/instancecheck"
|
|
|
|
|
"github.com/warmbly/warmbly/internal/app/instanceconfig"
|
|
|
|
|
"github.com/warmbly/warmbly/internal/app/instancesettings"
|
feat(integration): backend foundation for tier 1+2 integrations
Adds an integrations app module covering the providers from the tier 1/2
plan: Calendly, Cal.com, Google Sheets, Google Postmaster, Microsoft SNDS,
DMARC ingestion, and Cloudflare/GoDaddy/Namecheap DNS. One unified
migration provisions integration_connections, dmarc_reports + record
rows, postmaster_snapshots, dns_verifications, and meeting_bookings.
The service exposes a generic CRUD surface for connection state with
per-provider files for parsing (calendly.go, dmarc.go), HTTP clients
(cloudflare.go, postmaster.go, google_sheets.go), and DNS verification
(dns.go). Inbound webhook routes use per-org URL-embedded secrets so
Calendly/Cal.com/DMARC providers post directly without Warmbly auth.
DNS verifier resolves SPF/DKIM/DMARC + tracking CNAME and surfaces
fixes when a record is missing.
2026-05-28 08:19:10 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/integration"
|
2026-06-04 11:49:55 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/leadsync"
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/mailboximport"
|
2026-07-13 20:05:24 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/mcp"
|
2026-10-09 15:11:18 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/monitoring"
|
2026-10-10 06:14:17 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/nodelogs"
|
2026-06-08 15:04:47 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/notification"
|
2026-06-13 13:56:39 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/oauth"
|
2026-09-04 06:02:40 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/opsnotify"
|
2026-01-27 05:55:48 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/organization"
|
feat: give an organization one fused abuse posture (#233)
* feat: give an organization one fused abuse posture, because every existing control watches a single subject and an actor slightly wrong on several axes sits under all of them: organizations gains risk_state, risk_score, risk_reason and an append-only risk_signals evidence blob, modelled on the warmup participant health machine that already works rather than a second vocabulary for the same idea; restricted cuts per-mailbox cold volume to a quarter and forces the free warmup pool so a risky tenant cannot spend the paid pool's shared reputation, suspended stops sending at the send gate, and watch deliberately changes nothing a customer can feel so evidence accumulates before anything is taken away; an operator's suspension outranks the derived band so a detector clearing cannot release a workspace a human suspended, transitions ride the audit spine to every teammate's dashboard, a banner says which limit is active and why rather than letting volume drop silently, and the posture never travels in a workspace archive since it is one platform's verdict reached from evidence the destination never saw
* feat: make the suspension actually stop sending, and emit the audit transitions the PR claimed: emailsend.SendEmail is only the manual and API path, so campaign and warmup sends went nowhere near the gate and a suspended workspace kept sending on its schedule, while the restricted multiplier floored every mailbox at one a day which quietly turned suspension into a trickle rather than a stop; the campaign scheduler now defers the whole campaign with a reason and the warmup task skips as org-suspended, since warmup is outbound mail from the same domains; separately the band change emitted no audit entry at all despite the entity type and the frontend spine entry both existing, so no banner moved for a teammate and there was no trail of who was restricted when, and only a real transition is logged so a detector re-recording the same finding cannot fill the feed; one of my own live tests also asserted how far out a slot lands, which depends on the hour the suite runs, and now asserts the property it was about
* chore: drop a test that belongs to the signup-risk change and reached this branch by mistake, where the type it exercises does not exist
2026-08-28 11:20:19 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/orgrisk"
|
feat: organization data export and import for moving a workspace between instances (#132)
* feat: add the org_export_jobs and org_import_jobs tables plus the models behind them, so a whole organization can be written to a portable archive and read back on another instance, keeping the option columns typed (a text[] of data groups, an include_secrets boolean, a conflict_strategy check constraint) rather than a settings blob because the option set is small and fixed, and reserving jsonb only for the genuinely free-form parts that are read back for display alone (the source archive's manifest, per-table row counts, the import warning list), with partial indexes on the in-flight and expiring rows so the maintenance sweep stays cheap however much transfer history accumulates, an OrgDataGroup catalog that names the twelve slices of a workspace and carries the dependencies between them, and an org_archive audit entity so an export or import rides the existing audit spine into every teammate's dashboard
* feat: add the schema-generic repository behind workspace archives, which reads and writes tables by name rather than through typed structs because that is the only way an archive stays correct as the schema grows, moving rows as jsonb in both directions via to_jsonb on the way out and jsonb_populate_recordset on the way in so Postgres performs every type conversion and no hand-written Go column mapping can drift from arrays, jsonb, tsvector, inet or enums, lifting the pool's 60s statement_timeout inside the export transaction because a full inbox read legitimately runs longer than that, introspecting generated, identity and not-null columns plus primary keys and foreign keys from the catalog rather than trusting a compiled list, and treating identifier safety as structural: table names come from the compiled registry and column names are always intersected against the destination catalog before reaching a query, so nothing out of an uploaded archive is ever interpolated
* feat: add the workspace archive registry and on-disk format, covering all 110 organization-owned relations with their scope SQL, dependency order and per-table policy, plus 10 explicitly excluded ones each carrying the reason it must never travel (the KMS-wrapped org data key, in-flight OAuth handshakes, the websocket outbox, live sessions, a pending deletion that would otherwise schedule the destination workspace for destruction), naming the two key domains separately because Warmbly seals mailbox credentials under the instance CREDENTIALS_ENCRYPTION_KEY and everything else under the per-organization DEK and confusing them produces mailboxes that authenticate against nothing, defining the archive as a plain zip of newline-delimited JSON so an operator can unzip it and read the data in a text editor and so the manifest can be written last yet still be read first, and sealing archive secrets under an argon2id passphrase key with parameters deliberately heavier than the login hash since it is derived once per archive and guards every credential in the workspace against offline grinding
* feat: implement the workspace export and import engines, streaming rows straight through untouched for the tables that have neither secrets nor blobs so a million-row inbox export stays cheap and only decoding the rows that must change, opening every sealed value against whichever key domain wrote it and re-sealing it under the archive passphrase on the way out then against the destination's own keys on the way in, blanking a credential rather than sinking the whole export when one mailbox cannot be read and clearing the guard flag alongside it so no row is left claiming ciphertext it no longer holds, applying an import inside a single transaction because a half-applied workspace is far worse than a long-running one, rewriting the organization id and matching members to destination accounts by email with unresolvable people blanked where the column is nullable and redirected to the importer where it is not, and running transfers in the accepting process rather than through a queue for the one reason that matters: the passphrase is then never written down anywhere
* feat: make the per-organization DEK cache nil-safe in internal/app/cipher so a process built without Redis falls through to KMS on every call instead of dereferencing a nil cache handle, which is what lets warmblyctl run the workspace export and import commands at all: it deliberately attaches Redis as optional because the whole point of that CLI is working while the rest of the instance is down, and the decrypted-key cache was always an optimisation rather than a requirement
* feat: add the hourly workspace-archive maintenance job that deletes finished archives past their seven-day retention window, since each one is a complete copy of a workspace sitting in object storage and must not accumulate, and closes out any export or import whose process died mid-run, which is the necessary counterpart to executing transfers in the accepting process so the passphrase is never persisted: without this sweep a restart would leave a job reporting running forever
* feat: expose workspace export and import over the JWT-only organization routes and wire the service into the backend, gating every endpoint on workspace ownership through the existing requireOrgOwner check rather than a permission bit because an export with credentials is the single most sensitive artifact this product can produce and an import rewrites the workspace wholesale, so both belong at the same level as deleting it, spooling uploads to a temporary file since a zip needs random access and a length that a multi-gigabyte archive cannot supply from memory, handing that file's ownership to the background import so it outlives the request and is closed exactly when the job ends, streaming downloads with the archive's sha256 in a response header, and constructing the service with both key domains plus object storage so an archive can be opened, re-keyed and stored
* feat: add warmblyctl org list, export and import so a self-hoster can move a workspace from the box without a browser, running the same engine in-process against Postgres and adding no HTTP surface to a CLI whose entire trust model is container or host access, resolving --org from whichever handle the operator has (id, slug, or the owner's email), streaming the archive to a file or to stdout so it can be piped straight into ssh with progress still readable on stderr, prompting for the credential passphrase twice through the existing password prompt so the terminal and pipe rules stay identical across every command, and defaulting the import path to a preflight report that names what already exists here and which members have no account before anything is written, with --dry-run to stop there
* feat: add the dashboard API layer for workspace archives, fetching the data-group catalog from the server rather than restating it in the client so a new group appears the moment the backend knows about it, mirroring the server's group-dependency closure in expandGroups so the toggles a user sees always match what the archive actually gets, polling only while a transfer is in flight and dropping to no interval the moment none are active since a running job has no realtime event of its own, and downloading a finished archive as a blob through the authenticated client because the endpoint is bearer-authenticated and a plain anchor href cannot carry the token
* feat: build the Settings and Data dashboard page for exporting and importing a workspace, following the settings section conventions and the in-app confirm rather than window.confirm, defaulting the export to every data group because a migration that quietly leaves data behind is worse than one that takes a while, marking the heavy groups so nobody exports a decade of inbox history unaware, requiring the credential passphrase twice behind a confirm that states plainly what the file will contain, and making the import a two-step flow where a preflight reads the archive and reports its origin, row counts, unsealable credentials, existing rows and unknown members before a single byte is written, so confirming is never a leap of faith
* feat: register the Data settings section in the dashboard rail, route and realtime spine, placing it under Advanced beside the danger zone and gating it to the workspace owner so the nav matches what the endpoints actually allow, and mapping the new org_archive audit entity to the export and import query keys in useRealtimeEvents so an archive starting or landing refreshes the page for every teammate through the existing audit spine rather than a bespoke event
* feat: document workspace export and import as a customer guide registered under Account and team, covering what each of the twelve data groups contains and which four dominate archive size, why credentials need a passphrase to travel at all and what happens to mailboxes when they do not, how members are matched to destination accounts by email and what becomes of anyone without one, the difference between keeping existing rows and replacing them, and a table of what deliberately does not import with the reason for each, because billing, plan overrides, worker placement, sync checkpoints and warmup pool membership belong to an instance rather than to a workspace
* feat: document org list, export and import in the warmblyctl reference and point the deployment guide at them as the supported route between a self-hosted install and the hosted service in either direction, adding every flag with what it does, the two extra environment variables those commands read and the difference between them (a missing KMS provider stops the command because sealed values cannot be opened, while a missing CREDENTIALS_ENCRYPTION_KEY is only a warning that mailbox credentials will not move), the behaviour when Redis is down, and the warning that an archive carrying credentials is the most sensitive file this product produces
* feat: record in AGENTS.md that a migration adding an organization-scoped table is not finished until that table is registered in internal/app/orgtransfer/spec.go, either in Tables with its group and scope or in ExcludedTables with the reason it must not travel, because data left out of the registry is silently absent from every archive and nobody discovers it until a customer's migration lands on the other side missing a feature's data, and spelling out the four things that are easy to get wrong when adding one: dependency order, the group boundary that needs a Requires entry only when a NOT NULL foreign key crosses it, which of the two key domains seals a ciphertext column, and which columns name something only the source instance knows
2026-08-18 07:53:39 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/orgtransfer"
|
2026-06-01 03:09:17 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/passkey"
|
2026-10-04 19:20:48 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/pipedrive"
|
2026-06-03 16:47:53 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/placement"
|
2026-08-29 07:09:04 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/poollink"
|
2026-01-26 16:04:42 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/ratelimit"
|
2026-06-28 05:09:50 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/referral"
|
feat: AI contact research agent that gathers cited web findings per contact with sync and background-batch runs - contact_research_runs table plus a strict save_research schema (every signal and public_artifact must carry a url, confidence high/medium/low, signals<=5 hooks<=3, reject-and-reprompt once then fail), a text/template runtime prompt injecting org voice, contact record, objective, and 5-search/6-fetch budgets, a research service that drives search_web/fetch_url through the provider loop and charges 2 credits on save (billable even for nothing_found, refund-free since charged only on save, balance and abuse-cap pre-checked so a capped org never does free work), POST/GET /contacts/:id/research plus a 500-cap /contacts/research/batch draining through a bounded pool of 4 workers over FOR-UPDATE-SKIP-LOCKED claims (no new Kafka), an org-scoped AI_RESEARCH_PROGRESS realtime event gated to view_contacts, APIPermAIResearch bit 23, a ContactEdit Research tab and a ContactsTable bulk Research action, and docs; also org-scopes every credit and research idempotency key so a client-supplied Idempotency-Key can never replay across tenants
2026-07-13 19:34:11 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/research"
|
feat: add native Salesforce sync with Lead and Contact matching and links, a leased activity outbox that logs sends, replies, bounces, opt-outs and meetings as Tasks, Lead Status and Email Opt Out writeback, a pull loop with CRM pause rules, list view and Campaign imports, sandbox and My Domain OAuth that refreshes expired sessions, a Salesforce settings page with contact and inbox cards in web, and docs
2026-10-04 08:49:30 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/salesforce"
|
feat: expose the segments API (list, fields, preview, create, get, patch, delete, members, member lookup, overrides, add-to-campaign) and GET /contacts/:id/segments behind contact permissions, wire the service into the backend and audit each mutation on the realtime spine
2026-08-29 23:45:05 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/segment"
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/sendingdomain"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/sequence"
|
feat: org AI skills (playbooks) that every AI feature loads and follows - ai_skills table (org-scoped, unique name per org, 32KB content cap) with a skills service exposing CRUD plus an enabled-skills preamble injected into the dashboard agent, contact research, and reply-draft prompts and a load_skill read-tool that returns a playbook's full content by name, /ai/skills CRUD gated on manage_settings (JWT) or the AI_AGENT scope (API) with an ai_skill audit entity and spine entry, an AI skills settings page (list rows opening a right-side drawer with name, one-line description, enable toggle, and a markdown body), and docs with two example playbooks
2026-07-13 19:46:25 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/skills"
|
2026-10-03 15:35:10 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/slackapp"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/socket"
|
2026-01-27 05:55:48 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/stripe"
|
|
|
|
|
"github.com/warmbly/warmbly/internal/app/subscription"
|
2026-07-12 09:00:10 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/sysstatus"
|
2026-06-07 07:03:49 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/team"
|
2026-01-29 05:59:04 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/template"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/token"
|
2026-01-27 05:55:48 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/trial"
|
2026-06-08 15:04:47 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/twofa"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/tz"
|
|
|
|
|
"github.com/warmbly/warmbly/internal/app/unibox"
|
feat: give every campaign email a working opt-out: a reply-to-opt-out line by default or an unsubscribe link (workspace setting under Settings > Sending with a per-campaign override and a {{.UnsubscribeLink}} variable), signed per-recipient unsubscribe links served on the API origin so the List-Unsubscribe header no longer points at a dead warmbly.com page, a confirm page on GET with RFC 8058 one-click on POST and a resubscribe button, reply opt-out detection through the whole-word compliance lexicon with quoted history stripped, a first-class suppression list (Contacts tab, GET/POST/DELETE /suppressions with address and domain entries, audited removal, contact drawer action), the contact Subscribed flag enforced in campaign routing, migration 000122 with a shared recipient_suppressed() predicate, and docs for all of it
2026-09-03 01:52:40 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/unsublink"
|
feat: add self-hosted update awareness and one-click updates: every binary is stamped with its version and commit, the backend polls GitHub Releases and a new host-side updater (cmd/updater, compose profile or systemd unit) reports the checkout's commit distance, the admin panel's top bar shows a version pill that turns into an update indicator and opens a dialog with confirmation, live step progress and log, restart tracking and result, the dashboard header shows the same pill to every member of a self-hosted instance with the full update flow for platform admins, Setup and health gains update_available and updater_unreachable checks, warmblyctl status prints the version, make upgrade and scripts/upgrade-bare-metal.sh cover the by-hand paths, and docs gain an Updates page plus configuration, health, deployment and API reference updates
2026-09-03 04:05:42 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/updates"
|
2026-01-17 14:11:14 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/user"
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/vendorconn"
|
2026-09-19 09:24:09 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/viewprefs"
|
2026-04-09 15:57:04 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/warmup"
|
2026-06-03 05:05:53 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/app/warmupcontent"
|
2026-05-25 16:03:13 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/app/webhook"
|
feat: add website visitor tracking for issue #255 with migration 000106 (website_tracking_settings, website_visitors, website_page_hits, all registered in the orgtransfer spec), a consent-gated dependency-free tracking.js served by the Rust tracking service with a rate-limited, size-capped, prefetch-filtered POST /p ingest that forwards to a new backend internal page-hits endpoint for server-side user-agent and GeoIP enrichment, contact identification only through the click ticket the redirect appends to registered hosts, a per-workspace retention job, page_hit events with an expandable detail view in the contact Activity timeline, a Settings > Website tracking page for the snippet and consent, location and retention configuration, realtime PAGE_HIT fanout, and a website tracking guide plus endpoint, export and configuration docs
2026-08-29 03:25:50 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/app/websitetracking"
|
2026-01-27 05:55:48 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/app/worker"
|
2026-10-10 06:14:17 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/infrastructure/eventbus"
|
2026-06-05 06:03:13 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/pkg/generation"
|
feat: shared TypeSafe client under internal/pkg/typesafe with inbox tagging phases 2 and 3 (hold, stop, task, suppress behind workspace switches, reversible ones on by default), labels seeded at workspace creation and by the follow-up sweep, premade inbox views (hot leads, needs a reply, follow up, declined, automated), typed reply classification and a reply_intent branch condition, an inbox agent draft gate, Advisor copy judgment with a cached editor re-check, warmup content lint, bounce cause classification that keeps a blocked address sendable, and per-form submission triage
2026-09-19 23:33:37 -07:00
|
|
|
"github.com/warmbly/warmbly/internal/pkg/typesafe"
|
2026-06-05 06:03:13 +02:00
|
|
|
|
2026-05-27 14:43:36 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/infrastructure/encryptedkeys"
|
2026-09-10 13:58:59 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/infrastructure/kms"
|
2026-06-08 06:25:40 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/infrastructure/pubsub"
|
feat: settings overhaul, avatars, RBAC, plan alignment, perf
Backend:
- Fix contact-create 500 (nil custom_fields, doubled slice, bad RETURNING SQL)
- Avatar upload: migration 000033, S3 public-read, PNG/JPG only,
client-resized to 512px + server dimension cap (1024px)
- Pull avatar_url through user + organization repo queries
Frontend:
- Settings restructured into nested routes with a rail layout
(/app/settings/{profile,notifications,security,members,roles,
workspace,billing,danger}); flat Section/Row primitives replace
the per-card rectangles; Save buttons only render when dirty
- Standalone /app/billing and /app/team removed; legacy URLs
redirect to the settings sections; UserNav trimmed accordingly
- CRM rebuilt: Pipelines CRUD + stage editor, Deals kanban with
HTML5 drag/drop, Tasks bucketed by due-date with inline toggle.
Frontend models realigned with backend (Deal.name, CRMTask.status
enum, paginated list shapes)
- Avatars: AvatarUploader component, client-side canvas resize,
wired into Profile + Workspace settings; UserNav + OrgSwitcher
render the uploaded image with initials fallback
- RBAC: lib/permissions.ts mirrors organization_permission.go;
inline role picker in Members; Roles & access section shows the
permission matrix and per-role member counts
- Audit log page at /app/audit, gated to owner+admin via canManage
- Plans aligned with warmbly-web pricing: Starter/Grow/Business/
Enterprise via lib/plans.ts; PlanPill, billing page, sidebar
badges and LockedSurface all read from the same catalogue
- Header PlanPill shows current plan with status-aware coloring;
sidebar locked rows show the required-plan badge instead of a
generic lock icon
Perf:
- QueryClient defaults (staleTime: 30s, refetchOnWindowFocus: false,
retry: 1) — kills 3-5 round-trip storm on every navigation
- useSubscription, usePlans → staleTime: Infinity (only invalidate
on plan-change mutations); useUser/Timezones/Orgs get long stales
with refetchOnMount: false
- vite.config: optimizeDeps for heavy libs + server.warmup for the
most-mounted entry pages
2026-05-23 16:04:24 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/infrastructure/storage"
|
2026-07-07 05:56:35 +02:00
|
|
|
"github.com/warmbly/warmbly/internal/models"
|
2026-01-29 05:59:04 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/notify"
|
feat(admin): manage worker fleet from dashboard with encrypted credentials and GitHub release auto-update
Workers are no longer curl|sh-only. Admins add and manage them from the
dashboard over SSH, with all runtime config (Kafka, Schema Registry,
Redis, AWS keys) stored encrypted via the existing KMS-envelope cipher
service.
Worker lifecycle:
1. Admin POSTs host/port/user. Backend generates an ed25519 keypair,
encrypts the private key under uuid.Nil (platform identity), and
stores the row in 'pending' state.
2. Admin pastes the returned public key into the VPS's authorized_keys.
3. Test connection — runs `true` over SSH, pins the host SHA256
fingerprint on first success (TOFU).
4. Install — backend scp's install-worker.sh + a per-worker env file
and runs it. State moves pending → provisioning → installed.
5. From then on: restart, update image, apply config, uninstall,
rotate keys, tail logs, live status, OS package update, reboot —
all dashboard buttons backed by SSH operations.
Credentials are reusable entities:
- aws_credentials: named keypair, secret encrypted at rest
- worker_profiles: bundles Kafka + Schema Registry + Redis + image +
release channel, references one AWS credentials row
- workers.profile_id links a worker to a profile; many workers can
share one profile
Saving a profile doesn't restart anything. The dashboard compares
profile.updated_at to each worker's config_applied_at and shows a
"stale config" badge; Apply rewrites /etc/warmbly/worker.env over SSH
and restarts the unit.
Auto-update on GitHub release:
- profile.release_channel ∈ {pinned, stable, dev}
- profile.auto_update toggles automatic rollout
- Trigger model is push, not poll: one check on backend boot, then
the /webhooks/github/releases endpoint (HMAC-validated with
RELEASES_WEBHOOK_SECRET) on every release event. Manual "Check now"
button as fallback.
- When a new tag resolves, the orchestrator SSHes into each assigned
worker, runs install-worker.sh --update --image <new>, which now
rewrites the systemd unit (not just `docker pull`) so the image
actually changes. workers.image_version captures the running tag
for the UI's "v1.2.3 → v1.2.4" diff.
Self-hostable: every release knob is env-driven —
RELEASES_GITHUB_REPO, RELEASES_WORKER_IMAGE_REPO,
RELEASES_WEBHOOK_SECRET, RELEASES_GITHUB_TOKEN, RELEASES_ENABLED. Set
RELEASES_ENABLED=false to disable the feature entirely.
OS-level updates and reboot are also exposed: detect apt / dnf / yum /
pacman / apk, run the right upgrade noninteractively, return the full
output and a reboot-required flag. Reboots are never automatic.
Migrations:
000028_worker_ssh — ssh fields, install_state enum, last_seen,
host fingerprint
000029_worker_credentials — aws_credentials + worker_profiles +
workers.profile_id + workers.config_applied_at
000030_worker_releases — release_channel enum, auto_update,
resolved_image_tag, workers.image_version
Endpoints added:
POST /admin/workers (create + keypair)
GET /admin/workers/managed
GET /admin/workers/:id/managed
POST /admin/workers/:id/{test,install,restart,upgrade,uninstall,rotate-keys,apply,system-update,reboot}
PUT /admin/workers/:id/profile
GET /admin/workers/:id/{live-status,logs}
DELETE /admin/workers/:id
GET /admin/aws-credentials CRUD
GET /admin/worker-profiles CRUD + /workers + /apply + /release
GET /admin/releases/state
POST /admin/releases/check
POST /webhooks/github/releases public, HMAC-validated
Admin UI:
/app/admin/workers list with status + version columns
/app/admin/workers/new add form with profile dropdown
/app/admin/workers/:id detail with all actions + logs + system update
/app/admin/credentials tabs: AWS credentials + worker profiles,
Releases panel, channel selector +
auto-update toggle in profile form
2026-05-18 13:09:11 +00:00
|
|
|
"github.com/warmbly/warmbly/internal/repository"
|
2026-01-19 15:54:57 +01:00
|
|
|
"github.com/warmbly/warmbly/internal/tasks"
|
2026-01-17 14:11:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Handler struct {
|
2026-07-07 05:56:35 +02:00
|
|
|
AuthService auth.AuthService
|
|
|
|
|
TokenService token.TokenService
|
|
|
|
|
PasskeyService passkey.Service
|
feat: redesign the iOS app (inbox with inbox agent drafted replies edited in the full composer, Remie, home, analytics, CRM, contacts, settings hubs, mailbox connect flow covering every dashboard source) and replace Turnstile in the app with Apple App Attest (attested keys in app_attest_keys, challenge and key endpoints, verifyHuman gate on login, registration and password reset, auth config flag, docs and OpenAPI)
2026-10-11 19:00:50 +02:00
|
|
|
// AppAttestService registers native app keys. Nil when no app id is configured.
|
|
|
|
|
AppAttestService *appattest.Service
|
2026-07-07 05:56:35 +02:00
|
|
|
|
|
|
|
|
// Native-app social sign-in discovery (GET /auth/providers).
|
|
|
|
|
ExternalAuthProviders models.ExternalAuthProviders
|
feat: make self-hosted auth work without a mail relay by rewriting the platform SMTP transport with real AUTH and TLS (it did neither, so SMTP_USERNAME/SMTP_PASSWORD were dead and every documented relay was unreachable), adding MAIL_TRANSPORT=smtp|log|ses with a log transport that prints codes so a fresh install can sign in with no relay, demoting the emailed login code to AUTH_LOGIN_CODE=always|new_device|off (off on self-host, per NIST SP 800-63B and OWASP ASVS), claiming the first owner through a single-use setup link or WARMBLY_BOOTSTRAP_* instead of register-then-psql, deriving every emailed URL from APP_URL rather than a hardcoded app.warmbly.com that leaked live reset tokens to the vendor, fixing the confirm hooks that read path params against paramless routes and broke login, register and reset confirmation in the dashboard everywhere, adding generic OIDC with PKCE, one-time state, verified nonce and (issuer,subject) identity binding, enforcing 2FA on the social paths that skipped it, adding a per-IP limiter and trusted-proxy handling to the unthrottled auth group, refusing boot on the published default secrets, and dropping mailpit from the default stack (#99)
2026-08-14 14:57:09 +02:00
|
|
|
|
|
|
|
|
// Deployment facts served by GET /auth/config so the login screen renders
|
feat: build the browser half of social sign-in, which was never wired: GOOGLE_CLIENT_ID was read at boot and made the login screen render a Google button, but the button opened a popup at /auth/google/login which no route served, and authService.GoogleAuth/AppleAuth had no caller anywhere in the codebase; internal/app/socialauth now runs Google and Apple through the flow generic OIDC already used (one-time state, PKCE, nonce, id_token verified against the provider JWKS, identity keyed on issuer and subject, JIT provisioning, the ban and 2FA gates), the redirect URI defaults to API_PUBLIC_URL/v1/auth/<provider>/callback and is logged at boot because registering the dashboard origin instead is the mistake that produces a valid OAuth client and a dead button, /auth/config advertises only providers the backend can actually complete, the SSO landing page no longer swallows a two_fa_required response, and OIDC_PROVIDER_NAME finally reaches the button it documents
2026-08-28 01:33:05 -07:00
|
|
|
// what this backend can actually do instead of guessing. The sign-in
|
|
|
|
|
// provider list is not here: it comes from the auth service, which is what
|
|
|
|
|
// actually holds the configured flows.
|
|
|
|
|
MailDelivers bool
|
|
|
|
|
PasskeysUsable bool
|
|
|
|
|
MailTransport string
|
feat: make self-hosted auth work without a mail relay by rewriting the platform SMTP transport with real AUTH and TLS (it did neither, so SMTP_USERNAME/SMTP_PASSWORD were dead and every documented relay was unreachable), adding MAIL_TRANSPORT=smtp|log|ses with a log transport that prints codes so a fresh install can sign in with no relay, demoting the emailed login code to AUTH_LOGIN_CODE=always|new_device|off (off on self-host, per NIST SP 800-63B and OWASP ASVS), claiming the first owner through a single-use setup link or WARMBLY_BOOTSTRAP_* instead of register-then-psql, deriving every emailed URL from APP_URL rather than a hardcoded app.warmbly.com that leaked live reset tokens to the vendor, fixing the confirm hooks that read path params against paramless routes and broke login, register and reset confirmation in the dashboard everywhere, adding generic OIDC with PKCE, one-time state, verified nonce and (issuer,subject) identity binding, enforcing 2FA on the social paths that skipped it, adding a per-IP limiter and trusted-proxy handling to the unthrottled auth group, refusing boot on the published default secrets, and dropping mailpit from the default stack (#99)
2026-08-14 14:57:09 +02:00
|
|
|
// MailTransportRef backs the admin mail diagnostics, which need Preflight
|
|
|
|
|
// and so cannot go through the EmailNotificationService interface.
|
|
|
|
|
MailTransportRef *notify.Transport
|
|
|
|
|
// BootstrapService backs the first-run setup page.
|
|
|
|
|
BootstrapService *bootstrap.Service
|
|
|
|
|
UserService user.UserService
|
|
|
|
|
EmailService email.EmailService
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
// MailboxImportService runs mailbox imports from files and pasted lists.
|
|
|
|
|
MailboxImportService *mailboximport.Service
|
feat: run contact file imports as background jobs (upload once, a whole-file check of new, existing, repeated and invalid rows, a chunked leased runner with live CONTACT_IMPORT_PROGRESS, history, cancel, a draft that autosaves and survives a reload, remembered mappings, and a failed-rows CSV under the file's own headers), match existing contacts across the workspace, batch updates and fail a bad row alone, keep imported verdicts on update, scope every import write to the importing workspace, rebuild the import wizard with icons and inline segment creation, show company logos and the inbox provider on the contact avatar, and hide contact columns the list has no data for
2026-09-27 21:50:10 -07:00
|
|
|
// ContactImportService runs contact file imports in the background.
|
|
|
|
|
ContactImportService *contactimport.Service
|
feat: rebuild mailbox import around column mapping and automatic host and sign-in detection (CSV, XLSX, pasted lists, saved mappings, retryable rows with fixes, migrations 000205-000206), connect whole Google Workspace domains and Microsoft 365 organizations through a proved administrator grant, import from inbox vendors (InboxKit, Zapmail, Mailforge, Infraforge, Maildoso, Cheap Inboxes, ScaledMail) with vendor-managed forwarding and DNS, add a sending domains page with per-domain tracking and verified root redirects, unify Add account into one Google and one Microsoft entry with per-method choices, mark per-mailbox Google sign-in as retiring with in-place moves to the admin grant or an app password, allow the loopback security mode in the credential columns (migration 000207), read semicolon-separated CSVs, and add a mock vendor API to the sandbox
2026-09-23 08:41:01 -07:00
|
|
|
// DelegationService connects whole Google Workspace domains and Microsoft 365 tenants.
|
|
|
|
|
DelegationService *delegation.Service
|
|
|
|
|
// VendorConnService imports mailboxes straight from inbox vendors' APIs.
|
|
|
|
|
VendorConnService *vendorconn.Service
|
|
|
|
|
// SendingDomainService manages tracking hosts and bare-domain redirects per sending domain.
|
|
|
|
|
SendingDomainService *sendingdomain.Service
|
|
|
|
|
CampaignService campaign.CampaignService
|
2026-10-23 16:17:12 +03:00
|
|
|
// CampaignImportService turns an Instantly/Smartlead sequence (+ optional
|
|
|
|
|
// leads) export into a real draft campaign in one call.
|
|
|
|
|
CampaignImportService *campaignimport.Service
|
|
|
|
|
ContactService contact.ContactService
|
|
|
|
|
SegmentService segment.Service
|
|
|
|
|
FormService form.Service
|
|
|
|
|
SequenceService sequence.SequenceService
|
|
|
|
|
UniboxService unibox.UniboxService
|
2026-01-17 14:11:14 +00:00
|
|
|
|
|
|
|
|
FolderService group.GroupService
|
|
|
|
|
TagService group.GroupService
|
|
|
|
|
CategoryService group.GroupService
|
|
|
|
|
|
2026-06-08 15:04:47 +02:00
|
|
|
TzService tz.TzService
|
|
|
|
|
SocketService socket.SocketService
|
|
|
|
|
TasksService tasks.TasksService
|
|
|
|
|
NotificationService notification.Service
|
|
|
|
|
TwoFAService twofa.Service
|
2026-09-19 09:24:09 -07:00
|
|
|
// ViewPreferencesService keeps each member's saved list layouts.
|
|
|
|
|
ViewPreferencesService viewprefs.Service
|
2026-01-26 16:04:42 +01:00
|
|
|
|
|
|
|
|
// New services
|
|
|
|
|
APIKeyService apikey.APIKeyService
|
|
|
|
|
AnalyticsService analytics.AnalyticsService
|
|
|
|
|
AuditService audit.AuditService
|
|
|
|
|
RateLimitService ratelimit.RateLimitService
|
2026-01-27 05:55:48 +01:00
|
|
|
|
|
|
|
|
// Subscription & billing
|
|
|
|
|
SubscriptionService subscription.SubscriptionService
|
|
|
|
|
StripeService stripe.StripeService
|
2026-05-29 05:49:19 +00:00
|
|
|
DiscountService discount.DiscountService
|
2026-06-28 05:09:50 +00:00
|
|
|
ReferralService referral.Service
|
2026-01-27 05:55:48 +01:00
|
|
|
|
|
|
|
|
// Trial & feature gates
|
|
|
|
|
TrialService trial.TrialService
|
|
|
|
|
FeatureGateService feature.FeatureGateService
|
|
|
|
|
WorkerAssignmentService worker.WorkerAssignmentService
|
|
|
|
|
|
|
|
|
|
// Organization & IAM
|
|
|
|
|
OrganizationService organization.OrganizationService
|
feat: give an organization one fused abuse posture (#233)
* feat: give an organization one fused abuse posture, because every existing control watches a single subject and an actor slightly wrong on several axes sits under all of them: organizations gains risk_state, risk_score, risk_reason and an append-only risk_signals evidence blob, modelled on the warmup participant health machine that already works rather than a second vocabulary for the same idea; restricted cuts per-mailbox cold volume to a quarter and forces the free warmup pool so a risky tenant cannot spend the paid pool's shared reputation, suspended stops sending at the send gate, and watch deliberately changes nothing a customer can feel so evidence accumulates before anything is taken away; an operator's suspension outranks the derived band so a detector clearing cannot release a workspace a human suspended, transitions ride the audit spine to every teammate's dashboard, a banner says which limit is active and why rather than letting volume drop silently, and the posture never travels in a workspace archive since it is one platform's verdict reached from evidence the destination never saw
* feat: make the suspension actually stop sending, and emit the audit transitions the PR claimed: emailsend.SendEmail is only the manual and API path, so campaign and warmup sends went nowhere near the gate and a suspended workspace kept sending on its schedule, while the restricted multiplier floored every mailbox at one a day which quietly turned suspension into a trickle rather than a stop; the campaign scheduler now defers the whole campaign with a reason and the warmup task skips as org-suspended, since warmup is outbound mail from the same domains; separately the band change emitted no audit entry at all despite the entity type and the frontend spine entry both existing, so no banner moved for a teammate and there was no trail of who was restricted when, and only a real transition is logged so a detector re-recording the same finding cannot fill the feed; one of my own live tests also asserted how far out a slot lands, which depends on the hour the suite runs, and now asserts the property it was about
* chore: drop a test that belongs to the signup-risk change and reached this branch by mistake, where the type it exercises does not exist
2026-08-28 11:20:19 -07:00
|
|
|
OrgRiskService orgrisk.Service
|
2026-01-29 05:59:04 +01:00
|
|
|
|
|
|
|
|
// CRM
|
|
|
|
|
CRMService crm.CRMService
|
|
|
|
|
|
2026-06-07 07:03:49 +02:00
|
|
|
// Teams
|
|
|
|
|
TeamService team.TeamService
|
|
|
|
|
|
2026-01-29 05:59:04 +01:00
|
|
|
// Email send & templates
|
|
|
|
|
TemplateService template.TemplateService
|
|
|
|
|
EmailSendService emailsend.EmailSendService
|
|
|
|
|
|
2026-07-19 07:27:23 +02:00
|
|
|
// Compose mailbox picker: scores the org's mailboxes for a recipient
|
|
|
|
|
// (affinity, budget, auth health) and backs auto selection.
|
|
|
|
|
ComposeService compose.Service
|
|
|
|
|
|
2026-01-29 05:59:04 +01:00
|
|
|
// Admin
|
feat(admin): outreach composer (platform mailer + reply-to + audit log)
Adds a dedicated admin path for sending platform email — distinct from
the campaign emailsend service (which sends through customer mailboxes)
so the two abuse surfaces never share code paths.
Schema (000047) adds admin_outreach_messages: every send is recorded
with sent_by, the resolved to_email, the optional reply_to, subject,
body, and a queued → sent/failed status. Failed sends keep their error
column populated for the audit log.
Extends notify.EmailNotificationService with SendOutreach so both
backends (SES + SMTP) support custom Reply-To: SES via the native
ReplyToAddresses field, SMTP via a forged Reply-To header. The
existing transactional Send() remains unchanged so no other caller is
affected.
Service (internal/app/adminoutreach) resolves recipients three ways:
to_email (raw address), to_user_id (sends to the user's account email),
or to_org_id (sends to the workspace owner). Persist-then-send-then-
mark ensures the audit row exists even if the mailer hangs, and
mark-failed captures the error string verbatim.
Routes:
POST /admin/outreach manage_organizations
GET /admin/outreach view_organizations
Admin UI: composer with recipient mode picker (email / user_id / org_id),
configurable Reply-To (defaults to support@warmbly.com so customers can
actually reply), subject + HTML body editor, and an outreach log below
showing the last 50 sends with status badges and error details. Sidebar
entry under Accounts (Send icon).
2026-05-28 12:25:18 +02:00
|
|
|
AdminService admin.AdminService
|
|
|
|
|
AdminOutreachService adminoutreach.Service
|
2026-01-29 05:59:04 +01:00
|
|
|
|
2026-09-09 04:54:01 -07:00
|
|
|
// Fleet. Nodes enrol with the join token and pull everything else; the
|
|
|
|
|
// control plane never reaches into a machine.
|
2026-10-10 06:14:17 +00:00
|
|
|
FleetNodes *fleetnode.Service
|
2026-10-10 06:57:13 +00:00
|
|
|
NodeLogs nodelogs.Store
|
2026-10-10 06:14:17 +00:00
|
|
|
BrokerDiagnostics eventbus.EventBus
|
|
|
|
|
WorkerRepo repository.WorkerRepository
|
feat: add self-hosted update awareness and one-click updates: every binary is stamped with its version and commit, the backend polls GitHub Releases and a new host-side updater (cmd/updater, compose profile or systemd unit) reports the checkout's commit distance, the admin panel's top bar shows a version pill that turns into an update indicator and opens a dialog with confirmation, live step progress and log, restart tracking and result, the dashboard header shows the same pill to every member of a self-hosted instance with the full update flow for platform admins, Setup and health gains update_available and updater_unreachable checks, warmblyctl status prints the version, make upgrade and scripts/upgrade-bare-metal.sh cover the by-hand paths, and docs gain an Updates page plus configuration, health, deployment and API reference updates
2026-09-03 04:05:42 -07:00
|
|
|
// UpdatesService backs the admin panel's update indicator and button.
|
|
|
|
|
UpdatesService *updates.Service
|
feat(admin): manage worker fleet from dashboard with encrypted credentials and GitHub release auto-update
Workers are no longer curl|sh-only. Admins add and manage them from the
dashboard over SSH, with all runtime config (Kafka, Schema Registry,
Redis, AWS keys) stored encrypted via the existing KMS-envelope cipher
service.
Worker lifecycle:
1. Admin POSTs host/port/user. Backend generates an ed25519 keypair,
encrypts the private key under uuid.Nil (platform identity), and
stores the row in 'pending' state.
2. Admin pastes the returned public key into the VPS's authorized_keys.
3. Test connection — runs `true` over SSH, pins the host SHA256
fingerprint on first success (TOFU).
4. Install — backend scp's install-worker.sh + a per-worker env file
and runs it. State moves pending → provisioning → installed.
5. From then on: restart, update image, apply config, uninstall,
rotate keys, tail logs, live status, OS package update, reboot —
all dashboard buttons backed by SSH operations.
Credentials are reusable entities:
- aws_credentials: named keypair, secret encrypted at rest
- worker_profiles: bundles Kafka + Schema Registry + Redis + image +
release channel, references one AWS credentials row
- workers.profile_id links a worker to a profile; many workers can
share one profile
Saving a profile doesn't restart anything. The dashboard compares
profile.updated_at to each worker's config_applied_at and shows a
"stale config" badge; Apply rewrites /etc/warmbly/worker.env over SSH
and restarts the unit.
Auto-update on GitHub release:
- profile.release_channel ∈ {pinned, stable, dev}
- profile.auto_update toggles automatic rollout
- Trigger model is push, not poll: one check on backend boot, then
the /webhooks/github/releases endpoint (HMAC-validated with
RELEASES_WEBHOOK_SECRET) on every release event. Manual "Check now"
button as fallback.
- When a new tag resolves, the orchestrator SSHes into each assigned
worker, runs install-worker.sh --update --image <new>, which now
rewrites the systemd unit (not just `docker pull`) so the image
actually changes. workers.image_version captures the running tag
for the UI's "v1.2.3 → v1.2.4" diff.
Self-hostable: every release knob is env-driven —
RELEASES_GITHUB_REPO, RELEASES_WORKER_IMAGE_REPO,
RELEASES_WEBHOOK_SECRET, RELEASES_GITHUB_TOKEN, RELEASES_ENABLED. Set
RELEASES_ENABLED=false to disable the feature entirely.
OS-level updates and reboot are also exposed: detect apt / dnf / yum /
pacman / apk, run the right upgrade noninteractively, return the full
output and a reboot-required flag. Reboots are never automatic.
Migrations:
000028_worker_ssh — ssh fields, install_state enum, last_seen,
host fingerprint
000029_worker_credentials — aws_credentials + worker_profiles +
workers.profile_id + workers.config_applied_at
000030_worker_releases — release_channel enum, auto_update,
resolved_image_tag, workers.image_version
Endpoints added:
POST /admin/workers (create + keypair)
GET /admin/workers/managed
GET /admin/workers/:id/managed
POST /admin/workers/:id/{test,install,restart,upgrade,uninstall,rotate-keys,apply,system-update,reboot}
PUT /admin/workers/:id/profile
GET /admin/workers/:id/{live-status,logs}
DELETE /admin/workers/:id
GET /admin/aws-credentials CRUD
GET /admin/worker-profiles CRUD + /workers + /apply + /release
GET /admin/releases/state
POST /admin/releases/check
POST /webhooks/github/releases public, HMAC-validated
Admin UI:
/app/admin/workers list with status + version columns
/app/admin/workers/new add form with profile dropdown
/app/admin/workers/:id detail with all actions + logs + system update
/app/admin/credentials tabs: AWS credentials + worker profiles,
Releases panel, channel selector +
auto-update toggle in profile form
2026-05-18 13:09:11 +00:00
|
|
|
|
2026-01-29 05:59:04 +01:00
|
|
|
// Notifications
|
|
|
|
|
EmailNotificationService notify.EmailNotificationService
|
2026-05-24 04:06:07 +00:00
|
|
|
|
2026-02-20 08:59:17 +00:00
|
|
|
// Advanced outreach controls
|
|
|
|
|
AdvancedService advanced.Service
|
feat: give every campaign email a working opt-out: a reply-to-opt-out line by default or an unsubscribe link (workspace setting under Settings > Sending with a per-campaign override and a {{.UnsubscribeLink}} variable), signed per-recipient unsubscribe links served on the API origin so the List-Unsubscribe header no longer points at a dead warmbly.com page, a confirm page on GET with RFC 8058 one-click on POST and a resubscribe button, reply opt-out detection through the whole-word compliance lexicon with quoted history stripped, a first-class suppression list (Contacts tab, GET/POST/DELETE /suppressions with address and domain entries, audited removal, contact drawer action), the contact Subscribed flag enforced in campaign routing, migration 000122 with a shared recipient_suppressed() predicate, and docs for all of it
2026-09-03 01:52:40 -07:00
|
|
|
// UnsubscribeLinks verifies the signed tokens on recipient unsubscribe
|
|
|
|
|
// links. Nil when the instance has no public API URL to mint them on.
|
|
|
|
|
UnsubscribeLinks *unsublink.Signer
|
2026-09-15 00:42:45 -07:00
|
|
|
// UnsubscribeTickets resolves the short form of those links. Nil means
|
|
|
|
|
// only the self-contained signed tokens are honoured.
|
|
|
|
|
UnsubscribeTickets repository.UnsubscribeLinkRepository
|
2026-04-03 06:08:52 +00:00
|
|
|
|
feat: add website visitor tracking for issue #255 with migration 000106 (website_tracking_settings, website_visitors, website_page_hits, all registered in the orgtransfer spec), a consent-gated dependency-free tracking.js served by the Rust tracking service with a rate-limited, size-capped, prefetch-filtered POST /p ingest that forwards to a new backend internal page-hits endpoint for server-side user-agent and GeoIP enrichment, contact identification only through the click ticket the redirect appends to registered hosts, a per-workspace retention job, page_hit events with an expandable detail view in the contact Activity timeline, a Settings > Website tracking page for the snippet and consent, location and retention configuration, realtime PAGE_HIT fanout, and a website tracking guide plus endpoint, export and configuration docs
2026-08-29 03:25:50 -07:00
|
|
|
// Website tracking snippet: settings and the page-view ingest path.
|
|
|
|
|
WebsiteTrackingService websitetracking.Service
|
|
|
|
|
|
2026-06-03 16:47:53 +02:00
|
|
|
// Pre-send email verification (control-plane SMTP RCPT probe / pluggable
|
|
|
|
|
// paid backend). Drops hard-bouncing addresses before a worker sends.
|
|
|
|
|
EmailVerifyService emailverifyapp.Service
|
|
|
|
|
|
feat: give each mailbox a human sending persona (randomized daily and hourly caps, send spacing, work start/end, lunch break and working weekdays, rolled once per local day in the mailbox's own timezone and applied across the campaign, warmup and smart-send schedulers), add campaign auto-pause guardrails that stop a campaign when its bounce, complaint or reply rate leaves the configured band, make mailbox rotation actually rotate for tag-resolved and all-mailbox campaigns, stop every scheduler from ever returning a slot in the past, and correct the mailbox min-gap field that stored seconds while labelling them minutes
2026-08-13 16:51:29 +02:00
|
|
|
// Per-mailbox human sending behaviour: the ranges a mailbox rolls its
|
|
|
|
|
// workday from, and the plan it rolled for today. Nil disables the
|
|
|
|
|
// behaviour endpoints (the schedulers then run every mailbox on its fixed
|
|
|
|
|
// cap and gap).
|
|
|
|
|
BehaviorService behavior.Service
|
|
|
|
|
|
2026-04-09 15:57:04 +00:00
|
|
|
// Warmup health
|
|
|
|
|
WarmupService warmup.Service
|
|
|
|
|
|
2026-05-25 15:42:50 +00:00
|
|
|
// Warmup routing rules — customer-defined preferences for premium-pool
|
|
|
|
|
// partner selection (e.g. Gmail recipients from Google Workspace senders).
|
|
|
|
|
WarmupRoutingRepo repository.WarmupRoutingRepository
|
|
|
|
|
|
2026-06-03 05:05:53 +02:00
|
|
|
// Warmup content bank + offline AI generator (admin control/visibility).
|
|
|
|
|
WarmupContentRepo repository.WarmupContentRepository
|
|
|
|
|
WarmupContentService warmupcontent.Service
|
|
|
|
|
|
2026-06-05 06:03:13 +02:00
|
|
|
// AI writing assistant + credit ledger.
|
|
|
|
|
CreditService credits.CreditService
|
|
|
|
|
WritingGenerator generation.WritingGenerator
|
|
|
|
|
|
2026-07-13 17:52:09 +02:00
|
|
|
// AI provider layer (RunAgent tool-loop backend) + pluggable web search,
|
|
|
|
|
// shared by the dashboard agent, research, automation AI nodes, and the
|
|
|
|
|
// inbox agent. Nil when no LLM provider is configured.
|
|
|
|
|
AIProvider generation.Provider
|
feat: shared TypeSafe client under internal/pkg/typesafe with inbox tagging phases 2 and 3 (hold, stop, task, suppress behind workspace switches, reversible ones on by default), labels seeded at workspace creation and by the follow-up sweep, premade inbox views (hot leads, needs a reply, follow up, declined, automated), typed reply classification and a reply_intent branch condition, an inbox agent draft gate, Advisor copy judgment with a cached editor re-check, warmup content lint, bounce cause classification that keeps a blocked address sendable, and per-form submission triage
2026-09-19 23:33:37 -07:00
|
|
|
// TypeSafe is the shared typed-judgment client. Nil when no key is
|
|
|
|
|
// configured; every endpoint that reads it degrades to its rules-only
|
|
|
|
|
// answer.
|
|
|
|
|
TypeSafe typesafe.Asker
|
|
|
|
|
AISearch generation.SearchClient
|
2026-07-13 17:52:09 +02:00
|
|
|
|
2026-07-13 18:15:58 +02:00
|
|
|
// AITools is the shared tool registry the dashboard agent and MCP server
|
|
|
|
|
// run on. Handlers bound to the invoking user's permissions.
|
|
|
|
|
AITools *aitools.Registry
|
|
|
|
|
|
feat: dashboard-wide AI assistant with streamed tool-use runs, per-action approvals, and per-iteration credits - agent_sessions/agent_messages/ai_tool_policies migration, aiagent service runs the M2 registry through the provider loop over a resumable jsonb transcript, streams text/tool-step/approval/done events over SSE, gates write tools behind approve/deny/always-allow (send always per-action) and charges 1 credit per iteration (budget 20, refund on provider failure, out-of-credits 402 insufficient_credits, cap 429 usage_cap_exceeded) with a resume-safe idempotency namespace, provider PreIteration budget hook, /ai/sessions endpoints (cursor list + two SSE runs) gated by membership with tools bound to the member's org-permission bits, APIPermAIAgent bit 22, ai_session audit entity + spine, and a right-side resizable panel (Cmd+I / sparkle button) with streamed text, collapsible tool steps, inline approval and draft-artifact deep-link cards, stop, new chat, and a credits/budget meter; tenancy enforced at the SQL layer and docs for the assistant, endpoints, permissions, and error codes
2026-07-13 18:46:43 +02:00
|
|
|
// AIAgentService orchestrates the dashboard agent (sessions, SSE runs,
|
|
|
|
|
// approvals, per-iteration credits). Nil when no LLM provider is configured.
|
|
|
|
|
AIAgentService aiagent.Service
|
|
|
|
|
|
feat: AI contact research agent that gathers cited web findings per contact with sync and background-batch runs - contact_research_runs table plus a strict save_research schema (every signal and public_artifact must carry a url, confidence high/medium/low, signals<=5 hooks<=3, reject-and-reprompt once then fail), a text/template runtime prompt injecting org voice, contact record, objective, and 5-search/6-fetch budgets, a research service that drives search_web/fetch_url through the provider loop and charges 2 credits on save (billable even for nothing_found, refund-free since charged only on save, balance and abuse-cap pre-checked so a capped org never does free work), POST/GET /contacts/:id/research plus a 500-cap /contacts/research/batch draining through a bounded pool of 4 workers over FOR-UPDATE-SKIP-LOCKED claims (no new Kafka), an org-scoped AI_RESEARCH_PROGRESS realtime event gated to view_contacts, APIPermAIResearch bit 23, a ContactEdit Research tab and a ContactsTable bulk Research action, and docs; also org-scopes every credit and research idempotency key so a client-supplied Idempotency-Key can never replay across tenants
2026-07-13 19:34:11 +02:00
|
|
|
// ResearchService runs the AI contact-research agent (sync + batch).
|
|
|
|
|
ResearchService research.Service
|
|
|
|
|
|
feat: org AI skills (playbooks) that every AI feature loads and follows - ai_skills table (org-scoped, unique name per org, 32KB content cap) with a skills service exposing CRUD plus an enabled-skills preamble injected into the dashboard agent, contact research, and reply-draft prompts and a load_skill read-tool that returns a playbook's full content by name, /ai/skills CRUD gated on manage_settings (JWT) or the AI_AGENT scope (API) with an ai_skill audit entity and spine entry, an AI skills settings page (list rows opening a right-side drawer with name, one-line description, enable toggle, and a markdown body), and docs with two example playbooks
2026-07-13 19:46:25 +02:00
|
|
|
// SkillsService manages org AI skills (playbooks) and injects them into AI
|
|
|
|
|
// prompts.
|
|
|
|
|
SkillsService skills.Service
|
|
|
|
|
|
2026-07-13 20:05:24 +02:00
|
|
|
// MCPService manages org-connected MCP servers (external tools).
|
|
|
|
|
MCPService mcp.Service
|
|
|
|
|
|
feat: inbox agent that drafts a suggested unibox reply on inbound human replies for human approve/edit/discard - paid + per-org opt-in (organizations.inbox_agent_enabled) feature where the consumer's reply hook, on a non-automated reply, detaches a goroutine (panic-contained, never blocks ingest) that checks entitlement, dedupes via ai_thread_drafts partial unique indexes (one pending per thread, unique source_message_id), pre-checks balance, grounds a reply in the thread history + org voice + skills via generation.Provider.Complete, reserves a draft row then charges 5 credits (idempotency inbox_agent:<draft.ID>, row unwound on a fresh context if the charge fails so no unpaid draft lingers), and emits an org-scoped AI_DRAFT_READY event gated on access_unibox; the agent never sends - only a human POST to /unibox/agent-drafts/:id/approve sends through the normal reply path, claiming pending->approved before send with an approved->pending revert on send failure, alongside list + discard endpoints; plus the unibox awaiting_agent_draft badge + agent_drafts search scope, an AgentDraftCard in the thread view with inline-editable approve-and-send/discard, the workspace settings opt-in toggle, CanUseInboxAgent paid gate, migration 000065, and docs (inbox-agent guide, endpoints, realtime)
2026-07-14 06:13:27 +02:00
|
|
|
// AIDraftRepo stores inbox-agent reply drafts awaiting human review (M10).
|
|
|
|
|
// The draft is created in the consumer; these list/approve/discard handlers
|
|
|
|
|
// read + resolve it. Nil disables the review endpoints.
|
|
|
|
|
AIDraftRepo repository.AIDraftRepository
|
|
|
|
|
|
2026-06-03 16:47:53 +02:00
|
|
|
// Seed inbox-placement testing.
|
|
|
|
|
PlacementRepo repository.PlacementRepository
|
|
|
|
|
PlacementService placement.Service
|
|
|
|
|
|
feat: add the Advisor, continuous sending checks surfaced on the row they are about (#86)
* feat: index advisor findings by subject and parent entity so a list page fetches its whole surface once and every row resolves its own advice from the shared cache instead of firing a request per row
* feat: rebuild the advisor fix drawer as a three-screen resolution flow (why it fired with the measured evidence, the exact before and after, then an animated outcome with undo) with a progress rail and direction-aware transitions, and deep-link manual fixes to the screen where they are made
* feat: add AdvisorRowFlag, the inline per-row advisor indicator that renders on the mailbox or campaign the problem is about and opens that row's findings in an anchored panel instead of making the reader join a card list against a table
* feat: add AdvisorSummaryBar, a one-line collapsible page summary that replaces the stack of advisor cards above a list, counts the distinct rows implicated rather than the findings, and forces itself open only for critical or workspace-level advice no row flag can carry
* feat: put advisor advice on the mailbox row it is about in the accounts list, replace the card stack above the table with the collapsible summary bar, and support ?mailbox=<id> so a finding can deep-link straight to the mailbox detail instead of the top of the list
* feat: flag advisor findings on the campaign row in the campaigns list, including step-level copy problems which index onto their parent campaign since a step has no row of its own, and add the collapsible summary bar above the list
* feat: move the deliverability and contacts pages onto the collapsible advisor summary bar so their findings stop pushing the numbers they describe below the fold
* feat: add an ordered Steps field to advisor findings, persisted as text[] and always refreshed from the current build, and write real how-to steps for the deliverability checks that have no one-click fix (bounce rate, spam placement, tracking domain, and per-record SPF/DKIM/DMARC instructions)
* feat: write ordered how-to steps for the manual advisor findings where the remedy alone leaves someone stuck (broken template syntax, missing first-name fallback, unsubscribed contacts still enrolled, a campaign with no resolvable sender, and a mailbox that lost warmup pool standing) and correct the personalization detail that named a merge syntax this product does not use
* feat: show a mailbox's advisor findings at the top of its detail drawer, which is where both the row flag and the ?mailbox deep link now land
* feat: open the resolution flow from findings that have no one-click fix too, since the ordered how-to lives there and a card with no Fix button previously left the steps unreachable
* docs: document the per-row advisor flags, the collapsible page summary, the three-screen resolution flow, and the ordered manual steps for findings with no one-click fix
* feat: align the advisor summary bar to the px-5 page gutter used by SectionBar and the list rows on all four surfaces, instead of sitting flush against the edge while the table it describes is indented
* fix: stop the resolution drawer collapsing to zero height between screens by switching the step transition to popLayout with a layout-animated container, so the dialog resizes into the next screen instead of snapping shut and reopening
* feat: wire the advisor repository, narrator, service, tool registration, and background runner into the backend boot path so findings evaluate on a schedule and the assistant can read them
* docs: register the advisor guide in the sidebar, add its endpoint scope table to the API reference, and document the sandbox advisor showcase
* fix: darken the advisor nav badge to solid orange-600 on white instead of a pale amber-100 chip that read as a disabled control beside the sidebar's saturated indicators, and drop the critical badge to rose-600 so the two stay in the same weight class
* fix: use orange-500 for the advisor nav badge, matching the high-severity dot on the row it points at, rather than the darker orange-600
* feat: add an Auto safety class to advisor actions and mark the seven fixes autopilot may apply unattended (the cap cuts, the send-gap widen, the campaign limit matches, and the unsubscribe header), with a test pinning the boundary so nothing that halts sending or generates new outbound mail can drift into it
* feat: add advisor autopilot, which applies the auto-safe fixes unattended as the member who switched it on, resolving their live permissions each run so it fails closed when they leave the org, bounded to 10 changes per evaluation and audited per fix like any hand-made change
* feat: add the advisor agent fix, a bounded per-finding agent run that resolves the problems a settings change cannot (broken template syntax, bulk-reading copy, shared-inbox lists) as the calling member inside a tool allowlist scoped to the finding's category, metered per iteration and marked applied only when it actually called a write tool
* feat: surface autopilot and the agent fix in the dashboard, adding the workspace toggle that names exactly which changes it may make, an Auto chip on the findings it is allowed to take, and an agent-fix path in the resolution drawer that reports the tools it actually called rather than only its own account of them
* docs: document the agent fix and autopilot, naming the exact set of changes autopilot may make, that it acts as the member who enabled it and stops when they leave, and why the agent-fix endpoint is JWT only
* fix: gate the agent fix per detector instead of per category, so a missing DMARC record no longer offers a Fix-with-agent button it can never satisfy and then reports failure; findings whose fix lives in DNS or a provider console now show their manual steps, and the client is told which is which via agent_fixable
* feat: soften the advisor surfaces to translucent washes, replacing the filled nav badge with a tinted pill that carries its colour in the text, frosting the row panel and the resolution drawer, and turning the severity chips and cards into layers the page shows through
* docs: correct the agent-fix scope to name the findings it cannot resolve, and why a DNS record shows steps instead of a button
* feat: ship the actual DNS records for the findings that live outside the platform, with the provider's SPF include resolved, the DMARC record scoped to the sending domain and starting at p=none, the DKIM host plus the console that generates its value, and a tracking CNAME pointing at this install's own tracking host
* feat: render advisor snippets as labelled copy-button rows so a DNS record is one click per field rather than a text-selection exercise, with no copy affordance on a value the server could not supply
* docs: document the pasteable DNS records and the guarantee that every check offers a fix, an agent, or ordered steps
* fix: bump golang.org/x/text to 0.39.0 to clear CVE-2026-56852, a HIGH-severity infinite loop in norm.Iter that Trivy started failing the security scan on
2026-07-30 17:15:09 +02:00
|
|
|
// Advisor: continuously-evaluated recommendations about deliverability,
|
|
|
|
|
// mailbox config, warmup, campaign performance, copy, and list hygiene.
|
|
|
|
|
// The repository is held alongside the service so a read can cheaply check
|
|
|
|
|
// how stale the findings are before deciding to re-evaluate inline.
|
|
|
|
|
AdvisorService advisor.Service
|
|
|
|
|
AdvisorRepository repository.AdvisorRepository
|
|
|
|
|
|
2026-05-25 16:03:13 +00:00
|
|
|
// Customer-facing webhooks (subscribe → HMAC-signed delivery).
|
|
|
|
|
WebhookService webhook.Service
|
|
|
|
|
|
feat(integration): backend foundation for tier 1+2 integrations
Adds an integrations app module covering the providers from the tier 1/2
plan: Calendly, Cal.com, Google Sheets, Google Postmaster, Microsoft SNDS,
DMARC ingestion, and Cloudflare/GoDaddy/Namecheap DNS. One unified
migration provisions integration_connections, dmarc_reports + record
rows, postmaster_snapshots, dns_verifications, and meeting_bookings.
The service exposes a generic CRUD surface for connection state with
per-provider files for parsing (calendly.go, dmarc.go), HTTP clients
(cloudflare.go, postmaster.go, google_sheets.go), and DNS verification
(dns.go). Inbound webhook routes use per-org URL-embedded secrets so
Calendly/Cal.com/DMARC providers post directly without Warmbly auth.
DNS verifier resolves SPF/DKIM/DMARC + tracking CNAME and surfaces
fixes when a record is missing.
2026-05-28 08:19:10 +02:00
|
|
|
// Third-party integrations (Calendly, Cal.com, DMARC, Postmaster,
|
|
|
|
|
// SNDS, Cloudflare, GoDaddy, Namecheap, Google Sheets).
|
|
|
|
|
IntegrationService integration.Service
|
|
|
|
|
ContactRepo repository.ContactRepository
|
|
|
|
|
|
2026-10-03 15:35:10 +02:00
|
|
|
// SlackService is the Slack app (request URLs and the dashboard's Slack
|
|
|
|
|
// panel). Nil answers slack_not_configured.
|
|
|
|
|
SlackService *slackapp.Service
|
|
|
|
|
|
feat: add HubSpot CRM mode where HubSpot deals, pipelines, tasks, notes and owners are mirrored and written through, sends and replies log as HubSpot emails, exit rules hold campaigns, list import, sync health, setup wizard in web, HubSpot app project with record card and workflow action, and docs
2026-10-04 07:39:46 +02:00
|
|
|
// HubSpot runs a workspace's CRM on HubSpot when it chooses so. Nil on
|
|
|
|
|
// processes built without it.
|
|
|
|
|
HubSpot *hubspot.Service
|
2026-10-04 19:20:48 +02:00
|
|
|
// Pipedrive runs a workspace's CRM on Pipedrive when it chooses so.
|
|
|
|
|
Pipedrive *pipedrive.Service
|
|
|
|
|
// CRMModes routes the CRM mode endpoints to the CRM a workspace runs on.
|
|
|
|
|
CRMModes *crmmode.Registry
|
feat: add HubSpot CRM mode where HubSpot deals, pipelines, tasks, notes and owners are mirrored and written through, sends and replies log as HubSpot emails, exit rules hold campaigns, list import, sync health, setup wizard in web, HubSpot app project with record card and workflow action, and docs
2026-10-04 07:39:46 +02:00
|
|
|
|
2026-06-13 13:56:39 +02:00
|
|
|
// OAuth 2.1 authorization server (third-party app registration + the
|
|
|
|
|
// authorization-code-with-PKCE flow + bearer-token validation).
|
|
|
|
|
OAuthService *oauth.Service
|
|
|
|
|
|
2026-10-03 09:24:34 -07:00
|
|
|
// AppDirectoryService is the community app directory (published OAuth apps).
|
|
|
|
|
AppDirectoryService *appdirectory.Service
|
|
|
|
|
|
2026-06-08 06:25:40 +02:00
|
|
|
// Realtime publisher for handler paths that emit live dashboard events
|
|
|
|
|
// directly (inbound meeting webhooks have no service layer of their own).
|
|
|
|
|
// nil-safe: realtime is a nicety, not a requirement.
|
|
|
|
|
StreamingPublisher *pubsub.StreamingPublisher
|
|
|
|
|
|
2026-06-04 11:49:55 +02:00
|
|
|
// On-demand Google Sheets -> leads sync. Reuses the google_sheets OAuth
|
|
|
|
|
// connection's token to read sheets and the contact import path to upsert.
|
|
|
|
|
LeadSyncService leadsync.Service
|
|
|
|
|
|
feat: add native Salesforce sync with Lead and Contact matching and links, a leased activity outbox that logs sends, replies, bounces, opt-outs and meetings as Tasks, Lead Status and Email Opt Out writeback, a pull loop with CRM pause rules, list view and Campaign imports, sandbox and My Domain OAuth that refreshes expired sessions, a Salesforce settings page with contact and inbox cards in web, and docs
2026-10-04 08:49:30 +02:00
|
|
|
// SalesforceService is the native Salesforce sync: settings, imports, the
|
|
|
|
|
// activity log and the contact panel.
|
|
|
|
|
SalesforceService *salesforce.Service
|
|
|
|
|
|
2026-10-11 12:41:56 +02:00
|
|
|
// ApolloService imports Apollo lists and enriches contacts through Apollo.
|
|
|
|
|
ApolloService *apollo.Service
|
|
|
|
|
// ClayService takes rows from Clay tables and sends events back to them.
|
|
|
|
|
ClayService *clay.Service
|
|
|
|
|
|
2026-04-03 06:08:52 +00:00
|
|
|
// Public websocket URL used by frontend clients
|
|
|
|
|
WebsocketURI string
|
feat: settings overhaul, avatars, RBAC, plan alignment, perf
Backend:
- Fix contact-create 500 (nil custom_fields, doubled slice, bad RETURNING SQL)
- Avatar upload: migration 000033, S3 public-read, PNG/JPG only,
client-resized to 512px + server dimension cap (1024px)
- Pull avatar_url through user + organization repo queries
Frontend:
- Settings restructured into nested routes with a rail layout
(/app/settings/{profile,notifications,security,members,roles,
workspace,billing,danger}); flat Section/Row primitives replace
the per-card rectangles; Save buttons only render when dirty
- Standalone /app/billing and /app/team removed; legacy URLs
redirect to the settings sections; UserNav trimmed accordingly
- CRM rebuilt: Pipelines CRUD + stage editor, Deals kanban with
HTML5 drag/drop, Tasks bucketed by due-date with inline toggle.
Frontend models realigned with backend (Deal.name, CRMTask.status
enum, paginated list shapes)
- Avatars: AvatarUploader component, client-side canvas resize,
wired into Profile + Workspace settings; UserNav + OrgSwitcher
render the uploaded image with initials fallback
- RBAC: lib/permissions.ts mirrors organization_permission.go;
inline role picker in Members; Roles & access section shows the
permission matrix and per-role member counts
- Audit log page at /app/audit, gated to owner+admin via canManage
- Plans aligned with warmbly-web pricing: Starter/Grow/Business/
Enterprise via lib/plans.ts; PlanPill, billing page, sidebar
badges and LockedSurface all read from the same catalogue
- Header PlanPill shows current plan with status-aware coloring;
sidebar locked rows show the required-plan badge instead of a
generic lock icon
Perf:
- QueryClient defaults (staleTime: 30s, refetchOnWindowFocus: false,
retry: 1) — kills 3-5 round-trip storm on every navigation
- useSubscription, usePlans → staleTime: Infinity (only invalidate
on plan-change mutations); useUser/Timezones/Orgs get long stales
with refetchOnMount: false
- vite.config: optimizeDeps for heavy libs + server.warmup for the
most-mounted entry pages
2026-05-23 16:04:24 +00:00
|
|
|
|
|
|
|
|
// Object storage for user-uploaded artifacts (avatars, etc.).
|
2026-05-27 14:43:36 +00:00
|
|
|
Storage storage.Store
|
|
|
|
|
|
|
|
|
|
// Encrypted-DEK store. Served to workers over HTTPS at
|
|
|
|
|
// /api/v1/internal/dek/:userID so workers don't need direct Postgres
|
|
|
|
|
// access. Backend processes use Postgres directly; workers use the
|
|
|
|
|
// HTTP-proxy implementation.
|
|
|
|
|
EncryptedKeys encryptedkeys.Store
|
feat: settings overhaul, avatars, RBAC, plan alignment, perf
Backend:
- Fix contact-create 500 (nil custom_fields, doubled slice, bad RETURNING SQL)
- Avatar upload: migration 000033, S3 public-read, PNG/JPG only,
client-resized to 512px + server dimension cap (1024px)
- Pull avatar_url through user + organization repo queries
Frontend:
- Settings restructured into nested routes with a rail layout
(/app/settings/{profile,notifications,security,members,roles,
workspace,billing,danger}); flat Section/Row primitives replace
the per-card rectangles; Save buttons only render when dirty
- Standalone /app/billing and /app/team removed; legacy URLs
redirect to the settings sections; UserNav trimmed accordingly
- CRM rebuilt: Pipelines CRUD + stage editor, Deals kanban with
HTML5 drag/drop, Tasks bucketed by due-date with inline toggle.
Frontend models realigned with backend (Deal.name, CRMTask.status
enum, paginated list shapes)
- Avatars: AvatarUploader component, client-side canvas resize,
wired into Profile + Workspace settings; UserNav + OrgSwitcher
render the uploaded image with initials fallback
- RBAC: lib/permissions.ts mirrors organization_permission.go;
inline role picker in Members; Roles & access section shows the
permission matrix and per-role member counts
- Audit log page at /app/audit, gated to owner+admin via canManage
- Plans aligned with warmbly-web pricing: Starter/Grow/Business/
Enterprise via lib/plans.ts; PlanPill, billing page, sidebar
badges and LockedSurface all read from the same catalogue
- Header PlanPill shows current plan with status-aware coloring;
sidebar locked rows show the required-plan badge instead of a
generic lock icon
Perf:
- QueryClient defaults (staleTime: 30s, refetchOnWindowFocus: false,
retry: 1) — kills 3-5 round-trip storm on every navigation
- useSubscription, usePlans → staleTime: Infinity (only invalidate
on plan-change mutations); useUser/Timezones/Orgs get long stales
with refetchOnMount: false
- vite.config: optimizeDeps for heavy libs + server.warmup for the
most-mounted entry pages
2026-05-23 16:04:24 +00:00
|
|
|
|
2026-09-10 13:58:59 +02:00
|
|
|
// The instance's root of trust, used by /api/v1/internal/dek/decrypt to
|
|
|
|
|
// open a sealed key for a node that holds no KMS credential of its own.
|
|
|
|
|
// Nothing else in the handler layer touches it: application crypto goes
|
|
|
|
|
// through the cipher service.
|
|
|
|
|
KMS kms.Provider
|
|
|
|
|
|
2026-06-02 15:54:12 +02:00
|
|
|
// Worker messageId -> internal email map, served to workers over HTTPS at
|
|
|
|
|
// /api/v1/internal/email-message-map for the same no-direct-Postgres reason
|
|
|
|
|
// as EncryptedKeys. Backed by Postgres in the backend.
|
|
|
|
|
EmailMessageMap repository.EmailMessageMapRepository
|
|
|
|
|
|
2026-08-18 09:09:52 -07:00
|
|
|
// Mailbox sync state, read by the dashboard (GET /emails/:id/sync) and by
|
|
|
|
|
// the worker's priority lane over /api/v1/internal/sync/own-conversation.
|
|
|
|
|
EmailSyncState repository.EmailSyncStateRepository
|
2026-10-07 12:38:58 +00:00
|
|
|
WarmupDispatch repository.WarmupDispatchRepository
|
2026-08-18 09:09:52 -07:00
|
|
|
|
2026-06-11 09:30:21 +02:00
|
|
|
// Click-link store, served to the tracking service over HTTPS at
|
|
|
|
|
// /api/v1/internal/tracked-links/:id (same no-direct-Postgres rule).
|
|
|
|
|
TrackedLinks repository.TrackedLinkRepository
|
|
|
|
|
|
2026-09-17 10:59:16 +00:00
|
|
|
// InboxTagRepo backs the automatic-tagging review page. Optional: nil when
|
|
|
|
|
// the feature was never configured, and the endpoint says so rather than
|
|
|
|
|
// failing.
|
|
|
|
|
InboxTagRepo repository.InboxTagRepository
|
|
|
|
|
|
2026-09-09 08:56:08 -07:00
|
|
|
// Verified custom tracking and forms domains, read by the on-demand TLS
|
|
|
|
|
// gate at /tls/authorize so a reverse proxy can obtain a certificate for a
|
|
|
|
|
// hostname that was not known when the instance was installed.
|
|
|
|
|
CustomDomains repository.CustomDomainRepository
|
|
|
|
|
|
feat: settings overhaul, avatars, RBAC, plan alignment, perf
Backend:
- Fix contact-create 500 (nil custom_fields, doubled slice, bad RETURNING SQL)
- Avatar upload: migration 000033, S3 public-read, PNG/JPG only,
client-resized to 512px + server dimension cap (1024px)
- Pull avatar_url through user + organization repo queries
Frontend:
- Settings restructured into nested routes with a rail layout
(/app/settings/{profile,notifications,security,members,roles,
workspace,billing,danger}); flat Section/Row primitives replace
the per-card rectangles; Save buttons only render when dirty
- Standalone /app/billing and /app/team removed; legacy URLs
redirect to the settings sections; UserNav trimmed accordingly
- CRM rebuilt: Pipelines CRUD + stage editor, Deals kanban with
HTML5 drag/drop, Tasks bucketed by due-date with inline toggle.
Frontend models realigned with backend (Deal.name, CRMTask.status
enum, paginated list shapes)
- Avatars: AvatarUploader component, client-side canvas resize,
wired into Profile + Workspace settings; UserNav + OrgSwitcher
render the uploaded image with initials fallback
- RBAC: lib/permissions.ts mirrors organization_permission.go;
inline role picker in Members; Roles & access section shows the
permission matrix and per-role member counts
- Audit log page at /app/audit, gated to owner+admin via canManage
- Plans aligned with warmbly-web pricing: Starter/Grow/Business/
Enterprise via lib/plans.ts; PlanPill, billing page, sidebar
badges and LockedSurface all read from the same catalogue
- Header PlanPill shows current plan with status-aware coloring;
sidebar locked rows show the required-plan badge instead of a
generic lock icon
Perf:
- QueryClient defaults (staleTime: 30s, refetchOnWindowFocus: false,
retry: 1) — kills 3-5 round-trip storm on every navigation
- useSubscription, usePlans → staleTime: Infinity (only invalidate
on plan-change mutations); useUser/Timezones/Orgs get long stales
with refetchOnMount: false
- vite.config: optimizeDeps for heavy libs + server.warmup for the
most-mounted entry pages
2026-05-23 16:04:24 +00:00
|
|
|
// Direct repositories used by handlers that don't yet have a
|
|
|
|
|
// service layer (avatars, etc.). Keep narrow and add a service
|
|
|
|
|
// only when business logic accumulates.
|
2026-09-09 04:54:01 -07:00
|
|
|
UserRepo repository.UserRepository
|
|
|
|
|
OrgRepo repository.OrganizationRepository
|
|
|
|
|
AttachmentRepo repository.AttachmentRepository
|
|
|
|
|
EmailImageRepo repository.EmailImageRepository
|
|
|
|
|
StorageBackendRepo repository.StorageBackendRepository
|
|
|
|
|
FleetNodeRepo repository.FleetNodeRepository
|
|
|
|
|
FleetSettingsRepo repository.FleetSettingsRepository
|
2026-05-24 04:12:10 +00:00
|
|
|
|
2026-05-24 04:06:07 +00:00
|
|
|
// Danger zone (delayed deletions for orgs & user accounts)
|
|
|
|
|
DangerZoneService dangerzone.Service
|
2026-07-12 09:00:10 +02:00
|
|
|
|
feat: organization data export and import for moving a workspace between instances (#132)
* feat: add the org_export_jobs and org_import_jobs tables plus the models behind them, so a whole organization can be written to a portable archive and read back on another instance, keeping the option columns typed (a text[] of data groups, an include_secrets boolean, a conflict_strategy check constraint) rather than a settings blob because the option set is small and fixed, and reserving jsonb only for the genuinely free-form parts that are read back for display alone (the source archive's manifest, per-table row counts, the import warning list), with partial indexes on the in-flight and expiring rows so the maintenance sweep stays cheap however much transfer history accumulates, an OrgDataGroup catalog that names the twelve slices of a workspace and carries the dependencies between them, and an org_archive audit entity so an export or import rides the existing audit spine into every teammate's dashboard
* feat: add the schema-generic repository behind workspace archives, which reads and writes tables by name rather than through typed structs because that is the only way an archive stays correct as the schema grows, moving rows as jsonb in both directions via to_jsonb on the way out and jsonb_populate_recordset on the way in so Postgres performs every type conversion and no hand-written Go column mapping can drift from arrays, jsonb, tsvector, inet or enums, lifting the pool's 60s statement_timeout inside the export transaction because a full inbox read legitimately runs longer than that, introspecting generated, identity and not-null columns plus primary keys and foreign keys from the catalog rather than trusting a compiled list, and treating identifier safety as structural: table names come from the compiled registry and column names are always intersected against the destination catalog before reaching a query, so nothing out of an uploaded archive is ever interpolated
* feat: add the workspace archive registry and on-disk format, covering all 110 organization-owned relations with their scope SQL, dependency order and per-table policy, plus 10 explicitly excluded ones each carrying the reason it must never travel (the KMS-wrapped org data key, in-flight OAuth handshakes, the websocket outbox, live sessions, a pending deletion that would otherwise schedule the destination workspace for destruction), naming the two key domains separately because Warmbly seals mailbox credentials under the instance CREDENTIALS_ENCRYPTION_KEY and everything else under the per-organization DEK and confusing them produces mailboxes that authenticate against nothing, defining the archive as a plain zip of newline-delimited JSON so an operator can unzip it and read the data in a text editor and so the manifest can be written last yet still be read first, and sealing archive secrets under an argon2id passphrase key with parameters deliberately heavier than the login hash since it is derived once per archive and guards every credential in the workspace against offline grinding
* feat: implement the workspace export and import engines, streaming rows straight through untouched for the tables that have neither secrets nor blobs so a million-row inbox export stays cheap and only decoding the rows that must change, opening every sealed value against whichever key domain wrote it and re-sealing it under the archive passphrase on the way out then against the destination's own keys on the way in, blanking a credential rather than sinking the whole export when one mailbox cannot be read and clearing the guard flag alongside it so no row is left claiming ciphertext it no longer holds, applying an import inside a single transaction because a half-applied workspace is far worse than a long-running one, rewriting the organization id and matching members to destination accounts by email with unresolvable people blanked where the column is nullable and redirected to the importer where it is not, and running transfers in the accepting process rather than through a queue for the one reason that matters: the passphrase is then never written down anywhere
* feat: make the per-organization DEK cache nil-safe in internal/app/cipher so a process built without Redis falls through to KMS on every call instead of dereferencing a nil cache handle, which is what lets warmblyctl run the workspace export and import commands at all: it deliberately attaches Redis as optional because the whole point of that CLI is working while the rest of the instance is down, and the decrypted-key cache was always an optimisation rather than a requirement
* feat: add the hourly workspace-archive maintenance job that deletes finished archives past their seven-day retention window, since each one is a complete copy of a workspace sitting in object storage and must not accumulate, and closes out any export or import whose process died mid-run, which is the necessary counterpart to executing transfers in the accepting process so the passphrase is never persisted: without this sweep a restart would leave a job reporting running forever
* feat: expose workspace export and import over the JWT-only organization routes and wire the service into the backend, gating every endpoint on workspace ownership through the existing requireOrgOwner check rather than a permission bit because an export with credentials is the single most sensitive artifact this product can produce and an import rewrites the workspace wholesale, so both belong at the same level as deleting it, spooling uploads to a temporary file since a zip needs random access and a length that a multi-gigabyte archive cannot supply from memory, handing that file's ownership to the background import so it outlives the request and is closed exactly when the job ends, streaming downloads with the archive's sha256 in a response header, and constructing the service with both key domains plus object storage so an archive can be opened, re-keyed and stored
* feat: add warmblyctl org list, export and import so a self-hoster can move a workspace from the box without a browser, running the same engine in-process against Postgres and adding no HTTP surface to a CLI whose entire trust model is container or host access, resolving --org from whichever handle the operator has (id, slug, or the owner's email), streaming the archive to a file or to stdout so it can be piped straight into ssh with progress still readable on stderr, prompting for the credential passphrase twice through the existing password prompt so the terminal and pipe rules stay identical across every command, and defaulting the import path to a preflight report that names what already exists here and which members have no account before anything is written, with --dry-run to stop there
* feat: add the dashboard API layer for workspace archives, fetching the data-group catalog from the server rather than restating it in the client so a new group appears the moment the backend knows about it, mirroring the server's group-dependency closure in expandGroups so the toggles a user sees always match what the archive actually gets, polling only while a transfer is in flight and dropping to no interval the moment none are active since a running job has no realtime event of its own, and downloading a finished archive as a blob through the authenticated client because the endpoint is bearer-authenticated and a plain anchor href cannot carry the token
* feat: build the Settings and Data dashboard page for exporting and importing a workspace, following the settings section conventions and the in-app confirm rather than window.confirm, defaulting the export to every data group because a migration that quietly leaves data behind is worse than one that takes a while, marking the heavy groups so nobody exports a decade of inbox history unaware, requiring the credential passphrase twice behind a confirm that states plainly what the file will contain, and making the import a two-step flow where a preflight reads the archive and reports its origin, row counts, unsealable credentials, existing rows and unknown members before a single byte is written, so confirming is never a leap of faith
* feat: register the Data settings section in the dashboard rail, route and realtime spine, placing it under Advanced beside the danger zone and gating it to the workspace owner so the nav matches what the endpoints actually allow, and mapping the new org_archive audit entity to the export and import query keys in useRealtimeEvents so an archive starting or landing refreshes the page for every teammate through the existing audit spine rather than a bespoke event
* feat: document workspace export and import as a customer guide registered under Account and team, covering what each of the twelve data groups contains and which four dominate archive size, why credentials need a passphrase to travel at all and what happens to mailboxes when they do not, how members are matched to destination accounts by email and what becomes of anyone without one, the difference between keeping existing rows and replacing them, and a table of what deliberately does not import with the reason for each, because billing, plan overrides, worker placement, sync checkpoints and warmup pool membership belong to an instance rather than to a workspace
* feat: document org list, export and import in the warmblyctl reference and point the deployment guide at them as the supported route between a self-hosted install and the hosted service in either direction, adding every flag with what it does, the two extra environment variables those commands read and the difference between them (a missing KMS provider stops the command because sealed values cannot be opened, while a missing CREDENTIALS_ENCRYPTION_KEY is only a warning that mailbox credentials will not move), the behaviour when Redis is down, and the warning that an archive carrying credentials is the most sensitive file this product produces
* feat: record in AGENTS.md that a migration adding an organization-scoped table is not finished until that table is registered in internal/app/orgtransfer/spec.go, either in Tables with its group and scope or in ExcludedTables with the reason it must not travel, because data left out of the registry is silently absent from every archive and nobody discovers it until a customer's migration lands on the other side missing a feature's data, and spelling out the four things that are easy to get wrong when adding one: dependency order, the group boundary that needs a Requires entry only when a NOT NULL foreign key crosses it, which of the two key domains seals a ciphertext column, and which columns name something only the source instance knows
2026-08-18 07:53:39 -07:00
|
|
|
// Workspace archives: export an organization to a portable file and import
|
|
|
|
|
// one back, for moving between instances. Nil disables the endpoints.
|
|
|
|
|
OrgTransferService orgtransfer.Service
|
|
|
|
|
|
2026-08-29 07:17:10 -07:00
|
|
|
// PoolLinkService (cloud side) and CloudLinkService (self-hosted side) are nil-safe: routes answer 501.
|
2026-08-29 07:09:04 -07:00
|
|
|
PoolLinkService poollink.Service
|
|
|
|
|
CloudLinkService cloudlink.Service
|
|
|
|
|
|
2026-09-04 20:14:27 -07:00
|
|
|
// Device-code sign-in for the `warmbly` CLI. Nil-safe: routes answer 501.
|
|
|
|
|
CLIAuthService cliauth.Service
|
2026-10-10 06:14:17 +00:00
|
|
|
AdminDevice *admindevice.Service
|
2026-09-04 20:14:27 -07:00
|
|
|
|
2026-07-12 09:00:10 +02:00
|
|
|
// Infrastructure liveness probes for the admin System Status page.
|
|
|
|
|
// Wired in cmd/backend/main.go where the concrete clients live.
|
|
|
|
|
SystemChecker *sysstatus.Checker
|
2026-10-09 15:11:18 +00:00
|
|
|
Monitoring *monitoring.Service
|
feat: make self-hosted onboarding survivable by fixing invite_only, which could not onboard anyone (the accept route is JWT-only, so redeeming the invitation that would create your account required already having one, making the self-host default silently identical to fully closed), threading the invitation token through registration so an invited person lands in the inviting organization instead of a stray workspace, gating SSO just-in-time provisioning behind DISABLE_REGISTRATION (it bypassed the gate entirely, so an instance set to true was still open to anyone the IdP would assert) with SSO_AUTO_PROVISION as the opt-out, correcting the OIDC redirect URL that pointed at /api/v1 against a route at /v1 and 404'd every SSO login, scoping the first-launch exemption so it no longer overrides an explicit lockdown, preserving the remaining TTL when restoring a losing setup token so a public endpoint cannot hold the claim window open forever, replacing a generic 403 with typed registration_invite_only, registration_closed, invitation_invalid, setup_token_invalid and setup_already_complete codes that name the next step, logging why no claim link was issued on an already-claimed instance instead of staying silent, adding a warmblyctl operator CLI (status with health checks and a non-zero exit, reissuable setup-link, user create/list/reset-password/grant-admin/revoke-admin/disable-2fa, hash-password) so a locked-out operator no longer needs hand-written psql, adding read-only instance configuration over 104 environment variables with structural secret redaction and fingerprints, 35 health checks, a database-backed settings tier for the three keys no environment variable owns, hiding the signup form when the config already says invite_only rather than failing the whole form with a toast, and documenting first run, accounts and access, configuration, instance health and troubleshooting alongside the root .env.example the README told operators to write but never shipped (#114)
2026-08-16 05:58:11 +02:00
|
|
|
|
feat: backend half of the admin panel upgrade: delete the unrouted provisioning, releases, plan, discount and enterprise-inquiry admin handlers with their service and repository methods, retire the six admin permission bits nothing gated as reserved placeholders so live bit positions and existing masks are unchanged and IsSuperAdmin checks the live set, add forty admin endpoints for mailbox sync governor state with clear-throttle and restart-backfill, in-flight send reservations, cross-workspace dead letters with replay, task failures, webhook delivery health with reclaim, fleet capacity, the control loops decision log, dedicated bindings with release and the routed convert-to-dedicated, operator-driven workspace export and import, per-organization API keys and webhooks, warmup invalid-token abuse and action history, and signups by acquisition channel, and add a scheduled_job_runs table (migration 000135) with a jobrun package that every backend and consumer loop now records through and a run-now request the owning process picks up within fifteen seconds
2026-09-07 21:40:38 -07:00
|
|
|
// Admin operations pages: cross-workspace reads of mailbox sync, the send
|
|
|
|
|
// outcome loop, fleet placement and abuse signals, plus the scheduled job
|
|
|
|
|
// registry every background loop records to. Nil-safe: the endpoints
|
|
|
|
|
// answer 501 when the repository is not wired.
|
|
|
|
|
AdminSyncRepo repository.AdminSyncRepository
|
|
|
|
|
AdminSendsRepo repository.AdminSendsRepository
|
|
|
|
|
AdminFleetRepo repository.AdminFleetRepository
|
|
|
|
|
AdminInsightRepo repository.AdminInsightRepository
|
|
|
|
|
JobRuns repository.JobRunRepository
|
|
|
|
|
// WebhookRepo backs the operator's "reclaim stuck deliveries" action.
|
|
|
|
|
WebhookRepo repository.WebhookRepository
|
|
|
|
|
|
feat: make self-hosted onboarding survivable by fixing invite_only, which could not onboard anyone (the accept route is JWT-only, so redeeming the invitation that would create your account required already having one, making the self-host default silently identical to fully closed), threading the invitation token through registration so an invited person lands in the inviting organization instead of a stray workspace, gating SSO just-in-time provisioning behind DISABLE_REGISTRATION (it bypassed the gate entirely, so an instance set to true was still open to anyone the IdP would assert) with SSO_AUTO_PROVISION as the opt-out, correcting the OIDC redirect URL that pointed at /api/v1 against a route at /v1 and 404'd every SSO login, scoping the first-launch exemption so it no longer overrides an explicit lockdown, preserving the remaining TTL when restoring a losing setup token so a public endpoint cannot hold the claim window open forever, replacing a generic 403 with typed registration_invite_only, registration_closed, invitation_invalid, setup_token_invalid and setup_already_complete codes that name the next step, logging why no claim link was issued on an already-claimed instance instead of staying silent, adding a warmblyctl operator CLI (status with health checks and a non-zero exit, reissuable setup-link, user create/list/reset-password/grant-admin/revoke-admin/disable-2fa, hash-password) so a locked-out operator no longer needs hand-written psql, adding read-only instance configuration over 104 environment variables with structural secret redaction and fingerprints, 35 health checks, a database-backed settings tier for the three keys no environment variable owns, hiding the signup form when the config already says invite_only rather than failing the whole form with a toast, and documenting first run, accounts and access, configuration, instance health and troubleshooting alongside the root .env.example the README told operators to write but never shipped (#114)
2026-08-16 05:58:11 +02:00
|
|
|
// Operator visibility (admin panel, Instance section).
|
|
|
|
|
//
|
|
|
|
|
// InstanceRuntime carries the facts only boot knows (the resolved CORS
|
|
|
|
|
// list, the WebAuthn RP, the OIDC redirect, the auth policy) so the
|
|
|
|
|
// configuration page shows what the process actually derived. Nil is safe:
|
|
|
|
|
// every resolver falls back to the environment.
|
|
|
|
|
InstanceRuntime *instanceconfig.Runtime
|
|
|
|
|
// InstanceChecks is the setup and health registry. Nil falls back to the
|
|
|
|
|
// environment-only checks, so the page is never blank.
|
|
|
|
|
InstanceChecks *instancecheck.Registry
|
|
|
|
|
// InstanceSettings is the database-backed settings tier. It holds only
|
|
|
|
|
// keys no environment variable owns.
|
|
|
|
|
InstanceSettings instancesettings.Service
|
2026-09-04 06:02:40 -07:00
|
|
|
// OpsNotifier delivers instance-wide operator alerts. Nil disables the
|
|
|
|
|
// notification admin surface.
|
|
|
|
|
OpsNotifier opsnotify.Notifier
|
2026-01-17 14:11:14 +00:00
|
|
|
}
|