refactor: remove the main room concept
No room has room_settings.is_main = 1, so every main-only path was dead, and admin work is done from the host shell. Each room's agent may now only act on its own room: - IPC: messages/inbound injection only to the source room; schedule, update, pause, resume and cancel only for the source room's tasks; drop the assign_room and refresh_groups IPC tasks and the deps they needed (assignRoom/syncGroups/getAvailableGroups/writeGroupsSnapshot) - DB/host evidence is always scoped to the source group folder - runner MCP server: drop the assign_room tool, the target_group_jid parameters and the isMain flag; list_tasks shows only the room's tasks - drop EJCLAW_IS_MAIN, RunnerInput.isMain and AgentInput.isMain; the global CLAUDE.md memory is now included for every room - drop the available_groups.json snapshot (available-groups.ts), the inferred restart announcement that only went to the main room, and the unused Channel.syncGroups hook - setup register: drop --is-main; deregister-room: drop the main-room refusal and --force, and fix its unknown[] binding type error - remove the groups/main/ template The room_settings.is_main column and migrations are untouched; new rows get the column default (0) and nothing reads it anymore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,11 @@ Discord ──► SQLite (WAL) ──► GroupQueue ──┬──► Owner (ho
|
||||
paired_turn_outputs Discord display
|
||||
```
|
||||
|
||||
## 방 격리와 작업 중단
|
||||
|
||||
- 모든 방은 동등합니다. main(관리) 방 개념은 없으며, 각 방의 에이전트가 IPC로 할 수 있는 일(메시지 전송·inbound 주입, 예약 작업 생성/수정/일시정지/취소, DB·호스트 증거 조회)은 자기 방(같은 group folder)으로만 제한됩니다. 방 등록/변경은 호스트 셸(`setup --step register`, `scripts/deregister-room.ts`)에서 합니다.
|
||||
- 사람이 "그만"·"멈춰"·"stop" 같은 중단 의도만 담긴 짧은 메시지를 보내면 메시지 루프(`src/message-runtime-dispatch.ts` → `src/room-stop.ts`)가 가로채, 커서를 그 메시지까지 넘기고 열린 paired task를 `user_stopped`로 닫은 뒤 `GroupQueue.closeStdin`(사유 `user-stop`) + `killProcess`로 실행 중인 에이전트를 끝냅니다. 판정 규칙은 `src/stop-intent.ts`에 있습니다.
|
||||
|
||||
## Tribunal 역할 분리
|
||||
|
||||
| 역할 | 기본 선택 | 설명 |
|
||||
@@ -101,6 +106,7 @@ Discord ──► SQLite (WAL) ──► GroupQueue ──┬──► Owner (ho
|
||||
| --- | --- |
|
||||
| `src/index.ts` | 전체 오케스트레이션 진입점 |
|
||||
| `src/message-runtime.ts` | 메시지 루프, paired flow 연결 |
|
||||
| `src/room-stop.ts`, `src/stop-intent.ts` | 자연어 작업 중단 |
|
||||
| `src/message-turn-controller.ts` | progress / final delivery 제어 |
|
||||
| `src/paired-execution-context.ts` | owner / reviewer / arbiter 실행 준비 |
|
||||
| `src/paired-workspace-manager.ts` | owner / reviewer workspace 관리 |
|
||||
|
||||
@@ -53,7 +53,7 @@ ARBITER_FALLBACK_ENABLED=true
|
||||
|
||||
설명:
|
||||
|
||||
- reviewer / arbiter provider는 전역 `REVIEWER_AGENT_TYPE` / `ARBITER_AGENT_TYPE`이 기본값이고, 방마다 `assign_room`의 `reviewer_agent_type` / `arbiter_agent_type`으로 덮어쓸 수 있습니다
|
||||
- reviewer / arbiter provider는 전역 `REVIEWER_AGENT_TYPE` / `ARBITER_AGENT_TYPE`이 기본값이고, 방마다 `src/db.ts`의 `assignRoom(jid, { name, reviewerAgentType, arbiterAgentType })`를 관리 셸에서 호출해 덮어쓸 수 있습니다 (에이전트용 `assign_room` 도구는 제거됨)
|
||||
- 역할별 `*_MODEL`은 해당 역할의 provider에 맞춰 주입됩니다. `codex` 역할에는 Codex 모델을, `claude-code` 역할에는 Claude 모델을 넣어야 합니다.
|
||||
- 예를 들어 `ARBITER_AGENT_TYPE=claude-code`로 바꾸면 그때 `ARBITER_MODEL=claude-opus-5-5`를 사용할 수 있습니다.
|
||||
- 모델 ID는 추측하지 말고 `GET https://api.anthropic.com/v1/models`로 확인하세요(`claude-opus-5-0` 같은 표기는 존재하지 않음). 새 모델은 더 높은 Claude Code CLI 버전을 요구할 수 있으므로(예: Opus 5.5는 CLI 2.1.280 이상), `.env`를 바꾸기 전에 runner SDK로 실제 호출해 보고 적용하세요. Opus/Sonnet 5.x는 `CLAUDE_THINKING=adaptive`만 지원합니다.
|
||||
|
||||
Reference in New Issue
Block a user