Documentation
¶
Overview ¶
Package opencode implements ACP sessions with shared directional metadata and task-scoped MCP. ACP (Agent Client Protocol) uses JSON-RPC 2.0 over stdin/stdout.
Index ¶
- type Backend
- func (*Backend) AgentArgs(_ agent.HarnessArgs) []string
- func (*Backend) AttachRelay(ctx context.Context, opts *agent.Options) (*agent.Session, error)
- func (*Backend) FetchModelInventory(ctx context.Context, target runtime.ConnectionTarget, extraEnv []string) (agent.ModelInventory, error)
- func (*Backend) NewMetadataParser() agent.MessageParser
- func (*Backend) NewWire() agent.WireFormat
- func (*Backend) RecordHandshake(ctx context.Context, stdin io.Writer, stdout io.ReadCloser, ...) (io.Reader, error)
- func (b *Backend) SetModelInventory(inventory agent.ModelInventory)
- func (b *Backend) Start(ctx context.Context, opts *agent.Options) (session *agent.Session, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
Backend implements agent.Backend for OpenCode using the ACP JSON-RPC 2.0 protocol.
func (*Backend) AgentArgs ¶ added in v0.9.1
func (*Backend) AgentArgs(_ agent.HarnessArgs) []string
AgentArgs implements agent.Backend.
func (*Backend) AttachRelay ¶
AttachRelay connects after the owning record processor has replayed history.
func (*Backend) FetchModelInventory ¶ added in v0.11.3
func (*Backend) FetchModelInventory(ctx context.Context, target runtime.ConnectionTarget, extraEnv []string) (agent.ModelInventory, error)
FetchModelInventory implements agent.ModelFetcher.
func (*Backend) NewMetadataParser ¶ added in v0.15.0
func (*Backend) NewMetadataParser() agent.MessageParser
NewMetadataParser implements agent.Backend with an independent metadata projection.
func (*Backend) NewWire ¶ added in v0.9.1
func (*Backend) NewWire() agent.WireFormat
NewWire implements agent.Backend.
func (*Backend) RecordHandshake ¶ added in v0.9.1
func (*Backend) RecordHandshake(ctx context.Context, stdin io.Writer, stdout io.ReadCloser, opts *agent.Options) (io.Reader, error)
RecordHandshake performs ACP setup using the recording's continuous decoder.
func (*Backend) SetModelInventory ¶ added in v0.11.3
func (b *Backend) SetModelInventory(inventory agent.ModelInventory)
SetModelInventory implements agent.Backend, normalizing model names before storing them via the embedded Base (which owns the concurrency-safe storage).