Documentation
¶
Overview ¶
Package notation is how f10 start's command line spells an entry: <task>[-suffix][@<base>...][:profile], a bundle's tasks joined by +, and a comma stacking an entry on the one before it. The parser and the proposal's printer both go through it, so the two cannot drift. It reads nothing.
Index ¶
- Constants
- func Format(e Entry) string
- func FormatChain(entries []Entry) string
- func IsID(word string) bool
- func IsURL(token string) bool
- func JoinSuffix(id, suffix string) string
- func Ordered(entries []Entry) bool
- func SplitProfile(tok string) (string, string, error)
- func SplitSuffix(token string) (string, string)
- type Entry
Constants ¶
const ( Bundle = "+" // joins a bundle's tasks, lead first Chain = "," // stacks an entry on the one before it Base = "@" // names one base Profile = ":" // opens the agent profile, which comes last )
The marks of the notation.
Variables ¶
This section is empty.
Functions ¶
func FormatChain ¶
FormatChain spells entries as one token, each stacked on the one before it. The comma says that base, so an entry's first base is left out when it is the entry before it, and Parse puts it back.
func IsID ¶
IsID says whether word is shaped as a task f10 start takes: `ABC-12` or a bare number with an optional -suffix, or a bundle of them. The shape is enough where a caller resolves each id against the project later.
func JoinSuffix ¶
JoinSuffix is SplitSuffix's inverse: id salted with suffix, or id alone with none.
func SplitProfile ¶
SplitProfile cuts a task token's :profile off: the first colon whose remainder holds no slash, so `FT-1:claude:opus:high` splits after the id, and a url's scheme and port stay part of the task.
func SplitSuffix ¶
SplitSuffix separates a salted reference into the reference and its suffix. A token without one, or a url, comes back whole with "".
Types ¶
type Entry ¶
type Entry struct {
// Task is the task as typed, its -suffix kept: `A-1`, `A-1-x`, `A-1+A-2`
// or a url. It is kept whole because a batch's record is keyed on the
// command line as typed.
Task string
Bases []string // each base as typed: the entry before it in a chain, then each @
Profile string
}
An Entry is one task or bundle of the command line.
func Parse ¶
Parse reads one command-line token as a chain of entries. A comma stacks an entry on the one before it, and each @ names one more base. A url is one entry taken whole, because its path or query may hold either mark.