Documentation
¶
Overview ¶
Package tools keeps the evidence that the code sessions change was checked: the checks their commands run, the files their writes land in, and the nudge that sends the agent back to check before it finishes a turn that changed code. It runs the recipe of a project too, for the tool that has the agent verify it and for the service the app and the command line verify it through
Index ¶
- Constants
- Variables
- func Answered(url string, ready bool, status int32, failure string) string
- func Described(name, root string, manifest bool) string
- func IsStep(name string) bool
- func Outcome(ok, timedOut bool) string
- func Source(manifest bool) string
- func Took(seconds float64) string
- func Word(step string) string
- type Env
- type Ledger
- type NoRecipeError
- type NotFolderError
- type NotStepError
- type Options
- type Report
Constants ¶
const Guidance = "[Coding] Before you run tests/linters or call this done: if this is creative UI/visual work, hold off on tests and linters until " +
"the user says they like the result or you're about to commit. And before every commit, clean your work: keep it KISS/DRY, match the " +
"surrounding code style, and be elitist, shorthand, clever, concise, efficient, and elegant."
How to verify, added to the nudge unless tools.verify.guidance turns it off
const Project = "verify_project"
Name of the tool that runs a project's recipe
Variables ¶
Steps a run may take, in their order
Functions ¶
func Answered ¶
Whether the started app answered at the address, in a sentence: the status it answered with, else the last failure to reach it
func Described ¶
What a recipe is of, the folder of its project when one is given, and where it came from, in words, such as Go project in ~/code/app, worked out from the files of the project
Types ¶
type Env ¶
What a run reaches: the profile's settings, the ledger it records into, the terminal its steps run on, and the session it is for
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
Evidence each profile keeps that the workspaces its sessions change were checked: the checks run, and per session and workspace the newest check and the files changed since
func Register ¶
func Register(registry *tools.Registry, host *terminal.Terminal, stores *sessions.Registry, runs *runner.Registry) *Ledger
Registers the ledger and the tool that runs a project's recipe, the session stores and the runner telling a chat app's sessions apart and the stores telling the person of a ledger file set aside: the ledger, which every run records into
type NoRecipeError ¶
type NoRecipeError struct{ Root string }
A folder that holds no project verify recognizes
func (*NoRecipeError) Error ¶
func (e *NoRecipeError) Error() string
type NotFolderError ¶
type NotFolderError struct{ Path string }
A path given to a run that is no folder
func (*NotFolderError) Error ¶
func (e *NotFolderError) Error() string
type NotStepError ¶
type NotStepError struct{ Name string }
A name given to a run for a step that is none of those it may take, said to whoever named it
func (*NotStepError) Error ¶
func (e *NotStepError) Error() string
type Options ¶
type Options struct {
// Only works out the recipe, saving it when Save says so, running nothing
DetectOnly, Save, SkipStart bool
// Steps to run, every one when empty
Phases []string
// Port the started app is asked on in place of the one the recipe names, 0 for that one
Port int
// Longest one command of a step may take, and the longest wait for the started app to answer
Timeout, ReadyTimeout time.Duration
// Told what the run does now, such as the command a step runs; nil to tell nothing
Doing func(text string)
// Asked of every command the run is to start before the first of them starts: why it may not run, nil when it may. nil lets every
// one run, as for a person who asked for the run themselves
Allow func(command string) error
// Why the recipe may not be saved at the path, empty when it may; nil lets it be saved anywhere
Unwritable func(path string) string
}
What a run of verify is asked to do
type Report ¶
type Report struct {
Root string
Recipe *recipes.Recipe
Manifest bool
Saved string
Result *recipes.Result
}
What a run found: the folder of the project, its recipe and where that came from, the file it was saved to, and how each step went, none for a run that only worked out the recipe