ai-devkit icon indicating copy to clipboard operation
ai-devkit copied to clipboard

feat(devkitd): migrate agent kill to daemon (lookup + unregister)

Open codeaholicguy opened this issue 1 month ago • 0 comments

Part of the devkitd agent migration (landed: agent.start in #406). Model: daemon owns registry + process observation; clients execute runtime ops via location data.

Scope

agent kill <name> → daemon path:

  • Add agent.unregister RPC — removes the registration row and frees the name (no tombstone per decision)
  • Add agent.lookup RPC — name → {pid, type, runtime, runtimeRef, cwd} so the client can execute teardown (tmux kill-session / herdr stop)
  • CLI: daemon-first; lookup → unregister → client-side teardown; fallback to ManagedAgentRuntime.stopAgent on unreachable/unknown-method
  • agent.disappeared flows via the existing sweep

Acceptance

  • agent kill frees the name immediately; next agent.start can reuse it
  • Session torn down via returned runtimeRef
  • Dead-agent kill path still works (tombstoned/dead registration)

codeaholicguy avatar Oct 23 '26 08:10 codeaholicguy