builtin

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 27 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 (
	WorkspaceReview = "review"
	WorkspaceAuthor = "author"
)

The workspaces of a round on someone else's pull request and on one you develop.

View Source
const (
	EventMuted     = "muted"
	EventUnmuted   = "unmuted"
	EventHeld      = "held"
	EventReleased  = "released"
	EventAdopted   = "adopted"
	EventTracked   = "tracked"
	EventUntracked = "untracked"
	EventRemoved   = "removed"
	// EventRoundSent and EventRoundUnblocked are a round's, which the
	// host records when a person sends or unblocks it.
	EventRoundSent      = "round_sent"
	EventRoundUnblocked = "round_unblocked"
)

The loop's event kinds the host records itself.

View Source
const (
	EffectPlanCleared    = "plan.cleared"
	EffectGuidanceHanded = "turn.guidance_handed"
	EffectRoundSent      = "turn.round_sent"
	EffectTaskNudged     = "task.nudged"
	EffectUnitClosed     = "unit.closed"
)

The effects the host applies by name.

View Source
const (
	DraftPurpose = "draft.purpose"
	DraftEffects = "draft.effects"
)

DraftPurpose and DraftEffects are the approval facts an intent's rules may not read: a turn's agent names its drafts' purpose and effects.

View Source
const (
	// NoticeAttachNeedsSession is the notice of task attach run outside a workspace manager's session.
	NoticeAttachNeedsSession   = "attach_needs_session"
	NoticeChat                 = "chat"
	NoticeChatTyped            = "chat_typed"
	NoticeChatNotYours         = "chat_not_yours"
	NoticeChatQueued           = "chat_queued"
	NoticeChatStarted          = "chat_started"
	NoticeDraftSent            = "draft_sent"
	NoticeDraftSaved           = "draft_saved"
	NoticeReplyPlaceholder     = "reply_placeholder"
	NoticeReplyButton          = "reply_button"
	NoticeSendReplyPlaceholder = "send_reply_placeholder"
	NoticeSendReplyButton      = "send_reply_button"
	NoticeAnswerPlaceholder    = "answer_placeholder"
	NoticeAnswerButton         = "answer_button"
	NoticeDigestTitle          = "digest_title"
	NoticeDigestNew            = "digest_new"
	NoticeDigestView           = "digest_view"
	NoticeNotifyInbox          = "notify_inbox"
	NoticeNotifyDraftForMe     = "notify_draft_for_me"
	NoticeNotifyReply          = "notify_reply"
	NoticeNotifySendReply      = "notify_send_reply"
	NoticeNotifyQuestion       = "notify_question"
	NoticeNotifyProposal       = "notify_proposal"
	NoticeNotifyPost           = "notify_post"
	NoticeNotifyYes            = "notify_yes"
	NoticeNotifyNo             = "notify_no"
	NoticeNotifyRecommended    = "notify_recommended"
	NoticeNotifyDraft          = "notify_draft"
	NoticeNotifyDraftFailed    = "notify_draft_failed"
	NoticeNotifyOpen           = "notify_open"
	NoticeNotifyDiscard        = "notify_discard"
)

The notices Go names.

View Source
const (
	RoleReview   = "pr.review"
	RoleAddress  = "pr.address"
	RoleNudge    = "pr.nudge"
	RoleProbe    = "probe"
	RoleHeadless = "headless"
	RoleAttach   = "attach"
)

The roles Go resolves an intent by (Registry.ByRole).

View Source
const (
	RoundKindReview  = "review"
	RoundKindAddress = "address"
)

The round kinds a role binds: a review round, first or follow-up by the step's stage, and an address round.

View Source
const (
	PolicyRound = "round"
	PolicyProbe = "probe"
)

The agent policies a role binds: a round's, and the probe's.

View Source
const (
	ContextPR        = "pr"
	ContextSynthetic = "synthetic"
)

The contexts a role binds: a real pull request, and a made-up one.

View Source
const (
	StepTurnDismiss  = "turn.dismiss"
	StepAnswerRefuse = "answer.refuse"
	StepClassify     = "classify"
	StepNotifySelf   = "notify.self"
	StepTaskVerb     = "task.verb"
	StepGateOpen     = "gate.open"
	StepTaskSet      = "task.set"
)

The steps whose arguments the grammar names.

View Source
const BriefSlot = "brief"

BriefSlot is the slot of the facts of a unit's brief.

View Source
const BriefText = "text"

BriefText is the field of a brief record that holds a brief a person or an agent wrote, as markdown.

View Source
const BuildsBrief = "brief"

BuildsBrief is what the brief intent builds, and the kind of the record, of records.toml, that a brief is.

View Source
const ClassifyPrefix = "classify."

ClassifyPrefix names a classify step's output as a fact.

View Source
const DeliveryForm = `draft.delivery == "<delivery>" as a term of the top-level &&`

DeliveryForm is how a rule names a delivery.

View Source
const DraftDelivery = "draft.delivery"

DraftDelivery is the approval fact a rule must pin to a delivery to release a draft of it whose delivery posts.

View Source
const DraftSlot = "draft"

DraftSlot is the slot of the facts a workflow's [withdraw] when reads of each draft it proposed.

View Source
const ExtraPrefix = "brief.extra."

ExtraPrefix names a brief's extra field as a fact.

View Source
const GateSlot = "gate"

GateSlot is the slot of a gate's facts, which a view over gates reads.

View Source
const GroupStart = "start"

GroupStart is the action group of the actions that start or continue a unit's turn, the intents' default.

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 LinkSignalPrefix = "task.link_signal."

LinkSignalPrefix names a signal the plugins report per link, such as stalled, aggregated over the task's links as a bool fact.

View Source
const OfferKind = PropPrefix + "kind"

OfferKind is the task's kind property as an offer reads it, typed a string whatever tasks.toml declares, so an offer compiles before the properties load.

View Source
const PrepareAction = "action:"

PrepareAction prefixes a role's prepare: the plugin action that fills its turn's inputs or refuses the turn, such as "action:nudge.prepare".

View Source
const PropByPrefix = "task.prop_by."

PropByPrefix names who last wrote a task property as a fact, task.prop_by.<name>: person, workflow, agent or plugin, empty while unset.

View Source
const PropPrefix = "task.prop."

PropPrefix names a task property of tasks.toml as a fact, typed from its declaration.

