Commit Graph

166 Commits

Author SHA1 Message Date
Matthew Meszaros d997a5fdbd fix: clear the js-yaml advisory in the docs lockfile too 2026-07-21 18:02:40 +02:00
Matthew Meszaros 912a07b6e1 feat: make the sandbox seed a full realistic demo org 2026-07-21 17:34:59 +02:00
Matthew Meszaros 8055c2f05f Merge remote-tracking branch 'origin/main' into self-host/local-stack
# Conflicts:
#	cmd/backend/main.go
2026-07-20 11:53:21 +02:00
Matthew Meszaros 037779a78b docs: de-stale the local development guide for the no-cloud nats stack 2026-07-20 11:12:37 +02:00
Matthew Meszaros 2fdaa28887 docs: rewrite the sandbox guide for the one-command flow and the fuller seeded dataset 2026-07-20 11:12:37 +02:00
Matthew Meszaros 58d7baf79d docs: cover the no-cloud setup and the PUBLIC_HOST knob 2026-07-20 09:56:47 +02:00
Matthew Meszaros 85ab4ad7b5 feat: replace the notification email cadence enum with a configurable bundling window and drop the instant mode entirely: email_digest_minutes (30 minute floor, 30 default, 1440 max, constants in config) replaces email_digest with no per-event option or NOTIFICATION_EMAIL_ALLOW_INSTANT escape hatch, the handler validates the range and email_delivery now returns min/max minutes so clients render the bounds, the web settings page offers window presets (30m/1h/3h/daily) plus a Custom minutes NumberInput and iOS swaps the cadence menu for window presets including the server value when it matches none, the repo clamps stored values on read, and the guide plus deployment guide describe the window and keep only the NOTIFICATION_EMAIL_DAILY_CAP env 2026-07-20 08:01:22 +02:00
Matthew Meszaros 682ef3ac24 feat: cost guards on the notification email channel: the per-event instant cadence becomes self-host opt-in (NOTIFICATION_EMAIL_ALLOW_INSTANT, default off - PUT rejects it, stored values read back as smart, holds degrade to smart) with the capability exposed as email_delivery on the preferences GET so web and iOS hide the option on hosted deploys, each user gets a rolling 24h budget of non-security notification emails (NOTIFICATION_EMAIL_DAILY_CAP, default 25, 0 unlimited) counted off sent rows with over-budget alerts skipped to the in-app feed while security sign-ins always send, and coalesced group emails re-verify org membership at flush time so a member removed during the hold is dropped from To; deployment guide documents the three envs and the guide notes both limits 2026-07-20 07:44:43 +02:00
Matthew Meszaros 74c32bfec6 feat: document the digest-first notification email channel in the notifications guide: the three delivery rules (read in-app means no email, unread bundles into one email, shared events send one email with every recipient in To), the four cadences with smart as default, the always-immediate security sign-in exception, the new billing and team categories with their defaults, and the permission-targeted routing callout 2026-07-20 07:18:19 +02:00
Matthew Meszaros 847f3ba472 feat: document the From menu in the unibox guide: Auto scoring order, tag filtering, tag-scoped Auto picking within a mailbox group, and the from_tag_id API field 2026-07-20 05:28:05 +02:00
Matthew Meszaros 91c12e91be feat: document undo send: the unibox guide gains an Undo send section (default 30s, 5-120s under Settings Profile, header countdown with cancel, scheduled and smart sends unaffected) and the unibox API reference notes instant sends hold for the undo window with scheduled_at reflecting it and DELETE /unibox/scheduled/:task_id cancelling inside it 2026-07-19 18:57:32 +02:00
Matthew Meszaros e1750d8988 feat: add PATCH /emails/tags for bulk mailbox tagging: add_tags/remove_tags set semantics across up to 1000 mailboxes in one transaction (ownership of both mailboxes and tags enforced in SQL so stale ids are skipped, composite-PK insert makes re-adds no-ops), naturally idempotent so no Idempotency-Key needed, one audit entry with account/added/removed counts riding the email_account spine, and the endpoint registered in the docs scope map under WRITE_EMAILS 2026-07-19 16:13:43 +02:00
Matthew Meszaros e7144a439d feat: upgrade the AI usage view: the daily bars become a smoothed dithered area graph with a 7d/30d/90d range switcher (breakdowns follow the range, previous data held while the new range loads so nothing flashes), and limit cells drop the boxy stepper input for a big inline-editable value with a dashed-underline affordance, the dithered slider, quiet text presets, and a No cap idle state 2026-07-19 13:50:03 +02:00
Matthew Meszaros 7524d1ea37 feat: redesign the AI spend-control experience: each workspace and per-member limit is a cell with an animated expand, a dithered slider with window-sized presets and an exact number field, and a live spent-vs-limit meter; edits collect into a floating Reset/Save bar instead of writing eagerly; the 30-day chart, spend stats, and breakdowns move to dithered canvas fills with tooltips and animated counts, the credits balance ring goes dithered, and the ai-credits guide notes the new tab and limit controls 2026-07-19 13:39:07 +02:00
Matthew Meszaros f7a1027367 feat: add workspace-shared assistant history: a manage_settings toggle on the organization (assistant_shared_history, off by default) makes every conversation visible to and continuable by every member with the use-AI permission — the service resolves a session to its owner's rows so open/continue/approve/delete all work cross-member while credits still charge the acting member, the org-wide listing joins owner names for attribution in the history rail, the workspace settings page gains the AI assistant section with the toggle and an explicit exposure warning, and the assistant guide's access and privacy sections describe both modes 2026-07-19 13:22:56 +02:00
Matthew Meszaros 68e3ca6b6b feat: extend the per-member AI limit to all three windows: member_limit_daily and member_limit_weekly join the monthly ceiling on org_ai_settings, MemberSpentInWindows sums the acting member's debits per window in one query, checkSpendLimits enforces day/week/month member ceilings with window-specific 429 messages, and the billing card's Per-member limits row grows the same three fields as the workspace caps 2026-07-19 13:22:56 +02:00
Matthew Meszaros 458234cd5d feat: add clear-all assistant history: DELETE /ai/sessions wipes every conversation the member owns in the workspace (transcripts cascade, count returned, audited as an ai_session delete with clear_history metadata), the history rail gains a Clear history footer action behind the in-app confirm that also closes all session-backed tabs, and the assistant guide documents access gating, per-member limits, privacy, and both delete paths 2026-07-19 11:05:18 +02:00
Matthew Meszaros f4014b8b73 feat: add a per-member monthly AI credit limit to the org spend controls: new member_limit_monthly on org_ai_settings flows through the settings repo, PATCH endpoint, and billing UI (its own Per-member limit field on the AI usage card), and checkSpendLimits enforces it by summing the acting member's debits this calendar month via the ledger's actor attribution (new MemberSpentSince query on the partial index from migration 000073), returning a 429-mapped member-limit error while unattributed scheduled work stays exempt 2026-07-19 11:05:18 +02:00
Matthew Meszaros 7ef7d90d8c feat: introduce the Use AI organization permission (bit 15, the last of the 16-bit mask) gating every AI surface: assistant session routes, generation write/edit, and the compose and reply draft endpoints get a member-permission layer (API keys re-check their existing bit), migration 000073 backfills the bit onto all existing roles and member overrides so nobody loses access, defaults grant it to admin and manager but not viewer, and the web mirrors it in the permission catalog with gating on the header spark button, Cmd+I, the panel itself, and the AI drafting caret (plus team-roles and endpoint-map docs) 2026-07-19 11:04:58 +02:00
Matthew Meszaros bacbf5552f feat: upgrade the assistant's full-screen history rail: conversations group under Today/Yesterday/This week/Earlier sections, a search field filters them by title, each row gets a hover (always-visible on touch) delete action behind the in-app confirm that also closes the conversation's open tab and invalidates the list, the New chat button shows its Alt+N kbd chip, and the guide documents deletion and search 2026-07-19 10:50:33 +02:00
Matthew Meszaros 2de973df68 feat: add DELETE /ai/sessions/:id so members can remove an assistant conversation: repository delete scoped by org and user with the transcript cascading via FK, not-found on zero rows, an ai_session delete audit entry (which the existing realtime spine turns into live history refreshes), and the endpoint registered in the docs scope map 2026-07-19 10:50:33 +02:00
Matthew Meszaros 459d423bb5 feat: document the assistant's live streaming behavior in the guide: answers stream in word by word and each tool step appears the moment it starts 2026-07-19 10:42:10 +02:00
Matthew Meszaros ab938575d3 feat: give the AI assistant a floating window mode on desktop: pop out via the header button, Alt+P, or tearing the docked header off its edge, then drag it anywhere by the header and resize from any edge or corner (360-920 wide, min 400 tall, always clamped fully on screen), with the geometry persisted alongside side and width, a dock-back button targeting the remembered edge, and the assistant guide updated 2026-07-19 10:31:20 +02:00
Matthew Meszaros 6f8db3ae05 feat: de-template the cold-email humanizer (drop the quotable example asks and subject that models parroted verbatim, add a VARIATION section mandating a fresh skeleton per email and capping punchy standalone lines at one) and add compose drafts: autosaved per-user working copies (client-generated ids, idempotent PUT on a 1.2s debounce, migration 000072) with Saving/Saved in the window header, close-keeps-draft instead of the discard confirm, delete on send or when emptied, and a Drafts list under the rail Compose button to resume or delete, documented in the guide and endpoints scope map 2026-07-19 08:52:56 +02:00
Matthew Meszaros 6ce5ebe900 feat: make compose AI drafting grounded and agentic: POST /unibox/compose/draft assembles the recipient's contact 360, the full correspondence history with the address, and the org voice profile into the prompt (2-credit minimum, reason compose_draft, usage settle, refund on provider failure), and when the purpose is genuinely unknowable the model returns a clarifying question instead of inventing a pitch; the draft bar gains a question phase (answer inline and it writes), the review card reports exactly what the draft was grounded in, and the composer nudges to Settings > Workspace with a link when no voice profile is set; docs cover the endpoint, credits row, and guide behavior 2026-07-19 08:37:39 +02:00
Matthew Meszaros 3f85803cfa feat: document the compose feature: unibox guide gains a Composing a new email section (docked window, contact search, suppression blocking, Auto mailbox selection with scoring rationale, History panel, in-composer AI and subject suggestion), and the API endpoints scope map adds /unibox/compose + /unibox/compose/candidates plus the new address and direction filters on GET /unibox 2026-07-19 07:40:05 +02:00
Matthew Meszaros ea85dbc1cf feat: seed labels into the sandbox org (folders/tags/categories for sandbox@warmbly.test bound to mailboxes, campaigns, contacts, and four inbox threads, idempotent with a dedicated UUID namespace) and restyle the thread label dropdown to the house picker language: assigned labels show as colored chips right in the trigger with a +N overflow, the panel gets a search-or-create header, a removable assigned-chips row, color-dotted checkbox rows with an assigned marker, a friendly empty state, and a footer noting the shared category registry and the c shortcut 2026-07-18 16:35:36 +02:00
Matthew Meszaros 09bb526a6c feat: move the inbox composer's AI to the cursor — remove the Draft reply and Write with AI buttons from the action bar and replace them with a caret companion: a faint sparkle rides the line you're typing on (or press cmd+J) and opens a menu at the caret to ask AI to write and insert there, draft a full reply from the thread, or continue writing, with typewriter insertion plus Undo/Again/Done and the unibox guide updated to match 2026-07-18 12:11:14 +02:00
Matthew Meszaros c03cf37716 feat: seed the dev org as a mid-flight workspace: new internal/seed dev_org.go + dev_history.go give dev@warmbly.com 4 warmed premium-pool mailboxes, folders/tags/categories with real bindings (email_tags, campaign_folders, contact_categories, unibox thread labels), ~30 contacts with suppression states, an active 3-step campaign with 24 leads on a deterministic funnel and NOW()-relative sends including today, 14d campaign/warmup/daily stats rollups, a 13-message unified inbox that always resolves a dev-org sending mailbox, CRM pipeline with deals/tasks/notes/activity, reply templates, notifications, AI credit ledger history, and idempotent campaign logs 2026-07-18 12:00:24 +02:00
Matthew Meszaros ec53089232 feat: document the in-composer AI editing — selection-edit cost row in the AI credits guide, the unibox guide now covers the draft review bar (Keep/Adjust/Retry/Discard) and the Edit with AI selection pill, and the billing usage/transaction views label the new writing_edit reason 2026-07-18 11:59:18 +02:00
Matthew Meszaros 4f9e6e6282 feat: full attribution on every AI credit charge — new actor_user_id + context jsonb columns on the transaction log (migration 000070), a typed models.CreditContext carried via request context (models.WithCreditMeta) so base charges, usage settles, web-search fees, and refunds all inherit it without signature churn, wired at every spend site (campaign switches record campaign/step/contact, automation nodes and Ask AI record automation/node/run and the question asked, reply drafts and inbox agent record the thread, the dashboard agent records the session, research records contact/run, and manual features record the triggering user), rendered as a detail line with token counts in the billing transaction log with corrected reason labels, and documented in the AI credits guide 2026-07-18 08:52:16 +02:00
Matthew Meszaros 163d3057de feat: add web-search and extended-thinking capabilities to the campaign switch AI decider — a per-step web lookup about the contact's company (query derived from contact fields only, results fenced as untrusted, +1 credit charged only when results land, wired through a new tasks SetAISearch) and a thinking toggle that routes to the stronger model tier with a 2048-token budget priced through usage metering, with editor toggles under Capabilities and sequences/ai-credits docs 2026-07-18 08:42:08 +02:00
Matthew Meszaros 053ca6a71d feat: usage-based AI credit system — every AI call reserves its flat minimum then settles the real token cost per model (light 1500/standard 400 tokens per credit, drain-to-zero overage settle wired into writing assistant, reply drafts, dashboard agent, inbox agent, research, automation nodes, and campaign switches), org spend controls in a new org_ai_settings table (day/week/month hard limits enforced in Consume, low-balance alert threshold, auto top-up config), a credit-watch monitor hook that fires BILLING_CREDITS_LOW realtime alerts once per day and buys the configured pack off-session via a new Stripe AutoTopUpCredits (idempotent on the PaymentIntent, bounded per month, Redis-locked), GET /subscription/credits/usage + GET/PATCH settings endpoints, and an AI usage & spend controls billing card (spend vs limits, 30-day chart, per-feature and per-model breakdowns, limits/reminder/auto-top-up form) with a realtime low-credit toast 2026-07-18 08:39:41 +02:00
Matthew Meszaros 30d4277bba feat: harden switch value matching and restyle the decider picker — normalized comparison ignores casing and collapses whitespace, /pattern/ case names become case-insensitive regexes (validated at write time, plain cases checked before regex cases, first match wins, no substring fuzziness so 'not interested' never lands on 'interested'), and the Decided by control becomes two icon cards with descriptions matching the step-type switcher 2026-07-18 08:06:26 +02:00
Matthew Meszaros f36c1a5001 feat: replace the campaign AI step with a Switch step — a multi-way router whose cases are rows on the canvas node, each with its own draggable source dot (per-case ai_label branches wired by handle, retarget on re-drag, purple case edges with no IF boxes, bottom dot as the otherwise fallback), decided per contact by an AI prompt (1 credit, fenced context, same credit lifecycle) or a free deterministic template-value match, with a mode toggle + case list editor (stale case paths healed on save), drag-to-empty-canvas creating the target and wiring the case, and sequences/ai-credits/automation docs rewritten for the switch 2026-07-18 05:42:50 +02:00
Matthew Meszaros 4399bb8e82 feat: collapse the campaign AI step to a prompt plus draggable named outcome paths — the connections drawn out of the step are the choice set (outcome names live on the ai_label branch conditions, deduped per step and read at run time), drop the ai_labels/ai_output_fields/ai_actions config and the whole AI action palette (side effects are ordinary action steps placed on the chosen path), and fence the contact's email, profile fields, and automation event data as untrusted content in every campaign and automation AI prompt so injected instructions inside replies are ignored 2026-07-18 05:18:24 +02:00
Matthew Meszaros 273dd7ce33 feat: merge main (deliverability auth-state sweep, watch-band cold throttle, research roadmap) plus the 000067 email-auth-state migration renumber into the campaign AI step branch 2026-07-17 18:29:06 +02:00
Matthew Meszaros ad794bb184 feat: document the AI step and AI branching — sequences guide (AI steps, AI-picked tag choices, context controls, AI-label paths with inline label creation), automations guides (Ask AI branch, per-label classify routing), and the AI credits cost table entries for campaign AI steps and Ask AI branches 2026-07-17 16:26:58 +00:00
Matthew Meszaros cd5e1e9cf7 Merge pull request #72 from warmbly/research/warmup-abuse-cold-effectiveness
feat: deliverability research + observe-only SPF/DKIM/DMARC auth state and watch-band cold throttle
2026-07-17 05:29:58 +02:00
Matthew Meszaros e5a6643e2f feat: apply the warmup watch-band volume multiplier (0.7x) to cold campaign sends via the shared adjustmentFor helper so a watch-state mailbox slows cold volume before it hard-quarantines 2026-07-17 03:21:29 +00:00
Matthew Meszaros 5b7d29c766 Merge pull request #70 from warmbly/domain-inbox-placement
feat: deliverability score + per-provider/per-domain inbox placement on the dashboard
2026-07-16 18:02:02 +02:00
Matthew Meszaros 1e1e357c06 feat: add a 0-100 deliverability score plus per-provider seed placement and per-domain warmup placement breakdowns to GET /analytics/deliverability, surface them on a customizable deliverability dashboard (toggleable sections + persisted view), and document the new fields in the guides and API reference 2026-07-16 17:55:34 +02:00
Matthew Meszaros 968e43cf2d feat: collapse the sandbox quick start from six terminals to four by starting the core stack with make dev instead of infra+run+web 2026-07-16 09:51:32 +02:00
Matthew Meszaros f7ae908439 feat: rework the local development docs around make dev - new One command section with SEED/AI_PROVIDER variants, Rust/Elixir moved to optional prerequisites, and the stale manual-env-exports-plus-air native section rewritten around the pre-wired make targets 2026-07-16 09:51:32 +02:00
Matthew Meszaros d0e8bc1c97 feat: add one-command MCP OAuth connect on api.warmbly.com/v1/mcp — RFC 7591 dynamic client registration for public PKCE clients (dcr.go), RFC 9728 protected-resource metadata + WWW-Authenticate challenge via MCPAuthMiddleware, /v1/mcp now accepts an API key or OAuth token, public-client auth with no secret and mandatory PKCE reusing the existing OAuth 2.1 server (nullable-org clients, migration 000066), executable-redirect-scheme hardening on the open register endpoint, plus mcp/oauth/authentication/endpoints docs 2026-07-16 08:57:19 +02:00
Matthew Meszaros 30e8d3c13a feat: restyle the docs site without decorative sidebar icons (frontmatter icons dropped, lucide source plugin disabled, AGENTS.md conventions updated), add LangTab language-logo code tabs, and document the new agent tools plus panel resize/placement/shortcuts in the assistant guide and MCP reference 2026-07-16 07:50:24 +02:00
Matthew Meszaros d64c1ddcf7 feat: give the assistant a serious monochrome AgentMark logomark (panel header, empty state, top bar), center single-line composer text against the send button, add minimize-to-dock with a live bottom-right status bar (working/step count, needs approval, response ready), unseen dots on tabs, and a live status badge on the header spark button 2026-07-16 06:52:30 +02:00
Matthew Meszaros a913e73837 feat: seed the sandbox org's AI-credit ledger (plan monthly allowance + a 5000-credit purchased top-up with idempotent grant transactions) so the assistant never reports out-of-credits in the demo; re-seeding refills both pools 2026-07-16 06:52:30 +02:00
Matthew Meszaros e64b0b161d feat: sweep stale OPENAI_API_KEY/AI_LOCAL_MODEL mentions out of comments, the provider-not-configured and warmup-admin error strings, env.example, and the deployment guide now that AI_* is the only config surface 2026-07-16 06:39:07 +02:00
Matthew Meszaros afc5e9d6e5 feat: document AI_PROVIDER-based provider selection (presets, OpenRouter model switching, free local model) across the deployment guide, local development, AI credits, and env reference 2026-07-16 06:14:19 +02:00