You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #191 (epic). Depends on the manifest format from the Phase 4 follow-up. Lets an image ship its own brood-box agent definition so a single reference is enough to run it.
Scope
Read an embedded manifest declared by an OCI label or well-known path:
Resolve the manifest by reading the OCI config label (and/or a well-known path) using go-containerregistry — this is I/O, lives in internal/infra (image inspection), invoked from cmd/bbox.
Define and document the minimum image contract (sandbox user/home, shell, agent binary on PATH or explicit command) — partially overlaps with the run-image follow-up; align the two.
Open questions
Local-cache-presence vs. live-pull during import (and how agents doctor reports pullability).
Whether to verify the manifest's declared image matches the imported reference.
Acceptance criteria
bbox agents import ghcr.io/acme/aider-bbox:latest registers a runnable agent with no local YAML authoring.
New internal/infra/ocimage/ package: Fetcher interface + RemoteFetcher (go-containerregistry). Pulls config + the one layer holding the manifest, pins the ref to the resolved digest, default keychain auth + 60s timeout.
bbox agents import IMAGE overloads the existing import <file> — auto-detected (a source is an image when it's not an existing file AND contains / or @sha256:). --name overrides the manifest's name. Reuses the validate → UpsertAgent → receipt tail.
Manifest extracted via the org.stacklok.broodbox.agent label, falling back to /usr/share/broodbox/agent.yaml.
Open questions resolved: live-pull the manifest only (full image pulled at VM run time); warn only on real repo mismatch (same-repo tag→digest pin is silent); doctor pullability deferred (would break doctor's pure/offline invariant).
Activity
JAORMX commentedon Jul 3, 2026
PR #216 implements this. Summary of the approach:
internal/infra/ocimage/package:Fetcherinterface +RemoteFetcher(go-containerregistry). Pulls config + the one layer holding the manifest, pins the ref to the resolved digest, default keychain auth + 60s timeout.bbox agents import IMAGEoverloads the existingimport <file>— auto-detected (a source is an image when it's not an existing file AND contains/or@sha256:).--nameoverrides the manifest's name. Reuses the validate →UpsertAgent→ receipt tail.org.stacklok.broodbox.agentlabel, falling back to/usr/share/broodbox/agent.yaml.Closes #204 when merged.
Add bbox agents import IMAGE (BYO agents Phase 5) (#216)