diff --git a/Codex/API/CURRENT_STATE.md b/Codex/API/CURRENT_STATE.md index 2226591..088b672 100644 --- a/Codex/API/CURRENT_STATE.md +++ b/Codex/API/CURRENT_STATE.md @@ -24,6 +24,7 @@ This file records what is believed to be implemented now. - `/ready` for semantic readiness - `/status` for detailed state snapshot - Portal should rely on API-normalized state, not direct agent state. +- Proxy lifecycle is now tracked separately from agent readiness under `ContainerInstance.payload.proxy`. ## Readiness cleanup already done - `agentClient.js` centralizes non-streaming agent transport. @@ -41,6 +42,18 @@ This file records what is believed to be implemented now. - Post-provision edge publishing is still active. - Post-provision behavior has been adjusted away from legacy port-allocation commits and should be understood as request-driven / payload-driven. +## Velocity / Minecraft edge lifecycle +- Minecraft edge publish uses Velocity instead of Traefik TCP config. +- API registers Minecraft backends with the Velocity bridge using `POST /zpack/register` and unregisters with `POST /zpack/unregister`. +- Velocity registration verification now uses the bridge's real `GET /zpack/status` route instead of the nonexistent `/zpack/list` route. +- `/zpack/status` is expected to expose a `servers` array containing `{ name, address, port }` entries. +- If `/zpack/status` exists but does not expose registered backends, API treats the register response as acknowledged but unverifiable instead of falsely failing the registration. +- API exposes `POST /internal/velocity/proxy-status` for bridge lifecycle callbacks using the same hashed `X-Zpack-Secret` shared-secret auth style. +- Accepted proxy lifecycle statuses are `registered_with_proxy`, `proxy_ping_ok`, and `proxy_ping_failed`. +- Proxy lifecycle callbacks are stored under `ContainerInstance.payload.proxy` with source, status, server name, address, port, duplicate flag, timestamps, latency, detail, and last event time. +- `GET /api/servers/:id/status` now includes the stored `proxy` object beside agent-derived live status. +- The bridge should set `ZPACK_PROXY_STATUS_ENDPOINT` to the API internal callback URL, for example `http://:4000/internal/velocity/proxy-status`. + ## Backup support - API forwards game backup operations. - Current API route shape: