probe

package
v0.7.37 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package probe is the runner image's gateway probe: the health check every run makes before its agent starts (an authenticated MCP initialize from inside the run network), and, for a session, the listing of the tools the gateway serves. A session's driver grants a harness's permission request only for a tool the run's gateway serves, and a declared MCP server names its tools itself, at run time, unless its manifest filters them; so the probe, already in the network with the gateway's token, asks the gateway once. One-shot runs never ask.

Stdlib only: the package is embedded in the runner image's build context.

Index

Constants

View Source
const InitBody = `` /* 158-byte string literal not displayed */

InitBody is a spec-shaped MCP initialize request. A 2xx answer is proof the gateway is up and accepted the Bearer token.

View Source
const MaxToolName = 256

MaxToolName bounds a tool name the probe passes on and the engine takes.

Variables

This section is empty.

Functions

func Healthy

func Healthy(client *http.Client, url, token string) error

Healthy is one health check: the gateway accepted an authenticated initialize. The answer is not read beyond its status.

func ListTools

func ListTools(client *http.Client, url, token string, deadline time.Time) ([]string, error)

ListTools completes the MCP handshake (initialize, then the initialized notification, carrying the session the gateway assigned) and walks tools/list to its last page, giving up at deadline. It returns the tool names in the gateway's order, without duplicates.

Types

type Listing

type Listing struct {
	Tools []string `json:"tools"`
}

Listing is the one line `probe --list-tools` prints and the engine reads: the names of the tools the gateway serves.

Jump to

Keyboard shortcuts

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