Expand description
Repo-config phase of outrig init, plus the bootstrap fallback used
by outrig image add when run in an uninitialized repo.
Two public entry points share one private writer:
ensureis whatoutrig initcalls: idempotent: write the config if missing, log + skip if present.resolve_or_bootstrapis whatoutrig image addcalls before dispatching: walk up to find an existing.agents/outrig/config.toml, and onNoRepoConfigprompt the user to bootstrap one againstcwd.
Constants§
- DOC_
SYNC_ FIELDS - Slice of every
Fielddeclared in this module, forprompt_doc_sync.rs.
Functions§
- ensure
- Idempotent. Returns
Some(image_name)when this call wrote the repo config (the user named an image during the bootstrap), orNonewhen the file already existed and was left alone. Callers thread the name into the subsequentimage_setup::add::run_withso the image-name prompt doesn’t fire twice. - resolve_
or_ bootstrap - Resolve the repo root for
outrig image add. Walks up via [find_repo_root_from]; onOutrigError::NoRepoConfigprompts the user, and on yes bootstraps the repo config againstcwdand returnscwd. On no, re-raisesNoRepoConfigso the exit code and error string match the previous behavior for scripts that test the unconfigured case. Returns the resolved repo root paired withSome(image_name)when this call ran the bootstrap (the user named an image) orNonewhen an existing config was found by walking up.