Commit 58ccb81
fix(acp): support
Fixes langchain-ai#2678
`agent-client-protocol` v0.9.0 upgraded the ACP schema from v0.10.8 to
v0.11.2
([agentclientprotocol/python-sdk#80](agentclientprotocol/python-sdk#80)),
which removed the `SessionConfigOption` wrapper type. Config options are
now bare `SessionConfigOptionSelect` / `SessionConfigOptionBoolean`
instances. Since `deepagents-acp` pins `agent-client-protocol>=0.8.0`
with no upper bound, new installs resolve to v0.9.0 and hit
`ImportError: cannot import name 'SessionConfigOption' from
'acp.schema'` at startup.
Uses a conditional import to support both v0.8.x (with
`SessionConfigOption` wrapper) and v0.9.0+ (without wrapper). When the
wrapper is available, config options are constructed as
`SessionConfigOption(root=SessionConfigOptionSelect(...))`; when absent,
they are bare `SessionConfigOptionSelect(...)` instances.
All 76 existing ACP tests pass.
```
$ pytest tests/ -v
======================== 76 passed, 1 warning in 3.31s =========================
```
> This contribution was developed with AI assistance (Cursor).
---------
Co-authored-by: shengyi <shengyi.tang@shopee.com>
Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
Co-authored-by: Vivek Trivedy <vivek.trivedy@langchain.dev>agent-client-protocol v0.9.0 schema changes (langchain-ai#2700)1 parent 4888e78 commit 58ccb81
1 file changed
Lines changed: 34 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
139 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
146 | | - | |
| 155 | + | |
147 | 156 | | |
148 | 157 | | |
149 | 158 | | |
| |||
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
170 | 180 | | |
171 | | - | |
172 | 181 | | |
173 | 182 | | |
174 | 183 | | |
| |||
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
195 | 205 | | |
196 | | - | |
197 | 206 | | |
198 | 207 | | |
199 | 208 | | |
| |||
0 commit comments