Documentation
¶
Overview ¶
Package verify runs explicitly configured, named checks and exposes their structured results to the caller and optionally to an agent. It is not a process sandbox and never discovers or executes project commands implicitly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConfig = errors.New("verify: invalid check or suite configuration")
Functions ¶
This section is empty.
Types ¶
type CheckFunc ¶
CheckFunc is caller-provided trusted code, required to honor ctx. It may run an existing test framework or an isolated execution service. A context deadline is cooperative; the suite does not abandon a running callback.
func Command ¶
func Command(cfg CommandConfig) (CheckFunc, error)
Command adapts os/exec to a CheckFunc. It neither invokes a shell implicitly nor resolves a program through PATH. Output is discarded, not put into model context. Cancellation targets the direct process, not all descendants; use an isolated caller backend for untrusted commands.
type CommandConfig ¶
type CommandConfig struct {
Executable string
Dir string
Args []string
// Env is the explicit environment, not inherited from the host. Go may
// add platform-required values (e.g. SYSTEMROOT on Windows).
Env []string
}
CommandConfig defines one fixed foreground command supplied by the caller, not the model. Authorize the executable AND the project (build hooks and test code can have arbitrary effects). No process sandbox is provided.
type Outcome ¶
Outcome describes a completed check. A false Passed value with no error means an observed negative result, not an execution error.
type Suite ¶
type Suite struct {
// contains filtered or unexported fields
}
Suite serializes its own invocations. Other suites, workspace handles, external processes and unrelated callers are not locked by it.
func (*Suite) Tool ¶
Tool exposes only the entire preconfigured suite, with no model-selected executable, directory, environment or arguments. Failed checks are normal structured results, allowing the model to choose a correction. Raw backend errors are never exposed. A tool call does not replace a configured final gate.
type ToolResult ¶
type ToolResult struct {
Report agent.VerificationReport `json:"report"`
Complete bool `json:"complete"`
Passed bool `json:"passed"`
}
ToolResult makes an interrupted suite distinguishable from all checks passing, even if cancellation occurs just after the last callback.