agent-lyceum 0.4.12 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,6 +42,32 @@ Requires Node 20+, plus `claude` and/or `codex` on your `PATH` (already logged i
42
42
 
43
43
  Without `--project`, the project is the registered one whose `dir` is the longest prefix of the current directory; if none matches the command lists the registered projects and stops.
44
44
 
45
+ ## Monitor mod (Claude Code)
46
+
47
+ `plugins/status-monitor` is a Claude Code **mod**, not an ordinary plugin: it is written against Claude Code's mod hooks API (`import type { Register } from 'claude-code'`) and runs inside the Claude Code session, where it adds a status line entry, toasts and a `/status-monitor` pane that poll `agent-lyceum status --json`. It needs a Claude Code build that supports mods; it does not change how agent-lyceum itself runs. It shows live run status for one or several projects.
48
+
49
+ **Load it.** Build first (`npm run build`; the mod runs `dist/cli.js`), then start a session with:
50
+
51
+ ```
52
+ claude --plugin-dir /path/to/agent-lyceum/plugins/status-monitor
53
+ ```
54
+
55
+ `--plugin-dir` only applies when a session starts; an already-open session must be restarted (`claude --resume --plugin-dir ...` keeps the conversation). To load it every time, add `alias claude='claude --plugin-dir /path/to/agent-lyceum/plugins/status-monitor'` to your shell rc, or, for hosts where you cannot pass a flag (desktop app, SDK), set `CLAUDE_CODE_PLUGIN_DIRS` to the mod folder. While a session is running, saving a file in the mod folder hot-reloads it.
56
+
57
+ **Use it.**
58
+ - **Status line:** always on once loaded (`team 讀取中…` until the first poll, `team 無法取得狀態:…` when the CLI cannot run); shows the run state, round `n/max`, output tokens, the current step and unread mail. With several projects it shows one overview line (`team 1/3 running · a ... | b ...`).
59
+ - **Toasts:** a message pops up when a run finishes, is interrupted, or an agent's wake fails (prefixed `[project]` when several are watched). Nothing to do.
60
+ - **`/status-monitor`:** the pane opens automatically at session start (it seats from 144 terminal columns; the status line works at any width); type the command to open it at any width. It shows, per project: the run id and state, task, progress and checklist, the agents working now and the queued mail, blocked integrations, notes and result summary, output tokens per runtime, per-agent wake statistics, the last 8 wakes. Each task (a project's current run and its last 3 past runs) is a tab; click a tab to switch. It refreshes with the polling interval while open. Click **關閉** (Close) to dismiss it (Esc does not close it).
61
+
62
+ **Configure it.** In `~/.claude/settings.json` under `pluginConfigs."status-monitor@inline"` (`options`):
63
+
64
+ | Option | Meaning | Default |
65
+ |---|---|---|
66
+ | `command` | CLI to run, split on spaces, e.g. `node /path/to/agent-lyceum/dist/cli.js` | `agent-lyceum` |
67
+ | `project` | Registered project name(s) (`-p`); comma-separate to watch several; empty infers from the session's directory | empty |
68
+ | `intervalSeconds` | How often status is polled | `1` |
69
+
70
+ Changes take effect on the next session start. If the pane shows `無法取得狀態:...`, the `command` could not run (usually `dist/cli.js` was not built) or the project name is not registered.
45
71
 
46
72
  ## Layout
47
73
 
package/README.zh-TW.md CHANGED
@@ -42,6 +42,32 @@ npx agent-lyceum status
42
42
 
43
43
  未指定 `--project` 時,會選用 `dir` 為目前目錄最長前綴的已註冊專案;若沒有符合的專案,指令會列出已註冊專案後停止。
44
44
 
45
+ ## 監控 mod(Claude Code)
46
+
47
+ `plugins/status-monitor` 是 Claude Code **mod**,不是一般的 plugin:它依 Claude Code 的 mod hooks API 撰寫(`import type { Register } from 'claude-code'`),在 Claude Code session 內執行,提供狀態列、通知與 `/status-monitor` 面板,並輪詢 `agent-lyceum status --json`。需要支援 mod 的 Claude Code 版本;不會改變 agent-lyceum 本身的運作。會顯示一個或多個專案的即時執行狀態。
48
+
49
+ **載入。** 先 build(`npm run build`;mod 會執行 `dist/cli.js`),再用下面的指令啟動 session:
50
+
51
+ ```
52
+ claude --plugin-dir /path/to/agent-lyceum/plugins/status-monitor
53
+ ```
54
+
55
+ `--plugin-dir` 只在 session 啟動時生效,已開著的 session 要重開(`claude --resume --plugin-dir ...` 可保留對話)。想每次都載入,就在 shell rc 加 `alias claude='claude --plugin-dir /path/to/agent-lyceum/plugins/status-monitor'`;無法帶參數的環境(桌面 app、SDK)則把 `CLAUDE_CODE_PLUGIN_DIRS` 設成 mod 資料夾。session 執行中儲存 mod 資料夾內的檔案會自動 hot reload。
56
+
57
+ **操作。**
58
+ - **狀態列:** 載入後常駐(第一次輪詢前顯示 `team 讀取中…`,CLI 跑不起來時顯示 `team 無法取得狀態:…`),顯示執行狀態、輪數 `n/max`、output tokens、目前步驟與未讀信件。監看多個專案時顯示一行總覽(`team 1/3 執行中 · a ... | b ...`)。
59
+ - **通知:** 執行完成、被中斷或某個 agent 喚醒失敗時會跳出訊息(監看多個專案時前面加 `[專案名]`),不需要任何操作。
60
+ - **`/status-monitor`:** session 啟動時面板會自動開啟(終端寬度需 144 欄以上才會顯示,狀態列不受影響);也可輸入此指令在任何寬度開啟。每個專案顯示:執行 id 與狀態、任務、進度與清單、正在工作的 agent 與排隊中的信件、受阻的整合、備註與結果摘要、各 runtime 的 output tokens、各 agent 的喚醒統計、最近 8 次喚醒。每個任務(專案目前的執行與最近 3 次過往執行)是一個分頁,點分頁即可切換。面板開著時會依輪詢間隔自動更新,只能點 **關閉** 收起(Esc 不會關閉)。
61
+
62
+ **設定。** 在 `~/.claude/settings.json` 的 `pluginConfigs."status-monitor@inline"`(`options`):
63
+
64
+ | 選項 | 說明 | 預設 |
65
+ |---|---|---|
66
+ | `command` | 要執行的 CLI,以空白分隔,例如 `node /path/to/agent-lyceum/dist/cli.js` | `agent-lyceum` |
67
+ | `project` | 已註冊的專案名稱(`-p`);用逗號分隔可同時監看多個;留空則依 session 所在目錄推斷 | 空 |
68
+ | `intervalSeconds` | 輪詢狀態的間隔(秒) | `1` |
69
+
70
+ 設定變更要等下次啟動 session 才生效。面板若顯示 `無法取得狀態:...`,通常是 `command` 跑不起來(多半是還沒 build `dist/cli.js`),或專案名稱沒有註冊。
45
71
 
46
72
  ## 目錄結構
47
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-lyceum",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "Config + dispatcher for teams of Claude Code / Codex agents with scoped context and file-based mailboxes",
5
5
  "keywords": [
6
6
  "ai",