mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-02 02:13:49 +00:00
Petri 639ce3e added `ControlService::interrupt_firing` and the `LiveTurns`
capability a host installs beside the pause hooks. Fabro now drives it:
`RunControls::interrupt(stage, text)` resolves its stage the way a steer
does (a label, a node name, or the run's one live agent stage) and stops
that stage's current model turn, keeping the session; the text, when
given, is the stage's next input. `engine::run` installs the live-turn set
as a runtime capability, so without it no interrupt could ever land.
The worker maps `run.interrupt` and `run.interrupt_then_steer`, both of
which now carry an optional `stage`, to that call. The control bus is
one-way, so a refusal is recorded the way a refused steer is: a
`run.notice` on the run's stream whose code says why (`no_live_turn` when
Petri refuses a stage with no turn in flight, `no_such_stage`,
`interrupt_refused`).
The server's `POST /runs/{id}/interrupt` and `POST /runs/{id}/steer` with
`interrupt=true` forward the control and answer 202, replacing the 501
`interrupt_unsupported` stub. The interrupt endpoint takes an optional
body (`stage`, `text`), refuses a finished run with 409
`run_not_interruptible`, and forwards an interrupt of a blocked run, since
an agent stage may be running a turn beside the question and the worker
judges each stage itself. `fabro events --pretty` prints the delivered
interrupt and the stage's `attractor.turn.interrupted` report.
Verified on the twin: `fabro steer --interrupt` during a long tool call
ends the turn, the text is the agent's next request, and the stream
carries the `$interrupt` record and the interrupted-turn report; an
interrupt of a gate stage is refused with `no_live_turn` and the gate's
question is untouched.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| auth | ||
| demo | ||
| prompts | ||
| server | ||
| worker_control | ||
| automation_materializer.rs | ||
| canonical_host.rs | ||
| canonical_origin.rs | ||
| csp.rs | ||
| diagnostics.rs | ||
| error.rs | ||
| git_checkout.rs | ||
| github_webhooks.rs | ||
| install.rs | ||
| interp.rs | ||
| jwt_auth.rs | ||
| lib.rs | ||
| manifest_validation.rs | ||
| petri_check.rs | ||
| petri_runs.rs | ||
| principal_middleware.rs | ||
| request_id.rs | ||
| run_compiler.rs | ||
| run_files.rs | ||
| run_files_security.rs | ||
| run_intent.rs | ||
| run_manifest.rs | ||
| run_selector.rs | ||
| run_title_generation.rs | ||
| run_tool_create.rs | ||
| security_headers.rs | ||
| serve.rs | ||
| server.rs | ||
| server_secrets.rs | ||
| spawn_env.rs | ||
| startup.rs | ||
| static_files.rs | ||
| test_support.rs | ||
| web_auth.rs | ||
| worker_runtime.rs | ||
| worker_token.rs | ||