fix(#2639): cancel_loose_end kind="todo" clears without a bash round-trip

Adds a real MCP-side path for the workaround #2639 documented: dial the
in-container HIVE_AGENT_SOCKET directly from cancel_loose_end (kind:"todo")
instead of shelling out via a tracked bash task (nc -U ...), which is what
was spawning a fresh completion todo on every clear and cascading forever.

hive-agent-mcp/src/mcp/render.rs: renamed local_todos's socket-dial guts
into a shared dial_agent_socket(req) helper, added mark_local_todo_done(id)
on top of it (MarkTodoDone request already existed server-side, unused
until now). mod.rs wires kind:"todo" into cancel_loose_end ahead of the
question/reminder/approval parse. args.rs + render.rs + docs/tools/bash.md
text updated to point at the new path instead of the old raw nc invocation.
This commit is contained in:
damocles 2026-07-22 21:46:16 +02:00
commit c4deca99db
4 changed files with 70 additions and 20 deletions

View file

@ -188,7 +188,8 @@ pub struct AnswerArgs {
pub struct CancelLooseEndArgs {
/// Which kind of thread to cancel — `"question"` for an open
/// `ask` that's still waiting on an answer, `"reminder"` for a
/// scheduled `remind` that hasn't fired yet. Use the `kind`
/// scheduled `remind` that hasn't fired yet, or `"todo"` for a
/// loose-ends-v2 todo (bash/matrix/forge). Use the `kind`
/// field straight off the `get_loose_ends` row.
pub kind: String,
/// Row id from the matching `get_loose_ends` entry (or the