setup

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: 7 Imported by: 0

Documentation

Overview

Package setup registers RuntimePulse as an MCP server with the agent CLIs installed on the machine (the `runtimepulse setup` wizard).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	Name() string
	Status(scope Scope) Status
	Register(binPath string, scope Scope) error
	SupportsScope(scope Scope) bool
}

Agent registers RuntimePulse as an MCP server for one agent CLI.

func Registry

func Registry(home, cwd string) []Agent

Registry returns the four supported agents, wired for production (real home/cwd, real subprocess runner). home and cwd come from the environment; a caller may pass overrides for testing.

type AgentStatus

type AgentStatus struct {
	Agent  Agent
	Status Status
}

AgentStatus pairs an agent with its detected status (for the wizard's detection table).

func DetectAll

func DetectAll(agents []Agent, scope Scope) []AgentStatus

DetectAll inspects every agent at the given scope.

type Result

type Result struct {
	Agent   string
	OK      bool
	Skipped bool   // already registered
	Note    string // e.g. scope fallback explanation
	Err     error
}

Result is the outcome of registering one agent.

func Run

func Run(agents []Agent, names []string, binPath string, scope Scope) []Result

Run registers the named, installed agents at scope. Each agent is independent: a failure is recorded, never fatal. Already-registered agents are skipped. An agent that doesn't support the requested scope falls back to user scope with an explanatory note.

type RuleResult added in v1.3.0

type RuleResult struct {
	Agent  string
	Action string // written | updated | appended | unchanged | would-write | manual
	Path   string // file written, or "" for manual
	Manual bool   // true for cursor — caller prints Text
	Text   string // marker-less paste text (manual only)
	Err    error
}

RuleResult is the outcome of installing the rule for one agent.

func WriteRules added in v1.3.0

func WriteRules(agents []Agent, names []string, home string, dryRun bool) []RuleResult

WriteRules installs the rule for each selected agent, preserving the order of agents. Mirrors Run; rule install is always global scope.

type RuleWriter added in v1.3.0

type RuleWriter interface {
	WriteRule(dryRun bool) RuleResult
}

RuleWriter installs the global release-and-resume rule for one agent.

type Scope

type Scope int

Scope selects user/global vs current-project registration.

const (
	ScopeUser Scope = iota
	ScopeProject
)

func (Scope) String

func (s Scope) String() string

type Status

type Status struct {
	Installed  bool
	Registered bool
	Detail     string
}

Status is the result of inspecting one agent.

Jump to

Keyboard shortcuts

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