Fix lockstep versioning and improve documentation

- Sync all packages to version 0.7.7
- Rewrite sync-versions.js to handle ALL inter-package dependencies automatically
- Fix web-ui dependency on pi-ai (was 0.6.0, now 0.7.7)
- Move agent fix changelog entry to coding-agent CHANGELOG
- Remove redundant agent CHANGELOG.md
- Improve README.md with clearer lockstep versioning docs
- Add /changelog command to display full changelog in TUI (newest last)
- Fix changelog description (not a scrollable viewer, just displays in chat)
- Update CHANGELOG for 0.7.7 release
This commit is contained in:
Mario Zechner 2025-11-13 23:37:43 +01:00
parent 7b347291ff
commit bc670bc63c
17 changed files with 1721 additions and 186 deletions

View file

@ -1,90 +1,63 @@
# Pi Monorepo
A collection of tools for managing LLM deployments and building AI agents.
Tools for building AI agents and managing LLM deployments.
## Packages
- **[@mariozechner/pi-ai](packages/ai)** - Unified multi-provider LLM API
- **[@mariozechner/pi-web-ui](packages/web-ui)** - Web components for building AI chat interfaces
- **[@mariozechner/pi-proxy](packages/proxy)** - CORS proxy for browser-based LLM API calls
- **[@mariozechner/pi-tui](packages/tui)** - Terminal UI library with differential rendering
- **[@mariozechner/pi-agent](packages/agent)** - General-purpose agent with tool calling and session persistence
- **[@mariozechner/pi](packages/pods)** - CLI for managing vLLM deployments on GPU pods
| Package | Description |
|---------|-------------|
| **[@mariozechner/pi-ai](packages/ai)** | Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.) |
| **[@mariozechner/pi-agent](packages/agent)** | Agent runtime with tool calling and state management |
| **[@mariozechner/pi-coding-agent](packages/coding-agent)** | Interactive coding agent CLI |
| **[@mariozechner/pi-tui](packages/tui)** | Terminal UI library with differential rendering |
| **[@mariozechner/pi-web-ui](packages/web-ui)** | Web components for AI chat interfaces |
| **[@mariozechner/pi-proxy](packages/proxy)** | CORS proxy for browser-based LLM API calls |
| **[@mariozechner/pi](packages/pods)** | CLI for managing vLLM deployments on GPU pods |
**Related:**
- **[sitegeist](https://github.com/badlogic/sitegeist)** - Browser extension for AI-powered web navigation (uses pi-ai and pi-web-ui)
- **[sitegeist](https://github.com/badlogic/sitegeist)** - Browser extension for AI-powered web navigation
## Development
This is a monorepo using npm workspaces for package management and a dual TypeScript configuration for development and building.
### Common Commands
### Setup
```bash
# Install all dependencies
npm install
npm install # Install all dependencies
npm run build # Build all packages
npm run check # Lint, format, and type check
```
# Build all packages (required for publishing to NPM)
npm run build
### Running Without Building
# Clean out dist/ folders in all packages
npm run clean
Use `tsx` to run TypeScript source directly during development:
# Run linting, formatting, and tsc typechecking (no build needed)
npm run check
# Run directly with tsx during development (no build needed)
```bash
cd packages/coding-agent && npx tsx src/cli.ts
cd packages/pods && npx tsx src/cli.ts
cd packages/agent && npx tsx src/cli.ts
```
### Package Dependencies
### Versioning (Lockstep)
The packages have the following dependency structure:
`pi-tui` -> `pi-agent` -> `pi`
When new packages are added, the must be inserted in the correct order in the `build` script in `package.json`.
### TypeScript Configuration
The monorepo uses a dual TypeScript configuration approach:
- **Root `tsconfig.json`**: Contains path mappings for all packages, used for type checking and development with `tsx`
- **Package `tsconfig.build.json`**: Clean build configuration with `rootDir` and `outDir`, used for production builds
This setup allows:
- Type checking without building (`npm run check` works immediately)
- Running source files directly with `tsx` during development
- Clean, organized build outputs for publishing
### Versioning
All packages use **lockstep versioning** - they share the same version number:
**All packages MUST always have the same version number.** Use these commands to bump versions:
```bash
# Bump patch version (0.5.0 -> 0.5.1)
npm run version:patch
# Bump minor version (0.5.0 -> 0.6.0)
npm run version:minor
# Bump major version (0.5.0 -> 1.0.0)
npm run version:major
npm run version:patch # 0.7.5 -> 0.7.6
npm run version:minor # 0.7.5 -> 0.8.0
npm run version:major # 0.7.5 -> 1.0.0
```
These commands automatically:
1. Update all package versions
2. Sync inter-package dependency versions
3. Update package-lock.json
These commands:
1. Update all package versions to the same number
2. Update inter-package dependency versions (e.g., `pi-agent` depends on `pi-ai@^0.7.7`)
3. Update `package-lock.json`
**Never manually edit version numbers.** The lockstep system ensures consistency across the monorepo.
### Publishing
```bash
# Dry run to see what would be published
npm run publish:dry
# Publish all packages to npm
npm run publish
npm run publish:dry # Preview what will be published
npm run publish # Publish all packages to npm
```
## License