Composable agent runtime monorepo built on the pi ecosystem
Find a file
Mario Zechner d6809328da mom: add events system for scheduled wake-ups
- Three event types: immediate, one-shot, periodic (cron)
- Events are JSON files in workspace/events/
- EventsWatcher with fs.watch, 100ms debounce
- Queue integration via SlackBot.enqueueEvent() (max 5)
- Fix setTyping race condition causing duplicate messages
- System prompt documents events for mom
- Design doc in docs/events.md
- Add croner dependency for cron scheduling
2025-12-12 22:45:34 +01:00
.github/workflows fix(ci): correct theme path in release workflow (#162) 2025-12-10 21:40:41 +01:00
.husky Add husky pre-commit hook for formatting and type checking 2025-08-11 21:15:37 +02:00
packages mom: add events system for scheduled wake-ups 2025-12-12 22:45:34 +01:00
scripts Fix lockstep versioning and improve documentation 2025-11-13 23:37:43 +01:00
.gitignore mom: remove dynamic timestamp from system prompt for better cache hits 2025-12-11 12:26:59 +01:00
AGENTS.md Update code map with RPC directory structure 2025-12-09 14:14:05 +01:00
biome.json mom: Single accumulated message per run, exclude data dir from biome 2025-11-26 01:21:45 +01:00
LICENSE Initial monorepo setup with npm workspaces and dual TypeScript configuration 2025-08-09 17:18:38 +02:00
package-lock.json mom: add events system for scheduled wake-ups 2025-12-12 22:45:34 +01:00
package.json Fix version scripts: clean reinstall to avoid npm workspace bug 2025-12-09 21:56:22 +01:00
pi-mono.code-workspace mom: add events system for scheduled wake-ups 2025-12-12 22:45:34 +01:00
README.md Document that build must run before check 2025-12-10 22:50:34 +01:00
tsconfig.base.json Try fixing root level compiles 2025-12-03 14:16:00 +01:00
tsconfig.json Add CI workflow and fix workspace tests 2025-12-02 12:53:53 +00:00

Pi Monorepo

Tools for building AI agents and managing LLM deployments.

Packages

Package Description
@mariozechner/pi-ai Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.)
@mariozechner/pi-agent Agent runtime with tool calling and state management
@mariozechner/pi-coding-agent Interactive coding agent CLI
@mariozechner/pi-mom Slack bot that delegates messages to the pi coding agent
@mariozechner/pi-tui Terminal UI library with differential rendering
@mariozechner/pi-web-ui Web components for AI chat interfaces
@mariozechner/pi-proxy CORS proxy for browser-based LLM API calls
@mariozechner/pi CLI for managing vLLM deployments on GPU pods

Development

Setup

npm install          # Install all dependencies
npm run build        # Build all packages
npm run check        # Lint, format, and type check

Note: npm run check requires npm run build to be run first. The web-ui package uses tsc which needs compiled .d.ts files from dependencies.

CI

GitHub Actions runs on push to main and on pull requests. The workflow runs npm run check and npm run test for each package in parallel.

Do not add LLM API keys as secrets to this repository. Tests that require LLM access use describe.skipIf() to skip when API keys are missing. This is intentional:

  • PRs from external contributors would have access to secrets in the CI environment
  • Malicious PR code could exfiltrate API keys
  • Tests that need LLM calls are skipped on CI and run locally by developers who have keys configured

If you need to run LLM-dependent tests, run them locally with your own API keys.

Development

Start watch builds for all packages:

npm run dev

Then run with tsx:

cd packages/coding-agent && npx tsx src/cli.ts
cd packages/pods && npx tsx src/cli.ts

Versioning (Lockstep)

All packages MUST always have the same version number. Use these commands to bump versions:

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:

  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

Complete release process:

  1. Add changes to CHANGELOG.md (if changes affect coding-agent):

    # Add your changes to the [Unreleased] section in packages/coding-agent/CHANGELOG.md
    # Always add new entries under [Unreleased], never under already-released versions
    
  2. Bump version (all packages):

    npm run version:patch    # For bug fixes
    npm run version:minor    # For new features
    npm run version:major    # For breaking changes
    
  3. Finalize CHANGELOG.md for release (if changes affect coding-agent):

    # Change [Unreleased] to the new version number with today's date
    # e.g., ## [0.7.16] - 2025-11-17
    # NEVER add entries to already-released version sections
    # Each version section is immutable once released
    
  4. Commit and tag:

    git add .
    git commit -m "Release v0.7.16"
    git tag v0.7.16
    git push origin main
    git push origin v0.7.16
    
  5. Publish to npm:

    npm run publish        # Publish all packages to npm
    

    NPM Token Setup: Publishing requires a granular access token with "Bypass 2FA on publish" enabled.

    • Go to https://www.npmjs.com/settings/badlogic/tokens/
    • Create a new "Granular Access Token"
    • Select "Bypass 2FA on publish"
    • Tokens expire after 90 days, so regenerate when needed
    • Set the token: npm config set //registry.npmjs.org/:_authToken=YOUR_TOKEN
  6. Add new [Unreleased] section (for next development cycle):

    # Add a new [Unreleased] section at the top of CHANGELOG.md
    # Commit: git commit -am "Add [Unreleased] section"
    

License

MIT