Documentation
¶
Overview ¶
Package buzzagent adapts Go handlers to the Agent Client Protocol used by buzz-acp. It deliberately has no relay, model-framework, or infrastructure dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIPublisher ¶
type CLIPublisher struct {
// contains filtered or unexported fields
}
CLIPublisher publishes replies through the official Buzz command-line client. It does not implement or connect to the relay protocol itself.
func NewCLIPublisher ¶
func NewCLIPublisher(command string) (*CLIPublisher, error)
NewCLIPublisher creates a Publisher that executes command.
func (*CLIPublisher) Publish ¶
func (p *CLIPublisher) Publish(ctx context.Context, target ReplyTarget, content string) error
Publish sends content as a reply to target.
type Handler ¶
Handler processes Buzz turns. Implementations own all model, tool, prompt, and application behavior.
type HandlerFunc ¶
HandlerFunc adapts a function to Handler.
func (HandlerFunc) HandleTurn ¶
HandleTurn calls f(ctx, turn).
type Options ¶
type Options struct {
Name string
Version string
Handler Handler
WorkingMessage func(Turn) string
Publisher Publisher
Logger *slog.Logger
}
Options configures an ACP agent connection.
type Publisher ¶
type Publisher interface {
Publish(context.Context, ReplyTarget, string) error
}
Publisher sends a response to a validated Buzz reply target.
type ReplyTarget ¶
ReplyTarget identifies the channel event to which a response belongs.
type Response ¶
Response is the result of handling a Turn. Publish must be set explicitly when Text should also be sent as a Buzz reply.
type Tool ¶
type Tool struct {
// Name is the namespaced tool name: "<serverName>_<toolName>".
Name string
// Description is the human-readable tool description from the MCP server.
Description string
// InputSchema is the JSON Schema object describing the tool's arguments.
InputSchema map[string]any
// Call invokes the tool with a JSON-encoded argument object and returns
// the tool's text output. A tool-level error (isError) is returned as an
// error with the tool's own message.
Call func(ctx context.Context, input json.RawMessage) (string, error)
}
Tool is a framework-neutral handle to a tool exposed by an MCP server that the ACP client attached to a session via session/new.
type Turn ¶
type Turn struct {
SessionID string
RawPrompt string
Text string
Replyable bool
// Tools are the namespaced MCP tools attached to this turn's session by the
// ACP client (session/new mcpServers). Empty when the session has no MCP
// servers. Consumers decide which tools to expose to their model.
Tools []Tool
}
Turn is one normalized request delivered by buzz-acp.