mcpserver

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mcpserver exposes RuntimePulse to AI agents as an MCP server. Every tool is a thin client over the daemon's unix socket; the server itself holds no state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *client.Client) *mcp.Server

New builds the MCP server. Tools are registered in registerTools (Tasks 2–4); the skeleton registers none yet.

Types

type CancelRuleInput

type CancelRuleInput struct {
	RuleID string `json:"ruleId" jsonschema:"id of the rule to cancel"`
}

type CreateRuleInput

type CreateRuleInput struct {
	EventType string `json:"eventType" jsonschema:"event type to match, e.g. docker.healthy or continuation.completed"`
	Source    string `json:"source,omitempty" jsonschema:"optional event source filter, e.g. a container name"`
	SessionID string `json:"sessionId" jsonschema:"the session to resume when the event matches — normally your own session id"`
	Agent     string `json:"agent,omitempty" jsonschema:"agent type (claude|cursor|codex|opencode); with repoPath, self-registers the session"`
	RepoPath  string `json:"repoPath,omitempty" jsonschema:"session repo path; with agent, self-registers the session"`
	Prompt    string `json:"prompt" jsonschema:"Go text/template prompt; only event fields are available, e.g. {{.Event.Source}}"`
	Label     string `json:"label,omitempty" jsonschema:"rule label; becomes the source of the continuation.* result event"`
	OneShot   bool   `json:"oneShot,omitempty" jsonschema:"consume the rule after its first match — preferred for wake-me-once flows"`
	ExpiresAt string `json:"expiresAt,omitempty" jsonschema:"optional RFC3339 expiry"`
}

type CreateWatchInput

type CreateWatchInput struct {
	Type      string `json:"type" jsonschema:"watch type: http, tcp, file, process, docker or git"`
	Target    string `json:"target" jsonschema:"what to watch (url, host:port, path, command-line substring, container, or repo)"`
	Interval  string `json:"interval,omitempty" jsonschema:"poll interval as a Go duration, e.g. 2s"`
	Stability string `json:"stability,omitempty" jsonschema:"flap-suppression threshold as a Go duration, e.g. 5s"`
}

type GetEventsInput

type GetEventsInput struct {
	Type  string `json:"type,omitempty" jsonschema:"filter by event type, e.g. docker.healthy"`
	Limit int    `json:"limit,omitempty" jsonschema:"max events to return (default 100)"`
}

type GetEventsOutput

type GetEventsOutput struct {
	Events []core.Event `json:"events"`
}

type OKOutput

type OKOutput struct {
	OK bool `json:"ok"`
}

type RuleOutput

type RuleOutput struct {
	ID        string `json:"id"`
	SessionID string `json:"sessionId"`
}

type WaitForEventInput

type WaitForEventInput struct {
	EventType      string `json:"eventType" jsonschema:"event type to wait for, e.g. http.available"`
	Source         string `json:"source,omitempty" jsonschema:"optional source filter"`
	TimeoutSeconds int    `json:"timeoutSeconds,omitempty" jsonschema:"max seconds to block (default 300)"`
}

type WaitOutput

type WaitOutput struct {
	TimedOut bool       `json:"timedOut"`
	Event    core.Event `json:"event,omitempty"`
}

type WatchOutput

type WatchOutput struct {
	ID     string `json:"id"`
	Type   string `json:"type"`
	Target string `json:"target"`
}

Jump to

Keyboard shortcuts

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