diff --git a/todos/project-description.md b/todos/project-description.md index b888a76b..0685aef3 100644 --- a/todos/project-description.md +++ b/todos/project-description.md @@ -3,45 +3,56 @@ A comprehensive toolkit for managing Large Language Model (LLM) deployments and building AI agents, specifically designed for deploying and managing LLMs on remote GPU pods with automatic vLLM configuration for agentic workloads. ## Features +- Unified LLM API with automatic model discovery and provider configuration - Terminal UI framework with differential rendering and interactive components - AI agent framework with tool calling, session persistence, and multiple renderers - GPU pod management CLI for automated vLLM deployment on various providers -- Support for OpenAI, Anthropic, Groq, OpenRouter, Gemini, and compatible APIs +- Support for OpenAI, Anthropic, Google, Groq, Cerebras, xAI, OpenRouter, and compatible APIs - Built-in file system tools for agentic AI capabilities +- Automatic cost tracking and token usage across all providers ## Tech Stack - TypeScript/JavaScript with ES Modules - Node.js ≥20.0.0 -- OpenAI SDK for LLM integration +- OpenAI SDK, Anthropic SDK, Google Gemini SDK for LLM integration - Custom TUI library with differential rendering - Biome for linting and formatting - npm workspaces for monorepo structure +- Automatic model discovery from OpenRouter and models.dev APIs ## Structure -- `packages/tui/` - Terminal UI library -- `packages/agent/` - AI agent with tool calling -- `packages/pods/` - CLI for GPU pod management +- `packages/tui/` - Terminal UI library (@mariozechner/pi-tui) +- `packages/ai/` - Unified LLM API (@mariozechner/pi-ai) +- `packages/agent/` - AI agent with tool calling (@mariozechner/pi-agent) +- `packages/pods/` - CLI for GPU pod management (@mariozechner/pi) - `scripts/` - Utility scripts for version sync - `todos/` - Task tracking ## Architecture +- Unified LLM interface abstracting provider differences - Event-driven agent system with publish-subscribe pattern - Component-based TUI with differential rendering - SSH-based remote pod management - Tool calling system for file operations (read, bash, glob, ripgrep) - Session persistence in JSONL format - Multiple renderer strategies (Console, TUI, JSON) +- Automatic model capability detection (reasoning, vision, tool calling) ## Commands -- Lint: `npm run check` +- Build: `npm run build` +- Clean: `npm run clean` +- Lint/Check: `npm run check` - Dev/Run: `npx tsx packages/agent/src/cli.ts` (pi-agent), `npx tsx packages/pods/src/cli.ts` (pi) - Version: `npm run version:patch/minor/major` - Publish: `npm run publish` +- Publish (dry run): `npm run publish:dry` ## Testing -The TUI package includes comprehensive tests using Node.js built-in test framework: -- Unit tests in `packages/tui/test/*.test.ts` -- Test runner: `node --test --import tsx test/*.test.ts` +The monorepo includes comprehensive tests using Node.js built-in test framework and Vitest: +- TUI package: Unit tests in `packages/tui/test/*.test.ts` (Node.js test framework) +- AI package: Provider tests in `packages/ai/test/*.test.ts` (Vitest) +- Test runner (TUI): `node --test --import tsx test/*.test.ts` +- Test runner (AI): `npm run test` (uses Vitest) - Virtual terminal for TUI testing via `@xterm/headless` - Example applications for manual testing @@ -58,7 +69,7 @@ Follow these steps to add a new package to the monorepo: ```json { "name": "@mariozechner/your-package", - "version": "0.5.8", + "version": "0.5.12", "description": "Package description", "type": "module", "main": "./dist/index.js", @@ -102,7 +113,7 @@ Follow these steps to add a new package to the monorepo: 4. **Create src/index.ts:** ```typescript // Main exports for your package - export const version = "0.5.8"; + export const version = "0.5.12"; ``` 5. **Update root tsconfig.json paths:** @@ -110,15 +121,17 @@ Follow these steps to add a new package to the monorepo: ```json "paths": { "@mariozechner/pi-tui": ["./packages/tui/src/index.ts"], + "@mariozechner/pi-ai": ["./packages/ai/src/index.ts"], "@mariozechner/your-package": ["./packages/your-package/src/index.ts"], - // ... other packages + "@mariozechner/pi-agent": ["./packages/agent/src/index.ts"], + "@mariozechner/pi": ["./packages/pods/src/index.ts"] } ``` 6. **Update root package.json build script:** Insert your package in the correct dependency order: ```json - "build": "npm run build -w @mariozechner/pi-tui && npm run build -w @mariozechner/your-package && ..." + "build": "npm run build -w @mariozechner/pi-tui && npm run build -w @mariozechner/pi-ai && npm run build -w @mariozechner/your-package && npm run build -w @mariozechner/pi-agent && npm run build -w @mariozechner/pi" ``` 7. **Install and verify:**