@bacnh85/pi-subagent 0.10.1 → 0.12.2
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.
- package/CHANGELOG.md +20 -0
- package/README.md +11 -9
- package/agent-format.md +4 -2
- package/agents/general-purpose.md +4 -2
- package/agents/planner.md +2 -1
- package/agents/reviewer.md +2 -1
- package/agents/scout.md +3 -3
- package/agents/tester.md +3 -3
- package/agents/worker.md +4 -2
- package/extensions/agents.ts +310 -310
- package/extensions/index.ts +1357 -1357
- package/extensions/model.ts +41 -41
- package/extensions/render.ts +205 -205
- package/extensions/runner.ts +200 -200
- package/extensions/security.ts +313 -313
- package/extensions/service.ts +115 -115
- package/extensions/thread-viewer.ts +246 -246
- package/extensions/threads.ts +99 -99
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2026-07-24)
|
|
4
|
+
|
|
5
|
+
### Model routing
|
|
6
|
+
|
|
7
|
+
- Chains are now **free-first** to conserve the metered opencode-go budget: paid DeepSeek moves to the **last** position so free nvidia/openrouter fallbacks are tried first. Previously DeepSeek sat at position 2 and burned quota whenever the free GLM primary rate-limited.
|
|
8
|
+
- **Removed two dead fallbacks** found by live-testing every free model on 2026-07-24: `nvidia/moonshotai/kimi-k2.6` (HTTP 404, NVCF not provisioned for the account) and `nvidia/z-ai/glm-5.2` (timeout). These are non-rate-limit failures, so the rate-limit retry loop did not advance past them — a subagent that reached them died instead of falling through to the working `:free` entries behind them.
|
|
9
|
+
- New chains: scout/tester `glm-5-turbo` → `nvidia/gpt-oss-20b` → `deepseek-v4-flash`; worker/general-purpose `glm-5.1` → `nvidia/mistral-small-4-119b-2603` → `nemotron-3-super:free` → `deepseek-v4-flash`; planner/reviewer `glm-5.2` → `nemotron-3-ultra:free` → `deepseek-v4-pro`.
|
|
10
|
+
- Verified-working free additions: `nvidia/openai/gpt-oss-20b` (1.2s), `nvidia/mistralai/mistral-small-4-119b-2603` (2.6s, 119B reasoning), `openrouter/nvidia/nemotron-3-nano-30b-a3b:free` (1.2s).
|
|
11
|
+
|
|
12
|
+
## 0.11.0 (2026-07-23)
|
|
13
|
+
|
|
14
|
+
### Model routing
|
|
15
|
+
|
|
16
|
+
- Bundled roles now route through **zai-coding-cn** (GLM) as the primary provider, with a provider-diverse fallback chain: `zai-coding-cn` (free GLM) → `opencode-go` (cheap `deepseek-v4-flash`) → `nvidia` (free NIM) → `openrouter` (`:free` models, last resort).
|
|
17
|
+
- Fast tier (scout, tester) uses `glm-5-turbo` with `thinking: off` (GLM reasoning is ~11× slower; these are mechanical roles).
|
|
18
|
+
- Strong-coding tier (worker, general-purpose) uses `glm-5.1`; deep-reasoning tier (planner, reviewer) uses `glm-5.2` (the only GLM with reasoning-effort control).
|
|
19
|
+
- opencode-go contributes one DeepSeek model per role, matched to strength: `deepseek-v4-flash` for scout/tester/worker/general-purpose, `deepseek-v4-pro` for planner/reviewer — never its GLM models, which cost ~$1.40/$4.40 per M versus zai-coding-cn's free GLM.
|
|
20
|
+
- Chains are cost-ascending on failure and spread load 2/2/2 across the GLM tiers to respect GLM's low concurrency; the existing rate-limit retry walks the chain on 429s.
|
|
21
|
+
- Free-model fallbacks verified live against the OpenRouter API: `nemotron-3-super:free` (worker/general-purpose) and `nemotron-3-ultra:free` (planner/reviewer) respond correctly with reasoning on. scout/tester omit a `:free` entry because their `thinking: off` conflicts with reasoning-mandatory `:free` models (`gpt-oss-20b:free` returns HTTP 400 when reasoning is disabled; `gemma-4-31b:free` rate-limits, `cohere/north-mini-code:free` returns empty).
|
|
22
|
+
|
|
3
23
|
## 0.9.2 (2026-07-16)
|
|
4
24
|
|
|
5
25
|
### Pi SDK compatibility
|
package/README.md
CHANGED
|
@@ -16,14 +16,14 @@ Requires Node.js >= 20.18.
|
|
|
16
16
|
|
|
17
17
|
| Role | Ordered model preferences | Thinking | Tools |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| `scout` | `
|
|
20
|
-
| `tester` | `
|
|
21
|
-
| `worker` | `
|
|
22
|
-
| `general-purpose` | `
|
|
23
|
-
| `planner` | `
|
|
24
|
-
| `reviewer` | `
|
|
19
|
+
| `scout` | `zai-coding-cn/glm-5-turbo` → `nvidia/openai/gpt-oss-20b` → `opencode-go/deepseek-v4-flash` | off | read, grep, find, ls |
|
|
20
|
+
| `tester` | `zai-coding-cn/glm-5-turbo` → `nvidia/openai/gpt-oss-20b` → `opencode-go/deepseek-v4-flash` | off | read, bash, grep, find, ls |
|
|
21
|
+
| `worker` | `zai-coding-cn/glm-5.1` → `nvidia/mistralai/mistral-small-4-119b-2603` → `openrouter/nvidia/nemotron-3-super-120b-a12b:free` → `opencode-go/deepseek-v4-flash` | medium | read, bash, edit, write, grep, find, ls |
|
|
22
|
+
| `general-purpose` | `zai-coding-cn/glm-5.1` → `nvidia/mistralai/mistral-small-4-119b-2603` → `openrouter/nvidia/nemotron-3-super-120b-a12b:free` → `opencode-go/deepseek-v4-flash` | medium | read, bash, edit, write, grep, find, ls |
|
|
23
|
+
| `planner` | `zai-coding-cn/glm-5.2` → `openrouter/nvidia/nemotron-3-ultra-550b-a55b:free` → `opencode-go/deepseek-v4-pro` | high | read, grep, find, ls |
|
|
24
|
+
| `reviewer` | `zai-coding-cn/glm-5.2` → `openrouter/nvidia/nemotron-3-ultra-550b-a55b:free` → `opencode-go/deepseek-v4-pro` | high | read, grep, find, ls |
|
|
25
25
|
|
|
26
|
-
Each role uses the first authenticated preference available through Pi's model registry, then falls back to the authenticated parent model. User/project agent files remain stronger overrides and may set legacy `model`, ordered `models`, and `thinking`.
|
|
26
|
+
Each role uses the first authenticated preference available through Pi's model registry, then falls back to the authenticated parent model. Chains are **free-first** to conserve the metered opencode-go budget: **zai-coding-cn** (free GLM, primary) → free **nvidia** NIM and **openrouter** `:free` models → **opencode-go** (paid DeepSeek, last resort — one per role: `deepseek-v4-flash` for fast/strong-coding, `deepseek-v4-pro` for deep reasoning). opencode-go's GLM models cost ~$1.40/$4.40 per M versus zai-coding-cn's free GLM, so GLM stays on zai-coding-cn. Fallback models were live-verified on 2026-07-24; `nvidia/moonshotai/kimi-k2.6` and `nvidia/z-ai/glm-5.2` return 404/timeout on the user's account and were removed — non-rate-limit failures kill the subagent instead of advancing the chain. User/project agent files remain stronger overrides and may set legacy `model`, ordered `models`, and `thinking`.
|
|
27
27
|
|
|
28
28
|
## Agent files
|
|
29
29
|
|
|
@@ -34,8 +34,10 @@ Create `~/.pi/agent/agents/*.md` or `.pi/agents/*.md`:
|
|
|
34
34
|
name: scout-fast
|
|
35
35
|
description: Locate relevant files and symbols
|
|
36
36
|
tools: read, grep, find, ls
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
models:
|
|
38
|
+
- zai-coding-cn/glm-5-turbo
|
|
39
|
+
- nvidia/openai/gpt-oss-20b
|
|
40
|
+
- opencode-go/deepseek-v4-flash
|
|
39
41
|
---
|
|
40
42
|
|
|
41
43
|
Return concise evidence with file/symbol anchors.
|
package/agent-format.md
CHANGED
|
@@ -68,8 +68,10 @@ Read-only service execution (used by `pi-review`) restricts tools to the read-on
|
|
|
68
68
|
Pi selects the first authenticated/configured model reported by the parent session's `ModelRegistry`. Resolution order is legacy `model`, then each `models` entry, then the authenticated parent model. Duplicate candidates are ignored. If no candidate is available, the error lists every attempted model.
|
|
69
69
|
|
|
70
70
|
```yaml
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
models:
|
|
72
|
+
- zai-coding-cn/glm-5.2
|
|
73
|
+
- opencode-go/deepseek-v4-flash
|
|
74
|
+
- nvidia/moonshotai/kimi-k2.6
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
The registry includes OAuth subscriptions, API-key subscriptions such as OpenCode Go, environment/runtime credentials, and custom `models.json` providers. Use provider-qualified IDs for predictable routing.
|
|
@@ -3,8 +3,10 @@ name: general-purpose
|
|
|
3
3
|
description: General-purpose sub-agent for any delegated task. Use when no specialized agent fits. Good for complex research, multi-step operations, and code modifications.
|
|
4
4
|
tools: read, bash, edit, write, grep, find, ls
|
|
5
5
|
models:
|
|
6
|
-
-
|
|
7
|
-
-
|
|
6
|
+
- zai-coding-cn/glm-5.1
|
|
7
|
+
- nvidia/mistralai/mistral-small-4-119b-2603
|
|
8
|
+
- openrouter/nvidia/nemotron-3-super-120b-a12b:free
|
|
9
|
+
- opencode-go/deepseek-v4-flash
|
|
8
10
|
thinking: medium
|
|
9
11
|
color: yellow
|
|
10
12
|
---
|
package/agents/planner.md
CHANGED
|
@@ -3,7 +3,8 @@ name: planner
|
|
|
3
3
|
description: Read-only planning and architecture specialist. Use for consequential design, tradeoff analysis, and implementation plans.
|
|
4
4
|
tools: read, grep, find, ls
|
|
5
5
|
models:
|
|
6
|
-
-
|
|
6
|
+
- zai-coding-cn/glm-5.2
|
|
7
|
+
- openrouter/nvidia/nemotron-3-ultra-550b-a55b:free
|
|
7
8
|
- opencode-go/deepseek-v4-pro
|
|
8
9
|
thinking: high
|
|
9
10
|
color: blue
|
package/agents/reviewer.md
CHANGED
|
@@ -3,7 +3,8 @@ name: reviewer
|
|
|
3
3
|
description: Code review specialist. Use for correctness, security, regression, and meaningful test-gap review.
|
|
4
4
|
tools: read, grep, find, ls
|
|
5
5
|
models:
|
|
6
|
-
-
|
|
6
|
+
- zai-coding-cn/glm-5.2
|
|
7
|
+
- openrouter/nvidia/nemotron-3-ultra-550b-a55b:free
|
|
7
8
|
- opencode-go/deepseek-v4-pro
|
|
8
9
|
thinking: high
|
|
9
10
|
color: purple
|
package/agents/scout.md
CHANGED
|
@@ -3,10 +3,10 @@ name: scout
|
|
|
3
3
|
description: Fast codebase recon that returns compressed context for handoff. Use for finding files, understanding structure, locating symbols.
|
|
4
4
|
tools: read, grep, find, ls
|
|
5
5
|
models:
|
|
6
|
+
- zai-coding-cn/glm-5-turbo
|
|
7
|
+
- nvidia/openai/gpt-oss-20b
|
|
6
8
|
- opencode-go/deepseek-v4-flash
|
|
7
|
-
|
|
8
|
-
- opencode-go/mimo-v2.5
|
|
9
|
-
thinking: low
|
|
9
|
+
thinking: off
|
|
10
10
|
color: cyan
|
|
11
11
|
sandbox: read-only
|
|
12
12
|
---
|
package/agents/tester.md
CHANGED
|
@@ -3,10 +3,10 @@ name: tester
|
|
|
3
3
|
description: Focused verification agent. Use for cheap routine test, typecheck, lint, build, and regression checks without editing files.
|
|
4
4
|
tools: read, bash, grep, find, ls
|
|
5
5
|
models:
|
|
6
|
-
-
|
|
7
|
-
-
|
|
6
|
+
- zai-coding-cn/glm-5-turbo
|
|
7
|
+
- nvidia/openai/gpt-oss-20b
|
|
8
8
|
- opencode-go/deepseek-v4-flash
|
|
9
|
-
thinking:
|
|
9
|
+
thinking: off
|
|
10
10
|
color: orange
|
|
11
11
|
---
|
|
12
12
|
|
package/agents/worker.md
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
name: worker
|
|
3
3
|
description: General-purpose coding agent with full tool access. Use only when explicitly requested for isolated implementation.
|
|
4
4
|
models:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
5
|
+
- zai-coding-cn/glm-5.1
|
|
6
|
+
- nvidia/mistralai/mistral-small-4-119b-2603
|
|
7
|
+
- openrouter/nvidia/nemotron-3-super-120b-a12b:free
|
|
8
|
+
- opencode-go/deepseek-v4-flash
|
|
7
9
|
thinking: medium
|
|
8
10
|
color: green
|
|
9
11
|
---
|