Documentation
¶
Overview ¶
Package verification records bounded, content-free evidence from admitted tool results. It is an optional development-profile composition: merely constructing an Observer does not alter tool policy or turn completion.
Index ¶
- type Assessment
- type CheckScope
- type Config
- type Observer
- func (o *Observer) Assess(addr protocol.MessageAddress) Assessment
- func (o *Observer) ConsumeFinishNudge(addr protocol.MessageAddress) (string, bool)
- func (o *Observer) Records(addr protocol.MessageAddress) []Record
- func (*Observer) ToolFinished(context.Context, hooks.ToolCall, bool, error)
- func (o *Observer) ToolResult(ctx context.Context, call hooks.ToolCall, result tools.Result, runErr error)
- func (*Observer) ToolStarted(context.Context, hooks.ToolCall)
- type Recipe
- type Record
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assessment ¶
type CheckScope ¶
type CheckScope string
const ( CheckTargeted CheckScope = "targeted" CheckBroader CheckScope = "broader" )
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer implements the existing hooks.ToolObserver and the optional richer hooks.ToolResultObserver. It stores no arguments or output payloads.
func NewObserver ¶
func (*Observer) Assess ¶
func (o *Observer) Assess(addr protocol.MessageAddress) Assessment
Assess distinguishes targeted success, broader success, failed checks, and no validation run while reporting the paths actually changed.
func (*Observer) ConsumeFinishNudge ¶
func (o *Observer) ConsumeFinishNudge(addr protocol.MessageAddress) (string, bool)
ConsumeFinishNudge returns at most one reminder per session when material writes lack successful configured validation evidence.
func (*Observer) ToolFinished ¶
func (*Observer) ToolResult ¶
type Recipe ¶
type Recipe struct {
Name string
ToolName string
ArgumentsContain []string
Scope CheckScope
}
Recipe identifies a validation command without prescribing one globally. Every ArgumentsContain fragment must occur in the admitted JSON arguments.
type Record ¶
type Record struct {
ID string `json:"id"`
Addr protocol.MessageAddress `json:"addr"`
CallID string `json:"call_id"`
ToolName string `json:"tool_name"`
ArgumentsHash string `json:"arguments_hash"`
WorkingDirectory string `json:"working_directory,omitempty"`
ExitCode int `json:"exit_code,omitempty"`
IsError bool `json:"is_error,omitempty"`
CheckName string `json:"check_name,omitempty"`
CheckScope CheckScope `json:"check_scope,omitempty"`
FileChanges []tools.FileChange `json:"file_changes,omitempty"`
References []tools.ResultReference `json:"references,omitempty"`
FinishedAt string `json:"finished_at"`
}