Documentation
¶
Overview ¶
Package mcpserve runs icebath as a stdio MCP server over the messaging conversations, optionally with icebath tools
Index ¶
- Constants
- Variables
- func CreateServer(ctx context.Context, bridge *EventBridge, includeTools bool, in io.Reader, ...) (*provider.MCPToolServer, error)
- func RunServer(ctx context.Context, verbose, includeTools, acceptHooks bool) (code int)
- type EventBridge
- func (b *EventBridge) ListPendingApprovals() []any
- func (b *EventBridge) PollEvents(afterCursor int64, sessionKey string, limit int64) *jsonutil.Object
- func (b *EventBridge) RespondToApproval(approvalID, decision string) *jsonutil.Object
- func (b *EventBridge) Start()
- func (b *EventBridge) Stop()
- func (b *EventBridge) WaitForEvent(afterCursor int64, sessionKey string, timeoutMs int64) any
- type QueueEvent
Constants ¶
const QueueLimit = 1000
Events the bridge queue keeps, the oldest dropped past it
const ServerName = "icebath"
MCP server name clients see in the initialize reply
Variables ¶
var ExposedTools = []string{
"web_search", "web_extract",
"browser_navigate", "browser_click", "browser_type", "browser_press", "browser_snapshot", "browser_scroll",
"browser_back", "browser_get_images", "browser_console", "browser_vision",
"vision_analyze", "image_generate", "skill_view", "skills_list", "text_to_speech",
}
Fixed allowlist --tools offers, never terminal, file, code execution, process, kanban or delegation tools
Functions ¶
func CreateServer ¶
func CreateServer(ctx context.Context, bridge *EventBridge, includeTools bool, in io.Reader, out io.Writer) (*provider.MCPToolServer, error)
MCP server with every bridge tool and, with includeTools, the curated icebath tools after them
Types ¶
type EventBridge ¶
type EventBridge struct {
// contains filtered or unexported fields
}
Poller of state.db feeding new conversation messages into an in memory event queue that waiters block on
func NewEventBridge ¶
func NewEventBridge(ctx context.Context) *EventBridge
Stopped bridge over the state.db of the home ctx names
func (*EventBridge) ListPendingApprovals ¶
func (b *EventBridge) ListPendingApprovals() []any
Approval requests seen this session ordered by creation time
func (*EventBridge) PollEvents ¶
func (b *EventBridge) PollEvents(afterCursor int64, sessionKey string, limit int64) *jsonutil.Object
Events since afterCursor and the cursor to poll from next
func (*EventBridge) RespondToApproval ¶
func (b *EventBridge) RespondToApproval(approvalID, decision string) *jsonutil.Object
Resolves a pending approval and queues its resolution event
func (*EventBridge) Start ¶
func (b *EventBridge) Start()
Baselines existing history without emitting it, then polls in the background
func (*EventBridge) Stop ¶
func (b *EventBridge) Stop()
Ends the polling loop, wakes every waiter and closes the version gate
func (*EventBridge) WaitForEvent ¶
func (b *EventBridge) WaitForEvent(afterCursor int64, sessionKey string, timeoutMs int64) any
Blocks until a matching event arrives or the timeout expires, nil on timeout