Parent: #257 — Layer 0 (Plumbing)
What
ProviderSet.detect(alloc) probes the environment and reports what's available. Detection only — no preferences, no routing decisions.
Probes:
- PATH for
claude, codex binaries
- PATH for zig* tools (
zigrep, zigread, zigpatch, etc.)
- PATH for fallback tools (
rg, fd, git, sed)
- Loads config from
.codedb/config.toml (repo) > ~/.config/devswarm/config.toml (global) > defaults
Returns:
const ProviderSet = struct {
has_claude: bool,
has_codex: bool,
has_local: bool, // future: ollama etc.
config: ProviderConfig, // parsed from config.toml
tools: ToolAvailability, // which file I/O tools are available
};
const ToolAvailability = struct {
search: enum { zigrep, rg, grep },
read: enum { zigread, cat },
edit: enum { zigpatch, sed },
diff: enum { zigdiff, git_diff, diff },
find: enum { zigrep_f, fd, find },
batch: enum { zigpar, sequential },
};
No preferredBackend() — that decision belongs to resolve().
Depends on
Parent: #257 — Layer 0 (Plumbing)
What
ProviderSet.detect(alloc)probes the environment and reports what's available. Detection only — no preferences, no routing decisions.Probes:
claude,codexbinarieszigrep,zigread,zigpatch, etc.)rg,fd,git,sed).codedb/config.toml(repo) >~/.config/devswarm/config.toml(global) > defaultsReturns:
No
preferredBackend()— that decision belongs toresolve().Depends on