Documentation
¶
Overview ¶
Package intent loads intent manifests from the bundled profile and the user's layers into one registry; import it as intentload.
Index ¶
- Constants
- Variables
- func ActionFactMap(get func(name string) any) map[string]any
- func ActionText(path, src string, sample map[string]any) (*template.Template, error)
- func BundledGates(bundled fs.FS) (GatesDef, Problems)
- func BundledKeys(bundled fs.FS) (KeyTexts, Problems)
- func BundledTasks(bundled fs.FS) (TasksDef, Problems)
- func BundledViews(bundled fs.FS) (ViewsDef, Problems)
- func ByEnv(d TasksDef) expr.Env
- func DefaultApproval(k gate.Kind, gates GatesDef) workflow.Approval
- func DefaultDraftApproval(gates GatesDef) draft.Approval
- func DraftActionFactMap(get func(name string) any) map[string]any
- func GateFacts(g gate.Gate, delivery string) workflow.Facts
- func HeadlineName(i int) string
- func KeyActions() map[string][]string
- func Load(layers []profile.Layer, bundled fs.FS, base *template.Template, ...) (*Loaded, Problems)
- func NestFacts(env expr.Env, get func(name string) any) map[string]any
- func OverlayDraftApproval(base *draft.Policy, def draft.Approval, o ApprovalOverlay, envs ApprovalEnvs) (draft.Policy, error)
- func OverlayRunApproval(a workflow.Approval, k gate.Kind, o ApprovalOverlay, envs ApprovalEnvs) (workflow.Approval, error)
- func OwedByEnv(d TasksDef) expr.Env
- func ProposalFacts(get func(name string) any) map[string]any
- func RefusalText(i int) string
- func RefuseWhyName(i int) string
- func SampleActionFacts() map[string]any
- func SampleDraftActionFacts() map[string]any
- func TurnEnv(d dintent.Def) expr.Env
- func ValidRepo(name string) bool
- func ViewEnv(over string, tasks TasksDef) expr.Env
- type ActionPrograms
- type ApprovalEnvs
- type ApprovalOverlay
- type BuiltinAction
- type Cache
- type CacheOptions
- type GateApproval
- type GateDef
- type GateIntent
- type GateRule
- type GatesDef
- type KeyTexts
- type Loaded
- func (l *Loaded) BrokenNames() []dintent.Name
- func (l *Loaded) Refusal(name dintent.Name, facts map[string]any) (string, error)
- func (l *Loaded) Rules(intent string) (dintent.RecordRules, error)
- func (l *Loaded) SessionName(name dintent.Name, facts map[string]any) (string, error)
- func (l *Loaded) TargetTitle(name dintent.Name, guidance string) (string, error)
- func (l *Loaded) Tree() (profile.Tree, error)
- func (l *Loaded) Why(name dintent.Name, facts map[string]any) (string, error)
- func (l *Loaded) WorkspaceName(name dintent.Name, facts map[string]any) (string, error)
- type Problem
- type Problems
- type Programs
- type PropDef
- type RecordKind
- type RecordsDef
- type RefusalProgram
- type ReviewStepDef
- type RuleOverlay
- type SortKey
- type StateDef
- type TasksDef
- func (d TasksDef) CategoryOf(state string) (task.Category, bool)
- func (d TasksDef) Facts() expr.Env
- func (d TasksDef) FirstOf(c task.Category) string
- func (d TasksDef) Handler(verb string) string
- func (d TasksDef) HeldProblems(held []string) Problems
- func (d TasksDef) Move(verb string) ([]string, string, bool)
- func (d TasksDef) Parse(name, text string, loc *time.Location) (task.Value, error)
- func (d TasksDef) Prop(name string) (PropDef, bool)
- func (d TasksDef) PropOf(r task.Role) (string, []string)
- func (d TasksDef) Untrusted(name string) bool
- func (d TasksDef) VerbKinds() []string
- type TemplateCheck
- type ToolText
- type UIEvent
- type UIFacet
- type UIField
- type UISearch
- type UISearchFilter
- type UISearchPreset
- type UISearchSort
- type UITexts
- type UIView
- type VerbText
- type ViewDef
- type ViewsDef
Constants ¶
const ( WorkspaceNameName = "workspace.name" TargetTitleName = "target.title" )
WorkspaceNameName and TargetTitleName are the names workspace.name and target.title are parsed under.
const ActionsFile = "actions.toml"
ActionsFile is the profile file that words the built-in actions.
const DefaultChanged = "The head moved since the question: re-check what changed before acting on the answer."
DefaultChanged is resume.changed when a manifest leaves it out: the generic sentence of resume.md.tmpl.
const DefaultsFile = "defaults.toml"
DefaultsFile is the profile file of the manifests' defaults, read from the bundled profile and then each layer, a later layer's key winning.
const GatesFile = "gates.toml"
GatesFile is the profile file that declares and words the gates.
const KeysFile = "keys.toml"
KeysFile is the profile file that words the core keys' help.
const NoticesFile = "notices.toml"
NoticesFile is the profile file that words what the loop tells a session.
const RecordsFile = "records.toml"
RecordsFile is the profile file that declares the record kinds.
const SessionNameName = "session.name"
SessionNameName is the name session.name is parsed under.
const TasksFile = "tasks.toml"
TasksFile is the profile file that declares the task properties and states and words the verbs a task offers.
const ToolsFile = "tools.toml"
ToolsFile is the profile file that describes the MCP tools.
const UIFile = "ui.toml"
UIFile is the file of a plugin's profile layer that words the views, facets, situations and menu bar sections its manifest declares.
const ViewsFile = "views.toml"
ViewsFile is the profile file that declares the views, the review and the badge.
const WhyName = "manifest.why"
The names the manifest's other inline templates are parsed under in an intent's template set.
Variables ¶
var ActionFuncs = template.FuncMap{"join": strings.Join, "name": func() string { return brand.Name }, "command": func() string { return brand.Command }}
ActionFuncs are the functions action texts may call.
var ActionsSchema []byte
ActionsSchema is the JSON Schema of actions.toml, for editors.
var ByFacts = []string{"task.id", "task.state", "task.category", "task.unit", "task.unit_provider"}
ByFacts are the facts a verb's by reads besides the task.prop.* of tasks.toml: the task's own, which the authority reads off the task with no facts provider at hand.
var ConfigSchema []byte
ConfigSchema is the JSON Schema of config.toml, for editors.
var GateKinds = slices.DeleteFunc(slices.Clone(gate.Kinds), func(k gate.Kind) bool { return k == gate.KindDraft || k == gate.KindPlan })
GateKinds are the kinds of the gates a workflow's gate.open steps open: every kind but draft and plan, which its drafts and runs are.
var GatesSchema []byte
GatesSchema is the JSON Schema of gates.toml, for editors.
var KeysSchema []byte
KeysSchema is the JSON Schema of keys.toml, for editors.
var NameFuncs = template.FuncMap{"slug": slug, "firstLine": firstLine, "title": title}
NameFuncs are the functions a manifest's names may call: slug, a text as lowercase words joined by dashes; firstLine, its first non-blank line, trimmed; and title n, that line without its markdown heading marks, cut at its last whole word within n runes.
var OwedFacts = []string{"task.owed_by", "task.owed_since", "task.check_on"}
OwedFacts are the task facts owed_by.expr may not read: those its value makes.
var RecordsSchema []byte
RecordsSchema is the JSON Schema of records.toml, for editors.
var Schema []byte
Schema is the JSON Schema of intent.toml, for editors (Taplo's #:schema directive).
var TasksSchema []byte
TasksSchema is the JSON Schema of tasks.toml, for editors.
var ViewsSchema []byte
ViewsSchema is the JSON Schema of views.toml, for editors.
var WorkflowSchema []byte
WorkflowSchema is the JSON Schema of workflow.toml, for editors.
Functions ¶
func ActionFactMap ¶
ActionFactMap nests dotted action facts into the map action texts execute over: {"pr": {"slug": ...}, "row": {"question": ...}}.
func ActionText ¶ added in v0.2.0
ActionText parses an action text named path and executes it once over sample, so a text that cannot render fails at load.
func BundledGates ¶ added in v0.3.0
BundledGates is the gates.toml of bundled alone.
func BundledKeys ¶ added in v0.3.0
BundledKeys is the key help of the bundled profile alone.
func BundledTasks ¶ added in v0.3.0
BundledTasks is the bundled profile's tasks.toml alone.
func BundledViews ¶ added in v0.3.0
BundledViews is the views of the bundled profile alone.
func ByEnv ¶ added in v0.3.0
ByEnv is the env a verb's by compiles over: ByFacts and d's properties.
func DefaultApproval ¶ added in v0.3.0
DefaultApproval is gates.toml's default for a gate of kind k, a kind but draft, as a run approval.
func DefaultDraftApproval ¶ added in v0.3.0
DefaultDraftApproval is gates.toml's default for a draft gate.
func DraftActionFactMap ¶ added in v0.2.0
DraftActionFactMap is ActionFactMap for the texts of a draft's actions.
func GateFacts ¶ added in v0.3.0
GateFacts are g's facts in slot gate, which a gates.toml rule and a view over gates read; delivery is a draft gate's delivery state, as the Outbox reads it from its draft, "" for any other gate.
func HeadlineName ¶
HeadlineName is the name a headline text is parsed under in an intent's template set: "headline.resumed", "headline.new[0]", ...
func KeyActions ¶ added in v0.3.0
KeyActions are the actions keys.toml words, by context: one per core action, a numbered one as <name>:{n}.
func Load ¶
func Load(layers []profile.Layer, bundled fs.FS, base *template.Template, check TemplateCheck) (*Loaded, Problems)
Load reads intents/ of the bundled FS and of each directory layer; check may be nil. The partials under partials/ of each directory layer are parsed over base's; one that does not parse, or that a problem names, is left out and the bundled partials load instead. Layers with an empty Dir are skipped: the bundled intents come from bundled only. A user directory named as a bundled intent overrides its files one by one; when the result does not load, the bundled intent stays and the problems name the user's files.
func NestFacts ¶ added in v0.2.0
NestFacts nests the dotted facts of env into the map an inline template executes over, {"pr": {"slug": ...}}, each read by get; a fact get has no value for reads as its type's zero value.
func OverlayDraftApproval ¶ added in v0.2.0
func OverlayDraftApproval(base *draft.Policy, def draft.Approval, o ApprovalOverlay, envs ApprovalEnvs) (draft.Policy, error)
OverlayDraftApproval is base, a workflow's draft policy (nil: def, gates.toml's default for a draft gate), with o laid over it, o's rules for draft gates compiled over envs. The merged policy is validated.
func OverlayRunApproval ¶ added in v0.2.0
func OverlayRunApproval(a workflow.Approval, k gate.Kind, o ApprovalOverlay, envs ApprovalEnvs) (workflow.Approval, error)
OverlayRunApproval is a, a workflow's approval of its gates of kind k (a kind but draft), with o laid over it, o's rules for k compiled over envs. A mode that does not apply to k leaves a's. The merged approval is validated, and a releasing rule of o may not read an untrusted fact.
func OwedByEnv ¶ added in v0.3.0
OwedByEnv is the env owed_by.expr compiles over: the task's workflow facts but OwedFacts, and d's properties.
func ProposalFacts ¶ added in v0.3.0
ProposalFacts are the proposal facts, each value got by its name.
func RefusalText ¶ added in v0.2.0
RefusalText is the ActionTexts key of the why of refusal i.
func RefuseWhyName ¶ added in v0.2.0
RefuseWhyName is the name refuse[i].why is parsed under.
func SampleActionFacts ¶
SampleActionFacts is the action fact map with every fact set, for checking texts.
func SampleDraftActionFacts ¶ added in v0.2.0
SampleDraftActionFacts is SampleActionFacts for a draft's actions.
func TurnEnv ¶ added in v0.2.0
TurnEnv is the env an intent's turn predicates and inline texts read: the turn slot's facts and its inputs, turn.stage only with the stage dimension.
Types ¶
type ActionPrograms ¶ added in v0.2.0
type ActionPrograms struct {
When *expr.Program
Primary *expr.Program
Refuse []RefusalProgram
// ActionTexts are note, warning, confirm and each refusal's why
// ("refuse[<i>].why"), over the action fact map.
ActionTexts map[string]*template.Template
}
ActionPrograms are an intent's compiled [action] predicates and texts.
type ApprovalEnvs ¶ added in v0.3.0
ApprovalEnvs are what an overlay rule of a workflow reads: Draft over a draft gate's facts and its unit's, Unit over its unit's for any other kind.
type ApprovalOverlay ¶ added in v0.2.0
type ApprovalOverlay struct {
Mode string
Window *time.Duration
Rules []RuleOverlay
}
ApprovalOverlay is the configuration's [gates.approval] of a workflow, laid over its manifest's field by field: a set Mode or Window replaces that field, and non-nil Rules replace the rules, an empty list clearing them. A Mode other than delay drops the manifest's window, which JSON cannot unset.
type BuiltinAction ¶ added in v0.2.0
type BuiltinAction struct {
Label, Summary string
Input struct{ Label, Help string }
// Texts are note, warning, confirm and why, parsed; a text the table
// leaves empty is absent.
Texts map[string]*template.Template
}
BuiltinAction is a built-in action's texts, from its actions.toml table.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache reloads when the newest mtime under the user layer's intents/ and blocks changes; safe for concurrent use.
type CacheOptions ¶
type CacheOptions struct {
// Recheck is how long a stamp is trusted before the layers are walked again.
Recheck time.Duration
// Now is the clock; time.Now when nil.
Now func() time.Time
// LoadTree reads the profile tree of a Loaded; profile.Load when nil.
LoadTree func([]profile.Layer, *dintent.Registry, []dintent.Name) (profile.Tree, error)
// OnReload is called, holding no lock, after Get replaces the loaded registry with a changed one; the first load is not a reload.
OnReload func()
}
CacheOptions tune a Cache; the zero value rechecks the stamp on every Get.
type GateApproval ¶ added in v0.3.0
GateApproval is gates.toml's [approval]: the first rule whose When holds over the gate's facts decides, else Mode and Window.
type GateDef ¶ added in v0.3.0
type GateDef struct {
Name string
Kind gate.Kind
Label string
Intents []GateIntent
// Text words the gate's subject when the loop writes it, a template
// over the proposal facts; nil writes nothing.
Text *template.Template
}
GateDef is a named gate: its kind, which names the consequence of resolving it, its words and the intents it is resolved with.
type GateIntent ¶ added in v0.3.0
type GateIntent struct {
Name, Label string
// Summary is what resolving with it does, as help and palettes show it.
Summary string
Status gate.Status
Answer bool
// Texts are its note and confirm, templates over the action facts a
// row offering it reads.
Texts map[string]*template.Template
}
GateIntent is what a gate is resolved with: the status it resolves the gate to, and whether it takes text.
type GateRule ¶ added in v0.3.0
GateRule is one rule of gates.toml's [approval], its When over the gate's facts only.
type GatesDef ¶ added in v0.3.0
type GatesDef struct {
Gates []GateDef
// Approval is gates.toml's [approval]: how a gate is decided when no
// manifest or configuration says, the default of each kind.
Approval GateApproval
}
GatesDef is the profile's gates.toml over every layer, in declared order as TasksDef's states are: bundled gates first, then each user layer's new ones; a gate's intents likewise.
func (GatesDef) DefaultFor ¶ added in v0.3.0
DefaultFor is how gates.toml decides a gate of kind k: the first gate of that kind, open. A rule that cannot be read waits.
type KeyTexts ¶ added in v0.3.0
KeyTexts are the help lines of the core keys, by context, then action; a numbered action such as answer:3 reads answer:{n}.
type Loaded ¶
type Loaded struct {
Registry *dintent.Registry
Templates map[dintent.Name]*template.Template // body on a clone of base, missingkey=error
Programs map[dintent.Name]Programs
Problems Problems // user intents that did not load, and overrides read as bundled
Broken map[dintent.Name]Problems // user intents that failed, keyed by directory name
Reverted map[dintent.Name]Problems // bundled intents read without the user's override, which does not load
// Warnings are what the loaded intents and workflows declare that loads
// but is deprecated.
Warnings Problems
Workflows []workflow.Workflow // by order, then name; a user workflow that failed is not here
BrokenWorkflows map[string]Problems // user workflows that failed, keyed by directory name
// RevertedWorkflows are bundled workflows read without the user's override, which does not load.
RevertedWorkflows map[string]Problems
// Actions are the built-in actions' texts from actions.toml, by catalog id.
Actions map[string]BuiltinAction
// Tools are the MCP tools' texts from tools.toml, by tool name.
Tools map[string]ToolText
// Views are the views, the review and the badge of views.toml.
Views ViewsDef
// Tasks are the task properties, states and verbs of tasks.toml.
Tasks TasksDef
// Gates are the gates of gates.toml.
Gates GatesDef
// Records are the record kinds of records.toml.
Records RecordsDef
// Keys are the core keys' help from keys.toml.
Keys KeyTexts
// Notices are what the loop tells a session, from notices.toml, by notice name.
Notices map[string]string
// UI are each plugin's words of its manifest's views, facets and
// situations, from its layers' ui.toml, by plugin id.
UI map[string]UITexts
// EmptyRefusal is what a [[refuse]] case whose why renders empty says,
// from defaults.toml.
EmptyRefusal string
// contains filtered or unexported fields
}
func (*Loaded) BrokenNames ¶
BrokenNames is the kinds whose blocks are skipped, sorted: the user intents that did not load, and the kinds whose blocks need what a reverted override declared.
func (*Loaded) Refusal ¶ added in v0.2.0
Refusal is the why of the intent name's first refusal whose when holds over facts, the unit's workflow facts, never empty when one holds; "" when none holds.
func (*Loaded) Rules ¶
func (l *Loaded) Rules(intent string) (dintent.RecordRules, error)
Rules is intent's record rules; for a broken user intent the error carries its first problem.
func (*Loaded) SessionName ¶ added in v0.3.0
SessionName renders the session.name of the intent name over facts, its name facts but session.title, which it reads from the manifest; the title when the template is empty or renders blank.
func (*Loaded) TargetTitle ¶ added in v0.3.0
TargetTitle renders the target.title of the intent name over guidance; "" when it has none.
func (*Loaded) Tree ¶
Tree is the profile's blocks as of this load, read on the first call and kept; an unreadable block is the error every call returns.
type Problems ¶
type Problems []Problem
func BundledNotices ¶ added in v0.3.0
BundledNotices are the notices' texts of bundled alone.
func BundledTools ¶ added in v0.3.0
BundledTools are the tools' texts of bundled and the bundled plugins' layers.
type PropDef ¶ added in v0.3.0
type PropDef struct {
Name string
Type task.PropType
Values []string
Writers []task.Writer
Doc string
// Role is the mechanism that acts on the property, "" for none.
Role task.Role
}
PropDef is a task property: the fact task.prop.<Name>. Values are an enum's, at least one.
type RecordKind ¶ added in v0.3.0
type RecordKind struct {
Name string
SchemaFile string
Schema *jsonschema.Schema
Writers []task.Writer
Projects map[string]string
}
RecordKind is a declared record kind: the schema its data follows, who may write it, and the task properties its fields set, by field.
type RecordsDef ¶ added in v0.3.0
type RecordsDef struct {
Kinds []RecordKind
}
RecordsDef is the profile's records.toml over every layer: the record kinds a run, a person or a plugin writes on a task, in declared order.
func (RecordsDef) Kind ¶ added in v0.3.0
func (d RecordsDef) Kind(name string) (RecordKind, bool)
Kind is the record kind name declares.
type RefusalProgram ¶ added in v0.2.0
RefusalProgram is an [[action.refuse]] case's compiled when.
type ReviewStepDef ¶ added in v0.3.0
type ReviewStepDef struct {
View, Label string
}
ReviewStepDef is a step of the review: the view it walks and what it asks of the user.
type RuleOverlay ¶ added in v0.2.0
RuleOverlay is one rule of an ApprovalOverlay.
type StateDef ¶ added in v0.3.0
StateDef is a state a task takes and its category, which is all Go reads of it.
type TasksDef ¶ added in v0.3.0
type TasksDef struct {
Props []PropDef
States []StateDef
Verbs map[string]VerbText
// VerbOrder are the names of Verbs in the order clients list them: the bundled file's, then each user
// layer's new ones.
VerbOrder []string
// OwedBy is owed_by.expr as written; Owed is it compiled over OwedByEnv, nil when the profile has none.
OwedBy string
Owed *expr.Program
// ChatIntent is the intent of the turn a chat message starts on a task with no live session.
ChatIntent string
// ChatAt is where the layer that set ChatIntent sets it.
ChatAt dintent.Pos
Areas, Contexts []string
StaleWaitingDays int
}
TasksDef is the profile's tasks.toml over every layer. Props and States keep their declared order: the bundled entries in the order the bundled file declares them, then each user layer's new entries in its own order; a layer that sets an entry declared below it changes it in place.
A zero task.Value unsets a property, so an int or a duration property holds no 0: 0 means unset, and Parse refuses it.
func (TasksDef) CategoryOf ¶ added in v0.3.0
CategoryOf is the category of state; false when the profile declares no such state.
func (TasksDef) Facts ¶ added in v0.3.0
Facts are the task.prop.<name> facts of the declared properties, typed from their types, an enum's closed to its values and an untrusted one marked so, with task.prop_by.<name>, who last wrote each; and task.state closed to the declared states.
func (TasksDef) FirstOf ¶ added in v0.3.0
FirstOf is the first state of category c in the profile's order, which a task proposed in c takes; "" when no state is of c.
func (TasksDef) Handler ¶ added in v0.3.0
Handler is the handler verb runs besides its move, "" for none.
func (TasksDef) HeldProblems ¶ added in v0.3.0
HeldProblems are the problems of the states stored tasks hold, held, that no layer declares: their tasks keep the category they had, and no verb moves them.
func (TasksDef) Move ¶ added in v0.3.0
Move is the states verb moves a task from (every state when empty) and the state it moves it to ("" for none); false when no verb is named so.
func (TasksDef) Parse ¶ added in v0.3.0
Parse reads text as the value of the property name, by its type: a string as is; an enum one of its values; a date YYYY-MM-DD (midnight in loc) or RFC 3339; a duration as the profile writes them (90m, 2d); an int in decimal; an actor a person's key, provider:id; a list type its items comma-separated. Empty text is the zero Value, which unsets the property, and so is 0: Parse refuses 0 for an int or a duration.
func (TasksDef) PropOf ¶ added in v0.3.0
PropOf is the property that takes role r, and its values; "" when none does.
type TemplateCheck ¶
TemplateCheck renders a manifest's templates against real samples; internal/turn provides it.
type ToolText ¶ added in v0.3.0
ToolText is an MCP tool's description, its parameters', by parameter path, and its answers, by name, as templates over builtin.ToolData and, for an answer, the fields of its builtin.ToolAnswers row.
type UIEvent ¶ added in v0.3.0
type UIEvent struct {
Label string `toml:"label"`
Loop bool `toml:"loop"`
Data string `toml:"data"`
}
UIEvent is an event kind's words.
type UIFacet ¶ added in v0.3.0
type UIFacet struct {
Label string `toml:"label"`
Empty string `toml:"empty"`
Values map[string]string `toml:"values"`
Buckets map[string]string `toml:"buckets"`
}
UIFacet is a facet's words.
type UISearch ¶ added in v0.3.0
type UISearch struct {
DefaultSort string `toml:"default_sort"`
Presets []UISearchPreset `toml:"presets"`
Filters []UISearchFilter `toml:"filters"`
Sorts []UISearchSort `toml:"sorts"`
Decisions map[string]string `toml:"decisions"`
NoDecision string `toml:"no_decision"`
}
UISearch is a custom view's search: the queries it runs at a press, the terms it toggles, the orders it offers and how a result's decision reads.
type UISearchFilter ¶ added in v0.3.0
type UISearchFilter struct {
Term string `toml:"term"`
Window int `toml:"window"`
Label string `toml:"label"`
}
UISearchFilter toggles a term, or with Window a recent-activity window in days.
type UISearchPreset ¶ added in v0.3.0
UISearchPreset is a query run at a press.
type UISearchSort ¶ added in v0.3.0
type UISearchSort struct {
Sort string `toml:"sort"`
Label string `toml:"label"`
Shown string `toml:"shown"`
}
UISearchSort is an order a search offers.
type UITexts ¶ added in v0.3.0
type UITexts struct {
Views map[string]UIView `toml:"views"`
Facets map[string]UIFacet `toml:"facets"`
Situations map[string]string `toml:"situations"`
Events map[string]UIEvent `toml:"events"`
Menubar map[string]string `toml:"menubar"`
Detail map[string]UIField `toml:"detail"`
}
UITexts are one plugin's words of its manifest's ids.
type UIView ¶ added in v0.3.0
type UIView struct {
Label string `toml:"label"`
Unit string `toml:"unit"`
Search *UISearch `toml:"search"`
}
UIView is a view's words.
type VerbText ¶ added in v0.3.0
type VerbText struct {
Label, Summary, Input string
Offer workflow.Predicate
From []string
To string
By map[string]string
Allow map[string]workflow.Predicate
Gate, Handler, Send string
}
VerbText is a verb's words: Input is the question a verb that asks for a value puts first. Offer, when set, is where a task offers the verb. From are the states it moves a task from, every state when empty; To the state it moves it to, "" for none. By are who may run it, by actor: a predicate's source over the task's facts, or "gate"; an actor left out may not. Gate is the gate a "gate" opens, Handler what it runs besides its move ("" for none), Send how a reply's handler sends. Allow are By's predicates compiled, by actor; a "gate" has none.
type ViewDef ¶ added in v0.3.0
type ViewDef struct {
ID, Label, Over, Group, Key string
Sort []SortKey
HideDisabled, RemoveClean bool
When workflow.Predicate
}
ViewDef is a view: what it lists (Over, task.OverTasks or task.OverGates), When, which of them, compiled over their facts, nil for a view that lists nothing and is a place a client draws itself, such as the review; Group the fact it groups by, Sort the facts it sorts by, Key the key that jumps to it, HideDisabled whether it leaves out what a disabled plugin holds, and RemoveClean whether it offers to remove its tasks' clean workspaces.
type ViewsDef ¶ added in v0.3.0
type ViewsDef struct {
Views []ViewDef
// Review are the review's steps in order, each a view.
Review []ReviewStepDef
// Badge are the views whose counts the badge adds up.
Badge []string
}
ViewsDef is views.toml over every layer. Views and Review keep their declared order, as TasksDef's states do: the bundled entries first, then each user layer's new ones in its own order.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package builtin is the Go vocabulary manifests name: builtins by slot, reserved names and keys, and the facts predicates read.
|
Package builtin is the Go vocabulary manifests name: builtins by slot, reserved names and keys, and the facts predicates read. |
|
builtintest
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. |
|
cmd/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. |
|
Package expr compiles and evaluates the predicates of intent and workflow manifests: CEL expressions (cel-go) over typed facts, checked at load.
|
Package expr compiles and evaluates the predicates of intent and workflow manifests: CEL expressions (cel-go) over typed facts, checked at load. |