Skip to content

Editor integration (ACP)

hipmmcode speaks the Agent Client Protocol (ACP) — the open JSON-RPC protocol editors use to embed coding agents. Any ACP-compatible editor (Zed, JetBrains, or a custom client) can drive hipmmcode sessions with per-token streaming, tool cards, permission prompts, session list/load, and live mode/model switching.

stdio (editors)

The editor spawns hipmmcode as a subprocess:

bash
hipmmcode acp                        # JSON-RPC over stdio
hipmmcode acp -p kimi -m kimi-k2     # pin a channel/model for the session

Example Zed configuration:

json
{
  "agent_servers": {
    "hipmmcode": { "command": "hipmmcode", "args": ["acp"] }
  }
}

What the editor gets:

  • Streaming — token-by-token agent_message_chunks.
  • Tool cards — each tool call with status and output.
  • Permissionsask decisions surface as native editor prompts; the permission mode (default / acceptEdits / plan / bypass) is switchable from the editor UI.
  • Sessions — list and load previous sessions.
  • Models — the model picker is populated from your configured channels and switchable mid-session.
  • Dragged/mentioned files are resolved cross-platform (file:// URIs, spaces, percent-encoding, Windows paths).

Logs go to stderr, never stdout (which carries the protocol).

WebSocket (remote / custom clients)

Serve ACP over the network instead of stdio:

bash
hipmmcode acp --listen 127.0.0.1:9910
hipmmcode acp --listen :9910 --auth-token S3CR3T    # bare :port → 127.0.0.1
  • Same protocol, same capabilities — each WebSocket connection gets an independent session host.
  • --auth-token is enforced at the WS handshake: send Authorization: Bearer <token> or ?token=<token>.
  • Binds loopback by default; a non-loopback bind prints a security warning (the agent can run shell commands). For remote use, prefer an SSH tunnel or TLS-terminating proxy.

Messages are one JSON-RPC object per WebSocket text frame (newline-delimited batching within a frame is tolerated).

IDE diagnostics bridge

Complementary to ACP: hipmmcode --ide connects to a running VS Code / Cursor / Windsurf instance, giving the agent mcp__ide__getDiagnostics and automatic after-edit diagnostics injection — the agent sees your editor's error squiggles right after it edits a file.

bash
hipmmcode --ide           # any subcommand; auto-detects the running IDE