Adds MarkdownView component to design system, task retry API route,
markdown rendering in dashboard and chat, and model store enhancements.
Includes DB migration for schema updates.
Credentials now have a usage field ("any", "chat", "agent") so the
same provider can have separate credentials for different use cases.
The Claude OAuth token is tagged "agent" (for Claude Code CLI), while
API keys can be tagged "chat" (for streaming/model listing).
- Add usage column to harness_credentials table
- Add getCredentialsForUsage() that prefers exact match, falls back to "any"
- Chat route and model-providers use chat credentials
- Agent env builder uses agent credentials
- Credentials API accepts usage field on create/update
- Remove harness_curated_models table from schema
- Remove /api/models/curated route and all curated model functions
- Move KNOWN_MODELS pricing table to model-providers.ts and enrich
live API results with pricing/context window data
- Filter out old models: dated IDs (claude-3-opus-20240229), legacy
families (claude-3-*, gpt-3.5-*, gpt-4-*, text-*, etc.)
- Update model_list chat tool to use fetchAllModels() instead of DB
- Update ModelsTab to fetch from /api/models, remove toggle/delete
- Update getUsageSummary to use KNOWN_MODELS for cost lookup
- Simplify boot.ts: remove model syncing, keep agent auto-discovery
- Add harness_chat_conversations table with messages stored as JSONB
- Add chat-store.ts with CRUD operations
- Add /api/conversations routes (GET list, POST create, PATCH update,
DELETE remove)
- Update chat-tab.tsx to load conversations on mount, persist metadata
changes immediately, and save messages after streaming completes
- Add loading state while conversations are being fetched
Projects were stored purely in useState — lost on every page refresh.
- Add harness_projects table (id, name, workspaces jsonb)
- Add /api/projects CRUD route (GET/POST/PUT/DELETE)
- Load projects from DB on dashboard mount
- All project mutations (create, delete, add/remove repo) now
persist via API calls
Webhook endpoint at /api/webhooks/gitea receives Gitea status events,
matches them against configurable event triggers with conditions
(event type, repo glob, state, context), renders task templates with
{{variable}} substitution, and creates harness tasks automatically.
Includes circuit breaker: after N consecutive task failures from the
same trigger (default 3), the trigger auto-disables. Re-enable
manually via PATCH /api/event-triggers/:id.
New tables: harness_event_triggers (rules + circuit breaker state),
harness_event_log (audit trail + dedup via X-Gitea-Delivery).
Replace all in-memory Map-backed stores (credentials, models, agents,
tasks, iterations, usage) with Drizzle ORM queries against the
homelab-pg PostgreSQL cluster. All store functions are now async.
- Add 6 harness_* tables to @homelab/db schema
- Generate and apply initial Drizzle migration
- Add lazy DB connection proxy to avoid build-time errors
- Wire DATABASE_URL from sealed secret into harness deployment
- Update all API routes, orchestrator, executor, and boot to await
async store operations