source
The DotBot panel's data source — the one seam between the editor panel and the DotBot agent surface.
This implementation is a fixture. Every reading it hands back is a constant
written into its init.luau. It talks to no plugin, no provider and no network,
spends nothing, and holds no credential. It exists so the panel can be built and
looked at while the real surface is built elsewhere.
The contract is shaped after the dotbot.* trusted exports, so swapping the
fixture for the real surface is a change to this one file:
| Half | Members |
|---|---|
| Read-only, answered in the frame | available, agents, agent, terminalAgents, accounts, accountsFooter, models, model, levelsFor, level, usage, conversations, currentConversation, history, sendable, events |
| Start / poll, because a trusted handler may not yield | connect.start / .poll, openSignIn.start / .poll, disconnect.start / .poll, send.start / .poll |
| Read-write but unpriced | setModel, setReasoning, modelOf, levelOf, stop |
| The half only a fixture has | fixture.enable, fixture.scenario, fixture.approve, fixture.setConnected, fixture.dropEventsBefore, fixture.reset |
A start answers { ok = true, id } or { ok = false, reason = "busy" }. A
poll answers pending, awaitingPerson, done, refused or error. A
device-code flow carries its code, its page and its expiry on the
awaitingPerson answer, because that is what a person has to be shown while the
job waits.
Two done answers carry a flag that says the fixture did not do the thing:
openSignIn reports opened = false with the address it would have opened, and
send reports delivered = false with the reason. The panel shows both rather
than leaving a button that looks like it worked.
fixture.enable(false) takes the data away, and the panel says
"DotBot is not available in this build" instead of drawing a conversation
nobody had.
Scenarios
fixture.scenario(name) puts the readings into one state at a time:
normal, fresh, notice, warning, blocked, signInExpired,
codeExpired, codesUnavailable, notLinked.
Scoped to this part · feeds back into the world's score.