Skip to content

Releases: zzjcool/pi-legion

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 06:57

pi-legion 3.1.0

See the arbitrated launch backend, and stop calling every child "RPC".

Added

  • The backend a launch actually resolved to is now visible, always read from
    Handle.spawnMode and never re-derived:
    • subagent / vexillatio results carry details.spawns[] and
      handles[].spawnMode; a shared renderResult prepends
      spawn: scout-0=inprocess to the tool card. The line lives in details,
      so it stays out of the LLM context.
    • The /legion node modal footer appends spawn <mode>, threaded from the
      live job: no legion.db column, no schema-version bump.
    • An unknown or legacy mode is omitted, never guessed as rpc.

Changed

  • Parent-facing guidance says "child". In-process is described as the default,
    and the rpc backend is named only where it is genuinely meant. Internal
    settle reasons, the auto-doctor classifier regex and the frozen interrupted
    head line are unchanged. The --no-extensions guidance is backend-neutral
    again, because in-process children do not inherit host extensions either.
  • The railway lane drops the sub-minute "last activity" age (#231): ages under
    60s are omitted instead of rendering 1s ago on every running lane.

Notes

  • pi does not render a tool result's details on its own — renderResult
    is its only consumer — so the field alone would have been invisible. The
    renderer treats a hostile details (throwing getter) as a missing fact, and
    normalizes \r / binary control bytes before counting the collapsed line
    cap, matching the host fallback.
  • Contract: docs/spawn-mode-visibility-v1.md (D1–D8, with round-1 errata).

What's Changed

  • fix(railway): drop the last-activity age until it is a minute old by @zzjcool in #231

Full Changelog: v3.0.3...v3.1.0

v3.0.3

Choose a tag to compare

@github-actions github-actions released this 19 Oct 04:53

v3.0.3

默认后端(inprocess)的等待语义改掉了:子 agent 在「被接受」时就返回句柄,
不再阻塞到首轮跑完;被接受之前的首提示拒绝仍会抛 START_FAILED,所以
fallbackModels 照旧生效。worktree 隔离收紧为 centurion 专属,成员留在
inprocess。另有 #209 三处(provider 注册、supervisor= 渲染、外部子进程归属)、
以及 tok/s 与完成通知投递的修复。

Gates: typecheck 0; npm test 1126/1126.

What's Changed

  • chore(deps): revert the pnpm migration — npm is the reference path (3.0.2) by @zzjcool in #211
  • fix(inprocess): drain extension provider registrations into the model runtime (#209-1 / PR-A) by @zzjcool in #213
  • fix(status,stop): judge a foreign child by its run-dir owner (#209-3) by @zzjcool in #215
  • fix(#209-2): render the arbitrated spawnMode instead of a hardcoded rpc by @zzjcool in #216
  • chore: drop CONTRACT-209.md after A/B/C landed by @zzjcool in #217
  • fix(tok/s): measure generation time, and show in-process children while they run by @zzjcool in #219
  • fix(notify): deliver completion notices at run end, not at the next user prompt by @zzjcool in #218
  • fix(doctor): spawnMode-aware hints; no CHILD_EXTENSIONS for inprocess (#212) by @zzjcool in #222
  • fix(worktree): centurion-only isolation; members stay inprocess (#214) by @zzjcool in #223
  • docs(#214 PR-B): worktree is centurion-only — REV-17, playbook rule 6, README/docs sync by @zzjcool in #220
  • chore: drop CONTRACT-214.md after #214 landed by @zzjcool in #224
  • fix(notify): deliver completion notices at run end; revert the D-D④ orphan release (net-negative) + harden 4 tests by @zzjcool in #225
  • test(runtime): pin the D-D①②③ repaint guards + restore C2b by @zzjcool in #226
  • fix(inprocess): spawnChild returns on acceptance; keep drained failures visible (#227) by @zzjcool in #228
  • fix(#227): keep vexillatio results on interrupt, name reason-less aborts (Worker B) by @zzjcool in #229
  • fix(inprocess): fail the spawn when the first prompt is rejected before acceptance (#227 D1a) by @zzjcool in #230

Full Changelog: v3.0.1...v3.0.3

v3.0.1

Choose a tag to compare

@github-actions github-actions released this 18 Oct 16:09
3b6a5e4

v3.0.1

修复:发布产物不再包含 preinstall 钩子。

3.0.0 为贡献者加了一个只允许 pnpm 的 preinstall 守卫,而 npm 一定会把
package.json 打进 tarball,于是这个钩子发到了每个使用者手里。Pi 安装扩展
用的是 npm install <spec> --prefix <agentDir>/npm --legacy-peer-deps,
所以所有 npm 安装路径都以退出码 1 失败并回滚 —— pi update --extensions
等于空操作,"Package Updates Available" 提示永远指向同一个旧版本。

修复方式:把 pnpm 要求从 scripts.preinstall 挪到
devEngines.packageManager(onFail: error)。npm 在仓库根目录会强制执行它
(EBADDEVENGINES,贡献者守卫保留),而把它作为依赖安装时会完全忽略。

同时加了防回归:test/unit/publish-manifest.test.ts 拒绝任何安装期脚本,
release.yml 在 stage 之前就会让违规的 tag 构建失败。

升级:pi update --extensions

What's Changed

  • fix(release): stop shipping a preinstall hook to consumers (3.0.1) by @zzjcool in #208

Full Changelog: v3.0.0...v3.0.1

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:07

v3.0.0

spawnMode defaults to inprocess. A subagent now runs as an AgentSession inside
the parent Node process unless it needs an OS worktree, in which case Legion
falls back to a headless pi --mode rpc child automatically.

BREAKING: an unconfigured spawnMode changes backend. Roles that pin
worktree: true (worker, centurion, writer-derived cards) keep using rpc
without any config change; an explicit spawnMode: "inprocess" combined with
worktree isolation is still refused with INVALID_PARAMS rather than silently
downgraded. Non-pi roles are refused before the backend is chosen and are
unaffected by the fallback.

Shipped together because inprocess had never been published before, and making
it the default exposed four blockers that are all fixed here: the launch gate
ran before worktree resolution (every centurion->worker dispatch threw), budget
gates went unlimited, lineage identity was lost, and children reported success
with zero output.

Identity now travels through an AsyncLocalStorage scope instead of environment
variables. ALS does not cross spawn(), so bash npm test and similar
subprocesses can no longer inherit a parent's tree identity — the isolation the
env channel lacked in the ghost-node incident.

Also: test scripts unset PI_SUBAGENT_ROLE, which had made every subagent-run
suite report 8 phantom failures.

What's Changed

  • feat(tui): context modal size by window ratio + meta below (#157) by @zzjcool in #158
  • fix(docs): require name|all for wait in examples and schema (#161) by @zzjcool in #163
  • feat(tui): railway hide turn clocks on round 1 + last-activity ago (#159) by @zzjcool in #164
  • feat(doctor): record session errors and summarize in doctor (#160) by @zzjcool in #165
  • chore: migrate npm → pnpm for deps/CI (#162) by @zzjcool in #167
  • chore: CI/Release workflows use pnpm (#162 follow-up) by @zzjcool in #168
  • feat(tui-qa): TUI visual QA infra — sandbox image, renderer, harness by @zzjcool in #169
  • fix(tui): avoid live overlay double-render on multi-assistant poll (#177) by @zzjcool in #183
  • fix(tui): label tok/s as now vs avg (two definitions) (#178) by @zzjcool in #184
  • fix(env): Wave A safety — #172–#176 role/depth/bytes/old-space/EXTRA_DIRS by @zzjcool in #188
  • fix(orchestrator): resume must not inflate maxChildrenPerNode (#180) by @zzjcool in #185
  • fix(hygiene): flush deferred startup sweep on session_shutdown (#181) by @zzjcool in #186
  • fix(scout-guard): pause dispatch nag when subagents are disabled (#182) by @zzjcool in #187
  • feat(wait/stop): parent decides force-stop on wait timeout (#179) by @zzjcool in #189
  • feat(teams): team-level parent/child context (#171) by @zzjcool in #191
  • fix(tui): railway lane clocks, content-driven columns; drop now/live labels by @zzjcool in #194
  • fix(tui): stop erasing the host underlay around the subagent modal (#195) by @zzjcool in #196
  • feat(supervisor): optional in-process AgentSession mode (#197) by @zzjcool in #198
  • fix(inprocess): wire defaultSessionFactory tools/model/systemPrompt (#199) by @zzjcool in #200
  • feat(osc): emitBusy dual-write setActivity + extension_activity (#156) by @zzjcool in #166
  • fix(tui): drop footer N agents running (Fixes #192) by @zzjcool in #201
  • fix(tui): drop footer N agents running (Fixes #192) by @zzjcool in #202
  • fix(rpc): headless child trust/approve + exit→SettleResult contract (#193) by @zzjcool in #203
  • feat(inprocess): safe default limits, child identity channel, transcript persistence (D4/D5/D6/D7) by @zzjcool in #204
  • feat(spawn): default to inprocess with launch-context arbitration (D1/D2/D3) by @zzjcool in #205
  • fix(inprocess): close maxDepth bypass, snapshot identity, discriminating tests (REV2-1..7) by @zzjcool in #206

Full Changelog: v2.0.4...v3.0.0

v2.0.4

Choose a tag to compare

@github-actions github-actions released this 15 Oct 12:32
cbc2af8

v2.0.4

TUI float (#147/#149), /legion timing CLI (#148/#150), timing panel (#151/#152),
status overview without name (#145/#146), chart x-axis freeze when idle (#153/#154).

What's Changed

Full Changelog: v2.0.3...v2.0.4

v2.0.3

Choose a tag to compare

@github-actions github-actions released this 15 Oct 08:15
2198e78

v2.0.3

What's Changed

Full Changelog: v2.0.2...v2.0.3

v2.0.2

Choose a tag to compare

@github-actions github-actions released this 15 Oct 06:30

chore(release): v2.0.2

What's Changed

  • fix(viz): narrow/long-name header + galaxy legend clip (#125) by @zzjcool in #127
  • test(core): deepen doctor/verify rate-limit unit tests (#130) by @zzjcool in #132
  • fix(viz): statusBudget grapheme width + unify badge min (#128) by @zzjcool in #133
  • test(supervisor): isolate ten-concurrent from host free-mem (#131) by @zzjcool in #135
  • fix(viz): header now tok/s is 0 when no agent is running (#136) by @zzjcool in #137
  • fix(core): Esc no longer retires children (#134) by @zzjcool in #138
  • fix(viz): persistent /legion stop hint while children live (#134) by @zzjcool in #139
  • fix(viz): floor header tok/s on ≥1s in-window generationMs (#140) by @zzjcool in #141

Full Changelog: v2.0.1...v2.0.2

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 15 Oct 03:37
7e3b355

fix(runs): pin --provider for dispatched models to defeat static-provider id collisions (#123)

A bare model id like workbuddy/hy4-preview-ioa can exist under two
providers: one registered live by an extension (pi-any-endpoint, with
usable auth) and one static in ~/.pi/agent/models.json (no usable
auth). Children start with --no-extensions, and the bare --model id
resolved into the static provider first, so every scout/worker/...
launch died instantly with 'No API key found for magpie'.

Dispatch now asks the PARENT's model registry which provider owns the
resolved model and passes it as --provider alongside --model:

  • src/runs/provider-pin.ts: providerForModel() — unique owner wins;
    on collisions the provider named by the id prefix wins; unresolvable
    ids stay unpinned (a wrong pin is worse than none).
  • src/runs/args.ts: pushModelArgs emits --provider only when --model
    is present (pi rejects an orphan --provider).
  • src/runs/orchestrator.ts: launch() accepts and forwards modelProvider.
  • index.ts: LaunchSession carries ctx.modelRegistry; both dispatch
    chains (subagent launchStep, vexillatio launchUtilityFamily) pin it.

E2E: with the colliding static provider restored on purpose,
'--provider any-endpoint --model workbuddy/hy4-preview-ioa:high'
starts cleanly under --no-extensions.

What's Changed

  • docs: document scout-guard settings and slash commands (#71) by @zzjcool in #74
  • feat(legion): add /legion status and complete doctor slash list by @zzjcool in #76
  • 请勿直接合: wait for async children on pi --print shutdown (#72) by @zzjcool in #77
  • fix(agents): drop unloaded lens_* tools from bundled roles (#70) by @zzjcool in #75
  • 请勿直接合: clarify doctor diagnose help and hygiene sweep state (#82 #85) by @zzjcool in #86
  • fix(scout-guard): count first-class grep/find/ls toward the read streak by @zzjcool in #87
  • ci: PR 的 ci job 增加 test:integration(Fixes #79) by @zzjcool in #88
  • docs: design.md historical banner + CHANGELOG (#80 #83) by @zzjcool in #91
  • fix(status): lead live child status with alive · quiet (#81) by @zzjcool in #92
  • fix: builtin:codemode for roles + diagnose section (#89 #90) — 请勿直接合 by @zzjcool in #93
  • docs: remove duplicate Child extensions heading (Fixes #94) by @zzjcool in #98
  • fix(doctor): extensible role-tool→extension gates (#97) — 请勿直接合 by @zzjcool in #99
  • docs(ci): CONTRIBUTING/CI herdr 残留对齐 2.x RPC (#95) by @zzjcool in #100
  • fix(tui): galaxy legend shows failed/retired only when present (Fixes #102) by @zzjcool in #103
  • fix(subagent): honor name= on launch so status matches (#101) by @zzjcool in #104
  • fix(status): strengthen quiet age + alive over execution snapshot (P2a #81) by @zzjcool in #105
  • fix(package): align npm description/keywords with Legion 2.x RPC (#106) by @zzjcool in #111
  • docs: CONTRIBUTING verify-12/13 → legacy + CI herdr 注释补丁 (#107) by @zzjcool in #112
  • test(scout-guard): mock-llm e2e for notify, cooldown, dispatch clear (#108) by @zzjcool in #113
  • fix(agents): migrate EXTRA_AGENT_DIRS env to PI_LEGION_* (#109) by @zzjcool in #114
  • docs(changelog): Unreleased 补齐 tip #89–#108(Fixes #110) by @zzjcool in #115
  • docs(changelog): Unreleased bullet for PI_LEGION_EXTRA_AGENT_DIRS (#109) by @zzjcool in #116
  • fix(package): files 含 CHANGELOG.md(#118) by @zzjcool in #120
  • docs(skill): align /legion UI with 2.x galaxy default (Fixes #117) by @zzjcool in #121
  • rename: default export herdrSubagents → piLegion (#119) by @zzjcool in #122
  • fix(runs): pin --provider for dispatched models to defeat static-provider id collisions by @zzjcool in #123

Full Changelog: v2.0.0...v2.0.1

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 16:27
fc92f0d

pi-legion 2.0.0

First Actions release on current master: CI gate, scout-guard, status/viz fixes, stage-only npm publish, project workflow docs.

What's Changed

  • feat: add convention context files by @zzjcool in #5
  • feat: add Legion RPC supervisor host layer by @zzjcool in #7
  • fix: close RPC supervisor review findings by @zzjcool in #9
  • fix: enforce cumulative subagent depth budgets (M0) by @zzjcool in #10
  • test: add legion v2 schema sentinel by @zzjcool in #6
  • feat: switch subagent execution to Pi RPC supervisor by @zzjcool in #12
  • feat(m2): integrate Legion tree runtime by @zzjcool in #13
  • Integrate M3 Legion visualization and event bus by @zzjcool in #14
  • docs: close out Legion v2 documentation by @zzjcool in #15
  • feat(legion): backfill live overlay session history by @zzjcool in #16
  • test: strengthen live overlay backfill regressions (review #3/#4) by @zzjcool in #19
  • feat: add Pi 1.x Legion TUI context viewer by @zzjcool in #20
  • feat(supervisor): escalate retire and sweep descendants by @zzjcool in #21
  • feat(tui): dynamic rendering for active-node context viewer (REV-2) by @zzjcool in #22
  • feat: handle parent aborts and stop child agents by @zzjcool in #23
  • feat: implement REV-17.7 vexillatio utility dispatch by @zzjcool in #24
  • fix: cascade child retirement on parent abort by @zzjcool in #25
  • fix: vexillatio review remediation (REV-17.8) by @zzjcool in #26
  • fix(legion): re-land rebuild tree-scope hardening (from closed PR #8) by @zzjcool in #27
  • feat(status): show token usage in Legion panel by @zzjcool in #28
  • fix: apply team models and track utility children by @zzjcool in #30
  • Address PR #30 vexillatio review findings by @zzjcool in #32
  • feat(tui): Legion 铁路条 + /legion 星系/tok/s/日志视图 by @zzjcool in #31
  • fix(legion): 竖屏终端改为纵向堆叠布局并限制面板高度 by @zzjcool in #33
  • feat(legion): railway 车道支持鼠标滚轮滚动,用范围指示器替代 +N by @zzjcool in #34
  • feat(legion): 用户停止 async 子 agent(/legion stop、空闲 Esc、视图/overlay 里按 x)+ 空闲提示 by @zzjcool in #41
  • fix(spawn): 子进程输出按字节封顶,超限截断并杀进程 (#35) by @zzjcool in #44
  • perf(session): 会话 JSONL 改为流式 + 增量解析,不再整文件读入 (#36) by @zzjcool in #45
  • feat(storage): 启动清扫——清理闲置 run、孤儿临时目录、遗留节点,events 保留期 + WAL checkpoint (#37 #38 #40) by @zzjcool in #47
  • fix(args): 子 agent 默认 --no-extensions,不再继承宿主扩展 (#43) by @zzjcool in #48
  • test(legion): 铁路条回归测试:结束的 agent 立即移除、派生竖线朝下 by @zzjcool in #46
  • feat(memory): 子进程 V8 内存参数 + 派发前内存闸门 + 全树 verify 并发限制 (#49 补合到 master) by @zzjcool in #50
  • fix(vexillatio): 子节点编号只接续当前父节点 (#42) by @zzjcool in #51
  • feat(doctor): 全面自检 + 错误时自动附带 doctor 片段 by @zzjcool in #52
  • fix(db): Bun SQLite .get() 返回 null 时误判 root 已存在 by @zzjcool in #53
  • feat(test): 可脚本化的 Mock LLM,方便离线测 pi-legion by @zzjcool in #54
  • test(e2e): mock-llm 覆盖 stop / doctor / 验收限流 / 内存门禁 / 铁路条 by @zzjcool in #56
  • refactor: consolidate slash commands under legion by @zzjcool in #57
  • ci: add GitHub Actions workflow for typecheck, tests, and releases by @zzjcool in #65
  • fix(viz): tok/s 改为 output / generationMs(解码吞吐) by @zzjcool in #61
  • fix(status): do not retire a live worker on a transient Connection error by @zzjcool in #63
  • feat(scout-guard): 主会话连续读类调用后注入提醒 by @zzjcool in #64
  • BREAKING CHANGE: sync bundled agent playbooks with local practice by @zzjcool in #66
  • fix(tui): keep spawn verticals after the railway scrolls left by @zzjcool in #67
  • ci: stage npm releases instead of publishing directly by @zzjcool in #68
  • docs: document project workflow and merge governance by @zzjcool in #69
  • feat(status): show current-turn elapsed beside the lifetime total by @zzjcool in #62

Full Changelog: v0.12.0...v2.0.0