Repository navigation
Commit 67ac939
committed
fix(acp): let agents that advertise /compact compact their own context
Typing `/compact` on an ACP registry agent (omp, claude-acp, codex-acp, ...)
failed with "This provider does not support context compaction." because that
flavor never set `supportsCompaction`, so `compactThread` was missing and the
run was rejected before anything reached the agent.
ACP figures compaction out through the agent itself: these agents advertise a
`compact` command and run it when prompted with `/compact`. Add a
`compactCommand` flavor flag that wires `compactThread`, sends the bare
`/compact` prompt (native slash commands already skip instruction wrapping),
and marks the turn as a compaction. The command is only sent when the agent
advertises it; otherwise the run fails with a message naming the missing
command instead of sending `/compact` as chat.
The acpRegistry flavor opts in. Sparse advertised lists are checked at call
time, so agents without `compact` keep their explicit error.
Verified: AcpAdapterV2 tests assert the outgoing session/prompt is exactly
`/compact` for an advertising agent and the refusal for one that does not.1 parent 3fd2b85 commit 67ac939
4 files changed
Lines changed: 175 additions & 11 deletions
File tree
- apps/server
- scripts
- src/orchestration-v2/Adapters
- packages
- provider-acp-registry/src/server
- provider-acp/src/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
588 | 593 | | |
589 | 594 | | |
590 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
591 | 608 | | |
592 | 609 | | |
593 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
541 | 620 | | |
542 | 621 | | |
543 | 622 | | |
| |||
1916 | 1995 | | |
1917 | 1996 | | |
1918 | 1997 | | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
1919 | 2024 | | |
1920 | 2025 | | |
1921 | 2026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
1683 | 1689 | | |
1684 | 1690 | | |
1685 | 1691 | | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1686 | 1699 | | |
1687 | 1700 | | |
1688 | 1701 | | |
| |||
5920 | 5933 | | |
5921 | 5934 | | |
5922 | 5935 | | |
5923 | | - | |
5924 | | - | |
5925 | | - | |
5926 | | - | |
| 5936 | + | |
| 5937 | + | |
| 5938 | + | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
| 5945 | + | |
| 5946 | + | |
5927 | 5947 | | |
5928 | 5948 | | |
5929 | 5949 | | |
| |||
7160 | 7180 | | |
7161 | 7181 | | |
7162 | 7182 | | |
7163 | | - | |
7164 | | - | |
| 7183 | + | |
| 7184 | + | |
7165 | 7185 | | |
7166 | 7186 | | |
7167 | 7187 | | |
| |||
8135 | 8155 | | |
8136 | 8156 | | |
8137 | 8157 | | |
8138 | | - | |
| 8158 | + | |
8139 | 8159 | | |
8140 | | - | |
8141 | | - | |
| 8160 | + | |
| 8161 | + | |
| 8162 | + | |
| 8163 | + | |
| 8164 | + | |
| 8165 | + | |
| 8166 | + | |
| 8167 | + | |
| 8168 | + | |
| 8169 | + | |
| 8170 | + | |
| 8171 | + | |
| 8172 | + | |
| 8173 | + | |
| 8174 | + | |
| 8175 | + | |
| 8176 | + | |
| 8177 | + | |
| 8178 | + | |
| 8179 | + | |
8142 | 8180 | | |
8143 | | - | |
8144 | | - | |
| 8181 | + | |
| 8182 | + | |
| 8183 | + | |
8145 | 8184 | | |
8146 | 8185 | | |
8147 | 8186 | | |
| |||
0 commit comments