qwen-code/docs/developers
jifeng 858c900af9
feat(serve): add daemon idle detection to GET /health?deep=true (#4934)
* docs(design): add daemon idle detection API design for machine reclamation

When qwen daemon is deployed across multiple machines, an external
scheduler needs a reliable signal to determine if a daemon is idle
and the machine can be reclaimed. This design proposes enhancing
GET /health?deep=true with activePrompts, connectedClients,
channelAlive, lastActivityAt, and idleSinceMs fields.

* feat(serve): add idle-detection fields to GET /health?deep=true

* fix(test): add activePromptCount and lastActivityAt to fakeBridge

Update the test helper to satisfy the expanded AcpSessionBridge
interface so /health?deep=true tests pass with the new fields.

* test(idle-detection): add unit tests for activePromptCount, lastActivityAt and /health?deep=true new fields

* refactor(bridge): replace activePromptCount iteration with O(1) counter

* fix(bridge): move idleSinceMs computation into bridge to eliminate race window

* fix(idle-detection): keep daemon health state consistent

Guard prompt teardown so activePromptCount only decrements once and compute deep health idle fields from the same activity snapshot.

* fix(acp): prevent active prompt leak after channel crash

Reject queued prompts after their session entry has been torn down so daemon health does not report phantom active prompts.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-18 06:55:03 +00:00
..
daemon feat(serve): add daemon idle detection to GET /health?deep=true (#4934) 2026-06-18 06:55:03 +00:00
daemon-client-adapters docs(daemon): Refresh daemon docs in English (#5144) 2026-06-15 22:38:01 +08:00
daemon-ui feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
development fix(docs): update Coding Plan model list and fix stale references in developer docs (#5054) 2026-06-13 01:34:14 +08:00
examples docs: fix SSE ring size errors and add /workflows command (#5205) 2026-06-18 09:43:38 +08:00
tools docs: fix MCP token path, daemon UI event count, add Feishu channel (#5172) 2026-06-16 11:37:43 +08:00
_meta.ts docs(daemon): Refresh daemon docs in English (#5144) 2026-06-15 22:38:01 +08:00
architecture.md docs: enhance architecture documentation and add contribution guidelines 2025-12-11 18:31:24 +08:00
channel-plugins.md feat(channels): add dispatch modes and prompt lifecycle hooks 2026-03-28 06:19:02 +00:00
contributing.md fix(docs): update Coding Plan model list and fix stale references in developer docs (#5054) 2026-06-13 01:34:14 +08:00
qwen-serve-protocol.md docs: fix SSE ring size errors and add /workflows command (#5205) 2026-06-18 09:43:38 +08:00
roadmap.md feat(cli): improve auth dialog UX with clearer three-option layout 2026-03-01 15:22:35 +08:00
sdk-java.md feat(core): add NotebookEdit tool for Jupyter notebooks 2026-05-21 00:06:15 +08:00
sdk-python.md doc[sdk-python] Expand Python SDK usage documentation (#3995) 2026-05-12 15:27:00 +08:00
sdk-typescript.md fix(docs): update Coding Plan model list and fix stale references in developer docs (#5054) 2026-06-13 01:34:14 +08:00