agentconnect

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package agentconnect proxies browser traffic to a hosted agent sandbox.

It mirrors the MCP gateway's connect route: one stable Obot URL per instance, authorized by Obot, forwarding to an address only Obot knows. The sandbox is reachable at a cluster-internal address, so this is the only way a user reaches their agent, and the only place access is decided.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevRouter

type DevRouter interface {
	// DevRoute returns an address and transport for a backend sandbox ID. The
	// bool reports whether a route was available.
	DevRoute(backendID string) (string, http.RoundTripper, bool)
}

DevRouter reaches a sandbox from outside the cluster. It is supplied only in development, where Obot runs on a developer's machine and a sandbox's cluster-internal address resolves nowhere. In production Obot runs inside the cluster and this is nil.

type Handler

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

func New

func New(transport http.RoundTripper, devRouter DevRouter) *Handler

func (*Handler) Proxy

func (h *Handler) Proxy(req api.Context) error

Proxy forwards a request to the instance's sandbox.

For an authenticated caller the authorizer has already established that they own this instance and still have access to the agent behind it.

An unauthenticated one reaches here deliberately: this route is opened by a person following a link, so the authorizer admits them precisely so that the redirect below can send them to sign in. Nothing about the instance is read before that happens, so it discloses nothing -- not even whether the instance exists.

Jump to

Keyboard shortcuts

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