Documentation
¶
Overview ¶
Command pluginfix is the plugins browser spec's fixture (e2e/tests/plugins.spec.ts): the few rows that spec needs and the e2e harness cannot make through a real route, because the e2e harness runs no agent runtime.
DATABASE_URL=…_e2e go run ./e2e/pluginfix chief <owner-id> <name> <token> → prints the agent id
DATABASE_URL=…_e2e go run ./e2e/pluginfix delivering <message-id> <agent-id>
DATABASE_URL=…_e2e go run ./e2e/pluginfix unconfirmed <message-id>
DATABASE_URL=…_e2e go run ./e2e/pluginfix lapse <draft-id>
DATABASE_URL=…_e2e go run ./e2e/pluginfix label <agent-id> <display-name>
DATABASE_URL=…_e2e go run ./e2e/pluginfix rmagent <owner-id> <name>
DATABASE_URL=…_e2e go run ./e2e/pluginfix cleanup <owner-id> <name>
DATABASE_URL=…_e2e go run ./e2e/pluginfix ask <owner-id> <agent-name> <question> → prints the ask id
DATABASE_URL=…_e2e go run ./e2e/pluginfix rmask <owner-id> <ask-id>
DATABASE_URL=…_e2e go run ./e2e/pluginfix draft <owner-id> <agent-name> <plugin-name> → prints the draft id
DATABASE_URL=…_e2e go run ./e2e/pluginfix rmplugin <owner-id> <plugin-name>
DATABASE_URL=…_e2e go run ./e2e/pluginfix chiefpref <owner-id> clear
DATABASE_URL=…_e2e go run ./e2e/pluginfix notifypref <owner-id> clear
DATABASE_URL=…_e2e go run ./e2e/pluginfix branding clear
DATABASE_URL=…_e2e go run ./e2e/pluginfix rmchiefs <owner-id> → prints the names removed
DATABASE_URL=…_e2e go run ./e2e/pluginfix agentinfo <owner-id> <agent-id> → prints {name,kind,model,note_id,note_text,pending_note} as JSON
- chief: an agent labelled "chief", running, holding token — the owner's
chief, whose own token the spec then calls /mcp with. It REFUSES when the
owner already has an agent labelled chief: the lowest id is the chief, so
a leftover one would silently take the role and the spec would test it.
- delivering: marks a queued plugin message as being delivered to that agent,
which is what the delivery turn holds WHILE the chief acts on it
(internal/plugins.BeginDelivery). 🔴 NOT `delivered`: the chief drafts its
reply on the turn that delivers the message, and a fixture that pre-settled
it as delivered would let the spec pass while that turn's state refused
every draft (audit round 1). The turn itself — fenced, through the agent
gateway — is the Go seam tests' (plugins_seam_pg_test.go,
reply_draft_seam_pg_test.go), which run a fake runtime the browser suite
has no place for.
- unconfirmed: settles a message being delivered as unconfirmed — what a
delivery turn cut off mid-way leaves, which the page's Retry is for.
- lapse: moves a claimed draft's claim and lease ten minutes back, so its
two-minute lease has lapsed without waiting for it.
- label: sets an agent's display name — "retired" takes the chief role away
(the chief IS the agent displayed "chief"), "chief" gives it back.
- cleanup: removes the chief and the owner's plugins (their messages and
drafts cascade), so later specs on the shared database see neither.
- ask: an OPEN attention_ask from the named agent — the row its /mcp
attention_ask call stores (internal/attention) — for a spec about what
the Agents list does with it, not about the door (agent-cards.spec.ts
asks through the real /mcp door).
- rmask: deletes ONE ask of the owner's by id — what a spec that made one
with `ask` removes afterwards (or mid-test: an ask that left the queue
elsewhere), so later specs on the shared database never see it.
- draft: a PENDING reply draft by the named agent, to a delivered message
of a plugin of that name made for it — the attention queue's "plugin"
item on that agent's card.
- rmplugin: removes one plugin of the owner's by name (its message and
draft cascade), leaving the owner's other plugins alone.
- rmchiefs: deletes every agent of the owner's that would be its chief
(labelled chief, or the reserved slug), for a spec about having none.
- agentinfo: one agent's kind, model, task and first message, read back
for a spec that started it through a real door (mcp-dispatch.spec.ts):
note_text is the first message as the agent was created with it.
- chiefpref: clears the owner's chief on/off choice (chief_preferences),
so a spec that used the Account page's switch leaves the default behind.
- notifypref: clears the owner's notification preferences
(notify_preferences), the same way: off, the default, is left behind.
- branding: clears the instance's branding (instance_branding, 0105) —
the server's, not an owner's, so it takes no owner: nothing set, the
built-in mark, is left behind for every later spec on the shared
database.
🔴 IT REFUSES ANY DATABASE WHOSE NAME DOES NOT END IN "_e2e" (e2edb.Check): it writes as the login role with row-level security's scope set to all, which nothing outside a fixture may do.