Official
acp
ACP agents from the ACP registry (Gemini, Cursor, Droid, Kilo, pi, ...), Oh My Pi, and your own entries (custom.json in the plugin's data folder). Agents are discovered at runtime.
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/acp@0.2.4
Permissions in 0.2.4
Take care. This plugin asks for permissions that can do anything your account can. The app asks you to hold Enable for two seconds or to type the plugin's name before it turns on.
Files
replay.ts2.8 KB
// Replay owns one projection per session and nests announced children in their parent.
import type { TranscriptItem } from "divergence/protocol";
import { Recorder } from "./history.ts";
import { Subagents } from "./subagents.ts";
import { Session, configs } from "./v2.ts";
import { array, record } from "./entities.ts";
import { contextUsage } from "./map.ts";
import type { Message } from "./wire.ts";
export class Replay {
readonly identified = new Set<string>();
readonly children: Subagents;
readonly projections = new Map<string, Recorder | Session>();
readonly positions = new Map<string, number>();
readonly complete = new Set<string>();
readonly root: string;
readonly version: 1 | 2;
readonly mcpApps: boolean;
constructor(root: string, version: 1 | 2, mcpApps = false) {
this.root = root;
this.version = version;
this.mcpApps = mcpApps;
this.children = new Subagents(version);
}
push(update: Message, live = this.root): void {
let projection = this.projections.get(live);
if (!projection) {
projection = this.version === 1 ? new Recorder(this.mcpApps) : new Session(this.mcpApps);
this.projections.set(live, projection);
}
if (update.sessionUpdate === "subagent_update") {
const id = this.children.announce(live, update);
if (id !== null && !this.positions.has(id)) this.positions.set(id, projection.finish().length);
} else if (update.sessionUpdate === "config_option_update")
this.children.configuration(
live,
this.version === 2 ? configs(update.configOptions) : array(update.configOptions).map(record),
);
else if (update.sessionUpdate === "usage_update" && this.children.children.has(live))
this.children.children.get(live)!.usage = contextUsage(update);
else if (update.sessionUpdate === "state_update") this.children.state(live, update);
else if (update.sessionUpdate === "replay_complete") this.complete.add(live);
else {
this.children.references(live, update.toolCallId, update.content);
projection.push(update);
}
if (projection instanceof Recorder) for (const id of projection.identified) this.identified.add(id);
else if (typeof update.messageId === "string") this.identified.add(update.messageId);
}
finish(live = this.root): TranscriptItem[] {
const items = this.projections.get(live)?.finish() ?? [];
// Associations retain their announcement order, independent of child traffic.
let inserted = 0;
for (const [id, child] of this.children.children)
if (child.parent === live) {
items.splice((this.positions.get(id) ?? items.length) + inserted, 0, {
id: `subagent:${id}`,
role: "task",
task: this.children.task(id),
items: this.finish(id),
});
inserted++;
}
return items;
}
}Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.2.5latest | Nov 21, 2026 | >=5 <6 | 134 KB | 6 permissions | Listed |
| 0.2.4 | Nov 16, 2026 | >=5 <6 | 132.8 KB | 6 permissions | Listed |
| 0.2.3 | Nov 11, 2026 | >=5 <6 | 108.9 KB | 6 permissions | Listed |
| 0.2.2 | Nov 9, 2026 | >=5 <6 | 105.6 KB | 6 permissions | Listed |
| 0.2.1 | Oct 27, 2026 | >=2 <4 | 105.3 KB | 6 permissions | Listed |
No comments yet.