4 Commits

Author SHA1 Message Date
Codex
f944f97e54 feat: usage-alignment hold (04-08 KST daily + one-off hold until a set time)
Bring back the dawn gap that keeps Claude's 5h windows on the primer
slots (08-13, 13-18, 18-23, 23-04): it was dropped by the 2026-06-08
upstream merge (1dd948a).

- usage-alignment-hold.ts: hold during 04:00-08:00 KST, or until the ISO
  time in router_state `usage_alignment_hold_until` (ignored once past,
  so only the daily gap remains). A one-off end inside the gap runs on to
  08:00.
- Claude turns during a hold pause through the existing usage-pause path
  (messages kept, room resumed at the hold end) with an alignment notice.
  The stored pause is marked alignmentOnly so it does not act as an
  account-wide usage limit.
- Due Claude scheduled tasks stay due until the hold ends (Codex and
  GitHub CI watchers are not held).
- Urgent bypass like the old gate: a human @-mention lets that room run
  until the hold ends.
- Tests stub the wall-clock hold in test/vitest-env.ts so the suite does
  not pause when run between 04 and 08 KST.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:54:39 +09:00
Codex
ce4547daa6 feat: replace session commands with a natural-language stop
Remove the /compact, /clear and /stop session commands. They were gated
to the main room or SESSION_COMMAND_ALLOWED_SENDERS, neither of which
exists in this deployment, so nobody could use them. The agent-runner
/compact passthrough goes with them.

Instead, a short human message whose whole intent is "stop" (그만, 멈춰,
중단해, 하지 마, 취소, stop, cancel, ...; see src/stop-intent.ts) stops the
room when it has something to stop: a running or queued run, an open
paired task, or unprocessed human messages before it. The message loop
then
- advances the room cursors past the stop message (memory + router_state)
- completes the open paired task as user_stopped, cancels its open turns
  and drops its execution lease
- closes stdin with a user-stop reason and kills the agent through the
  existing GroupQueue.closeStdin/killProcess
- replies "진행 중이던 작업을 중단했습니다." once
When nothing is running the message is handled as a normal message.

The user-stop close reason is treated like a human interruption, so the
killed paired turn releases its lease without counting a failure and
queues no follow-up, and the turn controller does not post the generic
failure text on top of the stop reply.

advanceLastAgentCursor no longer moves a cursor backwards, so a run that
finishes after the stop cannot rewind the cursor and re-dispatch the
stop message (the respawn seen when an agent was only killed).

Stale SESSION_COMMAND_* keys in .env are now ignored instead of failing
startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:26:10 +09:00
ejclaw
94d53e4cc3 build: unify bun quality gate 2026-04-11 04:47:16 +09:00
Eyejoker
0112f5a2d6 feat: migrate runtime from Node.js to Bun
- Replace better-sqlite3 with bun:sqlite (native, no native addon build)
- Change all spawn('node') to spawn('bun') for agent processes
- Update package.json scripts: node→bun, tsx→bun, npm→bun
- Add bun-types for tsc compatibility
- Add bun:sqlite→better-sqlite3 shim for vitest (tests run on Node.js)
- Update Dockerfile: install bun alongside Node.js (CLIs need Node)
- Update setup/platform.ts: getNodePath() resolves bun binary
- Remove better-sqlite3 from production dependencies (devDep only for tests)
2026-03-30 23:58:54 +09:00