mariomosca/agent-team-os/tree/main/mods/bus-band
bus-band
一個 Claude Code 外掛,會在提示列上方畫出資訊帶,顯示 Agent Team OS 匯流排中等待這個工作階段處理的訊息。
關於這個 mod
bus-band
一個 Claude Code 外掛,會在提示列上方畫出資訊帶,顯示 Agent Team OS 匯流排中等待這個工作階段處理的訊息。
Bus alita/work-hub: 2 in attesa, 1 urgenti o alta (+1 di altri workspace) [Nascondi]
!! [ALTA] da kai: crewmoor-stato-piano-v1
[normale] da vera: content-brief
- UI 文字使用義大利文(代理的工作語言)。只有待處理訊息時才會顯示;收件匣清空後就消失。
- 範圍和 shell lib(v1.4)相同:依 cwd 前綴從
AGENT_MAP.json找出 agent,以工作區 basename 作為 slug,共用inboxes/<agent>/與inboxes/<agent>/@<slug>/;context.project_path屬於其他工作區的訊息會另外計算。 - 優先級會直接寫出(
URGENTE、ALTA與!!標記),不會只靠顏色判斷。 - 新的
urgent/high訊息抵達時會顯示通知。每 20 s 輪詢一次,也會在每回合結束時輪詢。 /bus-band可切換顯示;Nascondi 按鈕會把它隱藏到下一則新訊息出現。- 唯讀:從不移動、封存或寫入訊息。要處理訊息時,仍使用
/read、/inbox和 MCP 工具。 - 和 shell lib 一樣遵守
AB_HOME(預設為~/.agent-team-os)。
安裝
這個外掛是獨立於主要 agent-team-os 外掛的單獨 plugin,因此手動安裝(在 settings.json 註冊 hooks)時,不會把 hooks 註冊兩次。
使用 install.sh(手動安裝):安裝器會把它複製到 ~/.claude/mods/bus-band/。在 ~/.claude/settings.json 的 env 區塊中,把這個資料夾加入 CLAUDE_CODE_PLUGIN_DIRS,就能在每個工作階段載入:
{ "env": { "CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/bus-band" } }
只使用一個工作階段:claude --plugin-dir /path/to/agent-team-os/mods/bus-band。
安全性
Mods 沒有沙箱:它們會用 Claude Code 自己的存取權限執行。這個外掛只讀取 ~/.agent-team-os/ 與 $HOME/AB_HOME,不會讀其他內容,也不會發出網路請求。用 claude plugin validate mods/bus-band 檢查;它會列出模組接觸到的每個 engine call 和環境變數。
開發
claude plugin validate mods/bus-band # manifest, hooks, calls, state contract
claude plugin test mods/bus-band # hooks/bus.test.ts: cwd→agent, slug, scoping, sort
純 bus 邏輯在 hooks/bus.ts(對應 scripts/agent-team-os-lib.sh);hooks/register.tsx 保存 hooks 與繪圖邏輯。已知差異是:shell lib 也會比對 cwd 的 realpath;mod 比對 Claude Code 回報的 cwd,而這個路徑實際上已經解析完成。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add mariomosca/agent-team-os claude plugin install bus-band
原文 / README
bus-band
A Claude Code mod (Claude Code 2.1.287+) that draws a band above the prompt with the messages waiting for this session on the Agent Team OS bus.
Bus alita/work-hub: 2 in attesa, 1 urgenti o alta (+1 di altri workspace) [Nascondi]
!! [ALTA] da kai: crewmoor-stato-piano-v1
[normale] da vera: content-brief
- UI text is in Italian (the agents' working language). Shows only when something is pending; disappears when the inbox is empty.
- Same scoping as the shell lib (v1.4): agent from
AGENT_MAP.jsonby cwd prefix, slug = workspace basename, shared rootinboxes/<agent>/plusinboxes/<agent>/@<slug>/, messages whosecontext.project_pathbelongs to another workspace counted apart. - Priority is spelled out (
URGENTE,ALTA, a!!marker), never colour alone. - A toast when a new
urgent/highmessage arrives. Polls every 20 s and at the end of every turn. /bus-bandtoggles it; the Nascondi button hides it until the next new message.- Read-only: it never moves, archives or writes a message.
/read,/inboxand the MCP tools stay the way to act on them. - Honours
AB_HOMElike the shell lib (default~/.agent-team-os).
Install
The mod is its own plugin, separate from the main agent-team-os plugin, so a manual install (hooks registered in settings.json) never gets its hooks registered twice.
With install.sh (manual install): the installer copies it to ~/.claude/mods/bus-band/. Load it in every session by adding the folder to CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json:
{ "env": { "CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/bus-band" } }
One session only: claude --plugin-dir /path/to/agent-team-os/mods/bus-band.
Security
Mods are not sandboxed: they run with Claude Code's own access. This one reads ~/.agent-team-os/ and $HOME/AB_HOME, nothing else, and makes no network call. Check with claude plugin validate mods/bus-band, which lists every engine call and env variable the module touches.
Develop
claude plugin validate mods/bus-band # manifest, hooks, calls, state contract
claude plugin test mods/bus-band # hooks/bus.test.ts: cwd→agent, slug, scoping, sort
The pure bus logic lives in hooks/bus.ts (mirrors scripts/agent-team-os-lib.sh); hooks/register.tsx holds the hooks and the drawing. Known gap: the shell lib also matches the realpath of the cwd; the mod matches the cwd Claude Code reports, which is already resolved in practice.
