claude

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package claude provides the built-in Driver implementation for the Claude Code CLI.

Construct a configured driver with Driver and pass it to adaptor.New:

agent := adaptor.New(claude.Driver(claude.Config{
	Model: "claude-sonnet-4",
}))

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

View Source
const DriverType = "claude"

DriverType is the stable descriptor type for the built-in Claude driver.

Variables

This section is empty.

Functions

func Driver

func Driver(cfg Config) driver.Driver

Driver returns the Claude driver with cfg captured at construction. Pass the result to adaptor.New. Validation remains deferred to run/probe time; construction only snapshots configuration and performs no environment I/O.

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 Claude model. Empty uses the driver's default.
	Model string
	// Effort overrides the Claude thinking effort. Empty uses the CLI default.
	Effort ThinkingEffort
	// MaxTurnsPerRun limits agent turns within one invocation. Zero uses the CLI default.
	MaxTurnsPerRun int
}

Config configures the Claude driver. CommonConfig controls process, profile, and workspace defaults. Model, Effort, and MaxTurnsPerRun control provider-specific execution settings.

type ThinkingEffort

type ThinkingEffort string

ThinkingEffort is the Claude thinking effort flag value ("low", "medium", "high"). The empty value leaves the CLI default in place.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL