Commit Graph

409 Commits

Author SHA1 Message Date
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
Eyejoker
dd15585941 fix: pass actual chat JID to agent runner instead of group folder
watch_ci tasks in perf channel were silently failing because
NANOCLAW_CHAT_JID was set to the group folder name (e.g. "eyejokerdb-4")
instead of the actual Discord JID. The scheduler rejected the task with
"target group not registered".

Also adds a fallback in ipc.ts to resolve folder names to registered
JIDs when a folder name is passed instead of a JID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:27:00 +09:00
Eyejoker
2c8260135f style: format message-runtime files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 12:29:12 +09:00
Eyejoker
9b741be902 fix: resolve session race condition and follow-up turn output loss
Two bugs fixed:

1. agent-runner error path race condition: when agent process exited
   with error, the promise resolved immediately without waiting for
   outputChain, allowing a late wrappedOnOutput to re-persist a stale
   session ID after clearSession had already run.

2. follow-up turn state not resetting: when a follow-up IPC message
   joined an active run, turn-level flags (finalOutputSentToUser,
   sawNonProgressOutput) from the first turn prevented the last
   progress from being promoted to a final message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 12:29:00 +09:00
Eyejoker
767ab20d76 Restrict Codex task scheduling to CI watchers 2026-03-20 04:09:36 +09:00
Eyejoker
f3283f0314 style: format merged scheduler and db changes 2026-03-20 03:48:48 +09:00
Eyejoker
6eb72ad499 Merge origin/main into chore/nanoclaw-recursive-room 2026-03-20 03:48:29 +09:00
Eyejoker
f281a2ee52 style: apply formatter to runtime files 2026-03-20 03:42:22 +09:00
Eyejoker
a293a701f4 fix: restore regressions from discord-only refactor 2026-03-20 03:41:53 +09:00