builtin-plugins
README.md
steps
A DotBot turn's work as the steps a player reads, in the person's language: each tool call, thought and workflow request worded as what it does to their game ("Building the level", "Planned 4 parts"). The panel draws a turn's work as these steps, with the calls themselves one press away.
local Steps = require(".steps")
local steps = Steps.ofRows(workRows, true) -- the running turn's work
for _, step in ipairs(steps) do print(Steps.line(step), step.state) end
| Member | Answers |
|---|---|
ofRows(rows, running?) | The steps a run of a turn's work rows (thinking, tool calls, groups of carrier calls) makes, in order: calls of one kind one after another are one step { kind, calls, failed, state }, and thinking between calls belongs to the step it leads to (a think step stands only while the model is thinking at the end of a turn under way, or for rows that hold no call). A step one of whose calls failed and that the turn went on past is followed by a retry step. With running, the last step is "current"; the others are "done". |
line(step) | The words of a step: dotbot.step_<kind>_doing for the current one, _done for one finished, dotbot.step_retry for a retry. |
text(step) / retryText() | The words of a kind of step, and of a retry. |
kindOf(name, args) | The kind of step a call of tool name with args (a table, or the JSON a row carries) is, or nil for a call that takes no step of its own (wait). A file written is the level, art, screens or how the game works by its path; a script run in the world is art when it generates, the level when it spawns or places, a check when it reads the playable milestone; a shell command is the plan (zero workflow), saving (zm add, commit, push), writing how the game works when it writes a file (sed -i, output sent into a path) or reading the files (output sent to another stream or to /dev/null writes none). |
toolDoing(name) | The words of a step a call of name is while under way, for a line that names only the tool (an agent's card). |
ofWorkflow(run) | One { text, state } per request a workflow run asked, oldest first, state "done", "current" (claimed), "next" (waiting) or "failed". |
requestText(req, done) | A workflow request's words by its label: reference (naming the game its answer titles), plan (counting the parts its answer plans), build:<part>, polish:<survey, models, surfaces, sound>, match:<round>, publish, and any other label. |
KINDS | The kinds a step can be. |
Tested by src/lua/lib/tests/suites/dotbot_panel.testSuite.