testvaliditybridge

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Overview

Package testvaliditybridge exposes the shared test-validity projection as the single read-only tool of the experimental MCP test-validity profile (docs/specs/mcp-test-validity-profile-v0.md). It calls exactly the builder `corvint test-validity` calls (internal/testvaliditydoc); it never shells out, never runs a test, and never duplicates projection logic.

Index

Constants

View Source
const (
	ToolTestValidity = "corvint.test_validity"

	// MaxResultBytes bounds the canonical result so the text block and the
	// duplicated structuredContent fit one 1 MiB MCP frame.
	MaxResultBytes = 256 << 10
)

Variables

This section is empty.

Functions

func New

func New(root string) (*Registry, *Error)

Types

type Error

type Error struct{ Code string }

Error is a closed, sanitized transport-level failure. It never carries a repository path or file content.

func (*Error) Error

func (failure *Error) Error() string

type Registry

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

Registry binds every call to one canonical local repository root.

func (*Registry) Call

func (registry *Registry) Call(ctx context.Context, name string, arguments []byte) (map[string]any, string, *ToolFailure, *Error)

Call dispatches one tool by name. It returns exactly one of: a successful structured/text pair, a ToolFailure, or a transport Error.

func (*Registry) Tools

func (registry *Registry) Tools() []bridge.ToolDescriptor

Tools is the exact delivered surface: one tool.

type ToolFailure

type ToolFailure struct{ Code, Message string }

ToolFailure is a business-level refusal, reported as an MCP tool error (isError: true), never as a successful call.

Jump to

Keyboard shortcuts

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