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

rpcplatform

package
v0.4.45 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, deps Deps) (agentkit.Platform, error)

New registers platform/rpc: stdio Pi RPC for a harness that already speaks Pi blocks.

Types

type Config

type Config struct {
	// SessionFile is the --session path. Its basename (without .jsonl) is the Pi session id.
	SessionFile string `json:"sessionFile"`
	// Model is the initial model id.
	Model string `json:"model"`
	// ModelProvider is config.modelProvider. set_model rejects any other provider.
	ModelProvider string `json:"modelProvider"`
	// BaseURL is config.baseUrl, echoed on get_state.
	BaseURL string `json:"baseUrl"`
	// WireAPI is config.wireApi, echoed as model.api.
	WireAPI string `json:"wireApi"`
	// AllowedModels lists model ids set_model may select, besides Model.
	// An empty map allows only Model.
	AllowedModels map[string]json.RawMessage `json:"allowedModels,omitempty"`
}

Config is the Pi RPC session Centaur already knows about. Model and provider are echoed on get_state and checked on set_model.

type Deps

type Deps struct {
	SessionStore agentkit.SessionStore `json:"sessionStore,omitempty"`
}

Deps holds optional capabilities. SessionStore is used when it implements SessionRuntimeStore, so set_model writes the same bind as /model.

type Platform

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

Platform speaks Centaur Pi RPC on stdin/stdout. stdout is protocol only. Logs go to stderr.

func (*Platform) PermissionCapability

func (p *Platform) PermissionCapability() permission.Capability

func (*Platform) PlatformID

func (p *Platform) PlatformID() string

func (*Platform) Receive

func (p *Platform) Receive(ctx context.Context) (agentkit.MessageEvent, error)

func (*Platform) Send

func (p *Platform) Send(ctx context.Context, event agentkit.OutboundEvent) error

Jump to

Keyboard shortcuts

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