Documentation
¶
Overview ¶
Package probe runs and checks Probe workflows from Go, and calls actions the way a workflow's steps call them.
Index ¶
- Constants
- func BuiltinAction(name string) (serve func(), ok bool)
- func Guide(topic string) (string, error)
- func GuideAction(arg, workflow string, read DocReader) (string, error)
- func GuideIndex() string
- func InstallSkill(dir string) (string, error)
- func Skill() string
- type ActionRunner
- type CheckOptions
- type Choices
- type Config
- type DocReader
- type Finding
- type GuideTopic
- type OfficialAction
- type OutputMode
- type PluginActionRunner
- type Probe
- type RunOptions
Constants ¶
const ( OutputModeAuto = engine.OutputModeAuto OutputModeSpinner = engine.OutputModeSpinner OutputModeStream = engine.OutputModeStream ExitOK = engine.ExitOK ExitTestFailed = engine.ExitTestFailed ExitConfigError = engine.ExitConfigError ExitActionError = engine.ExitActionError SeverityError = check.SeverityError SeverityWarning = check.SeverityWarning )
const DefaultSkillDir = ".claude/skills/probe"
DefaultSkillDir is where probe skill install puts the skill when no directory is given: the project-level skills directory of Claude Code.
Variables ¶
This section is empty.
Functions ¶
func BuiltinAction ¶ added in v1.40.0
BuiltinAction returns the function that serves the built-in action name, for a build of Probe that adds actions of its own and hands the other names of builtin-actions to these.
func Guide ¶
Guide returns the Markdown page for a topic. An action's page can also be asked for as actions/<name>.
func GuideAction ¶ added in v1.34.0
GuideAction returns the page probe guide prints for arg, a topic or an external action, with workflow, when it is not empty, the files of a workflow whose names under actions arg may be. It is looked for in this order:
- A name the workflow gives under actions, so that the page is that of the action the workflow runs. A path there is taken from the directory of the workflow, as a run takes it.
- A local path, starting with ./ or ../ or absolute, taken from the working directory, or github.com/<owner>/<repo>[/<dir>][@<commit>].
- A topic of the pages built into Probe.
- An official action, read from github.com/mozership/probe-<name>.
An external action is described by what read returns, with the lines that tell where it comes from before it.
func GuideIndex ¶
func GuideIndex() string
GuideIndex renders the list of topics probe guide prints without one.
func InstallSkill ¶
InstallSkill writes SKILL.md into dir, creating it, and returns the path it wrote. An existing SKILL.md is replaced, so running it again after an upgrade brings the skill up to date.
The default directory is inside the project, which the user may have checked out from anywhere, so the file is written through safefile.Replace: a symlink at SKILL.md, or at .claude or another directory on the way, cannot redirect it to a file elsewhere.
Types ¶
type ActionRunner ¶
type ActionRunner = engine.ActionRunner
type CheckOptions ¶
type CheckOptions = check.CheckOptions
type DocReader ¶ added in v1.34.0
DocReader reads the description of an external action, as probe guide does for an action that is not one of Probe's.
type GuideTopic ¶
type GuideTopic struct {
Name string // what to pass to probe guide
Group string // the heading it is listed under
Title string // the page's first heading
}
GuideTopic is one page probe guide can print.
func GuideTopics ¶
func GuideTopics() []GuideTopic
GuideTopics lists every topic, references first, then one per action, then the concepts.
type OfficialAction ¶ added in v1.34.0
type OfficialAction = guide.OfficialAction
OfficialAction is an external action published alongside Probe.
func OfficialActions ¶ added in v1.34.0
func OfficialActions() []OfficialAction
OfficialActions lists the external actions published alongside Probe.
type OutputMode ¶
type OutputMode = engine.OutputMode
func ParseOutputMode ¶
func ParseOutputMode(s string) (OutputMode, error)
ParseOutputMode reads an output mode as --output takes it.
type PluginActionRunner ¶
type PluginActionRunner = engine.PluginActionRunner
type RunOptions ¶
type RunOptions = engine.RunOptions
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
probe
command
|
|
|
e2e
|
|
|
dns-server
command
Command dns-server answers DNS queries for a few records of example.test, over UDP and TCP.
|
Command dns-server answers DNS queries for a few records of example.test, over UDP and TCP. |
|
echo-server
command
Command echo-server echoes a POSTed JSON body back as the data of the response, with the request headers.
|
Command echo-server echoes a POSTed JSON body back as the data of the response, with the request headers. |
|
internal
|
|
|
actionlog
Package actionlog shows the records of an action's process, those the action logs and those go-plugin logs of running it, as the verbose output of a step is laid out, with the secrets of the run hidden.
|
Package actionlog shows the records of an action's process, those the action logs and those go-plugin logs of running it, as the verbose output of a step is laid out, with the secrets of the run hidden. |
|
actionref
Package actionref resolves an action that a step's `uses` names outside Probe to the executable that serves it.
|
Package actionref resolves an action that a step's `uses` names outside Probe to the executable that serves it. |
|
actions
Package actions maps the action names usable in a step's `uses` to the built-in plugins that implement them.
|
Package actions maps the action names usable in a step's `uses` to the built-in plugins that implement them. |
|
actions/dns
Package dns is the dns action: it asks a DNS server for the records of a name, and returns what the server answered.
|
Package dns is the dns action: it asks a DNS server for the records of a name, and returns what the server answered. |
|
actions/file
Package file is the file action: it looks at what is at a path, and reads it when it is a regular file, so that a step can check a log, a file written by what is tested, or that a file has come or gone.
|
Package file is the file action: it looks at what is at a path, and reads it when it is a regular file, so that a step can check a log, a file written by what is tested, or that a file has come or gone. |
|
actions/grpc/testserver
command
|
|
|
actions/smtp/testserver
command
|
|
|
actionspec
Package actionspec declares what Probe knows of a built-in action: how to serve it, the guards it keeps to, and what probe check knows of the keys it takes and the fields it returns.
|
Package actionspec declares what Probe knows of a built-in action: how to serve it, the guards it keeps to, and what probe check knows of the keys it takes and the fields it returns. |
|
actionstate
Package actionstate keeps the state each action leaves between its runs, for the runs of a job and for the calls of an action caller alike.
|
Package actionstate keeps the state each action leaves between its runs, for the runs of a job and for the calls of an action caller alike. |
|
actiontest
Package actiontest helps the tests of the built-in actions keep what each declares of itself to what it does.
|
Package actiontest helps the tests of the built-in actions keep what each declares of itself to what it does. |
|
body
Package body reads a response body by its Content-Type: a body of a textual type is kept as text, and any other body, such as an image or a PDF, is written to a temporary file.
|
Package body reads a response body by its Content-Type: a body of a textual type is kept as text, and any other body, such as an image or a PDF, is written to a temporary file. |
|
check
Package check finds what keeps a workflow from running, or from checking what it seems to, without running it: probe check.
|
Package check finds what keeps a workflow from running, or from checking what it seems to, without running it: probe check. |
|
contractcheck
Package contractcheck holds what the actions that check a step against a contract, the http action's OpenAPI document and the grpc action's .proto files, share: reading the flags of the contract option, the shape of a violation, and handing the result to the runner and to res.
|
Package contractcheck holds what the actions that check a step against a contract, the http action's OpenAPI document and the grpc action's .proto files, share: reading the flags of the contract option, the shape of a violation, and handing the result to the runner and to res. |
|
dag
Package dag provides generic graph algorithms that work with any data structure, and the renderers that draw a workflow's jobs as a graph.
|
Package dag provides generic graph algorithms that work with any data structure, and the renderers that draw a workflow's jobs as a graph. |
|
display
Package display prints a run of a workflow: its report, rendered as text for a terminal, the progress of its jobs, and what a verbose run shows of its steps, with the secrets of the run hidden in all of it.
|
Package display prints a run of a workflow: its report, rendered as text for a terminal, the progress of its jobs, and what a verbose run shows of its steps, with the secrets of the run hidden in all of it. |
|
dump
Package dump lays out the data an action returned, such as the request and the response of a step, as YAML-like lines to be read by a person:
|
Package dump lays out the data an action returned, such as the request and the response of a step, as YAML-like lines to be read by a person: |
|
duration
Package duration reads the durations a workflow is written with: a step's timeout and wait, the interval of a repeat or a retry, and the timeout an action takes.
|
Package duration reads the durations a workflow is written with: a step's timeout and wait, the interval of a repeat or a retry, and the timeout an action takes. |
|
engine
Package engine loads a workflow and runs it: the model of a workflow, the loader that reads it from its files, and the engine that runs its jobs.
|
Package engine loads a workflow and runs it: the model of a workflow, the loader that reads it from its files, and the engine that runs its jobs. |
|
envfile
Package envfile reads files of environment variables, one NAME=value a line, as the .env files many tools keep beside a project.
|
Package envfile reads files of environment variables, one NAME=value a line, as the .env files many tools keep beside a project. |
|
expr
Package expr evaluates the expressions and {{ }} templates of a workflow.
|
Package expr evaluates the expressions and {{ }} templates of a workflow. |
|
fielderr
Package fielderr rewrites the paths of the *expr.FieldError joined into an error, so that a path names the value from where the error is reported.
|
Package fielderr rewrites the paths of the *expr.FieldError joined into an error, so that a path names the value from where the error is reported. |
|
guide
Package guide holds the pages probe guide prints: the reference and concept pages of the documentation, which the binary carries, and the description of an external action, which is read from where the action is.
|
Package guide holds the pages probe guide prints: the reference and concept pages of the documentation, which the binary carries, and the description of an external action, which is read from where the action is. |
|
hostport
Package hostport completes an address an action connects to with the port it is taken at when it names none, so that the guard of a run checks the same host and port the action dials.
|
Package hostport completes an address an action connects to with the port it is taken at when it names none, so that the guard of a run checks the same host and port the action dials. |
|
jsonutil
Package jsonutil decodes and compares the JSON values that actions return.
|
Package jsonutil decodes and compares the JSON values that actions return. |
|
kind
Package kind names the kinds of value an action returns, as an expression reads them once the runner has received them, so that probe check can tell what an expression does with a field before the workflow runs.
|
Package kind names the kinds of value an action returns, as an expression reads them once the runner has received them, so that probe check can tell what an expression does with a field before the workflow runs. |
|
mapping
Package mapping converts between untyped action parameter maps and tagged Go structs.
|
Package mapping converts between untyped action parameter maps and tagged Go structs. |
|
mask
Package mask hides secret values in everything Probe prints or writes.
|
Package mask hides secret values in everything Probe prints or writes. |
|
mask/markdown
Package markdown writes the placeholders Probe puts in place of hidden values so that Markdown shows them, where <secret:NAME> and <redacted> would be taken for something else: an HTML tag on GitHub, which leaves it out, or a link or a mention on Slack.
|
Package markdown writes the placeholders Probe puts in place of hidden values so that Markdown shows them, where <secret:NAME> and <redacted> would be taken for something else: an HTML tag on GitHub, which leaves it out, or a link or a mention on Slack. |
|
notes
Package notes reads the notes an action leaves for people in res.notes: what it found that a later step, such as one that posts to a pull request or to a chat, can pass on, each with the attention it asks for.
|
Package notes reads the notes an action leaves for people in res.notes: what it found that a later step, such as one that posts to a pull request or to a chat, can pass on, each with the attention it asks for. |
|
outcome
Package outcome holds what a run of a workflow came to: the result of each step and job, as it is reported, and the kinds of failure that decide the exit code.
|
Package outcome holds what a run of a workflow came to: the result of each step and job, as it is reported, and the kinds of failure that decide the exit code. |
|
procgroup
Package procgroup stops the process groups that steps leave running in the background once the workflow that started them is over.
|
Package procgroup stops the process groups that steps leave running in the background once the workflow that started them is over. |
|
protocoverage
Package protocoverage counts which methods of a .proto file the steps of a run called, for probe coverage; the grpc action names its calls the same way.
|
Package protocoverage counts which methods of a .proto file the steps of a run called, for probe coverage; the grpc action names its calls the same way. |
|
report
Package report renders the result of a workflow run as files for machines and for people: JSON, JUnit XML, Markdown and the GitHub Actions job summary.
|
Package report renders the result of a workflow run as files for machines and for people: JSON, JUnit XML, Markdown and the GitHub Actions job summary. |
|
safefile
Package safefile writes files that a symlink planted in the current directory must not redirect.
|
Package safefile writes files that a symlink planted in the current directory must not redirect. |
|
scalar
Package scalar writes a scalar value, such as a number or a bool, as the text a workflow compares or passes on.
|
Package scalar writes a scalar value, such as a number or a bool, as the text a workflow compares or passes on. |
|
schedule
Package schedule tells which jobs of a run can start, from the jobs each one needs and how those ended.
|
Package schedule tells which jobs of a run can start, from the jobs each one needs and how those ended. |
|
smtptest
Package smtptest provides an SMTP server for trying the smtp action against: it accepts every message, offers STARTTLS when it has a certificate, and logs each line it reads and writes.
|
Package smtptest provides an SMTP server for trying the smtp action against: it accepts every message, offers STARTTLS when it has a certificate, and logs each line it reads and writes. |
|
style
Package style is how Probe shows a status in a terminal: its icon and its color.
|
Package style is how Probe shows a status in a terminal: its icon and its color. |
|
suggest
Package suggest finds the name that was likely meant by one that is not known, so that an error can ask "did you mean" it.
|
Package suggest finds the name that was likely meant by one that is not known, so that an error can ask "did you mean" it. |
|
textfile
Package textfile reads a text file as the file function of expressions and the file action do, and splits text into its lines.
|
Package textfile reads a text file as the file function of expressions and the file action do, and splits text into its lines. |
|
textwidth
Package textwidth measures text by the columns it takes in a terminal, and cuts it to them, so that what is written beside it lines up whatever characters it has.
|
Package textwidth measures text by the columns it takes in a terminal, and cuts it to them, so that what is written beside it lines up whatever characters it has. |
|
thirdparty
Package thirdparty collects the licenses of what is built into an executable, such as probe or an external action: the modules it links, and the Go standard library.
|
Package thirdparty collects the licenses of what is built into an executable, such as probe or an external action: the modules it links, and the Go standard library. |
|
truncate
Package truncate shortens long values before they are logged or printed, marking where they were cut.
|
Package truncate shortens long values before they are logged or printed, marking where they were cut. |
|
vareval
Package vareval evaluates the templates in vars, those of a workflow and those of a step.
|
Package vareval evaluates the templates in vars, those of a workflow and those of a step. |
|
workflowfile
Package workflowfile finds the files a workflow is written in and reads them, as one text, in the order they are given: a later file overrides what an earlier one wrote.
|
Package workflowfile finds the files a workflow is written in and reads them, as one text, in the order they are given: a later file overrides what an earlier one wrote. |
|
yamlfmt
Package yamlfmt formats the YAML of a workflow, as gofmt formats Go: there is one way a workflow is laid out, and nothing to configure.
|
Package yamlfmt formats the YAML of a workflow, as gofmt formats Go: there is one way a workflow is laid out, and nothing to configure. |
|
yamlnode
Package yamlnode reads the nodes of a parsed workflow and tells the lines of the files it was read from.
|
Package yamlnode reads the nodes of a parsed workflow and tells the lines of the files it was read from. |
|
misc
|
|
|
demo/server
command
Command server is the sign-up service the demo in misc/demo runs Probe against: an HTTP API that keeps its users in a SQLite file, so that a workflow can call an endpoint and then query the row it wrote.
|
Command server is the sign-up service the demo in misc/demo runs Probe against: an HTTP API that keeps its users in a SQLite file, so that a workflow can call an endpoint and then query the row it wrote. |
|
Package sdk is what an action of Probe is written with, and all that an external action imports of Probe: the protocol between the workflow runner and its actions, what reads action.yml, and the caller with which an action calls other actions.
|
Package sdk is what an action of Probe is written with, and all that an external action imports of Probe: the protocol between the workflow runner and its actions, what reads action.yml, and the caller with which an action calls other actions. |
|
markdown
Package markdown writes the placeholders Probe puts in place of hidden values so that Markdown shows them, for an action that posts text with them, such as the notes of a run, where <secret:NAME> and <redacted> would be taken for something else: an HTML tag on GitHub, which leaves it out, or a link or a mention on Slack.
|
Package markdown writes the placeholders Probe puts in place of hidden values so that Markdown shows them, for an action that posts text with them, such as the notes of a run, where <secret:NAME> and <redacted> would be taken for something else: an HTML tag on GitHub, which leaves it out, or a link or a mention on Slack. |