Documentation
¶
Index ¶
- type Backend
- type BootstrapInput
- type ClaudeHooksBootstrap
- type ClaudeRuntime
- func (r ClaudeRuntime) Bootstrap(input BootstrapInput) error
- func (r ClaudeRuntime) ClearIterationArtifacts(sandboxName string) error
- func (ClaudeRuntime) ConfigDir() string
- func (ClaudeRuntime) EmitTranscriptErrors(w io.Writer, summaries []TranscriptError)
- func (r ClaudeRuntime) EnvExports() []string
- func (r ClaudeRuntime) ExtractDebugLog(sandboxName, localPath, debug string) error
- func (r ClaudeRuntime) ExtractTranscripts(sandboxName, agentLabel, outputDir string) error
- func (ClaudeRuntime) Name() string
- func (ClaudeRuntime) ParseTranscriptErrors(transcriptDir string) []TranscriptError
- func (ClaudeRuntime) Run(ctx context.Context, params RunParams, printer *ui.Printer, start time.Time, ...) (int, error)
- func (ClaudeRuntime) WorkspaceDir() string
- type RunMetrics
- type RunParams
- type Runtime
- type TranscriptError
- type TranscriptHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
Runtime
Transcripts TranscriptHandler
}
Backend pairs the active runtime with its transcript/debug artifact handler.
type BootstrapInput ¶
type BootstrapInput interface {
SandboxName() string
// AgentPath returns the local filesystem path to the agent definition file.
// For cached agents this may be a content-addressed path with a generic basename.
AgentPath() string
// AgentName returns the logical agent name (e.g. "review") used to construct
// the destination filename as {name}.md inside the sandbox. Populated from
// the CLI positional argument; must not be empty in production (enforced by
// cobra arg validation in cmd/fullsend).
AgentName() string
SkillDirs() []string
PluginDirs() []string
}
BootstrapInput is the portable contract every runtime needs to provision agent content into the sandbox. Implementations live outside this package (runner adapter, tests).
type ClaudeHooksBootstrap ¶
type ClaudeHooksBootstrap interface {
ClaudeSandboxHooks() security.ClaudeSandboxHooks
}
ClaudeHooksBootstrap is an optional extension for Claude Code sandbox tool hooks. ClaudeRuntime.Bootstrap type-asserts for this; other runtimes ignore it.
type ClaudeRuntime ¶
type ClaudeRuntime struct{}
ClaudeRuntime implements Runtime using the Claude Code CLI.
func (ClaudeRuntime) Bootstrap ¶
func (r ClaudeRuntime) Bootstrap(input BootstrapInput) error
func (ClaudeRuntime) ClearIterationArtifacts ¶
func (r ClaudeRuntime) ClearIterationArtifacts(sandboxName string) error
func (ClaudeRuntime) ConfigDir ¶
func (ClaudeRuntime) ConfigDir() string
func (ClaudeRuntime) EmitTranscriptErrors ¶
func (ClaudeRuntime) EmitTranscriptErrors(w io.Writer, summaries []TranscriptError)
func (ClaudeRuntime) EnvExports ¶
func (r ClaudeRuntime) EnvExports() []string
func (ClaudeRuntime) ExtractDebugLog ¶
func (r ClaudeRuntime) ExtractDebugLog(sandboxName, localPath, debug string) error
func (ClaudeRuntime) ExtractTranscripts ¶
func (r ClaudeRuntime) ExtractTranscripts(sandboxName, agentLabel, outputDir string) error
func (ClaudeRuntime) Name ¶
func (ClaudeRuntime) Name() string
func (ClaudeRuntime) ParseTranscriptErrors ¶
func (ClaudeRuntime) ParseTranscriptErrors(transcriptDir string) []TranscriptError
func (ClaudeRuntime) WorkspaceDir ¶
func (ClaudeRuntime) WorkspaceDir() string
type RunMetrics ¶
type RunMetrics struct {
ToolCalls atomic.Int32
NumTurns int `json:"num_turns"`
TotalCostUSD float64 `json:"total_cost_usd"`
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
}
RunMetrics collects execution statistics from stream parsing.
type RunParams ¶
type RunParams struct {
SandboxName string
AgentBaseName string
Model string
RepoDir string
PluginDirs []string
Debug string
Timeout time.Duration
OutputPath string // if set, tee stream-json stdout to this file
}
RunParams configures a single agent invocation inside the sandbox.
type Runtime ¶
type Runtime interface {
Name() string
ConfigDir() string
WorkspaceDir() string
EnvExports() []string
Bootstrap(input BootstrapInput) error
Run(ctx context.Context, params RunParams, printer *ui.Printer, start time.Time, metrics *RunMetrics) (exitCode int, err error)
ClearIterationArtifacts(sandboxName string) error
}
Runtime is an agent execution backend (LLM tool-use loop) inside the sandbox.
type TranscriptError ¶
TranscriptError holds extracted error information from a runtime transcript.
type TranscriptHandler ¶
type TranscriptHandler interface {
ExtractTranscripts(sandboxName, agentLabel, outputDir string) error
ExtractDebugLog(sandboxName, localPath, debug string) error
ParseTranscriptErrors(transcriptDir string) []TranscriptError
EmitTranscriptErrors(w io.Writer, summaries []TranscriptError)
}
TranscriptHandler extracts runtime conversation artifacts from the sandbox and surfaces errors in operator-facing logs (e.g. GitHub Actions annotations). Implementations are runtime-specific (Claude stream-json today).