Commit Graph

10 Commits

Author SHA1 Message Date
Cytown 1c123e0162 refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
Mauro b26337501c fix: error check on state (#864) 2026-03-02 11:59:26 +11:00
Petrichor 222d1a3086 refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mosir 11996f1a0b refactor(pkg): move atomic file write to dedicated fileutil package 2026-02-24 23:57:13 +08:00
mosir c56fcedcb1 refactor(pkg/utils): add unified atomic file write utility 2026-02-24 13:22:52 +08:00
Artem Yadelskyi 9e120f90ea feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
yinwm 4dfa133cb8 refactor(heartbeat): add configurable interval and channel-aware routing
feat(config): add heartbeat interval configuration with default 30 minutes

feat(state): migrate state file from workspace root to state directory

feat(channels): skip internal channels in outbound dispatcher

feat(agent): record last active channel for heartbeat context

refactor(subagent): use configurable default model instead of provider default
2026-02-13 11:13:32 +08:00
yinwm e353844dfb feat: re-enable cronTool service after refactor completion
Re-enable cronTool service integration after completing the ToolResult
refactor (US-016). Removed all temporary disable comments and restored
full cron service lifecycle including start/stop operations.

Additional improvements:
- Add thread-safe access to onHeartbeatWithTools handler
- Fix channel parsing to handle user IDs with special characters
- Add error handling for state file loading failures
2026-02-13 02:09:49 +08:00
yinwm b36c87bd60 chore: Clean up Ralph agent tracking files
Remove .ralph/ directory files from git tracking.
These are no longer needed as the tool-result-refactor is complete.

Also removes root-level prd.json and progress.txt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:51:52 +08:00
yinwm b94941da4a feat: US-009 - Add state save atomicity with SetLastChannel
- Create pkg/state package with State and Manager structs
- Implement SetLastChannel with atomic save using temp file + rename
- Implement SetLastChatID with same atomic save pattern
- Add GetLastChannel, GetLastChatID, and GetTimestamp getters
- Use sync.RWMutex for thread-safe concurrent access
- Add comprehensive tests for atomic save, concurrent access, and persistence
- Cleanup temp file if rename fails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:46:10 +08:00