types

package
v0.33.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package types provides shared types used across the MCP server and modules to avoid circular dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusSpec added in v0.21.0

type ConsensusSpec struct {
	Fork    string `json:"fork"`
	Topic   string `json:"topic"`
	Title   string `json:"title"`
	Content string `json:"content,omitempty"`
	URL     string `json:"url"`
}

ConsensusSpec represents a parsed consensus-specs document.

type DatasetBinding added in v0.32.0

type DatasetBinding struct {
	Dataset string            `json:"dataset" yaml:"dataset"`
	Params  map[string]string `json:"params,omitempty" yaml:"params,omitempty"`
	Notes   string            `json:"notes,omitempty" yaml:"notes,omitempty"`
}

DatasetBinding declares that a named dataset lives in a datasource, with opaque placement params and operator notes. The dataset name matches a knowledge pack shipped in the release; Params are interpreted by that pack (e.g. {"database": "default"}); Notes says what distinguishes this copy from the dataset's other copies (e.g. "operator infrastructure logs" vs "devnet node logs") — universal query knowledge belongs in the dataset pack, and cluster-wide behavior in the datasource description.

type DatasourceInfo

type DatasourceInfo struct {
	// Type is the datasource type (e.g. "clickhouse", "prometheus", "loki").
	Type string `json:"type"`
	// Name is the logical name of the datasource.
	Name string `json:"name"`
	// ProxyName is the configured proxy that owns this datasource.
	ProxyName string `json:"proxy_name,omitempty"`
	// Description is a human-readable description.
	Description string `json:"description,omitempty"`
	// Metadata contains type-specific metadata (e.g. database, url).
	Metadata map[string]string `json:"metadata,omitempty"`
	// Contents declares the datasets stored in this datasource. It is authored
	// by the proxy owner and passed through opaquely: the proxy never interprets
	// Params or Notes. A datasource may hold multiple datasets (and the same
	// dataset may appear more than once, e.g. in different databases).
	Contents []DatasetBinding `json:"contents,omitempty"`
}

DatasourceInfo describes a configured datasource for the datasources:// MCP resources.

type EIP added in v0.12.0

type EIP struct {
	Number      int    `json:"number"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Author      string `json:"author,omitempty"`
	Status      string `json:"status"`
	Type        string `json:"type"`
	Category    string `json:"category,omitempty"`
	Created     string `json:"created,omitempty"`
	Requires    string `json:"requires,omitempty"`
	Content     string `json:"content,omitempty"`
	URL         string `json:"url"`
}

EIP represents a parsed Ethereum Improvement Proposal.

type Example

type Example struct {
	Name        string `json:"name" yaml:"name"`
	Description string `json:"description" yaml:"description"`
	Query       string `json:"query" yaml:"query"`
	// Target identifies the datasource the example runs against: a ClickHouse
	// cluster name, or a Prometheus/Loki datasource name.
	Target string `json:"target" yaml:"target"`
	// Dataset is the knowledge pack the example ships in (e.g. xatu-raw). It is
	// stamped by the datasets module at load time, never authored in YAML.
	Dataset string `json:"dataset,omitempty" yaml:"-"`
}

Example represents a single query example.

type ExampleCategory

type ExampleCategory struct {
	Name        string    `json:"name" yaml:"name"`
	Description string    `json:"description" yaml:"description"`
	Examples    []Example `json:"examples" yaml:"examples"`
}

ExampleCategory represents a category of query examples.

type FunctionDoc

type FunctionDoc struct {
	Signature   string            `json:"signature"`
	Description string            `json:"description"`
	Parameters  map[string]string `json:"parameters,omitempty"`
	Returns     string            `json:"returns,omitempty"`
	Example     string            `json:"example,omitempty"`
}

FunctionDoc describes a function in the Python library.

type ModuleDoc

type ModuleDoc struct {
	Description string                 `json:"description"`
	Functions   map[string]FunctionDoc `json:"functions"`
}

ModuleDoc describes a module in the Python library.

type ReadHandler

type ReadHandler func(ctx context.Context, uri string, s surface.Dialect) (string, error)

ReadHandler handles reading a resource by URI for a given client surface.

type Runbook

type Runbook struct {
	// Name is the title of the runbook (imperative, e.g., "Investigate Finality Delay").
	Name string `yaml:"name" json:"name"`
	// Description is a 1-2 sentence summary for semantic search matching.
	Description string `yaml:"description" json:"description"`
	// Tags are keywords for search (e.g., "finality", "consensus", "attestations").
	Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
	// Prerequisites lists datasources needed (e.g., "clickhouse-raw", "prometheus", "dora").
	Prerequisites []string `yaml:"prerequisites,omitempty" json:"prerequisites,omitempty"`
	// Content is the markdown body (not from frontmatter).
	Content string `yaml:"-" json:"content"`
	// FilePath is the source file for debugging.
	FilePath string `yaml:"-" json:"file_path"`
}

Runbook represents a procedural guide for multi-step analysis. Runbooks contain markdown content with inline MUST/SHOULD/MAY constraints following RFC 2119 conventions.

type SpecConstant added in v0.21.0

type SpecConstant struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Fork  string `json:"fork"`
}

SpecConstant represents a protocol constant from consensus-specs presets.

type StaticResource

type StaticResource struct {
	Resource mcp.Resource
	Handler  ReadHandler
}

StaticResource is a resource with a fixed URI.

type TemplateResource

type TemplateResource struct {
	Template mcp.ResourceTemplate
	Pattern  *regexp.Regexp
	Handler  ReadHandler
}

TemplateResource is a resource with a URI pattern.

Jump to

Keyboard shortcuts

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