{ "version": "1.0.0", "project": { "name": "waggle-os", "languages": [ "config", "css", "csv", "dockerfile", "docx", "html", "icns", "javascript", "json", "jsonl", "markdown", "nsi", "patch", "powershell", "python", "rust", "shell", "sql", "toml", "txt", "typescript", "unknown", "xml", "yaml" ], "frameworks": [ "React", "Next", "Vite", "Vitest", "Fastify", "Tailwind CSS", "Playwright", "Tauri", "Stripe", "Docker", "Docker Compose", "GitHub Actions" ], "description": "Waggle OS is a workspace-native AI agent platform with persistent memory, model-agnostic orchestration, and skill-extensible capabilities, delivered as a Tauri desktop app (React 19 + Vite) with a Fastify Node.js sidecar over an npm monorepo. Note: this project has over 100 source files; consider scoping analysis to a subdirectory for faster results.", "analyzedAt": "2026-06-26T09:19:20.813Z", "gitCommitHash": "18aebe1f4bd035cfe2646173db7d2fa5326d2ec9" }, "nodes": [ { "id": "file:packages/agent/tests/agent-intelligence.test.ts", "type": "file", "name": "agent-intelligence.test.ts", "filePath": "packages/agent/tests/agent-intelligence.test.ts", "summary": "Test suite exercising agent intelligence behaviours including tool utilization tracking and chat route ambiguity detection.", "tags": [ "test", "agent", "intelligence" ], "complexity": "moderate" }, { "id": "file:packages/server/src/db/migrate.ts", "type": "file", "name": "migrate.ts", "filePath": "packages/server/src/db/migrate.ts", "summary": "CLI entry point that opens the server database connection and runs all pending SQLite migrations.", "tags": [ "entry-point", "database", "migration" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/agents-store.ts", "type": "file", "name": "agents-store.ts", "filePath": "packages/server/src/local/agents-store.ts", "summary": "File-backed CRUD store for agent definitions persisted as JSON on disk, supporting add, get, patch, and delete operations.", "tags": [ "service", "data-model", "utility" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/agents-store.ts:readAgents", "type": "function", "name": "readAgents", "filePath": "packages/server/src/local/agents-store.ts", "lineRange": [ 65, 76 ], "summary": "Reads and parses the agents JSON file from the data directory, returning an empty array if not yet present.", "tags": [ "utility", "data-model" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/agents-store.ts:addAgent", "type": "function", "name": "addAgent", "filePath": "packages/server/src/local/agents-store.ts", "lineRange": [ 101, 112 ], "summary": "Creates a new agent entry with a generated UUID and timestamps, persisting it to the agents JSON store.", "tags": [ "utility", "data-model" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/agents-store.ts:patchAgent", "type": "function", "name": "patchAgent", "filePath": "packages/server/src/local/agents-store.ts", "lineRange": [ 121, 140 ], "summary": "Applies a partial update to an existing agent by ID, updating the updatedAt timestamp and writing back atomically.", "tags": [ "utility", "data-model" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/cors-config.ts", "type": "file", "name": "cors-config.ts", "filePath": "packages/server/src/local/cors-config.ts", "summary": "Defines allowed CORS origins for the local Fastify server and exports origin-validation helpers used by route handlers.", "tags": [ "configuration", "middleware", "security", "tested" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/cron.ts", "type": "file", "name": "cron.ts", "filePath": "packages/server/src/local/cron.ts", "summary": "Implements the LocalScheduler class that ticks at an interval, executing due cron jobs and tracking consecutive failures up to a configurable maximum before disabling a job.", "tags": [ "service", "scheduler", "utility", "tested" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/cron.ts:LocalScheduler", "type": "class", "name": "LocalScheduler", "filePath": "packages/server/src/local/cron.ts", "lineRange": [ 44, 168 ], "summary": "Interval-based cron scheduler that maintains failure counts and disables runaway jobs after reaching MAX_CONSECUTIVE_FAILURES.", "tags": [ "service", "scheduler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/data-erase-helpers.ts", "type": "file", "name": "data-erase-helpers.ts", "filePath": "packages/server/src/local/data-erase-helpers.ts", "summary": "Provides the core data-wipe helpers including confirmation validation, safe-directory assertion, marker file management, and recursive filesystem removal with an audit receipt.", "tags": [ "utility", "security", "data-model" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/data-erase-helpers.ts:performWipe", "type": "function", "name": "performWipe", "filePath": "packages/server/src/local/data-erase-helpers.ts", "lineRange": [ 241, 311 ], "summary": "Executes a full recursive deletion of the data directory, skipping protected entries and producing a structured wipe report.", "tags": [ "utility", "security" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/data-erase-helpers.ts:assertDataDirIsSafeToWipe", "type": "function", "name": "assertDataDirIsSafeToWipe", "filePath": "packages/server/src/local/data-erase-helpers.ts", "lineRange": [ 179, 208 ], "summary": "Guards against accidental deletion of root or home directories by resolving and checking multiple safety conditions before allowing a wipe.", "tags": [ "validation", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/index.ts", "type": "file", "name": "index.ts", "filePath": "packages/server/src/local/index.ts", "summary": "Main Fastify server factory for the local sidecar — registers all ~80 route plugins, decorates the server with memory, vault, connectors, and scheduling infrastructure, and seeds initial data on first run.", "tags": [ "entry-point", "api-handler", "service", "tested" ], "complexity": "complex", "languageNotes": "Single 2574-line buildLocalServer function wires every route plugin, middleware, and background job. Changing routing order or plugin registration here has server-wide impact." }, { "id": "function:packages/server/src/local/index.ts:buildLocalServer", "type": "function", "name": "buildLocalServer", "filePath": "packages/server/src/local/index.ts", "lineRange": [ 302, 2574 ], "summary": "Constructs and fully configures the Fastify local sidecar instance: registers plugins, seeds data, sets up memory substrate, wires connectors, and attaches all route handlers.", "tags": [ "entry-point", "service", "factory" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/lifecycle.ts", "type": "file", "name": "lifecycle.ts", "filePath": "packages/server/src/local/lifecycle.ts", "summary": "Manages LiteLLM process lifecycle: spawning, monitoring health, graceful shutdown, and re-start on crash for the local LLM proxy.", "tags": [ "service", "lifecycle", "middleware" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/llm-key-probe.ts", "type": "file", "name": "llm-key-probe.ts", "filePath": "packages/server/src/local/llm-key-probe.ts", "summary": "Probes LLM provider API keys by sending minimal test requests to verify their validity before exposing them to the rest of the system.", "tags": [ "utility", "validation", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/logger.ts", "type": "file", "name": "logger.ts", "filePath": "packages/server/src/local/logger.ts", "summary": "Creates and exports the Pino logger instance used throughout the local server sidecar for structured logging.", "tags": [ "utility", "singleton", "configuration" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/mcp-config.ts", "type": "file", "name": "mcp-config.ts", "filePath": "packages/server/src/local/mcp-config.ts", "summary": "Reads and writes the MCP (Model Context Protocol) server configuration from disk, seeding defaults and validating entries.", "tags": [ "configuration", "service", "data-model", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/memory-lane-cron.ts", "type": "file", "name": "memory-lane-cron.ts", "filePath": "packages/server/src/local/memory-lane-cron.ts", "summary": "Scheduled cron job that periodically surfaces memory-lane highlights by querying the memory substrate and emitting notification events.", "tags": [ "service", "scheduler", "event-handler", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/model-availability.ts", "type": "file", "name": "model-availability.ts", "filePath": "packages/server/src/local/model-availability.ts", "summary": "Checks which LLM models are available given the user's configured API keys and LiteLLM connection, returning an availability map used by routes.", "tags": [ "service", "utility", "validation" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/monthly-assessment.ts", "type": "file", "name": "monthly-assessment.ts", "filePath": "packages/server/src/local/monthly-assessment.ts", "summary": "Generates a monthly AI-driven self-assessment of workspace activity by querying the memory substrate and invoking an LLM to produce structured insights.", "tags": [ "service", "event-handler", "data-model", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/net-config.ts", "type": "file", "name": "net-config.ts", "filePath": "packages/server/src/local/net-config.ts", "summary": "Resolves the server bind host from environment variables and exports network configuration constants used by security middleware and the service startup.", "tags": [ "configuration", "utility", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/offline-manager.ts", "type": "file", "name": "offline-manager.ts", "filePath": "packages/server/src/local/offline-manager.ts", "summary": "Tracks and broadcasts the server's online/offline state, polling network connectivity and emitting SSE events to connected clients.", "tags": [ "service", "event-handler", "middleware", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/origin-guard.ts", "type": "file", "name": "origin-guard.ts", "filePath": "packages/server/src/local/origin-guard.ts", "summary": "Fastify preHandler that rejects requests from untrusted origins, providing a secondary CORS enforcement layer for sensitive endpoints.", "tags": [ "middleware", "security", "validation" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/persona-tool-filter.ts", "type": "file", "name": "persona-tool-filter.ts", "filePath": "packages/server/src/local/persona-tool-filter.ts", "summary": "Filters the available tool set down to only those permitted for the active agent persona, enforcing allowlists and denylists at the server layer.", "tags": [ "middleware", "utility", "validation", "tested" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/proactive-handlers.ts", "type": "file", "name": "proactive-handlers.ts", "filePath": "packages/server/src/local/proactive-handlers.ts", "summary": "Contains handlers for proactive server-side behaviours such as scheduling suggestions and follow-up prompts that are injected into the chat flow without user initiation.", "tags": [ "service", "event-handler", "middleware", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/agent-groups.ts", "type": "file", "name": "agent-groups.ts", "filePath": "packages/server/src/local/routes/agent-groups.ts", "summary": "Fastify route plugin exposing CRUD endpoints for agent group management, used for organizing agents into logical collections within a workspace.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/agent-run.ts", "type": "file", "name": "agent-run.ts", "filePath": "packages/server/src/local/routes/agent-run.ts", "summary": "Route plugin that handles initiating and streaming agent execution runs, bridging HTTP requests to the agent loop and surfacing status updates via SSE.", "tags": [ "api-handler", "service", "event-handler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/agent-search.ts", "type": "file", "name": "agent-search.ts", "filePath": "packages/server/src/local/routes/agent-search.ts", "summary": "Route plugin providing semantic search over agents, enabling discovery of relevant agents by capability or description using vector search.", "tags": [ "api-handler", "service", "utility", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/agent.ts", "type": "file", "name": "agent.ts", "filePath": "packages/server/src/local/routes/agent.ts", "summary": "Route plugin exposing single-agent read endpoints and model-availability checks for the active agent context.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/agents.ts", "type": "file", "name": "agents.ts", "filePath": "packages/server/src/local/routes/agents.ts", "summary": "Route plugin providing full CRUD REST endpoints for agent definitions, delegating persistence to the agents-store and enforcing input validation.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/anthropic-proxy.ts", "type": "file", "name": "anthropic-proxy.ts", "filePath": "packages/server/src/local/routes/anthropic-proxy.ts", "summary": "Transparent reverse-proxy route that forwards authenticated requests to the Anthropic API, injecting CORS headers and stripping internal credentials.", "tags": [ "api-handler", "middleware", "security" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/approval.ts", "type": "file", "name": "approval.ts", "filePath": "packages/server/src/local/routes/approval.ts", "summary": "Route plugin that handles human-in-the-loop approval requests, allowing users to approve or reject pending agent actions before execution proceeds.", "tags": [ "api-handler", "event-handler", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/artifact-index.ts", "type": "file", "name": "artifact-index.ts", "filePath": "packages/server/src/local/routes/artifact-index.ts", "summary": "SQLite-backed index for workspace artifacts, providing fast lookup by type, workspace, and content hash with creation and deletion helpers.", "tags": [ "service", "data-model", "utility" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/artifacts.ts", "type": "file", "name": "artifacts.ts", "filePath": "packages/server/src/local/routes/artifacts.ts", "summary": "Route plugin exposing artifact CRUD endpoints with workspace-scoped access, federated search, and event emission on create/delete.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/automations.ts", "type": "file", "name": "automations.ts", "filePath": "packages/server/src/local/routes/automations.ts", "summary": "Route plugin for managing user-defined automation rules and scheduled AI tasks, with full CRUD and enable/disable toggle endpoints.", "tags": [ "api-handler", "service", "scheduler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/backup.ts", "type": "file", "name": "backup.ts", "filePath": "packages/server/src/local/routes/backup.ts", "summary": "Route plugin providing streaming workspace backup and restore endpoints, producing and consuming tar archives of the data directory.", "tags": [ "api-handler", "service", "utility", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/browse-helpers.ts", "type": "file", "name": "browse-helpers.ts", "filePath": "packages/server/src/local/routes/browse-helpers.ts", "summary": "Shared utility functions for the browse route: URL sanitization, content-type sniffing, and response body size limiting.", "tags": [ "utility", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/browse.ts", "type": "file", "name": "browse.ts", "filePath": "packages/server/src/local/routes/browse.ts", "summary": "Route plugin that proxies outbound HTTP fetch requests on behalf of the agent, enforcing origin guard and content-type constraints.", "tags": [ "api-handler", "middleware", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/browser-ext.ts", "type": "file", "name": "browser-ext.ts", "filePath": "packages/server/src/local/routes/browser-ext.ts", "summary": "Minimal route plugin for browser extension integration, exposing a lightweight ping/handshake endpoint used by the Waggle browser extension.", "tags": [ "api-handler", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/capabilities.ts", "type": "file", "name": "capabilities.ts", "filePath": "packages/server/src/local/routes/capabilities.ts", "summary": "Route plugin managing installable capability definitions (skills, connectors, MCPs), exposing endpoints for listing, installing, and uninstalling capabilities with trust tracking.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/chat-context.ts", "type": "file", "name": "chat-context.ts", "filePath": "packages/server/src/local/routes/chat-context.ts", "summary": "Route plugin providing workspace chat context endpoints: retrieval of recent messages and workspace state summary consumed by the chat and memory routes.", "tags": [ "api-handler", "service", "data-model", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/chat-governance.ts", "type": "file", "name": "chat-governance.ts", "filePath": "packages/server/src/local/routes/chat-governance.ts", "summary": "Provides role-based governance permission lookup for the chat pipeline, fetching and caching team policy from the team server with TTL.", "tags": [ "api-handler", "middleware", "service", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/chat-governance.ts:getGovernancePermissions", "type": "function", "name": "getGovernancePermissions", "filePath": "packages/server/src/local/routes/chat-governance.ts", "lineRange": [ 26, 61 ], "summary": "Fetches and caches team governance policy from the configured team server, returning per-role permission objects.", "tags": [ "service", "middleware", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/chat-helpers.ts", "type": "file", "name": "chat-helpers.ts", "filePath": "packages/server/src/local/routes/chat-helpers.ts", "summary": "Collection of chat pipeline utility functions for content regulation checks, error retryability detection, ambiguity detection, schedule suggestion heuristics, and human-readable tool-use descriptions.", "tags": [ "utility", "api-handler", "middleware", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/chat-helpers.ts:isRegulatedContent", "type": "function", "name": "isRegulatedContent", "filePath": "packages/server/src/local/routes/chat-helpers.ts", "lineRange": [ 11, 22 ], "summary": "Checks whether message content falls under regulated topics for a given persona, used to gate responses.", "tags": [ "validation", "middleware" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/chat-helpers.ts:isAmbiguousMessage", "type": "function", "name": "isAmbiguousMessage", "filePath": "packages/server/src/local/routes/chat-helpers.ts", "lineRange": [ 56, 80 ], "summary": "Heuristically detects whether a user message is too ambiguous to act on, checking for file paths, URLs, and action verbs.", "tags": [ "utility", "validation" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/chat-helpers.ts:describeToolUse", "type": "function", "name": "describeToolUse", "filePath": "packages/server/src/local/routes/chat-helpers.ts", "lineRange": [ 106, 205 ], "summary": "Converts raw tool-use invocations into human-readable activity summaries for display in the chat UI.", "tags": [ "utility", "serialization" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/chat-persistence.ts", "type": "file", "name": "chat-persistence.ts", "filePath": "packages/server/src/local/routes/chat-persistence.ts", "summary": "Handles JSONL-format message persistence and loading for chat sessions on the local filesystem, providing append-write and read-back helpers.", "tags": [ "utility", "service", "tested" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/chat-persistence.ts:persistMessage", "type": "function", "name": "persistMessage", "filePath": "packages/server/src/local/routes/chat-persistence.ts", "lineRange": [ 15, 35 ], "summary": "Appends a single chat message to the workspace session's JSONL file, creating the directory structure if needed.", "tags": [ "utility", "service" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/chat-persistence.ts:loadSessionMessages", "type": "function", "name": "loadSessionMessages", "filePath": "packages/server/src/local/routes/chat-persistence.ts", "lineRange": [ 41, 66 ], "summary": "Reads and parses a session's JSONL message log from disk, returning an ordered array of persisted messages.", "tags": [ "utility", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/chat.ts", "type": "file", "name": "chat.ts", "filePath": "packages/server/src/local/routes/chat.ts", "summary": "The core chat route module implementing the full agent conversation pipeline including system prompt assembly, injection scanning, LLM streaming, tool execution, memory integration, and SSE event delivery.", "tags": [ "api-handler", "service", "middleware", "tested" ], "complexity": "complex", "languageNotes": "At 1771 lines this is the largest single route file; chatRoutes spans the entire function body and orchestrates context, governance, persona, cost tracking, and stream delivery." }, { "id": "function:packages/server/src/local/routes/chat.ts:chatRoutes", "type": "function", "name": "chatRoutes", "filePath": "packages/server/src/local/routes/chat.ts", "lineRange": [ 56, 1771 ], "summary": "Registers all chat API routes (POST /chat, SSE streams, abort, session management) and wires together the full agent loop pipeline including system prompt assembly, injection scanning, and streaming responses.", "tags": [ "api-handler", "service", "entry-point" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/command.ts", "type": "file", "name": "command.ts", "filePath": "packages/server/src/local/routes/command.ts", "summary": "Implements slash-command routing for workspace intelligence features including skill search, session distillation, and workspace context queries.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/command.ts:commandRoutes", "type": "function", "name": "commandRoutes", "filePath": "packages/server/src/local/routes/command.ts", "lineRange": [ 68, 270 ], "summary": "Registers command routes for skill lookup, session distillation triggering, and federated workspace queries used by the ⌘K command palette.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/commands.ts", "type": "file", "name": "commands.ts", "filePath": "packages/server/src/local/routes/commands.ts", "summary": "Lightweight route module exposing workspace slash-command endpoints for the command palette UI.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/compliance.ts", "type": "file", "name": "compliance.ts", "filePath": "packages/server/src/local/routes/compliance.ts", "summary": "Provides compliance reporting endpoints that expose install audit trails and EU AI Act-aligned capability governance data.", "tags": [ "api-handler", "service", "middleware" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/compliance.ts:complianceRoutes", "type": "function", "name": "complianceRoutes", "filePath": "packages/server/src/local/routes/compliance.ts", "lineRange": [ 75, 312 ], "summary": "Registers compliance API routes for install audit, capability inventory, and PDF override reporting.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/connectors.ts", "type": "file", "name": "connectors.ts", "filePath": "packages/server/src/local/routes/connectors.ts", "summary": "Manages third-party connector CRUD and OAuth flow initiation, enforcing tier-based connector capacity limits across workspaces.", "tags": [ "api-handler", "service", "middleware", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/connectors.ts:connectorRoutes", "type": "function", "name": "connectorRoutes", "filePath": "packages/server/src/local/routes/connectors.ts", "lineRange": [ 47, 326 ], "summary": "Registers connector management routes for listing, adding, updating, and deleting OAuth-backed service connectors with tier-gated capacity enforcement.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/cost.ts", "type": "file", "name": "cost.ts", "filePath": "packages/server/src/local/routes/cost.ts", "summary": "Provides LLM usage cost tracking and reporting endpoints, aggregating per-model spend over configurable time windows with tier-gating on advanced metrics.", "tags": [ "api-handler", "service", "middleware" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/cost.ts:costRoutes", "type": "function", "name": "costRoutes", "filePath": "packages/server/src/local/routes/cost.ts", "lineRange": [ 65, 270 ], "summary": "Registers cost reporting routes covering daily/weekly summaries, model breakdowns, and budget alert thresholds, protected by tier middleware.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/cron.ts", "type": "file", "name": "cron.ts", "filePath": "packages/server/src/local/routes/cron.ts", "summary": "Manages scheduled automation jobs (cron) including creation, listing, deletion, and immediate triggering via SSE notifications.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/cron.ts:cronRoutes", "type": "function", "name": "cronRoutes", "filePath": "packages/server/src/local/routes/cron.ts", "lineRange": [ 56, 216 ], "summary": "Registers cron job CRUD endpoints and immediate run triggers, integrating with the notification SSE stream.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/data-erase.ts", "type": "file", "name": "data-erase.ts", "filePath": "packages/server/src/local/routes/data-erase.ts", "summary": "Provides a confirmed data erasure endpoint that wipes the workspace data directory after validation, snapshot, and audit receipt generation.", "tags": [ "api-handler", "service", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/documents.ts", "type": "file", "name": "documents.ts", "filePath": "packages/server/src/local/routes/documents.ts", "summary": "Manages the workspace document registry (pinned notes and pages) with CRUD endpoints for creating, listing, updating, and deleting documents.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/events.ts", "type": "file", "name": "events.ts", "filePath": "packages/server/src/local/routes/events.ts", "summary": "Core SSE event bus and audit database module that streams real-time server-sent events to connected clients and persists audit events to SQLite.", "tags": [ "api-handler", "service", "event-handler", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/events.ts:emitAuditEvent", "type": "function", "name": "emitAuditEvent", "filePath": "packages/server/src/local/routes/events.ts", "lineRange": [ 99, 171 ], "summary": "Persists an audit event to the workspace SQLite audit database and fans it out to all active SSE subscribers.", "tags": [ "event-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/events.ts:eventRoutes", "type": "function", "name": "eventRoutes", "filePath": "packages/server/src/local/routes/events.ts", "lineRange": [ 195, 351 ], "summary": "Registers the SSE /events endpoint and audit log query routes, managing client connection lifecycle with heartbeats and CORS handling.", "tags": [ "api-handler", "service", "event-handler" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/events.ts:getAuditDb", "type": "function", "name": "getAuditDb", "filePath": "packages/server/src/local/routes/events.ts", "lineRange": [ 61, 95 ], "summary": "Lazily initializes and caches per-workspace SQLite audit databases with schema migration on first access.", "tags": [ "service", "utility" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/evolution.ts", "type": "file", "name": "evolution.ts", "filePath": "packages/server/src/local/routes/evolution.ts", "summary": "Implements the self-improvement evolution pipeline API, exposing routes to trigger evaluation runs, deploy winning prompt schemas, view run history, and configure the evolution LLM.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/evolution.ts:evolutionRoutes", "type": "function", "name": "evolutionRoutes", "filePath": "packages/server/src/local/routes/evolution.ts", "lineRange": [ 86, 526 ], "summary": "Registers evolution API routes for running evaluation cycles, listing run history, deploying winning schemas, and viewing improvement signals.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/export.ts", "type": "file", "name": "export.ts", "filePath": "packages/server/src/local/routes/export.ts", "summary": "Provides data export routes for sessions and workspace content, streaming exports as ZIP archives with sanitized API key masking.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/extend.ts", "type": "file", "name": "extend.ts", "filePath": "packages/server/src/local/routes/extend.ts", "summary": "Manages capability/extension install and audit routes, tracking installed skills and MCP servers with approval status.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/feedback.ts", "type": "file", "name": "feedback.ts", "filePath": "packages/server/src/local/routes/feedback.ts", "summary": "Persists user feedback (thumbs up/down + freetext) on agent responses to SQLite for quality monitoring and evolution signal collection.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/files.ts", "type": "file", "name": "files.ts", "filePath": "packages/server/src/local/routes/files.ts", "summary": "Workspace file management API supporting upload, download, listing, deletion, and MIME-aware serving via configurable storage backends (local FS or S3).", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/fleet.ts", "type": "file", "name": "fleet.ts", "filePath": "packages/server/src/local/routes/fleet.ts", "summary": "Multi-agent fleet coordination routes enabling subagent spawning, status tracking, and WaggleDance signal emission for cross-workspace agent orchestration.", "tags": [ "api-handler", "service", "middleware", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/harvest-classify.ts", "type": "file", "name": "harvest-classify.ts", "filePath": "packages/server/src/local/routes/harvest-classify.ts", "summary": "Helper module mapping harvest import item types to memory kinds and computing confidence scores for harvest pipeline classification.", "tags": [ "utility", "service", "tested" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/harvest.ts", "type": "file", "name": "harvest.ts", "filePath": "packages/server/src/local/routes/harvest.ts", "summary": "Full conversation and document harvest pipeline API handling import from Claude, ChatGPT, Gemini, and URL sources with caching, classification, deduplication, and memory ingestion.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/home.ts", "type": "file", "name": "home.ts", "filePath": "packages/server/src/local/routes/home.ts", "summary": "Home cockpit API aggregating workspace briefings, priority-ranked memory snippets, recent activity, and personalized greetings for the main dashboard view.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/identity.ts", "type": "file", "name": "identity.ts", "filePath": "packages/server/src/local/routes/identity.ts", "summary": "Manages persistent user identity data (name, preferences, profile facts) stored in the workspace mind layer, exposing CRUD endpoints for the IdentityLayer.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/import.ts", "type": "file", "name": "import.ts", "filePath": "packages/server/src/local/routes/import.ts", "summary": "Provides bulk memory import routes for migrating conversation history and structured data from external sources into the workspace mind.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/ingest.ts", "type": "file", "name": "ingest.ts", "filePath": "packages/server/src/local/routes/ingest.ts", "summary": "Handles multi-format content ingestion (text, CSV, Base64 files) into workspace memory with per-file classification, validation, and registry tracking.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/knowledge.ts", "type": "file", "name": "knowledge.ts", "filePath": "packages/server/src/local/routes/knowledge.ts", "summary": "Exposes knowledge graph query and projection endpoints, enabling entity relationship traversal and graph extraction from the workspace mind.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/litellm.ts", "type": "file", "name": "litellm.ts", "filePath": "packages/server/src/local/routes/litellm.ts", "summary": "Provides LiteLLM proxy lifecycle management routes (start, stop, status) and Ollama model listing for the LLM routing layer.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/local-inference.ts", "type": "file", "name": "local-inference.ts", "filePath": "packages/server/src/local/routes/local-inference.ts", "summary": "Routes for local on-device model inference via llmfit, including hardware detection, available model listing, and inference invocation.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/marketplace-dev.ts", "type": "file", "name": "marketplace-dev.ts", "filePath": "packages/server/src/local/routes/marketplace-dev.ts", "summary": "Developer-facing marketplace routes for testing and managing skill and connector catalog entries during local development.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/marketplace.ts", "type": "file", "name": "marketplace.ts", "filePath": "packages/server/src/local/routes/marketplace.ts", "summary": "Full marketplace API managing skill and connector discovery, installation, tier-gating, KVARK integration, and MCP server lifecycle management.", "tags": [ "api-handler", "service", "middleware", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/marketplace.ts:marketplaceRoutes", "type": "function", "name": "marketplaceRoutes", "filePath": "packages/server/src/local/routes/marketplace.ts", "lineRange": [ 35, 889 ], "summary": "Registers marketplace routes for browsing, installing, and managing skills and connectors with tier enforcement and KVARK connectivity.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/mcps.ts", "type": "file", "name": "mcps.ts", "filePath": "packages/server/src/local/routes/mcps.ts", "summary": "MCP (Model Context Protocol) server lifecycle management routes covering registration, connection status, process spawning, and tier-gated capacity enforcement.", "tags": [ "api-handler", "service", "middleware", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/mcps.ts:mcpRoutes", "type": "function", "name": "mcpRoutes", "filePath": "packages/server/src/local/routes/mcps.ts", "lineRange": [ 87, 577 ], "summary": "Registers MCP server CRUD and runtime management routes with tier enforcement and process health monitoring.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/memory-center.ts", "type": "file", "name": "memory-center.ts", "filePath": "packages/server/src/local/routes/memory-center.ts", "summary": "Memory Center API aggregating workspace memory frames for the management UI, with filtering, search, confirm/reject provenance actions, and usage statistics.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/memory-center.ts:memoryCenterRoutes", "type": "function", "name": "memoryCenterRoutes", "filePath": "packages/server/src/local/routes/memory-center.ts", "lineRange": [ 64, 613 ], "summary": "Registers memory center endpoints for listing, searching, confirming, rejecting, and deleting memory frames, plus provenance trace and stats queries.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/memory.ts", "type": "file", "name": "memory.ts", "filePath": "packages/server/src/local/routes/memory.ts", "summary": "Core memory API providing frame recall, storage, deletion, and hybrid search over the workspace HybridSearch/FrameStore substrate via SSE event emission.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/memory.ts:memoryRoutes", "type": "function", "name": "memoryRoutes", "filePath": "packages/server/src/local/routes/memory.ts", "lineRange": [ 68, 679 ], "summary": "Registers memory management routes for storing, recalling, searching, and deleting workspace memory frames, with content sanitization and SSE audit events.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/mind.ts", "type": "file", "name": "mind.ts", "filePath": "packages/server/src/local/routes/mind.ts", "summary": "Minimal route module exposing raw mind substrate access endpoints for diagnostic and low-level memory inspection.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/notifications.ts", "type": "file", "name": "notifications.ts", "filePath": "packages/server/src/local/routes/notifications.ts", "summary": "SSE-based notification system for pushing real-time UI notifications including subagent status updates, workflow suggestions, and task progress events.", "tags": [ "api-handler", "service", "event-handler", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/notifications.ts:emitNotification", "type": "function", "name": "emitNotification", "filePath": "packages/server/src/local/routes/notifications.ts", "lineRange": [ 45, 57 ], "summary": "Broadcasts a notification event to all SSE-connected notification subscribers for a workspace.", "tags": [ "event-handler", "service" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/notifications.ts:notificationRoutes", "type": "function", "name": "notificationRoutes", "filePath": "packages/server/src/local/routes/notifications.ts", "lineRange": [ 87, 211 ], "summary": "Registers the notification SSE endpoint with CORS-aware connection lifecycle management and task/team integration.", "tags": [ "api-handler", "service", "event-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/oauth.ts", "type": "file", "name": "oauth.ts", "filePath": "packages/server/src/local/routes/oauth.ts", "summary": "Implements OAuth 2.0 PKCE authorization code flow for third-party connector integrations, handling state generation, authorization redirects, and token exchange with CSRF-escaped HTML responses.", "tags": [ "api-handler", "middleware", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/oauth.ts:oauthRoutes", "type": "function", "name": "oauthRoutes", "filePath": "packages/server/src/local/routes/oauth.ts", "lineRange": [ 77, 321 ], "summary": "Registers OAuth provider listing, authorization initiation, and callback endpoints on the Fastify server, managing pending state map and vault credential storage.", "tags": [ "api-handler", "middleware" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/offline.ts", "type": "file", "name": "offline.ts", "filePath": "packages/server/src/local/routes/offline.ts", "summary": "Provides offline message queue API routes for buffering messages when the agent is unavailable, supporting enqueue, list, dequeue, and clear operations.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/offline.ts:offlineRoutes", "type": "function", "name": "offlineRoutes", "filePath": "packages/server/src/local/routes/offline.ts", "lineRange": [ 13, 82 ], "summary": "Registers offline queue management routes including status check, message enqueue, list pending, dequeue, and clear-all endpoints.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/onboarding.ts", "type": "file", "name": "onboarding.ts", "filePath": "packages/server/src/local/routes/onboarding.ts", "summary": "Manages onboarding state for new users by reading/writing completion flags on the filesystem and checking memory frames and workspace existence.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/onboarding.ts:onboardingRoutes", "type": "function", "name": "onboardingRoutes", "filePath": "packages/server/src/local/routes/onboarding.ts", "lineRange": [ 32, 82 ], "summary": "Registers GET and POST endpoints for onboarding status checks and completion marking, coordinating with the memory frame store and workspace manager.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/personas.ts", "type": "file", "name": "personas.ts", "filePath": "packages/server/src/local/routes/personas.ts", "summary": "Handles CRUD API routes for agent personas including listing built-in personas, creating/editing/deleting custom personas, and AI-assisted persona generation with tier gating.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/personas.ts:personaRoutes", "type": "function", "name": "personaRoutes", "filePath": "packages/server/src/local/routes/personas.ts", "lineRange": [ 10, 178 ], "summary": "Registers persona management endpoints including GET list, POST create (tier-gated), PATCH update, POST AI-generate, and DELETE, enforcing restrictions on built-in personas.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/pins.ts", "type": "file", "name": "pins.ts", "filePath": "packages/server/src/local/routes/pins.ts", "summary": "Provides CRUD API routes for pinned workspace items, persisting pins as JSON files in the user's home directory per workspace.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/pins.ts:pinRoutes", "type": "function", "name": "pinRoutes", "filePath": "packages/server/src/local/routes/pins.ts", "lineRange": [ 59, 143 ], "summary": "Registers GET list, POST create, PATCH update, and DELETE pin routes for per-workspace pinned items backed by JSON file storage.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/profile.ts", "type": "file", "name": "profile.ts", "filePath": "packages/server/src/local/routes/profile.ts", "summary": "Manages user profile data (name, role, company, bio, writing style) with JSON file persistence, memory frame integration, and AI-assisted profile field generation.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "complex", "languageNotes": "Exports profile load/save helpers used by other routes (e.g. harvest routes) in addition to the route plugin itself." }, { "id": "function:packages/server/src/local/routes/profile.ts:profileRoutes", "type": "function", "name": "profileRoutes", "filePath": "packages/server/src/local/routes/profile.ts", "lineRange": [ 166, 457 ], "summary": "Registers full profile CRUD endpoints plus AI-assisted writing-style analysis, bio generation, and role description inference, writing results to the memory identity layer.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/profile.ts:loadProfile", "type": "function", "name": "loadProfile", "filePath": "packages/server/src/local/routes/profile.ts", "lineRange": [ 149, 158 ], "summary": "Reads user profile JSON from disk, returning an empty default profile object if none exists yet.", "tags": [ "utility", "data-model" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/providers.ts", "type": "file", "name": "providers.ts", "filePath": "packages/server/src/local/routes/providers.ts", "summary": "Exposes LLM and search provider catalog definitions and routes, including dynamic discovery of OpenRouter free models and locally running Ollama models.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/providers.ts:fetchOpenRouterFreeModels", "type": "function", "name": "fetchOpenRouterFreeModels", "filePath": "packages/server/src/local/routes/providers.ts", "lineRange": [ 162, 200 ], "summary": "Fetches and filters free-tier models from the OpenRouter API with timeout, returning normalized model descriptors sorted by context length.", "tags": [ "service", "api-handler" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/providers.ts:fetchOllamaModels", "type": "function", "name": "fetchOllamaModels", "filePath": "packages/server/src/local/routes/providers.ts", "lineRange": [ 203, 235 ], "summary": "Queries the local Ollama instance API and maps running models into the provider model descriptor format.", "tags": [ "service", "api-handler" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/providers.ts:providerRoutes", "type": "function", "name": "providerRoutes", "filePath": "packages/server/src/local/routes/providers.ts", "lineRange": [ 237, 295 ], "summary": "Registers provider catalog listing endpoints including a combined view that merges static catalog entries with dynamically fetched Ollama and OpenRouter models.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/session-utils.ts", "type": "file", "name": "session-utils.ts", "filePath": "packages/server/src/local/routes/session-utils.ts", "summary": "Core session processing library providing LLM-based session summarization, metadata extraction, distillation tracking, progress/outcome extraction, thread classification, search, and timeline parsing used across session-related routes.", "tags": [ "utility", "service", "data-model", "tested" ], "complexity": "complex", "languageNotes": "Over 1000 non-empty lines of session intelligence logic; the most substantial utility module in the routes layer." }, { "id": "function:packages/server/src/local/routes/session-utils.ts:generateSessionSummary", "type": "function", "name": "generateSessionSummary", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 91, 184 ], "summary": "Calls an LLM to generate a structured markdown summary from session message history, returning title, key outcomes, and tags.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:readSessionMeta", "type": "function", "name": "readSessionMeta", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 191, 296 ], "summary": "Reads and parses session metadata including messages, tool calls, and usage stats from the session storage directory.", "tags": [ "utility", "data-model" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:findUndistilledSessions", "type": "function", "name": "findUndistilledSessions", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 305, 377 ], "summary": "Scans session directories to find sessions that have not yet been processed through the memory distillation pipeline.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:extractProgressItems", "type": "function", "name": "extractProgressItems", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 439, 537 ], "summary": "Extracts structured progress items from session messages by parsing tool call results and LLM-detected task completion signals.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:extractSessionOutcome", "type": "function", "name": "extractSessionOutcome", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 564, 654 ], "summary": "Uses an LLM to extract structured outcome data (goals achieved, artifacts created, open questions) from a completed session.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:extractOpenQuestions", "type": "function", "name": "extractOpenQuestions", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 702, 766 ], "summary": "Identifies unresolved questions and action items from session conversations using pattern matching and LLM extraction.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:classifyThreads", "type": "function", "name": "classifyThreads", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 787, 849 ], "summary": "Groups and classifies sessions into topical threads with freshness scores, enabling the thread-based session browsing UI.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:searchSessions", "type": "function", "name": "searchSessions", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 875, 954 ], "summary": "Full-text searches session content and metadata across workspaces, returning ranked results with context snippets.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:exportSessionToMarkdown", "type": "function", "name": "exportSessionToMarkdown", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 962, 1015 ], "summary": "Converts session message history into a formatted markdown document for export, including tool use summaries and metadata.", "tags": [ "utility", "serialization" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/session-utils.ts:parseSessionTimeline", "type": "function", "name": "parseSessionTimeline", "filePath": "packages/server/src/local/routes/session-utils.ts", "lineRange": [ 1088, 1171 ], "summary": "Parses a session's message stream into a structured timeline of events including tool calls, agent turns, and user messages.", "tags": [ "utility", "data-model" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/sessions.ts", "type": "file", "name": "sessions.ts", "filePath": "packages/server/src/local/routes/sessions.ts", "summary": "Session management API routes providing CRUD, distillation, search, export, timeline, and thread classification endpoints for agent chat sessions, re-exporting session utility types.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/sessions.ts:sessionRoutes", "type": "function", "name": "sessionRoutes", "filePath": "packages/server/src/local/routes/sessions.ts", "lineRange": [ 60, 424 ], "summary": "Registers comprehensive session management endpoints: list, get, update, delete, summarize, distill, search, export, timeline, threads, and state extraction.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/settings.ts", "type": "file", "name": "settings.ts", "filePath": "packages/server/src/local/routes/settings.ts", "summary": "Manages application settings including LLM model selection, API key storage/validation with live probing, autonomy defaults, and multi-provider key management with tier enforcement.", "tags": [ "api-handler", "service", "config" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/settings.ts:settingsRoutes", "type": "function", "name": "settingsRoutes", "filePath": "packages/server/src/local/routes/settings.ts", "lineRange": [ 28, 516 ], "summary": "Registers settings read/write endpoints with key masking, provider key validation via live probes, model selection, and tier-gated features like autonomy overrides.", "tags": [ "api-handler", "config" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/skills-aliases.ts", "type": "file", "name": "skills-aliases.ts", "filePath": "packages/server/src/local/routes/skills-aliases.ts", "summary": "Manages skill alias CRUD routes that allow users to create shorthand command aliases pointing to skills, with path validation.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/skills.ts", "type": "file", "name": "skills.ts", "filePath": "packages/server/src/local/routes/skills.ts", "summary": "Comprehensive skill management routes handling skill discovery, CRUD, usage tracking, governance (autonomy/approval gates), AI-distillation, and marketplace integration across local and global skill directories.", "tags": [ "api-handler", "service", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/skills.ts:skillRoutes", "type": "function", "name": "skillRoutes", "filePath": "packages/server/src/local/routes/skills.ts", "lineRange": [ 42, 934 ], "summary": "Registers all skill-related endpoints including list, get, create, update, delete, distill, import, export, usage stats, and governance approval routes.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/tasks.ts", "type": "file", "name": "tasks.ts", "filePath": "packages/server/src/local/routes/tasks.ts", "summary": "Task board API routes enabling CRUD operations on workspace tasks with JSON file persistence and notification emission on task updates.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/tasks.ts:taskRoutes", "type": "function", "name": "taskRoutes", "filePath": "packages/server/src/local/routes/tasks.ts", "lineRange": [ 54, 204 ], "summary": "Registers task list, create, update, and delete endpoints with notification events emitted on task status changes.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/team.ts", "type": "file", "name": "team.ts", "filePath": "packages/server/src/local/routes/team.ts", "summary": "Team management routes providing team creation, member invitation, role management, sync, and audit event tracking with SQLite persistence and tier enforcement for team features.", "tags": [ "api-handler", "service", "data-model" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/team.ts:teamRoutes", "type": "function", "name": "teamRoutes", "filePath": "packages/server/src/local/routes/team.ts", "lineRange": [ 103, 787 ], "summary": "Registers team CRUD, member management, invitation, role assignment, team sync, and leave/dissolve endpoints with audit event emission and tier gating.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/team.ts:getTeamsDb", "type": "function", "name": "getTeamsDb", "filePath": "packages/server/src/local/routes/team.ts", "lineRange": [ 43, 76 ], "summary": "Initializes or returns the cached SQLite teams database handle, creating schema tables (teams, members, invitations) on first run.", "tags": [ "service", "data-model" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/telegram.ts", "type": "file", "name": "telegram.ts", "filePath": "packages/server/src/local/routes/telegram.ts", "summary": "Telegram bot integration routes for storing bot credentials in vault and sending push notifications to configured chat IDs.", "tags": [ "api-handler", "service", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/telegram.ts:telegramRoutes", "type": "function", "name": "telegramRoutes", "filePath": "packages/server/src/local/routes/telegram.ts", "lineRange": [ 107, 192 ], "summary": "Registers Telegram credential management and message-sending endpoints with vault integration for secure token storage.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/telegram.ts:pushTelegramMessage", "type": "function", "name": "pushTelegramMessage", "filePath": "packages/server/src/local/routes/telegram.ts", "lineRange": [ 90, 105 ], "summary": "Exported helper that sends a notification message to the configured Telegram chat using stored vault credentials.", "tags": [ "utility", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/telemetry.ts", "type": "file", "name": "telemetry.ts", "filePath": "packages/server/src/local/routes/telemetry.ts", "summary": "Provides a telemetry ingestion endpoint for receiving and forwarding client-side usage events to the telemetry pipeline.", "tags": [ "api-handler", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/tools.ts", "type": "file", "name": "tools.ts", "filePath": "packages/server/src/local/routes/tools.ts", "summary": "AI tool detection and launcher routes for discovering installed AI tools (Claude, Cursor, Windsurf, etc.) and launching them with workspace context injection.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/validate.ts", "type": "file", "name": "validate.ts", "filePath": "packages/server/src/local/routes/validate.ts", "summary": "Shared path safety validation helpers and string clamping utilities used across route handlers to prevent path traversal and enforce input size limits.", "tags": [ "utility", "validation", "middleware", "tested" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/vault.ts", "type": "file", "name": "vault.ts", "filePath": "packages/server/src/local/routes/vault.ts", "summary": "Secure vault API routes for storing and retrieving encrypted secrets (API keys, tokens) with origin validation restricting access to local requests only.", "tags": [ "api-handler", "service", "security", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/vault.ts:vaultRoutes", "type": "function", "name": "vaultRoutes", "filePath": "packages/server/src/local/routes/vault.ts", "lineRange": [ 103, 188 ], "summary": "Registers vault secret list, get, set, and delete endpoints restricted to local-origin requests only via origin guard middleware.", "tags": [ "api-handler", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/waggle-dance.ts", "type": "file", "name": "waggle-dance.ts", "filePath": "packages/server/src/local/routes/waggle-dance.ts", "summary": "WaggleDance multi-agent coordination routes for receiving discovery signals from external AI tools and querying the signal history.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/waggle-dance.ts:waggleDanceRoutesImpl", "type": "function", "name": "waggleDanceRoutesImpl", "filePath": "packages/server/src/local/routes/waggle-dance.ts", "lineRange": [ 88, 202 ], "summary": "Registers WaggleDance signal ingestion and query endpoints, routing incoming signals through the SignalBus and forwarding to the legacy bridge for UI consumption.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/waggle-signals.ts", "type": "file", "name": "waggle-signals.ts", "filePath": "packages/server/src/local/routes/waggle-signals.ts", "summary": "Server-sent events (SSE) broadcast route for waggle signals consumed by the web UI, with CORS validation allowing cross-origin access from known AI tool origins.", "tags": [ "api-handler", "event-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/waggle-signals.ts:emitWaggleSignal", "type": "function", "name": "emitWaggleSignal", "filePath": "packages/server/src/local/routes/waggle-signals.ts", "lineRange": [ 35, 46 ], "summary": "Broadcasts a waggle signal payload to all active SSE subscriber connections.", "tags": [ "utility", "event-handler" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/routes/waggle-signals.ts:waggleSignalRoutes", "type": "function", "name": "waggleSignalRoutes", "filePath": "packages/server/src/local/routes/waggle-signals.ts", "lineRange": [ 48, 123 ], "summary": "Registers the SSE stream endpoint for waggle signals with origin validation, fan-out to connected clients, and graceful connection lifecycle management.", "tags": [ "api-handler", "event-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/weaver.ts", "type": "file", "name": "weaver.ts", "filePath": "packages/server/src/local/routes/weaver.ts", "summary": "Proxy routes for the Weaver AI writing assistant service, forwarding requests to the Weaver package's internal endpoints for document generation and refinement.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/weaver.ts:weaverRoutes", "type": "function", "name": "weaverRoutes", "filePath": "packages/server/src/local/routes/weaver.ts", "lineRange": [ 13, 130 ], "summary": "Registers Weaver document generation and refinement endpoints, proxying requests to the Weaver service with authentication forwarding.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/wiki.ts", "type": "file", "name": "wiki.ts", "filePath": "packages/server/src/local/routes/wiki.ts", "summary": "Wiki compilation and retrieval routes enabling personal knowledge wiki generation from memory frames, with page browsing and search endpoints.", "tags": [ "api-handler", "service" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/wiki.ts:wikiRoutes", "type": "function", "name": "wikiRoutes", "filePath": "packages/server/src/local/routes/wiki.ts", "lineRange": [ 14, 201 ], "summary": "Registers wiki compile, list pages, get page, and search endpoints backed by the wiki-compiler package and memory frame store.", "tags": [ "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/routes/workflows.ts", "type": "file", "name": "workflows.ts", "filePath": "packages/server/src/local/routes/workflows.ts", "summary": "Custom workflow definition routes enabling users to save and retrieve multi-step agent workflow templates.", "tags": [ "api-handler", "service", "tested" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/workspace-context.ts", "type": "file", "name": "workspace-context.ts", "filePath": "packages/server/src/local/routes/workspace-context.ts", "summary": "Builds and formats workspace context blocks injected into agent system prompts, assembling memory frames, pending tasks, session state, and time-aware greetings into structured context.", "tags": [ "api-handler", "service", "utility", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/workspace-context.ts:buildWorkspaceNowBlock", "type": "function", "name": "buildWorkspaceNowBlock", "filePath": "packages/server/src/local/routes/workspace-context.ts", "lineRange": [ 223, 436 ], "summary": "Assembles the full workspace context block by aggregating memory frames, active sessions, tasks, schedules, and knowledge graph entries into a structured context object.", "tags": [ "utility", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/workspace-context.ts:formatWorkspaceNowPrompt", "type": "function", "name": "formatWorkspaceNowPrompt", "filePath": "packages/server/src/local/routes/workspace-context.ts", "lineRange": [ 440, 490 ], "summary": "Renders the workspace context block into a formatted text prompt string suitable for injection into the agent system prompt.", "tags": [ "utility", "serialization" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/routes/workspace-context.ts:buildTimeAwareGreeting", "type": "function", "name": "buildTimeAwareGreeting", "filePath": "packages/server/src/local/routes/workspace-context.ts", "lineRange": [ 146, 179 ], "summary": "Generates a time-of-day-aware greeting string incorporating the user's name and current local time for injection into the agent context.", "tags": [ "utility" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/routes/workspace-templates.ts", "type": "file", "name": "workspace-templates.ts", "filePath": "packages/server/src/local/routes/workspace-templates.ts", "summary": "Workspace template management routes providing built-in templates and user-defined custom templates for pre-populating new workspaces with settings and context.", "tags": [ "api-handler", "service" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/workspace-templates.ts:workspaceTemplateRoutes", "type": "function", "name": "workspaceTemplateRoutes", "filePath": "packages/server/src/local/routes/workspace-templates.ts", "lineRange": [ 286, 471 ], "summary": "Registers template list, get, create-custom, update-custom, and delete-custom endpoints combining built-in and user-defined workspace templates.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/routes/workspaces.ts", "type": "file", "name": "workspaces.ts", "filePath": "packages/server/src/local/routes/workspaces.ts", "summary": "Core workspace lifecycle management routes providing CRUD, rename, archive, restore, export, state management, activity tracking, and memory association operations for the workspace entity.", "tags": [ "api-handler", "service", "data-model", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/workspaces.ts:workspaceRoutes", "type": "function", "name": "workspaceRoutes", "filePath": "packages/server/src/local/routes/workspaces.ts", "lineRange": [ 150, 1136 ], "summary": "Registers all workspace management endpoints including list, create, get, update, rename, archive, restore, export, delete, state read/write, activity log, and memory context endpoints.", "tags": [ "api-handler" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/routes/workspaces.ts:composeWorkspaceSummary", "type": "function", "name": "composeWorkspaceSummary", "filePath": "packages/server/src/local/routes/workspaces.ts", "lineRange": [ 31, 75 ], "summary": "Builds a structured workspace summary DTO combining workspace config, recent session metadata, memory stats, and active agent state.", "tags": [ "utility", "data-model" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/security-middleware.ts", "type": "file", "name": "security-middleware.ts", "filePath": "packages/server/src/local/security-middleware.ts", "summary": "Implements per-endpoint rate limiting and session timeout tracking for the Fastify sidecar, with configurable limits and automatic cleanup, exported as a Fastify plugin.", "tags": [ "middleware", "security", "service", "tested" ], "complexity": "complex" }, { "id": "class:packages/server/src/local/security-middleware.ts:RateLimiter", "type": "class", "name": "RateLimiter", "filePath": "packages/server/src/local/security-middleware.ts", "lineRange": [ 66, 163 ], "summary": "Sliding-window rate limiter that tracks request counts per IP/token per endpoint with configurable per-route limits and automatic stale-entry cleanup.", "tags": [ "security", "middleware", "service" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/security-middleware.ts:SessionTimeoutTracker", "type": "class", "name": "SessionTimeoutTracker", "filePath": "packages/server/src/local/security-middleware.ts", "lineRange": [ 173, 233 ], "summary": "Tracks last-activity timestamps for active sessions and enforces configurable inactivity timeout, cleaning up stale session records automatically.", "tags": [ "security", "middleware" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/service.ts", "type": "file", "name": "service.ts", "filePath": "packages/server/src/local/service.ts", "summary": "Main service bootstrap module that resolves data directories, checks first-run state, validates port availability, and orchestrates startup of the Fastify server with all route registrations and lifecycle management.", "tags": [ "entry-point", "service", "middleware", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/service.ts:startService", "type": "function", "name": "startService", "filePath": "packages/server/src/local/service.ts", "lineRange": [ 121, 295 ], "summary": "Bootstraps the entire Fastify sidecar service: initializes middleware, registers all route plugins, starts the server, and sets up signal handlers for graceful shutdown.", "tags": [ "entry-point", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/services/evolution-service.ts", "type": "file", "name": "evolution-service.ts", "filePath": "packages/server/src/local/services/evolution-service.ts", "summary": "Background evolution service that periodically evaluates agent performance candidates and triggers prompt optimization cycles to continuously improve skill and persona quality.", "tags": [ "service", "singleton", "tested" ], "complexity": "complex" }, { "id": "class:packages/server/src/local/services/evolution-service.ts:EvolutionService", "type": "class", "name": "EvolutionService", "filePath": "packages/server/src/local/services/evolution-service.ts", "lineRange": [ 112, 349 ], "summary": "Orchestrates periodic evolution ticks that enumerate skill/persona candidates, select next targets, run baseline evaluation, and trigger the iterative optimizer.", "tags": [ "service", "singleton" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/services/optimizer-service.ts", "type": "file", "name": "optimizer-service.ts", "filePath": "packages/server/src/local/services/optimizer-service.ts", "summary": "Provides a singleton optimizer service factory that wraps the agent's iterative optimizer with a chat-route-aware callback for triggering prompt optimization from the API layer.", "tags": [ "service", "singleton", "factory" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/setup-connectors.ts", "type": "file", "name": "setup-connectors.ts", "filePath": "packages/server/src/local/setup-connectors.ts", "summary": "Registers all external service connector plugins (e.g., GitHub, Notion, Slack) into the Fastify server during startup.", "tags": [ "service", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/setup-crons.ts", "type": "file", "name": "setup-crons.ts", "filePath": "packages/server/src/local/setup-crons.ts", "summary": "Seeds default scheduled cron jobs (e.g., memory distillation, harvest sync) into the cron store on first run.", "tags": [ "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/signal-bus.ts", "type": "file", "name": "signal-bus.ts", "filePath": "packages/server/src/local/signal-bus.ts", "summary": "Ring-buffer signal bus for in-process WaggleDance event broadcasting, supporting subscriber fan-out and bounded memory usage via configurable buffer capacity.", "tags": [ "service", "event-handler", "singleton", "tested" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/signal-bus.ts:SignalBus", "type": "class", "name": "SignalBus", "filePath": "packages/server/src/local/signal-bus.ts", "lineRange": [ 43, 131 ], "summary": "Ring-buffer event bus with subscriber callbacks, a fixed-capacity circular buffer of recorded signals, and point-in-time query support for replaying recent history.", "tags": [ "service", "event-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/start.ts", "type": "file", "name": "start.ts", "filePath": "packages/server/src/local/start.ts", "summary": "Binary entry point that imports and invokes the service startup function, serving as the Node.js process bootstrap for the Fastify sidecar.", "tags": [ "entry-point" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/storage/fs-provider.ts", "type": "file", "name": "fs-provider.ts", "filePath": "packages/server/src/local/storage/fs-provider.ts", "summary": "Implements the filesystem-backed StorageProvider for workspace file operations, supporting list, read, write, delete, move, copy, mkdir, and exists with path-traversal-safe access.", "tags": [ "service", "storage", "filesystem" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/storage/fs-provider.ts:FsStorageProvider", "type": "class", "name": "FsStorageProvider", "filePath": "packages/server/src/local/storage/fs-provider.ts", "lineRange": [ 13, 165 ], "summary": "Concrete filesystem storage provider implementing the full CRUD interface for workspace files, using safePath to prevent directory traversal attacks.", "tags": [ "storage", "filesystem", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/storage/index.ts", "type": "file", "name": "index.ts", "filePath": "packages/server/src/local/storage/index.ts", "summary": "Barrel and factory module for the storage subsystem, re-exporting types/classes and providing getStorageProvider() which selects filesystem or S3 implementation based on workspace config.", "tags": [ "barrel", "factory", "storage" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/storage/index.ts:getStorageProvider", "type": "function", "name": "getStorageProvider", "filePath": "packages/server/src/local/storage/index.ts", "lineRange": [ 27, 73 ], "summary": "Factory function that returns the appropriate StorageProvider (FsStorageProvider or S3StorageProvider) based on workspace configuration and data directory.", "tags": [ "factory", "storage", "configuration" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/storage/s3-provider.ts", "type": "file", "name": "s3-provider.ts", "filePath": "packages/server/src/local/storage/s3-provider.ts", "summary": "S3-backed StorageProvider implementation that delegates file operations to an underlying S3 store, enabling cloud file storage for workspaces.", "tags": [ "storage", "s3", "service" ], "complexity": "simple" }, { "id": "class:packages/server/src/local/storage/s3-provider.ts:S3StorageProvider", "type": "class", "name": "S3StorageProvider", "filePath": "packages/server/src/local/storage/s3-provider.ts", "lineRange": [ 19, 70 ], "summary": "StorageProvider implementation backed by an S3-compatible store, wrapping S3 file operations to conform to the project's unified storage interface.", "tags": [ "storage", "s3", "service" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/storage/security.ts", "type": "file", "name": "security.ts", "filePath": "packages/server/src/local/storage/security.ts", "summary": "Provides path-traversal prevention utilities safePath() and toRelativePath() used by all storage providers to ensure user-supplied paths cannot escape the workspace root.", "tags": [ "security", "utility", "validation" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/storage/security.ts:safePath", "type": "function", "name": "safePath", "filePath": "packages/server/src/local/storage/security.ts", "lineRange": [ 8, 29 ], "summary": "Resolves and validates a user-supplied path against the workspace root, throwing if the resolved path escapes the root directory (path traversal prevention).", "tags": [ "security", "validation", "utility" ], "complexity": "simple" }, { "id": "function:packages/server/src/local/storage/security.ts:toRelativePath", "type": "function", "name": "toRelativePath", "filePath": "packages/server/src/local/storage/security.ts", "lineRange": [ 32, 35 ], "summary": "Converts an absolute path back to a root-relative path using forward slashes for consistent cross-platform representation.", "tags": [ "utility", "path", "cross-platform" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/storage/types.ts", "type": "file", "name": "types.ts", "filePath": "packages/server/src/local/storage/types.ts", "summary": "Defines the StorageProvider interface, FileEntry type, STANDARD_DIRS constant for required workspace directory structure, and MAX_UPLOAD_SIZE limit.", "tags": [ "type-definition", "storage", "configuration" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/utils/mime.ts", "type": "file", "name": "mime.ts", "filePath": "packages/server/src/local/utils/mime.ts", "summary": "Provides a lookup() function mapping file extensions to MIME types via a static table, used by storage providers when returning file metadata.", "tags": [ "utility", "mime", "serialization" ], "complexity": "simple" }, { "id": "file:packages/server/src/local/waggle-dance-bridge.ts", "type": "file", "name": "waggle-dance-bridge.ts", "filePath": "packages/server/src/local/waggle-dance-bridge.ts", "summary": "Bridges the WaggleDance v2 signal bus to the legacy UI notification system by subscribing to the SignalBus and forwarding translated signals via emitWaggleSignal.", "tags": [ "event-handler", "service", "middleware", "tested" ], "complexity": "moderate" }, { "id": "function:packages/server/src/local/waggle-dance-bridge.ts:installWaggleDanceBridge", "type": "function", "name": "installWaggleDanceBridge", "filePath": "packages/server/src/local/waggle-dance-bridge.ts", "lineRange": [ 120, 143 ], "summary": "Installs a subscription on the provided SignalBus and translates incoming WaggleDance v2 signals to legacy waggle signal format before emitting to UI subscribers.", "tags": [ "event-handler", "middleware", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/workspace-sessions.ts", "type": "file", "name": "workspace-sessions.ts", "filePath": "packages/server/src/local/workspace-sessions.ts", "summary": "Implements WorkspaceSessionManager, a lifecycle manager for per-workspace AI agent sessions including creation, pause, resume, idle eviction, and token tracking.", "tags": [ "service", "session-management", "singleton", "tested" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/workspace-sessions.ts:WorkspaceSessionManager", "type": "class", "name": "WorkspaceSessionManager", "filePath": "packages/server/src/local/workspace-sessions.ts", "lineRange": [ 35, 224 ], "summary": "Manages the lifecycle of workspace AI sessions, supporting session creation with mind/orchestrator/tools factories, concurrency limiting, idle eviction, and pause/resume.", "tags": [ "service", "session-management", "lifecycle" ], "complexity": "moderate" }, { "id": "file:packages/server/src/local/workspace-state.ts", "type": "file", "name": "workspace-state.ts", "filePath": "packages/server/src/local/workspace-state.ts", "summary": "Constructs and formats a rich workspace state snapshot (decisions, tasks, blockers, open questions, recent threads, awareness items) for injection into agent system prompts.", "tags": [ "service", "data-model", "serialization", "tested" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/workspace-state.ts:buildWorkspaceState", "type": "function", "name": "buildWorkspaceState", "filePath": "packages/server/src/local/workspace-state.ts", "lineRange": [ 234, 311 ], "summary": "Aggregates workspace state from SQLite memory frames, session progress items, open questions, thread freshness, and awareness layer into a structured state object.", "tags": [ "data-model", "service", "utility" ], "complexity": "complex" }, { "id": "function:packages/server/src/local/workspace-state.ts:formatWorkspaceStatePrompt", "type": "function", "name": "formatWorkspaceStatePrompt", "filePath": "packages/server/src/local/workspace-state.ts", "lineRange": [ 315, 385 ], "summary": "Serializes a WorkspaceState object into a structured plaintext prompt section for agent system prompt injection, covering tasks, decisions, threads, and next actions.", "tags": [ "serialization", "utility", "service" ], "complexity": "complex" }, { "id": "file:packages/server/src/local/ws-team-client.ts", "type": "file", "name": "ws-team-client.ts", "filePath": "packages/server/src/local/ws-team-client.ts", "summary": "WebSocket client for team collaboration features, implementing reconnection logic, event handling, authentication handshake, and message dispatch for the TEAMS tier.", "tags": [ "service", "event-handler", "middleware", "tested" ], "complexity": "moderate" }, { "id": "class:packages/server/src/local/ws-team-client.ts:WsTeamClient", "type": "class", "name": "WsTeamClient", "filePath": "packages/server/src/local/ws-team-client.ts", "lineRange": [ 32, 139 ], "summary": "EventEmitter-based WebSocket client that manages authenticated connections to the team server with exponential-backoff reconnection and send/receive message handling.", "tags": [ "service", "event-handler", "middleware" ], "complexity": "moderate" }, { "id": "file:packages/server/src/middleware/assert-tier.ts", "type": "file", "name": "assert-tier.ts", "filePath": "packages/server/src/middleware/assert-tier.ts", "summary": "Fastify middleware providing tier enforcement for protected routes, reading the current tier from the data directory and returning 403 when tier requirements are not met.", "tags": [ "middleware", "security", "validation", "tested" ], "complexity": "simple" }, { "id": "function:packages/server/src/middleware/assert-tier.ts:requireTier", "type": "function", "name": "requireTier", "filePath": "packages/server/src/middleware/assert-tier.ts", "lineRange": [ 45, 63 ], "summary": "Returns a Fastify preHandler that checks the current tier against the minimum required tier, sending 403 if the check fails.", "tags": [ "middleware", "security", "validation" ], "complexity": "simple" }, { "id": "file:packages/server/tests/backup-restore.test.ts", "type": "file", "name": "backup-restore.test.ts", "filePath": "packages/server/tests/backup-restore.test.ts", "summary": "Integration tests for the backup and restore API endpoints, verifying round-trip consistency of workspace data across backup creation and restoration.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/backup-streaming.test.ts", "type": "file", "name": "backup-streaming.test.ts", "filePath": "packages/server/tests/backup-streaming.test.ts", "summary": "Tests for backup streaming behavior, validating chunked/streamed backup delivery and file enumeration correctness through the backup route.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/behavioral-spec-active.test.ts", "type": "file", "name": "behavioral-spec-active.test.ts", "filePath": "packages/server/tests/behavioral-spec-active.test.ts", "summary": "Tests verifying that the agent behavioral specification contract is active and enforced at the API layer, guarding against regression of agent rule enforcement.", "tags": [ "test", "integration", "api-handler" ], "complexity": "simple" }, { "id": "file:packages/server/tests/browse-helpers.test.ts", "type": "file", "name": "browse-helpers.test.ts", "filePath": "packages/server/tests/browse-helpers.test.ts", "summary": "Unit tests for file browser helper functions including Windows drive listing and drive detection logic.", "tags": [ "test", "utility", "cross-platform" ], "complexity": "simple" }, { "id": "file:packages/server/tests/chat-api.test.ts", "type": "file", "name": "chat-api.test.ts", "filePath": "packages/server/tests/chat-api.test.ts", "summary": "Comprehensive integration tests for the chat API, covering SSE streaming, context windowing, authentication, and message handling across workspace sessions.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/cockpit-health.test.ts", "type": "file", "name": "cockpit-health.test.ts", "filePath": "packages/server/tests/cockpit-health.test.ts", "summary": "Integration tests for the cockpit health and briefing endpoints, verifying the home briefing data structure and response correctness.", "tags": [ "test", "integration", "api-handler" ], "complexity": "simple" }, { "id": "file:packages/server/tests/cross-platform.test.ts", "type": "file", "name": "cross-platform.test.ts", "filePath": "packages/server/tests/cross-platform.test.ts", "summary": "Tests cross-platform compatibility of path handling, file operations, and server behavior across Windows and Unix environments.", "tags": [ "test", "integration", "cross-platform" ], "complexity": "complex" }, { "id": "file:packages/server/tests/d11-datadir-tier.test.ts", "type": "file", "name": "d11-datadir-tier.test.ts", "filePath": "packages/server/tests/d11-datadir-tier.test.ts", "summary": "Tests the D11 requirement that tier information is correctly persisted in and read from the data directory config file, and enforced by the assert-tier middleware.", "tags": [ "test", "integration", "middleware" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/data-erase-helpers.test.ts", "type": "file", "name": "data-erase-helpers.test.ts", "filePath": "packages/server/tests/data-erase-helpers.test.ts", "summary": "Unit tests for data erasure helper functions, covering confirmation phrase validation, directory snapshotting, safety assertion before wipe, and marker file writing/reading.", "tags": [ "test", "utility", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/data-erase.test.ts", "type": "file", "name": "data-erase.test.ts", "filePath": "packages/server/tests/data-erase.test.ts", "summary": "Integration tests for the data erase endpoint, validating the full erasure flow including confirmation headers, marker file creation, and actual directory wipe via the API.", "tags": [ "test", "integration", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/data-export.test.ts", "type": "file", "name": "data-export.test.ts", "filePath": "packages/server/tests/data-export.test.ts", "summary": "Integration tests for the data export endpoint, verifying ZIP archive generation, file name listing, and content extraction from the exported archive.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/evolution-routes.test.ts", "type": "file", "name": "evolution-routes.test.ts", "filePath": "packages/server/tests/evolution-routes.test.ts", "summary": "Integration tests for evolution management routes, covering CRUD operations on evolution runs and querying run history through the server API.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/evolution-run-route.test.ts", "type": "file", "name": "evolution-run-route.test.ts", "filePath": "packages/server/tests/evolution-run-route.test.ts", "summary": "End-to-end tests for the evolution run execution route, using stub LLM factories to simulate improvement iterations and SSE event streaming during evolution runs.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/first-run.test.ts", "type": "file", "name": "first-run.test.ts", "filePath": "packages/server/tests/first-run.test.ts", "summary": "Tests for first-run detection and initialization flow, verifying that the service correctly identifies a clean data directory and performs required setup steps.", "tags": [ "test", "integration", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/ingest-api.test.ts", "type": "file", "name": "ingest-api.test.ts", "filePath": "packages/server/tests/ingest-api.test.ts", "summary": "Integration tests for the memory ingestion API, verifying upload of various content types (URLs, text, files) and confirmation of their storage in the workspace memory.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/litellm-api.test.ts", "type": "file", "name": "litellm-api.test.ts", "filePath": "packages/server/tests/litellm-api.test.ts", "summary": "Integration tests for the LiteLLM proxy API routes, testing model listing, key configuration, status checks, and lifecycle management of the LiteLLM sidecar.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/llm-key-probe.test.ts", "type": "file", "name": "llm-key-probe.test.ts", "filePath": "packages/server/tests/llm-key-probe.test.ts", "summary": "Unit tests for the LLM API key validation and probing logic, using fake fetch implementations to test key format validation and provider-specific probe behavior.", "tags": [ "test", "utility", "validation" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local-mode.test.ts", "type": "file", "name": "local-mode.test.ts", "filePath": "packages/server/tests/local-mode.test.ts", "summary": "Integration tests for local (non-cloud) server mode, covering workspace creation, agent interaction, memory operations, and session management in the local deployment context.", "tags": [ "test", "integration", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local-scheduler.test.ts", "type": "file", "name": "local-scheduler.test.ts", "filePath": "packages/server/tests/local-scheduler.test.ts", "summary": "Unit tests for the LocalScheduler cron system, verifying job scheduling, consecutive-failure tracking, execution callbacks, and pause/resume behavior.", "tags": [ "test", "service", "utility" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/agents.test.ts", "type": "file", "name": "agents.test.ts", "filePath": "packages/server/tests/local/agents.test.ts", "summary": "Integration tests for the agent entity management routes and the agent run route, including creation, update, deletion, and run invocation with spawn tracking.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/ambiguity-detection.test.ts", "type": "file", "name": "ambiguity-detection.test.ts", "filePath": "packages/server/tests/local/ambiguity-detection.test.ts", "summary": "Unit tests for the message ambiguity detection logic in the chat route, verifying correct identification of ambiguous user messages that should prompt clarification.", "tags": [ "test", "utility", "validation" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/anthropic-proxy.test.ts", "type": "file", "name": "anthropic-proxy.test.ts", "filePath": "packages/server/tests/local/anthropic-proxy.test.ts", "summary": "Integration tests for the Anthropic API proxy route, verifying request forwarding, authentication header injection, and response pass-through behavior.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/artifacts.test.ts", "type": "file", "name": "artifacts.test.ts", "filePath": "packages/server/tests/local/artifacts.test.ts", "summary": "Integration tests for artifact management routes, verifying creation, retrieval, update, deletion, and search-related operations on agent-produced artifacts.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/automations.test.ts", "type": "file", "name": "automations.test.ts", "filePath": "packages/server/tests/local/automations.test.ts", "summary": "Integration tests for the automations and cron scheduling routes, verifying automation CRUD, trigger execution, notification emission, and cron job management.", "tags": [ "test", "integration", "api-handler" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/chat-governance.test.ts", "type": "file", "name": "chat-governance.test.ts", "filePath": "packages/server/tests/local/chat-governance.test.ts", "summary": "Unit tests for the chat governance route, verifying that permission checks (getGovernancePermissions) correctly gate regulated content and enforce tier-based access controls.", "tags": [ "test", "api-handler", "security", "chat" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/chat-helpers.test.ts", "type": "file", "name": "chat-helpers.test.ts", "filePath": "packages/server/tests/local/chat-helpers.test.ts", "summary": "Comprehensive tests for chat helper utilities including context window management, schedule suggestion detection, ambiguity prompting, and tool-use description formatting.", "tags": [ "test", "utility", "chat", "context-management" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/chat-persistence.test.ts", "type": "file", "name": "chat-persistence.test.ts", "filePath": "packages/server/tests/local/chat-persistence.test.ts", "summary": "Tests for chat message persistence (persistMessage and loadSessionMessages), verifying SQLite-backed session storage correctness and message ordering.", "tags": [ "test", "persistence", "chat", "database" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/compliance-templates.test.ts", "type": "file", "name": "compliance-templates.test.ts", "filePath": "packages/server/tests/local/compliance-templates.test.ts", "summary": "Integration tests for compliance template routes via the full local server, verifying template retrieval and rendering against the compliance reporting module.", "tags": [ "test", "api-handler", "compliance", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/connectors-phase4.test.ts", "type": "file", "name": "connectors-phase4.test.ts", "filePath": "packages/server/tests/local/connectors-phase4.test.ts", "summary": "Phase-4 connector route tests that verify tier-based connector capacity enforcement (connectorCapExceeded) and CRUD operations on connector registrations.", "tags": [ "test", "api-handler", "connectors", "tier-enforcement" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/cost.test.ts", "type": "file", "name": "cost.test.ts", "filePath": "packages/server/tests/local/cost.test.ts", "summary": "Integration tests for cost-tracking API routes, verifying that LLM usage cost records are properly persisted and retrieved from the local server.", "tags": [ "test", "api-handler", "cost-tracking", "integration" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/cron-error-handling.test.ts", "type": "file", "name": "cron-error-handling.test.ts", "filePath": "packages/server/tests/local/cron-error-handling.test.ts", "summary": "Tests for the LocalScheduler cron execution engine, specifically verifying consecutive failure capping (MAX_CONSECUTIVE_FAILURES) and error recovery behavior.", "tags": [ "test", "service", "cron", "error-handling" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/custom-workflows.test.ts", "type": "file", "name": "custom-workflows.test.ts", "filePath": "packages/server/tests/local/custom-workflows.test.ts", "summary": "Tests for custom workflow route handlers, verifying creation, listing, and execution of user-defined agent workflows stored in the local server.", "tags": [ "test", "api-handler", "workflows", "agent" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/extend.test.ts", "type": "file", "name": "extend.test.ts", "filePath": "packages/server/tests/local/extend.test.ts", "summary": "Tests for the Extend and Marketplace route handlers, verifying skill/connector install audit tracking and tier-gated extension management.", "tags": [ "test", "api-handler", "marketplace", "tier-enforcement" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/feedback-routes.test.ts", "type": "file", "name": "feedback-routes.test.ts", "filePath": "packages/server/tests/local/feedback-routes.test.ts", "summary": "Tests for the feedback route handler, verifying user feedback submission storage and retrieval with proper validation.", "tags": [ "test", "api-handler", "feedback" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/files-indexer.test.ts", "type": "file", "name": "files-indexer.test.ts", "filePath": "packages/server/tests/local/files-indexer.test.ts", "summary": "Integration tests for the file indexer functionality, verifying that uploaded files are correctly indexed into the FrameStore for memory search.", "tags": [ "test", "integration", "file-storage", "memory" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/files.test.ts", "type": "file", "name": "files.test.ts", "filePath": "packages/server/tests/local/files.test.ts", "summary": "Comprehensive integration tests for the file storage routes covering upload, download, listing, deletion, and directory constraints enforced by STANDARD_DIRS and MAX_UPLOAD_SIZE.", "tags": [ "test", "api-handler", "file-storage", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/fleet.test.ts", "type": "file", "name": "fleet.test.ts", "filePath": "packages/server/tests/local/fleet.test.ts", "summary": "Tests for the fleet route handler, verifying multi-workspace session management via WorkspaceSessionManager and fleet status endpoints.", "tags": [ "test", "api-handler", "workspace", "session-management" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/harvest-cache.test.ts", "type": "file", "name": "harvest-cache.test.ts", "filePath": "packages/server/tests/local/harvest-cache.test.ts", "summary": "Unit tests for harvest cache utilities (writeHarvestCache, readHarvestCache) verifying cache hit/miss behavior and cache invalidation.", "tags": [ "test", "utility", "harvest", "cache" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/harvest-classify.test.ts", "type": "file", "name": "harvest-classify.test.ts", "filePath": "packages/server/tests/local/harvest-classify.test.ts", "summary": "Tests for harvest classification logic (importItemTypeToMemoryKind, harvestConfidence), verifying correct mapping of import item types to memory frame kinds.", "tags": [ "test", "utility", "harvest", "classification" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/harvest-identity-defenses.test.ts", "type": "file", "name": "harvest-identity-defenses.test.ts", "filePath": "packages/server/tests/local/harvest-identity-defenses.test.ts", "summary": "Security-focused tests for the harvest route, verifying input sanitization defenses including XML injection (escapeXml) and malformed suggestion shape rejection.", "tags": [ "test", "security", "harvest", "validation" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/harvest-identity.test.ts", "type": "file", "name": "harvest-identity.test.ts", "filePath": "packages/server/tests/local/harvest-identity.test.ts", "summary": "Integration tests for harvest identity extraction, verifying that personal facts from ingested content are correctly stored in the identity layer.", "tags": [ "test", "integration", "harvest", "identity" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/harvest-runs.test.ts", "type": "file", "name": "harvest-runs.test.ts", "filePath": "packages/server/tests/local/harvest-runs.test.ts", "summary": "Integration tests for the harvest pipeline run tracking, verifying that ingestion job records are created, updated, and queryable via the server API.", "tags": [ "test", "integration", "harvest", "pipeline" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/home.test.ts", "type": "file", "name": "home.test.ts", "filePath": "packages/server/tests/local/home.test.ts", "summary": "Tests for home dashboard routes including priority-ranked workspace card display (applyPriorityRanking), personalized greeting generation, and memory-center integration.", "tags": [ "test", "api-handler", "home-dashboard", "workspace" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/identity.test.ts", "type": "file", "name": "identity.test.ts", "filePath": "packages/server/tests/local/identity.test.ts", "summary": "Tests for the identity route handler, verifying CRUD operations on personal identity facts stored in the memory substrate.", "tags": [ "test", "api-handler", "identity", "memory" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/import.test.ts", "type": "file", "name": "import.test.ts", "filePath": "packages/server/tests/local/import.test.ts", "summary": "Integration tests for the memory import route, verifying that bulk-imported frames from external conversations are correctly ingested and deduped.", "tags": [ "test", "integration", "import", "memory" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/knowledge-graph-projection.test.ts", "type": "file", "name": "knowledge-graph-projection.test.ts", "filePath": "packages/server/tests/local/knowledge-graph-projection.test.ts", "summary": "Tests for the knowledge graph route handler, verifying entity projection queries and relationship traversal in the KnowledgeGraph substrate.", "tags": [ "test", "api-handler", "knowledge-graph", "memory" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/mcp-config.test.ts", "type": "file", "name": "mcp-config.test.ts", "filePath": "packages/server/tests/local/mcp-config.test.ts", "summary": "Unit tests for MCP configuration management (loadMcpConfig, saveMcpServerEntry, validateMcpEntry, removeMcpServerEntry), verifying JSON file persistence and validation.", "tags": [ "test", "utility", "mcp", "configuration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/mcps.test.ts", "type": "file", "name": "mcps.test.ts", "filePath": "packages/server/tests/local/mcps.test.ts", "summary": "Comprehensive tests for MCP server management routes covering stdio process spawning, install/uninstall from marketplace, injection-defense against malicious MCP names, and runtime config population.", "tags": [ "test", "api-handler", "mcp", "security" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/memory-center.test.ts", "type": "file", "name": "memory-center.test.ts", "filePath": "packages/server/tests/local/memory-center.test.ts", "summary": "Comprehensive tests for the memory center route (memoryCenterRoutes, normalizeToMemory, sanitizeFrameContent), covering creation, listing, updating, deletion, and workspace-scoping of memory frames.", "tags": [ "test", "api-handler", "memory", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/memory-lane-cron.test.ts", "type": "file", "name": "memory-lane-cron.test.ts", "filePath": "packages/server/tests/local/memory-lane-cron.test.ts", "summary": "Tests for the memory lane cron job (runMemoryLaneExtraction), verifying that grouped memory summaries are generated from FrameStore contents via a mocked LLM.", "tags": [ "test", "service", "memory", "cron" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/memory-stats-isolation.test.ts", "type": "file", "name": "memory-stats-isolation.test.ts", "filePath": "packages/server/tests/local/memory-stats-isolation.test.ts", "summary": "Tests verifying that memory statistics endpoints only return counts scoped to the requesting workspace, enforcing the mind-isolation contract across multiple seeded workspaces.", "tags": [ "test", "api-handler", "memory", "isolation" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/monthly-assessment.test.ts", "type": "file", "name": "monthly-assessment.test.ts", "filePath": "packages/server/tests/local/monthly-assessment.test.ts", "summary": "Tests for monthly assessment generation (generateMonthlyAssessment, saveAssessmentToMind), verifying LLM-backed personal reflections are persisted correctly.", "tags": [ "test", "service", "memory", "assessment" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/network-auth.test.ts", "type": "file", "name": "network-auth.test.ts", "filePath": "packages/server/tests/local/network-auth.test.ts", "summary": "Security tests for network-level authentication including CORS origin validation, host-header allow-listing, loopback bind detection, rate limiting, and local-origin guards.", "tags": [ "test", "security", "middleware", "cors" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/oauth-callback-escaping.test.ts", "type": "file", "name": "oauth-callback-escaping.test.ts", "filePath": "packages/server/tests/local/oauth-callback-escaping.test.ts", "summary": "Security tests for the OAuth callback route, verifying that redirect URLs are properly escaped to prevent open-redirect and injection attacks.", "tags": [ "test", "security", "oauth", "validation" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/onboarding-status.test.ts", "type": "file", "name": "onboarding-status.test.ts", "filePath": "packages/server/tests/local/onboarding-status.test.ts", "summary": "Tests for the onboarding route handler, verifying step completion tracking and the status endpoint that drives the frontend onboarding wizard.", "tags": [ "test", "api-handler", "onboarding" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/p5-skill-governance.test.ts", "type": "file", "name": "p5-skill-governance.test.ts", "filePath": "packages/server/tests/local/p5-skill-governance.test.ts", "summary": "Phase-5 tests for skill governance routes, verifying that skill installation, approval workflows, and provenance tracking (agent·review badge) are enforced correctly.", "tags": [ "test", "api-handler", "skills", "governance" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/personas-routes.test.ts", "type": "file", "name": "personas-routes.test.ts", "filePath": "packages/server/tests/local/personas-routes.test.ts", "summary": "Tests for the personas route handler, verifying CRUD operations for custom agent persona definitions stored on the local server.", "tags": [ "test", "api-handler", "personas", "agent" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/phase2-traversal-backup.test.ts", "type": "file", "name": "phase2-traversal-backup.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-backup.test.ts", "summary": "Security-focused tests for the backup route (backupRoutes), verifying path-traversal defenses by constructing crafted backup archives with relative path components.", "tags": [ "test", "security", "backup", "path-traversal" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase2-traversal-chat.test.ts", "type": "file", "name": "phase2-traversal-chat.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-chat.test.ts", "summary": "Security-focused integration tests for the chat persistence route, verifying path-traversal and injection defenses in session message storage and loading.", "tags": [ "test", "security", "chat", "path-traversal" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase2-traversal-documents.test.ts", "type": "file", "name": "phase2-traversal-documents.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-documents.test.ts", "summary": "Integration tests for the document routes, verifying path-traversal prevention and CRUD operations on workspace documents via a minimal Fastify test server.", "tags": [ "test", "api-handler", "security", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase2-traversal-ingest.test.ts", "type": "file", "name": "phase2-traversal-ingest.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-ingest.test.ts", "summary": "Integration tests for the ingest route, covering path-traversal attack prevention and file registry updates when harvesting documents into the memory substrate.", "tags": [ "test", "security", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase2-traversal-tasks.test.ts", "type": "file", "name": "phase2-traversal-tasks.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-tasks.test.ts", "summary": "Integration tests for the task routes, verifying path-traversal defenses and task CRUD operations against a minimal Fastify server with a decorated data directory.", "tags": [ "test", "security", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase2-traversal-workspace-context.test.ts", "type": "file", "name": "phase2-traversal-workspace-context.test.ts", "filePath": "packages/server/tests/local/phase2-traversal-workspace-context.test.ts", "summary": "Unit tests for workspace-context utilities such as greeting builders and schedule formatters, ensuring correct output shapes and edge-case handling.", "tags": [ "test", "utility", "integration" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/phase4-harvest-embedder.test.ts", "type": "file", "name": "phase4-harvest-embedder.test.ts", "filePath": "packages/server/tests/local/phase4-harvest-embedder.test.ts", "summary": "Integration tests for the harvest embedding pipeline, verifying that committing harvested content through the server routes persists vector rows in the SQLite memory database.", "tags": [ "test", "integration", "data-model", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase5-connector-health.test.ts", "type": "file", "name": "phase5-connector-health.test.ts", "filePath": "packages/server/tests/local/phase5-connector-health.test.ts", "summary": "Integration tests for connector-health endpoints, covering error propagation when the connector registry throws and tier-cap enforcement on connector operations.", "tags": [ "test", "api-handler", "integration", "service" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/phase5-cron-parse.test.ts", "type": "file", "name": "phase5-cron-parse.test.ts", "filePath": "packages/server/tests/local/phase5-cron-parse.test.ts", "summary": "Unit and integration tests for the cron-schedule parsing routes, seeding schedule rows and verifying that cron expressions are correctly parsed and stored.", "tags": [ "test", "utility", "integration" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/phase5-files-upload-limit.test.ts", "type": "file", "name": "phase5-files-upload-limit.test.ts", "filePath": "packages/server/tests/local/phase5-files-upload-limit.test.ts", "summary": "Tests for file upload size enforcement, verifying that requests exceeding the maximum body bytes threshold are rejected with the expected error.", "tags": [ "test", "validation", "api-handler" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/providers.test.ts", "type": "file", "name": "providers.test.ts", "filePath": "packages/server/tests/local/providers.test.ts", "summary": "Integration tests for LLM provider management routes, covering listing, adding, and removing provider configurations as well as key validation flows.", "tags": [ "test", "api-handler", "integration", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/security-middleware.test.ts", "type": "file", "name": "security-middleware.test.ts", "filePath": "packages/server/tests/local/security-middleware.test.ts", "summary": "Comprehensive tests for the security middleware layer, exercising rate limiting, host-header validation, session-token auth, and SSE endpoint protection across many scenarios.", "tags": [ "test", "security", "middleware", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/session-timeout.test.ts", "type": "file", "name": "session-timeout.test.ts", "filePath": "packages/server/tests/local/session-timeout.test.ts", "summary": "Focused tests for the session-timeout tracker within the security middleware, verifying inactivity detection, token expiry, and renewal logic.", "tags": [ "test", "security", "middleware" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/settings-permissions.test.ts", "type": "file", "name": "settings-permissions.test.ts", "filePath": "packages/server/tests/local/settings-permissions.test.ts", "summary": "Integration tests for settings and permissions routes, verifying that permission reads, writes, and tier-gated access behave correctly through the local server.", "tags": [ "test", "api-handler", "integration", "security" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/skills-phase3.test.ts", "type": "file", "name": "skills-phase3.test.ts", "filePath": "packages/server/tests/local/skills-phase3.test.ts", "summary": "Phase-3 integration tests for skill CRUD routes and alias resolution, confirming that skills can be created, listed, aliased, and deleted via the API.", "tags": [ "test", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/sse-resilience.test.ts", "type": "file", "name": "sse-resilience.test.ts", "filePath": "packages/server/tests/local/sse-resilience.test.ts", "summary": "Resilience tests for Server-Sent Events notification channels, verifying reconnect behavior, event deduplication, and subagent/workflow notification delivery.", "tags": [ "test", "integration", "event-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/suggestion-sanitize.test.ts", "type": "file", "name": "suggestion-sanitize.test.ts", "filePath": "packages/server/tests/local/suggestion-sanitize.test.ts", "summary": "Unit tests for the suggestion sanitization helper, ensuring that extracted session content is cleaned of unwanted tokens and tool output patterns.", "tags": [ "test", "utility", "validation" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/team-integration.test.ts", "type": "file", "name": "team-integration.test.ts", "filePath": "packages/server/tests/local/team-integration.test.ts", "summary": "Integration tests for team-workspace features, verifying that team-config tokens are honored, audit events emitted, and multi-seat access controls enforced.", "tags": [ "test", "integration", "api-handler", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/telegram.test.ts", "type": "file", "name": "telegram.test.ts", "filePath": "packages/server/tests/local/telegram.test.ts", "summary": "Tests for the Telegram notification route, validating bot-token and chat-ID patterns, message delivery to a fake Telegram server, and error handling for invalid credentials.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/vault-routes.test.ts", "type": "file", "name": "vault-routes.test.ts", "filePath": "packages/server/tests/local/vault-routes.test.ts", "summary": "Integration tests for the vault secret-storage routes, verifying get/set/delete operations and access-control enforcement via a test Fastify server.", "tags": [ "test", "security", "api-handler", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/local/w43-harvest-temporal.test.ts", "type": "file", "name": "w43-harvest-temporal.test.ts", "filePath": "packages/server/tests/local/w43-harvest-temporal.test.ts", "summary": "Regression tests for the W4.3 temporal-date resolution in the harvest pipeline, confirming that conversation timestamps are correctly extracted and stored as frame dates.", "tags": [ "test", "integration", "data-model" ], "complexity": "simple" }, { "id": "file:packages/server/tests/local/w46-harvest-raw-turns.test.ts", "type": "file", "name": "w46-harvest-raw-turns.test.ts", "filePath": "packages/server/tests/local/w46-harvest-raw-turns.test.ts", "summary": "Tests for W4.6 raw-turn harvesting, verifying that multi-turn conversation content is chunked into individual memory frames and stored with correct role attribution.", "tags": [ "test", "integration", "data-model" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/wiki-mock-guard.test.ts", "type": "file", "name": "wiki-mock-guard.test.ts", "filePath": "packages/server/tests/local/wiki-mock-guard.test.ts", "summary": "Tests that wiki compilation routes are properly guarded, verifying that mock mode and production guards correctly control access to wiki-related endpoints.", "tags": [ "test", "integration", "api-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/workspace-sessions.test.ts", "type": "file", "name": "workspace-sessions.test.ts", "filePath": "packages/server/tests/local/workspace-sessions.test.ts", "summary": "Unit tests for the WorkspaceSessionManager class, verifying session creation, agent spawning, tool injection, orchestrator wiring, and session teardown lifecycle.", "tags": [ "test", "service", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/workspaces-lifecycle.test.ts", "type": "file", "name": "workspaces-lifecycle.test.ts", "filePath": "packages/server/tests/local/workspaces-lifecycle.test.ts", "summary": "Integration tests for workspace lifecycle routes including create, rename, archive, restore, and delete, verifying correct state transitions and freshness computation.", "tags": [ "test", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/local/ws-team-client.test.ts", "type": "file", "name": "ws-team-client.test.ts", "filePath": "packages/server/tests/local/ws-team-client.test.ts", "summary": "Unit tests for the WsTeamClient WebSocket client, verifying connection establishment, message dispatch, reconnect logic, and event emission using a mock WebSocket implementation.", "tags": [ "test", "service", "event-handler" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/offline-mode.test.ts", "type": "file", "name": "offline-mode.test.ts", "filePath": "packages/server/tests/offline-mode.test.ts", "summary": "Integration tests for the OfflineManager, verifying that the server correctly queues actions, surfaces offline status, and replays queued operations when connectivity is restored.", "tags": [ "test", "integration", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/performance/benchmarks.test.ts", "type": "file", "name": "benchmarks.test.ts", "filePath": "packages/server/tests/performance/benchmarks.test.ts", "summary": "Performance benchmark tests measuring latency and throughput for key server operations including memory ingestion, vector search, and API request handling under load.", "tags": [ "test", "performance", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/persona-tool-filter.test.ts", "type": "file", "name": "persona-tool-filter.test.ts", "filePath": "packages/server/tests/persona-tool-filter.test.ts", "summary": "Unit tests for persona tool filtering, verifying that applyPersonaToolFilter correctly enforces allowlists, denylists, and read-only constraints for different agent personas.", "tags": [ "test", "utility", "middleware" ], "complexity": "simple" }, { "id": "file:packages/server/tests/plugin-autoload.test.ts", "type": "file", "name": "plugin-autoload.test.ts", "filePath": "packages/server/tests/plugin-autoload.test.ts", "summary": "Integration tests for plugin auto-discovery and loading, verifying that the local server registers plugins from the data directory and exposes them via the capability API.", "tags": [ "test", "integration", "service" ], "complexity": "complex" }, { "id": "file:packages/server/tests/proactive-handlers.test.ts", "type": "file", "name": "proactive-handlers.test.ts", "filePath": "packages/server/tests/proactive-handlers.test.ts", "summary": "Unit tests for proactive background handlers such as morning briefing generation, stale workspace detection, pending task checks, and capability suggestions.", "tags": [ "test", "service", "utility" ], "complexity": "complex" }, { "id": "file:packages/server/tests/routes/agent-search.test.ts", "type": "file", "name": "agent-search.test.ts", "filePath": "packages/server/tests/routes/agent-search.test.ts", "summary": "Unit and integration tests for the agent search route, exercising tokenization, connector scoring, engine annotation, and the three-up recommendation selection algorithm.", "tags": [ "test", "api-handler", "utility" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/routes/approval-flow.test.ts", "type": "file", "name": "approval-flow.test.ts", "filePath": "packages/server/tests/routes/approval-flow.test.ts", "summary": "Integration tests for the agent action approval workflow, verifying that pending approvals are queued, listed, approved, and rejected through the API with correct state transitions.", "tags": [ "test", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/routes/capabilities.test.ts", "type": "file", "name": "capabilities.test.ts", "filePath": "packages/server/tests/routes/capabilities.test.ts", "summary": "Integration tests for the capabilities management routes, verifying install, uninstall, list, and audit operations on agent capabilities with tier-based access control.", "tags": [ "test", "api-handler", "integration" ], "complexity": "complex" }, { "id": "file:packages/server/tests/routes/capability-packs.test.ts", "type": "file", "name": "capability-packs.test.ts", "filePath": "packages/server/tests/routes/capability-packs.test.ts", "summary": "Integration tests for capability pack installation and management, ensuring that pack bundles install constituent capabilities and that pack listings reflect correct state.", "tags": [ "test", "api-handler", "integration" ], "complexity": "simple" }, { "id": "file:packages/server/tests/routes/commands.test.ts", "type": "file", "name": "commands.test.ts", "filePath": "packages/server/tests/routes/commands.test.ts", "summary": "Integration tests for the quick-command and Win+K routes, verifying command suggestions, recent-command tracking, and context-aware command filtering.", "tags": [ "test", "api-handler", "integration" ], "complexity": "moderate" }, { "id": "file:packages/server/tests/routes/connectors-tier.test.ts", "type": "file", "name": "connectors-tier.test.ts", "filePath": "packages/server/tests/routes/connectors-tier.test.ts", "summary": "Focused tests for tier-cap enforcement on connector routes, verifying that FREE-tier users are rejected when attempting operations beyond their allowance.", "tags": [ "test", "security", "api-handler" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/NavLink.tsx", "type": "file", "name": "NavLink.tsx", "filePath": "apps/web/src/components/NavLink.tsx", "summary": "Provides a styled NavLink component that integrates with the router, applying active and hover styles via the design system's `cn` utility.", "tags": [ "component", "navigation", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/apps/LauncherApp.test.tsx", "type": "file", "name": "LauncherApp.test.tsx", "filePath": "apps/web/src/components/os/apps/LauncherApp.test.tsx", "summary": "Vitest test suite exercising the LauncherApp component's rendering and interaction behaviors including tool detection, launch, and hook management.", "tags": [ "test", "component", "launcher" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/os/apps/LauncherApp.tsx", "type": "file", "name": "LauncherApp.tsx", "filePath": "apps/web/src/components/os/apps/LauncherApp.tsx", "summary": "Primary AI-tool launcher surface that detects installed AI coding tools (claude-code, cursor, codex, etc.), manages hooks, launches them with workspace context, and tracks running processes via polling.", "tags": [ "component", "launcher", "service", "api-handler", "tested" ], "complexity": "complex", "languageNotes": "Uses `useCallback`+`useEffect`+`setInterval` polling pattern to keep running-tool state fresh; MemorySharingView is a secondary sub-component defined in the same file." }, { "id": "function:apps/web/src/components/os/apps/LauncherApp.tsx:LauncherApp", "type": "function", "name": "LauncherApp", "filePath": "apps/web/src/components/os/apps/LauncherApp.tsx", "lineRange": [ 98, 565 ], "summary": "Main React component that orchestrates AI tool detection, hook installation/removal, process tracking, and launch-with-prompt UX across a tabbed launcher interface.", "tags": [ "component", "launcher", "event-handler" ], "complexity": "complex" }, { "id": "function:apps/web/src/components/os/apps/LauncherApp.tsx:MemorySharingView", "type": "function", "name": "MemorySharingView", "filePath": "apps/web/src/components/os/apps/LauncherApp.tsx", "lineRange": [ 639, 743 ], "summary": "Sub-component rendering an explainer view of Waggle's memory-sharing flow between AI tools, showing step cards and flow nodes.", "tags": [ "component", "documentation" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/os/apps/MissionControlApp.tsx", "type": "file", "name": "MissionControlApp.tsx", "filePath": "apps/web/src/components/os/apps/MissionControlApp.tsx", "summary": "Fleet/team management cockpit that polls the adapter for active agent sessions, team members, and activity, allowing fleet-level actions like pause and terminate.", "tags": [ "component", "service", "api-handler" ], "complexity": "complex" }, { "id": "function:apps/web/src/components/os/apps/MissionControlApp.tsx:MissionControlApp", "type": "function", "name": "MissionControlApp", "filePath": "apps/web/src/components/os/apps/MissionControlApp.tsx", "lineRange": [ 36, 278 ], "summary": "React component displaying a tabbed view of running agent fleet, team members, and recent activity with per-session controls and auto-refresh polling.", "tags": [ "component", "api-handler", "event-handler" ], "complexity": "complex" }, { "id": "file:apps/web/src/components/os/apps/WaggleDanceApp.tsx", "type": "file", "name": "WaggleDanceApp.tsx", "filePath": "apps/web/src/components/os/apps/WaggleDanceApp.tsx", "summary": "Displays the WaggleDance signal feed with type-based filtering, sorted signal list, and detail panel showing signal metadata and acknowledgment action.", "tags": [ "component", "service", "event-handler" ], "complexity": "moderate" }, { "id": "function:apps/web/src/components/os/apps/WaggleDanceApp.tsx:WaggleDanceApp", "type": "function", "name": "WaggleDanceApp", "filePath": "apps/web/src/components/os/apps/WaggleDanceApp.tsx", "lineRange": [ 33, 199 ], "summary": "React component rendering the WaggleDance signal feed with filter chips, a scrollable signal list, and a side panel for signal detail and acknowledgment.", "tags": [ "component", "event-handler" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/os/apps/power/power-primitives.test.tsx", "type": "file", "name": "power-primitives.test.tsx", "filePath": "apps/web/src/components/os/apps/power/power-primitives.test.tsx", "summary": "Vitest test suite validating rendering and prop behavior of the power-primitives UI components (SurfaceRow, SurfaceToggle, RiskBadge, StatusBadge).", "tags": [ "test", "component", "validation" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/os/apps/power/power-primitives.tsx", "type": "file", "name": "power-primitives.tsx", "filePath": "apps/web/src/components/os/apps/power/power-primitives.tsx", "summary": "Reusable UI primitives for the Power/Approvals app: SurfaceRow layout, SurfaceToggle switch, RiskBadge, StatusBadge, and a riskToneForTool utility that maps tool names to risk levels.", "tags": [ "component", "utility", "validation", "tested" ], "complexity": "moderate" }, { "id": "function:apps/web/src/components/os/apps/power/power-primitives.tsx:SurfaceRow", "type": "function", "name": "SurfaceRow", "filePath": "apps/web/src/components/os/apps/power/power-primitives.tsx", "lineRange": [ 34, 56 ], "summary": "Layout primitive rendering a row with leading content, title, subtitle, and optional action buttons for settings and approval surfaces.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/apps/power/power-primitives.tsx:SurfaceToggle", "type": "function", "name": "SurfaceToggle", "filePath": "apps/web/src/components/os/apps/power/power-primitives.tsx", "lineRange": [ 70, 95 ], "summary": "Accessible toggle switch primitive with label, disabled state, and on-change callback used across Power feature settings rows.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/apps/power/power-primitives.tsx:RiskBadge", "type": "function", "name": "RiskBadge", "filePath": "apps/web/src/components/os/apps/power/power-primitives.tsx", "lineRange": [ 125, 140 ], "summary": "Displays a color-coded risk level badge (low/medium/high/critical) with optional suffix text for tool approval surfaces.", "tags": [ "component", "validation" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/apps/power/power-primitives.tsx:StatusBadge", "type": "function", "name": "StatusBadge", "filePath": "apps/web/src/components/os/apps/power/power-primitives.tsx", "lineRange": [ 154, 167 ], "summary": "Renders a tone-colored status badge with optional live indicator dot and children content for agent and tool status display.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/ActivityStream.tsx", "type": "file", "name": "ActivityStream.tsx", "filePath": "apps/web/src/components/os/warm/ActivityStream.tsx", "summary": "Collapsible activity stream component showing a summary, duration, and step-by-step breakdown of agent task execution, part of the Hive DS warm component set.", "tags": [ "component", "utility" ], "complexity": "moderate" }, { "id": "function:apps/web/src/components/os/warm/ActivityStream.tsx:ActivityStream", "type": "function", "name": "ActivityStream", "filePath": "apps/web/src/components/os/warm/ActivityStream.tsx", "lineRange": [ 30, 79 ], "summary": "Renders a toggleable accordion-style activity stream with step list, duration display, and provenance metadata for agent runs.", "tags": [ "component", "event-handler" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/os/warm/ConfidenceRing.tsx", "type": "file", "name": "ConfidenceRing.tsx", "filePath": "apps/web/src/components/os/warm/ConfidenceRing.tsx", "summary": "SVG ring chart component visualizing a confidence score (0–1) with color-coded arcs and a centered percentage label, used in memory trust displays.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/ConfidenceRing.tsx:ConfidenceRing", "type": "function", "name": "ConfidenceRing", "filePath": "apps/web/src/components/os/warm/ConfidenceRing.tsx", "lineRange": [ 30, 50 ], "summary": "Renders an SVG circular confidence ring with colored arc proportional to the value and a percentage label at center.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/DotLive.tsx", "type": "file", "name": "DotLive.tsx", "filePath": "apps/web/src/components/os/warm/DotLive.tsx", "summary": "Small animated live-indicator dot component with configurable tone color, pulse animation, and size, used to signal active/running state across the Hive DS.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/DotLive.tsx:DotLive", "type": "function", "name": "DotLive", "filePath": "apps/web/src/components/os/warm/DotLive.tsx", "lineRange": [ 17, 29 ], "summary": "Renders a small pulsing or static dot using tone-mapped colors to indicate live/active status.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/HexAvatar.tsx", "type": "file", "name": "HexAvatar.tsx", "filePath": "apps/web/src/components/os/warm/HexAvatar.tsx", "summary": "Hexagonal avatar component showing a single initial character with optional honey-gradient fill and configurable size, for agent/persona display.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/HexAvatar.tsx:HexAvatar", "type": "function", "name": "HexAvatar", "filePath": "apps/web/src/components/os/warm/HexAvatar.tsx", "lineRange": [ 24, 40 ], "summary": "Renders a hexagon-clipped avatar div with a first-initial label and optional honey gradient background.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/HexCheckTile.tsx", "type": "file", "name": "HexCheckTile.tsx", "filePath": "apps/web/src/components/os/warm/HexCheckTile.tsx", "summary": "Hexagonal tile with a checkmark icon rendered in the appropriate tone color for displaying completion or verification state.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/HexCheckTile.tsx:HexCheckTile", "type": "function", "name": "HexCheckTile", "filePath": "apps/web/src/components/os/warm/HexCheckTile.tsx", "lineRange": [ 15, 26 ], "summary": "Renders a hex-clipped tile with a checkmark icon scaled to the given size and colored by tone.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/IconTile.tsx", "type": "file", "name": "IconTile.tsx", "filePath": "apps/web/src/components/os/warm/IconTile.tsx", "summary": "Generic icon tile component for the Hive DS that renders any Lucide icon within a tone-colored hexagonal frame.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/IconTile.tsx:IconTile", "type": "function", "name": "IconTile", "filePath": "apps/web/src/components/os/warm/IconTile.tsx", "lineRange": [ 16, 27 ], "summary": "Renders a hex-framed icon tile accepting any icon component and a tone to derive background and icon color.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/ModelPill.tsx", "type": "file", "name": "ModelPill.tsx", "filePath": "apps/web/src/components/os/warm/ModelPill.tsx", "summary": "Compact pill component showing the current AI model name with a live indicator dot and optional click handler for model switching.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/ModelPill.tsx:ModelPill", "type": "function", "name": "ModelPill", "filePath": "apps/web/src/components/os/warm/ModelPill.tsx", "lineRange": [ 18, 48 ], "summary": "Renders a model-name pill with a DotLive indicator, showing 'auto' or the specific model name with an optional click handler.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/OvernightHero.tsx", "type": "file", "name": "OvernightHero.tsx", "filePath": "apps/web/src/components/os/warm/OvernightHero.tsx", "summary": "Hero section for the Home cockpit's overnight briefing, displaying a statement headline and a list of overnight agent runs as RunChip items.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/OvernightHero.tsx:OvernightHero", "type": "function", "name": "OvernightHero", "filePath": "apps/web/src/components/os/warm/OvernightHero.tsx", "lineRange": [ 21, 58 ], "summary": "Renders the overnight briefing hero with an eyebrow label, main statement, and a row of RunChip items for each completed overnight run.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/ProvenanceLine.tsx", "type": "file", "name": "ProvenanceLine.tsx", "filePath": "apps/web/src/components/os/warm/ProvenanceLine.tsx", "summary": "Inline provenance attribution component showing memory source label and timestamp with an optional click handler, integrating EvidenceChip styling.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/ProvenanceLine.tsx:ProvenanceLine", "type": "function", "name": "ProvenanceLine", "filePath": "apps/web/src/components/os/warm/ProvenanceLine.tsx", "lineRange": [ 19, 32 ], "summary": "Renders a provenance attribution line with source name and relative timestamp, clickable for drill-through to memory traces.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/RunChip.tsx", "type": "file", "name": "RunChip.tsx", "filePath": "apps/web/src/components/os/warm/RunChip.tsx", "summary": "Compact chip component displaying a run label with a tone-colored DotLive indicator for showing agent run status inline.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/RunChip.tsx:RunChip", "type": "function", "name": "RunChip", "filePath": "apps/web/src/components/os/warm/RunChip.tsx", "lineRange": [ 15, 27 ], "summary": "Renders a pill-shaped run chip with a DotLive dot and a label, colored by the provided tone.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/SectionLabel.tsx", "type": "file", "name": "SectionLabel.tsx", "filePath": "apps/web/src/components/os/warm/SectionLabel.tsx", "summary": "Lightweight section header label with optional horizontal rule, used to separate named sections within Hive DS screens.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/StreakChip.tsx", "type": "file", "name": "StreakChip.tsx", "filePath": "apps/web/src/components/os/warm/StreakChip.tsx", "summary": "Displays a consecutive-days streak count as a compact flame chip, used in habit-tracking and engagement surfaces.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "function:apps/web/src/components/os/warm/StreakChip.tsx:StreakChip", "type": "function", "name": "StreakChip", "filePath": "apps/web/src/components/os/warm/StreakChip.tsx", "lineRange": [ 14, 26 ], "summary": "Renders a flame-icon streak chip showing the number of consecutive active days.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/os/warm/tones.ts", "type": "file", "name": "tones.ts", "filePath": "apps/web/src/components/os/warm/tones.ts", "summary": "Exports TONE_COLOR and TONE_WASH lookup maps that convert semantic tone names (healthy, warning, critical, honey) to Tailwind CSS class strings for the Hive DS warm component library.", "tags": [ "utility", "configuration", "type-definition" ], "complexity": "simple", "languageNotes": "Pure data file — two exported const objects acting as lookup tables; no logic or side effects." }, { "id": "file:apps/web/src/components/ui/accordion.tsx", "type": "file", "name": "accordion.tsx", "filePath": "apps/web/src/components/ui/accordion.tsx", "summary": "Shadcn/ui accordion component re-export wrapping Radix UI's accordion primitives with Hive DS styling applied via CVA and Tailwind.", "tags": [ "component", "utility", "barrel" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/alert-dialog.tsx", "type": "file", "name": "alert-dialog.tsx", "filePath": "apps/web/src/components/ui/alert-dialog.tsx", "summary": "Shadcn/ui alert dialog component wrapping Radix UI's AlertDialog primitives with Hive DS styling and custom header/footer layout components.", "tags": [ "component", "utility", "barrel" ], "complexity": "moderate" }, { "id": "file:apps/web/src/components/ui/alert.tsx", "type": "file", "name": "alert.tsx", "filePath": "apps/web/src/components/ui/alert.tsx", "summary": "Shadcn/ui alert component providing styled Alert, AlertTitle, and AlertDescription variants using CVA for destructive and default visual styles.", "tags": [ "component", "utility", "barrel" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/badge.tsx", "type": "file", "name": "badge.tsx", "filePath": "apps/web/src/components/ui/badge.tsx", "summary": "Shadcn/ui badge component with variant styles (default, secondary, destructive, outline) via CVA, widely used across the app for status and label indicators.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/breadcrumb.tsx", "type": "file", "name": "breadcrumb.tsx", "filePath": "apps/web/src/components/ui/breadcrumb.tsx", "summary": "Shadcn/ui breadcrumb navigation component set including Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, and BreadcrumbEllipsis.", "tags": [ "component", "navigation", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/button.tsx", "type": "file", "name": "button.tsx", "filePath": "apps/web/src/components/ui/button.tsx", "summary": "Core button primitive with CVA-based variant and size styles (default, destructive, outline, ghost, link), used extensively throughout the application.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/calendar.tsx", "type": "file", "name": "calendar.tsx", "filePath": "apps/web/src/components/ui/calendar.tsx", "summary": "Shadcn/ui calendar date-picker component wrapping react-day-picker with Hive DS styling applied through buttonVariants and cn utilities.", "tags": [ "component", "utility" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/card.tsx", "type": "file", "name": "card.tsx", "filePath": "apps/web/src/components/ui/card.tsx", "summary": "Shadcn/ui card component set (Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent) providing surface-level container primitives with Hive DS tokens.", "tags": [ "component", "utility", "barrel" ], "complexity": "simple" }, { "id": "file:apps/web/src/components/ui/carousel.tsx", "type": "file", "name": "carousel.tsx", "filePath": "apps/web/src/components/ui/carousel.tsx", "summary": "Shadcn/ui carousel component built on embla-carousel-react, exporting Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, and a useCarousel hook.", "tags": [ "component", "utility" ], "complexity": "complex" }, { "id": "file:apps/web/src/components/ui/chart.tsx", "type": "file", "name": "chart.tsx", "filePath": "apps/web/src/components/ui/chart.tsx", "summary": "Shadcn/ui recharts wrapper providing ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, and ChartStyle with theme-aware CSS variable injection.", "tags": [ "component", "utility", "data-model" ], "complexity": "complex" }, { "id": "function:apps/web/src/components/ui/chart.tsx:ChartStyle", "type": "function", "name": "ChartStyle", "filePath": "apps/web/src/components/ui/chart.tsx", "lineRange": [ 61, 88 ], "summary": "Injects a `