agent

package
v0.6.75 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option is a function that configures an MCP server instance

func WithConsoleAIProxy added in v0.6.72

func WithConsoleAIProxy(upstreamURL string, token func() string) Option

WithConsoleAIProxy registers a local reverse proxy to the Console AI proxy that authenticates with the deploy token, so the agent never holds it.

func WithConsoleExtProxy added in v0.6.72

func WithConsoleExtProxy(upstreamURL string, token func() string, agentRunID string) Option

WithConsoleExtProxy registers a local reverse proxy to the Console ext API that authenticates with the deploy token, so the harness container never holds it. Only the harness's own operations on this agent run are let through.

func WithOpenAIProxy added in v0.6.46

func WithOpenAIProxy(chatCompletionsURL, responsesURL string, token func() string) Option

WithOpenAIProxy registers local OpenAI chat completion and responses endpoints that convert streaming client requests into non-streaming upstream calls, authenticating with the deploy token instead of the caller's.

func WithRunEvents added in v0.6.73

func WithRunEvents(consoleURL string, token func() string, agentRunID string) Option

WithRunEvents subscribes to this agent run's status deltas with the deploy token and serves them to the harness as a local long-poll.

func WithTool

func WithTool(tool tool.Tool) Option

WithTool registers a tool with the MCP server

func WithTools

func WithTools() Option

WithTools enables the MCP server to support tools

func WithVersion

func WithVersion(version string) Option

WithVersion sets the MCP server version

func WithWorkbenchMCPProxy added in v0.6.67

func WithWorkbenchMCPProxy(upstreamURL string, token func() string) Option

WithWorkbenchMCPProxy registers a local reverse proxy that authenticates to the originating workbench with the agent run's short-lived user token.

type Server

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

Server wraps the mcp server with Plural credentials

func NewServer

func NewServer(client console.Client, options ...Option) *Server

NewServer creates a new MCP server instance

func (*Server) Shutdown added in v0.6.41

func (in *Server) Shutdown(ctx context.Context) error

Shutdown gracefully stops the MCP HTTP server.

func (*Server) Start

func (in *Server) Start(addr string) error

Start starts the MCP server with streamable HTTP transport

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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