Commit b74c365
authored
fix(openapi): put the file-emit contract in file-returning tools' descriptions (#1081)
A tool whose output is a ToolFile declared the envelope in its output
schema, but the output schema is dropped from the hot tool-list
projection, so it never reaches the sandbox search step that an agent
always walks before its first call. Agents only discovered
emit(result.data) after a failed first attempt, or by reading
describe.tool.
Now any OpenAPI operation whose response is a file gets a short,
copyable emit instruction appended to its stored description. Stored
descriptions ride both search and describe.tool, so the contract is in
front of the agent before it calls the tool, with no new columns and no
list-path cost. Non-file tools are untouched.
Covered by the tool-descriptions e2e scenario: a PDF-returning operation
asserts the hint appears in both the tools.list catalog entry and the
tools.schema view.1 parent a00124c commit b74c365
2 files changed
Lines changed: 77 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
| |||
302 | 326 | | |
303 | 327 | | |
304 | 328 | | |
305 | | - | |
| 329 | + | |
306 | 330 | | |
307 | 331 | | |
308 | 332 | | |
| |||
482 | 506 | | |
483 | 507 | | |
484 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
485 | 534 | | |
486 | 535 | | |
487 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
186 | 201 | | |
187 | 202 | | |
188 | 203 | | |
| |||
218 | 233 | | |
219 | 234 | | |
220 | 235 | | |
221 | | - | |
222 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
223 | 242 | | |
224 | | - | |
| 243 | + | |
225 | 244 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
233 | 248 | | |
234 | | - | |
235 | | - | |
| 249 | + | |
| 250 | + | |
236 | 251 | | |
237 | 252 | | |
238 | 253 | | |
| |||
0 commit comments