Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverAll ¶
DiscoverAll searches basePath for AI agent configuration files and groups them by agent. Only agents with at least one exclusive file match are included. Shared files are appended to each detected agent's file list. Returns a map of agent name → sorted, deduplicated relative paths.
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Path string `json:"path"`
SHA256 string `json:"sha256"`
Size int64 `json:"size"`
Content string `json:"content"`
}
ConfigFile represents a single discovered configuration file
type Evidence ¶
type Evidence struct {
SchemaVersion string `json:"schema_version"`
Agent Agent `json:"agent"`
ConfigHash string `json:"config_hash"`
CapturedAt string `json:"captured_at"`
GitContext *GitContext `json:"git_context,omitempty"`
ConfigFiles []ConfigFile `json:"config_files"`
// Future fields for richer analysis
Permissions any `json:"permissions,omitempty"`
MCPServers any `json:"mcp_servers,omitempty"`
Subagents any `json:"subagents,omitempty"`
}
Evidence is the AI agent configuration payload
func Build ¶
func Build(basePath string, filePaths []string, agentName string, gitCtx *GitContext) (*Evidence, error)
Build reads discovered files and constructs the AI agent config payload. basePath is the base directory, filePaths are relative to basePath. agentName identifies the AI agent (e.g. "claude", "cursor"). gitCtx may be nil if not in a git repository.
type GitContext ¶
type GitContext struct {
Repository string `json:"repository,omitempty"`
Branch string `json:"branch,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
}
GitContext holds optional git information at capture time