View Source
const ReconcileMyReview = "my_review"

ReconcileMyReview reconciles a review turn with the review the viewer published.

View Source
const RowKindFact = "row.kind"

RowKindFact is the row's situation kind, which each plugin's row_kinds close on its units.

View Source
const StepDraftPropose = "draft.propose"

StepDraftPropose is the step that proposes a draft in the Outbox.

View Source
const StepTurnStart = "turn.start"

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

View Source
const WorkspaceLinkedElseMain = "linked_else_main"

WorkspaceLinkedElseMain runs a turn in the workspace linked to its unit, else in the repository's main checkout.

Variables

View Source
var (
	RoundKinds = []string{RoundKindReview, RoundKindAddress}
	Reconciles = []string{ReconcileMyReview}
	Launches   = []string{LaunchProbe}
	Contexts   = []string{ContextPR, ContextSynthetic}
	Policies   = []string{PolicyRound, PolicyProbe}
)

The host mechanisms a plugin's role may name, by the manifest key that names them.

View Source
var (
	DraftDeliveries = []string{string(draft.Message), string(draft.Reaction)}
	// DraftEmojiDeliveries are the deliveries that post an emoji, which
	// need the reaction argument, and no text.
	DraftEmojiDeliveries = []string{"reaction"}
	DraftItems           = []string{"owed", "resolved", "unowned", "unowned_aged", "all"}
	DraftPer             = []string{"unit", "person"}
	DraftTargets         = []string{"unit", "item"}
	// RepeatForever is repeat_after_sent's value that never proposes again
	// after a draft was sent.
	RepeatForever = "forever"
)

The values of draft.propose's arguments.

View Source
var ActionFacts = slices.Concat(rowActionFacts, draftActionFacts)

ActionFacts are the facts only the action slot reads, what a row offers decides on them, then the draft actions' facts.

View Source
var ActionGroups = []string{GroupStart, "turn", "control", "workspace", "brief", "intake"}

ActionGroups are the groups an action is listed under.

View Source
var ActionKeys = map[string]string{
	"open":      "O",
	"take_over": "A",
	"pause":     "H",
	"resume":    "H",
	"mute":      "M",
	"unmute":    "M",
}

ActionKeys are the keys of the built-in actions, by id; internal/keys holds the rule they follow.

View Source
var ActionSurfaces = []string{"row", "detail", "tui", "menubar", "notification", "cli", "explore"}

ActionSurfaces are where an action may be offered.

View Source
var AnsweringEvents = map[unit.ProviderID]map[string]map[string]string{}

AnsweringEvents are the event kinds of each provider that answer the turn that asked for them, each with the record verdict of its states: what reconcile = "my_review" reads.

AutoOnly are the approval facts only a workflow's rules and the configuration's read.

View Source
var Boards = []string{"review", "author"}

Boards are the workspaces whose board an intent's turns move: a turn in the review or the author workspace moves that board, any other none.

View Source
var BriefSubjects = []string{"task"}

BriefSubjects are the workflow slots whose units may have a brief, which read the brief slot's facts: the task's, and those of the plugins whose manifest says brief_subject.

View Source
var Builds = []string{BuildsBrief}

Builds are what a builder intent may build.

View Source
var BuiltinActionIDs = []string{
	"take_over", "pause", "resume", "mute", "unmute", "track", "untrack",
	"open", "remove", "remove_force",
	"brief_refresh", "intake_without", "intake_cancel",
	"draft.edit", "draft.retry",
	"plan_apply", "plan_dismiss", "plan_guide",
	"run.open", "run.enter", "run.transcript",
}

BuiltinActionIDs are the built-in actions actions.toml words, one table each: a row's, a draft's, a plan item's and a task run's. plan_guide is the plan item's guide, whose wire id is guide.

View Source
var ConfigTiers = cfgValues("fast", "balanced", "frontier")

ConfigTiers are the model tiers a configured call takes, the set core/turns.Tiers holds.

View Source
var DraftRefusals = []string{"", "plugin_off", "state", "posts_nothing"}

DraftRefusals are why a draft's action is disabled: its plugin is off, the draft is in a state the action does not move it from, or its plugin posts nothing.

View Source
var Effects = slices.Clone(coreEffects)

Effects is the effect vocabulary of turns and drafts: the core's, then each plugin's.

View Source
var ErrRuleMarks = errors.New("a rule reads no marks: handled() is for a workflow's when")

ErrRuleMarks refuses a rule's when that calls handled().

View Source
var EventProviders = coreEventProviders()

EventProviders are the event kinds only one provider's units record, by kind: a workflow reacting to one needs that provider. The kinds of the profile's verbs are the task provider's; the loader reads them from tasks.toml.

View Source
var Facts = slices.Concat(ActionFacts, otherFacts, proposalFacts)

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.

GateKeys are the keys of the row actions of the gates a row offers: a pending round's plan gate and a start block's trust gate.

View Source
var Grammar = slices.Concat(intentGrammar, workflowGrammar, stepGrammar, actionsGrammar, configGrammar, profileGrammar, toolsGrammar, tasksGrammar, viewsGrammar, gatesGrammar, recordsGrammar, keysGrammar, noticesGrammar, uiGrammar,
	gateApprovalRows(SurfaceIntent), gateApprovalRows(SurfaceWorkflow))

Grammar is every reserved key of the language.

View Source
var HandlerArgs = map[string][]string{
	"promise":  {"by"},
	"schedule": {"until", "on_activity"},
	"waiting":  {"on", "resurface"},
	"context":  {"set"},
	"area":     {"set"},
}

HandlerArgs are the arguments a verb takes by its handler, which a task.verb step may pass; a verb with no handler, or another, takes none.

View Source
var InputHandlers = []string{"waiting", "schedule", "project", "context", "area", "delegate", "reply", "promise"}

InputHandlers are the handlers that ask for a value before they run: a verb that names one puts its question in input.

View Source
var InputTypes = map[string]expr.Type{"bool": expr.Bool, "text": expr.String, "list": expr.List}

InputTypes are the types an input declares, with the type its fact has.

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

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

View Source
var LinkSignals []string

LinkSignals are the link signals the merged plugins declare, each read as the Bool fact task.link_signal.<name>.

LoopEventKinds are the event kinds the loop records on a unit of any provider, which a workflow's trigger.on names.

