2 Commits

Author SHA1 Message Date
freemo a05f4c69a7 fix(resources): support multiple named devcontainer configurations in auto-discovery
Extend DevcontainerDiscoveryResult and discover_devcontainers() to scan
.devcontainer/<name>/devcontainer.json patterns (one subdirectory level)
in addition to the existing fixed paths. Each named configuration produces
a distinct result with config_name set to the subdirectory name (e.g.
'api', 'frontend'). Root-level configs retain config_name=None.

- Replace _SCAN_PATHS with _FIXED_SCAN_PATHS for root-level configs
- Add glob-based scan of .devcontainer/<name>/devcontainer.json
- Add config_name: str | None attribute to DevcontainerDiscoveryResult
- Validate config_name (must be non-empty str or None)
- Add 8 new Behave scenarios covering named, multiple, mixed, empty cases
- Add 4 new Robot Framework integration tests for named config discovery
- All existing tests continue to pass (no regression)

ISSUES CLOSED: #2615
2026-04-05 18:08:56 +00:00
freemo 279c6112ae feat(resource): add devcontainer resource type and auto-discovery handler
Added three new built-in resource types: container-instance,
devcontainer-instance, and devcontainer-file. The devcontainer-instance
type inherits from container-instance per ADR-042 and is auto-discovered
when git-checkout or fs-directory resources contain .devcontainer/
directories per ADR-043.

Implementation includes:
- DevcontainerHandler extending BaseResourceHandler with snapshot strategy
- Auto-discovery module scanning .devcontainer/devcontainer.json and
  root .devcontainer.json with JSON validation
- CLI support for devcontainer-instance and container-instance via
  agents resource add with --path and --image flags
- Behave feature with 22 scenarios covering manual registration,
  auto-discovery, invalid JSON handling, and protocol conformance
- Robot integration tests with 10 test cases for CLI round-trip and
  DAG hierarchy validation
- ASV benchmarks measuring discovery throughput with varying subdirectory
  counts, handler resolver cache performance, and result construction
- Reference documentation at docs/reference/devcontainer_resources.md

ISSUES CLOSED: #511
2026-03-02 22:09:37 -05:00