pi-pstack-adapter 0.9.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 +19 -0
- package/README.md +176 -141
- package/VERSION +1 -1
- package/adapter-skills/setup.md +38 -29
- package/adapter-skills/status.md +3 -3
- package/docs/compatibility.md +46 -23
- package/index.ts +27 -13
- package/package.json +1 -1
- package/src/certified.ts +2 -2
- package/src/config.ts +3 -2
- package/src/gate.ts +3 -2
- package/src/generate.ts +64 -43
- package/src/pools.ts +2 -2
- package/src/registry.ts +9 -9
- package/src/route.ts +318 -0
- package/src/status.ts +21 -14
- package/src/vocabulary.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. release-please writes new entries from Conventional Commit PR titles.
|
|
4
4
|
|
|
5
|
+
## [0.11.0](https://github.com/elderfo/pi-pstack-adapter/compare/v0.10.0...v0.11.0) (2026-11-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **pstack:** certify pstack 0.15.42 ([#35](https://github.com/elderfo/pi-pstack-adapter/issues/35)) ([10fd682](https://github.com/elderfo/pi-pstack-adapter/commit/10fd6827a09376d499cbc82ee3e720871ef7c74e))
|
|
11
|
+
|
|
12
|
+
## [0.10.0](https://github.com/elderfo/pi-pstack-adapter/compare/v0.9.0...v0.10.0) (2026-11-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **pools:** pick a pool's model in code from pstack:<role> delegations ([#33](https://github.com/elderfo/pi-pstack-adapter/issues/33)) ([ac270ae](https://github.com/elderfo/pi-pstack-adapter/commit/ac270ae946ec57378427e300cd2a8c9f67c100f6))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **host-mapping:** distinguish host PR event subscriptions from standalone Pi ([#29](https://github.com/elderfo/pi-pstack-adapter/issues/29)) ([8dacfa3](https://github.com/elderfo/pi-pstack-adapter/commit/8dacfa3ad578134b65eb848b5221cf70064fa18a))
|
|
23
|
+
|
|
5
24
|
## [0.9.0](https://github.com/elderfo/pi-pstack-adapter/compare/v0.8.0...v0.9.0) (2026-11-05)
|
|
6
25
|
|
|
7
26
|
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@ Use Cursor's [pstack](https://github.com/cursor/plugins/tree/main/pstack) skills
|
|
|
9
9
|
|
|
10
10
|
pstack is Cursor's collection of engineering workflows: design reviews (`how`), prose cleanup
|
|
11
11
|
(`unslop`), test-driven development (`tdd`), parallel fan-out (`swarm`), and the full Poteto Mode
|
|
12
|
-
working style. This package downloads a tested pstack release and
|
|
13
|
-
Pi skill named `pistack-*`. The upstream files stay unmodified, so you can audit
|
|
14
|
-
|
|
12
|
+
working style. This package downloads a tested pstack release and gives you every workflow as a
|
|
13
|
+
Pi skill named `pistack-*`. The upstream files stay unmodified, so you can audit what the agent
|
|
14
|
+
reads.
|
|
15
15
|
|
|
16
16
|
## Quick start
|
|
17
17
|
|
|
@@ -44,42 +44,7 @@ commands, so keep the `bash` tool active rather than switching to Pi's `powershe
|
|
|
44
44
|
`/pistack-status` warns when Bash is missing or the `bash` tool is inactive. Pi inside WSL
|
|
45
45
|
counts as Linux.
|
|
46
46
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
Some workflows hand work to subagents or ask you multiple-choice questions. Two providers can run
|
|
50
|
-
the subagents:
|
|
51
|
-
|
|
52
|
-
- **T3 Code.** When Pi runs inside [T3 Code](https://github.com/pingdotgg/t3code), workflows
|
|
53
|
-
delegate through T3's `delegate_task` tool. Each child appears in T3, can run on any provider
|
|
54
|
-
and model T3 offers, and can work in its own worktree. You install nothing extra.
|
|
55
|
-
- **pi-subagents.** Outside T3 Code, install `pi-subagents`. The upstream agents register as
|
|
56
|
-
`pistack-comment-sicko` and `pistack-poteto-agent`.
|
|
57
|
-
|
|
58
|
-
For multiple-choice questions, install `pi-ask-user`:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
pi install npm:pi-subagents
|
|
62
|
-
pi install npm:pi-ask-user
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The adapter uses T3 Code first and falls back to `pi-subagents`. To reverse that order, set
|
|
66
|
-
`"delegation": "pi-subagents"` in the adapter config, or set `PISTACK_DELEGATION=pi-subagents`.
|
|
67
|
-
Restart Pi or run `/reload` after changing it. `/pistack-status` shows the order and the
|
|
68
|
-
provider the session resolved.
|
|
69
|
-
|
|
70
|
-
The adapter counts T3's tools, including `task_status` and `orchestrator_capabilities`, only
|
|
71
|
-
when T3 Code's own bridge registered them. A tool that another extension or MCP server registers
|
|
72
|
-
under the same name is ignored, and `/pistack-check <skill>` names the one tool to delegate with.
|
|
73
|
-
|
|
74
|
-
When a delegating workflow starts, the adapter turns on that provider's tool, even if you turned
|
|
75
|
-
it off in the tool selector. This happens
|
|
76
|
-
whether you run the workflow's `/skill:` command or the agent opens the skill itself. While Poteto
|
|
77
|
-
Mode is on, the adapter turns it on for every prompt.
|
|
78
|
-
|
|
79
|
-
To find missing providers or executables before you start a workflow, run
|
|
80
|
-
`/pistack-check <skill>`.
|
|
81
|
-
|
|
82
|
-
## Install from Git instead of npm
|
|
47
|
+
### Install from Git instead of npm
|
|
83
48
|
|
|
84
49
|
To track the repository directly, install from GitHub:
|
|
85
50
|
|
|
@@ -87,8 +52,10 @@ To track the repository directly, install from GitHub:
|
|
|
87
52
|
pi install git:github.com/elderfo/pi-pstack-adapter
|
|
88
53
|
```
|
|
89
54
|
|
|
90
|
-
To pin a release, add
|
|
91
|
-
|
|
55
|
+
To pin a release, add a tag from the
|
|
56
|
+
[releases page](https://github.com/elderfo/pi-pstack-adapter/releases), as in
|
|
57
|
+
`git:github.com/elderfo/pi-pstack-adapter@v<version>`. For a pinned npm release, use
|
|
58
|
+
`npm:pi-pstack-adapter@<version>`.
|
|
92
59
|
|
|
93
60
|
## Run pstack workflows
|
|
94
61
|
|
|
@@ -106,146 +73,199 @@ Before you run a workflow, check what it needs:
|
|
|
106
73
|
/pistack-check how
|
|
107
74
|
```
|
|
108
75
|
|
|
109
|
-
The check reports the workflow's support tier and any
|
|
76
|
+
The check reports the workflow's support tier and any providers or executables you still need
|
|
77
|
+
to install.
|
|
110
78
|
|
|
111
79
|
The adapter also adds these commands:
|
|
112
80
|
|
|
113
81
|
| Command | What it does |
|
|
114
82
|
| --- | --- |
|
|
115
|
-
| `/pistack-status` | Shows versions, the
|
|
83
|
+
| `/pistack-status` | Shows versions, the pstack commit in use, trust, capabilities, support tiers, and diagnostics. |
|
|
116
84
|
| `/pistack-check <skill>` | Checks one workflow's requirements. |
|
|
117
|
-
| `/pistack-mode on\|off\|status` | Turns Poteto Mode on or off for the current session. |
|
|
118
|
-
| `/skill:pistack-setup` | Assigns Pi models to pstack roles or changes the
|
|
119
|
-
| `/skill:pistack-status` | Asks the agent to produce the status report. |
|
|
85
|
+
| `/pistack-mode on\|off\|status` | Turns Poteto Mode on or off for every prompt in the current session. |
|
|
86
|
+
| `/skill:pistack-setup` | Assigns Pi models to pstack roles, sets a model filter, or changes the pstack source. |
|
|
87
|
+
| `/skill:pistack-status` | Asks the agent to produce the status report and explain it. |
|
|
120
88
|
|
|
121
|
-
|
|
89
|
+
### Check how well a workflow is supported
|
|
122
90
|
|
|
123
91
|
`/pistack-status` lists a support tier for each skill:
|
|
124
92
|
|
|
125
93
|
| Tier | Meaning |
|
|
126
94
|
| --- | --- |
|
|
127
95
|
| `native` | The skill needs no Pi-specific changes, or the adapter supplies a Pi version. |
|
|
128
|
-
| `adapted` | The
|
|
129
|
-
| `dependency-gated` | The workflow needs a
|
|
96
|
+
| `adapted` | The skill works in Pi with the instructions the adapter adds to it. |
|
|
97
|
+
| `dependency-gated` | The workflow needs a provider or executable that may be missing. |
|
|
130
98
|
| `experimental` | Part of the workflow has no direct Pi equivalent. |
|
|
131
|
-
| `unsupported` | Pi cannot provide a
|
|
99
|
+
| `unsupported` | Pi cannot provide a feature the workflow requires. |
|
|
132
100
|
|
|
133
101
|
The [compatibility registry](docs/compatibility.md) lists the tier and requirements of every
|
|
134
102
|
skill.
|
|
135
103
|
|
|
104
|
+
## Set up workflows that delegate or ask questions
|
|
105
|
+
|
|
106
|
+
Some workflows hand work to subagents or ask you multiple-choice questions. Two providers can run
|
|
107
|
+
the subagents:
|
|
108
|
+
|
|
109
|
+
- **T3 Code.** When Pi runs inside [T3 Code](https://github.com/pingdotgg/t3code), workflows
|
|
110
|
+
delegate through T3's `delegate_task` tool. Each child appears in T3, can run on any provider
|
|
111
|
+
and model T3 offers, and can work in its own worktree. You install nothing extra.
|
|
112
|
+
- **pi-subagents.** Outside T3 Code, install `pi-subagents`. The pstack agents appear as
|
|
113
|
+
`pistack-comment-sicko` and `pistack-poteto-agent`.
|
|
114
|
+
|
|
115
|
+
For multiple-choice questions, install `pi-ask-user`:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
pi install npm:pi-subagents
|
|
119
|
+
pi install npm:pi-ask-user
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
When both providers are available, the adapter uses T3 Code. To prefer `pi-subagents`, set
|
|
123
|
+
`"delegation": "pi-subagents"` in the adapter config, or set `PISTACK_DELEGATION=pi-subagents`.
|
|
124
|
+
Restart Pi or run `/reload` after changing it. `/pistack-status` shows the order and the
|
|
125
|
+
provider the session uses.
|
|
126
|
+
|
|
127
|
+
When a delegating workflow starts, the adapter turns on that provider's tool, even if you turned
|
|
128
|
+
it off in the tool selector. While Poteto Mode is on, it turns the tool on for every prompt.
|
|
129
|
+
|
|
130
|
+
The adapter uses T3's tools only when T3 Code itself provides them. It ignores a tool with the
|
|
131
|
+
same name from another extension or MCP server.
|
|
132
|
+
|
|
136
133
|
## Choose models for pstack roles
|
|
137
134
|
|
|
138
135
|
pstack assigns work to named model roles such as `feature`, `bug-fix`, and `judgment`. The
|
|
139
136
|
`general` role covers every other delegate, such as explorers, swarm workers, and ad-hoc helpers.
|
|
140
|
-
A role you leave unset uses `general
|
|
141
|
-
|
|
137
|
+
A role you leave unset uses `general`. When `general` is unset too, the role uses the model of the
|
|
138
|
+
agent that starts it.
|
|
142
139
|
|
|
143
|
-
To
|
|
140
|
+
To see the models in your Pi installation and assign them to roles, run the setup skill:
|
|
144
141
|
|
|
145
142
|
```text
|
|
146
143
|
/skill:pistack-setup
|
|
147
144
|
```
|
|
148
145
|
|
|
149
|
-
|
|
146
|
+
The setup skill saves your choices in a config file. To set roles in a file or an environment
|
|
147
|
+
variable yourself, see [Set roles without the setup skill](#set-roles-without-the-setup-skill).
|
|
150
148
|
|
|
151
|
-
|
|
152
|
-
PISTACK_MODELS='feature=provider/model,bug-fix=provider/other-model' pi
|
|
153
|
-
```
|
|
149
|
+
### Thinking levels
|
|
154
150
|
|
|
155
|
-
|
|
156
|
-
`
|
|
151
|
+
Each role can also have a thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or
|
|
152
|
+
`max`. The level is a ceiling. A delegate may lower it for routine work but never raises it. A
|
|
153
|
+
role without a level passes none, so the provider uses its own default. If the model does not
|
|
154
|
+
offer the level, Pi limits it to what the model supports. Under T3 Code, T3 may reject the level
|
|
155
|
+
instead. The agent then lowers the level to one the model offers and tells you.
|
|
157
156
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
A role you leave unset, with `general` unset too, inherits the model and thinking level of the
|
|
158
|
+
agent that starts it. A `strongest-judgment` delegate at `xhigh` would then start every helper at
|
|
159
|
+
`xhigh`. Set `general` to keep helpers at a cheaper level.
|
|
161
160
|
|
|
162
|
-
Panels
|
|
163
|
-
use the panel roles `arena-runners`, `arena-cross-judge-pool`, `architect-runners`, and
|
|
164
|
-
`interrogate-reviewers`. A panel holds a list of models, one seat each, separated by spaces.
|
|
165
|
-
An `inherit` entry uses the model and thinking of the agent that starts the panel, which is
|
|
166
|
-
your session unless a delegate runs the workflow:
|
|
161
|
+
### Panels
|
|
167
162
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
Some workflows run several models side by side: `arena`'s runners, `architect`'s runners, and
|
|
164
|
+
`interrogate`'s adversaries. Their panel roles are `arena-runners`, `architect-runners`, and
|
|
165
|
+
`interrogate-reviewers`. A panel lists up to eight models, and each one gets a seat. An `inherit`
|
|
166
|
+
seat uses the model and thinking level of the agent that starts the panel, which is your session
|
|
167
|
+
unless a delegate runs the workflow.
|
|
168
|
+
|
|
169
|
+
The `arena-cross-judge-pool` role works differently. `arena`, and `architect` through it, pick
|
|
170
|
+
one judge from this list, the first model from a vendor other than your session's. pstack counts
|
|
171
|
+
Claude Fable and the other Claude models as one vendor. When no entry
|
|
172
|
+
qualifies, `arena` tries `judgment`, then `general`. If neither qualifies, it skips the judge and
|
|
173
|
+
says so. An `inherit` entry never judges.
|
|
174
|
+
|
|
175
|
+
Upstream pstack gives each panel models from several model families. A panel you
|
|
176
|
+
leave unset uses `judgment`, then `general`, so it covers two families only when those roles do.
|
|
177
|
+
The status report warns when a panel's seats all run on one model.
|
|
178
|
+
|
|
179
|
+
### Pools
|
|
171
180
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
A role can list up to eight models in order of preference. Each delegation for that role runs on
|
|
182
|
+
the first model that the [model filter](#restrict-which-models-delegation-uses) allows. When a
|
|
183
|
+
task clearly suits another model in the pool, the agent may pick that one instead, and it tells
|
|
184
|
+
you which model it picked and why. It cannot pick a model outside the pool.
|
|
175
185
|
|
|
176
|
-
|
|
186
|
+
A pool runs one model per task, and a runner panel runs every seat. A pool is also not a retry list.
|
|
187
|
+
When a delegation fails, the agent reports the failure and does not move on to the next model.
|
|
177
188
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
189
|
+
### Set roles without the setup skill
|
|
190
|
+
|
|
191
|
+
In a config file, a role takes one model, a pool takes a list, and a panel takes a string of
|
|
192
|
+
seats separated by spaces. Add a thinking level to any model with a `:level` suffix:
|
|
182
193
|
|
|
183
194
|
```json
|
|
184
|
-
{
|
|
195
|
+
{
|
|
196
|
+
"models": {
|
|
197
|
+
"general": "provider/cheap-model:low",
|
|
198
|
+
"judgment": "provider/strong-model:high",
|
|
199
|
+
"feature": ["provider/model-a:high", "provider/model-b:high", "provider/model-c"],
|
|
200
|
+
"arena-runners": "provider/model-a:high other-provider/model-d:high"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
185
203
|
```
|
|
186
204
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
written. In `PISTACK_MODELS`, separate a pool's entries with `|`:
|
|
205
|
+
For a noninteractive session, set the same values in `PISTACK_MODELS`. Separate roles with
|
|
206
|
+
commas and a pool's entries with `|`:
|
|
190
207
|
|
|
191
208
|
```bash
|
|
192
|
-
PISTACK_MODELS='feature=provider/model-a:high|provider/model-b' pi
|
|
209
|
+
PISTACK_MODELS='general=provider/cheap-model:low,feature=provider/model-a:high|provider/model-b' pi
|
|
210
|
+
PISTACK_MODELS='arena-runners=provider/model-a:high other-provider/model-d:high' pi
|
|
193
211
|
```
|
|
194
212
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- `
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
pattern
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
-
|
|
234
|
-
|
|
235
|
-
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
A
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
213
|
+
Role names use lowercase letters, digits, and hyphens. A model value is printable ASCII with no
|
|
214
|
+
spaces or markup characters, at most 128 characters. If an entry breaks these rules, the adapter
|
|
215
|
+
stops at startup with an error that names the file. Fix the entry and restart Pi.
|
|
216
|
+
|
|
217
|
+
## Restrict which models delegation uses
|
|
218
|
+
|
|
219
|
+
A model filter limits delegation to some models without changing your role assignments, for
|
|
220
|
+
example to run an experiment on one model family. Ask the agent, for example "only delegate to
|
|
221
|
+
GPT models", or run `/skill:pistack-setup`. A filter has two lists of patterns:
|
|
222
|
+
|
|
223
|
+
- `include` lists the models delegation may use. `["gpt-*"]` allows only model ids that start
|
|
224
|
+
with `gpt-`.
|
|
225
|
+
- `exclude` lists the models delegation may not use. `["*claude*"]` blocks every model id that
|
|
226
|
+
contains `claude`, including Bedrock-style ids.
|
|
227
|
+
|
|
228
|
+
A pattern with a `/` matches `provider/model`, and one without matches the part of the id after
|
|
229
|
+
the last `/`. `*` is the only wildcard, and matching ignores case. A model must match an `include`
|
|
230
|
+
pattern when the list has any, and must match no `exclude` pattern.
|
|
231
|
+
|
|
232
|
+
A filter lasts for the current session unless you ask the agent to save it. A saved filter goes
|
|
233
|
+
in your user or project config file as `modelFilter`, for example
|
|
234
|
+
`{ "modelFilter": { "include": ["gpt-*"] } }`, and takes effect at once. A session filter
|
|
235
|
+
overrides a saved one until you clear it. A project's saved filter replaces your user filter
|
|
236
|
+
entirely. The `model filter` row of `/pistack-status` shows the filter in force and where it came
|
|
237
|
+
from.
|
|
238
|
+
|
|
239
|
+
### What the filter blocks
|
|
240
|
+
|
|
241
|
+
The status report and `/pistack-check` mark each pool entry as allowed or excluded. The adapter
|
|
242
|
+
blocks a role with no allowed entry, and does not move its work to `general` or to your session's
|
|
243
|
+
model. It blocks a role that inherits when the filter excludes your session's model. It blocks a
|
|
244
|
+
panel seat on an excluded model, and the other seats still run.
|
|
245
|
+
|
|
246
|
+
The adapter checks every `delegate_task` and `subagent` call in the session, not only the calls
|
|
247
|
+
pstack workflows make. It blocks a call that would run on an excluded model, and a call it
|
|
248
|
+
cannot check, such as:
|
|
249
|
+
|
|
250
|
+
- a call with no model while the filter excludes your session's model
|
|
251
|
+
- a model Pi does not know
|
|
252
|
+
- a T3 provider other than Pi, or a T3 target that names an environment
|
|
253
|
+
- a `subagent` child without a model, or a `subagent` workflow script
|
|
254
|
+
- a `subagent` action that restarts, refines, steers, or schedules a child, opens a project
|
|
255
|
+
session, or configures a watchdog
|
|
256
|
+
|
|
257
|
+
The agent does not retry a blocked call.
|
|
258
|
+
|
|
259
|
+
### What the filter does not cover
|
|
260
|
+
|
|
261
|
+
- A child agent does not inherit a session filter. The agent includes the filter in each child's
|
|
262
|
+
instructions instead. A saved filter applies in a child that loads the same config files.
|
|
263
|
+
- The adapter does not check other tools that start agents or processes, such as T3 Code's
|
|
264
|
+
thread tools or a shell command.
|
|
265
|
+
- The filter does not block a provider or a model inside Pi, and it does not affect switching
|
|
266
|
+
models with `/model`.
|
|
267
|
+
- The filter guards model choice. It is not a security boundary. The agent can change it, but its
|
|
268
|
+
instructions say to keep it unless you ask for a change.
|
|
249
269
|
|
|
250
270
|
## Run Pi noninteractively
|
|
251
271
|
|
|
@@ -268,13 +288,28 @@ To select a branch, tag, commit, repository, or local checkout, run `/skill:pist
|
|
|
268
288
|
adapter asks you to confirm before it changes the source. Restart Pi or run `/reload` afterward.
|
|
269
289
|
|
|
270
290
|
A branch or tag resolves to one commit when you select it. The adapter records that commit and
|
|
271
|
-
does not move it on later starts. `/pistack-status`
|
|
272
|
-
|
|
291
|
+
does not move it on later starts. The `trust` row of `/pistack-status` tells you how far to trust
|
|
292
|
+
the source:
|
|
293
|
+
|
|
294
|
+
| Trust | Meaning |
|
|
295
|
+
| --- | --- |
|
|
296
|
+
| `tested` | The certified commit from the official repository. |
|
|
297
|
+
| `untested-ref` | A source from the official repository without this release's certified pin. This release has not verified it. |
|
|
298
|
+
| `untested-repo` | A custom repository. Its code runs with your permissions, so review it first. |
|
|
299
|
+
| `local` | A local checkout. Its contents are unverified and can differ between machines. |
|
|
273
300
|
|
|
274
301
|
## Configuration reference
|
|
275
302
|
|
|
276
|
-
The
|
|
277
|
-
|
|
303
|
+
The adapter reads settings from these places. A later one overrides an earlier one:
|
|
304
|
+
|
|
305
|
+
1. Your user config, `~/.pi/agent/pi-pstack-adapter.json`.
|
|
306
|
+
2. The project config, `.pi/pi-pstack-adapter.json` in the working directory. Pi reads it only
|
|
307
|
+
after you trust the project, and a project cannot change `namespace`.
|
|
308
|
+
3. Environment variables.
|
|
309
|
+
|
|
310
|
+
The setup skill writes both files. The keys you are most likely to edit are `models`,
|
|
311
|
+
`modelFilter`, and `delegation`. The setup skill also records the pstack source there, so change
|
|
312
|
+
the source through it.
|
|
278
313
|
|
|
279
314
|
| Variable | Effect |
|
|
280
315
|
| --- | --- |
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.11.0
|
package/adapter-skills/setup.md
CHANGED
|
@@ -4,17 +4,17 @@ Upstream pstack ships a `setup-pstack` skill that writes `~/.cursor/rules/pstack
|
|
|
4
4
|
a Cursor-only always-applied rule full of Cursor model slugs. Pi has neither that file nor
|
|
5
5
|
those models, so this adapter replaces the body with the Pi equivalent.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
You can configure four things: model roles, the model filter, the upstream source, and the
|
|
8
8
|
delegation order.
|
|
9
9
|
|
|
10
10
|
## Model roles
|
|
11
11
|
|
|
12
|
-
pstack skills name a model per role.
|
|
13
|
-
model in your
|
|
12
|
+
pstack skills name a model per role. Pi has no such models, so each role maps to a
|
|
13
|
+
model in your Pi installation. A role you never configure uses the `general` role. When `general` is
|
|
14
14
|
unconfigured too, the role inherits the model of whichever agent starts it, which is a working
|
|
15
15
|
default, not a failure.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
pstack workflows use these roles.
|
|
18
18
|
|
|
19
19
|
| role | used by |
|
|
20
20
|
| --- | --- |
|
|
@@ -37,11 +37,13 @@ keeps them as panel roles.
|
|
|
37
37
|
| `architect-runners` | `architect`'s design candidates |
|
|
38
38
|
| `interrogate-reviewers` | `interrogate`'s adversaries |
|
|
39
39
|
|
|
40
|
-
Upstream defaults each panel to
|
|
40
|
+
Upstream defaults each panel to one Claude Fable, one Claude Opus, and one Gemini model. A panel
|
|
41
41
|
left unset uses `judgment`, then `general`, so it spans two families only when those roles do.
|
|
42
|
-
`arena` takes its judge from the pool only when the model is from a
|
|
43
|
-
session's
|
|
44
|
-
|
|
42
|
+
`arena` takes its judge from the pool only when the model is from a vendor other than the
|
|
43
|
+
session model's, and it counts Fable and the other Claude models as one vendor. When no pool entry
|
|
44
|
+
qualifies, it tries `judgment`, then `general`, and skips the judge only when neither does. The
|
|
45
|
+
status report warns when
|
|
46
|
+
a panel's seats all use one model.
|
|
45
47
|
|
|
46
48
|
A panel value lists entries in order. An entry is a model id, optionally with a thinking level,
|
|
47
49
|
or `inherit` for the model and thinking of the agent that starts the panel, which is the
|
|
@@ -59,14 +61,16 @@ configure `general` to stop that. A role's level is a ceiling: delegates may low
|
|
|
59
61
|
work, but never raise it. Model choice often affects cost more than thinking level does, so
|
|
60
62
|
consider a cheaper model for the bulk roles as well.
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
Follow these steps.
|
|
63
65
|
|
|
64
66
|
1. Call the adapter tool with `action: "models"` to list the provider and model ids this Pi
|
|
65
|
-
installation can
|
|
67
|
+
installation can reach. Do not invent ids.
|
|
66
68
|
2. Ask the user which model each role should use. Offer the listed ids, and offer
|
|
67
69
|
`inherit` for any role they do not care about. Use the structured question tool when it is
|
|
68
|
-
available; otherwise ask in plain text.
|
|
69
|
-
alternatives for a role
|
|
70
|
+
available; otherwise ask in plain text. The tool accepts only ids from step 1. For a user who
|
|
71
|
+
wants alternatives for a role, offer a pool, which is a ranked list of models. Ask for the
|
|
72
|
+
ranking. The adapter normally picks the first model the filter allows. The delegating agent
|
|
73
|
+
may pick another allowed entry for a particular task.
|
|
70
74
|
A pool is a set of choices, not a retry list and not a panel, so say that when you offer it.
|
|
71
75
|
3. Ask for a thinking level. Do not assume the user wants none. Skip this step only when every
|
|
72
76
|
role is on `inherit`. It applies to every role that got a model in step 2. A role on
|
|
@@ -89,8 +93,9 @@ Steps.
|
|
|
89
93
|
only when the user says it should differ from its group. Backend default passes no level and
|
|
90
94
|
leaves the choice to the delegation backend. A Custom user who wants thinking disabled picks
|
|
91
95
|
`off`.
|
|
92
|
-
A model may not offer every level.
|
|
93
|
-
|
|
96
|
+
A model may not offer every level. Pi clamps a level it lacks when the role runs. Under T3 Code,
|
|
97
|
+
T3 may reject the level instead, and the delegating agent then lowers it and tells the user.
|
|
98
|
+
Say that instead of asking again. The tool rejects any level other than `off` on a model that has no reasoning support.
|
|
94
99
|
When it does, set that role with no level and tell the user which role has none.
|
|
95
100
|
4. For each role, call the adapter tool with `action: "set_model"`, the role, the chosen
|
|
96
101
|
`provider/model` id, and `thinking` when step 3 picked a level. For a pool, pass `model` as a
|
|
@@ -101,7 +106,9 @@ Steps.
|
|
|
101
106
|
pass it again.
|
|
102
107
|
5. Set the panels. Read the `panel roles` table of `action: "status"` and show the user each
|
|
103
108
|
panel's seats. When a panel's seats share one model, or one family, say so and suggest two
|
|
104
|
-
families from step 1, as upstream's defaults do.
|
|
109
|
+
families from step 1, as upstream's defaults do. For `arena-cross-judge-pool`, suggest models
|
|
110
|
+
from two vendors, because a Fable and an Opus model are one vendor, so that pool has no eligible
|
|
111
|
+
judge for a Claude session, and arena falls back to `judgment`, then `general`. Never say a family is missing unless the
|
|
105
112
|
step 1 list shows it. Ask whether to keep each panel or set it. For each panel the user sets,
|
|
106
113
|
call `set_model` with the panel role and its entries in `model`, separated by commas, for
|
|
107
114
|
example `model: "provider/model-a, provider/model-b"`. Pass `thinking` for the level of the
|
|
@@ -114,8 +121,8 @@ For a scripted environment, set `PISTACK_MODELS` instead, for example
|
|
|
114
121
|
`PISTACK_MODELS=feature=anthropic/claude-sonnet-4-5:medium,bug-fix=openai/gpt-5:high`. The
|
|
115
122
|
optional `:level` suffix sets the thinking level. A pool's entries are separated by `|`, as in
|
|
116
123
|
`feature=anthropic/claude-sonnet-4-5:high|openai/gpt-5:high`. A panel's entries are separated by spaces, as
|
|
117
|
-
in `PISTACK_MODELS='arena-runners=anthropic/claude-sonnet-4-5:high openai/gpt-5:high'`.
|
|
118
|
-
|
|
124
|
+
in `PISTACK_MODELS='arena-runners=anthropic/claude-sonnet-4-5:high openai/gpt-5:high'`. `PISTACK_MODELS` overrides
|
|
125
|
+
both config files, so CI does not need this dialog.
|
|
119
126
|
|
|
120
127
|
## Model filter
|
|
121
128
|
|
|
@@ -127,10 +134,11 @@ without rewriting the roles. Call the adapter tool with `action: "set_filter"` a
|
|
|
127
134
|
- `clear: true` to remove the filter at that scope.
|
|
128
135
|
|
|
129
136
|
A pattern with `/` matches `provider/model`; one without matches the model id. `*` is the only
|
|
130
|
-
wildcard. The filter applies to this session only
|
|
131
|
-
`scope: "user"` or `scope: "project"`. A session filter wins over a saved one until
|
|
132
|
-
A trusted project's filter replaces the user filter as a whole. Empty
|
|
133
|
-
override
|
|
137
|
+
wildcard. The filter applies to this session only. When the user asks to save it, pass
|
|
138
|
+
`scope: "user"` or `scope: "project"`. A session filter wins over a saved one until you clear it.
|
|
139
|
+
A trusted project's filter replaces the user filter as a whole. Empty `include` and `exclude`
|
|
140
|
+
lists set an override that allows every model. Clearing the session filter restores the saved
|
|
141
|
+
filter. Wait for `set_filter` to finish
|
|
134
142
|
before issuing delegation calls. Keep the active filter unchanged unless the user requests a change.
|
|
135
143
|
|
|
136
144
|
Read back `action: "status"`. Report the `model filter` row, and any role or panel seat the
|
|
@@ -138,34 +146,35 @@ Read back `action: "status"`. Report the `model filter` row, and any role or pan
|
|
|
138
146
|
Tell the user the limits: the adapter blocks `delegate_task` and `subagent` calls in this session
|
|
139
147
|
that the filter does not allow. A child does not inherit a session filter and follows it only as
|
|
140
148
|
an instruction in its brief. A saved filter applies in a child where the adapter loads the same
|
|
141
|
-
config files.
|
|
149
|
+
config files. The adapter does not check other tools that start agents. This is a model-selection guard,
|
|
142
150
|
not an access-control boundary.
|
|
143
151
|
|
|
144
152
|
## Upstream source
|
|
145
153
|
|
|
146
154
|
By default the adapter uses the pstack revision this release was tested against. Change it only
|
|
147
|
-
|
|
155
|
+
to test another revision.
|
|
148
156
|
|
|
149
157
|
Call the adapter tool with `action: "set_source"` and one of these.
|
|
150
158
|
|
|
151
|
-
- `ref` with a branch, tag, or commit.
|
|
152
|
-
|
|
159
|
+
- `ref` with a branch, tag, or commit. The adapter resolves a branch or tag to a commit once, during
|
|
160
|
+
this call, and records it. Later sessions keep that commit. The adapter never advances it on its own.
|
|
153
161
|
- `repo` with another repository. This is outside the tested trust boundary.
|
|
154
162
|
- `localPath` with a directory holding a pstack checkout. Use this when developing pstack itself.
|
|
155
163
|
|
|
156
164
|
The adapter asks the user to confirm every source change itself and refuses without an
|
|
157
|
-
interactive session, so
|
|
165
|
+
interactive session, so you cannot change the source without the user's confirmation. Explain the consequence in
|
|
158
166
|
plain words before you call it, and report a refusal as a refusal.
|
|
159
167
|
|
|
160
|
-
|
|
168
|
+
The adapter regenerates its wrappers on the next Pi start. Tell the user to restart Pi, or run
|
|
169
|
+
`/reload`.
|
|
161
170
|
|
|
162
171
|
## Delegation order
|
|
163
172
|
|
|
164
173
|
Delegating workflows try T3 Code's `delegate_task` first, then pi-subagents' `subagent`. A user
|
|
165
174
|
who wants `subagent` first sets `"delegation": "pi-subagents"` in the adapter config file, or
|
|
166
175
|
`PISTACK_DELEGATION=pi-subagents`. The adapter tool has no action for this. Tell the user which
|
|
167
|
-
file to edit: the `config layers` row of the status report lists them.
|
|
168
|
-
the next Pi start.
|
|
176
|
+
file to edit: the `config layers` row of the status report lists them. The change takes effect
|
|
177
|
+
on the next Pi start.
|
|
169
178
|
|
|
170
179
|
## Finish
|
|
171
180
|
|
package/adapter-skills/status.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# pstack adapter status
|
|
2
2
|
|
|
3
|
-
Report what the adapter is
|
|
4
|
-
|
|
3
|
+
Report what the adapter is running, so the user can see whether a pstack workflow is verified
|
|
4
|
+
here.
|
|
5
5
|
|
|
6
6
|
1. Call the adapter tool with `action: "status"`.
|
|
7
7
|
2. Show the user the full report. Do not summarize away the trust line, the resolved commit, or
|
|
@@ -15,7 +15,7 @@ To check one workflow before starting it, call the tool with `action: "check"` a
|
|
|
15
15
|
name. That reports the capabilities and executables that workflow needs and whether this
|
|
16
16
|
environment has them, before the workflow does any work.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The support tiers mean the following.
|
|
19
19
|
|
|
20
20
|
| tier | meaning |
|
|
21
21
|
| --- | --- |
|