Home Extensions · 02 — Plugin

Plugins

Plugins add no tools. They watch the run and narrow it: one streams what the agent is doing, the other decides what a delegate may touch.

Two plugins dsh ACP Generated at startup JavaScript v1.0.0

What a plugin is

Not more tools — better plumbing.

A plugin is code that runs inside the agent runtime, not beside it. It sees events as they happen, can narrow a tool list before a child starts, and can push a status line to the interface while the turn is still running.

Both plugins here are written by Quanta at startup and installed into the dsh ACP profile. The zips in the release are copies for reading and reuse — editing a copy will not change the one the app writes.

Events, not polling

Reasoning deltas, status changes, job events and compaction arrive as they happen, on a side channel that keeps the protocol clean.

Scope, not persuasion

A child's tool list is restricted in code before it starts — not in a prompt politely asking it to hold back.

Generated, then installed

The app is the source of truth. The package is written on every startup and installed into the profile that runs the page.

Skill A written procedure plus a script. Loaded when its description matches the request. SKILL.md
Plugin Code inside the agent runtime. Changes how a run behaves rather than what it can call. dsh ACP
Connector A door into the agent from somewhere else — a chat app, a microphone. bridge
MCP Server A separate process exposing tools over stdio JSON-RPC. stdio
The two

One pushes, one withholds.

Both are small on purpose. A plugin that does too much becomes a second agent with nobody watching it.

PLUGIN-01quanta-live-stream

Every step, as it happens.

The interface cannot show what it never hears. This plugin forwards four streams to stderr — reasoning deltas, agent status, background-job events, and context compaction — so the UI can draw the turn while it is still being written.

  • Four streams. assistant-stream · status · jobs · compaction. Each one is a line the UI knows how to read.
  • stderr, not stdout. The ACP channel stays JSON-only; UI events travel beside it.
  • Needs a runtime with jobs. It listens for agent/assistant-stream and agent/status, and reads ctx.jobs for background work.
Download · zip quanta-plugin-live-stream.zip
live-stream · one turn, four streams simulated
YOUWhy did the crawler keep failing last night?
waiting for a turn to start…
thinking tool job compaction
context compacted 41k → 8k · the turn continues
agent/assistant-stream · idle
stderr · one JSON per line
The point is not the typewriter. It is that status, jobs and compaction arrive as events, so the interface never has to guess or poll.
PLUGIN-02quanta-preset-tools

A role is an allow-list.

A subagent is only useful if it is narrower than the parent. This plugin calls ctx.tools.restrict({ allow }) inside the child's preset scope, so a retriever has no write tool to reach for — not a prompt asking it nicely to behave.

  • Restrict, not persuade. The tool list is decided before the child's first message exists.
  • Inside the preset scope. It runs where the child is built, so there is no window in which the full list is live.
  • Requires ctx.tools.restrict. A dsh runtime that exposes the API; without it the plugin has nothing to call.
Download · zip quanta-plugin-preset-tools.zip
preset-tools · subagent scope simulated
role
tools the child can see
read glob grep web write edit bash task
ctx.tools.restrict({ allow: ['read', 'glob', 'grep', 'web'] })
// scope: retriever
Switch the role: the allowed list is the only thing the child is built with. Struck-out tools are not hidden by CSS in the real thing — they are absent.
Loading

Written at startup, loaded per turn.

A plugin is not a file you drop somewhere and hope gets picked up. It is generated, installed, then attached to the profile that runs the page.

Quanta startup
dsh_agent.pywrites the package
LIVE_PLUGIN_JSsource, in the app
PRESET_TOOLS_JSsource, in the app
write
dsh ACP profile
package.jsonname · version · entry
lib/index.jsthe plugin itself
Installedon every launch
hooks
The turnlive
Reasoning deltas→ the typing block
status · jobs→ the step rail
ctx.tools.restrict→ the child's scope

Nothing to installThe app writes both plugins on launch.

Copies are for readingThe release zips mirror what the app generates.

Reuse needs a runtimeOutside Quanta, they need a dsh runtime exposing ctx.jobs and ctx.tools.restrict.

Install

Nothing to drop in.

Both plugins ship with the app. The zips exist so the mechanism is readable, and so the same package can be reused on another dsh runtime.

  1. 01Start Quanta. The package is written and installed into the profile before the first page opens.
  2. 02Read the copy first. Two files: package.json and lib/index.js. That is the whole plugin — no build, no dependency tree.
  3. 03Reuse it elsewhere. Install into another dsh ACP profile. It will only load where ctx.jobs and ctx.tools.restrict exist.
$ cat package.json
{
  "name": "quanta-live-stream",
  "version": "1.0.0",
  "main": "lib/index.js",
  "dsh": { "api": "acp" }
}

$ cat lib/index.js
export default function (ctx) {
  ctx.on('agent/assistant-stream', (d) => emit('delta', d));
  ctx.on('agent/status', (s) => emit('status', s));
  ctx.jobs.on('change', (j) => emit('job', j));
}
Next

The door the conversation comes in by.