Documentation
¶
Index ¶
- func ClaudeVersion(path string) string
- func CodexVersion(path string) string
- func FindBinary(kind Kind) (string, error)
- func OpenCodeVersion(path string) string
- func ParseCodexJSONEvent(line []byte) map[string]any
- type AuthStatus
- type ClaudeRuntime
- func (r *ClaudeRuntime) AuthStatus() *AuthStatus
- func (r *ClaudeRuntime) BinaryPath() string
- func (r *ClaudeRuntime) DefaultModel(_ Phase) string
- func (r *ClaudeRuntime) Descriptor() Descriptor
- func (r *ClaudeRuntime) DisplayName() string
- func (r *ClaudeRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
- func (r *ClaudeRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, ...) (*Response, error)
- func (r *ClaudeRuntime) Kind() Kind
- func (r *ClaudeRuntime) RunInteractive(ctx context.Context, prompt string, opts InteractiveOpts, ...) (*Response, error)
- func (r *ClaudeRuntime) SuggestedModels() []ModelOption
- func (r *ClaudeRuntime) SupportsInteractive() bool
- func (r *ClaudeRuntime) Version() string
- type CodexRuntime
- func (r *CodexRuntime) AuthStatus() *AuthStatus
- func (r *CodexRuntime) BinaryPath() string
- func (r *CodexRuntime) DefaultModel(_ Phase) string
- func (r *CodexRuntime) Descriptor() Descriptor
- func (r *CodexRuntime) DisplayName() string
- func (r *CodexRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
- func (r *CodexRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, ...) (*Response, error)
- func (r *CodexRuntime) Kind() Kind
- func (r *CodexRuntime) RunInteractive(_ context.Context, _ string, _ InteractiveOpts, _ func(StreamEvent), ...) (*Response, error)
- func (r *CodexRuntime) SuggestedModels() []ModelOption
- func (r *CodexRuntime) SupportsInteractive() bool
- func (r *CodexRuntime) Version() string
- type Descriptor
- type GenerateOpts
- type InteractiveOpts
- type Kind
- type ModelOption
- type OpenCodeRuntime
- func (r *OpenCodeRuntime) AuthStatus() *AuthStatus
- func (r *OpenCodeRuntime) BinaryPath() string
- func (r *OpenCodeRuntime) DefaultModel(_ Phase) string
- func (r *OpenCodeRuntime) Descriptor() Descriptor
- func (r *OpenCodeRuntime) DisplayName() string
- func (r *OpenCodeRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
- func (r *OpenCodeRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, ...) (*Response, error)
- func (r *OpenCodeRuntime) Kind() Kind
- func (r *OpenCodeRuntime) RunInteractive(_ context.Context, _ string, _ InteractiveOpts, _ func(StreamEvent), ...) (*Response, error)
- func (r *OpenCodeRuntime) SuggestedModels() []ModelOption
- func (r *OpenCodeRuntime) SupportsInteractive() bool
- func (r *OpenCodeRuntime) Version() string
- type Phase
- type Response
- type Runtime
- type StreamEvent
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaudeVersion ¶
func CodexVersion ¶
func FindBinary ¶
func OpenCodeVersion ¶
func ParseCodexJSONEvent ¶
Types ¶
type AuthStatus ¶
func CheckClaudeAuth ¶
func CheckClaudeAuth(path string) *AuthStatus
func CheckCodexAuth ¶
func CheckCodexAuth(path string) *AuthStatus
func CheckOpenCodeAuth ¶
func CheckOpenCodeAuth(path string) *AuthStatus
type ClaudeRuntime ¶
type ClaudeRuntime struct {
// contains filtered or unexported fields
}
func NewClaude ¶
func NewClaude(path string) *ClaudeRuntime
func (*ClaudeRuntime) AuthStatus ¶
func (r *ClaudeRuntime) AuthStatus() *AuthStatus
func (*ClaudeRuntime) BinaryPath ¶
func (r *ClaudeRuntime) BinaryPath() string
func (*ClaudeRuntime) DefaultModel ¶
func (r *ClaudeRuntime) DefaultModel(_ Phase) string
func (*ClaudeRuntime) Descriptor ¶
func (r *ClaudeRuntime) Descriptor() Descriptor
func (*ClaudeRuntime) DisplayName ¶
func (r *ClaudeRuntime) DisplayName() string
func (*ClaudeRuntime) Generate ¶
func (r *ClaudeRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
func (*ClaudeRuntime) GenerateStreaming ¶
func (r *ClaudeRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, onEvent func(StreamEvent)) (*Response, error)
func (*ClaudeRuntime) Kind ¶
func (r *ClaudeRuntime) Kind() Kind
func (*ClaudeRuntime) RunInteractive ¶
func (r *ClaudeRuntime) RunInteractive(ctx context.Context, prompt string, opts InteractiveOpts, onEvent func(StreamEvent), onQuestion func(question string) string) (*Response, error)
func (*ClaudeRuntime) SuggestedModels ¶
func (r *ClaudeRuntime) SuggestedModels() []ModelOption
func (*ClaudeRuntime) SupportsInteractive ¶
func (r *ClaudeRuntime) SupportsInteractive() bool
func (*ClaudeRuntime) Version ¶
func (r *ClaudeRuntime) Version() string
type CodexRuntime ¶
type CodexRuntime struct {
// contains filtered or unexported fields
}
func NewCodex ¶
func NewCodex(path string) *CodexRuntime
func (*CodexRuntime) AuthStatus ¶
func (r *CodexRuntime) AuthStatus() *AuthStatus
func (*CodexRuntime) BinaryPath ¶
func (r *CodexRuntime) BinaryPath() string
func (*CodexRuntime) DefaultModel ¶
func (r *CodexRuntime) DefaultModel(_ Phase) string
func (*CodexRuntime) Descriptor ¶
func (r *CodexRuntime) Descriptor() Descriptor
func (*CodexRuntime) DisplayName ¶
func (r *CodexRuntime) DisplayName() string
func (*CodexRuntime) Generate ¶
func (r *CodexRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
func (*CodexRuntime) GenerateStreaming ¶
func (r *CodexRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, onEvent func(StreamEvent)) (*Response, error)
func (*CodexRuntime) Kind ¶
func (r *CodexRuntime) Kind() Kind
func (*CodexRuntime) RunInteractive ¶
func (r *CodexRuntime) RunInteractive(_ context.Context, _ string, _ InteractiveOpts, _ func(StreamEvent), _ func(question string) string) (*Response, error)
func (*CodexRuntime) SuggestedModels ¶
func (r *CodexRuntime) SuggestedModels() []ModelOption
func (*CodexRuntime) SupportsInteractive ¶
func (r *CodexRuntime) SupportsInteractive() bool
func (*CodexRuntime) Version ¶
func (r *CodexRuntime) Version() string
type Descriptor ¶
type Descriptor struct {
Kind Kind
DisplayName string
BinaryName string
InstallCommand string
SetupHint string
SupportsInteractive bool
}
func AllDescriptors ¶
func AllDescriptors() []Descriptor
func DescriptorForKind ¶
func DescriptorForKind(kind Kind) Descriptor
type GenerateOpts ¶
type GenerateOpts = claude.GenerateOpts
type InteractiveOpts ¶
type InteractiveOpts = claude.InteractiveOpts
type Kind ¶
type Kind string
func FirstInstalledKind ¶
func NormalizeKind ¶
func SupportedKinds ¶
func SupportedKinds() []Kind
type ModelOption ¶
func MergeModelOptions ¶
func MergeModelOptions(groups ...[]ModelOption) []ModelOption
type OpenCodeRuntime ¶
type OpenCodeRuntime struct {
// contains filtered or unexported fields
}
func NewOpenCode ¶
func NewOpenCode(path string) *OpenCodeRuntime
func (*OpenCodeRuntime) AuthStatus ¶
func (r *OpenCodeRuntime) AuthStatus() *AuthStatus
func (*OpenCodeRuntime) BinaryPath ¶
func (r *OpenCodeRuntime) BinaryPath() string
func (*OpenCodeRuntime) DefaultModel ¶
func (r *OpenCodeRuntime) DefaultModel(_ Phase) string
func (*OpenCodeRuntime) Descriptor ¶
func (r *OpenCodeRuntime) Descriptor() Descriptor
func (*OpenCodeRuntime) DisplayName ¶
func (r *OpenCodeRuntime) DisplayName() string
func (*OpenCodeRuntime) Generate ¶
func (r *OpenCodeRuntime) Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
func (*OpenCodeRuntime) GenerateStreaming ¶
func (r *OpenCodeRuntime) GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, onEvent func(StreamEvent)) (*Response, error)
func (*OpenCodeRuntime) Kind ¶
func (r *OpenCodeRuntime) Kind() Kind
func (*OpenCodeRuntime) RunInteractive ¶
func (r *OpenCodeRuntime) RunInteractive(_ context.Context, _ string, _ InteractiveOpts, _ func(StreamEvent), _ func(question string) string) (*Response, error)
func (*OpenCodeRuntime) SuggestedModels ¶
func (r *OpenCodeRuntime) SuggestedModels() []ModelOption
func (*OpenCodeRuntime) SupportsInteractive ¶
func (r *OpenCodeRuntime) SupportsInteractive() bool
func (*OpenCodeRuntime) Version ¶
func (r *OpenCodeRuntime) Version() string
type Runtime ¶
type Runtime interface {
Kind() Kind
DisplayName() string
Descriptor() Descriptor
BinaryPath() string
Version() string
AuthStatus() *AuthStatus
DefaultModel(phase Phase) string
SuggestedModels() []ModelOption
SupportsInteractive() bool
GenerateStreaming(ctx context.Context, userMessage string, opts GenerateOpts, onEvent func(StreamEvent)) (*Response, error)
Generate(ctx context.Context, userMessage string, opts GenerateOpts) (*Response, error)
RunInteractive(ctx context.Context, prompt string, opts InteractiveOpts, onEvent func(StreamEvent), onQuestion func(question string) string) (*Response, error)
}
type StreamEvent ¶
type StreamEvent = claude.StreamEvent
Click to show internal directories.
Click to hide internal directories.