View Source
var ManifestRenamedKeys = []Rename{
	{"drafts.approval", "gates.approval"},
	{"drafts.approval.", "gates.approval."},
	{"approval", "gates.approval"},
	{"approval.", "gates.approval."},
}

ManifestRenamedKeys are the keys of an intent's or a workflow's manifest a release renamed, as RenamedKeys.

View Source
var Marks []Mark

Marks are the merged plugins' marks a workflow may read; the core writes none.

Names are the builtins a manifest names, by the key that names them.

View Source
var NoRole = Role{Context: ContextPR, Policy: PolicyRound}

NoRole is what an intent without a role binds.

View Source
var Notices = []ToolAnswer{
	{Name: "answered", Doc: "Typed into an idle session, or the reason that blocks its stop while it works: the user answered Gate of the session's turn, 0 for an answer stored before answers named their gate, of the unit named as the loop's commands read it.",
		Fields: []AnswerField{num("Gate"), str("Unit")}},
	{Name: NoticeChat, Doc: "Typed into a live session of a task when the user writes on the task's chat, or the reason that blocks its next stop while its agent works: the task's id, its own unit as the loop's commands read it, and Capable, whether the session loaded the MCP server. The notice carries no message: the agent reads it with task_read, or with the turn answer command.",
		Fields: []AnswerField{str("Task"), str("Unit"), {Name: "Capable"}}},
	{Name: NoticeChatNotYours, Doc: "Why turn answer refuses a session that has no turn on the task it names, or on a unit the task holds: the unit as the command reads it.",
		Fields: []AnswerField{str("Unit")}},
	{Name: NoticeChatTyped, Doc: "Tells the person that their chat message reached a live session of the task."},
	{Name: NoticeChatQueued, Doc: "Tells the person that their chat message waits for the busy agent of a live session of the task, which is told of it when it stops."},
	{Name: NoticeChatStarted, Doc: "Tells the person that their chat message started a turn of Intent, Resumed when it resumes the task's last session.",
		Fields: []AnswerField{str("Intent"), {Name: "Resumed"}}},
	{Name: NoticeDraftSent, Doc: "Tells the person that the reply they sent at once, Draft, is approved and goes out.", Fields: []AnswerField{num("Draft")}},
	{Name: NoticeDraftSaved, Doc: "Tells the person that the reply they wrote, Draft, waits for their approval.", Fields: []AnswerField{num("Draft")}},
	{Name: NoticeReplyPlaceholder, Doc: "The placeholder of a notification's input that saves a reply for approval."},
	{Name: NoticeReplyButton, Doc: "The button of a notification's input that saves a reply for approval."},
	{Name: NoticeSendReplyPlaceholder, Doc: "The placeholder of a notification's input that sends a reply at once."},
	{Name: NoticeSendReplyButton, Doc: "The button of a notification's input that sends a reply at once."},
	{Name: NoticeAnswerPlaceholder, Doc: "The placeholder of a notification's input that answers an agent."},
	{Name: NoticeAnswerButton, Doc: "The button of a notification's input that answers an agent."},
	{Name: NoticeDigestTitle, Doc: "The title of the daily digest notification."},
	{Name: NoticeDigestNew, Doc: "The digest's first line: Count, the tasks of the badge's views that moved since the last digest.",
		Fields: []AnswerField{num("Count")}},
	{Name: NoticeDigestView, Doc: "The digest's line for one view the badge counts: View, its label, and Count, its tasks.",
		Fields: []AnswerField{str("View"), num("Count")}},
	{Name: NoticeNotifyInbox, Doc: "The title of the notification of a task in the Inbox that says what it is itself."},
	{Name: NoticeNotifyDraftForMe, Doc: "The button of an Inbox task's notification that delegates it to an agent headless."},
	{Name: NoticeNotifyReply, Doc: "The button of a notification whose text input saves a reply for approval, or answers an agent."},
	{Name: NoticeNotifySendReply, Doc: "The button of a notification whose text input sends a reply at once."},
	{Name: NoticeNotifyQuestion, Doc: "The title of the notification of an agent's open question."},
	{Name: NoticeNotifyProposal, Doc: "The title of the notification of an open proposal."},
	{Name: NoticeNotifyPost, Doc: "The title of the notification of an agent's open post."},
	{Name: NoticeNotifyYes, Doc: "The button that answers yes to an agent's confirmation."},
	{Name: NoticeNotifyNo, Doc: "The button that answers no to an agent's confirmation."},
	{Name: NoticeNotifyRecommended, Doc: "The button of the option an agent recommends: Label, the option's label.", Fields: []AnswerField{str("Label")}},
	{Name: NoticeNotifyDraft, Doc: "The title of the notification of a draft that waits for your approval."},
	{Name: NoticeNotifyDraftFailed, Doc: "The title of the notification of a draft whose delivery failed."},
	{Name: NoticeNotifyOpen, Doc: "The button that opens the notification's task in the cockpit."},
	{Name: NoticeNotifyDiscard, Doc: "The button that discards a draft from its notification."},
	{Name: "record_owed", Doc: "The reason that blocks the stop of a session whose turn has no record: the unit, the turn's id and the directory a record file goes in.",
		Fields: []AnswerField{str("Unit"), str("Turn"), str("ScratchDir")}},
	{Name: NoticeAttachNeedsSession, Doc: "Why task attach refuses to run outside an agent session a workspace manager started: the task named as the command reads it, and the enabled workspace managers as displayed.",
		Fields: []AnswerField{str("Task"), str("Managers")}},
}

Notices are what the loop tells an agent's session, and the person about what they wrote, which notices.toml words, and the fields each reads besides Name and Command.

View Source
var OfferFacts = []string{"task.id", OfferKind, "task.state", "task.unit", "task.unit_provider"}

OfferFacts are the facts a verb's offer reads: a task's own, which a list of tasks reads without a store.

View Source
var PRStates = []string{"OPEN", "CLOSED", "MERGED"}

PRStates are a pull request's states as GitHub spells them.

View Source
var PayloadProviders = map[string]unit.ProviderID{}

PayloadProviders are the template roots a provider's payload alone holds, which only an intent of that provider may read: each plugin's payload.

View Source
var PluginDraftKinds = map[unit.ProviderID]DraftKinds{}

PluginDraftKinds are each merged plugin's draft kinds, by provider; the host derives a draft's delivery from its kind through them.

