Commit Graph

417 Commits

Author SHA1 Message Date
Eyejoker
bf1453541f fix: buffer progress to prevent final-like text from showing
Progress updates are now buffered: each new progress flushes the
previous one. The latest pending progress is discarded when final
arrives with matching text, preventing duplicate display in Discord.
2026-03-23 18:23:46 +09:00
Eyejoker
08a560f144 fix: revert progress to previous text when final matches last progress
When the final result text is identical to the last progress update,
edit the progress message back to the previous progress text to avoid
showing the same content twice in Discord.
2026-03-23 18:06:17 +09:00
Eyejoker
0438d9113b fix: clean up progress tracking, fix subagent summary field handling
- Use system/task_progress subtype (not top-level type) for subagent events
- Extract intermediate assistant text between tool calls as progress
- Only show SDK-generated summaries for subagent progress (skip noisy per-tool updates)
- Truncate progress messages to Discord 2000 char limit
- Remove verbose debug logging from production
2026-03-23 17:59:49 +09:00
Eyejoker
7908115ea8 feat: enable subagent progress summaries in Claude runner
- Set agentProgressSummaries: true in SDK query options
- Handle task_progress and task_started events from subagents
- Subagent progress summaries streamed as progress phase to Discord
2026-03-23 17:09:42 +09:00
Eyejoker
77e79505eb feat: auto-suspend tasks on quota errors, add Claude progress tracking
- Auto-suspend tasks after 3 consecutive quota/auth errors with
  retry-after date parsing and Discord notification
- Add tool_progress and tool_use_summary streaming from Claude Agent SDK
- Prefix progress messages with invisible marker so bots ignore them
- Fix misleading provider label in codex service logs
2026-03-23 17:03:17 +09:00
Eyejoker
42d721a9ec fix claude turn teardown and start CI watchers immediately 2026-03-23 08:55:48 +09:00
Eyejoker
7100a13b39 style: normalize rebrand test formatting 2026-03-23 08:09:32 +09:00
Eyejoker
d28b6151a8 chore: rebrand runtime and docs to EJClaw 2026-03-23 08:09:15 +09:00
Eyejoker
634db6f6a9 docs: generalize upstream reference in zh readme 2026-03-23 07:56:07 +09:00
Eyejoker
c3bed7cdad fix: correct architecture diagram, remove directory layout 2026-03-23 07:52:56 +09:00
Eyejoker
177b4450ef rebrand to EJClaw, update README and browser skill
- Rename project to EJClaw, update README with verified features
- Update agent-browser SKILL.md for gstack browse commands (goto, snapshot -D/-a/-C, tabs, dialogs, etc.)
2026-03-23 07:51:00 +09:00
Eyejoker
d3833eb20d style: format agent runner imports 2026-03-23 07:31:26 +09:00
Eyejoker
f42234bc65 refactor: split runner env and slim dashboard facade 2026-03-23 07:30:55 +09:00
Eyejoker
50e8fd4d20 fix: reserve queue capacity for chat runs 2026-03-23 07:21:58 +09:00
Eyejoker
f5eae07657 fix: use resolved ipc dirs for recovery flow 2026-03-23 07:18:47 +09:00
Eyejoker
9def49f7fb fix: isolate watcher task runtimes 2026-03-23 07:16:07 +09:00
Eyejoker
867a6a80ef style: format extracted helpers 2026-03-23 07:00:22 +09:00
Eyejoker
a2db8f6c0e refactor: extract dashboard and task helpers 2026-03-23 06:59:59 +09:00
Eyejoker
866d4970f3 fix: ignore watcher status control messages 2026-03-23 06:45:04 +09:00
Eyejoker
2ab7aedcce style: format extracted runtime helpers 2026-03-23 06:39:47 +09:00
Eyejoker
898c77fcfc refactor: consolidate runtime helpers 2026-03-23 06:39:26 +09:00
Eyejoker
c733217074 style: format runtime helpers 2026-03-23 06:17:41 +09:00
Eyejoker
d4b19ab950 refactor: split message runtime state 2026-03-23 06:17:17 +09:00
Eyejoker
ff1d2c76d4 style: format group queue test 2026-03-23 05:55:21 +09:00
Eyejoker
2c37103243 refactor: restore pre-v1 runtime follow-up flow 2026-03-23 05:54:48 +09:00
Eyejoker
77a7918063 fix: restore implicit follow-up continuation 2026-03-23 05:46:37 +09:00
Eyejoker
4df30a9b9b fix: keep ci watchers off the chat queue 2026-03-23 05:40:31 +09:00
Eyejoker
25b1d702dd style: format isolated task queue scheduling 2026-03-23 05:31:11 +09:00
Eyejoker
2eebe3c7f4 fix: prevent isolated watchers from blocking chat 2026-03-23 05:30:58 +09:00
Eyejoker
cad6ec309c style: format watcher elapsed helper 2026-03-23 05:23:12 +09:00
Eyejoker
127eacb564 fix: restore watcher elapsed status updates 2026-03-23 05:22:52 +09:00
Eyejoker
7c6019dea3 refactor: drop idle queue state 2026-03-23 04:57:13 +09:00
Eyejoker
02408aae8e refactor: make runners single-turn 2026-03-23 04:51:54 +09:00
Eyejoker
83d7bf3d51 feat: merge per-group codex config overlay 2026-03-23 04:20:55 +09:00
Eyejoker
f49d0f1732 fix: restore mentionless paired room bot flow 2026-03-23 04:18:44 +09:00
Eyejoker
be521eb903 fix: require triggers for paired bot messages 2026-03-23 04:15:22 +09:00
Eyejoker
1974f8a6dc refactor: remove active follow-up piping 2026-03-23 04:13:53 +09:00
Eyejoker
3435b99cfc fix: remove silent run budget 2026-03-23 04:07:12 +09:00
Eyejoker
562067352a fix: keep finals separate after silent retries 2026-03-23 03:54:19 +09:00
Eyejoker
290cd95e51 fix: separate finals from tracked progress 2026-03-23 03:54:04 +09:00
Eyejoker
78145c1d46 fix: simplify follow-up lifecycle after output 2026-03-23 02:23:59 +09:00
Eyejoker
58868b02d1 style: format message runtime helper 2026-03-23 02:20:10 +09:00
Eyejoker
1a702d61e3 simplify runtime turn and progress handling 2026-03-23 02:19:48 +09:00
Eyejoker
b83cc95963 fix: restore best-effort progress and requeue stale follow-ups
Two v1/v2 regressions fixed:

