v1.10.0 — cancellable compose + live progress (roadmap #5, stable core)
What's new in 1.10.0
Step #5 of the MCP modernization roadmap, stable core: compose_prompt is now cancellable and reports live progress. Model-agnostic, opt-in, fully back-compat.
Cancellation
An AbortSignal is plumbed through the entire LLM path (simpleGenerate → chat → fetch, combined with the per-call timeout via AbortSignal.any) and every engine stage (optimize / ground / critique / clarify). When a client sends notifications/cancelled for a compose_prompt call, the in-flight model request aborts immediately and the revise loop stops at the next stage boundary — instead of running every iteration to completion. The signal reaches fetch regardless of which model/provider is configured.
Progress
Include a progressToken in the compose_prompt request _meta and the server emits notifications/progress at each stage (clarify / optimize / ground / critique) with a monotonic counter and a human message like optimizing prompt [iter 2/3]. Hosts can show a live status on a long multi-iteration compose. No token → no notifications, zero overhead.
Why not the MCP tasks API (yet)
Roadmap #5 named MCP tasks (tasks/create / get / cancel) as the mechanism. On inspection it's still experimental/ in the SDK ("may change without notice"), its reference implementation is ~600 lines, and no current MCP client speaks the tasks/* protocol — so a full implementation would be unusable off-by-default code today. The genuine value of #5 (cancellable, progress-reporting long compose) is delivered here on stable primitives (extra.signal + notifications/progress). The experimental async-task wrapper is deferred to land with #7 (A2A), once the SDK promotes tasks out of experimental/ and clients adopt them — the AbortSignal groundwork here is exactly what that builds on.
Tests
New deterministic npm run test:cancel (tests/cancellation.mjs): a pre-aborted signal makes composePrompt throw before any LLM call; the onProgress contract is asserted; and a live wire test observes compose_prompt emitting notifications/progress with a monotonic counter. Added to test:all.
Verified
test:cancel (deterministic + live progress) · wire · integration 9/9 · compose + clarify eval fixtures on gemma4:31b-cloud · all CI build/docker/secrets jobs · evals on gpt-4o-mini. The signal/progress params are all optional, so every existing caller is byte-for-byte unaffected.
Install
```bash
npm install -g clarifyprompt-mcp@1.10.0
```