View Source
var PluginSteps = []string{StepAnswerRefuse}

PluginSteps are the steps that run only on the units of the plugins whose manifest lists them in steps; with none, a workflow cannot name them.

View Source
var PluginTaskKinds []string

PluginTaskKinds are the values of the task's kind property the merged plugins' units give their tasks, which tasks.toml's kind takes besides its own.

View Source
var Providers = slices.Sorted(maps.Keys(Slots))

Providers are the providers an intent may serve: those of Slots, and a plugin whose units have no workflow facts adds its own.

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

View Source
var Renamed = []Rename{
	{"entry.units_ended", "task.link_ended"},
	{"entry.unit_started_by_me", "task.link_started_by_me"},
	{"entry.unit_closure_posted", "task.link_closure_posted"},
	{"entry.waiting_on", "task.owed_by"},
	{"entry.items_owed", "task.owed_by"},
	{"entry.kind", "task.prop.kind"},
	{"entry.resurface_at", "task.check_on"},
	{"entry.waiting_days", "task.owed_since"},
	{"entry.since_nudge", "task.prop.last_nudge"},
	{"entry.nudge_due_at", "task.prop.last_nudge"},
	{"entry.muted", "task.wake_until"},
	{"entry.", "task."},
	{"slack.live_entry", "slack.live_task"},
	{"config.gtd.", "config.tasks."},
	{"gtd.", "tasks."},
	{"gtd", "tasks"},
	{"entry", "task"},
	{"entry-results-ended", "task-results-ended"},
	{"guidance.handed", "turn.guidance_handed"},
	{"pr.guidance_handed", "turn.guidance_handed"},
	{"pr.round_sent", "turn.round_sent"},
	{"pr.muted", "task.wake_until"},
	{"pr.mute.refusal", "task.wake_when"},
	{"config.github.", "config.plugins.github."},
	{"draft.approve", "gates.draft.intents.approve"},
	{"draft.discard", "gates.draft.intents.discard"},
	{"run_now", "gates.plan.intents.run_now"},
	{"guide", "gates.plan.intents.guide"},
	{"skip", "gates.plan.intents.skip"},
	{"trust_run", "gates.trust.intents.trust_run"},
	{"unblock", "gates.trust.intents.unblock"},
	{"answer", "gates.question.intents.answer"},
	{"continue", "gates.question.intents.continue"},
	{"dismiss", "gates.question.intents.dismiss"},
	{"session.unread_answers", "session.unread_gates"},
	{"inbox_post", "task_post"},
	{"inbox_read", "task_read"},
}

Renamed are the names a release renamed. A user profile, manifest or config.toml that still writes an old one fails to load, its problem naming the new one: no old name is accepted beside its new one.

View Source
var RenamedFiles = map[string]string{
	"gtd.toml": "its verbs are read from tasks.toml, its views and review from views.toml",
}

RenamedFiles are the profile files a release renamed or split, and where what each held is read now.

View Source
var RenamedKeys = []Rename{
	{"workflows.*.approval", "workflows.*.gates.approval"},
	{"workflows.*.approval.", "workflows.*.gates.approval."},
	{"workflows.*.drafts.approval", "workflows.*.gates.approval"},
	{"workflows.*.drafts.approval.", "workflows.*.gates.approval."},
	{"plugins.*.drafts.approval", "plugins.*.gates.approval"},
	{"plugins.*.drafts.approval.", "plugins.*.gates.approval."},
	{"github.drafts.approval", "plugins.github.gates.approval"},
	{"github.drafts.approval.", "plugins.github.gates.approval."},
	{"slack.drafts.approval", "plugins.slack.gates.approval"},
	{"slack.drafts.approval.", "plugins.slack.gates.approval."},
	{"github", "plugins.github"},
	{"github.", "plugins.github."},
	{"slack", "plugins.slack"},
	{"slack.", "plugins.slack."},
}

RenamedKeys are the configuration keys a release renamed or moved, each with the key that replaced it, the most specific first. An Old ending in "." renames every key it prefixes.

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

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", "store", "take-over", "task", "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", "reviewer", "risk", "size", "stage", "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 RoleDocs = map[task.Role]string{
	task.RoleArea:     "A string: the area filter of the lists and the counters reads it, the area handler sets it, and a new parent takes it from the task it starts with.",
	task.RoleContexts: "A string[]: the contexts filter reads it, the context handler sets it, and a task takes it from the item or the request that opens it.",
	task.RoleStar:     "An enum: the star handler toggles it between its first value, starred, and its second.",
	task.RoleDeadline: "A date: a task takes it from its items' deadline, and a draft's task from its gate's window.",
	task.RolePromise:  "A date: the promise handler sets it to the time you promise the task by, and task.promised reads it.",
}

RoleDocs say what each role does with the property that takes it.

View Source
var Roles = slices.Clone(coreRoles)

Roles are what Go resolves an intent by, a manifest's role: the core's, then each plugin's.

View Source
var RoundProviders []unit.ProviderID

RoundProviders are the providers whose plugin keeps a per-unit count of turns, their manifest's rounds: every automated turn.start on their units spends turns.per_unit_per_day; a workflow starting turns on any other must set limits.per_day.

RowGateKinds are the kinds of the gates whose intents a row offers as its actions.

View Source
var Slots = coreSlots()

Slots name each provider's fact slot: the core providers', and each plugin's.

View Source
var Stages = []string{"first", "follow-up"}

Stages are the passes over a unit: the first, and each one after.

View Source
var Steps = stepsWith(nil)

Steps is the step vocabulary of workflow manifests.

View Source
var TaskSlot = Slots[unit.Task]

TaskSlot is the slot of a task's facts, which the task.prop.* facts of the profile's tasks.toml extend.

