harness

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package harness is the end-to-end benchmark and conformance harness for leanproxy-mcp (issue #301). The measurements live in the test files behind the `harness` build tag and run with `make harness`; they build the real binary, drive `server run --stdio` over pipes against the catalog mock in ./catalogmcp, and write bench-results/harness.md.

This file (no build tag) only holds what the harness test and the catalog mock share: the embedded 118-tool catalog and the fake credentials.

Index

Constants

This section is empty.

Variables

View Source
var LargeResultTools = []struct{ Server, Tool string }{
	{"github", "get_file_contents"},
	{"github", "list_issues"},
	{"github", "search_code"},
	{"jira", "jira_search"},
	{"postgres", "pg_query"},
}

LargeResultTools are the catalog tools that answer with a large result when catalogmcp runs with --large-results (the response governor measurements, issue #319): a file read and the list/search endpoints an agent session typically calls.

Functions

func CountFakeSecrets

func CountFakeSecrets(s string) int

CountFakeSecrets reports how many of FakeSecrets occur in s.

func FakeSecrets

func FakeSecrets() []string

FakeSecrets returns credential-shaped strings that the built-in bouncer patterns must redact. They are assembled at runtime so no secret-looking literal is committed (GitHub push protection rejects literal keys).

func LargeResult

func LargeResult(tool string) (string, bool)

LargeResult returns the large text result of tool, deterministic, and whether the tool has one.

Types

type Catalog

type Catalog struct {
	Servers []Server `json:"servers"`
}

Catalog is the whole embedded catalog.

func LoadCatalog

func LoadCatalog() (*Catalog, error)

LoadCatalog decodes the embedded catalog.

func (*Catalog) Server

func (c *Catalog) Server(name string) *Server

Server returns the named server, or nil.

func (*Catalog) ToolCount

func (c *Catalog) ToolCount() int

ToolCount is the number of tools across every server.

type Server

type Server struct {
	Name  string `json:"name"`
	Tools []Tool `json:"tools"`
}

Server is one catalog server and its tools, in catalog order.

type Tool

type Tool struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	InputSchema json.RawMessage `json:"inputSchema"`
}

Tool is one MCP tool definition as a server returns it in tools/list. InputSchema is kept raw so the mock serves it byte-for-byte.

Directories

Path Synopsis
Command catalogmcp is the stdio MCP server the end-to-end harness (tests/harness, issue #301) proxies through leanproxy-mcp.
Command catalogmcp is the stdio MCP server the end-to-end harness (tests/harness, issue #301) proxies through leanproxy-mcp.

Jump to

Keyboard shortcuts

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