feat: add graph links and hooks system (bd-kwro.2-5, bd-kwro.8)
- bd mail reply: reply to messages with thread linking via replies_to - bd show --thread: display full conversation threads - bd relate/unrelate: bidirectional relates_to links for knowledge graph - bd duplicate --of: mark issues as duplicates with auto-close - bd supersede --with: mark issues as superseded with auto-close - Hooks system: on_create, on_update, on_close, on_message in .beads/hooks/ - RPC protocol: added Sender, Ephemeral, RepliesTo fields to CreateArgs/UpdateArgs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/steveyegge/beads/internal/beads"
|
||||
"github.com/steveyegge/beads/internal/config"
|
||||
"github.com/steveyegge/beads/internal/debug"
|
||||
"github.com/steveyegge/beads/internal/hooks"
|
||||
"github.com/steveyegge/beads/internal/rpc"
|
||||
"github.com/steveyegge/beads/internal/storage"
|
||||
"github.com/steveyegge/beads/internal/storage/memory"
|
||||
@@ -83,6 +84,9 @@ var (
|
||||
// Auto-flush manager (replaces timer-based approach to fix bd-52)
|
||||
flushManager *FlushManager
|
||||
|
||||
// Hook runner for extensibility (bd-kwro.8)
|
||||
hookRunner *hooks.Runner
|
||||
|
||||
// skipFinalFlush is set by sync command when sync.branch mode completes successfully.
|
||||
// This prevents PersistentPostRun from re-exporting and dirtying the working directory.
|
||||
skipFinalFlush = false
|
||||
@@ -599,6 +603,13 @@ var rootCmd = &cobra.Command{
|
||||
flushManager = NewFlushManager(autoFlushEnabled, getDebounceDuration())
|
||||
}
|
||||
|
||||
// Initialize hook runner (bd-kwro.8)
|
||||
// dbPath is .beads/something.db, so workspace root is parent of .beads
|
||||
if dbPath != "" {
|
||||
beadsDir := filepath.Dir(dbPath)
|
||||
hookRunner = hooks.NewRunner(filepath.Join(beadsDir, "hooks"))
|
||||
}
|
||||
|
||||
// Warn if multiple databases detected in directory hierarchy
|
||||
warnMultipleDatabases(dbPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user