View Source
var ToolAnswers = func() []ToolAnswer {
	out := answersOf([]string{"turn_end", "task_post", "task_read"})
	return append(out,
		answer("turn_end", "problem_extra_arguments", "A problem: arguments besides turn and record.", str("Keys")),
		answer("turn_end", "problem_turn_type", "A problem: turn is not a string."),
		answer("turn_end", "problem_turn_required", "A problem: turn is missing or empty."),
		answer("turn_end", "problem_record_required", "A problem: record is missing."),
		answer("turn_end", "problem_record", "A problem: record does not decode.", str("Error")),
		answer("turn_end", "refused_record", "The turn refused the record.", str("Reason")),
		answer("turn_end", "store_failed", "The record could not be stored.", str("Error")),
		answer("turn_end", "recorded", "The record is stored: its state and unit, a note and what was dropped when any, and the ledger's outcome, \"\" when none.",
			str("State"), str("Unit"), str("Note"), str("Dropped"), str("Ledger")),
		answer("turn_end", "ledger_applied", "A part of the ledger's outcome: ops applied.", num("Count")),
		answer("turn_end", "ledger_unchanged", "A part of the ledger's outcome: ops that changed nothing.", num("Count")),
		answer("turn_end", "ledger_proposed", "A part of the ledger's outcome: ops proposed to the user.", num("Count")),
		answer("turn_end", "ledger_refused", "A part of the ledger's outcome: ops refused, and why.", num("Count"), str("Why")),
		answer("turn_end", "ledger_refusal", "Why one op was refused.", num("Index"), str("Reason")),

		answer("task_post", "text_required", "The text is missing."),
		answer("task_post", "capped", "The turn has too many posts waiting.", str("Error")),
		answer("task_post", "not_in_turn", "The session has no started turn.", str("Error")),
		answer("task_post", "post_failed", "The message could not be posted.", str("Error")),
		answer("task_post", "posted", "The message is on the task, waiting on gate Gate.", num("Gate")),

		answer("task_read", "no_turn", "The session has no turn.", str("Error")),
		answer("task_read", "no_gate", "No answer of the session's resolved gate ID.", num("ID")),
		answer("task_read", "not_the_tasks", "The session's turns are on no unit of the task it would read.", str("Error")),
		answer("task_read", "read_failed", "The task could not be read.", str("Error")),
		answer("task_read", "nothing", "Nothing to read: the session's turns are on no task, and no answer of gate ID, or of any gate when ID is 0, waits.", num("ID")),
		answer("task_read", "read", "What was read: the task, its brief record's data, its open gates, the chat since the last read and the conversations, each \"\" when empty.",
			str("Task"), str("Brief"), str("Gates"), str("Chat"), str("Conversations")),
		answer("task_read", "task", "A part of read: the task's id, title and state.", str("ID"), str("Title"), str("State")),
		answer("task_read", "gate", "A part of read: one open gate of the task, its kind, its name in gates.toml and the intents that resolve it.",
			num("ID"), str("Kind"), str("Name"), str("Intents")),
		answer("task_read", "chat_message", "A part of read: one message the user wrote on the task's chat, and when.", str("Text"), str("At")),
		answer("task_read", "conversation", "A part of read: a message, the gate its answers resolved (0 for one stored before answers named their gate), its kind (question or agent_post), its text and options, and its answers.",
			num("Gate"), str("Kind"), str("Text"), str("Options"), str("Answers")),
		answer("task_read", "turn_answers", "A part of read: answers to the session's turns stored before each answer named its message.", str("Answers")),
		answer("task_read", "option", "A part of conversation: one option of the message.", str("ID"), str("Label")),
		answer("task_read", "answer", "A part of conversation: one answer, with its option and the option's label, yes or no, its text and when it was given.",
			str("Option"), str("Label"), str("Choice"), str("Text"), str("At")),
	)
}()

ToolAnswers are the texts each tool answers with, which tools.toml words under [<tool>.answers].

View Source
var ToolProviders = map[string]unit.ProviderID{}

ToolProviders are the merged plugins' tools, by name, to the plugin that declares each; a core tool is not one of them.

View Source
var Tools = []Value{
	{Name: "turn_end", Doc: "Records how the session's turn ended."},
	{Name: "task_post", Doc: "Posts a question or a note on the session's task during a turn, waiting on a gate."},
	{Name: "task_read", Doc: "Reads the session's task: the task, its brief, its open gates, the chat since the last read and the user's answers, and marks them read."},
}

Tools are the tools of the loop's MCP server, which tools.toml describes, one table each.

View Source
var TurnRunners = []string{"session", "headless"}

TurnRunners are the values of turn.start's runner.

TurnStates are the states a turn is in, and the empty value of none.

View Source
var VerbHandlers = []VerbHandler{
	{"finish", "Moves the task to the verb's to; a project's dossier starts its lifecycle."},
	{"drop", "Moves the task to the verb's to; a kind another service serves drops its subject: a draft is discarded, a message's gate refused."},
	{"focus", "Stars the task, or takes the star off: toggles the property of role star."},
	{"schedule", "Hides the task until a date or until its unit moves, then brings it back where it was."},
	{"wake", "Brings a deferred task back where its wake returns it, the first ready state when it names none, and drops the wake."},
	{"waiting", "Records who the task waits on and when it resurfaces."},
	{"approve", "Resolves the task's open gate as approved, or runs its unit's approve action."},
	{"delegate", "Starts a turn on the task, headless or in a session."},
	{"answer", "Answers the task's open question gate with the text it asks for."},
	{"edit", "Edits the text of the task's draft."},
	{"retry", "Sends again the task's approved draft whose delivery failed."},
	{"reply", "Posts a reply or a reaction on the task's unit; the composer's verb."},
	{"project", "Files the task under a parent, creating it from a title."},
	{"context", "Sets the task's contexts: the property of role contexts."},
	{"area", "Sets the task's area: the property of role area."},
	{"seen", "Marks the task seen; clients send it when it opens."},
	{"promise", "Sets the property of role promise to the time its by names: HH:MM, today or tomorrow once that passed; YYYY-MM-DD, 18:00 that day; or an RFC 3339 time. An empty by clears it."},
	{"reviewed", "Marks a parent task reviewed."},
	{"sequential", "Switches a parent task's children between sequential and parallel."},
}

VerbHandlers are the handlers a verb names with handler.

View Source
var WorkflowSlots = slices.Concat(coreUnitSlots, nonUnitSlots)

WorkflowSlots are the slots of workflow facts: each provider's, then the brief's, the draft's, the gate's, the trigger's and the config's.

Functions

func AnswerSamples added in v0.3.0

func AnswerSamples(fields []AnswerField) []map[string]any

AnswerSamples are the data a check renders an answer over, the tool data's included: every field set, then every field empty, so that both branches of a condition on a field run.

func ApprovalEnv added in v0.2.0

