Documentation
¶
Overview ¶
Package claude 将 Claude Code 适配到 Leros 外部 CLI 引擎接口。
Package claude provides the Claude Code Runtime.
Index ¶
Constants ¶
View Source
const (
// Kind is the canonical runtime kind for Claude Code.
Kind = "claude"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter 通过 Claude Code 执行提示。
func NewAdapter ¶
NewAdapter 创建 Claude Code 引擎适配器。
func (*Adapter) GetSkillDir ¶
GetSkillDir returns the skill directory path for Claude Code.
func (*Adapter) Invoke ¶
func (a *Adapter) Invoke(ctx context.Context, req externalcli.InvocationRequest) (*externalcli.Invocation, error)
Invoke starts Claude Code and returns its process activity stream.
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
Invoker 启动外部 CLI 进程。
func NewInvoker ¶
NewInvoker 创建 CLI 调用器。
func (*Invoker) Invoke ¶
func (inv *Invoker) Invoke(ctx context.Context, req externalcli.InvocationRequest) (*externalcli.Invocation, error)
Invoke starts the CLI process and converts stdout/stderr into provider events.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime executes requests through Claude Code.
func New ¶
func New(binary string, options externalcli.DriverOptions) (*Runtime, error)
New creates a Claude Runtime backed by the configured CLI binary.
func NewWithInvoker ¶
func NewWithInvoker(invoker externalcli.Invoker, options externalcli.DriverOptions) (*Runtime, error)
NewWithInvoker creates a Claude Runtime with an injected process invoker.
Click to show internal directories.
Click to hide internal directories.