mariomosca/agent-team-os/tree/main/mods/bus-band
bus-band
Agent Team OS バスでこの session を待っているメッセージを、プロンプトの上に帯として表示する Claude Code plugin です。
この mod について
bus-band
この session を待っている Agent Team OS バスのメッセージを、プロンプトの上に帯として描画する Claude Code mod です。
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 の文字はイタリア語(agent の作業言語)です。保留中のものがあるときだけ表示し、inbox が空になると消えます。
- shell lib(v1.4)と同じスコープです。cwd の prefix から
AGENT_MAP.jsonで agent を決め、workspace の basename を slug とし、inboxes/<agent>/とinboxes/<agent>/@<slug>/を共有します。context.project_pathが別 workspace に属するメッセージは別に数えます。 - 優先度は
URGENTE、ALTA、!!marker のように明示し、色だけには頼りません。 - 新しい
urgent/highメッセージが届くと toast を表示します。20 s ごとと各 turn の終了時に polling します。 /bus-bandで切り替えます。Nascondi ボタンで次の新しいメッセージまで隠せます。- 読み取り専用です。メッセージを移動、archive、書き込みすることはありません。操作には
/read、/inbox、MCP tools を使います。 - shell lib と同じく
AB_HOMEを尊重します(既定値は~/.agent-team-os)。
Install
この mod はメインの agent-team-os plugin とは別の独立した plugin です。そのため手動インストール(settings.json に hooks を登録する方法)でも hooks が二重登録されません。
install.sh を使う場合(手動インストール):installer は ~/.claude/mods/bus-band/ にコピーします。毎回の session で読み込むには、~/.claude/settings.json の env block にこのフォルダーを CLAUDE_CODE_PLUGIN_DIRS として追加します。
{ "env": { "CLAUDE_CODE_PLUGIN_DIRS": "~/.claude/mods/bus-band" } }
1 session だけ:claude --plugin-dir /path/to/agent-team-os/mods/bus-band。
Security
Mods は sandbox されません。Claude Code 自身の権限で動きます。この mod が読むのは ~/.agent-team-os/ と $HOME/AB_HOME だけで、その他は読みません。network call も行いません。claude plugin validate mods/bus-band で確認できます。このコマンドは module が触れるすべての engine call と env variable を一覧にします。
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
純粋な 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.
