opencode

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACPAdapter added in v1.0.0

type ACPAdapter struct {
	// contains filtered or unexported fields
}

func NewACPAdapter added in v1.0.0

func NewACPAdapter(cfg runtime.AdapterConfig) *ACPAdapter

func (*ACPAdapter) CreateSession added in v1.0.0

func (a *ACPAdapter) CreateSession(ctx context.Context) (string, error)

func (*ACPAdapter) Events added in v1.0.0

func (a *ACPAdapter) Events() <-chan runtime.Event

func (*ACPAdapter) IsHealthy added in v1.0.0

func (a *ACPAdapter) IsHealthy(ctx context.Context) bool

func (*ACPAdapter) ResumeSession added in v1.0.0

func (a *ACPAdapter) ResumeSession(ctx context.Context, sessionID string) (string, error)

func (*ACPAdapter) Runtime added in v1.0.0

func (a *ACPAdapter) Runtime() runtime.Runtime

func (*ACPAdapter) SendMessage added in v1.0.0

func (a *ACPAdapter) SendMessage(ctx context.Context, text string) error

func (*ACPAdapter) Start added in v1.0.0

func (a *ACPAdapter) Start(ctx context.Context) error

func (*ACPAdapter) Stop added in v1.0.0

func (a *ACPAdapter) Stop(ctx context.Context) error

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter communicates with OpenCode via its HTTP API server.

func New

func New(cfg runtime.AdapterConfig) *Adapter

New creates an OpenCode adapter.

func (*Adapter) CreateSession

func (a *Adapter) CreateSession(ctx context.Context) (string, error)

func (*Adapter) Events

func (a *Adapter) Events() <-chan runtime.Event

func (*Adapter) IsHealthy

func (a *Adapter) IsHealthy(ctx context.Context) bool

func (*Adapter) ReplyToQuestion

func (a *Adapter) ReplyToQuestion(ctx context.Context, requestID string, answers []string) error

ReplyToQuestion sends a reply to a pending question via OC REST API.

func (*Adapter) ResumeSession

func (a *Adapter) ResumeSession(_ context.Context, sessionID string) (string, error)

func (*Adapter) Runtime

func (a *Adapter) Runtime() runtime.Runtime

func (*Adapter) SendMessage

func (a *Adapter) SendMessage(ctx context.Context, text string) error

func (*Adapter) Start

func (a *Adapter) Start(ctx context.Context) error

func (*Adapter) Stop

func (a *Adapter) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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