feat: add daemon RPC endpoints for config and mol stale (bd-ag35)
Add two new RPC endpoints to allow CLI commands to work in daemon mode: 1. GetConfig (OpGetConfig) - Retrieves config values from the daemon database. Used by bd create to validate issue prefix in daemon mode. 2. MolStale (OpMolStale) - Finds stale molecules (complete-but-unclosed epics). Used by bd mol stale command in daemon mode. Changes: - internal/rpc/protocol.go: Add operation constants and request/response types - internal/rpc/client.go: Add client methods GetConfig() and MolStale() - internal/rpc/server_issues_epics.go: Add handler implementations - internal/rpc/server_routing_validation_diagnostics.go: Register handlers - cmd/bd/create.go: Use GetConfig RPC instead of skipping validation - cmd/bd/mol_stale.go: Use MolStale RPC instead of requiring --no-daemon - internal/rpc/coverage_test.go: Add tests for new endpoints 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,8 +222,12 @@ var createCmd = &cobra.Command{
|
||||
// Get database prefix from config
|
||||
var dbPrefix string
|
||||
if daemonClient != nil {
|
||||
// TODO(bd-ag35): Add RPC method to get config in daemon mode
|
||||
// For now, skip validation in daemon mode (needs RPC enhancement)
|
||||
// Daemon mode - use RPC to get config
|
||||
configResp, err := daemonClient.GetConfig(&rpc.GetConfigArgs{Key: "issue_prefix"})
|
||||
if err == nil {
|
||||
dbPrefix = configResp.Value
|
||||
}
|
||||
// If error, continue without validation (non-fatal)
|
||||
} else {
|
||||
// Direct mode - check config
|
||||
dbPrefix, _ = store.GetConfig(ctx, "issue_prefix")
|
||||
|
||||
Reference in New Issue
Block a user