func ApprovalEnv(auto bool, slots ...string) expr.Env

ApprovalEnv is the env of a draft gate's rule's when: the approval slot's facts, without AutoOnly unless auto, and the facts of each of slots, never a brief's, which an agent writes.

func ApprovalRule added in v0.2.0

func ApprovalRule(when string, a draft.Approval, env expr.Env) (draft.Rule, error)

ApprovalRule is the [gates.approval] rule of a draft gate, a, whose when is compiled over env. A task.prop.* fact it reads must be typed in env, which only the profile does; one env marks untrusted refuses the rule like an untrusted fact of the table. It names a delivery when its top-level conjunction holds draft.delivery == "<delivery>", the only way a rule releases a draft whose delivery posts.

func BoardOf added in v0.2.0

func BoardOf(workspace string) string

BoardOf is the board a turn in workspace moves, "none" for none.

func DeliveryPosts added in v0.3.0

func DeliveryPosts(d string) bool

DeliveryPosts says whether a draft of delivery d reaches people: a delivery a merged plugin declares posts unless no plugin marks it posts, and one none declares always does.

func DynamicFacts added in v0.2.0

func DynamicFacts(src string) []string

DynamicFacts are the brief.extra.*, classify.* and task.prop.* facts src names outside its string literals: facts the profile declares, which a check without the profile cannot type, so it refuses them in a rule that releases. A brief's extra field and a classification's output are untrusted whatever their name; a property is untrusted when an agent or a plugin writes it, which only the profile says.

func EffectNames added in v0.2.0

func EffectNames() []string

EffectNames are the names of the draft effects: what a draft's effects, a draft.propose's effects and an intent's allowed_effects list.

func EndedFact added in v0.3.0

func EndedFact(p unit.ProviderID) (string, bool)

EndedFact is the workflow fact provider p's plugin says one of its units has ended with; false for a provider whose plugin says nothing.

func EnumProblem added in v0.2.0

func EnumProblem(v string, values []Value) (msg, near string)

EnumProblem says why v is none of values, "" when it is one: the values and the near one, never a value that releases, which a guess must not turn a typo into.

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 ExtraFacts added in v0.2.0

func ExtraFacts(props []jsonschema.Property) expr.Env

ExtraFacts are the brief.extra.<name> facts the brief intent's extra schema declares, typed from its properties: a string (with or without an enum), an integer, a boolean or an array of strings, the types the loader lets a builder's schema hold. A predicate's env is extended with them at load, so naming an undeclared extra fails there.

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 Install added in v0.3.0

func Install(v *Vocabulary)

Install makes v the tables. The composition root installs once, before the configuration and the profile load and before anything else reads the tables; a test that swaps the tables runs alone and restores them.

func IsPredKey added in v0.2.0

func IsPredKey(last string) bool

IsPredKey says whether a key named last holds a predicate somewhere in the language, so a value written without quotes gets the quoting hint.

func IsUntrusted added in v0.2.0

func IsUntrusted(name string) bool

IsUntrusted says whether a rule may not trust the fact name: an agent or a third party sets its value. A brief's extra fields and a classification's output are untrusted whatever their name.

func KeyRenamedTo added in v0.3.0

func KeyRenamedTo(old string) string

KeyRenamedTo is the configuration key that replaced old, "" when old was never renamed.

func ManifestKeyRenamedTo added in v0.3.0

func ManifestKeyRenamedTo(old string) string

ManifestKeyRenamedTo is the manifest key that replaced old, "" when old was never renamed.

func Narrow added in v0.2.0

func Narrow(env expr.Env, providers []unit.ProviderID)

Narrow closes, in env, each fact whose values are declared per provider to the values of providers: their union when each of them declares a set, and any value when one does not or providers is empty.

func NeverNamesADelivery added in v0.3.0

func NeverNamesADelivery(r draft.Rule) bool

NeverNamesADelivery says that r releases and reads draft.delivery, yet pins it to no delivery: a form such as draft.delivery in ["comment"] reads as one that may release a draft that posts, and never does.

func OfferEnv added in v0.3.0

func OfferEnv() expr.Env

OfferEnv is the env of a verb's offer in tasks.toml.

func OrList added in v0.2.0

func OrList(names []string) string

OrList is names quoted, as "a", "b" or "c".

func PropFactType added in v0.3.0

func PropFactType(t task.PropType) expr.Type

PropFactType is the type of the fact task.prop.<name> of a property of type t: an enum, an actor and a string read as a string (an actor as its key), a list type as a list. An int or a duration of 0 reads as unset.

func RenamedTo added in v0.3.0

func RenamedTo(old string) string

RenamedTo is the name that replaced old, "" when old was never renamed.

func RenderToolText added in v0.3.0

func RenderToolText(w io.Writer, name, src string, data map[string]any) error

RenderToolText writes the tools.toml text src, named name, over data.

func RoleNames added in v0.2.0

func RoleNames() []string

RoleNames are the names of Roles.

func StepArgs added in v0.2.0

func StepArgs(use string) []string

StepArgs are the arguments step use takes, in the grammar's order.

func TimeVarying added in v0.2.0

func TimeVarying(name string) bool

TimeVarying says whether the workflow fact name changes as time passes with nothing else changing; false for a name that is no workflow fact.

func TriggerEventKinds added in v0.3.0

func TriggerEventKinds() []string

TriggerEventKinds are the event kinds a workflow's trigger.on names: the loop's, the plugins' and the task's.

func TurnEffectNames added in v0.2.0

func TurnEffectNames() []string

TurnEffectNames are the names of the turn effects: what an intent's effects list.

func TurnEnv added in v0.3.0

func TurnEnv() expr.Env

TurnEnv is every provider's own facts of the turn slot, the ones a turn reads before it is built.

func UnitSlots added in v0.2.0

func UnitSlots() []string

UnitSlots are the workflow slots of every provider's units.

func ValueNames added in v0.2.0

func ValueNames(values []Value) []string

ValueNames are the names of values.

func WithdrawEnv added in v0.2.0

func WithdrawEnv(slot string) expr.Env

WithdrawEnv is the env of a workflow's [withdraw] when: WorkflowEnv(slot) and the draft slot's facts.

func WorkflowEnv

func WorkflowEnv(slot string) expr.Env

WorkflowEnv is the env of a workflow's when: the facts of slot, the brief's when slot is one of BriefSubjects, 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 AnswerField added in v0.3.0

