ai-devkit
ai-devkit copied to clipboard
feat(devkitd): migrate agent kill to daemon (lookup + unregister)
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.unregisterRPC — removes the registration row and frees the name (no tombstone per decision) - Add
agent.lookupRPC — 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 toManagedAgentRuntime.stopAgenton unreachable/unknown-method agent.disappearedflows via the existing sweep
Acceptance
agent killfrees the name immediately; nextagent.startcan reuse it- Session torn down via returned
runtimeRef - Dead-agent kill path still works (tombstoned/dead registration)