Fix compilation errors in internal/daemonrunner package
Created missing files: - logger.go: Logger type, setupLogger method, and env helpers - signals_unix.go: Unix signal definitions (SIGTERM, SIGINT, SIGHUP) - signals_windows.go: Windows signal definitions - sync.go: Sync loop implementation with export/import/validation helpers Fixed errors: - Added missing 'version' parameter to acquireDaemonLock call - Removed duplicate setupLock method from process.go (kept in daemon.go) - Removed duplicate startRPCServer from daemon.go (kept in rpc.go) - Fixed LogPath -> LogFile config field reference - Removed unused 'io' import from process.go Implementation notes: - exportToJSONL: Full implementation with dependencies, labels, comments - importFromJSONL: Placeholder (TODO: extract from cmd/bd/import.go) - countDBIssues: Uses SQL COUNT(*) optimization with fallback - validatePostImport: Checks for data loss - runSyncLoop/runEventLoop: Main daemon event loops with signal handling All packages now compile successfully with 'go build ./...' Amp-Thread-ID: https://ampcode.com/threads/T-36a7f730-3420-426f-9e23-f13d5fa089c4 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -977,6 +977,7 @@ func setupDaemonLock(pidFile string, dbPath string, log daemonLogger) (io.Closer
|
||||
return lock, nil
|
||||
}
|
||||
|
||||
// startRPCServer initializes and starts the RPC server (temporary wrapper for old code)
|
||||
func startRPCServer(ctx context.Context, socketPath string, store storage.Storage, workspacePath string, dbPath string, log daemonLogger) (*rpc.Server, chan error, error) {
|
||||
// Sync daemon version with CLI version
|
||||
rpc.ServerVersion = Version
|
||||
@@ -1005,6 +1006,7 @@ func startRPCServer(ctx context.Context, socketPath string, store storage.Storag
|
||||
return server, serverErrChan, nil
|
||||
}
|
||||
|
||||
// runGlobalDaemon runs the global routing daemon (temporary wrapper for old code)
|
||||
func runGlobalDaemon(log daemonLogger) {
|
||||
globalDir, err := getGlobalBeadsDir()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user