provider

import "github.com/jbcom/radioactive-ralph/internal/provider"

Package provider adapts configured CLI backends into radioactive_ralph’s provider-neutral worker execution contract.

Index

type Binding

Binding is one resolved provider selection after repo config, local overrides, and per-variant overrides have been applied.

type Binding struct {
    Name   string
    Config config.ProviderFile
}

func ResolveBinding

func ResolveBinding(cfg config.File, local config.Local, _ variant.Profile, fromConfig config.VariantFile) (Binding, error)

ResolveBinding picks the provider for one variant.

type ClaudeRunner

ClaudeRunner executes a single `claude -p` turn.

type ClaudeRunner struct{}

func (ClaudeRunner) Run

func (ClaudeRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)

Run shells out to the configured Claude CLI binding and returns the assistant text that accumulated before the result frame.

type CodexRunner

CodexRunner executes a single `codex exec` turn.

type CodexRunner struct{}

func (CodexRunner) Run

func (CodexRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)

Run executes one non-interactive Codex turn.

type GeminiRunner

GeminiRunner executes a single `gemini -p` turn.

type GeminiRunner struct{}

func (GeminiRunner) Run

func (GeminiRunner) Run(ctx context.Context, binding Binding, req Request) (Result, error)

Run executes one non-interactive Gemini turn.

type Request

Request is the provider-neutral execution contract for one worker turn.

type Request struct {
    WorkingDir   string
    SystemPrompt string
    UserPrompt   string
    OutputSchema string
    Model        variant.Model
    Effort       string
    AllowedTools []string
}

type Result

Result captures the observable output of one provider turn.

type Result struct {
    SessionID       string
    AssistantOutput string
}

type Runner

Runner executes one provider turn.

type Runner interface {
    Run(ctx context.Context, binding Binding, req Request) (Result, error)
}

func NewRunner

func NewRunner(binding Binding) (Runner, error)

NewRunner returns the runtime implementation for a provider type.

Generated by gomarkdoc