个人开发的 pi agent 框架集合
  • TypeScript 100%
Find a file
肖佳权 b04b5aee93
pi-model-auto-router: 0.4.0 — 修复 stall watchdog 无法唤醒卡死流循环的竞态 (#16)
根因:pi-ai 底层迭代器的 return() 不会让挂起的 next() 提前返回,
stall watchdog 触发后 for-await 循环仍卡在 await iterator.next(),
PR #12 的 post-loop failover 逻辑永远无法执行(发布 CI 的测试门禁因此拦截了 v0.4.0)。

修复:
- 新增 loopInterrupted promise,abort 与 watchdog 终结时通过 wakeLoop() 唤醒消费循环
- 循环改用 Promise.race([pendingNext, loopInterrupted]),被唤醒后吞掉迟到结果并退出,
  交由 ended.done / stalledByWatchdog 走 transient failover 或 abort 清理路径
- 修正 e2e 断言:冷却警示(⚠ target ✗剩余时长)优先于 last=failed 是既定展示优先级,
  改为断言两目标均进入冷却 + 下发 all-failed 错误事件

测试:bun run check / bun test 31/31 / bun run build 全部通过。

Co-authored-by: multica-agent <github@multica.ai>
2026-09-22 20:53:41 +08:00
.github/workflows pi-model-auto-router: fix tag compatibility for release workflow 2026-09-22 12:33:49 +00:00
pi-model-auto-router pi-model-auto-router: 0.4.0 — 修复 stall watchdog 无法唤醒卡死流循环的竞态 (#16) 2026-09-22 20:53:41 +08:00
.gitignore Initialize pi model auto router plugin 2026-08-27 14:37:05 +08:00
AGENTS.md docs: 新增 AGENTS.md 说明开发命令与 tag 触发的发版流程 2026-09-22 17:55:36 +08:00
README.md refactor: organize repository by plugin-name directory 2026-08-31 03:12:03 +00:00

pi-plugins

该仓库按插件名分目录组织,便于 Pi Agent 按目录安装插件。

目录结构

  • pi-model-auto-router/:pi-model-auto-router 插件源码与构建产物

后续新增插件时,请直接在仓库根目录新增同名目录。