build-and-push / build (push) Failing after 2m45s
Move workload out of infra with cursor-devbox-style GitRepository + run_number-sha image automation.
27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# cursor-agent bootstrap — Desired State
|
|
|
|
## Purpose
|
|
|
|
Prepare the **cursor-agent-api-proxy** container image with a working Cursor CLI login and persistent `~/.cursor` state before the proxy serves traffic.
|
|
|
|
## Mechanism
|
|
|
|
1. **Image** — Ubuntu + Node 20 + cursor-agent CLI (`agent.real`) + the OpenAI-compatible ACP proxy (`src/server.mjs`).
|
|
2. **Bootstrap** — `bootstrap-cursor.sh` runs in an init container (and entrypoint) with `CURSOR_API_KEY` from SecretAdapter `cursor-auth` to seed `/home/nobody/.cursor` on the PVC.
|
|
3. **Runtime** — Each `/v1/chat/completions` request spawns `agent acp` with in-process MCP for client tools and native image ContentBlocks.
|
|
|
|
The legacy GLM/stream-json wrapper path is **not** used in this image.
|
|
|
|
## Build-time
|
|
|
|
- Install cursor-agent CLI and proxy sources in the Docker image (no secrets at build time).
|
|
|
|
## Runtime
|
|
|
|
- Init container + PVC: `bootstrap-cursor.sh` with `CURSOR_API_KEY` from `cursor-auth`.
|
|
- Proxy env: `PROXY_INTERNAL_TOKEN`, `PROXY_MAX_CONCURRENT_SESSIONS`, `PROXY_SESSION_TTL_MS`, `ACP_REQUEST_TIMEOUT_MS`.
|
|
|
|
## Related
|
|
|
|
- [131-cursor-agent-api-goal.md](../../infrastructure/node4-k3s/131-cursor-agent-api-goal.md)
|