Documentation
¶
Overview ¶
Package codebuddy provides the built-in Driver implementation for the CodeBuddy CLI.
Construct a configured driver with Driver and pass it to adaptor.New:
agent := adaptor.New(codebuddy.Driver(codebuddy.Config{
Model: "claude-sonnet-5",
}))
Driver snapshots its configuration without performing environment I/O. Configuration validation and CLI availability checks occur when the agent runs or is inspected.
Index ¶
Constants ¶
const DriverType = "codebuddy"
DriverType is the stable descriptor type for the built-in CodeBuddy driver.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonConfig ¶
type CommonConfig = driver.CommonConfig
CommonConfig carries the provider-independent CLI and process defaults embedded by Config: command, cwd, env, instructions, prompt templates, workspace strategy/runtime, timeouts, and extra args.
type Config ¶
type Config struct {
CommonConfig
// Model selects the CodeBuddy model. Empty uses the driver's default.
Model string
// Effort overrides the CodeBuddy reasoning effort.
Effort ThinkingEffort
// PermissionMode selects the CodeBuddy headless permission policy.
PermissionMode PermissionMode
// MaxTurnsPerRun limits agent turns within one invocation. Zero uses the CLI default.
MaxTurnsPerRun int
}
Config configures the CodeBuddy driver. PermissionMode is the CodeBuddy headless permission mode; when empty the driver derives it from the run policy. MaxTurnsPerRun limits one invocation, not the lifetime of a resumable thread.
type PermissionMode ¶
type PermissionMode string
PermissionMode is the CodeBuddy `--permission-mode` flag value.
const ( // PermissionUnset lets the driver derive the mode from run policy. PermissionUnset PermissionMode = "" // PermissionDefault prompts on first use of each tool. PermissionDefault PermissionMode = "default" // PermissionAcceptEdits auto-accepts file edit permissions. PermissionAcceptEdits PermissionMode = "acceptEdits" // PermissionPlan restricts the agent to analysis / planning. PermissionPlan PermissionMode = "plan" // PermissionAuto lets an AI classifier auto-approve safe actions. PermissionAuto PermissionMode = "auto" // PermissionDontAsk runs pre-approved actions and denies the rest. PermissionDontAsk PermissionMode = "dontAsk" // PermissionBypass skips all permission prompts. PermissionBypass PermissionMode = "bypassPermissions" )
type ThinkingEffort ¶
type ThinkingEffort string
ThinkingEffort is the CodeBuddy reasoning effort value: "minimal", "low", "medium", "high", "xhigh", or "max". The empty value leaves the CLI default in place.