bridge

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package bridge runs a localhost MCP server that agent processes connect to. It provides send_file (so agents can send files to the chat) and approve (Claude Code's --permission-prompt-tool).

Index

Constants

View Source
const Name = "pocketagent"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

func Start

func Start(host string) (*Bridge, error)

Start listens on 127.0.0.1. host is the hostname agents use to reach it ("127.0.0.1" normally, "host.docker.internal" for sandboxed agents).

func (*Bridge) Register

func (b *Bridge) Register(conv string, ep *Endpoint) (unregister func())

Register exposes ep to the agent running for conv until the returned function is called.

func (*Bridge) Server

func (b *Bridge) Server(conv string) *agent.MCPServer

Server describes how the agent for conv connects to the bridge.

type Endpoint

type Endpoint struct {
	Handler  agent.Handler
	SendFile func(ctx context.Context, path, caption string) error
}

Endpoint is what a conversation exposes to its agent while a turn runs.

Jump to

Keyboard shortcuts

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