Expose provider resources through generic HTTP routes #57

Open
opened 2026-10-04 17:44:26 +00:00 by kayg · 0 comments
Owner

Problem and evidence

The server router registers /api/v1/containers and container-address detail/action routes in crates/server/src/resources.rs:218-230. The server's OpenAPI operation list in crates/server/src/lib.rs:214-227 has container handlers and no generic resource-discovery/list/inspect/action route. Default instance recognition in crates/server/src/host_route.rs:120-140 is Docker/Podman-specific.

Recommendation

Add the generic discovery and resource list/inspect/plan/action surface through crates/proto, with generated OpenAPI and client output. Keep current Docker/Podman v1 routes and identifiers as compatibility projections; do not widen the closed Engine enum.

Payoff and estimate

A provider implementing existing capabilities can be exposed without another container-shaped server branch. Estimate: 2–4 engineering days for route/DTO migration and parity tests; this is part of the 5–10 day vertical slice in the report.

Priority: Next milestone (PLAN step 5).

2026-10-04 owner decisions: Matches first-party provider crates behind one trait and generic schema-driven resource UI. Existing v1 API compatibility remains required. Related: #49.

Report: arch-review report
Source: arch-review 2026-10-04

## Problem and evidence The server router registers `/api/v1/containers` and container-address detail/action routes in `crates/server/src/resources.rs:218-230`. The server's OpenAPI operation list in `crates/server/src/lib.rs:214-227` has container handlers and no generic resource-discovery/list/inspect/action route. Default instance recognition in `crates/server/src/host_route.rs:120-140` is Docker/Podman-specific. ## Recommendation Add the generic discovery and resource list/inspect/plan/action surface through `crates/proto`, with generated OpenAPI and client output. Keep current Docker/Podman v1 routes and identifiers as compatibility projections; do not widen the closed `Engine` enum. ## Payoff and estimate A provider implementing existing capabilities can be exposed without another container-shaped server branch. Estimate: 2–4 engineering days for route/DTO migration and parity tests; this is part of the 5–10 day vertical slice in the report. **Priority:** Next milestone (PLAN step 5). **2026-10-04 owner decisions:** Matches first-party provider crates behind one trait and generic schema-driven resource UI. Existing v1 API compatibility remains required. Related: #49. **Report:** [arch-review report](/mnt/hdd/infraternal/jobs/arch-review/report.md) **Source: arch-review 2026-10-04**
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal-v0#57
No description provided.