Files
opencode-manager/backend/src/constants.ts
T
Chris Scott a02f7a2e98 Bump version to 0.8.21 (#99)
* Add timeout handling and recovery for OpenCode upgrade/install operations

- Extract DEFAULT_AGENTS_MD to constants file
- Add 90s timeout for opencode upgrade/install commands
- Implement server recovery when upgrade/install fails
- Update frontend error handling for recovery status
- Add settings route tests

* Add centralized query cache invalidation utility

* Bump version to 0.8.21
2026-01-30 22:39:24 -05:00

57 lines
2.0 KiB
TypeScript

export const DEFAULT_AGENTS_MD = `# OpenCode Manager - Global Agent Instructions
## Critical System Constraints
- **DO NOT** use ports 5003 or 5551 - these are reserved for OpenCode Manager
- **DO NOT** kill or stop processes on ports 5003 or 5551
- **DO NOT** modify files in the \`.config/opencode\` directory unless explicitly requested
## Dev Server Ports
When starting dev servers, use the pre-allocated ports 5100-5103:
- Port 5100: Primary dev server (frontend)
- Port 5101: Secondary dev server (API/backend)
- Port 5102: Additional service
- Port 5103: Additional service
Always bind to \`0.0.0.0\` to allow external access from the Docker host.
## Package Management
### Node.js Packages
Prefer **pnpm** or **bun** over npm for installing dependencies to save disk space:
- Use \`pnpm install\` instead of \`npm install\`
- Use \`bun install\` as an alternative
- Both are pre-installed in the container
### Python Packages
Always create a virtual environment in the repository directory before installing packages:
1. Create virtual environment in repo:
\`cd \`<repo_path>\`
\`uv venv .venv\`
2. Activate the virtual environment:
\`source .venv/bin/activate\` # or \`uv pip sync\` for project-based workflows
3. Install packages into activated environment:
\`uv pip install \`<package>\`
\`uv pip install -r requirements.txt\`
4. Run Python commands:
\`python script.py\` # Uses activated .venv
Alternative: Use \`uv run python script.py\` to skip explicit activation
**Important:**
- Always create .venv in the repository directory (not workspace root)
- Activate the environment before running pip operations
- uv is pre-installed in the container and provides faster package installation
- .venv directories created in repos will persist but can be removed safely
## General Guidelines
- This file is merged with any AGENTS.md files in individual repositories
- Repository-specific instructions take precedence for their respective codebases
`