Documentation
¶
Index ¶
- Constants
- Variables
- func CopySelectedEntries(sourceRoot, destinationRoot string, entries []string) error
- func DisplayName(target Target) string
- func DurablePathMatches(path, target string) bool
- func HasAny(arguments []string, values ...string) bool
- func HasFlagValue(arguments []string, flag string) bool
- func LinkDurableDirectory(native, staged string) error
- func LinkDurableFile(native, staged string) error
- func LookPathEnv(envName, binary string) (string, error)
- func PrependOnce(arguments []string, flag string, aliases ...string) []string
- func RecoverWithoutOverwrite(source, destination, conflictsRoot string) error
- func ResolveBinary(environment, fallback string) (string, error)
- func SaveProbeEvidence(workspace, receiptID, phase string, result ProbeResult) (string, error)
- func SeriesFrom(version, series string, from int) bool
- func WorkspaceRoot(projectRoot string) string
- func WriteGuidance(path, blob string) error
- func WriteLSPFile(path string, servers map[string]json.RawMessage) error
- type Definition
- func (definition Definition) AfterLaunch(ctx LaunchContext) error
- func (definition Definition) BeginRebuild(ctx StageContext) (RebuildTransaction, error)
- func (definition Definition) Finalize(entries mcp.Entries, ctx StageContext) error
- func (definition Definition) FinalizeWorkspaceOverlay(ctx StageContext) error
- func (definition Definition) ID() Target
- func (definition Definition) InjectGuidance(blob string, ctx StageContext) error
- func (definition Definition) LaunchCommand(ctx LaunchContext) (*exec.Cmd, error)
- func (definition Definition) PreReset(ctx StageContext) error
- func (definition Definition) Prepare(ctx StageContext) error
- func (definition Definition) ResetPaths(ctx StageContext) ([]string, error)
- func (definition Definition) StagedRoot(ctx StageContext) (string, error)
- func (definition Definition) Verify(ctx StageContext) error
- func (definition Definition) WriteLSP(servers map[string]json.RawMessage, ctx StageContext) error
- func (definition Definition) WriteMCP(entries mcp.Entries, ctx StageContext) error
- type Harness
- type LaunchContext
- type PackagedNames
- type ProbePlan
- type ProbeResult
- type RebuildTransaction
- type StageContext
- type Target
Constants ¶
const NoAttributionBody = `# Attribution policy
Do not add any AI-attribution lines to git commits, pull requests, or other artifacts you author.
Specifically, do not include:
- ` + "`Co-Authored-By: <model> <noreply@...>`" + ` trailers.
- ` + "`Generated with [agent name]`" + ` footers, banners, or similar credit lines.
- Tool/agent name signatures in commit messages or PR descriptions.
Write commit messages and PR descriptions as if a human author wrote them.
`
Variables ¶
var ErrNoLSP = errors.New("no language server setting")
ErrNoLSP says an agent has no setting through which a language server can be configured for it.
Functions ¶
func CopySelectedEntries ¶
func DisplayName ¶
DisplayName is the agent's product name, as messages name it.
func DurablePathMatches ¶
func HasFlagValue ¶
func LinkDurableDirectory ¶
func LinkDurableFile ¶
func LookPathEnv ¶
LookPathEnv returns an executable path from env override or PATH.
func RecoverWithoutOverwrite ¶
func ResolveBinary ¶
func SaveProbeEvidence ¶
func SaveProbeEvidence(workspace, receiptID, phase string, result ProbeResult) (string, error)
SaveProbeEvidence retains bounded raw diagnostics privately; support exports must omit these references.
func SeriesFrom ¶
SeriesFrom says whether version (its first word, as `--version` prints it) is <series>.<patch> with patch at least from: a release of the validated series, the validated one or later. Probes gate their parsers on it rather than on one exact release, which the agents' auto-updates leave behind within days; a parser that cannot read a later release reports that itself.
func WorkspaceRoot ¶
func WriteGuidance ¶
func WriteLSPFile ¶
func WriteLSPFile(path string, servers map[string]json.RawMessage) error
WriteLSPFile writes language servers as a .lsp.json file, the format that Claude Code reads at a plugin root and Grok reads as $GROK_HOME/lsp.json.
Types ¶
type Definition ¶
type Definition struct {
Target Target
Root func(StageContext) (string, error)
Reset func(StageContext) ([]string, error)
BeforeReset func(StageContext) error
Begin func(StageContext) (RebuildTransaction, error)
Setup func(StageContext) error
MCP func(mcp.Entries, StageContext) error
LSP func(map[string]json.RawMessage, StageContext) error
Guidance func(string, StageContext) error
AfterStage func(mcp.Entries, StageContext) error
WorkspaceOverlay func(StageContext) error
Check func(StageContext) error
Launch func(LaunchContext) (*exec.Cmd, error)
LaunchFinished func(LaunchContext) error
}
func (Definition) AfterLaunch ¶
func (definition Definition) AfterLaunch(ctx LaunchContext) error
func (Definition) BeginRebuild ¶
func (definition Definition) BeginRebuild(ctx StageContext) (RebuildTransaction, error)
func (Definition) Finalize ¶
func (definition Definition) Finalize(entries mcp.Entries, ctx StageContext) error
func (Definition) FinalizeWorkspaceOverlay ¶
func (definition Definition) FinalizeWorkspaceOverlay(ctx StageContext) error
func (Definition) ID ¶
func (definition Definition) ID() Target
func (Definition) InjectGuidance ¶
func (definition Definition) InjectGuidance(blob string, ctx StageContext) error
func (Definition) LaunchCommand ¶
func (definition Definition) LaunchCommand(ctx LaunchContext) (*exec.Cmd, error)
func (Definition) PreReset ¶
func (definition Definition) PreReset(ctx StageContext) error
func (Definition) Prepare ¶
func (definition Definition) Prepare(ctx StageContext) error
func (Definition) ResetPaths ¶
func (definition Definition) ResetPaths(ctx StageContext) ([]string, error)
func (Definition) StagedRoot ¶
func (definition Definition) StagedRoot(ctx StageContext) (string, error)
func (Definition) Verify ¶
func (definition Definition) Verify(ctx StageContext) error
func (Definition) WriteLSP ¶
func (definition Definition) WriteLSP(servers map[string]json.RawMessage, ctx StageContext) error
func (Definition) WriteMCP ¶
func (definition Definition) WriteMCP(entries mcp.Entries, ctx StageContext) error
type Harness ¶
type Harness interface {
ID() Target
StagedRoot(StageContext) (string, error)
ResetPaths(StageContext) ([]string, error)
PreReset(StageContext) error
BeginRebuild(StageContext) (RebuildTransaction, error)
Prepare(StageContext) error
WriteMCP(mcp.Entries, StageContext) error
// WriteLSP writes language servers (Claude Code format, by name); it
// returns ErrNoLSP when the agent has no language server setting.
WriteLSP(map[string]json.RawMessage, StageContext) error
InjectGuidance(string, StageContext) error
Finalize(mcp.Entries, StageContext) error
FinalizeWorkspaceOverlay(StageContext) error
Verify(StageContext) error
LaunchCommand(LaunchContext) (*exec.Cmd, error)
AfterLaunch(LaunchContext) error
}
type LaunchContext ¶
type PackagedNames ¶
PackagedNames lists the artifacts of the plan that a probe should look for, by kind.
type ProbePlan ¶
type ProbePlan struct {
Executable string
Argv []string
Cwd string
Env []string // full env if non-nil; otherwise process env
Timeout time.Duration
Categories []string
Network string
WriteScope string
ModelCalls bool
}
ProbePlan is a fixed, non-shell native diagnostic invocation.
type ProbeResult ¶
type ProbeResult struct {
Stdout string
Stderr string
ExitCode int
TimedOut bool
Canceled bool
Truncated bool
Duration time.Duration
}
ProbeResult is bounded process output.
type RebuildTransaction ¶
RebuildTransaction keeps a newly staged root private until all staging and verification succeeds. Abort must leave the previously published root intact.
type StageContext ¶
type Target ¶
type Target string
func AllTargets ¶
func AllTargets() []Target