@jameslovespancakes/pi-plus 1.0.0 → 1.0.1
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/LICENSE +21 -21
- package/README.md +190 -190
- package/config/pi-plus.example.json +60 -60
- package/config/skills/model-routing/SKILL.md +86 -86
- package/images/pi-plus.svg +10 -10
- package/package.json +67 -67
- package/server/board-server.mjs +641 -641
- package/server/package.json +17 -17
- package/src/core/accounts/registry.ts +93 -93
- package/src/core/anthropic/client-identity.ts +241 -241
- package/src/core/catalog/quality.ts +314 -314
- package/src/core/config.ts +169 -169
- package/src/core/env.ts +58 -58
- package/src/core/exec/process.ts +146 -146
- package/src/core/exec/ssh-config.ts +157 -157
- package/src/core/policy/policy.ts +183 -183
- package/src/core/quota/pool.ts +64 -64
- package/src/core/quota/usage-source.ts +289 -289
- package/src/core/store.ts +43 -43
- package/src/domains/agents/board-setup.ts +409 -409
- package/src/domains/agents/index.ts +462 -462
- package/src/domains/models/catalog-tool.ts +361 -361
- package/src/domains/models/index.ts +14 -14
- package/src/domains/models/policy-gate.ts +169 -169
- package/src/domains/models/provider-picker.ts +207 -207
- package/src/domains/remote/config-path.ts +41 -41
- package/src/domains/remote/index.ts +866 -866
- package/src/domains/remote/setup.ts +425 -425
- package/src/domains/setup/index.ts +220 -220
- package/src/domains/subscriptions/accounts.ts +242 -242
- package/src/domains/subscriptions/footer.ts +182 -182
- package/src/domains/subscriptions/index.ts +42 -42
- package/src/domains/subscriptions/provider.ts +219 -219
- package/src/domains/subscriptions/providers/anthropic.ts +149 -149
- package/src/domains/subscriptions/providers/codex.ts +148 -148
- package/src/domains/subscriptions/routing.ts +72 -72
- package/src/services/usage-service.ts +186 -186
- package/src/ui/format.ts +73 -73
- package/src/ui/usage-bars.ts +154 -154
- package/src/vendor/anthropic.ts +109 -109
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 james
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 james
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
<img src="images/pi-plus.svg" alt="pi-plus" width="140">
|
|
4
|
-
|
|
5
|
-
# pi-plus
|
|
6
|
-
|
|
7
|
-
**Everything [pi](https://pi.dev/) is missing, in one install.**
|
|
8
|
-
|
|
9
|
-
[](https://www.npmjs.com/package/@jameslovespancakes/pi-plus)
|
|
10
|
-
[](LICENSE)
|
|
11
|
-
[](https://pi.dev/packages)
|
|
12
|
-
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
pi install npm:@jameslovespancakes/pi-plus # npm
|
|
21
|
-
pi install git:github.com/jameslovespancakes/pi-plus # git
|
|
22
|
-
pi install /path/to/pi-plus # local checkout
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Then run **`/pi-plus`**. It shows what is configured and what is not, and enter
|
|
26
|
-
on any row starts that setup.
|
|
27
|
-
|
|
28
|
-
<img src="images/pi-plus_demo.png" alt="The /pi-plus status modal listing each feature and its state" width="700">
|
|
29
|
-
|
|
30
|
-
`/pi-plus help` asks the model to explain the pack and what you are missing.
|
|
31
|
-
Nothing else is required, every feature configures itself from within pi.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Features
|
|
36
|
-
|
|
37
|
-
### Pool every subscription
|
|
38
|
-
|
|
39
|
-
Add all the Claude accounts you own. pi-plus balances sessions across them by
|
|
40
|
-
**remaining quota and time-to-reset**, keeps caches sticky, and migrates only on
|
|
41
|
-
confirmed exhaustion.
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
/account anthropic add work
|
|
45
|
-
/routing optimal
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Your live quota, always in the footer:
|
|
49
|
-
|
|
50
|
-
<img src="images/usage_demo.png" alt="Claude subscription quota bars in the pi footer" width="680">
|
|
51
|
-
|
|
52
|
-
With more than two accounts only the two most recently used are listed, so the
|
|
53
|
-
footer stays a fixed height however many you pool.
|
|
54
|
-
|
|
55
|
-
Account and routing commands are provider-agnostic: they dispatch through an
|
|
56
|
-
adapter registry, so a second provider is one adapter, not a new command
|
|
57
|
-
surface. Anthropic ships today.
|
|
58
|
-
|
|
59
|
-
### Pick models on evidence
|
|
60
|
-
|
|
61
|
-
`list_models` puts the full **Artificial Analysis** benchmark set in front of the
|
|
62
|
-
agent: intelligence, coding, Terminal-Bench, τ²-bench, GPQA, price, tok/s and
|
|
63
|
-
score-per-dollar, *plus your remaining quota*.
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
model bill quota intel code tbHard $/1M tok/s code/$
|
|
67
|
-
anthropic/claude-opus-5 sub 74% 71.2 76.4 42.1 - - -
|
|
68
|
-
openai-codex/gpt-6-astra sub 81% 69.8 74.1 39.6 - - -
|
|
69
|
-
openrouter/glm-5 paid - 64.3 68.9 31.2 0.62 88.4 111.1
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Cached locally and revalidated every 4h with an ETag, mirroring how pi refreshes
|
|
73
|
-
its own model catalog.
|
|
74
|
-
|
|
75
|
-
### Never get surprise-billed
|
|
76
|
-
|
|
77
|
-
Metered providers are gated **at the provider boundary**, not by prompt
|
|
78
|
-
instructions, so it covers workflow subagents too. `/provider` shows every
|
|
79
|
-
provider you have credentials for and toggles each one:
|
|
80
|
-
|
|
81
|
-
<img src="images/provider_demo.png" alt="The /provider picker toggling provider approval" width="560">
|
|
82
|
-
|
|
83
|
-
### Run tests on real hardware
|
|
84
|
-
|
|
85
|
-
`/remote setup` reads every connectable host in `~/.ssh/config` and lets you
|
|
86
|
-
toggle which are eligible. No SSH config? It generates a dedicated key, shows
|
|
87
|
-
the one line to run, and verifies.
|
|
88
|
-
|
|
89
|
-
<img src="images/remote_demo.png" alt="The /remote picker toggling SSH workers" width="700">
|
|
90
|
-
|
|
91
|
-
`remote_test` snapshots your working tree, admission-checks CPU/GPU/disk,
|
|
92
|
-
reserves a slot, and **deletes the uploaded source the moment the run ends**,
|
|
93
|
-
keeping only `test.log` and `result.json`. Cleanup runs on the worker, so it
|
|
94
|
-
still happens if your laptop sleeps.
|
|
95
|
-
|
|
96
|
-
### Coordinate multiple agents
|
|
97
|
-
|
|
98
|
-
`agent_board` gives live presence, messaging, repo rooms and coordinator chains
|
|
99
|
-
across every running pi agent. `/board` opens the messaging view:
|
|
100
|
-
|
|
101
|
-
<img src="images/board_demo.png" alt="The /board messaging view" width="700">
|
|
102
|
-
|
|
103
|
-
`/board setup` installs the server locally (pi starts it each session) or onto
|
|
104
|
-
any Mac or Linux host over SSH, where launchd or systemd brings it back after a
|
|
105
|
-
reboot.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Commands
|
|
110
|
-
|
|
111
|
-
| | |
|
|
112
|
-
| --- | --- |
|
|
113
|
-
| `/pi-plus` | status modal for every feature |
|
|
114
|
-
| `/pi-plus help` | model explains the pack and what is missing |
|
|
115
|
-
| `/account` | account hub: toggle, add, reauth, switch routing |
|
|
116
|
-
| `/account <provider> add [label]` | add a subscription |
|
|
117
|
-
| `/account <provider> reauth [label]` | reauthorize one |
|
|
118
|
-
| `/routing standard \| optimal` | main-first, or balance by quota |
|
|
119
|
-
| `/usage [on\|off\|text]` | quota bars |
|
|
120
|
-
| `/models [sort]` | ranked catalog |
|
|
121
|
-
| `/model-info <id>` | every benchmark for one model |
|
|
122
|
-
| `/model-info refresh` | force a benchmark refresh |
|
|
123
|
-
| `/model-info setup` | add the Artificial Analysis key |
|
|
124
|
-
| `/provider` | provider toggle picker |
|
|
125
|
-
| `/provider approve \| remove <name>` | grant or revoke |
|
|
126
|
-
| `/remote setup` | worker hub: toggle, add, rename, remove |
|
|
127
|
-
| `/remote add \| rename \| remove` | jump to one step |
|
|
128
|
-
| `/board` | live agent board UI |
|
|
129
|
-
| `/board setup \| restart \| clear \| status` | manage the board server |
|
|
130
|
-
|
|
131
|
-
**Tools available to the agent:** `list_models`, `agent_board`, `remote_status`,
|
|
132
|
-
`remote_test`.
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Configuration
|
|
137
|
-
|
|
138
|
-
Everything lives in one file, `~/.pi/agent/pi-plus.json`, created on first use:
|
|
139
|
-
|
|
140
|
-
```json
|
|
141
|
-
{
|
|
142
|
-
"env": { "ARTIFICIAL_ANALYSIS_API_KEY": "aa_…", "AGENT_BOARD_URL": "ws://…" },
|
|
143
|
-
"policy": { "autoApprove": [], "requireApproval": [], "deny": [] },
|
|
144
|
-
"remote": { "workers": [] }
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Real environment variables of the same name always win, so CI and shell
|
|
149
|
-
overrides work unchanged. Older `model-quality-key.json`, `agent-board.json` and
|
|
150
|
-
`remote-workers.json` are migrated automatically and left in place.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Architecture
|
|
155
|
-
|
|
156
|
-
Layered by dependency direction, grouped by domain. Each domain owns its own
|
|
157
|
-
commands, tools and widgets.
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
src/
|
|
161
|
-
core/ zero pi imports, pure and unit-testable
|
|
162
|
-
store · config · env · quota · catalog · policy · exec · accounts
|
|
163
|
-
services/ stateful singletons with lifecycle + subscribe()
|
|
164
|
-
usage-service, the single quota poller
|
|
165
|
-
ui/ dumb render primitives: format · usage-bars
|
|
166
|
-
domains/ one pi extension entry each
|
|
167
|
-
setup · subscriptions · models · agents · remote
|
|
168
|
-
vendor/ anthropic.ts, the only file importing @cortexkit/*
|
|
169
|
-
server/ the agent board server, one file and one dependency (ws)
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
npm install && npm run verify # typecheck + 106 tests
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Built on
|
|
179
|
-
|
|
180
|
-
pi-plus is a thin layer over other people's work.
|
|
181
|
-
|
|
182
|
-
| project | what it does here | license |
|
|
183
|
-
| --- | --- | --- |
|
|
184
|
-
| [`pi`](https://pi.dev/)| the host agent and the entire extension API | MIT |
|
|
185
|
-
| [`@cortexkit/pi-anthropic-auth`](https://github.com/cortexkit/anthropic-auth) | Claude OAuth, the Anthropic provider, token refresh and routing primitives | MIT |
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
## License
|
|
189
|
-
|
|
190
|
-
MIT
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="images/pi-plus.svg" alt="pi-plus" width="140">
|
|
4
|
+
|
|
5
|
+
# pi-plus
|
|
6
|
+
|
|
7
|
+
**Everything [pi](https://pi.dev/) is missing, in one install.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@jameslovespancakes/pi-plus)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://pi.dev/packages)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pi install npm:@jameslovespancakes/pi-plus # npm
|
|
21
|
+
pi install git:github.com/jameslovespancakes/pi-plus # git
|
|
22
|
+
pi install /path/to/pi-plus # local checkout
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then run **`/pi-plus`**. It shows what is configured and what is not, and enter
|
|
26
|
+
on any row starts that setup.
|
|
27
|
+
|
|
28
|
+
<img src="images/pi-plus_demo.png" alt="The /pi-plus status modal listing each feature and its state" width="700">
|
|
29
|
+
|
|
30
|
+
`/pi-plus help` asks the model to explain the pack and what you are missing.
|
|
31
|
+
Nothing else is required, every feature configures itself from within pi.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
### Pool every subscription
|
|
38
|
+
|
|
39
|
+
Add all the Claude accounts you own. pi-plus balances sessions across them by
|
|
40
|
+
**remaining quota and time-to-reset**, keeps caches sticky, and migrates only on
|
|
41
|
+
confirmed exhaustion.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/account anthropic add work
|
|
45
|
+
/routing optimal
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Your live quota, always in the footer:
|
|
49
|
+
|
|
50
|
+
<img src="images/usage_demo.png" alt="Claude subscription quota bars in the pi footer" width="680">
|
|
51
|
+
|
|
52
|
+
With more than two accounts only the two most recently used are listed, so the
|
|
53
|
+
footer stays a fixed height however many you pool.
|
|
54
|
+
|
|
55
|
+
Account and routing commands are provider-agnostic: they dispatch through an
|
|
56
|
+
adapter registry, so a second provider is one adapter, not a new command
|
|
57
|
+
surface. Anthropic ships today.
|
|
58
|
+
|
|
59
|
+
### Pick models on evidence
|
|
60
|
+
|
|
61
|
+
`list_models` puts the full **Artificial Analysis** benchmark set in front of the
|
|
62
|
+
agent: intelligence, coding, Terminal-Bench, τ²-bench, GPQA, price, tok/s and
|
|
63
|
+
score-per-dollar, *plus your remaining quota*.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
model bill quota intel code tbHard $/1M tok/s code/$
|
|
67
|
+
anthropic/claude-opus-5 sub 74% 71.2 76.4 42.1 - - -
|
|
68
|
+
openai-codex/gpt-6-astra sub 81% 69.8 74.1 39.6 - - -
|
|
69
|
+
openrouter/glm-5 paid - 64.3 68.9 31.2 0.62 88.4 111.1
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Cached locally and revalidated every 4h with an ETag, mirroring how pi refreshes
|
|
73
|
+
its own model catalog.
|
|
74
|
+
|
|
75
|
+
### Never get surprise-billed
|
|
76
|
+
|
|
77
|
+
Metered providers are gated **at the provider boundary**, not by prompt
|
|
78
|
+
instructions, so it covers workflow subagents too. `/provider` shows every
|
|
79
|
+
provider you have credentials for and toggles each one:
|
|
80
|
+
|
|
81
|
+
<img src="images/provider_demo.png" alt="The /provider picker toggling provider approval" width="560">
|
|
82
|
+
|
|
83
|
+
### Run tests on real hardware
|
|
84
|
+
|
|
85
|
+
`/remote setup` reads every connectable host in `~/.ssh/config` and lets you
|
|
86
|
+
toggle which are eligible. No SSH config? It generates a dedicated key, shows
|
|
87
|
+
the one line to run, and verifies.
|
|
88
|
+
|
|
89
|
+
<img src="images/remote_demo.png" alt="The /remote picker toggling SSH workers" width="700">
|
|
90
|
+
|
|
91
|
+
`remote_test` snapshots your working tree, admission-checks CPU/GPU/disk,
|
|
92
|
+
reserves a slot, and **deletes the uploaded source the moment the run ends**,
|
|
93
|
+
keeping only `test.log` and `result.json`. Cleanup runs on the worker, so it
|
|
94
|
+
still happens if your laptop sleeps.
|
|
95
|
+
|
|
96
|
+
### Coordinate multiple agents
|
|
97
|
+
|
|
98
|
+
`agent_board` gives live presence, messaging, repo rooms and coordinator chains
|
|
99
|
+
across every running pi agent. `/board` opens the messaging view:
|
|
100
|
+
|
|
101
|
+
<img src="images/board_demo.png" alt="The /board messaging view" width="700">
|
|
102
|
+
|
|
103
|
+
`/board setup` installs the server locally (pi starts it each session) or onto
|
|
104
|
+
any Mac or Linux host over SSH, where launchd or systemd brings it back after a
|
|
105
|
+
reboot.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Commands
|
|
110
|
+
|
|
111
|
+
| | |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| `/pi-plus` | status modal for every feature |
|
|
114
|
+
| `/pi-plus help` | model explains the pack and what is missing |
|
|
115
|
+
| `/account` | account hub: toggle, add, reauth, switch routing |
|
|
116
|
+
| `/account <provider> add [label]` | add a subscription |
|
|
117
|
+
| `/account <provider> reauth [label]` | reauthorize one |
|
|
118
|
+
| `/routing standard \| optimal` | main-first, or balance by quota |
|
|
119
|
+
| `/usage [on\|off\|text]` | quota bars |
|
|
120
|
+
| `/models [sort]` | ranked catalog |
|
|
121
|
+
| `/model-info <id>` | every benchmark for one model |
|
|
122
|
+
| `/model-info refresh` | force a benchmark refresh |
|
|
123
|
+
| `/model-info setup` | add the Artificial Analysis key |
|
|
124
|
+
| `/provider` | provider toggle picker |
|
|
125
|
+
| `/provider approve \| remove <name>` | grant or revoke |
|
|
126
|
+
| `/remote setup` | worker hub: toggle, add, rename, remove |
|
|
127
|
+
| `/remote add \| rename \| remove` | jump to one step |
|
|
128
|
+
| `/board` | live agent board UI |
|
|
129
|
+
| `/board setup \| restart \| clear \| status` | manage the board server |
|
|
130
|
+
|
|
131
|
+
**Tools available to the agent:** `list_models`, `agent_board`, `remote_status`,
|
|
132
|
+
`remote_test`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Configuration
|
|
137
|
+
|
|
138
|
+
Everything lives in one file, `~/.pi/agent/pi-plus.json`, created on first use:
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"env": { "ARTIFICIAL_ANALYSIS_API_KEY": "aa_…", "AGENT_BOARD_URL": "ws://…" },
|
|
143
|
+
"policy": { "autoApprove": [], "requireApproval": [], "deny": [] },
|
|
144
|
+
"remote": { "workers": [] }
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Real environment variables of the same name always win, so CI and shell
|
|
149
|
+
overrides work unchanged. Older `model-quality-key.json`, `agent-board.json` and
|
|
150
|
+
`remote-workers.json` are migrated automatically and left in place.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Architecture
|
|
155
|
+
|
|
156
|
+
Layered by dependency direction, grouped by domain. Each domain owns its own
|
|
157
|
+
commands, tools and widgets.
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
src/
|
|
161
|
+
core/ zero pi imports, pure and unit-testable
|
|
162
|
+
store · config · env · quota · catalog · policy · exec · accounts
|
|
163
|
+
services/ stateful singletons with lifecycle + subscribe()
|
|
164
|
+
usage-service, the single quota poller
|
|
165
|
+
ui/ dumb render primitives: format · usage-bars
|
|
166
|
+
domains/ one pi extension entry each
|
|
167
|
+
setup · subscriptions · models · agents · remote
|
|
168
|
+
vendor/ anthropic.ts, the only file importing @cortexkit/*
|
|
169
|
+
server/ the agent board server, one file and one dependency (ws)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
npm install && npm run verify # typecheck + 106 tests
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Built on
|
|
179
|
+
|
|
180
|
+
pi-plus is a thin layer over other people's work.
|
|
181
|
+
|
|
182
|
+
| project | what it does here | license |
|
|
183
|
+
| --- | --- | --- |
|
|
184
|
+
| [`pi`](https://pi.dev/)| the host agent and the entire extension API | MIT |
|
|
185
|
+
| [`@cortexkit/pi-anthropic-auth`](https://github.com/cortexkit/anthropic-auth) | Claude OAuth, the Anthropic provider, token refresh and routing primitives | MIT |
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
MIT
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"ARTIFICIAL_ANALYSIS_API_KEY": "<artificial-analysis-api-key>",
|
|
4
|
-
"AGENT_BOARD_URL": "ws://<board-host>:8787/ws",
|
|
5
|
-
"AGENT_BOARD_TOKEN": "<agent-board-token>",
|
|
6
|
-
"AGENT_BOARD_NAME": "you"
|
|
7
|
-
},
|
|
8
|
-
"policy": {
|
|
9
|
-
"autoApprove": [
|
|
10
|
-
"anthropic/*",
|
|
11
|
-
"openai-codex/*",
|
|
12
|
-
"openrouter/stealth/union-alpha"
|
|
13
|
-
],
|
|
14
|
-
"requireApproval": [
|
|
15
|
-
"openrouter/*",
|
|
16
|
-
"google/*",
|
|
17
|
-
"openai/*",
|
|
18
|
-
"xai/*"
|
|
19
|
-
],
|
|
20
|
-
"deny": []
|
|
21
|
-
},
|
|
22
|
-
"remote": {
|
|
23
|
-
"injectStatus": true,
|
|
24
|
-
"defaults": {
|
|
25
|
-
"cpuBlockPercent": 90,
|
|
26
|
-
"gpuBlockPercent": 90,
|
|
27
|
-
"gpuMemoryBlockPercent": 90,
|
|
28
|
-
"memoryBlockPercent": 90,
|
|
29
|
-
"minimumFreeDiskGB": 10,
|
|
30
|
-
"statusCacheSeconds": 30,
|
|
31
|
-
"retentionHours": 24
|
|
32
|
-
},
|
|
33
|
-
"workers": [
|
|
34
|
-
{
|
|
35
|
-
"name": "mac-mini",
|
|
36
|
-
"ssh": "mac-mini",
|
|
37
|
-
"root": "~/remote_tests",
|
|
38
|
-
"nice": 10,
|
|
39
|
-
"tags": [
|
|
40
|
-
"macos",
|
|
41
|
-
"arm64",
|
|
42
|
-
"gpu",
|
|
43
|
-
"metal"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "hyperion",
|
|
48
|
-
"ssh": "hyperion",
|
|
49
|
-
"root": "~/remote_tests",
|
|
50
|
-
"nice": 10,
|
|
51
|
-
"tags": [
|
|
52
|
-
"linux",
|
|
53
|
-
"x64",
|
|
54
|
-
"gpu",
|
|
55
|
-
"cuda"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"ARTIFICIAL_ANALYSIS_API_KEY": "<artificial-analysis-api-key>",
|
|
4
|
+
"AGENT_BOARD_URL": "ws://<board-host>:8787/ws",
|
|
5
|
+
"AGENT_BOARD_TOKEN": "<agent-board-token>",
|
|
6
|
+
"AGENT_BOARD_NAME": "you"
|
|
7
|
+
},
|
|
8
|
+
"policy": {
|
|
9
|
+
"autoApprove": [
|
|
10
|
+
"anthropic/*",
|
|
11
|
+
"openai-codex/*",
|
|
12
|
+
"openrouter/stealth/union-alpha"
|
|
13
|
+
],
|
|
14
|
+
"requireApproval": [
|
|
15
|
+
"openrouter/*",
|
|
16
|
+
"google/*",
|
|
17
|
+
"openai/*",
|
|
18
|
+
"xai/*"
|
|
19
|
+
],
|
|
20
|
+
"deny": []
|
|
21
|
+
},
|
|
22
|
+
"remote": {
|
|
23
|
+
"injectStatus": true,
|
|
24
|
+
"defaults": {
|
|
25
|
+
"cpuBlockPercent": 90,
|
|
26
|
+
"gpuBlockPercent": 90,
|
|
27
|
+
"gpuMemoryBlockPercent": 90,
|
|
28
|
+
"memoryBlockPercent": 90,
|
|
29
|
+
"minimumFreeDiskGB": 10,
|
|
30
|
+
"statusCacheSeconds": 30,
|
|
31
|
+
"retentionHours": 24
|
|
32
|
+
},
|
|
33
|
+
"workers": [
|
|
34
|
+
{
|
|
35
|
+
"name": "mac-mini",
|
|
36
|
+
"ssh": "mac-mini",
|
|
37
|
+
"root": "~/remote_tests",
|
|
38
|
+
"nice": 10,
|
|
39
|
+
"tags": [
|
|
40
|
+
"macos",
|
|
41
|
+
"arm64",
|
|
42
|
+
"gpu",
|
|
43
|
+
"metal"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "hyperion",
|
|
48
|
+
"ssh": "hyperion",
|
|
49
|
+
"root": "~/remote_tests",
|
|
50
|
+
"nice": 10,
|
|
51
|
+
"tags": [
|
|
52
|
+
"linux",
|
|
53
|
+
"x64",
|
|
54
|
+
"gpu",
|
|
55
|
+
"cuda"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|