# Investibook v0.1

> Released: 2026-03-11  
> Tag: `investibook/v0.1`

## Overview

Investibook v0.1 is the first production-ready release of the Investibook platform — a workspace-based AI research tool for diagnosing TiDB Cloud incidents. This release delivers the complete foundation: backend persistence, multi-workspace management, alert source ingestion, MCP tool integration, a Go CLI, and EKS production deployment.

---

## New Features

### Authentication & User System

- **Email-based login** (`/login` page): users enter their email to get a Bearer token, stored in `localStorage`. All API calls go through `fetchWithAuth()` with auto-redirect to `/login` on 401. ([#134])
- **SSO login page** integrating with the existing Auth0/SSO flow for production access. ([#175])
- **Admin email allowlist** (`ADMIN_EMAILS` env var) for controlling access to admin-only features. ([#168])
- **Persistent connection keys** so individual user credentials and MCP tokens survive pod restarts. ([#167])

### Workspace & Backend Persistence

- **Full backend persistence** via SQLite (`backend/main.py`): tables for users, sessions, workspaces, sources, artifacts, messages, and ACP sessions are auto-created on startup. ([#134])
- **Workspace CRUD REST API**: `GET/POST /api/workspaces`, `GET/PUT/DELETE /api/workspaces/{id}`, all scoped to the authenticated user. ([#134])
- **Sources, Artifacts & Messages REST API**: `GET/PUT /api/workspace/{id}/sources`, `/artifacts`, `/messages`, `/session` — replaces all `localStorage`-based persistence. ([#134])
- **Read-only workspace sharing**: workspace owners can generate a shareable link; non-owners get read-only access (chat input disabled, no source/artifact mutations). ([#135])
- **ACP session persistence & recovery**: session IDs stored in DB and restored after pod restarts; full chat history loaded on workspace open. ([#134], [#135])

### Alert Source Pipeline

- **Alert source preparation**: submit an alert ID → backend fetches data from S3, extracts cluster metadata, and provisions workspace files; `POST /api/sources/prepare` returns a task ID for polling. ([#137])
- **Frontend automation**: after adding an alert source, the UI polls preparation status (2 s interval), shows a spinner, then auto-creates a Report artifact and Anomaly artifact on completion. ([#137], [#149])
- **Source status indicator**: `SourceCard` shows `loading` / `ready` / `error` tri-state with spinner and error messages. ([#148])
- **Multiple alert sources**: a single workspace can hold multiple alert sources from different clusters. ([#161])
- **Alert comment summary**: after preparing an alert source, an AI-generated summary of alert comments is surfaced in the UI. ([#193])
- **Fix: artifact creation guard** — only create report artifacts when the corresponding insight/diagnostic files actually exist. ([#153])

### MCP Integration

- **MCP server support** for Clinic, O11Y, and Ops Portal connectors configured via `.opencode/opencode.json` in each workspace directory. ([#132], [#146])
- **Unified screenshot MCP tool** (`diagnostic_screenshot`): agent can capture Grafana dashboard panels as images; results stream back as `image` SSE events in the chat. ([#133])
- **EKS MCP deployment**: MCP server pods deployed on EKS alongside the Investibook backend. ([#141], [#151])
- **Clinic refresh token tools**: a set of tools + quick-hint prompts for refreshing Clinic API tokens from the chat interface. ([#169], [#171], [#188])
- **TopSQL MCP fix**: resolved data-fetching issue with the TopSQL MCP tool. ([#184])
- **PSC knowledge base cleanup**: removed collapsed/irrelevant panels from the PSC Grafana knowledge base for better signal quality. ([#181])

### investibook-cli (Go CLI)

> Design doc: [docs/INVESTIBOOK_CLI.md](../INVESTIBOOK_CLI.md)

- **`investibook` single-binary Go CLI** bootstrapped and published as `investibook-cli/v0.1`. Supports `INVESTIBOOK_API` / `INVESTIBOOK_TOKEN` / `INVESTIBOOK_WORKSPACE` env vars. ([#158])
- **`investibook workspace`** — `create`, `list`, `use`, `show`; active workspace persisted in `~/.investibook/session.json`. ([#158])
- **`investibook chat`** — streams agent response via SSE with terminal color rendering (thinking/tool/text); web UI co-viewers see the same messages in real time. ([#158])
- **`investibook sources`** — `add alerts <alert-id>` triggers source preparation with progress indicator; `list`, `remove`. ([#158])
- **`investibook reports`** — `list`, `get <id|latest> [--format json|text]`; renders Studio Artifacts as structured terminal output. ([#158])
- **`investibook files`** — `list`, `get <path>`. ([#158])
- **API key auth for CLI** (`--api-key` flag and `INVESTIBOOK_API_KEY` env var) instead of email login. ([#183])
- **OpenClaw/MCP tool integration**: CLI commands packaged as MCP tools (`investibook_chat`, `investibook_add_alert`, `investibook_get_report`, etc.) for agent-driven automation. ([#158], [#162])
- **Chat history sync fix**: CLI-originated messages now sync correctly with the web UI message history. ([#186])
- **Default API host updated** to the production endpoint. ([#189])

### UI & Studio Panel

- **Guardian Insight Report in StudioPanel**: `InsightReport` component correctly loads and renders from the workspace's `insight.json` file; anomalies panel loads from `diagnostic_package.json`. ([#147])
- **Mobile UI**: responsive layout for the three-column workspace view on small screens. ([#152])
- **Source card UI polish**: improved card design and status display. ([#148])
- **Scroll fix for shared workspace viewer**: non-owner users can now scroll normally. ([#180])

### Production Deployment

- **EKS Kustomize manifests**: complete `deployment/kustomize/` structure with ALB Ingress, ConfigMaps, Secrets, EBS PersistentVolumeClaims (`data-pvc.yaml`, 100G), and pod ServiceAccount RBAC. ([#141], [#151], [#182], [#185], [#187])
- **CI/CD pipeline**: GitHub Actions for automated build → push → deploy on every merge to the release branch. ([#185])
- **Backend pod filesystem fix**: data directory structure (`data/db/`, `data/workspaces/`) now initialises correctly in the pod. ([#136])
- **ServiceAccount role fix**: correct RBAC permissions for the investibook backend pod. ([#145])
- **Logo and app icons** added. ([#208])

### System Prompt

- **Optimized welcome and source system prompts**: improved agent onboarding instructions and source-context injection for more accurate diagnostic conversations. ([#163])

---

## Bug Fixes

| PR | Fix |
|----|-----|
| [#135] | Fix auth redirect loop and chat session recovery |
| [#136] | Fix backend pod filesystem initialization |
| [#145] | Fix pod ServiceAccount RBAC permissions |
| [#146] | Fix MCP configuration path resolution |
| [#147] | Fix Guardian Insight Report display |
| [#148] | Fix source card UI rendering |
| [#149] | Fix alert source preparation polling |
| [#153] | Only create report artifacts when source files exist |
| [#164] | Fix frontend build error |
| [#165] | Fix fallback behavior when adding a resource |
| [#173] | Fix broken image rendering in chat |
| [#174] | Fix alert source count display |
| [#177], [#178] | Fix repeated frontend build errors |
| [#179] | Fix dev-mode auth bug |
| [#180] | Fix scroll behavior for shared workspace viewer |
| [#184] | Fix TopSQL MCP data fetching |
| [#186] | Fix CLI chat history sync |
| [#188] | Fix Clinic refresh token tools |
| [#191] | Fix Clinic refresh token logic |

---

## Contributors

@handlerww · @llt-sudo · @iguoyr · @Yujie-Xie · @nolouch
