Skip to content

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

Closed

Description

@codeaholicguy

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions