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.3

Permissions in 0.2.3

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.
  • Run any command process.anyDangerousStarts any program or shell command. This is as strong as your own account.Start the ACP agents, which the registry launches by path or through package runners such as npx and uvx, and run the terminal commands an agent asks for
  • Provide agents agents.provideMediumAdds agents to the app.Provide the agents of the ACP registry, and serve plugin tools to them through the host's loopback MCP server
  • Network access netMediumConnects to the listed hosts.Download the ACP registry and the agents' marks once a dayHosts: cdn.agentclientprotocol.com
  • Read files fs.readMediumReads files in the listed places.Read the files an agent asks for (ACP fs/read_text_file), only inside the chat's workspace, and your own agents from custom.json in this plugin's data folderPlaces: the open workspaceits own data folder
  • Write files fs.writeMediumCreates, changes and deletes files in the listed places.Write the files an agent asks to write (ACP fs/write_text_file), only inside the chat's workspace, and move the custom agents of the old ACP plugin into custom.json oncePlaces: the open workspaceits own data folder
  • Environment variables envMediumReads the listed environment variables.Sign Grok in with your xAI API key when you set one, and tell which Windows build of an agent to runVariables: XAI_API_KEYPROCESSOR_ARCHITECTURE

Files

state.ts2.1 KB
// The provider's record of one session: a fresh one, and the session
// state an agent describes at `initialize` before any session exists.

import * as z from "zod";
import type { AcpDefaults, SessionState } from "./types.ts";

/// Modes and models an agent published at `initialize` (`_meta.modeState`,
/// `_meta.modelState`), which is the only place some of them describe a
/// session before one exists.
export function defaultsOf(meta: unknown): AcpDefaults {
  const source = z
    .looseObject({
      modeState: z.record(z.string(), z.unknown()).nullish(),
      modelState: z.record(z.string(), z.unknown()).nullish(),
    })
    .parse(meta ?? {});
  return { modes: source.modeState ?? null, models: source.modelState ?? null, configOptions: null };
}

/// A fresh session record.
export function newState(fields: Partial<SessionState> = {}): SessionState {
  return {
    // The id the agent knows this session by. Usually the host's own
    // session id, but an agent that cannot resume gets a fresh one while
    // the host keeps addressing the chat by the old id.
    live: "",
    workspace: "",
    run: null,
    // Matches an out-of-band end of turn to the turn it ended.
    promptId: null,
    modes: null,
    models: null,
    config: [],
    commands: [],
    // Item ids the current message and reasoning block stream under.
    messageItem: null,
    thoughtItem: null,
    // The last `usage_update`: what the context holds and how large it is.
    context: null,
    // The agent process this session was established against.
    generation: 0,
    // The `session/prompt` in flight: ACP allows one per session, and a
    // cancel waits on it to know the agent is idle again.
    prompting: null,
    cancelling: false,
    // Plugin tools and instructions from the host, and the address of the
    // host's MCP server that serves the tools to this session.
    tools: [],
    instructions: null,
    instructionsSent: false,
    mcpUrl: null,
    // The chat's permission mode; empty until the user chose one, which
    // means the agent's default (`modeOf`).
    mode: "",
    ...fields,
  };
}

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.5latestNov 21, 2026>=5 <6134 KB6 permissionsListed
0.2.4Nov 16, 2026>=5 <6132.8 KB6 permissionsListed
0.2.3Nov 11, 2026>=5 <6108.9 KB6 permissionsListed
0.2.2Nov 9, 2026>=5 <6105.6 KB6 permissionsListed
0.2.1Oct 27, 2026>=2 <4105.3 KB6 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.