diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 11e69e1..35b9cd0 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -841,12 +841,12 @@ be compacted independently. Unused branches keep their full history. **What to implement when:** -Phase 1 (v0.6.x): Add `parent_id` to messages table. Backfill +Phase 1: Add `parent_id` to messages table. Backfill existing messages with linear parent chains. All new messages created with proper `parent_id`. Frontend still renders linearly — no branch UI yet. This is the "do it now while it's cheap" step. -Phase 2 (v0.7.x+): Edit-and-resubmit creates siblings instead of +Phase 2: Edit-and-resubmit creates siblings instead of replacing. Regenerate creates sibling model responses. Branch indicator `← 1/2 →` in the UI. `channel_cursors` table for tracking active branch. @@ -887,7 +887,7 @@ supports tool calling. Priority is based on: dependency depth (what blocks other things), solo-user value (Jeff is the first user), and complexity. -### Phase 1: Channel Foundation + Organization (v0.6.x) +### Phase 1: Channel Foundation + Organization **chats → channels migration + message tree + Folders + Projects + banners** - Rename `chats` → `channels`, add `type`, `channel_members`, `channel_models`, `participant_type`/`participant_id` on messages. @@ -907,25 +907,25 @@ solo-user value (Jeff is the first user), and complexity. - This is the schema foundation everything else builds on. Do it now while there's one user and a handful of chats. -### Phase 2: Notes + Built-in Tools (v0.7.x) +### Phase 2: Notes + Built-in Tools ✅ **Notes CRUD + note_* tools + tool execution framework** - Enables the LLM to be genuinely useful beyond ephemeral chat. - Requires: tool execution in completion handler (the plumbing for _all_ tools). - This phase builds the tool calling infrastructure that everything else uses. -- **Conversation forking UI (v0.7.x):** Edit-and-resubmit creates +- **Conversation forking UI (done, 0.7.2):** Edit-and-resubmit creates siblings instead of replacing. Regenerate creates sibling model responses. Branch indicator `← 1/2 →` at fork points. Context assembly uses active path, not full channel history. -### Phase 3: Web Search + URL Fetch (v0.7.x) +### Phase 3: Web Search + URL Fetch **web_search + url_fetch tools** - Sidecar or direct HTTP from backend. - Paired with Notes: "research X and save findings to my notes." - Paired with Tasks (future): automated research. -### Phase 4: @mention Routing + Multi-participant (v0.7.x) +### Phase 4: @mention Routing + Multi-participant **@mention parsing + multi-model channels** - The channel schema exists from Phase 1. This phase adds the routing logic: scan messages for @mentions, resolve against @@ -934,28 +934,28 @@ solo-user value (Jeff is the first user), and complexity. - Enables: editor mode (multiple model roles), second opinions, cross-model conversations. -### Phase 5: Embeddings + Knowledge Bases (v0.8.x) +### Phase 5: Embeddings + Knowledge Bases **Embedding pipeline + pgvector + KB CRUD + kb_search tool** - Depends on: tool execution framework (Phase 2). - Notes get embedded too (once pipeline exists). - Admin configures embedding model. - KBs attach to channels via `channel_models.kb_ids`. -### Phase 6: Compaction (v0.8.x) +### Phase 6: Compaction **Auto-compaction service** - Depends on: utility LLM calling (same as task runner). - Channel-scoped: compacts any channel that exceeds context threshold. - Can be built alongside or after KB (similar backend pattern: background job that calls an LLM). -### Phase 7: Tasks (v0.9.x) +### Phase 7: Tasks **Scheduler + task runner + task_create tool** - Creates `type: 'service'` channels with no human members. - Depends on: completion handler, tool execution, notes, web search. - The capstone: everything below it combined into autonomous agents. - Admin controls for resource limits. -### Phase 8: Auth Strategy + Roles/Teams + Permissions (v0.10.x) +### Phase 8: Auth Strategy + Roles/Teams + Permissions **Enterprise auth modes + RBAC beyond admin/user** - Auth middleware strategy pattern: `AUTH_MODE` env var selects `builtin`, `mtls`, or `oidc`. All three resolve to the same diff --git a/BRANDING.md b/BRANDING.md new file mode 100644 index 0000000..0dd8af0 --- /dev/null +++ b/BRANDING.md @@ -0,0 +1,309 @@ +# Branding — Volume Mount Contract + +**Version:** 0.7.3 +**Status:** Spec + +--- + +## Overview + +Chat Switchboard supports white-label branding through a volume mount at +`/branding/` on the frontend container. Deployers provide a ConfigMap (or +bind mount) with their identity assets. The app reads a JSON config on +startup, serves static assets at runtime, and falls back gracefully when +no branding is mounted. + +Switchboard provides the hooks. Your brand lives in its own repo. + +--- + +## Mount Path + +``` +/branding/ ← volume mount root (frontend container) +├── branding.json ← config seed (required if mount exists) +├── favicon.png ← tab/bookmark icon +├── logo.png ← splash page hero, optional sidebar +└── custom.css ← style overrides (power-user escape hatch) +``` + +All files are optional individually, but `branding.json` is expected if the +mount exists. Missing files degrade gracefully — no broken images, no JS errors. + +--- + +## branding.json — Config Seed + +```json +{ + "org_name": "Gobha.ai", + "tagline": "Something clever here", + "accent_color": "#4a9eff", + "logo": "logo.png", + "favicon": "favicon.png" +} +``` + +**Fields:** + +| Field | Type | Default | Description | +|----------------|--------|----------------------|---------------------------------------------| +| `org_name` | string | `"Chat Switchboard"` | Displayed in splash, header, auth card, `