@yanauto/broco 0.0.0-stage → 1.0.0

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/LICENSE +202 -0
  3. package/README.md +188 -2
  4. package/README.zh-CN.md +187 -0
  5. package/assets/broco-board-icon-128.png +0 -0
  6. package/assets/broco-favicon-192.png +0 -0
  7. package/assets/broco-favicon-32.png +0 -0
  8. package/assets/broco-favicon-64.png +0 -0
  9. package/assets/broco-foreman-256.png +0 -0
  10. package/assets/broco-hero-1024.png +0 -0
  11. package/assets/broco-icon-512.png +0 -0
  12. package/assets/broco-readme-logo-dark.png +0 -0
  13. package/assets/broco-readme-logo-light.png +0 -0
  14. package/assets/broco-social-preview-1280x640.png +0 -0
  15. package/assets/favicon.ico +0 -0
  16. package/bin/broco +1077 -0
  17. package/bundle/board/assets/index-Bue0HpFh.css +1 -0
  18. package/bundle/board/assets/index-DTqMQtD9.js +16 -0
  19. package/bundle/board/broco-board-icon-128.png +0 -0
  20. package/bundle/board/broco-favicon-32.png +0 -0
  21. package/bundle/board/broco-favicon-64.png +0 -0
  22. package/bundle/board/broco-foreman-256.png +0 -0
  23. package/bundle/board/favicon.ico +0 -0
  24. package/bundle/board/fonts/instrument-sans-latin.woff2 +0 -0
  25. package/bundle/board/fonts/jetbrains-mono-latin.woff2 +0 -0
  26. package/bundle/board/index.html +18 -0
  27. package/lib/attachments.mjs +104 -0
  28. package/lib/claude-md.mjs +132 -0
  29. package/lib/cli-args.mjs +292 -0
  30. package/lib/cli-process.mjs +75 -0
  31. package/lib/client.mjs +198 -0
  32. package/lib/credential-proxy.mjs +165 -0
  33. package/lib/credential-source.mjs +23 -0
  34. package/lib/crew.mjs +947 -0
  35. package/lib/detect.mjs +279 -0
  36. package/lib/directories.mjs +32 -0
  37. package/lib/map.mjs +336 -0
  38. package/lib/model-catalog.json +864 -0
  39. package/lib/model-catalog.mjs +138 -0
  40. package/lib/model-env.mjs +11 -0
  41. package/lib/native.mjs +228 -0
  42. package/lib/paths.mjs +63 -0
  43. package/lib/pi-profile.mjs +29 -0
  44. package/lib/pi-secrets.mjs +48 -0
  45. package/lib/pi.mjs +232 -0
  46. package/lib/platform/index.mjs +13 -0
  47. package/lib/platform/launchd.mjs +138 -0
  48. package/lib/platform/linux.mjs +168 -0
  49. package/lib/platform/macos.mjs +29 -0
  50. package/lib/platform/processes.mjs +102 -0
  51. package/lib/problems.mjs +50 -0
  52. package/lib/projects.mjs +530 -0
  53. package/lib/quota.mjs +132 -0
  54. package/lib/roster-output.mjs +136 -0
  55. package/lib/roster.mjs +913 -0
  56. package/lib/runner.mjs +403 -0
  57. package/lib/settings-audit.mjs +104 -0
  58. package/lib/setup.mjs +416 -0
  59. package/lib/slots.mjs +177 -0
  60. package/lib/stats.mjs +92 -0
  61. package/lib/store.mjs +737 -0
  62. package/lib/stream-workers.mjs +464 -0
  63. package/lib/templates.mjs +173 -0
  64. package/lib/time.mjs +25 -0
  65. package/lib/web.mjs +260 -0
  66. package/lib/worker-policy.mjs +17 -0
  67. package/lib/worktree.mjs +269 -0
  68. package/package.json +50 -4
  69. package/scripts/package-board.mjs +53 -0
  70. package/skills/broco/SKILL.md +59 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,209 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0
