MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / Provider

Interface Provider

internal/loop/provider.go:10–20  ·  view source on GitHub ↗

Provider is the interface for an agent CLI (e.g. Claude, Codex). Implementations live in internal/agent to avoid import cycles.

Source from the content-addressed store, hash-verified

8// Provider is the interface for an agent CLI (e.g. Claude, Codex).
9// Implementations live in internal/agent to avoid import cycles.
10type Provider interface {
11 Name() string
12 CLIPath() string
13 LoopCommand(ctx context.Context, prompt, workDir string) *exec.Cmd
14 InteractiveCommand(workDir, prompt string) *exec.Cmd
15 // CleanOutput extracts JSON from the provider's output format (e.g., NDJSON).
16 // Returns the original output if no cleaning needed.
17 CleanOutput(output string) string
18 ParseLine(line string) *Event
19 LogFileName() string
20}

Callers 19

RefreshMethod · 0.65
RefreshMethod · 0.65
DetectOrphanedWorktreesFunction · 0.65
RunNewFunction · 0.65
RunListFunction · 0.65
RunEditFunction · 0.65
runIterationWithRetryMethod · 0.65
runIterationMethod · 0.65
TestResolve_priorityFunction · 0.65
TestResolve_envFunction · 0.65
TestResolve_opencodeFunction · 0.65
TestResolve_cursorFunction · 0.65

Implementers 5

mockProviderinternal/loop/loop_test.go
ClaudeProviderinternal/agent/claude.go
OpenCodeProviderinternal/agent/opencode.go
CodexProviderinternal/agent/codex.go
CursorProviderinternal/agent/cursor.go

Calls

no outgoing calls

Tested by

no test coverage detected