feat(kanban): durable multi-profile collaboration board#17805
Merged
Conversation
Salvage of PR #16100 onto current main (after emozilla's #17514 fix that unblocks plugin Pydantic body validation). History preserved on the standing `feat/kanban-standing` branch; this squashes the 22 iterative commits into one clean landing. What this lands: - SQLite kernel (hermes_cli/kanban_db.py) — durable task board with tasks, task_links, task_runs, task_comments, task_events, kanban_notify_subs tables. WAL mode, atomic claim via CAS, tenant-namespaced, skills JSON array per task, max-runtime timeouts, worker heartbeats, idempotency keys, circuit breaker on repeated spawn failures, crash detection via /proc/<pid>/status, run history preserved across attempts. - Dispatcher — runs inside the gateway by default (`kanban.dispatch_in_gateway: true`). Ticks every 60s, reclaims stale claims, promotes ready tasks, spawns `hermes -p <assignee> chat -q "work kanban task <id>"` with HERMES_KANBAN_TASK + HERMES_KANBAN_WORKSPACE env. Auto-loads `--skills kanban-worker` plus any per-task skills. Health telemetry warns on stuck ready queue. - Structured tool surface (tools/kanban_tools.py) — 7 tools (kanban_show, kanban_complete, kanban_block, kanban_heartbeat, kanban_comment, kanban_create, kanban_link). Gated on HERMES_KANBAN_TASK via check_fn so zero schema footprint in normal sessions. - System-prompt guidance (agent/prompt_builder.py KANBAN_GUIDANCE) injected only when kanban tools are active. - Dashboard plugin (plugins/kanban/dashboard/) — Linear-style board UI: triage/todo/ready/running/blocked/done columns, drag-drop, inline create, task drawer with markdown, comments, run history, dependency editor, bulk ops, lanes-by-profile grouping, WS-driven live refresh. Matches active dashboard theme via CSS variables. - CLI — `hermes kanban init|create|list|show|assign|link|unlink| claim|comment|complete|block|unblock|archive|tail|dispatch|context| init|gc|watch|stats|notify|log|heartbeat|runs|assignees` + `/kanban` slash in-session. - Worker + orchestrator skills (skills/devops/kanban-worker + kanban-orchestrator) — pattern library for good summary/metadata shapes, retry diagnostics, block-reason examples, fan-out patterns. - Per-task force-loaded skills — `--skill <name>` (repeatable), stored as JSON, threaded through to dispatcher argv as one `--skills X` pair per skill alongside the built-in kanban-worker. Dashboard + CLI + tool parity. - Deprecation of standalone `hermes kanban daemon` — stub exits 2 with migration guidance; `--force` escape hatch for headless hosts. - Docs (website/docs/user-guide/features/kanban.md + kanban-tutorial.md) with 11 dashboard screenshots walking through four user stories (Solo Dev, Fleet Farming, Role Pipeline, Circuit Breaker). - Tests (251 passing): kernel schema + migration + CAS atomicity, dispatcher logic, circuit breaker, crash detection, max-runtime timeouts, claim lifecycle, tenant isolation, idempotency keys, per- task skills round-trip + validation + dispatcher argv, tool surface (7 tools × round-trip + error paths), dashboard REST (CRUD + bulk + links + warnings), gateway-embedded dispatcher (config gate, env override, graceful shutdown), CLI deprecation stub, migration from legacy schemas. Gateway integration: - GatewayRunner._kanban_dispatcher_watcher — new asyncio background task, symmetric with _kanban_notifier_watcher. Runs dispatch_once via asyncio.to_thread so SQLite WAL never blocks the loop. Sleeps in 1s slices for snappy shutdown. Respects HERMES_KANBAN_DISPATCH_IN_GATEWAY=0 env override for debugging. - Config: new `kanban` section in DEFAULT_CONFIG with `dispatch_in_gateway: true` (default) + `dispatch_interval_seconds: 60`. Additive — no \_config_version bump needed. Forward-compat: - workflow_template_id / current_step_key columns on tasks (v1 writes NULL; v2 will use them for routing). - task_runs holds claim machinery (claim_lock, claim_expires, worker_pid, last_heartbeat_at) so multi-attempt history is first- class from day one. Closes #16102. Co-authored-by: emozilla <emozilla@nousresearch.com>
| raise HTTPException(status_code=404, detail=f"task {task_id} not found") | ||
| content = kanban_db.read_worker_log(task_id, tail_bytes=tail) | ||
| log_path = kanban_db.worker_log_path(task_id) | ||
| size = log_path.stat().st_size if log_path.exists() else 0 |
| raise HTTPException(status_code=404, detail=f"task {task_id} not found") | ||
| content = kanban_db.read_worker_log(task_id, tail_bytes=tail) | ||
| log_path = kanban_db.worker_log_path(task_id) | ||
| size = log_path.stat().st_size if log_path.exists() else 0 |
4 tasks
teknium1
pushed a commit
that referenced
this pull request
May 1, 2026
…ions The kanban PR (#17805, c868425) added the `kanban` toolset and `tools/kanban_tools.py`, but didn't update three pre-existing test assertions that bake the full toolset/tool inventory: * `tests/tools/test_registry.py::test_matches_previous_manual_builtin_tool_set` hard-codes the manual list of builtin tool modules. `tools.kanban_tools` was missing. * `tests/test_tui_gateway_server.py::test_load_enabled_toolsets_rejects_disabled_mcp_env` and `test_load_enabled_toolsets_falls_back_when_tui_env_invalid` both expect `["memory"]` from `_load_enabled_toolsets()`. With kanban now auto-recovered by `_get_platform_tools` (its tools live in hermes-cli's universe but are not in CONFIGURABLE_TOOLSETS), the resolver returns `["kanban", "memory"]`. * `tests/hermes_cli/test_tools_config.py::test_get_platform_tools_preserves_explicit_empty_selection` asserts `set()` for an explicit empty list. The recovery loop now also surfaces `kanban`. Reframed to assert the contract the test name describes — no CONFIGURABLE toolset gets re-enabled when the user explicitly saved an empty list — which stays correct as more non-configurable platform toolsets are added. Verified the failures reproduce on clean origin/main (180a703) with `.[all,dev]`-equivalent extras (fastapi, starlette, httpx, pytest-asyncio) and that all four pass with this commit applied. CI on main itself is currently red on these tests; this restores green for everyone's PRs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 1, 2026
1 task
nickdlkk
pushed a commit
to nickdlkk/hermes-agent
that referenced
this pull request
May 11, 2026
…#17805) Salvage of PR NousResearch#16100 onto current main (after emozilla's NousResearch#17514 fix that unblocks plugin Pydantic body validation). History preserved on the standing `feat/kanban-standing` branch; this squashes the 22 iterative commits into one clean landing. What this lands: - SQLite kernel (hermes_cli/kanban_db.py) — durable task board with tasks, task_links, task_runs, task_comments, task_events, kanban_notify_subs tables. WAL mode, atomic claim via CAS, tenant-namespaced, skills JSON array per task, max-runtime timeouts, worker heartbeats, idempotency keys, circuit breaker on repeated spawn failures, crash detection via /proc/<pid>/status, run history preserved across attempts. - Dispatcher — runs inside the gateway by default (`kanban.dispatch_in_gateway: true`). Ticks every 60s, reclaims stale claims, promotes ready tasks, spawns `hermes -p <assignee> chat -q "work kanban task <id>"` with HERMES_KANBAN_TASK + HERMES_KANBAN_WORKSPACE env. Auto-loads `--skills kanban-worker` plus any per-task skills. Health telemetry warns on stuck ready queue. - Structured tool surface (tools/kanban_tools.py) — 7 tools (kanban_show, kanban_complete, kanban_block, kanban_heartbeat, kanban_comment, kanban_create, kanban_link). Gated on HERMES_KANBAN_TASK via check_fn so zero schema footprint in normal sessions. - System-prompt guidance (agent/prompt_builder.py KANBAN_GUIDANCE) injected only when kanban tools are active. - Dashboard plugin (plugins/kanban/dashboard/) — Linear-style board UI: triage/todo/ready/running/blocked/done columns, drag-drop, inline create, task drawer with markdown, comments, run history, dependency editor, bulk ops, lanes-by-profile grouping, WS-driven live refresh. Matches active dashboard theme via CSS variables. - CLI — `hermes kanban init|create|list|show|assign|link|unlink| claim|comment|complete|block|unblock|archive|tail|dispatch|context| init|gc|watch|stats|notify|log|heartbeat|runs|assignees` + `/kanban` slash in-session. - Worker + orchestrator skills (skills/devops/kanban-worker + kanban-orchestrator) — pattern library for good summary/metadata shapes, retry diagnostics, block-reason examples, fan-out patterns. - Per-task force-loaded skills — `--skill <name>` (repeatable), stored as JSON, threaded through to dispatcher argv as one `--skills X` pair per skill alongside the built-in kanban-worker. Dashboard + CLI + tool parity. - Deprecation of standalone `hermes kanban daemon` — stub exits 2 with migration guidance; `--force` escape hatch for headless hosts. - Docs (website/docs/user-guide/features/kanban.md + kanban-tutorial.md) with 11 dashboard screenshots walking through four user stories (Solo Dev, Fleet Farming, Role Pipeline, Circuit Breaker). - Tests (251 passing): kernel schema + migration + CAS atomicity, dispatcher logic, circuit breaker, crash detection, max-runtime timeouts, claim lifecycle, tenant isolation, idempotency keys, per- task skills round-trip + validation + dispatcher argv, tool surface (7 tools × round-trip + error paths), dashboard REST (CRUD + bulk + links + warnings), gateway-embedded dispatcher (config gate, env override, graceful shutdown), CLI deprecation stub, migration from legacy schemas. Gateway integration: - GatewayRunner._kanban_dispatcher_watcher — new asyncio background task, symmetric with _kanban_notifier_watcher. Runs dispatch_once via asyncio.to_thread so SQLite WAL never blocks the loop. Sleeps in 1s slices for snappy shutdown. Respects HERMES_KANBAN_DISPATCH_IN_GATEWAY=0 env override for debugging. - Config: new `kanban` section in DEFAULT_CONFIG with `dispatch_in_gateway: true` (default) + `dispatch_interval_seconds: 60`. Additive — no \_config_version bump needed. Forward-compat: - workflow_template_id / current_step_key columns on tasks (v1 writes NULL; v2 will use them for routing). - task_runs holds claim machinery (claim_lock, claim_expires, worker_pid, last_heartbeat_at) so multi-attempt history is first- class from day one. Closes NousResearch#16102. Co-authored-by: emozilla <emozilla@nousresearch.com>
nickdlkk
pushed a commit
to nickdlkk/hermes-agent
that referenced
this pull request
May 11, 2026
…olset assertions The kanban PR (NousResearch#17805, c868425) added the `kanban` toolset and `tools/kanban_tools.py`, but didn't update three pre-existing test assertions that bake the full toolset/tool inventory: * `tests/tools/test_registry.py::test_matches_previous_manual_builtin_tool_set` hard-codes the manual list of builtin tool modules. `tools.kanban_tools` was missing. * `tests/test_tui_gateway_server.py::test_load_enabled_toolsets_rejects_disabled_mcp_env` and `test_load_enabled_toolsets_falls_back_when_tui_env_invalid` both expect `["memory"]` from `_load_enabled_toolsets()`. With kanban now auto-recovered by `_get_platform_tools` (its tools live in hermes-cli's universe but are not in CONFIGURABLE_TOOLSETS), the resolver returns `["kanban", "memory"]`. * `tests/hermes_cli/test_tools_config.py::test_get_platform_tools_preserves_explicit_empty_selection` asserts `set()` for an explicit empty list. The recovery loop now also surfaces `kanban`. Reframed to assert the contract the test name describes — no CONFIGURABLE toolset gets re-enabled when the user explicitly saved an empty list — which stays correct as more non-configurable platform toolsets are added. Verified the failures reproduce on clean origin/main (180a703) with `.[all,dev]`-equivalent extras (fastapi, starlette, httpx, pytest-asyncio) and that all four pass with this commit applied. CI on main itself is currently red on these tests; this restores green for everyone's PRs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Durable multi-profile Kanban collaboration board for Hermes-Agent.
Salvage of #16100 onto current
main(22 commits squashed intoone; history preserved on
feat/kanban-standing). Rebased on top of@emozilla's #17514 fix, so the dashboard's POST path now works end-
to-end for the first time in this PR's lifetime.
Closes #16102 (RFC).
What lands
subs. WAL mode, atomic CAS claim, tenant namespacing, per-task
skills, max-runtime timeouts, worker heartbeats, idempotency keys,
circuit breaker, crash detection via
/proc/<pid>/status. Runhistory preserved across attempts.
(
kanban.dispatch_in_gateway: true). Runs inside the gatewayasyncio loop; no separate daemon/systemd unit required. Spawns
hermes -p <assignee> chat -q "work kanban task <id>"withHERMES_KANBAN_TASK env and auto-loads
--skills kanban-worker+per-task skills. Health telemetry warns on stuck ready queue.
HERMES_KANBAN_TASK env via
check_fn, zero schema footprint innormal sessions.
are active.
inline create, task drawer (markdown, comments, run history,
dependency editor), bulk ops, lanes-by-profile, WS-live refresh.
Theme-aware via CSS variables.
hermes kanban <verb>+/kanbanslash in-session.metadata shapes, retry diagnostics, fan-out patterns.
--skill <name>(repeatable)on create; CLI + tool + dashboard parity.
hermes kanban daemonretired — stub exits 2 with migrationguidance;
--forceescape hatch for headless hosts.four user stories.
Validation
/tasks(was 500 before #17514)_running=Falsewithin 3sWhy a salvage PR instead of merging #16100 directly
#16100 was 695 commits behind
mainand had 22 iterative commitsaccumulated over the development arc. Squashing into one commit on
fresh main:
History is preserved on
feat/kanban-standingfor anyone who wantsto trace the development arc.
Co-authorship