Documentation
¶
Overview ¶
internal/claude/invoker.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
Invoker spawns Claude CLI processes. It is stateless and safe for concurrent use.
func NewInvoker ¶
NewInvoker creates an Invoker. mcpBaseURL is joined with "/mcp/sse".
func (*Invoker) Run ¶
func (inv *Invoker) Run(ctx context.Context, workDir, prompt string, opts RunOptions) (*Process, <-chan Output, error)
Run starts a Claude CLI process and returns a Process handle and an output channel. The channel is closed after the process exits; the last message is OutputDone or OutputError.
type Output ¶
type Output struct {
Type OutputType `json:"type"`
Content string `json:"content"`
}
Output is a single output event from a Claude CLI process.
type OutputType ¶
type OutputType string
OutputType classifies a line of output from a Claude CLI process.
const ( OutputStdout OutputType = "stdout" OutputStderr OutputType = "stderr" OutputDone OutputType = "done" OutputError OutputType = "error" )
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process represents a running Claude CLI invocation.
type RunOptions ¶
RunOptions controls session behaviour for a Claude CLI invocation.