Show actor on status/pinned change events in activity feed

Added actor field to RPC client and set it before daemon requests.
This ensures status changes (like pinned events) show who performed
the action in bd activity output.

Changes:
- Added actor field to Client struct
- Added SetActor method to set actor for audit trail
- Modified ExecuteWithCwd to include actor in RPC requests
- Updated main.go to call SetActor after daemon connection

Fixes gt-1ydd9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-30 06:57:51 -08:00
parent 6d292f6a0f
commit 087a9dd984
3 changed files with 16 additions and 6 deletions

View File

@@ -522,6 +522,7 @@ var rootCmd = &cobra.Command{
}
health, healthErr = client.Health()
if healthErr == nil && health.Status == statusHealthy {
client.SetActor(actor)
daemonClient = client
daemonStatus.Mode = cmdDaemon
daemonStatus.Connected = true
@@ -539,6 +540,7 @@ var rootCmd = &cobra.Command{
health.Version, Version)
} else {
// Daemon is healthy and compatible - use it
client.SetActor(actor)
daemonClient = client
daemonStatus.Mode = cmdDaemon
daemonStatus.Connected = true
@@ -589,6 +591,7 @@ var rootCmd = &cobra.Command{
// Check health of auto-started daemon
health, healthErr := client.Health()
if healthErr == nil && health.Status == statusHealthy {
client.SetActor(actor)
daemonClient = client
daemonStatus.Mode = cmdDaemon
daemonStatus.Connected = true