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

acp

package
v0.0.205 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeStdio

func ServeStdio(ctx context.Context, agent Agent, logger *slog.Logger) error

Types

type Agent

type Agent interface {
	Info() AgentInfo
	Authenticate(ctx AuthenticateRequest) error
	NewSession(req NewSessionRequest) (SessionID, error)
	ResumeSession(req ResumeSessionRequest) error
	ListSessions(req ListSessionsRequest) (ListSessionsResponse, error)
	CloseSession(req CloseSessionRequest) error
	CancelSession(req CancelSessionRequest) error
	Prompt(req PromptRequest, onUpdate func(SessionUpdate)) error
}

type AgentInfo

type AgentInfo struct {
	Name    string
	Version string
}

type AuthenticateRequest

type AuthenticateRequest struct {
	Token string
}

type CancelSessionRequest

type CancelSessionRequest struct {
	SessionID SessionID
}

type CloseSessionRequest

type CloseSessionRequest struct {
	SessionID SessionID
}

type ListSessionsRequest

type ListSessionsRequest struct {
	Cwd    string
	Cursor string
}

type ListSessionsResponse

type ListSessionsResponse struct {
	Sessions   []SessionInfo
	NextCursor string
}

type NewSessionRequest

type NewSessionRequest struct {
	Cwd  string
	Meta map[string]any
}

type PromptRequest

type PromptRequest struct {
	SessionID SessionID
	Content   string
	Meta      map[string]any
}

type ResumeSessionRequest

type ResumeSessionRequest struct {
	SessionID SessionID
	Cwd       string
	Meta      map[string]any
}

type SessionID

type SessionID string

type SessionInfo

type SessionInfo struct {
	SessionID SessionID
	Cwd       string
	Title     string
	UpdatedAt string
}

type SessionUpdate

type SessionUpdate struct {
	Text     string
	Done     bool
	ToolCall *ToolCallUpdate
	Error    string
}

type ToolCallUpdate

type ToolCallUpdate struct {
	ID      string
	Tool    string
	Status  string
	Summary string
	Output  string
	Error   string
}

Jump to

Keyboard shortcuts

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