Documentation
¶
Overview ¶
Package builtin is the Go vocabulary manifests name: builtins by slot, reserved names and keys, and the facts predicates read. The implementations live in internal/cli and internal/daemon and register at wiring.
Index ¶
- Constants
- Variables
- func Env(slot FactSlot, inputs []dintent.Input) expr.Env
- func FactProvider(name string) unit.ProviderID
- func FactType(name string) (expr.Type, bool)
- func PREnv() expr.Env
- func WorkflowEnv(slot string) expr.Env
- func WorkflowEnvAll() expr.Env
- type Fact
- type FactSlot
- type Slot
- type StepDef
Constants ¶
const LaunchProbe = "probe"
LaunchProbe is the launch of a probe: a synthetic pull request in the workspace the request names.
const StepTurnStart = "turn.start"
StepTurnStart is the step that starts an agent turn: its reach is its intent's.
Variables ¶
var ActionKeys = map[string]string{
"open": "O",
"take_over": "A",
"skip": "S",
"pause": "H",
"resume": "H",
"run_now": "R",
"mute": "M",
"unmute": "M",
"answer": "W",
"continue": "C",
"dismiss": "X",
"guide": "G",
"trust_run": "T",
"unblock": "D",
}
ActionKeys are the keys of the built-in actions, by id; internal/keys holds the rule they follow.
var Facts = []Fact{}/* 135 elements not displayed */
Facts are the fields predicates read, by slot; inputs.<name> are added per intent by Env. A workflow fact may share a name with an intent fact.
var IntentDims = []string{dintent.DimRound}
IntentDims are the profile dimensions a manifest's dims may list.
var IntentVerbs = []string{string(gtd.VerbApprove), string(gtd.VerbDelegate), string(gtd.VerbDismiss)}
IntentVerbs are the gtd verbs a manifest's verb may name: those an entry bridges to its unit's served action.
var Names = map[Slot][]string{ SlotWorkspace: {"review", "author", "pr_else_main", "given"}, SlotLaunch: {"", LaunchProbe}, SlotPrepare: {"", "nudge.prepare"}, SlotBefore: {"take_over"}, SlotOnSent: {"plan.drop_pending", "event.round_sent", "event.nudged", "record_round", "keeps_guidance", "mark_reviewed", "mark_addressed"}, SlotPolicy: {"round", "probe"}, SlotContext: {"pr", "synthetic"}, SlotReconcile: {"", "my_review"}, }
var RecordStates = []string{string(record.Done), string(record.Settled), string(record.Asked), string(record.Failed)}
RecordStates are the states a manifest's record.states may list.
var ReservedFlags = []string{"--no-wait", "--no-brief", "--turn", "--help"}
ReservedFlags are flags the CLI owns; no input may declare them.
var ReservedNames = []string{
"app", "brief", "config", "doctor", "eval-instructions", "explore", "help", "hook", "init", "install",
"instructions", "intake", "mute", "open", "outbox", "pause", "plan", "profile", "remove", "resume",
"serve", "slack", "status", "take-over", "timings", "track", "trust", "tui", "turn", "uninstall", "unmute", "untrack",
"version", "workflows",
"answer", "brief_refresh", "continue", "dismiss", "guide", "intake_cancel", "intake_without", "remove_force", "skip",
"plan_apply", "plan_dismiss", "run_now", "take_over", "trust_run", "unblock",
"eval", "intents", "settings", "tags", "try",
"association", "base", "kind", "label", "organization", "repo", "risk", "round", "size", "team", "user",
}
ReservedNames are names a user intent may not take: CLI commands, built-in action ids, profile words, dimensions. The loader checks them against user layers only.
var Slots = map[unit.ProviderID]string{unit.GitHub: "pr", unit.Session: "session", unit.Workspace: "workspace"}
Slots name each provider's fact slot.
var Steps = []StepDef{ {"session.close", providers(unit.Session), workflow.ReachLocal, nil, nil, "Closes the agent session."}, {"workspace.remove", providers(unit.Workspace), workflow.ReachLocal, nil, nil, "Removes the workspace, after its guards. Never with `force`: a manifest that sets it fails to load."}, {"workspace.unregister", providers(unit.Workspace), workflow.ReachLocal, nil, nil, "Unregisters a workspace whose path is gone."}, {"turn.dismiss", providers(unit.Session, unit.GitHub), workflow.ReachLocal, []string{"reason"}, nil, "Dismisses the open turn, recording the reason."}, {"answer.refuse", providers(unit.GitHub), workflow.ReachLocal, []string{"reason"}, nil, "Refuses a queued answer whose route is gone."}, {"session.mark_dormant", providers(unit.Session), workflow.ReachLocal, nil, nil, "Marks dormant an active session whose process its manager's census no longer lists: the session stays open, and the next turn wakes it."}, {StepTurnStart, providers(unit.GitHub), "", []string{"intent", "round"}, nil, "Starts a turn: `intent`, and `round` (`first` or `follow-up`) for a review. Caps, the brief, busy and held checks apply as for any automatic round."}, {"classify", nil, workflow.ReachLocal, []string{"prompt", "schema"}, []workflow.TriggerKind{workflow.TriggerEvent}, "A headless classification whose output becomes facts. Event triggers only, cached by fingerprint, under `classify.daily_cap`."}, {"notify.self", nil, workflow.ReachPrivate, []string{"text"}, nil, "A private notification."}, }
Steps is the step vocabulary of workflow manifests.
var WorkflowSlots = []string{"pr", "session", "workspace", "trigger", "config"}
WorkflowSlots are the slots of workflow facts: each provider's, then the trigger's and the config's.
Functions ¶
func FactProvider ¶
func FactProvider(name string) unit.ProviderID
FactProvider is the provider whose units an intent fact describes; "" for a fact of every provider, or a name that is no intent fact.
func PREnv ¶
PREnv is the pull request's own facts of the turn slot, the ones a turn reads before it is built.
func WorkflowEnv ¶
WorkflowEnv is the env of a workflow's when: the facts of slot, trigger.* and config.*.
func WorkflowEnvAll ¶
WorkflowEnvAll is WorkflowEnv over every slot, for a predicate whose workflow is not known yet.
Types ¶
type StepDef ¶
type StepDef struct {
Name string
Providers []unit.ProviderID // empty means any
Reach workflow.Reach // "" for turn.start: the intent decides
Args []string
Trigger []workflow.TriggerKind // empty means any
Doc string
}
StepDef is a workflow step the engine can run: the providers whose units it acts on, its reach, the arguments a manifest may set, the triggers it runs under and what it does.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
factsdoc
command
Command factsdoc prints the generated tables of the facts reference page: the intents' facts, one table per workflow slot, then the workflow steps.
|
Command factsdoc prints the generated tables of the facts reference page: the intents' facts, one table per workflow slot, then the workflow steps. |