Changeset 0.9.4 (#54)

This commit is contained in:
2026-02-24 10:44:12 +00:00
parent 90021157e6
commit 5e416d3726
26 changed files with 1333 additions and 108 deletions

View File

@@ -49,11 +49,17 @@ v0.17.0 Extension Surfaces + Modes
v0.18.0 Smart Routing (policy on model roles)
v0.19.0 Live Collaboration (presence, co-editing)
v0.19.0 Multi-Participant Channels + Presence
v0.20.0 Auth Strategy (mTLS/OIDC) + Full RBAC
v0.21.0 Tasks / Autonomous Agents
┌───────┴──────────────┐
│ │
v0.21.0 Workflow v0.22.0 Tasks /
Engine Autonomous Agents
(team-owned, (service channels,
staged processes, scheduler, unattended
human + AI collab) execution)
```
---
@@ -108,7 +114,7 @@ and the model pipeline made real for end users.
---
## v0.9.2 — Quick UX Wins + Hardening
## v0.9.2 — Quick UX Wins + Hardening
Polish that doesn't need new infrastructure. Ship fast, stabilize.
@@ -127,30 +133,55 @@ Polish that doesn't need new infrastructure. Ship fast, stabilize.
---
## v0.9.3 — Content Visibility & Block Controls
## v0.9.3 — Content Visibility & Block Controls
User control over what's expanded/collapsed in the message flow. Thinking
blocks, tool calls, and code blocks all get consistent collapse controls
instead of being hidden or auto-formatted without user agency.
**Code Blocks**
- [ ] Collapse/expand toggle button on code block header (alongside Copy/Preview)
- [ ] Auto-collapse at threshold (>15 lines), user can always toggle
- [ ] Smooth max-height transition instead of `<details>` wrapping
- [x] Collapse/expand toggle button on code block header (alongside Copy/Preview)
- [x] Auto-collapse at threshold (>15 lines), user can always toggle
- [x] Smooth max-height transition instead of `<details>` wrapping
**Thinking Blocks**
- [ ] Always render thinking blocks (never hide from DOM)
- [ ] `showThinking` setting controls default open/closed, not visibility
- [ ] User can always click to expand regardless of setting
- [x] Always render thinking blocks (never hide from DOM)
- [x] `showThinking` setting controls default open/closed (default: false), not visibility
- [x] User can always click to expand regardless of setting
- [x] `reasoning_content` delta field support for models that stream thinking separately (Grok, etc.)
- [x] Reasoning accumulated during streaming, wrapped in `<think>` tags before persistence
**Tool Calls**
- [ ] Persist tool call metadata in stored messages
- [ ] Render tool calls on history load (not just during streaming)
- [ ] Collapsed by default: "🔧 tool_name → done" with toggle for full I/O
- [ ] Notes tool: "📝 View note" link that navigates to Notes panel
- [x] Persist tool call metadata in stored messages (`tool_calls` JSONB column)
- [x] Render tool calls on history load (not just during streaming)
- [x] Collapsed by default: "🔧 tool_name → done" with toggle for full I/O
- [x] Notes tool: "📝 View note" link that navigates to Notes panel
- [x] Tool result rendering fix (operator precedence bug showing "undefined results")
**Notes Panel**
- [ ] Copy button on note cards (same pattern as code block copy)
**Notes Panel → Side Panel**
- [x] Copy button on note cards (same pattern as code block copy)
- [x] Unified side panel replaces inline HTML preview and notes modal
- [x] Tabbed interface: Preview and Notes tabs
- [x] Desktop: slides in from right (480px), chat area shrinks via flexbox
- [x] Mobile: full-width overlay at z-index 200
- [x] Escape key integration (generation → command palette → side panel → modals)
**Streaming Refactor**
- [x] Extracted `streamWithToolLoop()` into `stream_loop.go` as single canonical streaming implementation
- [x] Both `streamCompletion` (normal chat) and `Regenerate` call shared function — only persistence differs
- [x] Regenerate handler now has full feature parity: tools, reasoning, tool_calls persistence
- [x] Fixed nil `json.RawMessage` causing PostgreSQL JSONB rejection on regen persistence
**Regenerate Fix**
- [x] Regen streams in-place (truncates display to parent before streaming)
- [x] No more "collapse to original branch" after completion
**Favicon**
- [x] Animated SVG favicon during generation (cascading opacity pulse on 4 dots)
**Admin Scope**
- [x] Admin models endpoint returns only global-scope models (not user BYOK or team models)
- [x] Bulk visibility toggle scoped to global providers only
---
@@ -480,15 +511,31 @@ Rules-based routing engine — policy, not ML.
---
## v0.19.0 — Live Collaboration
## v0.19.0 — Multi-Participant Channels + Presence
The channel foundation for workflows and real-time collaboration. Today
channels are single-user direct chats. This release makes channels a
shared space that multiple actors can inhabit.
Depends on: extension surfaces (v0.17.0), WebSocket infrastructure (already exists).
**Channel Participants**
- [ ] `channel_participants` table: `channel_id`, `participant_type` (user, session, persona), `participant_id`, `role` (owner, member, observer), `joined_at`
- [ ] Channel access queries rewritten: `WHERE user_id = $1` → participant-based lookup
- [ ] Backward compatible: existing single-user channels auto-have one participant (owner)
- [ ] Channel `type` column: `direct` (current), `group` (multi-user), `workflow` (staged)
**Presence + Real-time**
- [ ] Typing indicators and presence (who's online, who's in this channel)
- [ ] Participant join/leave events via WebSocket
- [ ] Co-editing for extension surfaces (editor mode, article mode)
- [ ] Enables: IDE extension with pair programming, collaborative doc editing
- [ ] Cursor sharing, selection highlighting
**Channel-Scoped Notes**
- [ ] Optional `channel_id` FK on notes (NULL = personal notebook, set = channel-attached)
- [ ] Notes created by tool calls within a channel auto-attach to that channel
- [ ] Channel notes visible to all participants (not just creator)
---
## v0.20.0 — Auth Strategy (mTLS/OIDC) + Full RBAC
@@ -506,17 +553,74 @@ personal providers under external auth).
- [ ] Vault passphrase prompt for mTLS/OIDC users (v0.9.3 conditional unlock)
- [ ] Fine-grained permissions: model access, KB write, task create, token budgets
**Anonymous / Session Participants**
- [ ] Session-based identity for unauthenticated visitors (workflow intake)
- [ ] mTLS: cert CN/fingerprint as stable session identity (no `users` row required)
- [ ] Non-mTLS: ephemeral session token (cookie or URL token)
- [ ] Session participants can send messages and trigger tool calls within workflow channels
- [ ] Session identity visible to assigned team members (cert DN, display name, or "Anonymous #N")
---
## v0.21.0 — Tasks / Autonomous Agents
## v0.21.0 — Workflow Engine
The capstone: everything combined into autonomous workflows.
Team-owned, stage-based process execution. The channel is the runtime,
personas drive each stage, and the existing tool/notes infrastructure
handles structured data collection. See [ARCHITECTURE.md — Workflow
Architecture](ARCHITECTURE.md#workflow-architecture-future--v0210) for
the conceptual model.
- [ ] Scheduler + task runner
- [ ] `task_create` tool
- [ ] `type: 'service'` channels with no human members
- [ ] Depends on: completion handler, tool execution, notes, web search
- [ ] Admin controls for resource limits, execution budgets
Depends on: multi-participant channels (v0.19.0), anonymous identity (v0.20.0).
**Workflow Definitions**
- [ ] `workflows` table: `team_id` (owner), `name`, `description`, `is_active`, `entry_mode` (public_link, team_internal, api)
- [ ] `workflow_stages` table: `workflow_id`, `ordinal`, `persona_id`, `assignment_team_id`, `form_template` (JSONB, structured note schema), `transition_rules` (JSONB)
- [ ] Team-admin CRUD: create/edit/delete workflows and stages
- [ ] Workflow versioning: edits create new version, active instances continue on their version
**Workflow Instances (Channels)**
- [ ] Workflow-typed channels: `type='workflow'`, `workflow_id`, `current_stage`, `stage_version`
- [ ] Entry point: public link generates workflow channel, adds anonymous participant, binds stage 1 persona
- [ ] Stage transitions: triggered by AI (tool call), team member (button), or rule (form complete)
- [ ] On transition: swap active persona, notify assignment team, update channel metadata
**AI Intake**
- [ ] Stage persona drives structured collection via system prompt
- [ ] Form template → persona system prompt injection ("collect these fields: ...")
- [ ] Tool calls create channel-scoped notes as form responses
- [ ] AI determines readiness: "I have everything needed" → trigger transition
**Assignment + Queue**
- [ ] Assignment queue: unassigned workflow channels visible to team members
- [ ] Claim model: team member claims channel (becomes participant with `member` role)
- [ ] Round-robin / rule-based auto-assignment (optional, per-stage config)
- [ ] Assignment notifications via WebSocket + optional webhook
**Team Member Collaboration**
- [ ] Assigned member sees full history (AI intake + artifacts + notes)
- [ ] Persona remains active — assists both visitor and team member
- [ ] Member can trigger stage transitions, add notes, invoke tools
- [ ] Member can reassign to different team member or escalate to different team
**Frontend**
- [ ] Workflow builder UI in team admin panel (stage list, persona picker, form template editor)
- [ ] Queue view: sidebar section showing unassigned workflow channels for user's teams
- [ ] Channel header: workflow stage indicator, transition controls
- [ ] Anonymous visitor view: minimal UI, persona-driven conversation (public link entry)
---
## v0.22.0 — Tasks / Autonomous Agents
Unattended execution — workflows without a human in the loop.
Depends on: workflow engine (v0.21.0).
- [ ] 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)
---
@@ -545,7 +649,6 @@ based on need.
- Rate limiting per user/team/tier (token budgets)
- Provider health monitoring + key rotation
- Multi-tenant SaaS mode
- Workflow builder (visual DAG for chaining models + tools)
- Plugin/extension marketplace
- Virtual scroll for long conversations
- SQLite backend option (single-user / dev)