Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyMiddleware ¶
func APIKeyMiddleware(key string) gin.HandlerFunc
APIKeyMiddleware returns a Gin middleware that requires X-API-Key header or api_key query param to match key.
func ToolSchemas ¶
func ToolSchemas() []toolSchema
ToolSchemas returns the JSON Schema definitions for all Bee MCP tools. Exported so tests can verify the count and structure.
func WorkerToolSchemas ¶ added in v0.0.10
func WorkerToolSchemas() []toolSchema
WorkerToolSchemas returns the JSON Schema definitions for Worker MCP tools.
Types ¶
type ExecutionStopper ¶
ExecutionStopper can kill a running worker process by execution ID.
type MCPServer ¶
type MCPServer struct {
// contains filtered or unexported fields
}
MCPServer manages SSE sessions and dispatches JSON-RPC tool calls.
func NewBeeServer ¶ added in v0.0.10
func NewBeeServer( ws *store.WorkerStore, mgr *worker.Manager, ts *store.TaskStore, ms *store.MessageStore, senders map[string]platform.PlatformSenderAdapter, execStopper ExecutionStopper, sessionClearer SessionClearer, es *store.ExecutionStore, memStore *store.MemoryStore, sessionStore *store.SessionStore, ) *MCPServer
NewBeeServer creates a Bee MCP Server with all tools.
func NewWorkerServer ¶ added in v0.0.10
func NewWorkerServer( ts *store.TaskStore, ms *store.MessageStore, senders map[string]platform.PlatformSenderAdapter, memStore *store.MemoryStore, ) *MCPServer
NewWorkerServer creates a Worker MCP Server with a restricted tool set.
func (*MCPServer) CallTool ¶
CallTool is exported for testing. Production code uses callToolFn via handleToolCall.
func (*MCPServer) HandleMessages ¶ added in v0.0.8
handleMessages receives a JSON-RPC request and pushes the response to the SSE channel.
type SessionClearer ¶
type SessionClearer interface {
ClearSession(sessionKey string)
}
SessionClearer clears dispatcher queues and session contexts for a session.