Changelog

Every release, on record.

# Changelog All notable changes to this repository are documented in this file. The format follows Keep a Changelog: https://keepachangelog.com/ Version numbers follow Semantic Versioning: https://semver.org/ ## Notes - Commit messages MUST follow Conventional Commits: https://www.conventionalcommits.org/ - The catalog package changelog is in `packages/catalog/CHANGELOG.md`. ## [Unreleased] ### Added - Email transport: Brevo REST API path (`packages/runtime/src/brevo.ts`) used when `BREVO_API_KEY` is set; SMTP stays as fallback. `EmailChannel` prefers API key; `smtp-test.ts` picks transport automatically. The VPS host filters outbound SMTP ports (verified: Gmail 25/465/587/2525 all blocked), so the API path is the production route. ## [Unreleased] ### Added - Registration collects first and last name (schema `accounts.first_name` / `last_name`, migration `20260826100000_account_names`, form + `/api/v1/auth/register` validation, `RegisterProfile` in `registerPassword`). - Brevo SMTP env wiring (host/port/user/password/MAIL_FROM) + `/srv`-side `smtp-test` script (`packages/runtime/scripts/smtp-test.ts`) for one-shot relay verification. ## [Unreleased] ### Added - Production deployment: Next standalone Docker image, Caddy TLS on agentsdb.co (apex + www), internal pgvector Postgres, one-shot migrate + db-repair + seed, ufw (22/80/443), nightly backups + restore drill, `docs/runbook-prod.md`, `docs/suggestions.md`. ## [Unreleased] ### Added - P1.4 activation metric: `metric_events` (first_run, guided_run per account), wiring in sandbox and guided runs, `GET /api/v1/metrics`. P1 guided-tasks milestone closed: research, profiles (v0.3.0), sealing (v0.4.0), runtime+UI (P1.3), metric (P1.4). ## [Unreleased] ### Added - P1.3 guided real-task runs: sealed task picker + runner on the sandbox and Workbench, `packages/runtime/src/guided.ts` chained tasks with timeline, dry-run proposals, session memory hook, report export. Endpoint `/api/v1/guided`. Runtime 24/24, web 38/38, catalog 15/15. ## [Unreleased] ### Added - Catalog v0.3.0 (P1.1): 100 guided task profiles in `packages/catalog/data/tasks.json`, five per vertical with two live-data and three your-data tasks. Grounded, signed. - Catalog v0.4.0 (P1.2): sealing layer expands profiles into 5,000 sealed tasks (50 roles x 20 verticals, five per worker), deterministic, signed under a 15-check battery. ## [Unreleased] ### Added - B1 payments plan persisted in `docs/plans/payments-plan.md` and P1 guided-tasks plan in `docs/plans/guided-tasks-plan.md`. - Billing audit baseline (`docs/billing-audit.md`), payment runbook (`docs/payments.md`), and ADR-0010-M (payment provider abstraction). - Provider abstraction: `paystack`, `stripe`, `mock` behind `PAYMENT_PROVIDER` (packages/billing/src/providers). - `webhook_events` table: idempotent, audit-proof grants for provider webhooks. - Paystack adapter: transaction initialize (NGN, kobo amounts), HMAC-SHA512 webhook verification, charge.success and subscription events. - Payment grant: `paid` sets the tier and credits 500; `renewal` credits 500 and preserves the tier. ## [agentsdb-v1.0.0] - 2026-08-25 ### Added - Platform layer master plan persisted in `docs/plans/platform-plan.md`: product definition, decisions log (D1-D15), C2/E1/E2/W1/W2/W3 milestones with gates, final package layout, data model additions, tool backends spec, security posture, standards, risks, and metrics. - Milestone C2, catalog v0.2.0 market taxonomy: - Seven departments cover all 50 roles once; public job titles and one-line pitches authored for every role; worker names embed the vertical (`Accountant · Real Estate`); 1,000 unique worker names. - Registry re-seeded to `catalog-v0.2.0`; API exposes taxonomy on list and detail; new departments endpoint; contract tests extended (19 tests). - Check battery: catalog 13/13 (new CHK-TAX), registry and web green. - Milestone W1, worker wedge (Accountant · Real Estate): - `packages/llm`: OpenAI-compatible gateway client, deterministic agent loop with tool calls, step and token caps, model profiles. - `packages/tools`: sandboxed backends (search, http, files, code interpreter via throwaway containers with network disabled, vector store over the memory layer, dispatcher with HMAC webhooks); beta tools are typed stubs. - `packages/runtime`: always-on daemon, durable jobs with concurrency, 3-scope memory with source links and versioned undo, approval gates, audit ledger, per-agent live status, chat intents (hire, assign, status, approve, reject, pause, resume, quiet, remember, fix), Telegram and email adapters. - Workbench: localhost management dashboard (team, live status, activity feed, approvals, memory explorer, audit, pause). - Personalization: three-step conversation onboarding, voice sampling, plain-language rules. - Tests: 13 runtime tests including the full scenario (assign -> gate -> approve -> send -> audit -> memory) and the sandbox isolation test. - ADRs 0003-M to 0008-M recorded. - Milestone W2, productize: - Public UI: home with department grid and search, department pages, worker pages (job, pitch, run/browse/hire CTAs, domain chips), specialists search page, sandbox page (BYO key, dry-run sends), billing page. - Accounts and metering: account registration with API keys (hashed), free-tier credits, credit ledger with balance, scoped keys with rate and spend caps, mock checkout (tier + 500 credits). - Sandbox execution: ephemeral, BYO key, no persistence, dry-run dispatcher, 2 credits per run, 401/402/429 guarded. - Slack adapter (incoming events endpoint with signature verification, outgoing webhook) alongside Telegram and email. - db-repair guard restores raw-managed vector columns after any migration; found and fixed the diff-migration drop of the embeddings column. - Registry spec extended: accounts, keys, billing, sandbox endpoints, PAYMENT_REQUIRED/UNAUTHORIZED/FORBIDDEN codes, REG-BILL/REG-SBOX identifiers. ADR-0006-M recorded. - Tests: 22 web contract (incl. account/keys/billing/sandbox guard), 14 runtime (incl. sandbox execution with dry-run), 5 billing. - Milestone W3, scale: - Multi-worker staffing: any role-vertical worker is hireable by name; the conversation is routed to the hired worker; approvals resume on their own job's worker. - Quality harness: deterministic evidence checks for any worker brain (15 checks: role, pitch, thinking, priorities, domain, terms, regulations, toolset, guardrails), plus a per-worker memory review report. - WhatsApp official Business API adapter (webhook verification + outbound via Cloud API; no unofficial bridges). - Stripe checkout: real session creation, webhook signature verification, and credit grants on verified payment events; mock fallback documented. - Tests: 19 runtime (incl. evidence suite), 7 billing (incl. Stripe session + webhook), 5 web webhook coverage. - Milestone F1, auth and platform dashboard: - Password accounts (scrypt, salted, timing-safe), session tokens in httpOnly cookies, session revocation. - `auth_init` migration (credentials columns + auth sessions table); accounts gain a linked workspace and free-tier credits. - Platform dashboard: overview (credits, tier, workspaces, activity), workers (hired worker + job history), API keys (list, issue, scopes/caps), billing (balance, ledger, live or mock checkout), settings (email, sessions, revoke), login/register pages, middleware guard. - Auth routes and REG-AUTH identifiers documented; tests: 10 billing (incl. auth), 25 web (incl. auth contract and session revocation). - Milestone F2, Workbench app: - Separate local Next.js app (`apps/workbench`, bound to 127.0.0.1:8787) for agent management, replacing the inline dashboard. - Pages: workspace team (live status, pending approvals, jobs, activity, pause toggle), memory explorer (source-linked, versioned, edit and revert), approvals queue (approve/reject, resume via runtime), activity audit ledger, plain-language rules editor, settings (channels, export all data as JSON, delete workspace data), per-agent page (live state, spend, job history, per-agent memory and audit). - Dashboard approvals resume the job through the runtime with the granted approval id. - Test coverage: typecheck, lint, helper tests; runtime and engine suites unchanged and green. - Milestone F3, public pages, docs, and marketing surfaces: - Catalog depth: job pages (brain + domains + specialists + export), tool pages (capabilities, constraints, MCP schema viewer), domain pages (verified terminology, regulations with cited sources, constraints, examples), agent detail pages (system prompt viewer, MCP config, all four export buttons, links through the catalog). - Deepened existing: home (hero, how-it-works, feature cards), departments (job cards + run links), workers (Run / Take a config / Hire), specialists (filter chips for job, domain, tool, plus pagination). - New: pricing (tiers, credits, FAQ), docs hub with six guides, about, changelog (live file render), terms, privacy, status (db latency, agent count). - SEO: metadata on every page, sitemap (static + catalog-driven), robots. - Site shell (nav + footer) applied across public pages. - Milestone F4, QA hardening: - Playwright smoke suites (9 tests): web (public catalog surfaces, agent detail with prompt + 4 exports, docs hub, register-dashboard-logout flow, guard redirect, pricing/legal/status pages) and workbench (workspace load, all five management pages, rules API). - Selectors hardened; strict-mode violations resolved; trace on failure. - OpenGraph metadata on the home page; audit of meta coverage, empty states, and responsive shells. - Release: `agentsdb-v1.1.0` with checklist signed. - Milestone K1, credential loop fixes: - Spend caps enforced per API key (charged per request, boundary check; `used_micro_usd`). - Key lifecycle: revoke and rotate endpoints + dashboard buttons; immediate revocation; rotation preserves the policy. - Provider-key separation: `x-provider-key` for model keys in the sandbox; `x-api-key` is account identity only (legacy fallback documented as deprecated). - Credential lifecycle audit (account-scoped `account_audit_events`); login throttling per account and client; password change (revokes other sessions); password reset (hashed 1-hour tokens, generic responses); dashboard key issuance via session fallback fixed. - Security design document `docs/security.md`, ADR-0009-M (local-first secrets), registry-spec REG-KEY/REG-AUTH/REG-PROV identifiers. - Tests: billing 15 (spend caps, revoke/rotate, throttle, change/reset, audit), web 28 (contract incl. session-issued keys, revoke/rotate through the API, 429 throttle, change-password). - Milestone K2, crypto core and local vault: - `packages/vault`: crypto core (passphrase -> scrypt KEK -> per-secret data key -> AES-256-GCM with AAD binding of type and label; HMAC verifier with timing-safe compare; fingerprint; lockout counter; unlock TTL with auto-lock), and `VaultService` (init, unlock, lock, create, rotate (old deprecated + unrecoverable), delete, valueFor with last-used tracking, metadata-only logs). - Workbench **Secrets** page: create/unlock gate, trust badges (encrypted at rest, write-only, auto-lock, verify-on-save), secret cards (type, label, fingerprint, age, last-used), add/rotate/delete actions with verification adapters (Telegram getMe, WhatsApp Graph, Slack webhook, IMAP login, SMTP verify). - Vault migration (vault_meta + vault_secrets) applied to both databases; vector columns preserved (db-repair verified). - Proofs: 10 vault tests (crypto core: AAD tamper, KEK determinism, fingerprint stability; service: write-only no plaintext scan, locked access, never-in-logs, 5-attempt lockout, rotation/deletion unrecoverability). - Live smoke: vault-init -> secret-create (ciphertext-only row confirmed via SQL) -> lock. - Milestone K3, local-first testing: - Browser vault on the sandbox page: device-only encrypted localStorage (WebCrypto PBKDF2 600k + AES-GCM), unlock/create gate, write-only saves, saved-key reuse, auto-lock after 15 minutes idle with activity reset, lock button; provider keys never stored on the platform. - Workbench "Test run": local execution using the vault's `provider_key` (unlock required; locked error path live-verified). - Runtime vault consumption: `resolveRuntimeVault` (provider key, Telegram, IMAP, SMTP) applied at daemon boot via `WORKER_VAULT_PASSPHRASE` + `WORKER_VAULT_WORKSPACE`; environment remains the fallback. - Tests: browser-vault 3 (roundtrip, wrong-phrase, plaintext-absent from storage), runtime vault resolution 2 (values resolved with passphrase; wrong passphrase rejected). - Live smoke: sandbox vault box 200, test-run 200, locked-run error correct, unlock + provider_key stored. - Milestone K4, confidence kit: - Hosted-surface proof tests: zero vault imports in the platform app, zero secret-column code, responses never echo credentials. - `docs/security.md` claims table now maps every claim to its verifying test. - Release: `agentsdb-v1.2.0` with the signed checklist. ## [registry-v0.1.0] - 2026-08-25 ### Added - Milestone R1, monorepo restructure: - Workspace layout: `apps/web`, `packages/catalog`, `packages/registry`, `packages/db`, `packages/llm`, `packages/tools`. - Catalog layer absorbed via subtree merge at `catalog-v0.1.0`; history preserved. - Repo-wide standards: style guide, glossary, agent standards, review and release checklists, decision records (0001-M, 0002-M). - Registry layer plan persisted in `docs/plans/registry-plan.md`. - Milestone P0, platform scaffold: - `apps/web`: Next.js 16 App Router, Tailwind 4, strict TypeScript, flat ESLint config. - `packages/db`: Prisma client factory and placeholder schema; client generation wired to install. - Health endpoint `GET /api/v1/health` with database latency probe and the error envelope. - Web check battery: type checking, linting, unit tests. - docker-compose services for development and test databases (Postgres 17 + pgvector). - Dev flow: `pnpm dev:db` and `pnpm dev:web`. Local PostgreSQL on port 5432 remains untouched; dev database uses port 5434. - Milestone RG1, registry data layer: - Full Prisma schema: roles, tools, verticals, agents (10,000), sessions, messages, tool_runs, usage. - Migration `registry_init`: all tables, vector extension reserved, generated `search_vector` tsvector column with a GIN index. - Seeder (`@agentsdb/registry`): deterministic plan from the catalog, fingerprint-based diff, idempotent apply; modes `--dry-run`, `--diff`, `--apply`. - Acceptance: 10,000 rows, 0-change second run, byte-equal prompts on the sample, FTS smoke passing. - Defect found and fixed at the seam: the catalog compiler's `loadNaming` returned whole file objects instead of the naming maps, producing empty titles for non-override combinations. The loader now extracts the inner maps; 9,989 rows corrected on reseed. - Milestone RG2, registry API v1: - Contract endpoints: agents list and detail, exports (json, markdown, cursor, opencode), dimensions list and detail, stats, health. - Services in `@agentsdb/registry`: DTO mappers, query service with full-text search, export renderers, rate limiter. - Zod validation on every input; envelope and error shapes per the registry specification; cache headers; per-client request budgets. - Normative contract document `docs/registry-spec.md` with requirement identifiers REG-API, REG-EXPORT, REG-SEC, REG-QUA. - Contract test suite (18 tests) against the seeded test database; rate-limiter unit tests.