Documentation
¶
Overview ¶
Package verifycli implements the `agent-receipts verify` subcommand: validate a stored chain's signatures and hash links using a daemon-written SQLite store and the daemon-published public key. It opens the database read-only (sdk/go/store.OpenReadOnly) so it is safe to run while the daemon is the active writer, and it does not require the daemon socket to be reachable — independent verifiability is not gated on daemon availability (issue #236, Section 4).
Logic lives here, away from cmd/agent-receipts/main.go, so tests can drive the subcommand directly with arbitrary args / captured I/O without shelling out to a built binary.
Index ¶
Constants ¶
const ( ExitOK = 0 // chain verified ExitChainBad = 1 // chain failed verification ExitUsageError = 2 // bad flags / unreadable DB or key file )
Exit codes are part of the CLI contract — scripts and CI checks pivot on them. Keep these stable.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes the verify subcommand with the given args (sans the program name and "verify" subcommand token), writing human-readable output to stdout and diagnostics to stderr. Returns one of the Exit* constants; cmd/agent-receipts/main.go forwards it to os.Exit.
envLookup is split out so tests can inject a deterministic environment without touching the real process env. Pass os.Getenv for the production caller.
Types ¶
This section is empty.