type AnswerField struct {
	Name   string
	Number bool
}

AnswerField is a field an answer reads: a string, or a number when Number.

type Applies added in v0.2.0

type Applies int

Applies says what an effect applies on: a sent turn (an intent's effects) or a sent draft (a draft.propose's effects and an intent's [drafts] allowed_effects).

const (
	AppliesTurn Applies = 1 << iota
	AppliesDraft
)

type DraftKinds added in v0.3.0

type DraftKinds struct {
	Kinds   []manifest.DraftKind
	Default string
}

DraftKinds are a plugin's draft kinds and the delivery of a draft whose kind names none.

type Effect added in v0.2.0

type Effect struct {
	Name string
	// Provider is the provider whose turns or drafts alone may name it; ""
	// any.
	Provider unit.ProviderID
	Applies  Applies
	Doc      string
	// Plugin says a draft effect applies through the unit's plugin, so it
	// waits while that plugin is not built.
	Plugin bool
}

Effect is what sending a turn or a draft applies, by name.

func EffectOf added in v0.2.0

func EffectOf(name string) (Effect, bool)

EffectOf is the effect named name.

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
	// Subjects are the workflow slots besides Slot whose when reads the
	// fact: the brief slot's facts are read on every unit that has a brief.
	Subjects []string
	// Dim makes the fact a profile dimension: a block path condition under
	// the intents of its provider.
	Dim bool
	// Enum are the fact's values by provider, "" standing for every
	// provider; a provider absent takes any value.
	Enum map[unit.ProviderID][]string
	// Untrusted says that a third party's text, read by the extraction, the
	// proposing turn itself or an agent's brief sets the fact's value, so
	// no rule of a draft gate, nor one that releases a gate, may read it.
	Untrusted bool
	// TimeVarying says that the fact changes as time passes with nothing
	// else changing, so no workflow key may hold it.
	TimeVarying bool
}

type FactSlot

type FactSlot string
const (
	ActionSlot   FactSlot = "action"
	TurnSlot     FactSlot = "turn"
	WorkflowSlot FactSlot = "workflow"
	// ApprovalSlot holds the draft's own facts a draft gate's rule
	// reads besides its unit's.
	ApprovalSlot FactSlot = "approval"
	// NameSlot holds the facts a manifest's session.name reads.
	NameSlot FactSlot = "name"
)
const DraftActionSlot FactSlot = "draft_action"

DraftActionSlot holds the facts the texts of a draft's built-in actions read.

const ProposalSlot FactSlot = "proposal"

ProposalSlot holds the facts the words of an item proposal's gate read.

type GateKey added in v0.3.0

type GateKey struct {
	Kind gate.Kind
	Role GateRole
	Key  string
}

GateKey is the key of the row action an intent of a row's open gate of Kind takes when it has Role: the first intent of each role takes it.

type GateRole added in v0.3.0

type GateRole string

GateRole is what an intent of a gate does, which its status and answer say: approves the gate, takes text, or refuses it.

const (
	GateApproves  GateRole = "approves"
	GateTakesText GateRole = "takes text"
	GateRefuses   GateRole = "refuses"
)

func GateRoleOf added in v0.3.0

func GateRoleOf(status gate.Status, answer bool) GateRole

GateRoleOf is the role of an intent resolving to status, taking text when answer; "" for any other.

type Key added in v0.2.0

type Key struct {
	Path string
	In   Surface
	// Step is the step whose argument the key is, for In == SurfaceStep.
	Step string
	Kind Kind
	// Elem is a list's element kind, for Kind == KindList.
	Elem Kind
	// Values are an enum's values, from the table that owns the set.
	Values  func() []Value
	Default string
	Doc     string
	// Required says that the table holding the key must set it.
	Required bool
}

Key is one reserved key of the language. Path is dotted, "[]" marks an array of tables and "*" a name the author chooses: "action.refuse[].why", "inputs.*.type", "workflows.*.approval.mode".

func StepArg added in v0.2.0

func StepArg(use, k string) (Key, bool)

StepArg is the grammar row of step use's argument k.

func StepFiles added in v0.2.0

func StepFiles(use string) []Key

StepFiles are the rows of step use's arguments that name a file beside the manifest, which the loader reads. draft.propose reads its text as it renders, since an emoji draft has none.

type Kind added in v0.2.0

type Kind int

Kind is what a key's value is.

const (
	KindPred     Kind = iota + 1 // a predicate's source
	KindFact                     // a fact's name
	KindTemplate                 // an inline text/template
	KindFile                     // a file beside the manifest
	KindEnum                     // one of Values
	KindDur                      // a duration (internal/domain/duration)
	KindBool
	KindInt
	KindText
	KindList // a list of Elem
	KindTable
	KindMap    // a table whose keys an author names
	KindAny    // more than one form, which its decoder reads
	KindNumber // an integer or a decimal
)

type Mark added in v0.2.0

type Mark struct {
	Name, Doc string
	Provider  string
}

Mark is a mark a plugin writes that a workflow may read with handled().

type Problem added in v0.2.0

type Problem struct {
	Path string
	Msg  string
	// Near is the value or key the message suggests, "" when none.
	Near string
	// Unknown says that no row names the key.
	Unknown bool
}

Problem is a key Check refuses, at its dotted path in the document.

func Check added in v0.2.0

func Check(surface Surface, doc map[string]any) []Problem

Check walks doc, a document of surface decoded without a schema (a TOML table or a JSON object as map[string]any), against the grammar: unknown keys and values, with did-you-mean, kinds and enums. A surface the grammar has no row of refuses every key.

func CheckStep added in v0.2.0

func CheckStep(use string, args map[string]any) []Problem

CheckStep is Check on the arguments of a workflow step, use, without use itself.

type Rename added in v0.3.0

type Rename struct {
	Old, New string
}

Rename is a name the profile language no longer has and the name that replaced it. An Old ending in "." renames every name it prefixes.

type Role added in v0.2.0

