acp

package
v2026.1121.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateContent

func ValidateContent(blocks []Content) error

Types

type ConfigRunner

type ConfigRunner interface {
	Configure(context.Context, string, string) error
	Configuration() map[string]any
}

type Content

type Content struct {
	Type     string `json:"type"`
	Text     string `json:"text,omitempty"`
	Data     string `json:"data,omitempty"`
	MimeType string `json:"mimeType,omitempty"`
	URI      string `json:"uri,omitempty"`
	Name     string `json:"name,omitempty"`
	Resource *struct {
		URI      string `json:"uri"`
		Text     string `json:"text"`
		Blob     string `json:"blob"`
		MimeType string `json:"mimeType"`
	} `json:"resource,omitempty"`
}

func (*Content) UnmarshalJSON

func (c *Content) UnmarshalJSON(data []byte) error

type Error

type Error struct {
	Code    int
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type Factory

type Factory func(context.Context, string, []json.RawMessage) (Runner, error)

type MCPServer

type MCPServer struct {
	Name    string       `json:"name"`
	Type    string       `json:"type"`
	Command string       `json:"command"`
	Args    []string     `json:"args"`
	Env     []NamedValue `json:"env"`
	URL     string       `json:"url"`
	Headers []NamedValue `json:"headers"`
}

func ParseMCP

func ParseMCP(raw []json.RawMessage) ([]MCPServer, error)

type NamedValue

type NamedValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type RichRunner

type RichRunner interface {
	PromptContent(context.Context, []Content, func(Update)) error
}

type Runner

type Runner interface {
	Prompt(context.Context, string, func(Update)) error
	Close() error
}

type Server

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

func New

func New(out io.Writer, factory Factory) *Server

func (*Server) CloseStorage added in v2026.1121.0

func (s *Server) CloseStorage()

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, in io.Reader) error

func (*Server) SetDatabaseStorage added in v2026.1121.0

func (s *Server) SetDatabaseStorage(ctx context.Context, home string) error

func (*Server) SetStorage

func (s *Server) SetStorage(dir string) error

func (*Server) SetVersion

func (s *Server) SetVersion(version string)

type StateRunner

type StateRunner interface {
	Snapshot() (json.RawMessage, error)
	Restore(json.RawMessage) error
}

type Update

type Update map[string]any

Jump to

Keyboard shortcuts

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