Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3f7771f
feat(acp): add MandoCode.Acp project with ACP v1 protocol types
TeseySTD Nov 10, 2026
c4b9336
feat(acp): add JSON-RPC 2.0 connection over NDJSON streams
TeseySTD Nov 10, 2026
4228c6a
feat(acp): add process transport, command resolver and mock agent
TeseySTD Nov 10, 2026
83f4eea
feat(acp): add AcpClient/AcpSession and mandocode --acp-probe
TeseySTD Nov 10, 2026
d50df86
feat(acp): add acpAgents config, trust-on-first-use and /agent-acp co…
TeseySTD Nov 10, 2026
937301a
fix(acp): harden agent list saving, trust dialog and failed probes
TeseySTD Nov 10, 2026
61e70ce
feat(acp): add the ACP agent pane
TeseySTD Nov 10, 2026
e912111
fix(acp): connect the agent in the background so the pane takes input…
TeseySTD Nov 11, 2026
94c688f
feat(acp): show tool calls, plans and diffs, and handle permissions a…
TeseySTD Nov 11, 2026
1b0019f
fix(acp): report undecided and refused writes honestly, and add an op…
TeseySTD Nov 11, 2026
11de97b
docs(acp): document ACP agents in the README, changelog and acp.md
TeseySTD Nov 11, 2026
2620f80
feat(acp): add a terminal-only dump of extension notifications for de…
TeseySTD Nov 11, 2026
d656fff
feat(acp): switch the current pane to an ACP agent, with --new-panel …
TeseySTD Nov 11, 2026
b28e85e
docs(acp): record the real-adapter results, pane switching and the se…
TeseySTD Nov 11, 2026
8fa2647
test(acp): strip style escapes from rendered text so CI on Linux comp…
TeseySTD Nov 12, 2026
16a9337
Merge main into feat/acp-client
TeseySTD Nov 12, 2026
49b6581
refactor(acp): one restriction set for commands, Alt shortcuts and th…
TeseySTD Nov 12, 2026
79c2ba0
feat(acp): read @file mentions with the shared FileReferenceToken parser
TeseySTD Nov 12, 2026
3ca0fef
feat(acp): /copy and /copy-code read the reply of the current pane's …
TeseySTD Nov 12, 2026
87821e1
feat(acp): session config options, close/new/resume/load/list in the …
TeseySTD Nov 12, 2026
f43f304
feat(acp): /clear, /model, /compact, folder changes and --resume in A…
TeseySTD Nov 12, 2026
0d0b83d
docs(acp): pane restrictions, /clear, /model, /compact, folder change…
TeseySTD Nov 12, 2026
3cd3386
fix(acp): /transcript-save names the ACP agent instead of the Ollama …
TeseySTD Nov 12, 2026
ebd0b01
test(acp): skip the symlink guard test with a reason and add a Window…
TeseySTD Nov 12, 2026
21b1997
fix(acp): /model menu starts on the agent's current model
TeseySTD Nov 12, 2026
c139703
fix(acp): do not say fresh start when a pane is resuming
TeseySTD Nov 12, 2026
ea93230
feat(acp): the / popup of an ACP pane lists only commands that work a…
TeseySTD Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions MandoCode.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MandoCode.Tests", "tests\MandoCode.Tests\MandoCode.Tests.csproj", "{D407041F-0C3B-4215-9F92-38C01435E015}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MandoCode.Acp", "src\MandoCode.Acp\MandoCode.Acp.csproj", "{4AD6649A-5B01-4BE5-A335-534B80F80C5C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MandoCode.Acp.MockAgent", "tests\MandoCode.Acp.MockAgent\MandoCode.Acp.MockAgent.csproj", "{987F2544-BD32-4447-B850-BA91D1AF8FE8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -45,13 +49,39 @@ Global
{D407041F-0C3B-4215-9F92-38C01435E015}.Release|x64.Build.0 = Release|Any CPU
{D407041F-0C3B-4215-9F92-38C01435E015}.Release|x86.ActiveCfg = Release|Any CPU
{D407041F-0C3B-4215-9F92-38C01435E015}.Release|x86.Build.0 = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|x64.ActiveCfg = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|x64.Build.0 = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|x86.ActiveCfg = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Debug|x86.Build.0 = Debug|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|Any CPU.Build.0 = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|x64.ActiveCfg = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|x64.Build.0 = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|x86.ActiveCfg = Release|Any CPU
{4AD6649A-5B01-4BE5-A335-534B80F80C5C}.Release|x86.Build.0 = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|x64.ActiveCfg = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|x64.Build.0 = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|x86.ActiveCfg = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Debug|x86.Build.0 = Debug|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|Any CPU.Build.0 = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|x64.ActiveCfg = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|x64.Build.0 = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|x86.ActiveCfg = Release|Any CPU
{987F2544-BD32-4447-B850-BA91D1AF8FE8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3C5A3128-B243-5A70-788F-6B3C2B163656} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{D407041F-0C3B-4215-9F92-38C01435E015} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{4AD6649A-5B01-4BE5-A335-534B80F80C5C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{987F2544-BD32-4447-B850-BA91D1AF8FE8} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B33BAE4E-D6AD-429A-971D-8A9E6D5A4F16}
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ With **`/skills` (Alt+K)**, install skills from Git, ZIP files, or local folders
| **Workspace** | Independent agents | Up to four agents per workspace, with separate models, conversations, settings, and approvals |
| **Workspace** | Named workspaces | Organize projects and switch workspaces while background agents keep working |
| **AI** | Agent collaboration | Tag agents with `@` to ask questions, request reviews, and hand off independent tasks |
| **Agents** | External ACP agents | Run an Agent Client Protocol agent (for example Claude Code through an ACP adapter) in its own pane, with tool calls, diffs and permission prompts in the transcript. Opt-in; see [docs/acp.md](docs/acp.md) |
| **Memory** | Context snapshots | Save a conversation summary and import it into another agent |
| **Memory** | Agent history | Search, preview, and restore closed agents with their conversation context |
| **Tools** | File Explorer and Git review | Browse files, attach references, change directories, and inspect project diffs |
Expand Down Expand Up @@ -254,6 +255,7 @@ Type `/` to see the autocomplete dropdown, or `!` to run a shell command.
| `/agent-new` | Open an independent agent pane (Alt+N) |
| `/agent-focus` | Switch agents; optional left/right (Alt+Left/Right) |
| `/agent-close` | Close the current idle agent |
| `/agent-acp <name>` | Switch this pane to an external ACP agent (such as Claude Code through an adapter); `--new-panel` opens it in a new pane. Also `stop`, `list`, `status`, `restart`, `add`, `test`, `remove`, `enable`, `disable` ([details](docs/acp.md)) |
| `/agent-rename <name>` | Rename this agent |
| `/agent-settings` | Edit this agent's model, behavior, and integrations (Alt+S) |
| `/agent-file-explorer` | Browse this agent's files and folders (Alt+E) |
Expand Down Expand Up @@ -374,6 +376,7 @@ Skills use the same enable/disable convention as Desktop (`SKILL.md` / `SKILL.md
```bash
mandocode --continue # resume this folder's most recent conversation (alias: -c)
mandocode --doctor # preflight check: .NET runtime, Ollama status, models, sign-in
mandocode --acp-probe <name> # start a configured ACP agent, run initialize + session/new, report, exit
mandocode --config show # print current config
mandocode --config init # create a default config file
mandocode --config set <key> <value> # set a single value (e.g. set model qwen3:8b)
Expand Down Expand Up @@ -487,6 +490,27 @@ MandoCode validates model compatibility on startup. Run `/learn` for a detailed
<details>
<summary><h2>Configuration Reference</h2></summary>

### External agents (ACP)

An optional `acpAgents` section in `~/.mandocode/config.json` (read only from that file, never from a project) lets
`/agent-acp <name>` run an external agent over the [Agent Client Protocol](https://agentclientprotocol.com):

```json
"acpAgents": {
"claude": {
"command": "node",
"args": ["C:\\tools\\claude-agent-acp\\dist\\index.js"]
}
}
```

The agent runs without a shell, from a real executable (`.exe`/ELF, never `.cmd`, `npx` or a shell), and MandoCode
asks you to confirm the full command before the first start and again whenever it changes. Install the adapter yourself,
at a pinned version; MandoCode never downloads anything. The agent signs in with its own tooling, and
`ANTHROPIC_API_KEY` is not passed to it unless you opt in. See [docs/acp.md](docs/acp.md) for setup, trust, permissions,
file access, the debug trace and what is not supported yet. MandoCode does not sandbox the agent: permission
questions are relayed, and the agent applies the answers itself.

### Config File

Located at `~/.mandocode/config.json`
Expand Down
10 changes: 10 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ All notable changes to MandoCode will be documented in this file.
- Keep transcript formatting, hyperlinks, and emoji shortcuts compatible with the updated rendering dependencies.
- Clear the clipboard attachment message reliably after sending a prompt.

### Added

- External agents over the Agent Client Protocol (ACP v1, stdio), phases 1–2 of the ACP client. `/agent-acp <name>` switches the current pane to an agent (for example Claude Code through an ACP adapter; `--new-panel` opens a new pane, `stop` returns to the native agent, and the native session stays alive underneath without sharing context); `/agent-acp list|status|restart|add|test|remove|enable|disable` manage the `acpAgents` entries of `~/.mandocode/config.json`, and `mandocode --acp-probe <name>` checks a connection. The protocol layer is the new `MandoCode.Acp` library (own thin implementation, no third-party ACP package).
- Agents are started without a shell from a real executable (`.exe`/ELF; `.cmd`, `npx` and shells are refused), after confirming the full command; the confirmation is remembered per command hash and asked again when the entry changes. `acpAgents` is read only from the user config, and `ANTHROPIC_API_KEY` is not passed to the agent by default.
- The ACP pane streams the reply, shows tool calls, plans and diffs, and relays the agent's permission questions as a menu (Escape cancels). It serves `fs/read_text_file` and `fs/write_text_file` inside the project folder, refusing symlinks and junctions that lead outside it, with atomic writes. Escape cancels a turn; an agent that ignores the cancel is shut down with its whole process tree.
- ACP panes have a clear boundary to native behaviour: one restriction set hides and blocks what does not apply (`/mcp`, `/skills`, `/history`, `/plan*`, Alt+S/C/K/M/H/V, the `@` picker's Agents group). `/clear` starts a new ACP conversation in the same agent process and folder (the native conversation is untouched), `/copy` and `/copy-code` use the pane's own last reply, `/model` picks from the agent's model option, `/compact` sends the agent's own compact command, and a folder change restarts the agent after confirmation. `@file` mentions use the shared parser (quoted paths with spaces work) and the same project-folder guard.
- `/agent-acp <name> --resume` continues the last session of the folder (`session/resume`, or `session/load` with the history replayed) and `/agent-acp sessions` lists the agent's sessions; MandoCode remembers only session ids in `~/.mandocode/acp-sessions.json`.
- Optional message trace for debugging an agent (`"trace": true` on the entry or `MANDOCODE_ACP_TRACE=1`): direction, method, id and size per message, never content.
- `ApprovalSelectCoordinator.Cancel()` and an opt-in Escape for approval menus (native menus are unchanged).

### Changed

- Upgrade RazorConsole.Core from 0.6.0 to 0.7.0. Retain `DeferredFocus` for startup and panels so focus requests made from `OnAfterRenderAsync` continue to wait until their render batch completes.
Expand Down
Loading
Loading