type Role struct {
	Name string
	Doc  string
	// Provider is the provider whose units the role's turns run on; "" any.
	Provider unit.ProviderID
	// RoundKind is the sweep round its turns are; "" none.
	RoundKind string
	// Reconcile, Prepare, Launch: builtins its turns run; "" none.
	Reconcile, Prepare, Launch string
	// Workspace is the workspace builtin its holder names; "" any.
	Workspace string
	// Context is what its turn is about; Policy the agent policy of its
	// sessions.
	Context, Policy string
	// DrivesRow says its turns drive the row of the workspace they run in;
	// a user intent taking the role takes it over.
	DrivesRow bool
	// PerSession says a turn of its intent replaces only the open turns of
	// that intent on its own session, so every session holding it is a run
	// of its own.
	PerSession bool
}

Role is what an intent's role binds it to: the plugin mechanism Go runs its turns with.

func RoleOf added in v0.2.0

func RoleOf(name string) (Role, bool)

RoleOf is the role named name; NoRole and false when there is none.

type Slot

type Slot string
const (
	SlotWorkspace Slot = "workspace"
	SlotBefore    Slot = "before"
)

type StepDef

type StepDef struct {
	Name      string
	Providers []unit.ProviderID      // empty means any
	Reach     workflow.Reach         // "" for turn.start: the intent decides
	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 triggers it runs under and what it does. Its arguments are its rows of the grammar (StepArgs).

type SubjectsError added in v0.2.0

type SubjectsError struct{ Subjects []string }

SubjectsError refuses a rule's when that reads the facts of two subjects, which no draft has.

func (*SubjectsError) Error added in v0.2.0

func (e *SubjectsError) Error() string

type Surface added in v0.2.0

type Surface string

Surface is a file kind of the profile language, or the configuration.

const (
	SurfaceIntent   Surface = "intent"   // intents/<name>/intent.toml
	SurfaceWorkflow Surface = "workflow" // workflows/<name>/workflow.toml
	SurfaceStep     Surface = "step"     // a workflow step's arguments
	SurfaceActions  Surface = "actions"  // actions.toml
	SurfaceDefaults Surface = "defaults" // defaults.toml
	SurfaceLabels   Surface = "labels"   // labels.toml
	SurfaceTools    Surface = "tools"    // tools.toml
	SurfaceTasks    Surface = "tasks"    // tasks.toml
	SurfaceViews    Surface = "views"    // views.toml
	SurfaceGates    Surface = "gates"    // gates.toml
	SurfaceRecords  Surface = "records"  // records.toml
	SurfaceKeys     Surface = "keys"     // keys.toml
	SurfaceNotices  Surface = "notices"  // notices.toml
	SurfaceUI       Surface = "ui"       // a plugin layer's ui.toml
	SurfaceBlock    Surface = "block"    // a judgment block's front matter
	SurfaceConfig   Surface = "config"   // config.toml
)

type ToolAnswer added in v0.3.0

type ToolAnswer struct {
	Tool, Name, Doc string
	Fields          []AnswerField
}

ToolAnswer is a text a tool answers with, by name, and the fields it reads besides the ToolData's.

func AnswerOf added in v0.3.0

func AnswerOf(tool, name string) (ToolAnswer, bool)

AnswerOf is tool's answer name, false when the tool has none.

func NoticeOf added in v0.3.0

func NoticeOf(name string) (ToolAnswer, bool)

NoticeOf is the notice name, false when there is none.

type ToolData added in v0.3.0

type ToolData struct {
	// Name is the product's name, Command its command.
	Name, Command string
	// PostsPerTurn is how many task_post messages of a turn wait at once.
	PostsPerTurn int
}

ToolData is what every tools.toml text reads.

func (ToolData) Map added in v0.3.0

func (d ToolData) Map() map[string]any

Map is d as the fields of a template.

type UntrustedError added in v0.2.0

type UntrustedError struct{ Fact string }

UntrustedError refuses a rule's when that reads an untrusted fact.

func (*UntrustedError) Error added in v0.2.0

func (e *UntrustedError) Error() string

type Value added in v0.2.0

type Value struct {
	Name string
	Doc  string
	// Releases says that the value lets a send or a run go with no person
	// approving it, which no did-you-mean suggests.
	Releases bool
}

Value is one value of an enum key.

func GateModes added in v0.3.0

func GateModes() []Value

GateModes are the modes of a [gates.approval] table, gate.Modes.

func NameValues added in v0.2.0

func NameValues(slot Slot) []Value

NameValues are the builtins of slot, with what each is.

func StepValuesOf added in v0.2.0

func StepValuesOf(use, arg string) []Value

StepValuesOf are the values of step use's enum argument arg.

func ValuesOf added in v0.2.0

func ValuesOf(surface Surface, path string) []Value

ValuesOf are the values of the enum key at path of surface, the table's set that a decoder checks a value against; nil when the key is no enum.

type VerbHandler added in v0.3.0

type VerbHandler struct{ Name, Doc string }

VerbHandler is a handler a verb of tasks.toml may run besides its move.

type Vocabulary added in v0.3.0

type Vocabulary struct {
	// contains filtered or unexported fields
}

Vocabulary is the tables the core rows and some source plugins' vocabularies make. Install makes it the tables every reader reads.

func Installed added in v0.3.0

func Installed() *Vocabulary

Installed is the vocabulary the tables hold, for a test to restore.

func Merge added in v0.3.0

func Merge(srcs ...*manifest.Source) (*Vocabulary, error)

Merge is the vocabulary of the core rows and the [source] tables of srcs: their slots, facts, effects, roles, row kinds, deliveries, event kinds, payload root, brief subject, rounds and task kinds. A source that does not fit the host (a core provider or slot, a name another plugin or the core declares, a role naming no host mechanism) is left out, and the error names it; the vocabulary holds the others.

Directories

Path Synopsis
Package builtintest swaps the builtin tables for a test.
Package builtintest swaps the builtin tables for a test.
cmd
factsdoc command
Command factsdoc prints the facts reference page: the intents' facts and the workflow facts, each grouped by slot, the draft approval facts, the workflow steps, then the draft effects.
Command factsdoc prints the facts reference page: the intents' facts and the workflow facts, each grouped by slot, the draft approval facts, the workflow steps, then the draft effects.
grammardoc command
Command grammardoc writes what the grammar table derives: the JSON schemas of the profile files and the configuration, the generated tables of the manifest and configuration reference pages, and the language page.
Command grammardoc writes what the grammar table derives: the JSON schemas of the profile files and the configuration, the generated tables of the manifest and configuration reference pages, and the language page.

Jump to

Keyboard shortcuts

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