Skip to content

Commit 36f5643

Browse files
frostmingPsiACE
authored andcommitted
fix: backward compatibility for the default behavior of AgentSideConnection (#38)
* fix: backward compatibility for the default behavior of AgentSideConnection Signed-off-by: Frost Ming <me@frostming.com> * fix: add 0.7 Migration Guide to navigation Signed-off-by: Frost Ming <me@frostming.com> --------- Signed-off-by: Frost Ming <me@frostming.com>
1 parent 2dd281f commit 36f5643

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

examples/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
from acp import (
1111
Client,
12-
ClientSideConnection,
1312
connect_to_agent,
1413
RequestError,
1514
text_block,
1615
PROTOCOL_VERSION,
1716
)
17+
from acp.core import ClientSideConnection
1818
from acp.schema import (
1919
AgentMessageChunk,
2020
AgentPlanUpdate,

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ nav:
1313
- Use Cases: use-cases.md
1414
- Experimental Contrib: contrib.md
1515
- Releasing: releasing.md
16+
- 0.7 Migration Guide: migration-guide-0.7.md
1617
plugins:
1718
- search
1819
- mkdocstrings:

src/acp/agent/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
to_agent: Callable[[Client], Agent] | Agent,
5656
input_stream: Any,
5757
output_stream: Any,
58-
listening: bool = False,
58+
listening: bool = True,
5959
**connection_kwargs: Any,
6060
) -> None:
6161
agent = to_agent(cast(Client, self)) if callable(to_agent) else to_agent

src/acp/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def run_agent(
5050

5151
if input_stream is None and output_stream is None:
5252
output_stream, input_stream = await stdio_streams()
53-
conn = AgentSideConnection(agent, input_stream, output_stream, **connection_kwargs)
53+
conn = AgentSideConnection(agent, input_stream, output_stream, listening=False, **connection_kwargs)
5454
await conn.listen()
5555

5656

0 commit comments

Comments
 (0)