Changeset 0.27.0 (#166)

This commit is contained in:
2026-03-10 16:38:06 +00:00
parent 400f7dd176
commit 7e4f1581f2
15 changed files with 1721 additions and 520 deletions

View File

@@ -4,6 +4,8 @@
- [ARCHITECTURE.md](ARCHITECTURE.md) — Core services design, store layer, scope model
- [EXTENSIONS.md](EXTENSIONS.md) — Extension system spec (Browser/Starlark/Sidecar tiers,
manifests, browser tool bridge, surfaces/modes, model roles)
- [EXTENSION-SURFACES.md](EXTENSION-SURFACES.md) — Extension surface authoring guide
(manifest format, platform API, CSS properties, install workflow)
- [CHANGELOG.md](../CHANGELOG.md) — Detailed release notes for all completed versions
**Versioning (pre-1.0):** `0.<major>.<minor>` — hotfixes use quad: `0.x.y.z`
@@ -152,9 +154,29 @@ v0.26.0 Workflow Engine ✅
human + AI collab, visitor
intake, assignment queue)
v0.27.0 Tasks / Autonomous Agents
v0.27.0 Debt Clearance
(extension surface routes,
workflow polish, editor debt)
v0.27.1 Tasks Foundation
(service channels, scheduler,
unattended execution)
task definitions, cron)
v0.27.2 Task Execution
(budgets, admin controls,
run history, kill switch)
v0.27.3 Task Chaining
(webhooks, task_create tool,
workflow-to-workflow)
v0.27.4 Personal Tasks
(BYOK scheduling, user task UI,
starter templates)
v0.28.0 Platform Polish
(virtual scroll, KB auto-inject,
Helm chart, provider model prefs)
```
---
@@ -427,28 +449,28 @@ Organized by domain. Pull into a version when the surrounding work
makes them a natural addition.
**Surfaces + Editor**
- [ ] Extension loader: surfaces from manifest.json (was v0.21.3`/s/:slug` route deferred to v0.27.0)
- [ ] Editor drag-drop file reorder (was v0.21.5)
- [x] ~~Extension loader: surfaces from manifest.json~~ (v0.27.0`/s/:slug` route)
- [x] ~~Editor drag-drop file reorder~~ (v0.27.0 — workspace debt)
- [ ] Article drag-to-reorder outline sections (was v0.21.6)
- [ ] Article-specific AI tools: suggest_outline, expand_section, check_citations (was v0.21.6)
- [x] ~~PDF export via pandoc~~ (shipped v0.22.4)
- [ ] Mobile: mode selector collapses to hamburger/bottom nav (was v0.21.3)
- [ ] Pane state persistence per-user/per-project (pane positions saved, not yet persisted across sessions)
- [x] ~~Pane state persistence per-user/per-project~~ (v0.27.0 — workspace debt)
**Workspace + Git**
- [ ] Workspace settings UI: git config section in channel/project settings (was v0.21.4)
- [ ] User settings: git credentials management UI (was v0.21.4)
- [ ] `.gitignore` respect in workspace indexing (was v0.21.4)
- [x] ~~Workspace settings UI: git config section in channel/project settings~~ (v0.27.0 — workspace debt)
- [ ] User settings: git credentials management UI (was v0.21.4 — needs vault extension, v0.28.0+)
- [x] ~~`.gitignore` respect in workspace indexing~~ (v0.27.0 — workspace debt)
- [ ] Integration tests: clone, commit, push/pull cycle — requires git binary in CI (was v0.21.4)
**Provider Health + Routing**
- [x] ~~`RecordOutcome` for web_search and url_fetch~~ (shipped v0.22.4 — tool health tracking)
- [x] ~~Rate limit tracking per provider config~~ (shipped v0.22.4 — `rate_limit_count` on `provider_health`)
- [x] ~~Auto-disable: mark provider inactive when `down` for N consecutive health windows~~ (shipped v0.22.4)
- [ ] `capability_match` policy type ("cheapest model with tool_calling")
- [ ] `capability_match` policy type ("cheapest model with tool_calling") — v0.28.0 candidate
- [ ] Latency-aware routing: track response time percentiles, prefer faster providers
- [ ] Cost-aware routing with budget ceiling per request
- [ ] New provider types registrable via config file (OpenAI-compatible + custom schema)
- [ ] New provider types registrable via config file (OpenAI-compatible + custom schema) — v0.28.0 candidate
- [ ] Provider profile editor: key-value config per provider type, preview of effective settings
- [ ] Fallback chain visualizer: drag-to-reorder provider priority per model family
@@ -456,7 +478,8 @@ makes them a natural addition.
- [x] ~~Session cleanup job~~ (shipped v0.26.0 — background goroutine, `SESSION_EXPIRY_DAYS`)
**Tool System**
- [x] ~~Persona tool grant enforcement~~ (shipped v0.25.0 — second-pass allowlist in completion handler)
- [x] ~~Persona tool grant enforcement~~ (shipped v0.25.0 — second-pass allowlist in `completion.go:928`)
- [x] ~~Workflow version snapshot includes tool grants~~ (shipped v0.26.0 — `workflows.go:263`)
---
@@ -739,7 +762,7 @@ See [DESIGN-0.25.0.md](DESIGN-0.25.0.md) for full spec.
- [x] Core surfaces (chat, admin, settings, editor, notes) on manifest pattern
- [x] `window.__PAGE_DATA__` injection from declared `data_requires`
- [x] `surface_registry` table — admin can enable/disable surfaces (Migration 022)
- [ ] `/s/:slug` route namespace for extension/dynamic surfaces — deferred
- [ ] `/s/:slug` route namespace for extension/dynamic surfaces — v0.27.0
**Component Extraction**
- [x] FileTree: extracted from `editor-mode.js`, standalone component with Go template partial + JS hydration
@@ -767,11 +790,11 @@ See [DESIGN-0.25.0.md](DESIGN-0.25.0.md) for full spec.
**CSS Decomposition**
- [x] Monolithic `styles.css` → 13 files: variables, layout, primitives, modals, chat, panels, surfaces, splash, pane-container, chat-pane, user-menu, tool-grants, admin-surfaces
**Persona Tool Grants UI** (partial — UI only, backend wire deferred)
**Persona Tool Grants UI**
- [x] Persona create/edit UI: "Tools" section — multi-select checklist grouped by category
- [x] `loadToolList()` fetches from `/api/v1/tools`, `loadToolGrants()` reads per-persona grants
- [ ] Completion handler applies `GetToolGrants()` as second-pass allowlist — deferred to v0.27.0
- [ ] Version snapshot includes persona tool grants at snapshot time — deferred to v0.27.0
- [x] Completion handler applies `GetToolGrants()` as second-pass allowlist (`completion.go:928`)
- [x] Version snapshot includes persona tool grants at snapshot time (`workflows.go:263`)
**Bug Fixes (v0.25.3v0.25.4)**
- [x] Theme system mode (system preference → dark fallback)
@@ -792,16 +815,19 @@ See [DESIGN-0.25.0.md](DESIGN-0.25.0.md) for full spec.
**Shared Surface Routes** — partially shipped
- [x] `/admin/:section`, `/settings/:section` — full-page surface routes
- [ ] `/s/editor/:wsId`, `/s/article/:wsId/:path`deferred
- [ ] `/p/:id` — shared project view — deferred
- [ ] `/s/editor/:wsId`, `/s/article/:wsId/:path`v0.27.0 (extension surface routes)
- [ ] `/p/:id` — shared project view — TBD
**Shipped in v0.26.0:**
- [x] Context-Aware Tool System (`ToolContext`, `Require` predicates, `AvailableFor()`)
- [x] `ExecutionContext` extension (`WorkflowID`, `TeamID` fields)
**Deferred to v0.27.0:**
- [ ] Tool grant enforcement in completion handler
- [ ] Extension surface route namespace (`/s/:slug`)
**Shipped (verified in code audit):**
- [x] Tool grant enforcement in completion handler (`completion.go:928`)
- [x] Workflow version snapshot includes tool grants (`workflows.go:263`)
**Moved to v0.27.0:**
- [x] ~~Extension surface route namespace (`/s/:slug`)~~ → v0.27.0 Phase 1
**Migration:**
- [x] 022_surfaces.sql: `surface_registry` table (UUID PK, unique surface_id, is_enabled, is_core)
@@ -836,7 +862,7 @@ release notes.
- [x] Route registration test (`TestRouteRegistration`)
- [x] Workflow CRUD test (`TestWorkflowCRUD`, `TestWorkflowValidation`)
**Deferred to v0.27.0:**
**Moved to v0.27.0 Phase 2 (Workflow Polish):**
- [ ] Team-scoped workflow management UI (team admin settings surface)
- [ ] Drag-and-drop stage reorder in builder (backend supports it, UI is manual)
- [ ] `on_complete` workflow chaining (column exists nullable, not wired)
@@ -844,26 +870,129 @@ release notes.
- [ ] Stage persona auto-switch in chat UI
- [ ] Round-robin auto-assignment
- [ ] Assignment notifications via WebSocket
- [ ] Extension surface routes (`/s/:slug` namespace)
- [ ] Persona tool grant enforcement in completion handler
- [ ] Channel header stage indicator + advance/reject controls
**Moved to v0.27.0 Phase 1:**
- [ ] Extension surface routes (`/s/:slug` namespace)
**Shipped (verified in code audit):**
- [x] Persona tool grant enforcement in completion handler (`completion.go:928`)
---
## v0.27.0 — Tasks / Autonomous Agents
## v0.27.0 — Debt Clearance
Unattended execution — workflows without a human in the loop.
Depends on: workflow engine (v0.26.0).
Extension surface routes, workflow engine polish, workspace/editor debt.
Depends on: workflow engine (v0.26.0), dynamic surfaces (v0.25.0).
_(Shifted from v0.23.0 — no content changes, dependency refs updated to v0.26.0)_
See [DESIGN-0.27.0.md](DESIGN-0.27.0.md) for full spec.
- [ ] Scheduler + task runner (cron-like triggers for workflow instantiation)
- [ ] `task_create` tool (AI can spawn sub-workflows)
- [ ] `type: 'service'` channels: workflow instances with no human participants
- [ ] Execution budgets: max tokens, max tool calls, max wall-clock per stage
- [ ] Admin controls for resource limits and kill switches
- [ ] Completion webhooks (notify external systems when workflow completes)
- [ ] Workflow chaining: one workflow's completion triggers another workflow's start
**Phase 1: Extension Surface Routes (`/s/:slug`)**
- [ ] `surface-extension` Go template (HTML + CSS + scripts blocks)
- [ ] `base.html` conditional chain extended with `{{if .Manifest}}` fallthrough
- [ ] `loadExtensionSurfaces()` in page engine (reads extension manifests from DB at startup)
- [ ] nginx location block for `/surfaces/` static assets
- [ ] Frontend nav renders extension surfaces from `ListEnabledSurfaces`
- [ ] Admin surfaces section: upload/enable/disable/uninstall (API already exists)
- [ ] Sample `.surface` archive (hello-world dashboard) for testing
- [ ] CSP nonce propagation for extension scripts
**Phase 2: Workflow Engine Polish (v0.26.0 debt)**
- [ ] Channel header workflow stage indicator + advance/reject controls
- [ ] Stage persona auto-switch in chat UI
- [ ] Assignment notifications via WebSocket (`workflow.assigned`, `workflow.claimed`)
- [ ] Round-robin auto-assignment (per-stage `transition_rules.auto_assign`)
- [ ] `on_complete` workflow chaining (column exists, wire trigger logic)
- [ ] Workflow retention enforcement (extend staleness sweep goroutine)
- [ ] Drag-and-drop stage reorder in workflow builder UI
- [ ] Team-scoped workflow management UI (team settings → Workflows section)
**Phase 3: Workspace + Editor Debt**
- [ ] `.gitignore` respect in workspace indexing (`workspace/indexer.go`)
- [ ] Workspace settings UI: git config section in channel/project settings
- [ ] Pane state persistence per-user/per-project (save/restore in `user_settings`)
- [ ] Editor drag-drop file reorder (workspace file tree DnD)
---
## v0.27.1 — Tasks Foundation: Service Channels + Scheduler
Core primitive for autonomous agents: a channel with no human
participant, driven by a cron scheduler.
Depends on: v0.27.0 (debt clearance).
- [ ] `tasks` table + store interface + PG/SQLite implementations
- [ ] `type: 'service'` channel type (no human participants)
- [ ] `TaskScheduler` background goroutine (poll interval: 30s)
- [ ] Cron expression parsing (`robfig/cron/v3`) + `next_run_at` computation
- [ ] Prompt task execution (create service channel, send prompt, collect response)
- [ ] Workflow task execution (instantiate workflow in service channel)
- [ ] Provider resolution for task context (BYOK → team → global → routing policy)
- [ ] Tasks sidebar section (read-only view of service channels)
- [ ] Migration 026: `tasks` table, `service` channel type
---
## v0.27.2 — Task Execution: Budgets + Admin Controls
Guardrails for unattended execution.
Depends on: v0.27.1 (task scheduler).
- [ ] Execution budget enforcement: `max_tokens`, `max_tool_calls`, `max_wall_clock`
- [ ] `task_runs` table + store (run history, status, budget usage)
- [ ] Budget breach → `budget_exceeded` status + owner notification
- [ ] Concurrent run skip (if previous run still active, skip with warning)
- [ ] Global config: `tasks.enabled`, `tasks.allow_personal`, `tasks.max_concurrent`
- [ ] Default budget ceilings in global config (overridable per task)
- [ ] `tasks.create` and `tasks.admin` permissions
- [ ] Admin panel → Tasks section (CRUD, history, kill switch, budget config)
---
## v0.27.3 — Task Chaining: Webhooks + Workflow-to-Workflow
External integration and multi-workflow orchestration.
Depends on: v0.27.2 (task budgets).
- [ ] Completion webhooks (POST to external URL on task/workflow completion)
- [ ] Webhook retry (3 attempts, exponential backoff) + HMAC signature
- [ ] `task_create` tool (AI spawns sub-tasks, `RequireWorkflow` predicate, depth limit)
- [ ] `on_complete` chaining via task system (completed workflow → one-shot task → target workflow)
- [ ] Webhook secret generation per task/workflow
---
## v0.27.4 — Personal Tasks: BYOK Scheduling + User Task UI
User-facing task experience. Personal tasks run against BYOK providers.
Depends on: v0.27.2 (admin controls, `tasks.allow_personal`).
- [ ] Settings → Tasks section (CRUD, schedule builder, budget config)
- [ ] Schedule builder: preset crons + custom 5-field cron + timezone selector
- [ ] BYOK provider routing for personal tasks
- [ ] `tasks.personal_require_byok` config key (prevent fallthrough to org providers)
- [ ] Output modes: channel (default), note, webhook
- [ ] Task notification booleans: `notify_on_complete` (default false), `notify_on_failure` (default true)
- [ ] Tasks sidebar section with status indicators (✓/✗/⏳/▶)
- [ ] "Run Now" button for manual trigger
- [ ] 35 optional starter templates (news digest, stock screener, standup prep, etc.)
---
## v0.28.0 — Platform Polish
TBD pull-forward: high-value items whose dependencies are met post-tasks.
**Tier 1 — High value, dependencies met:**
- [ ] Virtual scroll for long conversations (prerequisite for heavy task output channels)
- [ ] KB auto-injection: top-K chunk prepend, context budget aware, per-channel toggle
- [ ] Helm chart (replaces raw k8s manifests, `helm install switchboard ./chart`)
- [ ] Per-provider model preferences (`provider_config_id` dimension in `user_model_settings`)
**Tier 2 — Medium value:**
- [ ] Memory compaction: summarize old memories, confidence decay, prune low-confidence
- [ ] `capability_match` routing policy ("cheapest model with tool_calling")
- [ ] New provider types registrable via config file (OpenAI-compatible + custom schema)
---
@@ -895,7 +1024,7 @@ based on need.
**UX / Multi-Seat**
- "Group" scope badge on model selector / KB list: show access-source annotation so users see _why_ they have access (global, team, group grant). Requires backend to include `access_source` in list responses.
- Per-provider model preferences: `user_model_settings` unique key is `(user_id, model_id)` — same model from different providers shares one visibility toggle. Needs `provider_config_id` dimension in DB constraint, store, API, and frontend `hiddenModels` keying. Frontend composite key (`configId:modelId`) already exists in `App.models[].id`.
- ~~Per-provider model preferences~~ → scheduled v0.28.0. `user_model_settings` unique key is `(user_id, model_id)` — same model from different providers shares one visibility toggle. Needs `provider_config_id` dimension in DB constraint, store, API, and frontend `hiddenModels` keying. Frontend composite key (`configId:modelId`) already exists in `App.models[].id`.
- Git credentials store: vault-encrypted per-user git credentials (similar to BYOK pattern). Git provider abstraction (GitHub, GitLab, Gitea). Clone/pull/push handlers. Natural fit for extension sidecar tier since git operations are long-running.
- Admin settings team/user export: v0.25.4 ships admin-only settings export/import. User export blocked by vault-encrypted BYOK keys (can't round-trip). Team export needs merge-vs-replace semantics for member lists.
@@ -907,7 +1036,7 @@ based on need.
- Sub-projects / nested hierarchy: child inherits parent KBs, system prompt, persona (deferred until usage patterns clarify need vs tags/labels)
**Knowledge Bases — Future**
- KB auto-injection: top-K chunk prepend to system prompt, context budget aware, per-channel toggle (latency budgeting required)
- ~~KB auto-injection~~ → scheduled v0.28.0
- Hybrid search: combine vector similarity with full-text `tsvector`, re-rank
- Semantic chunking: embedding-based boundary detection for smarter splits
- HNSW index: better query performance than IVFFlat for large datasets
@@ -917,8 +1046,8 @@ based on need.
(currently uses direct `database.DB.ExecContext` in handler — works but bypasses store layer)
**Memory — Future**
- Memory compaction: summarize old memories to save context tokens
- Memory confidence decay: reduce confidence over time, prune low-confidence entries
- ~~Memory compaction~~ → scheduled v0.28.0
- ~~Memory confidence decay~~ → scheduled v0.28.0 (combined with compaction)
- Memory export/import: portable memory format across instances
- Cross-persona memory sharing (opt-in): e.g. "coding assistant" can read facts from "project manager"
- Memory analytics: dashboard showing what Personas are learning, memory growth trends
@@ -928,9 +1057,9 @@ based on need.
- ~~Provider health monitoring~~ → v0.22.0 + key rotation
- Multi-tenant SaaS mode
- Plugin/extension marketplace
- Virtual scroll for long conversations
- ~~Virtual scroll for long conversations~~ → scheduled v0.28.0
- ~~SQLite backend option (single-user / dev)~~ → v0.17.1
- **Helm chart.** The k8s/ raw manifests with `${VAR}` substitution have served well but are friction for external adopters and make values management manual. A Helm chart wraps the same backend + frontend deployments with a `values.yaml` (replicas, image tags, ingress host, storage class, secret refs, resource limits, feature flags). Target: `helm install switchboard ./chart` for a fresh cluster, `helm upgrade` for rolling deploys. Subcharts for optional Postgres (for dev/test — prod uses external). Candidate for v0.28+ or a parallel track once the core feature set stabilizes.
- ~~**Helm chart.**~~ → scheduled v0.28.0
~~**Pane Architecture (Workspace Container)**~~ → shipped in v0.25.0