Summary
Enhance secrets status to show available secret names for lease suggestions.
Context
File: cmd/secrets/status.go:64
// TODO: Get actual secret names from daemon to suggest specific leases
Problem
Currently secrets status shows active leases but doesn't show what secrets are available to lease. This makes the HATEOAS actions generic rather than specific.
Current behavior
{
"actions": [
{"command": "secrets lease <name>"} // generic
]
}
Desired behavior
{
"data": {
"available_secrets": ["github_token", "anthropic_key", "stripe_key"],
"active_leases": [...]
},
"actions": [
{"command": "secrets lease github_token"},
{"command": "secrets lease anthropic_key"},
{"command": "secrets lease stripe_key"}
]
}
Implementation
- Add
ListSecrets method to daemon protocol
- Call from status command
- Use
output.ActionsForSecrets(names) (already exists!)
Daemon changes
// internal/daemon/handlers.go
func (d *Daemon) handleList(req *Request) *Response {
names, err := d.store.List()
// return names
}
Status command
names, _ := rpcCall("list", nil)
actions := output.ActionsForSecrets(names)
Acceptance
Summary
Enhance
secrets statusto show available secret names for lease suggestions.Context
File:
cmd/secrets/status.go:64// TODO: Get actual secret names from daemon to suggest specific leasesProblem
Currently
secrets statusshows active leases but doesn't show what secrets are available to lease. This makes the HATEOAS actions generic rather than specific.Current behavior
{ "actions": [ {"command": "secrets lease <name>"} // generic ] }Desired behavior
{ "data": { "available_secrets": ["github_token", "anthropic_key", "stripe_key"], "active_leases": [...] }, "actions": [ {"command": "secrets lease github_token"}, {"command": "secrets lease anthropic_key"}, {"command": "secrets lease stripe_key"} ] }Implementation
ListSecretsmethod to daemon protocoloutput.ActionsForSecrets(names)(already exists!)Daemon changes
Status command
Acceptance
secrets statusshows available secret names