harness

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package harness detects and checks AI agent integration health.

Index

Constants

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 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 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 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