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
session-options.ts2.7 KB
// Optional ACP setup features avoid changing sessions just to inspect their options.
import * as Effect from "effect/Effect";
import { Host } from "divergence/effect";
import type { AcpAgent } from "./agent.ts";
import type { SessionHolder, SessionState } from "./types.ts";
import type { RpcProcess } from "../sdk/process.ts";
import { permissionMode } from "../sdk/agent.ts";
import * as map from "./map.ts";
export function setupOptions(this: AcpAgent, holder: SessionHolder | SessionState) {
const fields: Record<string, unknown> = {};
if (this.capabilities.sessionCapabilities?.systemPrompt && holder.instructions)
fields.systemPrompt = { mode: "append", content: [{ type: "text", text: holder.instructions }] };
if (this.capabilities.sessionCapabilities?.options && holder.initialOptions)
fields.configOptions = Object.entries(holder.initialOptions)
.filter(([id]) => id !== permissionMode.OPTION_ID)
.map(([configId, value]) => ({ configId, ...map.configValue(value), ...this.protocol.configValue(value) }));
return fields;
}
export const readOptions = Effect.fn("Acp.readOptions")(function* (this: AcpAgent, workspace: string) {
this.cwd = workspace;
const proc = yield* this.client();
if (this.capabilities.sessionCapabilities?.options) {
const extra = this.additionalDirectories(workspace);
const response = yield* this.request(proc.connection, "session/options", {
cwd: workspace,
...(extra ? { additionalDirectories: extra } : {}),
});
return [
...map.options(response.modes ?? null, null, response.configOptions ?? []),
permissionMode.option(this.mode, this.quirks.reviewer()),
];
}
const session = yield* this.newSession(workspace, null, null, true);
const options = this.optionsSnapshot(session);
yield* this.closeSession({ sessionId: session }).pipe(
Effect.catch((error) =>
Effect.sync(() => console.warn(`acp: closing the options session failed: ${String(error)}`)),
),
);
return options;
});
export const setAuthState = Effect.fn("Acp.setAuthState")(function* (this: AcpAgent, state: unknown) {
if (state !== "authenticated" && state !== "not_required" && state !== "unauthenticated") return;
const needsAuth = state === "unauthenticated";
if (this.needsAuth === needsAuth) return;
this.needsAuth = needsAuth;
this.lastOptions = null;
yield* (yield* Host).call("host/agents.changed", { agentIds: [this.id] });
});
export const refreshAuth = Effect.fn("Acp.refreshAuth")(function* (this: AcpAgent, proc: RpcProcess) {
if (!this.capabilities.auth?.status) return;
const response = yield* this.request(proc.connection, "auth/status", {});
yield* this.setAuthState(response.state);
});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.