Log inGet started
World

builtin-plugins

README.md

workflows

The DotBot panel's Workflows view: every workflow run in the engine, whoever started it, and one run opened.

local Workflows = require(".workflows")
local view = Workflows.new({
    source = Source,          -- workflows, workflow, workflowPhases, workflowRevision, workflowAgent, workflowConversation, cancelWorkflow, conversations, subagents, splitAddress
    icons = { right = ..., down = ..., stop = ..., term = ... },
    onToggle = function() epoch += 1 end,
    onOpenAgent = function(agentRun, key) ... end,
    onConversation = function(address, key) ... end,
})
local list = view.list(key, { nowSec = os.time() })
local opened = view.detail(key, run, { nowSec = os.time() })
MemberWhat it does
new(deps)A view over deps.source and deps.icons. onToggle() runs after something in it opened, closed or was asked of a run; onOpenAgent(agentRun, key) opens an agent a turn started; onConversation(address, key) opens a conversation.
list(key, opts?)One card per run, newest first: its workflow's name, its state (Working while an agent holds a request, Waiting while requests wait for one, Running, Finished, Failed, Cancelled), who started it (the DotBot conversation and the agent a turn started, else the caller the engine names), how long it has run, a bar and 2 of 5 answered, and its phases as Plan 1/1 · ▸Build 1/3. A failed or cancelled run says why. A press on a card opens the run. The newest LIST_PAGE cards are drawn, and a "Show earlier runs" row draws that many more.
detail(key, run, opts?)The opened run: its header (name, state, id, who started it with a link to the conversation, how long, its progress, why it ended or what it returned, and Cancel while it runs, which asks once before it cancels), then each phase with its requests. A request row names its label, its state, the agent working it (with a button that opens that agent's transcript) or the runner holding its claim, how long it has been claimed or waited (or taken, once settled), the claims that ran out, its corrections and its error; a press opens its answer, or its whole error. The run's log, newest LOG_LINES, opens under them.
open(key) / setOpen(key, runId?)The run opened in view key, and opening one (nil goes back to the list).
stats(key)What the last draw did: { runs, drawn, built, kept } for the list, { requests, built, kept } for a run.
hue(P, state)The hue a run's status or a request's state is drawn in.
LOG_LINES / ANSWER_CHARS / LIST_PAGE60 log lines, 4000 characters of an answer, and 30 run cards a page.

A card, the opened run's header and each request row are kept while what they show is unchanged, their callbacks carried into the next build, so a change to one request draws that row and nothing else. What a card and a header say, and which agent works each request, is read once each time the runtime's revision, the conversation list or the agents' list moves.

Tested by src/lua/lib/tests/suites/dotbot_panel.testSuite.