docs/v5/architecture/adr/0002-coold-host-agent-boundary.md
Accepted.
Coolify v5 needs a process on each managed host that can reach local runtime surfaces such as Podman, Corrosion, DNS bind addresses, and firewall state. That process must run close to privileged host APIs, but Coolify's product model, RBAC, deployment history, billing, and audit state belong in the Laravel control plane.
If coold grows app-aware behavior, it becomes a second control plane with local copies of product rules. If Coolify reaches around coold with raw host access, the privileged boundary disappears and host behavior becomes harder to validate.
coold is a per-host agent with a narrow, explicit primitive surface. It executes host-local operations requested through Flux, reports typed results, and owns host safety checks for those operations.
coold owns local runtime integration: Podman access, service-discovery sync, embedded DNS, Corrosion writes for this host's endpoints, host facts, and the firewall mutation/reconciliation surface when those primitives are active.
coold must not own Coolify product concepts. It does not decide what an application, project, team, deployment, domain, rollback, billing event, or audit record means. Those concepts remain in Coolify Laravel. coold also must not expose raw Podman passthrough; every operation needs an explicit primitive with validation and a stable protocol shape.
Builder supervision is intentionally deferred. When it returns, it should be recorded in a separate ADR/API because scheduling, capacity, logs, artifacts, cancellation, restart adoption, and registry flow need their own trade-off.