Trinity follows Semantic Versioning (SemVer):
MAJOR.MINOR.PATCH (e.g., 1.2.3)
| Version | When to Increment | Example |
|---|---|---|
| MAJOR | Breaking changes requiring migration | Database schema changes, API incompatibilities |
| MINOR | New features, backward compatible | Gemini runtime support, new MCP tools |
| PATCH | Bug fixes, security patches | Fix port allocation bug, UI fixes |
During the 0.x phase:
- API may change between minor versions
- Breaking changes documented in git history and PR descriptions
- Recommended: Pin to specific version tags
Post-1.0: Strict semver adherence with deprecation warnings before breaking changes.
Trinity consists of multiple components that version together:
| Component | Location | Versioning Strategy |
|---|---|---|
| Backend | src/backend/ |
Single version with platform |
| Frontend | src/frontend/ |
Single version with platform |
| Base Image | docker/base-image/ |
Single version with platform |
| Agent Server | docker/base-image/agent_server/ |
Single version with platform |
| MCP Server | src/mcp-server/ |
Single version with platform |
All components share the same version number for simplicity.
# Release tags
v0.9.0 # Feature release
v0.9.1 # Patch release
v1.0.0 # Major release
# Pre-release tags
v1.0.0-alpha.1 # Alpha testing
v1.0.0-beta.1 # Beta testing
v1.0.0-rc.1 # Release candidate# Production tags
trinity-agent-base:0.9.0 # Specific version (recommended)
trinity-agent-base:0.9 # Latest patch in minor version
trinity-agent-base:latest # Latest release (not for production)
# Development tags
trinity-agent-base:main # Latest main branch (CI/CD only)
trinity-agent-base:dev # Development buildsExamples: Bug fixes, documentation updates, UI tweaks
Upgrade Process:
git pull origin main
docker compose pull
docker compose up -dDowntime: ~30 seconds (container restart)
Examples: Gemini runtime support, new API endpoints
Upgrade Process:
# 1. Backup (recommended)
./scripts/deploy/backup.sh
# 2. Pull changes
git pull origin main
# 3. Rebuild base image (if changed)
./scripts/deploy/build-base-image.sh
# 4. Restart services
docker compose down
docker compose up -d
# 5. Verify
curl http://localhost:8000/healthDowntime: 2-5 minutes
Impact on Running Agents:
- Existing agents continue running (no rebuild needed)
- New features available only after agent recreation
- For Gemini support: Agents must be recreated with
runtime: gemini-cli
Examples: Database schema changes, API breaking changes
Upgrade Process:
# 1. Stop all agents
curl -X POST http://localhost:8000/api/ops/stop-all
# 2. Full backup
./scripts/deploy/backup.sh
# 3. Pull changes
git pull origin main
# 4. Run migrations (if any)
./scripts/deploy/migrate.sh
# 5. Rebuild everything
./scripts/deploy/build-base-image.sh
docker compose build
# 6. Start services
docker compose up -d
# 7. Recreate agents (if base image changed)
# Use UI or API to recreate agents from templatesDowntime: 10-30 minutes
This is a MINOR version update. Here's the specific upgrade path:
| Component | Change Type | Impact |
|---|---|---|
| Base Image | Modified | New agents need rebuild |
| Backend | Modified | Restart required |
| Frontend | No change | N/A |
| Database | No change | No migration needed |
| Config | Optional | Add GOOGLE_API_KEY if using Gemini |
# 1. Pull latest code
git fetch origin
git checkout v0.9.0 # Or: git pull origin main
# 2. (Optional) Add Google API key for Gemini
echo "GOOGLE_API_KEY=your-key" >> .env
# 3. Rebuild base image
./scripts/deploy/build-base-image.sh
# 4. Restart backend
docker compose restart backend
# 5. Verify
curl http://localhost:8000/healthExisting agents: Continue working unchanged (use Claude Code)
To use Gemini on existing agent:
- Note agent's template and configuration
- Delete the agent
- Recreate with
runtime: gemini-cliin template
New agents: Can choose runtime at creation time
# If issues occur
git checkout v0.8.0 # Previous version
./scripts/deploy/build-base-image.sh
docker compose restart backend- Review git history for breaking changes (
git log --oneline) - Backup database (
data/trinity.db) - Backup Redis (
data/redis/) - Note running agents and their configurations
- Schedule maintenance window if production
# 1. Health check
curl http://localhost:8000/health
# 2. Test agent creation
# Create test agent via UI
# 3. Test chat
# Send message to test agent
# 4. Verify logs
docker compose logs backend --tail=50Always have a rollback plan:
# Quick rollback (config/code only)
git checkout <previous-tag>
docker compose up -d
# Full rollback (including data)
./scripts/deploy/restore.sh <backup-timestamp>| Version | Date | Type | Key Changes |
|---|---|---|---|
| 0.9.0 | 2025-12-28 | MINOR | Gemini CLI runtime support |
| 0.8.x | 2025-12-24 | PATCH | Test suite fixes, bug fixes |
| 0.8.0 | 2025-12-23 | MINOR | First-time setup wizard, API keys management |
See git log --oneline for detailed history.
Planned for v1.0+:
- Version Check Endpoint:
/api/versionreturns current and latest available - Upgrade Notifications: UI banner when new version available
- One-Click Upgrades: For non-breaking updates
- Migration Scripts: Automatic database migrations
- Agent Auto-Rebuild: Option to auto-rebuild agents on base image change
If you encounter upgrade issues:
- Check Known Issues
- Review Troubleshooting
- Open an issue on GitHub