Help us shape the future of Go! Take the 2026 Go Developer Survey

opencode

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Agent

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

func (*Agent) Cancel

func (a *Agent) Cancel(_ context.Context, t transport.Transport, sessionID string)

func (*Agent) InitializeParams

func (a *Agent) InitializeParams() map[string]any

func (*Agent) Name

func (a *Agent) Name() string

func (*Agent) Open

func (*Agent) PromptParams

func (a *Agent) PromptParams(sessionID, input string, _ string) map[string]any

func (*Agent) SelectSessionModel

func (a *Agent) SelectSessionModel(ctx context.Context, t transport.Transport, sessionID, modelID string, _ []agentspi.ConfigOption) ([]agentspi.ConfigOption, error)

SelectSessionModel applies the model by setting opencode's "model" config option via session/set_config_option. This is the spec-blessed path (ACP has no session/set_model); verified against the real opencode binary.

func (*Agent) SessionListParams

func (a *Agent) SessionListParams(cwd, cursor string) map[string]any

func (*Agent) SessionLoadParams

func (a *Agent) SessionLoadParams(sessionID string) map[string]any

func (*Agent) SessionNewParams

func (a *Agent) SessionNewParams(string) map[string]any

SessionNewParams omits model selection: ACP defines no model field on session/new and no session/set_model method. Per-session model selection, if ever supported, must go through the SessionModelSelector capability.

Jump to

Keyboard shortcuts

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