builtin

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const LaunchProbe = "probe"

LaunchProbe is the launch of a probe: a synthetic pull request in the workspace the request names.

View Source
const StepTurnStart = "turn.start"

StepTurnStart is the step that starts an agent turn: its reach is its intent's.

Variables

View Source
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.

View Source
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.

View Source
var IntentDims = []string{dintent.DimRound}

IntentDims are the profile dimensions a manifest's dims may list.

IntentVerbs are the gtd verbs a manifest's verb may name: those an entry bridges to its unit's served action.

View Source
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"},
}

RecordStates are the states a manifest's record.states may list.

View Source
var ReservedFlags = []string{"--no-wait", "--no-brief", "--turn", "--help"}

ReservedFlags are flags the CLI owns; no input may declare them.

View Source
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.

View Source
var Slots = map[unit.ProviderID]string{unit.GitHub: "pr", unit.Session: "session", unit.Workspace: "workspace"}

Slots name each provider's fact slot.

View Source
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.

View Source
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 Env

func Env(slot FactSlot, inputs []dintent.Input) expr.Env

Env is the slot's facts plus, for the turn slot, the intent's declared inputs.

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 FactType

func FactType(name string) (expr.Type, bool)

FactType is the type of the workflow fact name.

func PREnv

func PREnv() expr.Env

PREnv is the pull request's own facts of the turn slot, the ones a turn reads before it is built.

func WorkflowEnv

func WorkflowEnv(slot string) expr.Env

WorkflowEnv is the env of a workflow's when: the facts of slot, trigger.* and config.*.

func WorkflowEnvAll

func WorkflowEnvAll() expr.Env

WorkflowEnvAll is WorkflowEnv over every slot, for a predicate whose workflow is not known yet.

Types

type Fact

type Fact struct {
	Name  string
	Type  expr.Type
	Slots []FactSlot
	Doc   string
	Slot  string // a workflow fact's slot: one of WorkflowSlots
	// Provider is the provider whose intents alone may read the fact; "" for every provider.
	Provider unit.ProviderID
}

type FactSlot

type FactSlot string
const (
	ActionSlot   FactSlot = "action"
	TurnSlot     FactSlot = "turn"
	WorkflowSlot FactSlot = "workflow"
)

type Slot

type Slot string
const (
	SlotWorkspace Slot = "workspace"
	SlotLaunch    Slot = "launch"
	SlotPrepare   Slot = "prepare"
	SlotBefore    Slot = "before"
	SlotOnSent    Slot = "on_sent"
	SlotPolicy    Slot = "policy"
	SlotContext   Slot = "context"
	SlotReconcile Slot = "reconcile"
)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL