feat(config): support daemon.auto_* settings in config.yaml (GH#871)

Allow team-wide auto-sync configuration via config.yaml instead of SQLite.
This enables teams to share auto-commit/auto-push settings through version control.

Changes:
- Add daemon.auto_commit, daemon.auto_push, daemon.auto_pull to YamlOnlyKeys
- Add daemon.* prefix to YAML-only prefixes
- Update daemon startup to read from config.yaml first, then fall back to SQLite
- Update bd init --team to write daemon settings to config.yaml

Usage:
  # In .beads/config.yaml (version controlled, shared by team)
  daemon.auto_commit: true
  daemon.auto_push: true

  # Or via bd config set
  bd config set daemon.auto_commit true

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
wolf
2026-01-04 10:42:02 -08:00
committed by Steve Yegge
parent 4468ff030f
commit 9880eaf734
4 changed files with 32 additions and 6 deletions

View File

@@ -46,6 +46,11 @@ var YamlOnlyKeys = map[string]bool{
"sync.branch": true,
"sync.require_confirmation_on_mass_delete": true,
// Daemon settings (GH#871: team-wide auto-sync config)
"daemon.auto_commit": true,
"daemon.auto_push": true,
"daemon.auto_pull": true,
// Routing settings
"routing.mode": true,
"routing.default": true,
@@ -70,7 +75,7 @@ func IsYamlOnlyKey(key string) bool {
}
// Check prefix matches for nested keys
prefixes := []string{"routing.", "sync.", "git.", "directory.", "repos.", "external_projects.", "validation."}
prefixes := []string{"routing.", "sync.", "git.", "directory.", "repos.", "external_projects.", "validation.", "daemon."}
for _, prefix := range prefixes {
if strings.HasPrefix(key, prefix) {
return true

View File

@@ -31,6 +31,12 @@ func TestIsYamlOnlyKey(t *testing.T) {
{"repos.primary", true},
{"external_projects.beads", true},
// Daemon settings (GH#871)
{"daemon.auto_commit", true},
{"daemon.auto_push", true},
{"daemon.auto_pull", true},
{"daemon.custom_setting", true}, // prefix match
// SQLite keys (should return false)
{"jira.url", false},
{"jira.project", false},