harness

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package harness detects and checks AI agent integration health.

Index

Constants

View Source
const AutoUpdateHint = "In Claude Code: /plugins → Marketplaces → 37signals → Enable auto-update"

AutoUpdateHint is the user-facing instruction for enabling plugin auto-update.

View Source
const ClaudeExpectedPluginKey = ClaudePluginName + "@" + ClaudeMarketplaceName

ClaudeExpectedPluginKey is the fully-qualified key for a correctly installed plugin.

View Source
const ClaudeMarketplaceName = "37signals"

ClaudeMarketplaceName is the marketplace name as it appears in plugin keys.

View Source
const ClaudeMarketplaceSource = "basecamp/claude-plugins"

ClaudeMarketplaceSource is the marketplace repository for the Basecamp plugin. Migrating from basecamp/basecamp-cli → basecamp/claude-plugins.

View Source
const ClaudePluginName = "basecamp"

ClaudePluginName is the plugin identifier to install.

Variables

This section is empty.

Functions

func DetectClaude

func DetectClaude() bool

DetectClaude returns true if Claude Code is installed. Checks ~/.claude/ directory first, then falls back to binary on PATH.

func FindClaudeBinary added in v0.3.0

func FindClaudeBinary() string

FindClaudeBinary returns the path to the claude binary, or "" if not found.

func InstalledPluginVersion added in v0.7.0

func InstalledPluginVersion() string

InstalledPluginVersion reads the installed plugin version from ~/.claude/plugins/installed_plugins.json. Returns "" if unreadable.

func IsPluginNeeded added in v0.3.0

func IsPluginNeeded() bool

IsPluginNeeded returns true if Claude Code is installed but the plugin is not.

func RegisterAgent added in v0.3.0

func RegisterAgent(info AgentInfo)

RegisterAgent adds an agent to the global registry. Typically called from init() in agent-specific files. Panics on empty or duplicate IDs to keep registry state well-defined.

Types

type AgentInfo added in v0.3.0

type AgentInfo struct {
	Name   string                // "Claude Code"
	ID     string                // "claude"
	Detect func() bool           // returns true if the agent is installed
	Checks func() []*StatusCheck // health checks for doctor
}

AgentInfo describes a coding agent integration.

func AllAgents added in v0.3.0

func AllAgents() []AgentInfo

AllAgents returns every registered agent.

func DetectedAgents added in v0.3.0

func DetectedAgents() []AgentInfo

DetectedAgents returns all agents whose Detect function returns true. Copies the registry under the lock before calling Detect callbacks to avoid holding the lock during potentially slow I/O.

func FindAgent added in v0.3.0

func FindAgent(id string) *AgentInfo

FindAgent returns the agent with the given ID, or nil.

type StalePlugin added in v0.7.0

type StalePlugin struct {
	Key    string
	Scopes []string // empty = unknown, fall back to unscoped uninstall
}

StalePlugin carries a stale plugin key along with the scopes it was found in.

func StalePluginKeys added in v0.7.0

func StalePluginKeys() []StalePlugin

StalePluginKeys returns stale plugin entries from installed_plugins.json that belong to old/dead marketplaces.

type StatusCheck

type StatusCheck struct {
	Name    string `json:"name"`
	Status  string `json:"status"` // "pass", "warn", "fail"
	Message string `json:"message"`
	Hint    string `json:"hint,omitempty"`
}

StatusCheck represents a single agent integration health check result.

func CheckClaudePlugin

func CheckClaudePlugin() *StatusCheck

CheckClaudePlugin checks whether the basecamp plugin is installed in Claude Code.

func CheckClaudePluginVersion added in v0.7.0

func CheckClaudePluginVersion() *StatusCheck

CheckClaudePluginVersion compares the installed plugin version against the running CLI version. Returns a warn check when they differ.

func CheckClaudeSkillLink() *StatusCheck

CheckClaudeSkillLink checks whether ~/.claude/skills/basecamp contains a valid SKILL.md.

Jump to

Keyboard shortcuts

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