@bacnh85/pi-subagent 0.10.0 → 0.11.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.
- package/CHANGELOG.md +11 -0
- package/README.md +11 -9
- package/agent-format.md +4 -2
- package/agents/general-purpose.md +4 -2
- package/agents/planner.md +3 -1
- package/agents/reviewer.md +3 -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,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0 (2026-07-23)
|
|
4
|
+
|
|
5
|
+
### Model routing
|
|
6
|
+
|
|
7
|
+
- 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).
|
|
8
|
+
- Fast tier (scout, tester) uses `glm-5-turbo` with `thinking: off` (GLM reasoning is ~11× slower; these are mechanical roles).
|
|
9
|
+
- 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).
|
|
10
|
+
- 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.
|
|
11
|
+
- 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.
|
|
12
|
+
- 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).
|
|
13
|
+
|
|
3
14
|
## 0.9.2 (2026-07-16)
|
|
4
15
|
|
|
5
16
|
### 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` → `opencode-go/deepseek-v4-flash` → `nvidia/openai/gpt-oss-20b` | off | read, grep, find, ls |
|
|
20
|
+
| `tester` | `zai-coding-cn/glm-5-turbo` → `opencode-go/deepseek-v4-flash` → `nvidia/openai/gpt-oss-20b` | off | read, bash, grep, find, ls |
|
|
21
|
+
| `worker` | `zai-coding-cn/glm-5.1` → `opencode-go/deepseek-v4-flash` → `nvidia/moonshotai/kimi-k2.6` → `openrouter/nvidia/nemotron-3-super-120b-a12b:free` | medium | read, bash, edit, write, grep, find, ls |
|
|
22
|
+
| `general-purpose` | `zai-coding-cn/glm-5.1` → `opencode-go/deepseek-v4-flash` → `nvidia/moonshotai/kimi-k2.6` → `openrouter/nvidia/nemotron-3-super-120b-a12b:free` | medium | read, bash, edit, write, grep, find, ls |
|
|
23
|
+
| `planner` | `zai-coding-cn/glm-5.2` → `nvidia/z-ai/glm-5.2` → `opencode-go/deepseek-v4-pro` → `openrouter/nvidia/nemotron-3-ultra-550b-a55b:free` | high | read, grep, find, ls |
|
|
24
|
+
| `reviewer` | `zai-coding-cn/glm-5.2` → `nvidia/z-ai/glm-5.2` → `opencode-go/deepseek-v4-pro` → `openrouter/nvidia/nemotron-3-ultra-550b-a55b:free` | 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 provider-diverse and cost-ascending on failure: **zai-coding-cn** (free GLM, primary) → **opencode-go** (one DeepSeek per role, matched to strength: `deepseek-v4-flash` for fast/strong-coding, `deepseek-v4-pro` for deep reasoning) → **nvidia** (free NIM) → **openrouter** (`:free` models, last resort — omitted from scout/tester, whose `thinking: off` is incompatible with reasoning-mandatory `:free` models). opencode-go is metered — its GLM models cost ~$1.40/$4.40 per M versus zai-coding-cn's free GLM, so GLM stays on zai-coding-cn and opencode-go contributes only its DeepSeek models. 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
|
+
- opencode-go/deepseek-v4-flash
|
|
40
|
+
- nvidia/openai/gpt-oss-20b
|
|
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
|
-
- opencode-go/deepseek-v4-
|
|
6
|
+
- zai-coding-cn/glm-5.1
|
|
7
|
+
- opencode-go/deepseek-v4-flash
|
|
8
|
+
- nvidia/moonshotai/kimi-k2.6
|
|
9
|
+
- openrouter/nvidia/nemotron-3-super-120b-a12b:free
|
|
8
10
|
thinking: medium
|
|
9
11
|
color: yellow
|
|
10
12
|
---
|
package/agents/planner.md
CHANGED
|
@@ -3,8 +3,10 @@ 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
|
+
- nvidia/z-ai/glm-5.2
|
|
7
8
|
- opencode-go/deepseek-v4-pro
|
|
9
|
+
- openrouter/nvidia/nemotron-3-ultra-550b-a55b:free
|
|
8
10
|
thinking: high
|
|
9
11
|
color: blue
|
|
10
12
|
sandbox: read-only
|
package/agents/reviewer.md
CHANGED
|
@@ -3,8 +3,10 @@ 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
|
+
- nvidia/z-ai/glm-5.2
|
|
7
8
|
- opencode-go/deepseek-v4-pro
|
|
9
|
+
- openrouter/nvidia/nemotron-3-ultra-550b-a55b:free
|
|
8
10
|
thinking: high
|
|
9
11
|
color: purple
|
|
10
12
|
sandbox: read-only
|
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
|
|
6
7
|
- opencode-go/deepseek-v4-flash
|
|
7
|
-
- openai
|
|
8
|
-
|
|
9
|
-
thinking: low
|
|
8
|
+
- nvidia/openai/gpt-oss-20b
|
|
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
|
-
- opencode-go/mimo-v2.5
|
|
6
|
+
- zai-coding-cn/glm-5-turbo
|
|
8
7
|
- opencode-go/deepseek-v4-flash
|
|
9
|
-
|
|
8
|
+
- nvidia/openai/gpt-oss-20b
|
|
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
|
-
- opencode-go/deepseek-v4-
|
|
5
|
+
- zai-coding-cn/glm-5.1
|
|
6
|
+
- opencode-go/deepseek-v4-flash
|
|
7
|
+
- nvidia/moonshotai/kimi-k2.6
|
|
8
|
+
- openrouter/nvidia/nemotron-3-super-120b-a12b:free
|
|
7
9
|
thinking: medium
|
|
8
10
|
color: green
|
|
9
11
|
---
|