| @@ -6,7 +6,7 @@ author: |
| 6 | name: k33g | 6 | name: k33g |
| 7 | email: ph.charriere@gmail.com | 7 | email: ph.charriere@gmail.com |
| 8 | createdAt: 2026-11-14T05:41:20.000Z | 8 | createdAt: 2026-11-14T05:41:20.000Z |
| 9 | -updatedAt: 2026-11-14T05:44:31.000Z | 9 | +updatedAt: 2026-11-14T05:46:20.000Z |
| 10 | labels: | 10 | labels: |
| 11 | - enhancement | 11 | - enhancement |
| 12 | - kind::feature | 12 | - kind::feature |
| @@ -22,9 +22,16 @@ body: | |
| 22 | | 22 | |
| 23 | ## Why | 23 | ## Why |
| 24 | | 24 | |
| 25 | - Today, to use mm from Zed you must first run `mm init` in a terminal, then | 25 | + Today, to use mm from an ACP client you must first run `mm init` in a |
| 26 | - point Zed at `mm acp <config>`. With this mode, a single Zed entry | 26 | + terminal, then point the client at `mm acp <config>`. With this mode, a |
| 27 | - (`mm --acp-create`) is enough to create an agent without leaving the editor. | 27 | + single client entry (`mm --acp-create`) is enough to create an agent |
| | 28 | + without leaving the editor. |
| | 29 | + |
| | 30 | + **Not Zed-only.** The target is any ACP client (Zed, JetBrains, Neovim |
| | 31 | + plugins, other editors and tools). The mode adapts to the **capabilities |
| | 32 | + the client advertises at `initialize`**, never to the client's name. |
| | 33 | + Some clients may support `elicitation.form` and get the best experience; |
| | 34 | + the others get a fallback that still works. |
| 28 | | 35 | |
| 29 | ## Constraints | 36 | ## Constraints |
| 30 | | 37 | |
| @@ -44,17 +51,26 @@ body: | |
| 44 | | 51 | |
| 45 | Same strategy as `ask_user` over ACP ([internal/acp/elicit.go](internal/acp/elicit.go), ticket 84): | 52 | Same strategy as `ask_user` over ACP ([internal/acp/elicit.go](internal/acp/elicit.go), ticket 84): |
| 46 | | 53 | |
| 47 | - 1. client advertised `elicitation.form` → each step (or the whole | 54 | + 1. **Form mode (first-class path)** — the client advertised |
| 48 | - pending set) goes as an `elicitation/create` form; | 55 | + `clientCapabilities.elicitation.form`: each step (or the whole pending |
| 49 | - 2. otherwise **conversation mode**: the agent posts the step's prompt | 56 | + set) goes as an `elicitation/create` form — Choice steps as enums with |
| 50 | - and options as a message in the chat; the user answers in the prompt | 57 | + their labels, Confirm as booleans, Text as strings, defaults filled in. |
| 51 | - box (number or value); choices / yes-no may use | 58 | + Steps that depend on earlier answers (endpoint/keyenv only for |
| 52 | - `session/request_permission` buttons instead; | 59 | + `openai`, model list fetched from the chosen server, family/usage |
| 53 | - 3. the steps' `Default` is accepted on an empty answer / `.`. | 60 | + depending on the model) mean several successive forms, not one. |
| | 61 | + 2. **Conversation mode (fallback)** — no form capability: the agent posts |
| | 62 | + the step's prompt and options as a message in the chat; the user |
| | 63 | + answers in the prompt box (number or value); choices / yes-no may use |
| | 64 | + `session/request_permission` buttons instead (every ACP client shows |
| | 65 | + that dialog); |
| | 66 | + 3. in both modes the steps' `Default` is accepted on an empty answer / |
| | 67 | + `.`; a cancelled or declined form ends the flow cleanly (nothing |
| | 68 | + written). |
| 54 | | 69 | |
| 55 | To explore: exposing Choice steps as **session config options** | 70 | To explore: exposing Choice steps as **session config options** |
| 56 | - (`session/set_config_option`, dropdowns in Zed) — attractive for | 71 | + (`session/set_config_option`, dropdowns in clients that show them) — |
| 57 | - provider / model / usage, to be checked against what Zed really shows. | 72 | + attractive for provider / model / usage, only where the client supports |
| | 73 | + it; never the only way to answer. |
| 58 | | 74 | |
| 59 | ## Commands (`available_commands_update`) | 75 | ## Commands (`available_commands_update`) |
| 60 | | 76 | |
| @@ -65,8 +81,11 @@ body: | |
| 65 | | 81 | |
| 66 | ## At the end | 82 | ## At the end |
| 67 | | 83 | |
| 68 | - The file is written, then the agent shows how to use it: the Zed | 84 | + The file is written, then the agent shows how to use it: the `mm acp |
| 69 | - `agent_servers` snippet (`mm acp <path>`), and the `mm acp` command line. | 85 | + <path>` command line, which every client needs, plus the configuration |
| | 86 | + snippet for the client when it is a known one (`clientInfo` at |
| | 87 | + `initialize` — e.g. Zed's `agent_servers`); for an unknown client, the |
| | 88 | + command line alone. |
| 70 | Out of scope for this ticket: switching the same process into the normal | 89 | Out of scope for this ticket: switching the same process into the normal |
| 71 | `mm acp` mode on the new config (hot reload) — a possible follow-up. | 90 | `mm acp` mode on the new config (hot reload) — a possible follow-up. |
| 72 | | 91 | |
| @@ -74,17 +93,21 @@ body: | |
| 74 | | 93 | |
| 75 | - `mm --acp-create` starts with no `agent.yaml` anywhere and answers | 94 | - `mm --acp-create` starts with no `agent.yaml` anywhere and answers |
| 76 | `initialize` / `session/new`. | 95 | `initialize` / `session/new`. |
| 77 | - - From Zed, a full run (provider llamacpp or llmman, model listed from the | 96 | + - A full run (provider llamacpp or llmman, model listed from the server, |
| 78 | - server, usage, machine…) writes the same file as `mm init` with the same | 97 | + usage, machine…) writes the same file as `mm init` with the same answers |
| 79 | - answers (golden test against the line mode). | 98 | + (golden test against the line mode) — **in both modes**: with a fake |
| 80 | - - Works without `elicitation.form` (conversation mode) — Zed today. | 99 | + client advertising `elicitation.form`, and with one that does not. |
| | 100 | + - The mode is chosen from the advertised capabilities only, never from |
| | 101 | + `clientInfo`. |
| | 102 | + - Tried by hand in at least two real ACP clients (Zed + one other), one |
| | 103 | + of them with form elicitation if any client supports it at that time. |
| 81 | - Flags given on the command line (`--provider`, `--model`…, same as | 104 | - Flags given on the command line (`--provider`, `--model`…, same as |
| 82 | `mm init -h`) are taken as given and never asked. | 105 | `mm init -h`) are taken as given and never asked. |
| 83 | - Unit tests with a fake ACP client; docs EN+FR (how-to "create an agent | 106 | - Unit tests with a fake ACP client; docs EN+FR (how-to "create an agent |
| 84 | from your editor", reference of the mode). | 107 | from your editor", reference of the mode). |
| 85 | tasks: | 108 | tasks: |
| 86 | - id: 1 | 109 | - id: 1 |
| 87 | - title: Spike — what Zed shows for elicitation, permission dialogs and session config options | 110 | + title: Spike — which ACP clients (Zed, JetBrains, Neovim plugins…) support elicitation forms, permission dialogs, session config options |
| 88 | state: open | 111 | state: open |
| 89 | priority: high | 112 | priority: high |
| 90 | author: | 113 | author: |
| @@ -116,7 +139,7 @@ tasks: |
| 116 | email: ph.charriere@gmail.com | 139 | email: ph.charriere@gmail.com |
| 117 | createdAt: 2026-11-14T05:41:20.000Z | 140 | createdAt: 2026-11-14T05:41:20.000Z |
| 118 | - id: 5 | 141 | - id: 5 |
| 119 | - title: Write the file in the session cwd, end message with the Zed snippet | 142 | + title: Write the file in the session cwd, end message with the command line (+ snippet for known clients) |
| 120 | state: open | 143 | state: open |
| 121 | priority: medium | 144 | priority: medium |
| 122 | author: | 145 | author: |