1. Progress messages became too brittle: editMessage failure killed all
   subsequent progress updates for the turn. Now resets progressMessageId
   and recreates on next update instead of permanently stopping.

2. Follow-up messages stuck in active agent without output: after 10s of
   no output, closeStdin and requeue the follow-up as a fresh run with
   cursor rollback, instead of silently dropping it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 01:28:52 +09:00
Eyejoker
b5fccf23c4 style: format restart recovery test 2026-03-23 01:00:45 +09:00
Eyejoker
28eb8c6cb1 fix: harden restart recovery flow 2026-03-23 01:00:14 +09:00
Eyejoker
a1324726b1 style: format after runtime unification
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:44:04 +09:00
Eyejoker
d4fc498268 refactor: unify runtime into single message-runtime path
Remove duplicate processGroupMessages, runAgent, startMessageLoop, and
recoverPendingMessages from index.ts. All message processing now flows
through createMessageRuntime() in message-runtime.ts, eliminating the
dual-path issue that caused the v1 follow-up turn reset bug.

index.ts reduced from ~2300 to ~1210 lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:43:57 +09:00
Eyejoker
badb900a23 style: format files after pre-commit prettier run
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:11:44 +09:00
Eyejoker
b647502a10 feat: add seq cursor, work_items, provider fallback, and delivery reliability
Major reliability improvements to the message processing pipeline:

- Add messages.seq monotonic cursor replacing timestamp-based cursors,
  preventing message loss from timestamp collisions with LIMIT queries
- Add work_items table separating agent production from delivery,
  enabling delivery retry without re-running the agent
- Propagate Discord send failures instead of silently swallowing them
- Add Claude 429 → Kimi K2.5 automatic provider fallback with cooldown
- Fix follow-up turn state reset in live index.ts path (not just
  message-runtime.ts) to prevent final output from being lost
- Add restart context tracking for graceful restart announcements
- Lazy migration from timestamp cursors to seq cursors for existing data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:11:32 +09:00