feat: autonomous agent with brain priority queue, heartbeat, and triggers#1
Merged
Conversation
Replace persistent Claude Code process with Agent SDK query-based architecture. - Add Brain layer (brain.ts, heartbeat.ts, triggers.ts) for agent orchestration - Add MCP server with Discord and schedule tools for autonomous operations - Add SdkRunner using @anthropic-ai/claude-agent-sdk query() API - Remove legacy modules: claude-code, persistent-runner, runner-manager, feedback-loop, response-parser, skills, sessions, discord-commands - Consolidate message splitting (remove chunkDiscordMessage, enhance splitMessage) - Simplify discord-send to schedule-only, remove chunked reply/message helpers - Remove !discord and !schedule text commands (replaced by MCP tools) - Rename files to reflect new architecture: base-runner → system-prompt, discord-types → channel-utils, scheduler-bridge → scheduler-discord, message-handler → agent-response, discord-send → schedule-send - Rename identifiers: handleSettingsFromResponse → handleSystemCommand, SdkRunnerOptions → RunnerOptions, handleMessage → routeMessage - Clean up dead code: unused constants, formatSettings, circuit breaker Co-Authored-By: Claude Opus 4.6 <[email protected]>
Replace hardcoded JST offset with Intl API-based dynamic timezone resolution using the TIMEZONE constant. This correctly handles DST transitions and non-JST timezone configurations. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Reflect current module structure after Agent SDK migration: Brain, MCP, SdkRunner layers and updated data flow descriptions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Implement the autonomous agent system with priority-based task scheduling: - Brain: priority queue that preempts lower-priority tasks when user messages arrive - Heartbeat: periodically checks HEARTBEAT.md and acts on pending items - Triggers: time-based event triggers (morning, evening, weekly reflection) - MCP: refactor context and tools for Discord/scheduler integration - Discord: update agent response streaming and message routing - Scheduler: improve schedule handling and parsing - README: document new architecture and features Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HEARTBEAT.mdin the workspace and acts on pending items; stays silent when nothing to doTest plan
bun run checkandbun run typecheckbun run testdocker compose up thor -d --build🤖 Generated with Claude Code