opencodeacp

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ProbePrompt = "List the files in this directory and exit."

Variables

This section is empty.

Functions

func New

func New() runtime.Provider

func NewWithOptions added in v0.1.0

func NewWithOptions(opts runtime.StartOptions) runtime.Provider

func ParseTranscriptEvent added in v0.1.0

func ParseTranscriptEvent(line []byte) (events.Event, error)

ParseTranscriptEvent maps either a raw ACP JSON-RPC line or an already normalized Avenor event line into an Event.

func RunProbe added in v0.1.0

func RunProbe(ctx context.Context, dir string) ([]events.Event, error)

func RunProbeWithPrompt added in v0.1.0

func RunProbeWithPrompt(ctx context.Context, dir, prompt string) ([]events.Event, error)

Types

type Client added in v0.1.0

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

func NewClient added in v0.1.0

func NewClient(ctx context.Context, dir string) (*Client, error)

func NewClientWithOptions added in v0.1.0

func NewClientWithOptions(ctx context.Context, opts ClientOptions) (*Client, error)

func (*Client) Close added in v0.1.0

func (c *Client) Close() error

func (*Client) Events added in v0.1.0

func (c *Client) Events() <-chan events.Event

func (*Client) Initialize added in v0.1.0

func (c *Client) Initialize(ctx context.Context) (json.RawMessage, error)

func (*Client) LoadSession added in v0.1.0

func (c *Client) LoadSession(ctx context.Context, sessionID string) (*Session, error)

func (*Client) NewSession added in v0.1.0

func (c *Client) NewSession(ctx context.Context) (*Session, error)

func (*Client) ResumeSession added in v0.1.0

func (c *Client) ResumeSession(ctx context.Context, sessionID string) (*Session, error)

func (*Client) SetSessionMode added in v0.8.1

func (c *Client) SetSessionMode(ctx context.Context, sessionID string, modeID string) error

func (*Client) SetSessionModel added in v0.8.1

func (c *Client) SetSessionModel(ctx context.Context, sessionID string, modelID string) error

type ClientOptions added in v0.1.0

type ClientOptions struct {
	Dir                  string
	AutoAnswerPermission bool
}

type Provider

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

Provider implements runtime.Provider for opencode's ACP stdio transport.

func (*Provider) AnswerPermission

func (p *Provider) AnswerPermission(ctx context.Context, sessionID string, requestID string, response runtime.PermissionResponse) error

func (*Provider) Cancel

func (p *Provider) Cancel(ctx context.Context, sessionID string) error

func (*Provider) Capabilities

func (p *Provider) Capabilities(ctx context.Context) (runtime.Capabilities, error)

func (*Provider) Close added in v0.1.0

func (p *Provider) Close() error

func (*Provider) Events

func (p *Provider) Events(ctx context.Context, sessionID string) (<-chan events.Event, error)

func (*Provider) Prompt

func (p *Provider) Prompt(ctx context.Context, sessionID string, prompt string) error

func (*Provider) Resume

func (p *Provider) Resume(ctx context.Context, sessionID string) (runtime.Session, error)

func (*Provider) Start

type Session added in v0.1.0

type Session struct {
	Client    *Client
	SessionID string
}

func (*Session) Cancel added in v0.1.0

func (s *Session) Cancel() error

func (*Session) Close added in v0.1.0

func (s *Session) Close(ctx context.Context) error

func (*Session) Prompt added in v0.1.0

func (s *Session) Prompt(ctx context.Context, prompt string) (events.Event, error)

Jump to

Keyboard shortcuts

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