Repository navigation
Commit d49cca0
committed
Declare plan support for ACP agents and translate it via session modes
What was wrong: the plan action and edit-past-message gates were already
capability-driven (composerActions "plan"; capabilities.fork), but ACP
agents could not declare either: the ACP provider hardcoded composerActions
to [] and typed AcpAgentDefinition.fork as none|tip, so every ACP agent was
excluded by declaration shape rather than by capability.
What was changed: AcpAgentDefinition gains supportsPlan (mirroring
supportsManualCompaction), threaded through the customAgents setting and
mapped to composerActions ["plan"] in the declaration; acp-omp declares it.
The ACP bridge now reads the session modes agents advertise (session/new,
session/load, session/fork results and current_mode_update notifications)
and, when the agent advertises a plan mode, drives it with session/set_mode
on plan turns, strips the /plan command mention from the prompt, and
returns the session to its initial mode afterward; agents that report no
modes keep byte-identical text passthrough. Session rewind stays
undeclarable for ACP agents: ACP v1 session/fork is tip-only with no
fork-point selector and reports no per-turn checkpoints, so no shipped or
custom ACP agent can honestly declare checkpoint rewind today.
What was verified: pnpm exec turbo run typecheck test lint --continue plus
pnpm format:check. provider-bridge-acp typecheck is clean and all 317
tests pass, including the new ones: declaration mapping (composerActions
["plan"] only for agents declaring it), wire modes/current_mode_update
parsing, and bridge plan-turn translation (set_mode "plan" precedes
session/prompt with the mention stripped; a no-modes agent gets no set_mode
and untouched text; the mode resets to the initial mode after the turn).
The server suites that consume provider declarations pass solo
(first-party-provider-plugins, plugin-install, plugin-update). Remaining
failures are pre-existing on main f6868ad, each verified by stash-rerun
on a clean tree: secret-storage concurrent-creators, server
install-machine-script (macOS Abort trap: 6 on the spawned host-daemon),
host-workspace workspace-diff/provisioning, and 183 files flagged by
format:check from the pinned oxfmt 0.64.0 at head (formatter default
drift); the new code matches the dominant committed style of the files it
touches.
AGENT GENERATED1 parent f6868ad commit d49cca0
12 files changed
Lines changed: 378 additions & 10 deletions
File tree
- docs
- packages
- provider-bridge-acp/src
- bridge
- templates/src/templates
- plugins/provider-acp/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
413 | 418 | | |
414 | 419 | | |
415 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
494 | 499 | | |
495 | 500 | | |
496 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
497 | 520 | | |
498 | 521 | | |
499 | 522 | | |
| |||
3318 | 3341 | | |
3319 | 3342 | | |
3320 | 3343 | | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
3321 | 3434 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
| |||
166 | 177 | | |
167 | 178 | | |
168 | 179 | | |
| 180 | + | |
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
| |||
1298 | 1310 | | |
1299 | 1311 | | |
1300 | 1312 | | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1301 | 1371 | | |
1302 | 1372 | | |
1303 | 1373 | | |
| |||
1706 | 1776 | | |
1707 | 1777 | | |
1708 | 1778 | | |
| 1779 | + | |
1709 | 1780 | | |
1710 | 1781 | | |
1711 | 1782 | | |
| |||
1776 | 1847 | | |
1777 | 1848 | | |
1778 | 1849 | | |
| 1850 | + | |
1779 | 1851 | | |
1780 | 1852 | | |
1781 | 1853 | | |
| |||
1797 | 1869 | | |
1798 | 1870 | | |
1799 | 1871 | | |
| 1872 | + | |
1800 | 1873 | | |
1801 | 1874 | | |
1802 | 1875 | | |
| |||
1813 | 1886 | | |
1814 | 1887 | | |
1815 | 1888 | | |
| 1889 | + | |
1816 | 1890 | | |
1817 | 1891 | | |
1818 | 1892 | | |
| |||
1832 | 1906 | | |
1833 | 1907 | | |
1834 | 1908 | | |
| 1909 | + | |
1835 | 1910 | | |
1836 | 1911 | | |
1837 | 1912 | | |
| |||
1867 | 1942 | | |
1868 | 1943 | | |
1869 | 1944 | | |
| 1945 | + | |
| 1946 | + | |
1870 | 1947 | | |
1871 | 1948 | | |
1872 | 1949 | | |
| |||
2050 | 2127 | | |
2051 | 2128 | | |
2052 | 2129 | | |
| 2130 | + | |
2053 | 2131 | | |
2054 | 2132 | | |
2055 | 2133 | | |
2056 | 2134 | | |
2057 | | - | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
2058 | 2139 | | |
2059 | 2140 | | |
2060 | 2141 | | |
| |||
2242 | 2323 | | |
2243 | 2324 | | |
2244 | 2325 | | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
2245 | 2334 | | |
2246 | 2335 | | |
2247 | 2336 | | |
| |||
2602 | 2691 | | |
2603 | 2692 | | |
2604 | 2693 | | |
| 2694 | + | |
2605 | 2695 | | |
2606 | 2696 | | |
2607 | 2697 | | |
| |||
2629 | 2719 | | |
2630 | 2720 | | |
2631 | 2721 | | |
| 2722 | + | |
2632 | 2723 | | |
2633 | 2724 | | |
2634 | 2725 | | |
| |||
0 commit comments