opencode

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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