4
+
5
+ ### English
6
+
7
+ `opus-manager` / `cc-bro` is now **`broco`** — a cross-harness collaboration CLI that lets your local coding agents work together using your existing official CLI logins.
8
+
9
+ - **L0 Zero-`init` Start & Multi-Host Open Skill**:
10
+ - `broco setup` detects installed, signed-in CLIs on your machine, asks you once to confirm a global allowlist (never enables workers silently), prints a live quota-aware roster immediately, and installs one open `SKILL.md` into `~/.agents/skills/broco/` with automatic host syncing for **Claude Code**, **Codex**, **Cursor**, **Antigravity**, **OpenCode**, and **Pi** (linking `~/.pi/agent/skills/broco` and respecting `PI_CODING_AGENT_DIR`).
11
+ - Works in any directory immediately after `setup` using your global policy — state stays in `~/.broco/` keyed by `realpath(gitRoot || cwd)`, leaving your repositories untouched.
12
+ - Optional L1 `broco init` remains available for per-repo strict allowlists, concurrency caps, repo rules, or heavy manager mode (`--manager-mode`). `init` defaults to maintaining a marked `AGENTS.md` section (`--host` supports `auto|agents|claude|codex|cursor|agy|opencode|pi`) and touches `CLAUDE.md` only when already present or when `--host claude` is specified.
13
+ - **Built-in Symmetric `claude` Worker & Recursion Guard**:
14
+ - Added native `claude` worker adapter (`claude -p --output-format stream-json` + `--resume`, stdin prompt passing, unified failure classification, and secret redaction) alongside `codex`, `agy`, `cursor-agent`, `pi:<provider>`, and `custom:<name>`. Any host agent can now dispatch to any worker symmetrically.
15
+ - Added hard recursion protection: every worker subprocess inherits `BROCO_IN_WORKER=1`, and `broco` refuses nested worker-to-worker dispatch by default unless explicitly overridden with `--allow-nested`.
16
+ - **Default Cross-Vendor Blind Review**:
17
+ - `broco review <name>` now makes `--by` optional: when omitted, it automatically picks a permitted worker from a different vendor with available quota headroom.
18
+ - **Dynamic Local Timezone & Brand Refresh**:
19
+ - Replaced hardcoded `Asia/Shanghai` timestamps with dynamic local timezone resolution (`BROCO_TZ` → `TZ` → system timezone → `UTC`) across CLI output, audit entries, proxy expiry, and the local board.
20
+ - Shipped the 16-bit pixel broccoli visual identity across the README, website, docs, favicons, and local board.
21
+ - **Unified Naming & Lossless Migration**:
22
+ - Renamed package, CLI, data directory, project marker, and env vars to `broco`, `~/.broco/`, `.broco/`, and `BROCO_*`.
23
+
24
+ #### Upgrade from `cc-bro` (0.4.x) or `opus-manager`
25
+
26
+ Wait for any active work you want to keep (`cc-bro status` if still installed), install `broco`, then run `broco shutdown` and `broco setup`. `broco setup` detects existing `~/.cc-bro/` state and running legacy runners and walks you through lossless migration to `~/.broco/` without disturbing ticket history. See the [upgrade guide](docs-site/en/upgrade.md).
27
+
28
+ ### 简体中文
29
+
30
+ `opus-manager` / `cc-bro` 正式演进为 **`broco`** v1.0.0——跨 harness 本地协作 CLI,让你当前正在用的 coding agent 直接复用本机其他已登录官方 CLI 一起干活。
31
+
32
+ - **L0 免 `init` 开箱直跑与多宿主开放 Skill**:
33
+ - `broco setup` 一次完成本机 CLI 探测、全局允许名单单步确认(绝不静默全放行)、实时额度花名册输出,以及将开放 `SKILL.md` 写入 `~/.agents/skills/broco/` 并同步挂载到 **Claude Code**、**Codex**、**Cursor**、**Antigravity**、**OpenCode**、**Pi**(同时为 Pi 链接 `~/.pi/agent/skills/broco` 并支持 `PI_CODING_AGENT_DIR`)。
34
+ - 装完即在任意目录按全局策略开跑,工单按 `realpath(gitRoot || cwd)` 归档于 `~/.broco/`,项目仓库保持原样。
35
+ - 保留可选 L1 `broco init` 用于私密仓硬隔离名单、独立并发上限、项目规矩或显式重度经理模式(`--manager-mode`);优先维护 `AGENTS.md` 标记段(`--host` 支持 `auto|agents|claude|codex|cursor|agy|opencode|pi`),无 `AGENTS.md` 且已有 `CLAUDE.md` 或显式传入 `--host claude` 时改为维护 `CLAUDE.md`。
36
+ - **内置全对称 `claude` 工人与防递归保护**:
37
+ - 新增原生 `claude` 适配器(`claude -p --output-format stream-json` + `--resume`,stdin 传题、统一失败分类与凭据脱敏),与 `codex`、`agy`、`cursor-agent`、`pi:<厂商>`、`custom:<名称>` 全对称互调。
38
+ - runner 启动工人进程强制注入 `BROCO_IN_WORKER=1`,默认拒绝工人嵌套派单(除非显式 `--allow-nested`)。
39
+ - **默认跨模型盲审**:
40
+ - `broco review <名字>` 支持省略 `--by`,自动优先挑选与原单不同厂商且额度宽裕的已放行工人。
41
+ - **动态本机时区与像素西兰花视觉**:
42
+ - 移除硬编码 `Asia/Shanghai`,按 `BROCO_TZ` → `TZ` → 系统时区 → `UTC` 动态显示 CLI、审计日志、凭据代理与看板时间。
43
+ - 全面换装 16-bit 戴安全帽像素西兰花视觉体系(README、官网、文档、favicon 与本地看板)。
44
+ - **统一更名与无损迁移**:
45
+ - 包名、命令、数据目录、项目标记与环境变量统一迁至 `broco`、`~/.broco/`、`.broco/` 与 `BROCO_*`。
46
+
47
+ #### 从 `cc-bro`(0.4.x)或 `opus-manager` 升级
48
+
49
+ 先确认需保留的在跑任务已完成,安装 `broco` 后运行 `broco shutdown` 和 `broco setup`。`broco setup` 自动探测本机 `~/.cc-bro/` 数据和旧版后台进程,提供一步无损迁移至 `~/.broco/`,完整保留项目与工单历史。详见[升级指南](docs-site/zh/upgrade.md)。
50
+
51
+ ## 0.4.1
52
+
53
+ ### English
54
+
55
+ - **Agent-First CLI Ergonomics**:
56
+ - `say` reads multi-line or backtick-heavy prompts from `--file <path>`, `--file -`, or `stdin` (`-` or piped input) without shell-escaping friction or `ps` argv exposure.
57
+ - Added `cc-bro status [--project PATH] [--all] [--json]` to inspect runner health, protocol compatibility, web URL, active credential proxies, active/queued tickets, batches and cleanable worktrees without auto-starting an offline runner.
58
+ - Added `cc-bro diff <name> [--stat] [--json]` (tracked + untracked changes against the ticket's base commit) and `cc-bro clean [name|prefix] [--dry-run] [--delete-branch] [--force] [--json]` (safe worktree + orphaned attachment cleanup).
59
+ - Added context-saving filters on `ls` (`--active`, `--status`, `--flag`, `--batch`, `--limit`) and `show` (`--compact`, `--turn`, plus batch `--status` and `--full`), batch-level `cc-bro retry <prefix>` for failed/stopped shards, `map --inputs-file <path|->`, `roster --global`, `stats --project`, `init --project`, `~/` path expansion, and `--json` across `setup`, `ui`, and `shutdown`.
60
+ - **Runtime, SQLite & Lifecycle Optimization**:
61
+ - Event-driven `/wait` wakes immediately (0ms) via microtask-coalesced `Projects` notifications instead of 140ms SQLite polling, returning `task`, `cwd`, `worktree`, `branch` and `changedFiles` alongside the turn result.
62
+ - Rewrote `Store.ticketRows`, `batchDetail` and `ticketRecords` into constant-count batched SQLite queries (`BEGIN IMMEDIATE` write transactions, indexed timelines, microtask-coalesced queue/SSE broadcasts, bulk `{ type: 'tickets' }` SSE frames, and async live `git` file tracking) — 150-shard `map` + board queries run in ~260ms.
63
+ - Orphan-free worker and service lifecycle: `SIGTERM`/`SIGINT` aborts and reaps active workers while preserving queued turns; `done`, `uninit` and a 10-minute idle timer release idle `pi` RPC processes; `0700` UID-verified socket directory with seamless `0.4.0` legacy socket upgrade guard; Linux `/proc` platform backend; full secret redaction across native/stream/template workers; and sanitized `PATH` / `npm_config_prefix` handling in `setup` and `install-local.sh`.
64
+ - **Board UI & Quota Polish**:
65
+ - Upgraded the Svelte 5 board (`100dvh` independent column scroll, 50-card Done cap, search and batch/outcome filters) with live `map` batch progress bars, `[index/count]` shard badges and sibling shard switcher, queue badges, multi-task history, collapsed `Asia/Shanghai` (`UTC+8`) timelines, problem/context callouts, accurate `runningCount` pulse, auto-restored `web_port` across runner restarts, `agy` secondary-group quota warnings, and full `agy` catalog `picks`.
66
+
67
+ #### Upgrade from 0.4.0 or earlier
68
+
69
+ Check `cc-bro status`, let active work you want to keep finish, then run `cc-bro shutdown` and `cc-bro setup`. Version `0.4.1` uses runner protocol `14` (`cc-bro shutdown` cleanly stops protocols `4`–`13`, including `0.4.0` legacy `/tmp` sockets).
70
+
71
+ ### 简体中文
72
+
73
+ - **面向 Agent 的 CLI 易用性升级**:
74
+ - `say` 支持 `--file <路径>`、`--file -` 及 `stdin`(`-`/管道/heredoc)读取多行或含反引号与 `$` 变量的复杂提示词,免除 shell 转义困扰且不在 `ps` 暴露题面。
75
+ - 新增 `cc-bro status [--project 路径] [--all] [--json]`,在不额外拉起未启动服务的前提下查看后台健康度、协议兼容性、看板地址、凭据代理、在跑/排队单、批次进度与可清理 worktree。
76
+ - 新增 `cc-bro diff <名字> [--stat] [--json]`(对比基线提交查看跟踪与未跟踪改动)与 `cc-bro clean [名字|前缀] [--dry-run] [--delete-branch] [--force] [--json]`(安全清理已完成 worktree 与孤立附件快照)。
77
+ - `ls` 新增 `--active`、`--status`、`--flag`、`--batch`、`--limit` 过滤;`show` 新增 `--compact`、`--turn` 及批次 `--status`/`--full`;新增批次级 `cc-bro retry <前缀>`、`map --inputs-file`、`roster --global`、`stats --project`、`init --project`、`~/` 路径展开,以及 `setup`/`ui`/`shutdown` 的 `--json` 输出。
78
+ - **后台性能、SQLite 与进程生命周期治理**:
79
+ - `/wait` 改为微任务合并的事件驱动即刻唤醒(0ms,告别 140ms SQLite 轮询),直接返回 `task`、`cwd`、`worktree`、`branch` 与 `changedFiles`。
80
+ - `Store.ticketRows`、`batchDetail` 与 `ticketRecords` 重写为常数次批量 SQL 查询(`BEGIN IMMEDIATE` 写事务、时间线索引、队列与 SSE 微任务合并、`>4` 变更合并推送 `tickets` 帧、异步 `git` 改动统计),150 分片并发查询耗时约 260ms。
81
+ - 无孤儿进程生命周期:`SIGTERM`/`SIGINT` 干净中止并回收在跑子进程且保留排队单;`done`、`uninit` 与 10 分钟空闲定时器自动回收空闲 `pi` 进程;`0700` UID 校验套接字目录并兼容 `0.4.0` 旧套接字平滑升级;新增 Linux `/proc` 平台支持、全通道凭据脱敏,以及 `setup`/`install-local.sh` 环境净化。
82
+ - **看板界面与额度体验**:
83
+ - Svelte 5 看板全面适配 `0.4.x`(`100dvh` 独立分栏滚动、Done 折叠、搜索与批次/结果筛选、`map` 分片进度条与兄弟分片切换、排队名次、多任务历史、折叠北京时间 `UTC+8` 活动流、故障与上下文告警、准确的 `runningCount` 呼吸灯、重启自动恢复端口、`agy` 副组额度告警及全类别模型 `picks`)。
84
+
85
+ #### 从 0.4.0 及更早版本升级
86
+
87
+ 先用 `cc-bro status` 确认任务状态,等需保留的在跑任务完成后执行 `cc-bro shutdown` 和 `cc-bro setup`(`0.4.1` 使用协议 `14`,`shutdown` 兼容协议 `4`–`13` 及旧 `/tmp` 套接字)。
88
+
89
+ ## 0.4.0
90
+
91
+ ### English
92
+
93
+ - Added per-project FIFO concurrency pools (`--concurrency`, `cc-bro set concurrency`), sharded batch fan-out (`cc-bro map`), `cc-bro retry`, optional turn on `wait`, native `agy` stdin prompts + `/usage` quota + 5-modality attachments, direct Agent-First configuration commands (`set`, `allow`, `deny`, `defaults`, `note`, `rules`, `hide`, `unhide`) with `Asia/Shanghai` audit log and `cc-bro undo`, `init`/`uninit` `CLAUDE.md` markers, `cc-bro --version`, runner crash/signal recovery tracking, and loopback credential proxies (`proxy-open`, `proxy-list`, `proxy-close`).
94
+
95
+ ### 简体中文
96
+
97
+ - 新增按项目隔离的先来先跑并发池(`--concurrency`、`cc-bro set concurrency`)、`cc-bro map` 批量分片派发、`cc-bro retry`、省略轮次的 `wait`、`agy` 原生 stdin 传题与 `/usage` 额度及五模态附件、Agent 直接配置命令与北京时间审计撤回(`audit`/`undo`)、`init`/`uninit` 自动维护 `CLAUDE.md`、`cc-bro --version`、后台生命周期恢复记录,以及本地回环凭据代理(`proxy-open`、`proxy-list`、`proxy-close`)。
98
+
99
+ ## 0.3.1
100
+
101
+ ### English
102
+
103
+ - The roster discovers all installed, signed-in CLI models and pi providers. Project permissions still apply. Hide model families globally or per project to remove them from the manager's roster and reject dispatch, including queued starts.
104
+ - Model descriptions, tiers, grades and task picks ship in the package. Override entries by ID in `~/.cc-bro/models.json`. The skill checks input capabilities first, honors user notes and rules, and flags research older than 60 days.
105
+ - Model inputs are intersected with the CLI's actual transport. CLI-reported context and output limits take precedence over catalog API ceilings; missing data stays unknown. `say --attach` delivers supported images through native Codex or pi, with snapshots preserved for queued turns.
106
+ - Each bro can have a global default model and effort, with project overrides. The roster and Settings show effective defaults; subsequent dispatches use them without changing other CLI settings.
107
+ - Text and JSON rosters are compact by default. Denied bros contain only ID and permission; effort/fast variants share one row, and catalog-labeled older models are folded. Use `--full` for exact variants, limits and full metadata, or `--worker ID` to inspect one bro. Notes and rules remain intact.
108
+ - Bilingual Docs cover model capabilities, attachments, catalog overrides, hiding, defaults and compact queries.
109
+
110
+ #### Upgrade from 0.3.0
111
+
112
+ Install `cc-bro@0.3.1`, then run `cc-bro shutdown` and `cc-bro setup` to refresh the runner and skill. Let work you want to finish complete first: shutdown stops running and queued turns across all projects on that runner. Existing settings, sessions and tickets are preserved. **JSON consumers should use `roster --json --full` when they need detailed model fields.** Denied bros no longer expose models even in full mode; user-hidden models stay hidden. See the [upgrade guide](docs-site/en/upgrade.md).
113
+
114
+ ### 简体中文
115
+
116
+ - 花名册自动发现已安装、已登录 CLI 的全部模型与 pi 厂商,仍遵守项目允许名单。可按 bro 全局隐藏模型系列,项目可覆盖;隐藏后从经理花名册移除,派单和排队开跑均拒绝。
117
+ - 随包提供模型简介、定位、档次和任务 picks,可在 `~/.cc-bro/models.json` 按 ID 覆盖。skill 先核对输入能力,用户备注和规矩优先,研究超过 60 天提醒更新。
118
+ - 输入能力取模型与当前 CLI 通道的交集;CLI 实报上下文和输出上限优先于目录 API 上限,缺数保留 unknown。`say --attach` 可通过原生 Codex 或 pi 交付支持的图片,并保存排队轮次的附件快照。
119
+ - 每个 bro 可设全局默认模型和档位,项目可覆盖。花名册与配置页显示生效值,下次派活使用新配置,不改其他 CLI 的设置。
120
+ - 文本和 JSON 花名册默认紧凑:未允许的 bro 只列名字和权限,档位/fast 变体合并一行,目录标记的旧型号折叠。`--full` 查询具体变体、上限和完整元数据,`--worker ID` 只查一个 bro;用户备注和规矩完整保留。
121
+ - 中英文 Docs 补齐模型能力、附件、目录覆盖、隐藏、默认值和紧凑查询。
122
+
123
+ #### 从 0.3.0 升级
124
+
125
+ 安装 `cc-bro@0.3.1`,再执行 `cc-bro shutdown`、`cc-bro setup` 更新服务和技能。想做完的单先等完成;停机会停止该服务下所有项目的运行单和排队单。原有设置、会话和工单保留。**依赖模型详细字段的 JSON 调用方改用 `roster --json --full`。** 完整模式也不展示未允许 bro 的模型,用户隐藏项仍不出现,详见[升级指南](docs-site/zh/upgrade.md)。
126
+
127
+ ## 0.3.0
128
+
129
+ ### English
130
+
131
+ - A live project roster exposes permitted CLIs, models, effort levels, detected defaults, login, capabilities, rules and user notes. The Claude Code skill reads it before choosing a bro. `say` and `review` accept `--effort` and can change models between completed turns.
132
+ - Built-in agy and cursor-agent workers join native Codex and pi. They resume by explicit session ID and queue active follow-ups. Cache is shown only when the CLI reports it. Every backend can use worktrees and participate in linked reviews.
133
+ - Custom CLI templates provide new-session and resume commands, reply/ID extraction and optional model/effort arguments. A real two-turn memory trial is required before saving. Gemini CLI and OpenCode are editable, degraded presets rather than unverified full adapters.
134
+ - The board has global and project Settings: read-only detection, install/update/login commands opened in Terminal, allowlists, defaults, notes and rules. Manager-proposed notes need user confirmation. Settings are stored only in cc-bro; credential-file values and other CLI configuration are untouched.
135
+ - The website adds bilingual roster, custom CLI and Settings guides.
136
+
137
+ #### Upgrade from 0.2.0
138
+
139
+ Install `cc-bro@0.3.0`, then use the new `cc-bro shutdown` and rerun `cc-bro setup`. Wait first if you want active work to finish: shutdown cancels running and queued turns across the runner’s projects. Existing 0.2 policies, named sessions and ticket history are preserved; no new workers are allowed automatically. The old-runner shutdown path remains compatible with 0.1.0 and M2. See the [upgrade guide](docs-site/en/upgrade.md).
140
+
141
+ ### 简体中文
142
+
143
+ - 新增实时项目花名册,列出允许的 CLI、模型、档位、检测默认值、登录、能力、规矩和用户备注。Claude Code 技能先读花名册再派活。`say` 和 `review` 支持 `--effort`,完成一轮后可换模型。
144
+ - 内置 agy、cursor-agent,与原生 Codex、pi 并列。按明确会话 ID 续聊,运行中追加要求排到下一轮。CLI 有上报才显示缓存。各后端都可使用 worktree、互为关联审查者。
145
+ - 自定义 CLI 模板支持新对话、续聊、回复/ID 提取、可选模型和档位参数,保存前必须通过真实两轮记忆试跑。Gemini CLI 和 OpenCode 是可编辑降级预设,不冒充已验证的全功能适配器。
146
+ - 看板新增全局/项目配置:只读检测、在终端打开安装/升级/登录命令、允许名单、默认值、备注和规矩。经理提议的备注必须用户确认。配置只存在 cc-bro,不读凭据文件值,不写其他 CLI 配置。
147
+ - 官网新增中英花名册、自定义 CLI、配置页指南。
148
+
149
+ #### 从 0.2.0 升级
150
+
151
+ 安装 `cc-bro@0.3.0`,用新版执行 `cc-bro shutdown` 后重跑 `cc-bro setup`。想让在跑的任务完成就先等待;停机会取消服务所有项目的运行单和排队单。保留 0.2 原有权限、具名会话和工单历史,不自动放行新工人。旧服务停机仍兼容 0.1.0、M2,详见[升级指南](docs-site/zh/upgrade.md)。
152
+
153
+ ## 0.2.0
154
+
155
+ ### English
156
+
157
+ #### Breaking: the manager room is gone
158
+
159
+ Open Claude Code in the project itself. The separate manager folder, its local skill and the board’s provider settings were part of 0.1.0. The new user-level skill delegates from the chat you already use. The new registry does not import 0.1.0 tickets or manager notes.
160
+
161
+ #### Workers and tickets
162
+
163
+ - Choose native Codex or a pi provider for each ticket. Register the allowed worker IDs and a default per project. Native Codex and pi using a Codex subscription are separate choices.
164
+ - Reuse a name to continue a session; use different names to run in parallel. A follow-up receipt says whether it reached the current turn, was queued for the next turn or was rejected.
165
+ - Start a ticket in a Git worktree or ask a different worker to review a completed turn. The board shows the branch, changed files, steps, linked reviews and reported input cache hits. Acceptance leaves the branch and worktree intact.
166
+
167
+ #### Upgrade from 0.1.0
168
+
169
+ 1. Let any work you want to keep running finish. If you have notes in a manager room, keep that folder for reference.
170
+ 2. Install with `npm install -g cc-bro@0.2.0`. If an old runner is active, use the new `cc-bro shutdown`. It stops running and queued work across that runner’s projects; unfinished turns do not resume automatically. Files already written stay on disk.
171
+ 3. Run `cc-bro setup`. In the actual project root, run `cc-bro init` and choose allowed workers and a default. Open Claude Code there and type `/cc-bro`. The old ticket database stays on disk.
172
+
173
+ See the [upgrade walkthrough](docs-site/en/upgrade.md).
174
+
175
+ ### 简体中文
176
+
177
+ #### 不兼容:移除经理室
178
+
179
+ 直接在项目里打开 Claude Code。0.1.0 的独立经理室、目录里的技能和看板中的厂商设置都已移除。新版把技能装到用户目录,由你正在使用的对话派单。新登记库不会导入 0.1.0 的工单或经理笔记。
180
+
181
+ #### 工人与工单
182
+
183
+ - 每张单可选原生 Codex 或一个 pi 厂商。每个项目分别登记允许的工人和默认工人。原生 Codex 和通过 pi 使用 Codex 订阅是两个独立选项。
184
+ - 同名续会话,不同名可并行。运行中追加要求,回执明确显示已注入当轮、排到下一轮或被拒。
185
+ - 可以用独立 Git worktree 写单,也可以让另一个工人审查已完成的轮次。看板展示分支、改动文件、步骤、关联审查单和工人上报的输入缓存命中率。收单时保留分支和 worktree。
186
+
187
+ #### 从 0.1.0 升级
188
+
189
+ 1. 想让旧单做完就先等它们结束。经理室里有用的笔记可留在原文件夹查阅。
190
+ 2. 运行 `npm install -g cc-bro@0.2.0`。若旧服务仍在运行,用新版执行 `cc-bro shutdown`。这会停止该服务所有项目的运行单和排队单;未完成的轮次不会自动续跑,已经写入的文件保留。
191
+ 3. 运行 `cc-bro setup`。进入实际项目根目录运行 `cc-bro init`,选好允许的工人和默认工人。在这里打开 Claude Code,输入 `/cc-bro`。旧工单数据库保留在磁盘上。
192
+
193
+ 详见[升级指南](docs-site/zh/upgrade.md)。
194
+
195
+ ## 0.1.0
196
+
197
+ ### English
198
+
199
+ The first macOS preview paired each project with a separate Claude Code manager room. Named pi workers ran in the project and continued working when the manager chat closed.
200
+
201
+ - The setup board could install pi, connect a provider using a key or subscription, and set the default worker model.
202
+ - Tickets moved through Queued, Working, Review and Done. The CLI could send follow-ups, show history, wait for a turn or stop a worker. The local board showed progress across projects.
203
+
204
+ ### 简体中文
205
+
206
+ 首个 macOS 预览版为每个项目建立独立的 Claude Code 经理室。具名 pi 工人在项目里执行任务,关闭经理对话后仍能继续工作。
207
+
208
+ - 可在引导看板安装 pi、用密钥或订阅连接厂商,并设置默认工人模型。
209
+ - 工单经过排队、进行中、待验收、已完成四列。命令行支持插话、查看历史、等待轮次和停止工人;本机看板可以查看多个项目的进度。
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 yanauto
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md CHANGED
@@ -1,3 +1,189 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/broco-readme-logo-dark.png">
4
+ <source media="(prefers-color-scheme: light)" srcset="assets/broco-readme-logo-light.png">
5
+ <img src="assets/broco-readme-logo-light.png" alt="broco — Let your harnesses work together." width="520">
6
+ </picture>
7
+ </p>
2
8
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
9
+ <p align="center">
10
+ Formerly <code>opus-manager</code> (v0.4) · Apache-2.0 · <a href="README.zh-CN.md">中文</a> · <a href="https://broco.yanauto.me/">Website</a> · <a href="https://broco.yanauto.me/docs/">Docs</a> · <a href="CHANGELOG.md">Changelog</a>
11
+ </p>
12
+
13
+ **Let your harnesses work together.** Stay in whichever coding agent you already have open, and delegate to the rest on your machine — Claude Code, Codex, Cursor, Antigravity, OpenCode, and Pi. Run parallel git worktrees, ask another model family for a cold diff review, and route around 5-hour quota limits using your existing logins.
14
+
15
+ ## Get started
16
+
17
+ Requires macOS or Linux, Node.js 24+, and two or more coding CLIs you already signed into locally.
18
+
19
+ ```sh
20
+ npm install -g @yanauto/broco
21
+ broco setup
22
+ ```
23
+
24
+ `broco setup` does four things in one pass:
25
+
26
+ 1. Detects the coding harnesses already installed and signed in on your machine.
27
+ 2. Asks you once to confirm your global allowlist (never enables workers silently).
28
+ 3. Prints a live quota-aware roster immediately.
29
+ 4. Installs one open `SKILL.md` into `~/.agents/skills/broco/` and links or syncs it into your detected local hosts (**Claude Code**, **Codex**, **Cursor**, **Antigravity**, **OpenCode**, and **Pi** — linking `~/.pi/agent/skills/broco` and respecting `PI_CODING_AGENT_DIR`).
30
+
31
+ Then go straight back to your current harness and ask in plain language:
32
+
33
+ > See which harness has quota headroom, fix the `verifyToken()` expiry bug in a worktree, then have another vendor review the diff.
34
+
35
+ **No per-repo `init` required (L0).** `broco` works in any directory right after `setup` using your global allowlist. Ticket state stays in `~/.broco/`, leaving your repository untouched unless you explicitly opt into per-project policy with `broco init`.
36
+
37
+ ## Symmetric collaboration
38
+
39
+ Any host harness can delegate to any allowed worker — including calling `claude` itself from Codex, Cursor, Antigravity, OpenCode, or Pi.
40
+
41
+ | Worker | Integration & Inputs | Follow-up during a turn |
42
+ | --- | --- | --- |
43
+ | `claude` | Native `claude -p --output-format stream-json` + `--resume` via stdin (`text`, `image`, `pdf` via `--add-dir` + `Read`; rejects `audio`/`video`) | Queues for the next turn |
44
+ | `codex` | Native Codex app-server + live 5h/weekly quota (`text`, `image`, reported `audio`) | Injects when the turn accepts steering; otherwise queues |
45
+ | `agy` | Native Antigravity CLI via stdin + `/usage` multi-group quotas (`text`, `image`, `audio`, `video`, `pdf`) | Queues for the next turn |
46
+ | `cursor-agent` | Native Cursor CLI with structured events and session ID resume | Queues for the next turn |
47
+ | `pi:<provider>` | pi RPC with explicit per-provider permission (`text`, `image`) | Injects when pi confirms delivery; otherwise queues |
48
+ | `custom:<name>` | Trial-tested new-session and resume command templates | Queues; native step events and cache are unavailable |
49
+
50
+ - **Official local CLIs using your existing logins.** `broco` spawns the official CLIs you already signed into as isolated local subprocesses, keeping state in `~/.broco/` without touching other CLIs' configs.
51
+ - **Safe prompts and secret redaction.** Prompts stream over `stdin` so task text stays out of `ps` arguments, and secret patterns are redacted before worker streams are stored in SQLite.
52
+ - **Recursion guard (`BROCO_IN_WORKER=1`).** Every worker process inherits `BROCO_IN_WORKER=1`; `broco` refuses nested worker-to-worker dispatch by default unless explicitly overridden with `--allow-nested`.
53
+
54
+ ## When two harnesses beat one
55
+
56
+ - **Cross-vendor code review.** Once your main harness finishes a patch, hand the git diff to a different model family cold, with fresh eyes on the diff alone.
57
+ - **Quota-aware handoff.** When your primary CLI approaches its 5-hour cap, send test fixes or refactors to another signed-in harness with headroom and keep your session moving.
58
+ - **Borrow another harness’s strengths.** Stay in your terminal while sending screenshots, PDFs, audio, video, or model-specific work to whichever local CLI fits best across Claude, Gemini, Codex, Cursor, and Pi.
59
+ - **Parallel worktree batches.** Fan out repetitive audits, migrations, or multi-module edits in isolated git worktrees so several tasks move forward while you stay focused in your main session.
60
+
61
+ ---
62
+
63
+ ## Agent CLI reference
64
+
65
+ > Commands below are run by your agent via the skill — you don't need to memorize them.
66
+
67
+ ### Check health and live quotas
68
+
69
+ ```sh
70
+ broco status --json
71
+ broco roster --json
72
+ broco roster --worker codex --json --full
73
+ ```
74
+
75
+ `status` checks runner health, active/queued tickets, batches, proxies, and cleanable worktrees without starting an offline daemon. `roster` reads permitted model families, login state, input capabilities, user notes, rules, and live quotas (`avoid`, `plentiful`, and secondary `agy` model-group alerts) over a shared 45s cache (`--refresh` forces a re-probe; `--global` inspects global defaults explicitly).
76
+
77
+ ### Dispatch, wait, diff, cross-vendor review, and clean
78
+
79
+ ```sh
80
+ broco say auth-fix - --worker agy --worktree --bg --json <<'EOF'
81
+ Fix the failing `verifyToken()` expiry test and cover `$REFRESH_TOKEN` edge cases.
82
+ EOF
83
+ broco wait auth-fix --json
84
+ broco diff auth-fix --stat
85
+ broco review auth-fix --bg --json
86
+ broco wait auth-fix-review-... --json
87
+ broco done auth-fix --result pass --why "Token expiry and refresh tests green."
88
+ broco clean auth-fix --delete-branch
89
+ ```
90
+
91
+ - **`say`** accepts inline text, `--file <path>`, or `stdin` (`-` or piped input) so multi-line markdown and backticks need no shell escaping. Reuse a name to continue its session; pick a new name to run in parallel. Use `--cwd DIR` to run in another directory while keeping permissions and tickets in the current project, `--attach FILE` for confirmed media, `--new-task` after `done`, and `--from OLD_NAME` to hand off cleanly when `contextWarning` fires at 60% of a model's context window.
92
+ - **`wait`** is event-driven (0ms wakeup, no SQLite polling) and returns `reply`, `task`, `cwd`, `worktree`, `branch`, and `changedFiles`.
93
+ - **`diff`** inspects tracked and untracked changes against the ticket's base commit.
94
+ - **`review`** defaults to cross-vendor blind review: omitting `--by` automatically selects a permitted worker from a different vendor with available quota headroom (or pass `--by claude`, `--by codex`, etc. explicitly).
95
+ - **`done` & `clean`** record outcomes (`pass`, `rework`, `fail`, `blocked`) and remove retained worktrees and branches safely (`--dry-run` previews first).
96
+
97
+ ### Sharded batch fan-out with `map`
98
+
99
+ Apply one brief across many files or inputs (`<prefix>-1 .. <prefix>-N`) regulated by an isolated FIFO concurrency pool:
100
+
101
+ ```sh
102
+ broco map x-tag --brief-file brief.md --inputs shard-*.jsonl --worker agy --effort high --bg --json
103
+ broco wait x-tag --json
104
+ broco retry x-tag --bg --json
105
+ broco show x-tag --status error,review --full --json
106
+ broco done x-tag --result pass --why "All shards verified."
107
+ broco clean x-tag --delete-branch
108
+ ```
109
+
110
+ `map` accepts `--brief`, `--brief-file <path|->`, `--input`, `--inputs`, `--inputs-file <path|->` (lines or JSON array), and `{input}`, `{index}`, `{count}`, `{name}` placeholders. `wait`, `show`, `retry`, `stop`, `done`, and `clean` all accept a batch prefix (`retry <prefix>` retries only failed or stopped shards).
111
+
112
+ ### Optional per-repo policy (L1 `init`)
113
+
114
+ Only needed when a repository requires its own strict allowlist (for example blocking a specific vendor in a private repo), an independent concurrency cap, repo-specific rules, or explicit heavy manager mode:
115
+
116
+ ```sh
117
+ broco init --allow claude,codex,agy,pi:deepseek --default-worker agy --concurrency 4
118
+ broco init --manager-mode
119
+ broco uninit
120
+ ```
121
+
122
+ `init` writes `.broco/` and maintains a marked `<!-- broco:start -->` section in `AGENTS.md` by default without altering surrounding text (`--host` supports `auto|agents|claude|codex|cursor|agy|opencode|pi`). It touches `CLAUDE.md` only when the repo already has one or when `--host claude` is passed (`--no-agents-md` / `--no-claude-md` skip markers; `broco uninit` releases idle workers, unregisters the repo, and strips only the marked section). Project policy strictly overrides global defaults when present.
123
+
124
+ ## Built for daily power use
125
+
126
+ ### Agent-first settings and one-command undo
127
+
128
+ Your agent can adjust global or per-project settings directly via CLI. Every change takes effect on subsequent dispatches, writes an audit entry in your local timezone (configurable via `BROCO_TZ` or `TZ`), and prints a one-command undo:
129
+
130
+ ```sh
131
+ broco set concurrency 6
132
+ broco set default-worker agy
133
+ broco allow claude,codex,agy --default-worker agy
134
+ broco deny cursor-agent
135
+ broco defaults agy --model gemini-4-argon --effort high
136
+ broco note agy "High headroom plan; good for batch map jobs"
137
+ broco rules --add "Run tests before finishing"
138
+ broco hide codex gpt-5.6-sol
139
+ broco audit --limit 10
140
+ broco undo
141
+ ```
142
+
143
+ Open the local board anytime with `broco ui` (or `broco ui --no-open`; port auto-restores across restarts) to monitor live `map` progress bars, queue positions, multi-task histories, context warnings, and one-click **Undo**.
144
+
145
+ ### Loopback credential proxies
146
+
147
+ Give a worker a temporary `127.0.0.1` URL that injects an auth header into specific upstream paths without exposing the secret to the worker process:
148
+
149
+ ```sh
150
+ broco proxy-open --upstream https://api.example.com \
151
+ --path /v1/models --path /v1/chat/completions \
152
+ --header Authorization --value-env EXAMPLE_API_KEY --value-prefix 'Bearer ' \
153
+ --max-requests 150 --ttl 1800 --json
154
+ broco proxy-list --json
155
+ broco proxy-close PROXY_ID --json
156
+ ```
157
+
158
+ Secrets live in runner memory only, bind strictly to `127.0.0.1`, reject `--path /` and 3xx redirects, and enforce path-segment prefixes and request/TTL caps.
159
+
160
+ ### Tracked task pass rates (`stats`)
161
+
162
+ ```sh
163
+ broco stats --json
164
+ broco stats --project . --json
165
+ ```
166
+
167
+ Aggregates real per-task pass/rework/fail/blocked outcomes grouped by worker and model across projects.
168
+
169
+ ### Upgrading from `cc-bro` or `opus-manager`
170
+
171
+ `broco` v1.0.0 is the continuation of `opus-manager` (v0.4) and `cc-bro`. After installing `broco`:
172
+
173
+ 1. Wait for any active work you want to preserve (`cc-bro status` if still installed).
174
+ 2. Run `broco shutdown` (cleanly stops legacy runners across older protocols and `~/.cc-bro` sockets) followed by `broco setup --migrate-cc-bro` (or `broco setup` for a fresh start).
175
+ 3. `broco setup --migrate-cc-bro` losslessly copies existing `~/.cc-bro/` state into `~/.broco/` while preserving your projects, settings, and ticket history without deleting `~/.cc-bro/`.
176
+
177
+ See the [upgrade guide](docs-site/en/upgrade.md) for details.
178
+
179
+ ## Development
180
+
181
+ From source:
182
+
183
+ ```sh
184
+ npm ci --prefix ui
185
+ npm run prepack
186
+ npm test
187
+ ```
188
+
189
+ [Apache-2.0 license](LICENSE)