Repository navigation
Commit 2e8173d
refactor: the ask-person and agent-question routes become rest.yaml entries - the first adopters of REST automation
The two extensions' hand-mounted aiohttp routes (Platform.add_routes) are gone: each gains a
resources/rest.yaml and turns rest.automation on, the handlers become private functions reading
the engines' AsyncHttpRequest map (ask.page, ask.wait, ask.reply, ask.config; question.config,
question.list, question.events, question.decide, transcript.list, transcript.show), and who is
asking is resolved once by the entries' authentication functions (ask.identity,
ask.reply.identity, question.identity) into the request's session map. The device stream is a
streaming entry: an interceptor opens it at once with a day's idle allowance and follows the
feed from a task of its own.
Two host changes it needed: a keep-alive comment that cannot be written ends a stream and closes
its sink (a device that left was otherwise held until the idle allowance), and
EventStreamWriter.connected tells a long-lived producer that nobody listens. Platform.add_routes
stays as the escape hatch for what an entry cannot express.
The shared vectors are unchanged; the tests serve the REST-enabled host; ruff, basedpyright and
pytest (916 passed) are clean; both applications were driven live under mercury-serve.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 099a219 commit 2e8173d
20 files changed
Lines changed: 720 additions & 229 deletions
File tree
- extensions
- agent-question
- resources
- ask-person
- resources
- memory
- open-threads
- sessions
- src/mercury_composable
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
376 | 399 | | |
377 | 400 | | |
378 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
0 commit comments